CN104318560A - Image segmentation method based on asymmetrical anti-packing model - Google Patents

Image segmentation method based on asymmetrical anti-packing model Download PDF

Info

Publication number
CN104318560A
CN104318560A CN201410564036.2A CN201410564036A CN104318560A CN 104318560 A CN104318560 A CN 104318560A CN 201410564036 A CN201410564036 A CN 201410564036A CN 104318560 A CN104318560 A CN 104318560A
Authority
CN
China
Prior art keywords
pixel
lemma
image
homogeneous blocks
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410564036.2A
Other languages
Chinese (zh)
Other versions
CN104318560B (en
Inventor
郑运平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201410564036.2A priority Critical patent/CN104318560B/en
Publication of CN104318560A publication Critical patent/CN104318560A/en
Application granted granted Critical
Publication of CN104318560B publication Critical patent/CN104318560B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention discloses an image segmentation method based on an asymmetrical anti-packing model. The image segmentation method based on the asymmetrical anti-packing model includes the following steps that (1) a to-be-processed image is encoded to obtain the total number of same-class blocks, a color table P and a coordinate table Q; (2) a serial number i of a current scanning block is equal to 0, and a pointer matrix is designed; (3) P (i) and Q (i) are obtained; (4) the size of a current block and coordinate information of a left margin and an upper margin are calculated according to Q (i); (5) a pixel LL on left side of a pixel L of the left margin and belonging areas of the pixel L and the pixel LL are found out, ancestor areas of the two areas are found out, if the two areas are the same area, the operation skips to next pixel, and otherwise, whether combination of ancestors is allowed or not is determined; (6) a pixel TT on upper side of a pixel T of the upper margin and belonging areas of the pixel T and the pixel TT are found out, ancestor areas of the two areas are found out, if the two areas are the same area, the operation skips to next pixel, and otherwise, whether combination of ancestors is allowed or not is determined; (7) i++ is allowed, and the operation skips to the step (3) till processing of all blocks is finished. The image segmentation method based on the asymmetrical anti-packing model has the advantages of rapid image processing and the like.

Description

A kind of image partition method based on asymmetric inversed placement model
Technical field
The present invention relates to a kind of computer image processing technology, particularly one is based on the image partition method of asymmetric inversed placement model (NAM).
Background technology
Image Segmentation Technology and image representing method closely related, main introduce relevant present Research and recent development trend both domestic and external with regard to the hierarchical data structure of image and the cutting techniques of image here.
(1) hierarchical data structure of image;
Hierarchical data structure is very important region representation method in the fields such as computer vision, robot, computer graphics, image procossing, pattern-recognition.The layer representation method of image plays a part very crucial in the application such as Iamge Segmentation, compression of images and image retrieval.Quadtrees is a kind of form of image layered expression, it be study the earliest, be also a kind of layer representation form studying at most.Early stage quadtrees represents it is all quadtrees structure based on pointer, and in order to significantly reduce storage space, the people such as Gargantini eliminate pointer scheme, propose the method for expressing being referred to as linear quadtree.The people such as Subramanian have studied the image representing method based on space binary tree segmentation (BSP, Binary Space Partitioning).Image is after BSP tree representation, and it represents that result directly can support the compression of image and segmentation scheduling algorithm.Represent based on the binary tree mixed and quadtrees, the people such as Kassim propose a kind of image representing method based on layering segmentation.Based on the coding method of B-tree bougainvillea shape, the gray level image that the people such as Distasi propose based on spatial data structure represents algorithm.Based on S-data tree structure and Gouraud shadowing method, the gray level image that the people such as Chung propose a kind of spatial data structure based on S-tree represents (STC, S-Tree Coding) method (K.L.Chung, J.G.Wu.Improved image compression using S-tree and shading approach.IEEE Transactions on Communications, 2000,48 (5): 748-751.).Subsequently, the people such as Chung propose a kind of mixing gray scale image table based on DCT domain and spatial domain and show (SDCT, Spatial-and DCT-based) method (K.L.Chung, Y.W.Liu, W.M.Yan.A hybrid gray image representation using spatial-and DCT-based approach with application to moment computation.Journal of Visual Communication and Image Representation, 2006,17 (6): 1209-1226).
Although above-mentioned individual-layer data indicates many advantages, they too emphasize the symmetry split, and are not therefore optimum method for expressing.By means of the thought of Packing problem, to find the maximized asymmetric dividing method of segmentation for target, the people such as Chen propose NAM method for expressing (the Chen Chuanbo of image model, Zheng Yunping.A novel non-symmetry and anti-packing model for image representation.Chinese Journal of Electronics, 2009,18 (1): 89-94.).Zheng Yun equality people proposes a kind of based on the Gouraud shadowing method of expansion and the NAM gray level image method for expressing of non-overlapped rectangle subpattern, referred to as RNAMC method for expressing (Zheng Yunping, Chen Chuanbo. a kind of new gray level image represents algorithm research. Chinese journal of computers, 2010,33 (12): 2397-2406.).Due to can overlapping NAM method for expressing generally can be higher than non-overlapped NAM method for expressing efficiency, Zheng Yun equality people also been proposed a kind of based on the Gouraud shadowing method of expansion and the NAM gray level image method for expressing of overlapping rectangles subpattern, referred to as ORNAM method for expressing (Yunping Zheng, Zhiwen Yu, Jane You, Mudar Sarem.A novel gray image representation using overlapping rectangular NAM and extended shading approach.Journal of Visual Communication and Image Representation, 2012, 23 (7): 972-983.).Experimental result shows: compare with RNAMC method for expressing with STC, SDCT, under the prerequisite keeping picture quality, ORNAM method for expressing has higher ratio of compression and less block number, thus more effectively can reduce data space, is a kind of good method that gray level image represents.
Image representing method has two objects: the first, improves the expression efficiency of image.The second, improve the processing speed of image manipulation.
(2) cutting techniques of image;
Iamge Segmentation is the basis that high-rise graphical analysis is understood.Image Segmentation Technology mainly can be divided into the dividing method based on region and the dividing method based on border, the former depends on the space local feature of image, as the homogeneity etc. of gray scale, texture and other pixels statistics characteristic, the latter mainly utilizes the border of gradient information determination target.Though the method based on edge has higher positional accuracy, shortcoming is high to noise sensitivity; And based on the dividing method in region to insensitive for noise, but easily over-segmentation, and the positioning precision at edge also needs to improve.Threshold segmentation is the most most widely used cutting techniques of fundamental sum, its realize simple, calculated amount is little and performance is more stable.The people such as Batenburg propose a kind of projector distance Method for minimization.The problem that the people such as Zhang Xinming are not accurate enough for conventional two-dimensional Renyi entropy (RE) split plot design segmentation result and computation complexity is high, proposes the one accurate point-score of two-dimentional RE fast.The people such as Van propose a kind of optimal threshold system of selection for homogeneous object segmentation dense in tomography restructuring.The people such as Long Jianwu propose a kind of interactive text threshold segmentation algorithm based on gray level image region.In recent years, along with development and some the theoretical and application of model on image of other new branch of science, scholars both domestic and external propose some new image Segmentation Technology, as the method (M.Gong based on fuzzy theory, Y.Liang, J.Shi, W.Ma, J.Ma.Fuzzy C-means clustering with local information and kernel metric for image segmentation.IEEE Transactions on Image Processing, 2013, 22 (2): 573-584.), based on genetic method (G.Tian, Y.Xia, Y.Zhang, D.Feng.Hybrid genetic and variational expectation-maximization algorithm for Gaussian-mixture-model-based brain MR image segmentation.IEEE Transactions on Information Technology in Biomedicine, 2011, 15 (3): 373-380.), method (the O.Eches of Corpus--based Method theory, J.A.Benediktsson, N.Dobigeon, J.Tourneret.Adaptive Markov random fields for joint unmixing and segmentation of hyperspectral images.IEEE Transactions on Image Processing, 2013, 22 (2): 573-584.), based on the method (T.Andersson of Level Set Theory, G.Lathen, R.Lenz, M.Borga.Modified gradient search for level set based image segmentation.IEEE Transactions on Image Processing, 2013, 22 (2): 621-630.), based on the method (S.Petroudi of active contour model, C.Loizou, M.Pantziaris, C.Pattichis.Segmentation of the common carotid intima-media complex in ultrasound images using active contours.IEEE Transactions on Biomedical Engineering, 2012, 59 (11): 3060-3069.), based on the method (H.Zhuang of neural network, K.Low, W.Yau.Multichannel pulse-coupled-neural-network-based color image segmentation for object detection.IEEE Transactions on Industrial Electronics, 2013, 59 (8): 3299-3308.), based on the method for expressing (M.Veganzones of hierarchy, G.Tochon, M.Dalla-Mura, A.Plaza, J.Chanussot.Hyperspectral image segmentation using a new spectral unmixing-based binary partition tree representation.IEEE Transactions on Image Processing, 2014, 23 (8): 3574-3589.).Wherein based on the dividing method of quadtrees, be called for short QSC method, current popular a kind of image partition method (K.L.Chung, H.L.Huang, H.I.Lu.Efficient region segmentation on compressed gray images using quadtree and shading representation.Pattern Recognition, 2004,37 (8): 1591-1605.).
In sum, although there is a lot of researchist to be devoted to the research of Iamge Segmentation in recent years, propose much new cutting techniques, due to the difficulty of problem itself, mostly current method is for certain specific tasks, goes back the solution that neither one is general.The important reason of of Iamge Segmentation difficulty is complicacy and the diversity of image.Due to the complicacy of image, the independent image segmentation algorithm of existing any one is all difficult to obtain gratifying segmentation result to general pattern, thus while continuing to be devoted to that new concept, new theory, new method are introduced Iamge Segmentation field, more pay attention to effective combination of multiple partitioning algorithm, the method great majority proposed in recent years combine many algorithms, compared with single partitioning algorithm, segmentation integrated technology is more effective, and robustness, stability, accuracy and adaptivity etc. are better.
Effective image representing method can not only save storage space, and can also improve the speed of image procossing.The NAM method for expressing of image model is against layout expression way to the one of image model, image model is divided into predefined subpattern set in essence, subpattern can be stored, therefore the method also directly supports the Processing Algorithm such as the segmentation of image.
Invention Inner holds
The object of the invention is for Problems existing in conventional images cutting techniques, and provide a kind of image partition method based on asymmetric inversed placement model (NAM), this image partition method can significantly improve expression and the operating efficiency of Iamge Segmentation.First partitioning algorithm based on NAM will encode to image, and obtaining the total homogeneous blocks block number after encoding is N, color table P, coordinates table Q.Then from the homogeneous blocks of first, the upper left corner, press the order scanning homogeneous blocks of raster scanning successively, often scan color value and coordinate figure that a homogeneous blocks just obtains these homogeneous blocks four corners from color table and coordinates table, and obtain size according to coordinate figure, then the west circle of this homogeneous blocks and all neighbor pixels of northern boundary are scanned, if the region belonging to neighbor pixel and current homogeneous blocks do not belong to same region and can merge, then perform the Union-find Sets algorithm combined region that band presses order merging and path compression strategy, otherwise continue the next neighbor pixel of scanning.When the left margin of this block and the neighbor pixel of coboundary all scanned, this block is disposed, by the next homogeneous blocks of above step process, until all pieces of process complete.
Image partition method based on asymmetric inversed placement model provided by the invention, comprises the following steps:
Step S1, to be the pending image patent name of U × V by size be: the coding method of a kind of stationary image compression coding method based on asymmetric inversed placement model (patent No. is: ZL 200810196929.0) is encoded, obtain the block number N of the total homogeneous blocks after encoding, color table P, coordinates table Q.
Concrete grammar is as follows:
Step S1.1, by all elements assignment of matrix variables R be 0, matrix variables R size equal with pending gray level image f, be U × V, with seasonal N=0; Wherein, U and V is natural number;
Starting point (the x of step S1.2, determine in gray level image f by the order of raster scanning one not identified rectangular block 1, y 1), determine according to this starting point and given error allowance ε the homogeneous blocks H that an area is maximum, and homogeneous blocks H is made a check mark in gray level image f;
Homogeneous blocks refers to the rectangular block meeting following condition:
In this rectangular block, the gray-scale value g (x, y) of all pixels all satisfies condition | g (x, y)-g est(x, y) |≤ε, wherein, ε is the error allowance that user sets, (x 1, y 1), (x 2, y 2) be respectively the coordinate figure in this rectangular block upper left corner and the lower right corner, x 1≤ x≤x 2, y 1≤ y≤y 2; According to coordinate (x 1, y 1) and (x 2, y 2) position relationship, g est(x, y) represents the approximate gray-scale value at coordinate (x, y) place in this homogeneous blocks, calculates by following four kinds of situations:
If x 1<x 2and y 1<y 2, then g est(x, y)=g 5+ (g 6-g 5) × i 1,
Wherein g 5=g 1+ (g 2-g 1) × i 2, g 6=g 3+ (g 4-g 3) × i 2, i 1=(y-y 1)/(y 2-y 1), and i 2=(x-x 1)/(x 2-x 1);
If x 1≠ x 2and y 1=y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(x-x 1)/(x 2-x 1)];
If x 1=x 2and y 1≠ y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(y-y 1)/(y 2-y 1)];
If x 1=x 2and y 1=y 2, then g est(x, y)=g 1;
The parameter of step S1.3, record homogeneous blocks H, that is: the coordinate (x in the upper left corner 1, y 1), the coordinate (x in the lower right corner 2, y 2) and the gray-scale value (g in 4 corners 1, g 2, g 3, g 4); Make N=N+1,
Step S1.4, according to coordinate (x 1, y 1) and (x 2, y 2) position relationship, by following three kinds of situations, the parameter of the homogeneous blocks H found is stored in a color table P;
If x 1<x 2and y 1<y 2, then by the parameter (g of homogeneous blocks 1, g 2, g 3, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
If x 1≠ x 2and y 1=y 2, or x 1=x 2and y 1≠ y 2then by the parameter (g of homogeneous blocks 1, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
If x 1=x 2and y 1=y 2, then by the parameter (g of homogeneous blocks 1) rectangular block of correspondence position in matrix variables R in color table P{N}, and identifies with "-1 " by assignment;
Step S1.5, circulation perform step (S1.2) to (S1.4), until the homogeneous blocks in gray level image f is all identified complete;
Step S1.6, output color table P;
Step S1.7, according to following coordinate data compression algorithm, the coordinate of nonzero elements all in matrix variables R to be encoded, and coding result is stored in a coordinates table Q;
1. size of lining by line scan is the matrix variables R of U × V, if this row all elements is zero, so just need not to encode this row, in this case, use bit " 0 " to represent that one's own profession does not exist nonzero element from the beginning to the end, and this binary digit " 0 " is stored in the coding schedule q of this row; Otherwise, if there is nonzero element in this row, before each nonzero element, so just add prefix symbol " 1 ", then after prefix symbol, add the code word identifying nonzero element 1,2 and-1, finally this prefix symbol " 1 " and code word are thereafter stored in the coding schedule q of this row;
2. represent the position of this nonzero element column with b bit, and by this b bit storage in the coding schedule q of this row, wherein the value of b calculates by following two kinds of situations;
For first nonzero element run in certain a line, b=[log 2v]; Here b bit is used for indicating the position of first nonzero element about one's own profession head end;
For other nonzero elements except first nonzero element run in certain a line, b=[log 2(V-c)], wherein c is the position of the row of the front nonzero element once run into; Here b bit is used for representing the position of this nonzero element about the right-hand member of the nonzero element of front first encoding;
3. after last nonzero element of certain a line has been encoded, bit " 0 " is used to represent that the remaining element of one's own profession is zero, and this binary digit " 0 " is stored in the coding schedule q of this row, otherwise, if the position of last nonzero element of this row is at the end of one's own profession, so just need not use " 0 " to represent the remaining element of one's own profession to be zero;
Step S1.8, output coordinate table Q, wherein Q is linked in sequence by the row coding schedule of all row of matrix variables R and obtains.
Step S2, put the sequence number i of a Current Scan block, and make i=0, arrange a pointer matrix B, size is U × V simultaneously, for representing the region that each pixel is pointed to.
Step S3, in color table, obtain P [i], in coordinates table, obtain Q [i].
Step S4, according to Q [i], calculate the size size of current block, and left margin, coboundary coordinate information.
Step S5, from left margin bottom, up scan, each left margin pixel L is found out to a pixel LL (namely LL is less than L by 1 in X-direction) on its left side, and utilize matrix B to find out region belonging to pixel L and pixel LL, to merge by order with band again and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel, otherwise, if two regions do not belong to the same area, judge whether these two ancestors can merge with following formula and lemma.
First, suppose that the size of any homogeneous blocks K is w × h, and 0≤i≤w+1,0≤j≤h-1, with season:
First the g provided estthe expression formula of (x, y):
g est ( x , y ) = g 1 + &Delta; g st &times; ( x - x 1 ) + &Delta; g sl &times; ( y - y 1 ) + D 1 &times; ( x - x 1 ) &times; ( y - y 1 ) , s . t . x 1 < x 2 , y 1 < y 2 , g 1 + ( g 4 - g 1 ) &times; x - x 1 w - 1 , s . t . x 1 &NotEqual; x 2 , y 1 = x 2 , g 1 + ( g 4 - g 1 ) &times; y - y 1 h - 1 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 2 )
First lemma, at position (x 1+ i, y 1+ j), 0≤i≤w+1,0≤j≤h-1, the gray scale estimated value at place:
g est ( x 1 + i , y 1 + j ) = g 1 + &Delta; g st &times; i + ( &Delta; g sl + D 1 &times; i ) &times; j , s . t . x 1 < x 2 , y 1 < y 2 , g 1 + g 4 - g 1 w - 1 &times; i , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , g 1 + g 4 - g 1 h - 1 &times; j , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 3 )
In formula, s.t. represents constraint condition, namely for the disposition of four kinds of homogeneous blocks.
The average of the second lemma, block K:
&mu; B i = g 1 + g 2 + g 3 + g 4 4 , s . t . x 1 < x 2 , y 1 < y 2 g 1 + g 4 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 or x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 4 )
The quadratic sum of the 3rd lemma, block K gray scale estimated value:
&Sigma; i = 0 w - 1 &Sigma; j = 0 h - 1 [ g est ( x 1 + i , y 1 + j ) ] 2 = wh ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + C 2 ( g 3 g 4 + g 1 g 2 ) C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , wh ( g 1 g 4 + C 1 ( g 4 - g 1 ) 2 ) , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , wh ( g 1 g 4 + C 2 ( g 4 - g 1 ) 2 ) , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , whg 1 2 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 5 )
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) .
The variance of the 4th lemma, block K:
&sigma; B i 2 = ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + C 2 ( g 3 g 4 + g 1 g 2 ) + C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 - ( g 1 + g 2 + g 3 + g 4 4 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , ( C 1 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , ( C 2 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , 0 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 6 )
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) ;
The gray average of the 5th lemma, combined region C:
&mu; C = n A &mu; A + n B &mu; B n C , - - - ( 7 )
Formula (7) will the Four types belonging to concrete similar A and homogeneous blocks B call respectively before the mean value computation formula that provided, i.e. lemma 2.
The gray variance of the 6th lemma, combined region C:
&sigma; B i 2 = n A &sigma; A 2 + n B &sigma; B 2 n C + n A n B ( &mu; A - &mu; B ) 2 n C 2 , - - - ( 8 )
After step S6, left margin are scanned, from the leftmost of coboundary, to turn right scanning, one, its top pixel TT (namely TT is less than T by 1 in the Y direction) is found out to each coboundary pixel T, and utilize matrix B to find out region belonging to pixel T and pixel TT, to merge by order with band again and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel; Otherwise, if two regions do not belong to the same area, judge whether these two ancestors can merge with the formula in step S5.
Step S7, i++, jump to step S3, until all pieces are disposed.
Principle of the present invention: the present invention, by means of the thought of the quadtrees Region Segmentation Algorithm of location problem and gray level image, by find the maximized asymmetric dividing method of segmentation for goal in research, can significantly improve expression and the operating efficiency of Iamge Segmentation.First partitioning algorithm based on NAM will encode to image, obtains the total homogeneous blocks block number N after encoding, color table P, coordinates table Q.Then from the homogeneous blocks of first, the upper left corner, press the order scanning homogeneous blocks of raster scanning successively, often scan color value and coordinate figure that a homogeneous blocks just obtains these homogeneous blocks four corners from color table and coordinates table, and obtain size according to coordinate figure, then the west circle of this homogeneous blocks and all neighbor pixels of northern boundary are scanned, if the region belonging to neighbor pixel and current homogeneous blocks do not belong to same region and can merge, then perform the Union-find Sets algorithm combined region that band presses order merging and path compression strategy, otherwise continue the next neighbor pixel of scanning.When the left margin of this block and the neighbor pixel of coboundary all scanned, this block is disposed, by the next homogeneous blocks of above step process, until all pieces of process complete.The time complexity of the inventive method is O (NL), and wherein N represents the block number of homogeneous blocks, and L represents the length of side size of every block.
The present invention compared to existing technology tool has the following advantages:
1, in the expression of Iamge Segmentation, for 4 given width images, under different error tolerances (ε=10 and 15), the homogeneous blocks number average out to 136793 (234426) of NAM (QSC), the PSNR average out to 35.29655 (39.19443) of NAM (QSC), the CR average out to 3.31536 (2.8390) of NAM (QSC) is also the ratio of compression increase rate average out to 16.77% of NAM relative to QSC.Simultaneously NAM represents that algorithm also represents algorithm decreased average 41.647% than QSC in the number of homogeneous blocks, thus effectively can improve the speed of efficiency that image represents and image procossing.
Under identical error tolerance, such as: when ε=15, for 4 given width images, the homogeneous blocks number average out to 11247 (20299) of NAM (QSC), the PSNR average out to 33.56574 (37.5469) of NAM (QSC), the CR average out to 3.9065 (3.2296) of NAM (QSC), also namely NAM is 20.96% relative to the ratio of compression increase rate of QSC.NAM represents than QSC, algorithm also represents that algorithm decreases 44.59% in the number of homogeneous blocks simultaneously, obviously, NAM is better than QSC in the number (decreasing 44.59%) and ratio of compression increase rate (improve 20.96%) of homogeneous blocks.
2, in the processing speed of Iamge Segmentation, under the precondition ensureing picture quality, when ε=10 and 15, the execution speed of the partitioning algorithm represented based on NAM on average improves 85.97% than the execution speed of the partitioning algorithm represented based on QSC, because of but a kind of more effective partitioning algorithm.
Therefore, under the prerequisite ensureing picture quality, NAM dividing method provided by the invention is better than QSC dividing method.The present invention both can be applicable to traditional Iamge Segmentation market, can be applicable to emerging field again, as network transmission, wireless telecommunications, medical image etc.NAM theory being incorporated in the segmentation of medical image by means of visual perception mechanism is a new exploration, this dividing method based on NAM may be used in the segmentation of medical image, diagnoses clinically, the formulation of surgical planning, the various aspects such as visual, the tracking of pathology conversion and the evaluation of result for the treatment of also have important practical application meaning at the precise quantification of medical treatment.
3, the present invention is compared with the existing image partition method based on QSC, under the prerequisite keeping picture quality, the image partition method based on NAM that the present invention proposes has lower bit rate and less block number, thus more effectively can reduce the speed of data space and raising Iamge Segmentation, because of but the better dividing method of the one of gray level image, this dividing method can be applied to the various aspects of image procossing, at reduction storage space, accelerate transmission speed, improve the aspects such as pattern match efficiency and there is good theoretical reference meaning and actual application value.
Accompanying drawing explanation
Fig. 1 is the entire flow figure of the dividing method that the present invention is based on NAM.
Fig. 2 is the coding process flow diagram based on NAM method.
Fig. 3 is the schematic diagram of homogeneous blocks of the present invention.
Fig. 4 a is the Cameraman image of the standard grayscale test pattern of the present invention's 512 × 512 sizes used.
Fig. 4 b is the Boat image of the standard grayscale test pattern of the present invention's 512 × 512 sizes used.
Fig. 4 c is the Lena image of the standard grayscale test pattern of the present invention's 512 × 512 sizes used.
Fig. 4 d is the F16 image of the standard grayscale test pattern of the present invention's 512 × 512 sizes used.
Fig. 5 a is in an example (ε=10) of QSC method, when ε=10, and the quadtrees segmentation effect of Fig. 4 a.
Fig. 5 b is effect (μ <30, the σ of quadtrees method region merging technique in an example (ε=10) of QSC method 2<225).
Fig. 5 c is the effect that in an example (ε=10) of QSC method, each region represents with its gray average.
Fig. 6 a is in an example (ε=10) of NAM method, when ε=10, and the NAM segmentation effect of Fig. 4 a.
Fig. 6 b is in an example (ε=10) of NAM method, effect (μ <30, the σ of NAM method region merging technique 2<225).
Fig. 6 c is in an example (ε=10) of NAM method, the effect that each region represents with its gray average.
Embodiment
Embodiment
The object of the invention is for Problems existing in conventional images cutting techniques, a kind of image partition method based on asymmetric inversed placement model (NAM) is provided, its overall procedure as shown in Figure 1, can significantly improve expression and the operating efficiency of Iamge Segmentation.First partitioning algorithm based on NAM will encode to image, and obtaining the total homogeneous blocks block number after encoding is N, color table P, coordinates table Q.Then from the homogeneous blocks of first, the upper left corner, press the order scanning homogeneous blocks of raster scanning successively, often scan color value and coordinate figure that a homogeneous blocks as shown in Figure 3 just obtains these homogeneous blocks four corners from color table and coordinates table, and obtain size according to coordinate figure, then the west circle of this homogeneous blocks and all neighbor pixels of northern boundary are scanned, if the region belonging to neighbor pixel and current homogeneous blocks do not belong to same region and can merge, then perform the Union-find Sets algorithm combined region that band presses order merging and path compression strategy, otherwise continue the next neighbor pixel of scanning.When the left margin of this block and the neighbor pixel of coboundary all scanned, this block is disposed, by the next homogeneous blocks of above step process, until all pieces of process complete.The time complexity of the inventive method is O (NL), and wherein N represents the block number of homogeneous blocks, and L represents the length of side size of every block.Experimental result shows: compared with the current popular image partition method based on QSC, under the prerequisite keeping picture quality, the image partition method based on NAM that the present invention proposes has lower bit rate and less block number, thus more effectively can reduce data space and improve the speed of Iamge Segmentation, because of but the better dividing method of the one of gray level image.This dividing method can be applied to the various aspects of image procossing, at reduction storage space, accelerates to have good theoretical reference meaning and actual application value in transmission speed, raising pattern match efficiency etc.
As shown in Figure 2, coding method provided by the invention is by carrying out NAM coding to the gray level image f of a given width U × V and error allowance ε, and result is stored in an a color table P and coordinates table Q, then based on these piecemeals, a kind of image partition method based on asymmetric inversed placement model is proposed.Specifically comprise the following steps:
(S1) be that a kind of stationary image compression coding method based on asymmetric inversed placement model of our patent of invention of pending image (ZL 200810196929.0) of U × V is encoded by size, obtain the total homogeneous blocks block number N after encoding, color table P, coordinates table Q.
Concrete grammar is as follows:
(S1.1) by all elements assignment of matrix variables R be 0, matrix variables R size equal with pending gray level image f, be U × V, with seasonal N=0; Wherein, U and V is natural number;
(S1.2) starting point (x of one that determines in gray level image f by the order of raster scanning not identified rectangular block 1, y 1), determine according to this starting point and given error allowance ε the homogeneous blocks H that an area is maximum, and homogeneous blocks H is made a check mark in gray level image f;
Homogeneous blocks refers to the rectangular block meeting following condition:
In this rectangular block, the gray-scale value g (x, y) of all pixels all satisfies condition | g (x, y)-g est(x, y) |≤ε, wherein, ε is the error allowance that user sets, (x 1, y 1), (x 2, y 2) be respectively the coordinate figure in this rectangular block upper left corner and the lower right corner, x 1≤ x≤x 2, y 1≤ y≤y 2; According to coordinate (x 1, y 1) and (x 2, y 2) position relationship, g est(x, y) represents the approximate gray-scale value at coordinate (x, y) place in this homogeneous blocks, calculates by following four kinds of situations:
If x 1<x 2and y 1<y 2, then g est(x, y)=g 5+ (g 6-g 5) × i 1,
Wherein g 5=g 1+ (g 2-g 1) × i 2, g 6=g 3+ (g 4-g 3) × i 2, i 1=(y-y 1)/(y 2-y 1), and i 2=(x-x 1)/(x 2-x 1);
If x 1≠ x 2and y 1=y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(x-x 1)/(x 2-x 1)];
If x 1=x 2and y 1≠ y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(y-y 1)/(y 2-y 1)];
If x 1=x 2and y 1=y 2, then g est(x, y)=g 1;
(S1.3) parameter of homogeneous blocks H is recorded, that is: the coordinate (x in the upper left corner 1, y 1), the coordinate (x in the lower right corner 2, y 2) and the gray-scale value (g in 4 corners 1, g 2, g 3, g 4); Make N=N+1,
(S1.4) according to coordinate (x 1, y 1) and (x 2, y 2) position relationship, by following three kinds of situations, the parameter of the homogeneous blocks H found is stored in a color table P;
If x 1<x 2and y 1<y 2, then by the parameter (g of homogeneous blocks 1, g 2, g 3, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
If x 1≠ x 2and y 1=y 2, or x 1=x 2and y 1≠ y 2then by the parameter (g of homogeneous blocks 1, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
If x 1=x 2and y 1=y 2, then by the parameter (g of homogeneous blocks 1) rectangular block of correspondence position in matrix variables R in color table P{N}, and identifies with "-1 " by assignment;
(S1.5) circulation performs step (S1.2) to (S1.4), until the homogeneous blocks in gray level image f is all identified complete;
(S1.6) color table P is exported;
(S1.7) according to following coordinate data compression algorithm, the coordinate of nonzero elements all in matrix variables R is encoded, and coding result is stored in a coordinates table Q;
1. size of lining by line scan is the matrix variables R of U × V, if this row all elements is zero, so just need not to encode this row, in this case, use bit " 0 " to represent that one's own profession does not exist nonzero element from the beginning to the end, and this binary digit " 0 " is stored in the coding schedule q of this row; Otherwise, if there is nonzero element in this row, before each nonzero element, so just add prefix symbol " 1 ", then after prefix symbol, add the code word identifying nonzero element 1,2 and-1, finally this prefix symbol " 1 " and code word are thereafter stored in the coding schedule q of this row;
2. represent the position of this nonzero element column with b bit, and by this b bit storage in the coding schedule q of this row, wherein the value of b calculates by following two kinds of situations;
For first nonzero element run in certain a line, b=[log 2v]; Here b bit is used for indicating the position of first nonzero element about one's own profession head end;
For other nonzero elements except first nonzero element run in certain a line, b=[log 2(V-c)], wherein c is the position of the row of the front nonzero element once run into; Here b bit is used for representing the position of this nonzero element about the right-hand member of the nonzero element of front first encoding;
3. after last nonzero element of certain a line has been encoded, bit " 0 " is used to represent that the remaining element of one's own profession is zero, and this binary digit " 0 " is stored in the coding schedule q of this row, otherwise, if the position of last nonzero element of this row is at the end of one's own profession, so just need not use " 0 " to represent the remaining element of one's own profession to be zero;
(S1.8) output coordinate table Q, wherein Q is linked in sequence by the row coding schedule of all row of matrix variables R and obtains.
(S2) arrange the sequence number i of a Current Scan block, and make i=0, arrange a pointer matrix B simultaneously, size is U × V, for representing the region that each pixel is pointed to.
(S3) in color table, obtain P [i], in coordinates table, obtain Q [i].
(S4) according to Q [i], the size size of current block is calculated, and left margin, coboundary coordinate information.
(S5) from left margin bottom, up scan, each left margin pixel L is found out to a pixel LL (namely LL is less than L by 1 in X-direction) on its left side, and utilize matrix B to find out region belonging to pixel L and pixel LL, to merge by order with band again and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel, otherwise, if two regions do not belong to the same area, judge whether these two ancestors can merge with following formula and lemma.
First, suppose that the size of any homogeneous blocks K is w × h, and 0≤i≤w+1,0≤j≤h-1, with season:
First the g provided estthe expression formula of (x, y):
g est ( x , y ) = g 1 + &Delta; g st &times; ( x - x 1 ) + &Delta; g sl &times; ( y - y 1 ) + D 1 &times; ( x - x 1 ) &times; ( y - y 1 ) , s . t . x 1 < x 2 , y 1 < y 2 , g 1 + ( g 4 - g 1 ) &times; x - x 1 w - 1 , s . t . x 1 &NotEqual; x 2 , y 1 = x 2 , g 1 + ( g 4 - g 1 ) &times; y - y 1 h - 1 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 2 )
First lemma: at position (x 1+ i, y 1+ j), 0≤i≤w+1,0≤j≤h-1, the gray scale estimated value at place:
g est ( x 1 + i , y 1 + j ) = g 1 + &Delta; g st &times; i + ( &Delta; g sl + D 1 &times; i ) &times; j , s . t . x 1 < x 2 , y 1 < y 2 , g 1 + g 4 - g 1 w - 1 &times; i , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , g 1 + g 4 - g 1 h - 1 &times; j , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 3 )
In formula, s.t. represents constraint condition, namely for the disposition of four kinds of homogeneous blocks.
Second lemma: the average of block K:
&mu; B i = g 1 + g 2 + g 3 + g 4 4 , s . t . x 1 < x 2 , y 1 < y 2 g 1 + g 4 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 or x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 4 )
3rd lemma: the quadratic sum of block K gray scale estimated value:
&Sigma; i = 0 w - 1 &Sigma; j = 0 h - 1 [ g est ( x 1 + i , y 1 + j ) ] 2 = wh ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + C 2 ( g 3 g 4 + g 1 g 2 ) C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , wh ( g 1 g 4 + C 1 ( g 4 - g 1 ) 2 ) , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , wh ( g 1 g 4 + C 2 ( g 4 - g 1 ) 2 ) , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , whg 1 2 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 5 )
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) .
4th lemma: the variance of block K:
&sigma; B i 2 = ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + C 2 ( g 3 g 4 + g 1 g 2 ) + C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 - ( g 1 + g 2 + g 3 + g 4 4 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , ( C 1 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , ( C 2 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , 0 , s . t . x 1 = x 2 , y 1 = y 2 , - - - ( 6 )
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) .
The gray average of the 5th lemma: combined region C:
&mu; C = n A &mu; A + n B &mu; B n C , - - - ( 7 )
Formula (7) will the Four types belonging to concrete similar A and homogeneous blocks B call respectively before the mean value computation formula that provided, i.e. lemma 2.
The gray variance of the 6th lemma: combined region C
&sigma; B i 2 = n A &sigma; A 2 + n B &sigma; B 2 n C + n A n B ( &mu; A - &mu; B ) 2 n C 2 , - - - ( 8 )
(S6) left margin scanned after, from the leftmost of coboundary, to turn right scanning, one, its top pixel TT (namely TT is less than T by 1 in the Y direction) is found out to each coboundary pixel T, and utilize matrix B to find out region belonging to pixel T and pixel TT, to merge by order with band again and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel; Otherwise, if two regions do not belong to the same area, judge whether these two ancestors can merge with the formula in step S5.
(S7) i++, jumps to S3, until all pieces are disposed.
To QSC and NAM these two kinds, this example represents that algorithm compares.The size of the test pattern adopted, title are respectively the 4 width gray level images such as ' Camera ', ' Boat ', ' Lena ' and ' F16 ' of 512 × 512 sizes, as shown in Fig. 4 a, Fig. 4 b, Fig. 4 c and Fig. 4 d.In addition, all experimental results all obtained when ε=10 and 15.
Consider two kinds of different error tolerance ε=10 and 15, this example first gives NAM and the QSC comparison representing the experimental result of algorithm, the expression efficiency of these 2 kinds of algorithms can be measured by following 3 parameters, that is: the number of homogeneous blocks, ratio of compression and PSNR.Table 1 (table 1 is the comparison sheet of compression performance) gives NAM and represents that algorithm and QSC represent the comparison of algorithm on compression performance.Table 2 (table 2 is the comparison sheet of homogeneous blocks) and table 3 (table 3 is the comparison sheet of PSNR) sets forth NAM and QSC and represent the comparison of algorithm on the number and PSNR of homogeneous blocks.
Table 1
Table 2
Table 3
Easily know from table 2, along with the increase of ε, NAM and QSC represents that the ratio of compression of algorithm is all in increase trend.In addition, be not difficult to find out from table 1, table 2 and table 3, for 4 given width images, under different error tolerances (ε=10 and 15), the homogeneous blocks number average out to 136793 (234426) of NAM (QSC), the PSNR average out to 35.29655 (39.19443) of NAM (QSC), the CR average out to 3.31536 (2.8390) of NAM (QSC) is also the ratio of compression increase rate average out to 16.77% of NAM relative to QSC.Simultaneously NAM represents that algorithm also represents algorithm decreased average 41.647% than QSC in the number of homogeneous blocks, thus is more conducive to improving the speed of efficiency that image represents and image procossing.
In addition, under identical error tolerance, such as: when ε=15, for 4 given width images, the homogeneous blocks number average out to 11247 (20299) of NAM (QSC), the CR average out to 3.9065 (3.2296) of the PSNR average out to 33.56574 (37.5469), NAM (QSC) of NAM (QSC), also namely NAM is 20.96% relative to the ratio of compression increase rate of QSC.NAM represents than QSC, algorithm also represents that algorithm decreases 44.59% in the number of homogeneous blocks simultaneously, obviously, NAM is better than QSC, although the PSNR of NAM have dropped 3-4 decibel than QSC in the number (decreasing 44.59%) and ratio of compression increase rate (improve 20.96%) of homogeneous blocks.Usually, if rebuild the PSNR of image to reach about 30, human eye is subjective is can not differentiate original image and rebuild difference between image.Obviously, when ε=15, the PSNR of the image after these 2 kinds of algorithms reconstructions all reaches more than 30.
In sum, compared with representing algorithm with QSC, keep picture quality prerequisite under, NAM represents that algorithm has higher ratio of compression and less block number, thus more effectively can reduce data space, because of but the better method for expressing of the one of gray level image.
As shown in Fig. 5 a, Fig. 5 b and Fig. 5 c, being the segmentation result of the QSC of ' cameraman ', as shown in Fig. 6 a, Fig. 6 b and Fig. 6 c, is the segmentation result of the NAM of ' cameraman '.Fig. 5 is an example (ε=10) of QSC method, and wherein, Fig. 5 a gives Fig. 4 a when the quadtrees segmentation effect in the situation of ε=10, and Fig. 5 b gives effect (μ <30, the σ of quadtrees method region merging technique 2<225), the effect that represents with its gray average of each region of Fig. 5 c.
Fig. 6 a, Fig. 6 b and Fig. 6 c are examples (ε=10) of NAM method, and wherein, Fig. 6 a gives Fig. 4 a when the NAM segmentation effect in the situation of ε=10, and Fig. 6 b gives effect (μ <30, the σ of NAM method region merging technique 2<225), the effect that represents with its gray average of each region of Fig. 6 c.
Following table 4 (table 4 represent the segmentation performance comparison sheet represented with QSC for NAM) gives NAM and represents comparing of the segmentation efficiency represented with QSC, and wherein ε represents error allowance; NP represents the sum of all pixels of test pattern, and unit is individual; NB qSCand NB nAMrepresent that image represents the quantity of homogeneous blocks when representing with NAM with QSC respectively, unit is individual; NMB qSCrepresent the quantity of smallest blocks when image represents with QSC, unit is individual; Nreg qSCand Nreg nAMthe quantity in the region after splitting when representing that image represents represent with NAM with QSC respectively, unit is individual; Linear_tree_table qSCand color_table qSCrepresent the length of linear quadtree table that image represents with QSC and the length of color table respectively, unit is bit; Coordinate_table nAMand color_table nAMrepresent the length of the length after the coordinates table coding that image represents with NAM and color table respectively, unit is bit; BPP qSCand BPP nAMrepresent that image QSC represents bit rate when representing with NAM respectively, unit is bit per pixel; T nAMand T qSCrepresent the execution time of the partitioning algorithm represented based on QSC and represent based on NAM respectively, unit is millisecond.
Image Camera Boat Lena F16
NP 262144 262144 262144 262144
NB QSC(ε=10) 20167 33886 26953 25339
NB QSC(ε=15) 15571 27301 18538 19786
NB NAM(ε=10) 11326 20406 16233 16480
NB NAM(ε=15) 8318 14713 10178 11780
NMB QSC(ε=10) 16328 30108 20748 20600
NMB QSC(ε=15) 11300 22576 12776 15176
Nreg QSC(ε=10) 3104 4318 2668 4082
Nreg QSC(ε=15) 3099 4386 2661 4072
Nreg NAM(ε=10) 2312 3890 2176 3416
Nreg NAM(ε=15) 2084 3533 1961 3289
linear_tree_table QSC(ε=10) 26889 45181 35937 33785
linear_tree_table QSC(ε=15) 20761 36401 24717 26381
color_table QSC(ε=10) 645344 1084352 862496 810848
color_table QSC(ε=15) 498272 873632 593216 633152
coordinate_table NAM(ε=10) 238716 427468 354257 349747
coordinate_table NAM(ε=15) 176089 308902 223765 249490
color_table NAM(ε=10) 331968 582672 459168 466984
color_table NAM(ε=15) 242192 415936 286864 331096
BPP QSC(ε=10) 2.5644 4.3088 3.4272 3.2220
BPP QSC(ε=15) 1.9800 3.4715 2.3572 2.5159
BPP NAM(ε=10) 2.1770 3.8534 3.1030 3.1156
BPP NAM(ε=15) 1.5956 2.7650 1.9479 2.2148
T NAM(ε=10) 109 188 156 141
T NAM(ε=15) 93 140 125 109
T QSC(ε=10) 766 1750 1218 1141
T QSC(ε=15) 532 1218 672 750
(T QSC-T NAM)/T QSC(ε=10) 85.77% 89.26% 87.19% 87.64%
(T QSC-T NAM)/T QSC(ε=15) 82.52% 88.51% 81.40% 85.47%
Table 4
Under identical error tolerance, such as: when ε=15, for 4 given width images, the homogeneous blocks number average out to 11247 (20299) of NAM (QSC), the PSNR average out to 33.56574 (37.5469) of NAM (QSC), the CR average out to 3.9065 (3.2296) of NAM (QSC), also namely NAM is 20.96% relative to the ratio of compression increase rate of QSC.NAM represents than QSC, algorithm also represents that algorithm decreases 44.59% in the number of homogeneous blocks simultaneously, obviously, NAM is better than QSC in the number (decreasing 44.59%) and ratio of compression increase rate (improve 20.96%) of homogeneous blocks.
In addition, be not difficult to find out from table 4, when ε=10 and 15, the execution speed of the partitioning algorithm represented based on NAM on average improves 85.97% than the execution speed of the partitioning algorithm represented based on QSC, because of but a kind of more effective partitioning algorithm.
In sum, the result of the present embodiment confirms the correctness of analysis.
Above-described embodiment is the present invention's preferably embodiment; but embodiments of the present invention are not restricted to the described embodiments; change, the modification done under other any does not deviate from Spirit Essence of the present invention and principle, substitute, combine, simplify; all should be the substitute mode of equivalence, be included within protection scope of the present invention.

Claims (4)

1. based on an image partition method for asymmetric inversed placement model, it is characterized in that, comprise the following steps:
Step S1, be that the pending image of U × V is encoded by size, obtain total homogeneous blocks block number N, color table P and coordinates table Q after encoding;
Step S2, arrange the sequence number i of a Current Scan block, and make i=0, arrange a pointer matrix B, size is U × V simultaneously, for representing the region that each pixel is pointed to;
Step S3, in color table, obtain P [i], in coordinates table, obtain Q [i];
Step S4, according to Q [i], calculate current block size size and and the coordinate information of left margin and coboundary;
Step S5, from left margin bottom, up scan, each left margin pixel L is found out to a pixel LL on its left side, namely LL is less than L by 1 in X-direction, and utilize matrix B to find out region belonging to pixel L and pixel LL, to merge by order with band again and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel, otherwise, if two regions do not belong to the same area, utilize formula and lemma to judge whether these two ancestors can merge;
After step S6, left margin are scanned, from the leftmost of coboundary, to turn right scanning, one, its top pixel TT is found out to each coboundary pixel T, namely TT is less than T by 1 in the Y direction, and utilizes matrix B to find out region belonging to pixel T and pixel TT, then to merge by order with band and the Union-find Sets algorithm of path compression strategy finds out the ancestors region in these two regions, if two regions are the same areas, then jump to next pixel; Otherwise, if two regions do not belong to the same area, judge whether these two ancestors can merge with the formula described in step S5;
Step S7, i++, and jump to step S3, until all pieces are disposed;
Described in step S5, formula is defined as follows:
Suppose that the size of any homogeneous blocks K is w × h, and 0≤i≤w+1,0≤j≤h-1, with season:
&Delta;g st = g 2 - g 1 x 2 - x 1 = g 2 - g 1 w - 1 , &Delta;g sb = g 4 - g 3 x 2 - x 1 = g 4 - g 3 w - 1 , &Delta;g sl g 3 - g 1 y 2 - y 1 = g 3 - g 1 h - 1 &Delta;g sr = g 4 - g 2 y 2 - y 1 = g 4 - g 2 h - 1 C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) , D 1 = g 4 - g 3 - g 2 + g 1 ( w - 1 ) ( h - 1 ) ,
Then g estthe expression formula of (x, y) is:
g est ( x , y ) = g 1 + &Delta;g st &times; ( x - x 1 ) + &Delta;g sl &times; ( y - y 1 ) + D 1 &times; ( x - x 1 ) &times; ( y - y 1 ) s . t . x 1 < x 2 , y 1 < y 2 , g 1 + ( g 4 - g 1 ) &times; x - x 1 w - 1 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , g 1 + ( g 4 - g 1 ) &times; y - y 1 h - 1 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 .
2. the image partition method based on asymmetric inversed placement model according to claim 1, is characterized in that, described step 1 comprises the following steps:
Step S1.1, by all elements assignment of matrix variables R be 0, matrix variables R size equal with pending gray level image f, be U × V, with seasonal N=0; Wherein, U and V is natural number;
Starting point (the x of step S1.2, determine in gray level image f by the order of raster scanning one not identified rectangular block 1, y 1), determine according to this starting point and given error allowance ε the homogeneous blocks H that an area is maximum, and homogeneous blocks H is made a check mark in gray level image f;
Described homogeneous blocks refers to the rectangular block meeting following condition:
In this rectangular block, the gray-scale value g (x, y) of all pixels all satisfies condition | g (x, y)-g est(x, y) |≤ε, wherein, ε is the error allowance that user sets, (x 1, y 1), (x 2, y 2) be respectively the coordinate figure in this rectangular block upper left corner and the lower right corner, x 1≤ x≤x 2, y 1≤ y≤y 2; According to coordinate (x 1, y 1) and (x 2, y 2) position relationship, g est(x, y) represents the approximate gray-scale value at coordinate (x, y) place in this homogeneous blocks, calculates by following four kinds of situations:
If x 1<x 2and y 1<y 2, then g est(x, y)=g 5+ (g 6-g 5) × i 1,
Wherein g 5=g 1+ (g 2-g 1) × i 2, g 6=g 3+ (g 4-g 3) × i 2, i 1=(y-y 1)/(y 2-y 1), and i 2=(x-x 1)/(x 2-x 1);
If x 1≠ x 2and y 1=y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(x-x 1)/(x 2-x 1)];
If x 1=x 2and y 1≠ y 2, then g est(x, y)=g 1+ (g 4-g 1) × [(y-y 1)/(y 2-y 1)];
If x 1=x 2and y 1=y 2, then g est(x, y)=g 1;
The parameter of step S1.3, record homogeneous blocks H, that is: the coordinate (x in the upper left corner 1, y 1), the coordinate (x in the lower right corner 2, y 2) and the gray-scale value (g in 4 corners 1, g 2, g 3, g 4); Make N=N+1,
Step S1.4, according to coordinate (x 1, y 1) and (x 2, y 2) position relationship, by following three kinds of situations, the parameter of the homogeneous blocks H found is stored in a color table P:
The first situation: if x 1<x 2and y 1<y 2, then by the parameter (g of homogeneous blocks 1, g 2, g 3, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
The second situation: if x 1≠ x 2and y 1=y 2, or x 1=x 2and y 1≠ y 2then by the parameter (g of homogeneous blocks 1, g 4) upper left corner of the rectangular block of correspondence position in matrix variables R and the lower right corner in color table P{N}, and uses " 1 " and " 2 " to identify by assignment respectively;
The third situation: if x 1=x 2and y 1=y 2, then by the parameter (g of homogeneous blocks 1) rectangular block of correspondence position in matrix variables R in color table P{N}, and identifies with "-1 " by assignment;
Step S1.5, circulation perform step S1.2 to step S1.4, until the homogeneous blocks in gray level image f is all identified complete;
Step S1.6, output color table P;
Step S1.7, according to following coordinate data compression algorithm, the coordinate of nonzero elements all in matrix variables R to be encoded, and coding result is stored in a coordinates table Q;
Step S1.8, output coordinate table Q, wherein, Q is linked in sequence by the row coding schedule of all row of matrix variables R and obtains.
3. the image partition method based on asymmetric inversed placement model according to claim 2, is characterized in that, described step S1.7 comprises the following steps:
1. size of lining by line scan is the matrix variables R of U × V, if this row all elements is zero, so just need not to encode this row, in this case, use bit " 0 " to represent that one's own profession does not exist nonzero element from the beginning to the end, and this binary digit " 0 " is stored in the coding schedule q of this row; Otherwise, if there is nonzero element in this row, before each nonzero element, so just add prefix symbol " 1 ", then after prefix symbol, add the code word identifying nonzero element 1,2 and-1, finally this prefix symbol " 1 " and code word are thereafter stored in the coding schedule q of this row;
2. represent the position of this nonzero element column with b bit, and by this b bit storage in the coding schedule q of this row, wherein, the value of b calculates by following two kinds of situations;
For first nonzero element run in certain a line, b=[log 2v]; B described bit is for indicating the position of first nonzero element about one's own profession head end;
For other nonzero elements except first nonzero element run in certain a line, b=[log 2(V-c)], wherein c is the position of the row of the front nonzero element once run into; B described bit is for representing the position of this nonzero element about the right-hand member of the nonzero element of front first encoding;
3. after last nonzero element of certain a line has been encoded, bit " 0 " is used to represent that the remaining element of one's own profession is zero, and this binary digit " 0 " is stored in the coding schedule q of this row, otherwise, if the position of last nonzero element of this row is at the end of one's own profession, then need not use " 0 " to represent the remaining element of one's own profession to be zero.
4. the image partition method based on asymmetric inversed placement model according to claim 1, is characterized in that, in step s 5, described lemma comprises the first lemma, the second lemma, the 3rd lemma, the 4th lemma, the 5th lemma and the 6th lemma;
Described first lemma is defined as follows:
At position (x 1+ i, y 1+ j), 0≤i≤w+1,0≤j≤h-1, the gray scale estimated value at place:
g est ( x 1 + i , y 1 + j ) = g 1 + &Delta;g st &times; i + ( &Delta;g sl + D 1 &times; i ) &times; j s . t . x 1 < x 2 , y 1 < y 2 , g 1 + g 4 - g 1 w - 1 &times; i , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , g 1 + g 4 - g 1 h - 1 &times; j s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 ,
In formula, s.t. represents constraint condition, namely for the disposition of four kinds of homogeneous blocks;
Described second lemma is defined as follows:
The average of block K:
&mu; B i = g 1 + g 2 + g 3 + g 4 4 , s . t . x 1 < x 2 , y 1 < y 2 , g 1 + g 4 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 or x 1 = x 2 , y 1 &NotEqual; y 2 , g 1 , s . t . x 1 = x 2 , y 1 = y 2 ,
Described 3rd lemma is defined as follows:
The quadratic sum of block K gray scale estimated value:
&Sigma; i = 0 w - 1 &Sigma; j = 0 h - 1 [ h est ( x 1 + i , y 1 + j ) ] 2 = wh ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + C 2 ( g 3 g 4 + g 1 g 2 ) + C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , wh ( g 1 g 4 + C 1 ( g 4 - g 1 ) 2 ) , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , wh ( g 1 g 4 + C 2 ( g 4 - g 1 ) 2 ) , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , whg 1 2 , s . t . x 1 = x 2 , y 1 = y 2 ,
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) ;
Described 4th lemma is defined as follows:
The variance of block K:
&sigma; B i 2 = ( 1 2 - C 1 - C 2 ) ( g 1 g 4 + g 2 g 3 ) + C 1 ( g 2 g 4 + g 1 g 3 ) + g 2 ( g 3 g 4 + g 1 g 2 ) + C 1 C 2 ( g 4 - g 3 - g 2 + g 1 ) 2 - ( g 1 + g 2 + g 3 + g 4 4 ) 2 , s . t . x 1 < x 2 , y 1 < y 2 , ( C 1 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 &NotEqual; x 2 , y 1 = y 2 , ( C 2 - 1 4 ) ( g 4 - g 1 ) 2 , s . t . x 1 = x 2 , y 1 &NotEqual; y 2 , 0 , s . t . x 1 = x 2 , y 1 = y 2 ,
In formula, C 1 = 2 w - 1 6 ( w - 1 ) , C 2 = 2 h - 1 6 ( h - 1 ) ;
Described 5th lemma is defined as follows:
The gray average of combined region C:
&mu; C = n A &mu; A + n B &mu; B n C ,
Described 5th lemma will the Four types belonging to concrete similar A and homogeneous blocks B call respectively before the mean value computation formula that provided, i.e. the second lemma;
Described 6th lemma is defined as follows:
&sigma; B i 2 = n A &sigma; A 2 + n B &sigma; B 2 n C + n A n B ( &mu; A - &mu; B ) 2 n C 2 ,
In formula, represent the combined value of the gray variance of region C.
CN201410564036.2A 2014-10-21 2014-10-21 A kind of image partition method based on asymmetric inversed placement model Expired - Fee Related CN104318560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410564036.2A CN104318560B (en) 2014-10-21 2014-10-21 A kind of image partition method based on asymmetric inversed placement model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410564036.2A CN104318560B (en) 2014-10-21 2014-10-21 A kind of image partition method based on asymmetric inversed placement model

Publications (2)

Publication Number Publication Date
CN104318560A true CN104318560A (en) 2015-01-28
CN104318560B CN104318560B (en) 2018-07-20

Family

ID=52373786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410564036.2A Expired - Fee Related CN104318560B (en) 2014-10-21 2014-10-21 A kind of image partition method based on asymmetric inversed placement model

Country Status (1)

Country Link
CN (1) CN104318560B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961263A (en) * 2018-05-29 2018-12-07 郑州易通众联电子科技有限公司 A kind of visualized graphs quickly apply the method and system with transmission
CN109993762A (en) * 2019-02-21 2019-07-09 华南理工大学 A kind of rapid edge-detection method based on asymmetric inverse layout pattern
CN110113612A (en) * 2019-04-03 2019-08-09 华南理工大学 A kind of block truncation method for compressing image based on NAM segmentation
CN111862007A (en) * 2020-07-02 2020-10-30 哈尔滨市科佳通用机电股份有限公司 Freight car brake cylinder inclination detection method based on variance region segmentation
CN113505766A (en) * 2021-09-09 2021-10-15 北京智源人工智能研究院 Image target detection method and device, electronic equipment and storage medium
CN113706639A (en) * 2021-07-21 2021-11-26 国网江苏省电力有限公司电力科学研究院 Image compression method and device based on rectangular NAM, storage medium and computing equipment
CN115168629A (en) * 2022-06-08 2022-10-11 河南和畅利信息科技有限公司 Image data compression storage method based on block chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766037B1 (en) * 1998-10-02 2004-07-20 Canon Kabushiki Kaisha Segmenting moving objects and determining their motion
CN101364306A (en) * 2008-09-12 2009-02-11 华中科技大学 Stationary image compression coding method based on asymmetric inversed placement model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766037B1 (en) * 1998-10-02 2004-07-20 Canon Kabushiki Kaisha Segmenting moving objects and determining their motion
CN101364306A (en) * 2008-09-12 2009-02-11 华中科技大学 Stationary image compression coding method based on asymmetric inversed placement model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KUO-LIANG CHUNGA ET AL: "Efficient region segmentation on compressed gray images using quadtree and shading representation", 《PATTERN RECOGNITION》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961263A (en) * 2018-05-29 2018-12-07 郑州易通众联电子科技有限公司 A kind of visualized graphs quickly apply the method and system with transmission
CN109993762A (en) * 2019-02-21 2019-07-09 华南理工大学 A kind of rapid edge-detection method based on asymmetric inverse layout pattern
CN109993762B (en) * 2019-02-21 2022-12-16 华南理工大学 Rapid edge detection method based on asymmetric inverse layout mode
CN110113612A (en) * 2019-04-03 2019-08-09 华南理工大学 A kind of block truncation method for compressing image based on NAM segmentation
CN111862007A (en) * 2020-07-02 2020-10-30 哈尔滨市科佳通用机电股份有限公司 Freight car brake cylinder inclination detection method based on variance region segmentation
CN111862007B (en) * 2020-07-02 2021-01-08 哈尔滨市科佳通用机电股份有限公司 Freight car brake cylinder inclination detection method based on variance region segmentation
CN113706639A (en) * 2021-07-21 2021-11-26 国网江苏省电力有限公司电力科学研究院 Image compression method and device based on rectangular NAM, storage medium and computing equipment
CN113706639B (en) * 2021-07-21 2024-02-23 国网江苏省电力有限公司电力科学研究院 Image compression method and device based on rectangular NAM, storage medium and computing equipment
CN113505766A (en) * 2021-09-09 2021-10-15 北京智源人工智能研究院 Image target detection method and device, electronic equipment and storage medium
CN115168629A (en) * 2022-06-08 2022-10-11 河南和畅利信息科技有限公司 Image data compression storage method based on block chain
CN115168629B (en) * 2022-06-08 2023-12-26 深圳新太开发科技有限公司 Image data compression storage method based on block chain

Also Published As

Publication number Publication date
CN104318560B (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN104318560A (en) Image segmentation method based on asymmetrical anti-packing model
Ding et al. Image inpainting using nonlocal texture matching and nonlinear filtering
Sandler et al. Nonnegative matrix factorization with earth mover's distance metric for image analysis
CN102496023B (en) Region of interest extraction method of pixel level
US8248410B2 (en) Synthesizing detailed depth maps from images
Deng et al. Lau-net: Latitude adaptive upscaling network for omnidirectional image super-resolution
CN107610200B (en) Character library rapid generation method based on characteristic template
CN101103364B (en) Apparatus and method for processing video data
US20040169658A1 (en) Method and apparatus for image texture describing
US20150154450A1 (en) Optical Flow Tracking Method and Apparatus
CN110148104A (en) Infrared and visible light image fusion method based on significance analysis and low-rank representation
CN104380340A (en) Scoring and adjusting pixels based on neighborhood relationships for revealing data in images
Zhao et al. Al-net: Attention learning network based on multi-task learning for cervical nucleus segmentation
CN103049340A (en) Image super-resolution reconstruction method of visual vocabularies and based on texture context constraint
CN104331883B (en) A kind of image boundary extraction method based on asymmetric inversed placement model
CN114820634A (en) Liver tumor image segmentation method fusing SwinTransformer and CNN
CN105354570A (en) Method and system for precisely locating left and right boundaries of license plate
Lermé et al. Reducing graphs in graph cut segmentation
CN116704505A (en) Target detection method, device, equipment and storage medium
CN116912270A (en) Dermatological image segmentation method and system based on improved Unet network
CN101364306B (en) Stationary image compression coding method based on asymmetric inversed placement model
CA2406959A1 (en) Image subtraction
CN110570450A (en) Target tracking method based on cascade context-aware framework
Zhang et al. Building façade element extraction based on multidimensional virtual semantic feature map ensemble learning and hierarchical clustering
CN113408595B (en) Pathological image processing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180720

Termination date: 20211021