pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%!...

9

Upload: lamthien

Post on 03-Apr-2018

228 views

Category:

Documents


12 download

TRANSCRIPT

Page 1: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

Stochastic Edge Detection Based on Discrete SegmentsP! Bertolino Laboratoire TIMC1IMAGInstitut Albert Bonniot6 Domaine de la Merci;<=>? La Tronche cedex FRANCEA! Montanvert yLIP 1 ENSH?6 allIee dJItalie?K;?H Lyon cedex >= FRANCEAbstractWe present an original edge detector which provides a binary contour element mapby looking for signi7cant discontinuities along discrete segments which are computedin the image8 The size and the direction of those segments are chosen randomly andthus; discontinuities may be evaluated with many di<erent resolutions8 In order toextract a potential discontinuity within each segment; we propose an adaptive criterionwhich only takes into account the pixels on this segment8 This process is iteratedmany times; allowing to 7nd weak edges in short segments and strong edges in longersegments; according to the criterion8 Some results on di<erent kinds of images aregiven8 Key WordsImage Segmentation; Edge Detector; Stochastic Process; Random Segments8 E!Mail Pascal!Bertolino/imag!fr 3 Tel 56 78 97 :9 3 FAX 56 78 97 89yE!Mail Annick!Montanvert/lip!ens3lyon!fr D

Page 2: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

IntroductionIn order to study and understand the content of an image1 a process called segmentation has toextract from the image its di5erent entities6 This process can be done by looking for either homo:geneous regions ;each one corresponding to an entity< or discontinuities ;borders of the entities<6In this paper1 we deal with the second approach called edge detection6 Many of the existingmethods ?PMABC consist of several steps which are mainlyEF6 A convolution between the image and an appropriate mask in order to remove the noise andenhance the discontinuities6 This process provides a grey:level image where high frequencies;i6e6 contrasts< appear lighter whereas homogeneous regions remain dark6 The convolutionmask may be simple ?RobJKC1 ?PreLMC or more complex ?DerALC1 ?SCAJC6 The size of the mask1i6e6 the size of the subwindow1 corresponds to a Rrst implicit threshold6B6 A thresholding applied on the previous image with a thinning process gives a binary contourmap6 In the case of hysteresis thresholding ?DerALC1 edges are kept or removed according totheir length and their strength6 Anyway1 if the threshold is too high1 the contour map willcontain a lot of discontinuities even if they are not signiRcant6 Conversely1 if the threshold istoo low1 only the strong edges will remain6 Most of the time1 static thresholds are applied tothe whole image and there is no adaptivity to its local content6 The methods which give thebest results use several parameters that have to be tuned precisely for each kind of image6S6 A close contour process enables to close objects so that the Rnal result can be used bya particular application ;bio:medicine1 robotics1 satellites1 etc<6 This step may take intoaccount a priori knowledge about the number of objects1 their size1 shape and possibleocclusions6Because of the complexity of getting appropriate tools and criteria to study BD environments?PavVBC such as windows in an image1 we present an algorithm which detects features using FDsupportsE The segments ;or Wat windows<6In order to get rid of thresholds and to adapt the detection to the image1 we propose a stochasticapproach which can compute low:level information without the help of the user6 In this approach1we replace the Rrst and second step described above6A few years ago1 Quiguer and Al ?QMDVFC proposed an adaptive thresholding based on thestatistic analysis of the lines of an image6 Our main idea is to choose randomly a set of contiguouspixels in the image ;segments are well suited< and1 only using the knowledge of those pixels1 tolook within this set to detect if it contains a signiRcant discontinuity ;Rgure F<6Figure FE Example of S segments on a pixel gridIn order to achieve our goal1 we need to choose a set of segments to be processed in the imagegrid and to Rnd which pixels of each segment form a potential discontinuity element6In section B1 we explain how we choose the segments6 Then1 in section S1 we discuss about thediscontinuity criterion to use6 In section \ we bring some improvements to the basic algorithm6 Atlast1 in section K1 we give experiment results on several test images6B

Page 3: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

a" Segmentscrossing a strong discontinu0ity 2"3 a weak discontinuity 6" and noise 7" b" The corresponding greylevel pro>les with the rangevalues show for 2" and 6"signi>cant discontinuitiesFigure &' Some segments and their corresponding pro3le A Stochastic segment algorithm !" PrincipleA digitized image I is a matrix of pixels on a grid9 Within this grid; we can de3ne a 3nite set Sof all the possible discrete segments >3gure ?@9For a N N image; the number of segments >of length ? # l ! N @ is jSj A >N >N # ?@@%&9Each segment s $ S is a connected set of arranged pixels >3gure ?@; numbered from C to l # ?'s A fs!' ( ( ( ' sl "g9 The sense of the segments and thus the sense the pixels are numbered isarbitrary chosen9 We de3ne a mapping between S and F ; the set of discrete ?D functions >calledpro3les and noted f>x@' x A C' ( ( ( ' l # ?@ of gray levels of the pixels crossed by the correspondingsegment of length l9 >3gure &@9 Along each segment s $ S; and thus inside each associated functionf $ F ; we would verify if there exists a signi3cant discontinuity9 Each pixel of the image may becrossed by O>N @ segments; from length & to length N 9 By this way; the contribution of each pixel>to an homogeneous or heterogeneous area@ and its value are seen through many resolutions andmany spatial distributions9 Going on with this approach; one main problem appears' jSj whosecomplexity is O>N#@ prevents any implantation on a computer because of the execution time9So; instead of processing the whole S; we take a subset S! whose s are randomly chosen in S9In order to get a subset S! we randomly choose couples of points whose junction forms segments9We use Bresenham algorithm LBreMNO to build them9 This algorithm gives the best discrete segmentwhich joins two points on a square grid9 Moreover; it is very fast and easy to implement9 On eachsegment; a criterion C can be evaluated upon the values of f>x@ to know if the segment crosses anedge9 ! AlgorithmThe process described above is repeated until a stabilized state is reached9 In our experiments;on &NM &NM images; we iterated the process as many times as the size of the image9 The basicalgorithm is the following'Initialize the contour map with no contourWHILE >the process is not stabilized@ DO V

Page 4: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

BEGINPick up randomly 3 points A and B 6A 7 B8 in the imageBuild the segment S 7 <A#B=Deduce f from STry to And f6i8 and f6i B C8 which verify C 6see section F8IF 6f6i8# f6i B C88 existsTHEN Add the pixel Si or Si ! to the contour mapENDKThis detector provides a binary image of the contoursM Either a pixel is selected one or moretimes by the algorithmN or it is notK In the Arst caseN the pixel belongs to the Anal contour mapO inthe second caseN it does notK The use of the stochastic operator allows weak edges to be retainedwhen they are crossed by short segmentsK Longer segments detect eventual stronger edgesK Nolength of segment is preferred and then any part of the image is treated at diQerent resolutionsK Adaptive edge detectionC can be either a single criterion or a union of criteria based on heuristical or statistical rulesK Cmust not include static threshold or parameter in order to have an autoRadaptive processKLet us give CCN a basic criterion which Ands two adjacent pixels which generate the maximumcontrast value along each segmentK More formallyMCC is veriAed for 6f6k8# f6k B C88 ifjf6k8 " f6k B C8j 7 maxi"#!"""!l $6jf6i8 " f6i B C8j8 7MG * UK If CC is veriAedN then sk or sk ! is marked on the contour mapK This criterion is computed veryeasily and very quicklyK But it provides mediocre resultsM It assumes that each segment crosses anedge if it contains one or more contrast * UK MoreoverN it is very noise sensitiveK In order to takeinto account the information given by the pixels of the segmentN we choose C as followingMCompute the standard deviation , of elements of fDetect k such as 6f6k8# f6k B C88 veriAes CCIF MG * ,THEN C is veriAed for 6f6k8# f6k B C88Only one of the two pixels is assigned to the contour mapMIF jf6k " C8" f6k8j * jf6k B C8" f6k B 38jTHEN Add the pixel sk to the contour mapELSE Add the pixel sk ! to the contour mapKNote that along one segmentN several couples 6f6k8# f6k B C88 may verify the criterionK- Improvement of the basic algorithmThe basic algorithm can be improved both with a better quality of the subset of segments toprocess S! and the quality of the criterion CK Z

Page 5: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

!" Distribution of the segmentsIn the basic algorithm/ contours at the periphery of the image are underprivileged 67gure 89b:because since the chosen segments extremities are uniformly distributed in the image the segmentsdistribution is normal< The more distant a pixel is from any border of the image/ the higher isthe number of segments crossing it 67gure 89a:9 To eliminate this problem/ we could modify thedistribution of the couples of pixels which de7nes each segment 6from a normal distribution to auniform one:9 We have chosen to put the image in the middle of an image large enough to avoidborder e@ects9 The whole constitutes the new image I to be treated 6I is included in I :9 Whena segment contains both pixels of the image I and pixels of the border 6I I:/ only the pixelsof the image I are submitted to the criteria C9 Hence the bias due to the distribution is limited67gure 89c:9But since the segments are discrete/ another bias is introduced< all the directions do not havethe same probability to be chosen CKraEFG/ CDDIJG9 This problem remains one of our futureinvestigation9 a" distribution of -... ran/dom segments3 The frame in/dicates the area for which thedistribution is acceptable b" Edges underprivileged atthe periphery of the image c" Better distribution usingthe correctionFigure 8< Problem of the distribution of the segments !1 Noise and textureAccording to C/ our method is still noise sensitive9 To strengthen a potential edge pixel/ we mustuse information given by the parallel neighbor segments< When a couple 6f6k:$ f6k N F:: veri7escriterion C/ we check that the two parallel neighbor couples 6one on each side/ in the direction ofCsk$ sk !G: generate the same gradient sign that 6f6k:$ f6k N F::9 If so 67gure J9a:/ the potentialedge pixel is marked on the contour map/ otherwise 67gure J9b: the contour map is not updated9 !6 Thin edgesThe basic algorithmprovides thick edges because several segments of similar direction or of di@erentlength may cross an edge extracting several close contour elements more or less in the gradientdirection 67gure 89c:9 To avoid this shortcoming/ when an edge point is marked in the contourmap/ its two neighbors belonging to the segment 6one on each side: become forbidden as a futureedge point9 When a couple 6f6k:$ f6k N F:: is found as a potential edge component/ C criterionmust choose sk or sk ! to represent the edge point in the contour map9 In order to implement thisP

Page 6: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

a" Retained edgeelement b" Refused edgeelementFigure &' parallel segments are used to remove the noisemechanism4 we de6ne forbidden edge pixels' when a pixel sk of the segment is selected4 sk andsk! take the ;ag <forbidden< in the contour map =6gure >?a@? If latter within another segment4sk or sk! is chosen as an edge pixel4 it will not be marked as a contour point4 because it has beenforbidden during the process of a previous segment? On the other hand4 this segment will generatein its turn two forbidden edge pixels if they are not already marked as edge pixels? Although thisprocess may introduce a bias because all the segments do not have the direction of the gradient4the result is better but far from being perfect =6gure >?b@? a" Forbiddenedgepixels pointed on asegment b" Result with thin edgesFigure >' Towards thin edges Experimental resultsWe give some experimental results =6gure G@ to show the advantages and the inconvenients ofthe stochastic operator and the used criterion? These results do not want to make a comparisonbetween our new approach and existing operators4 but rather to try to open a new investigation6eld?Figure G shows the results obtained with the algorithm using the three improvements describedabove? We can see that signi6cant weak edges are found as strength edges are =6gure G?a4 the edgeseparating the two black cells looking like a butter;y@? No region seems to be underprivileged? Thenoise process is not enough eIcient for very noisy images =6gure G?c@? Thin contours are obtainedcorrectly4 but their process may be a problem at the location where many contours are crossing?Some other problems still remain and are not processed by the algorithm' Edges are often dottedG

Page 7: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

a" A muscle cross section b" An outside scene of a boat c" A Magnetic Resonance im5age d" e" f"Figure &' Original images and results

0

Page 8: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

!gure &'b) and thus di1cult to interpret by further processes' Locally9 the strong edges oftendisadvantage weak edges when both are close and rather parallel= Strong edges ?attract? a lot oflocal potential edge points !gure &'b)' ConclusionIn this paper9 we have presented a stochastic edge detector based on discrete segments9 whichprovides binary contours without any threshold' Its adaptivity allows to take into account variouskinds of edges at multiple resolutions' We have given experimental results to show the potentialand the weakness of the operator as it is currently used'Some improvements are foreseen= The quality of the results can be improved by the closure ofedges9 by a better noise immunity and by using a union of complementary criteria'More precisely9 we orient our investigation towards four main directions= To have a better distribution of the segments through the image' To reduce the noise eGect by smoothing the values of the pixels belonging to the segment totreat with HD convolving masks whose coe1cients could vary with the length of segments)' To have a better robustness of the discontinuity elements by taking into account the numberof times each one is extracted during the process and by trying to !nd the discontinuity inthe direction of the local gradient)' To analyse the edges of the image at diGerent resolution using diGerent ranges of segmentlength'This detector can be used in cooperation with other treatments= The stochastic operator wasused at the bottom of a pyramidal segmentation process IMMRKHL in order to make a contourMregion cooperation' Before the construction of the pyramid9 it enriches the adjacency graph builtfrom the regular tessellation on the initial image) by weighting its edges with the value of linesprocess generated by the edge couples sk" sk !)' Then9 this information is updated bottom up summed up on the new implicit edges generated by the regions9 eliminated on the edge betweentwo regions which have merged) and used at each level of the pyramid IMBKPL'ReferencesIBre&QL J' E' Bresenham' Algorithm for computer control of a digital plotter' IBM SystemJournal9 U=PQVWX9 HK&Q'IDDZUL L' Dorst and X' Duin' Spirograph theory= a framework for calculations on digiMtized straight lines' IEEE Transactions on Pattern Analysis and Machine Intelligence9& Q)=&WPV&WK9 September HKZU'IDerZ]L R' Deriche' Using Canny`s criteria to derive a recursively implemented optimal edgedetector' International Journal of Computer Vision9 pages H&]VHZ]9 HKZ]'IKraKHL J' Lopez Krahe' Problceme d`arithmdetique en analyse d`images et gdeomdetrie des formes'In Premier Colloque G?eom?etrie DiscrAete en Imagerie B Fondements et Applications9Strasbourg9 France9 P&MP] Septembre HKKH'IMBKPL A' Montanvert and P' Bertolino' Irregular pyramids for parallel image segmentation' InProcD of the H&th OAGM Meeting9 pages HWVWU9 Vienna9 Austria9 May &MZ HKKP'IMMRKHL A' Montanvert9 P' Meer9 and A' Rosenfeld' Hierarchical image analysis using irregMular tessellations' IEEE Transactions on Pattern Analysis and Machine Intelligence9HW U)=WX]VWH&9 April HKKH' Z

Page 9: pascal.bertolino/misc/dgci95.pdf& "- *! ./*0%1 * 2#" ,%'',*33%$ '%0/%! &*&."! +*' &" %4&#*,& -#"/ &+% ./*0% .&' $.5%#%! & %! &.&.%'6 7+.' 2#" ,%'' ,*! 8 % $"!% 8) 3" "9.!0  …

Pav$%& T( Pavlidis( Why progress in machine vision is so slow( Pattern Recognition Letters9:;<%%:=%%>9 April :$$%( PMA%& T( Peli and D( Malah( A study of edge detection algorithms( Computer Graphics andImage Processing9 %F<:=%:9 April :$A%( PreGF& J(M(S( Prewitt( Object enhancement and extraction( In Picture Processing and Psy6chopictorics9 pages G>=:O$( B(S( Likin and A( Rosenfeld9 Academic Press99 :$GF( QMD$:& T( Quiguer9 P( MichUe9 and R( Debrie( Segmentation by autoVadaptative thresholding(In Proc7 of the 9th International Conference on Image Analysis and Processing9 Como9Italy9 OVX September :$$:( RobX>& G( Roberts( Machine perception of three dimensional solids( In J(T( Tippett et al(9editor9 Optical and electro optical information processing9 pages :>$=:$G9 Cambridge9Mass(9 :$X>( M(I(T( Press( SCAX& J( Shen and S( Castan( An optimal linear operator for edge detection( In ProceedingsCVPR>99 pages :F$=::O9 Miami9 :$AX(

$