HUANG Wei
Department of Automation,Chongqing Industry Polytechnic College,Chongqing 401120,China
The technology of image edge contour segmentation has very important practical value in image analysis of remote sensing and video image etc for lots of fields such as industrial production,target detection of military affairs,agriculture,seas and oceans,protection of environment resource and so on[1-3].The image segmentation is a sort of basic computer vision technology,and it is a key technology of image analysis and processing.The image is always provided with very obvious structure feature,and if the image structure feature is captured then it can obtain better image processing effect and reduce a large number of image processing times.Owing to the image structure feature being taken into account for mathematical morphology fully,it has very unique superiority,and its watershed transformation is a sort of image segmentation method that can obtain accurate image edge.But it is very sensitive for noise in image processing and easy to produce over-segmentation phenomenon[4-8].Aimed at the over-segmentation resulted in noise,in order to improve the image segmentation quality,the paper explored a sort of new image segmentation method based on fuzzy morphology by means of technology fusion method.
According to the features such as gray scale,color,spatial texture and geometry etc,the image segmentation is to separate the interested target from the background.The image is divided into several disjoint regions,and makes that the image feature in the same area shows the similarity or coherence,andthe different regions assume significantly different characteristics.Then it can carry through the measurement of image boundary,shape,size etc,and it is propitious to identify and study for the segmented region.There are so many methods of edge detection and image segmentation,such as Sobel operator,Prewitt operator and Laplacian operator etc of early edge detection.But each method has its own defects,and they all belong to the high pass filtering method.In the practical application,the image noise and image edge is always in the high frequency range,and the above algorithms are very difficult to extract the object boundaries from the noise.At present,the method of the edge detection,edge contour extraction and image segmentation is more widely used by two value morphologyand Canny operator,butthe threshold selection of Canny operator is more complex.As a result of the factors such as fuzzy edge and uneven gray scale etc resulting in uneven boundary discontinuity,it is necessary to connect the segmented boundary according to the prior knowledge.The mathematical morphology provides a complete set of system theory on the analysis of the geometric feature of image,and it has been more and more widely used in the aspect of edge detection,target segmentation and noise suppression.The watershed algorithm is the image segmentation method based on mathematical morphology,and it has superiority of fast calculation speed,closed contour line and positioning accuracy because of the combination of edge detection and region growing method.In recent years,it has attracted more and more attention,but it has the problem of the over segmentation,and makes the contour line be buried in the independent watershed line.In order to solve the above problem,this paper proposes a sort of image segmentation algorithm based on fusion among Image Foresting Transform(IFT)and fuzzy mathematical morphology[9-11].
Mathematical morphology is a mathematical tool based on structural elements to make the image analysis,and it has four sort of basic operations of expansion,corrosion,opening and closing.With the structure of a certain form elements,it can carry through the measurement and extraction of the corresponding form in an image,get the analysis and recognition of images and keep the shape feature of image basic and simplified image data,and remove the effect of irrelevant structure on the image recognition.In view of the image itself and in the image acquisition and processing process there are existed in fuzziness.The fuzzy set theory is introduced into mathematical morphology to form the fuzzy morphology,If it is applied to the gray image processing,then it can extend the definition of classical morphological operators.Correspondingly,the practical algorithm can be also derived from its basic operation of mathematical morphology.It not only retains the excellent characteristics of two value morphology operator,but also gives the relatively strong robustness,and in the presence of noise,it has better performance than two-value morphology operator.Because fuzzy morphology is an image that is regarded as a fuzzy set,and it can make the fuzzy sub-operator corresponding to its operation.
Fuzzy subset:If the selecting values range of elementXin two-value set for membership characteristic function ofAis expanded from{0,1}to[0,1],then the fuzzy set can be derived.
In expression(1),μAis called as membership function,Uis a given domain,μA(x)is a membership grade of forA.Expression(1)is any mapping ofUto closed interval[0,1].The membership function said elementxbelonging toAdegree by means of interval[0,1]number.Fuzzy subset ofAis completely described by the membership function μA.
Decomposition theorem:The decomposition theorem of fuzzy set is expressed as the following.AssumeAis a common set on domainX,∀λ∈[0,1],define fuzzy set λ *AoverX,and its menbership function is shown as expession(2).
For ∀¯A∈F(X),the decomposition form of expresssion(3)holds.
Expansion theorem:Expansion theorem of fuzzy set gives the mapping thatfexpands from fuzzy subset ofXto fuzzy subset ofY,shown as expression(4)and expression(5).
Under common mapping ffrom domainXtoY,assumeX,Yto be two domains,the mapping relation isf:X→Y.Fromf,it can derive the mapping fromF(X)toF(Y)and fromF(Y)toF(X).f(A)is called the image ofA,andf-1(B)is called as inverse image.The membership function is respectively the expression(6)and expression(7).
The watershed algorithm can be used for image segmentation and gradient image extraction etc,and it is a sort of image processing tool rooted in mathematical morphology.In the lots of existing sequential watershed algorithm,the most representative and fast algorithm is the watershed algorithm based on Immersion simulation and its improved algorithm presented by Vincent et al.In the algorithm,the digital imageGis shown by expression(8).
In expression(8),each pixelp∈D,Ishows The corresponding transfer function of TheD→Ngray value,and(D,E)represents the graph.For each pointp∈D,I(p)represents the grey value of image.On a gray image,the range of selected value can take the integer from 0 to 255.
Assume the level set of thresholdhin imageIto beT={p∈D|I(p)≤h},in the process of simulation immersion,it starts from setTkmin(I).The point in set is the position that the water surface reaches first.These points constitute the iterative initial point,and the iterative expression is shown as in expression(9)and expression(10).
In which,hminandhmaxis respectively the minimum maximum ofI,Xhminis constituted by the points inI.These points are in minimal region of minimum altitude,and minhis the union of all minimum area at gray valueh.The iteration of gray valuehis fromhmintohmax.IZis the set of measuring influence region.In the iterative process,the minimal point region of image I is gradually extended.AssumeXhto be the connected component of level threshold value setTh+1that the union of combined with all regional set is computed at level value h,and then the computing result must be either a new minimal value or in extended region ofXh.In the latter case,ifTh+1is computed thenXh+1can be updated.In setD,the complementary set ofXhmaxis just the watershed of image,and the representation is shown as in expression(11).
According to the above deffinition,the gradient value of each point in imageIcan be viewed as the altitude at the point.It can drill a connectivity hole on the bottom of each minimal region in imageI,and then the water is injected slowly towards to the ground surface formed by image.The altitude of water surface will gradually increase from the ground surface,and it forms a small lake called as catchment basin.Starting from minimal region of the lowest height,the water surface will be gradually immerged for different catchment basin in imageI.In the above process,if the water from two different catchment basins is confluent,then a dam can be built at its confluent boundary. In the end ofthe immersion process,each catchment basin is surrounded by the dam finally.The set of all the dams is the watershed of corresponding image.
IFT is a sort of image segmentation algorithm based on graph theory,and it designs the image processing operator by means of connectivity of the graph.Its essence is the image is mapped into a graph,through calculation of the optimal path in a graph it gets a marked image,and it is a shortest path first Dijkstra algorithm.IFT defines a optimal cost path forest.The forest node is the image pixel,and the arc between each node is defined by adjacent relationship between pixels.The path cost is determined by special path cost function.The image is processed by the image,and the processed result is an adjacent relationship between pixels in image.In the catchment basin,the path cost function of maximum arc is used,and shown as in expression(12)and expression(13).
In which,(s,t)∈A,Ais the adjacent relationship of each pixel positioning in image,sis terminal node for path π,tis the starting point,h(t)is initial value of path cost for any starting node attstarting point,I(t)is pixel value of pixelt.
The fusion algorithm is based on the gray level feature of image.It takes farthest separation between foreground and background as the criteria,and it determines the optimal threshold image segmentation by means of automatic identification method of optimal threshold.The path cost funcrion of IFT algorithm is limited by the optimal threshold ao as to shorten the search band of optimal path for original IFT watershed algorithm,and therefore it can improve the execution speed of algorithm.Based on the limitation for threshold,The constraint condition of path cost function in expression(12)and expression(13)must make corresponding adjustment.Expression(14)and expression(15)is the new path cost function after adjustment.
In which,Tis a threshold.Assume that the image hasNgray value,input is the imageI,the template imageL,output is each water collecting basin resultsLafter watershed transform,andC(cost map)of the auxiliary data structure is each node cost initialized by infinite.The step of improved watershed algorithm based on IFT is the following.①For all nodes satisfied conditionL(p)≠0,letC(p)=I(p),insert nodePintoQaccording to the value ofC(p).②Determine thresholdTby means of optimal threshold of auto recognition.③ If theQis not empty,remove the minimum value p point of tangency ofC(P)from queueQ,and for each node satisfied condition ofq∈N(p)and nodeqdoes not insert into queueQ,then execute:
IfC≠ +∞,thenC(q)=C,insertqinto queueQaccording toC(q)value,L(p)=L(q).
Analysis for algorithm:①Adjust accordingly the constraint condition of path cost functionfnewbased on threshold.②Seed set can be arbitrary nodes belonging to the target.③Hierarchical queue structureQ.If the image contains the N level,then the number of barrel in queueQcan be reduced toN-T+1 because of the existence of threshold limit ofT,and therefore the storage space required for the entire algorithm isO(n+N-t+1).The node,which is inserted queue inQfor steps of the original algorithm,must be the processing nodes without making any operation nodes in the field first,and therefore the queue operation can be different from the original algorithm.④Due to the increase of the threshold limit,the nodes are not all ergodic to the graph in the search process of node,and it is only to find the target region that is located above the threshold which can be the part of the pixel.Its essence is to reduce the search region,and therefore it improves the efficiency of the algorithm.
The algorithm flow is shown in Fig.1,and the simulation implementation is applied by Matlab 7.0.
Fig.1 Algorithm flow
For convenience to compare the image segmentation effect for different algorithm,here it takes the contour extraction of image contained edge salt and pepper noise pollution as an example shown as in Fig.2,and the results are compared with the simulation of different processing algorithm.Fig.3 is the result extracted the edge contour that adopts the fusion based algorithm proposed by this paper to make the image segmentation.
Fig.2 Image of contained salt and pepper noise pollution
Fig.3 Image for fusion algorithm segmentation
By means of open-closed operation of fuzzy morphology,the algorithm first makes the smooth simplifying processing for image,and it solves the corro-sion,expansion,opening and closing operations in morphology existed in the filtering preprocessing of the image.It eliminates the image details and noise,and reserves the edge contour of important region.Then based on the basic morphological gradient operator(BMG),it computes the gradient to obtain the gradient image.Finally it makes the image segmentation of the gradient image,and gets the final image edge contour of segmentation results.
In the above algorithm flow,the image adopts fuzzy morphological open-closing filter to make the filtering processing in the filtering processing link.The filter is based on the set theory,and its boundary has certainty,and namely with properties not blurred image boundary.Therefore it can effectively extract the signal,and it is only keeps the detailed features of image,but also with the function of noise suppression.
Fig.4 gives the segmented image of the image filtered for pollution image only adopted by fuzzy open-closing filter,and obviously it is the blurring between the background image and the edge of the image contour.
Fig.4 Segmentation image for fuzzy open-closing filter
Fig.5 gives the segmented image of the image adopted the computing morphological gradient operator for filtered image,and obviously it is still fuzzy blurring between the background image and the edge of the image contour.
Fig.5 Gradient image
Fig.6 gives the segmented image of the image by Prewitt operator.It results in that the contour is unclosed phenomenon,and the edge positioning is not accurate,and therefore it is also difficult to make the image recognition even the operator with extensive prior knowledge.
Fig.6 Prewitt segmentation image
Fig.7 gives the result image that adopts the conventional watershed algorithm directly to segment the image.From analysis of Fig.7,it can be seen that due to the over segmentation phenomenon,after processing the image people do not know what the image,and it completely loses the significance of image segmentation.
Fig.7 Segmentation image for watershed algorithm
Compared Fig.3 with Fig.4,Fig.5,Fig.6 and Fig.7,it can be seen that adopting improved algorithm of the image segmentation based on fusion technology,it not only can effectively overcome the over segmentation phenomenon produced by direct watershed algorithm and obtain a continuous closed edge line,but also the image details is preserved,the segmentation results are satisfactory,and also fast in computing speed.
Image segmentation technology is widely used for image analysis in remote sensing,video,industrial production etc.In the paper,it proposed a fusion algorithm of segmentation based on fuzzy morphology,by means of morphological method made the image processing and analysis,solved the problem of image segmentation,and the simulation experiment verified the rationality and feasibility of fusion segmentation algorithm.But this algorithm is still some problems in the application,for example,the speed of operation and threshold selection remains to be further study and improvement so as to make better in image segmentation effect and faster in execution speed.
[1]HE Jun,GE Hong,WANG Yufeng.Survey on the Methods of Image Segmentation Research[J].COMPU TER ENGINEERING & SCIENCE,2009,31(12):58-61.
[2]QIN Renchao.Edge Information Detection Based on Canny Operator for ICT Image[J].Journal of Luoyang Technology College,2004,14(4):10-11.
[3]FAN Yanbin,LI Xibing.One of the Image Segmentation Algorithms for Digital ICT Image Slices of Industrial Products[J].ACTA SCIENTIARUM NATURALIUM UNIVERSITATIS SUNYATSENI,2004,43(3):21-24.
[4]YANG Xiaoyi,GUO Bing.Study on Image Segmentation Algorithm Based on Fuzzy Mathematical Morphology[J].Fuzzy Information and Engineering,2009(1):488-495.
[5]Qiuqi Ruan.Digital Image Processing(Second edition)[M].Beijing:Publishing House of Electronics Industry,2006.
[6]DAI Qingyun,YUN Yinglin.Application development of mathematical morphology in image processing[J].Control theory and its application,2001(4):13-16.
[7]Bloch I,Maitre H.Why Robots should use Fuzzy Mathematical Morphology[C]//Proc.of the 1st Int.ICSC-AISO Congress on Neuro-Fuzzy Technologies.La Havana,Cuba:[s.n.],2002:249-283.
[8]Chenming.An automatic recognition method of the best threshold for image[J].Computer application and software,2006(4):85-86.
[9]Lotufo R,Silva W.Minimal set of markers for the watershed transform[C]//Proceedings of ISMM 2002.Redistribution rights reserved CSIRO Publishing,2002:359-368.
[10]Roerdink B T M,meijster A.The watershed transform:definitions,algorithms and parallelication[J].Fundamental Informatica,2000,41:197-228.
[11]Wen M,Zhong C.Application of Sobel Algorithm in Edge Detection of Images[M].Hina:High-tech Enterprise,2008:57-62.