Anda di halaman 1dari 9

A robust rapid approach to image segmentation with thresholding and watershed transform

Ankit Chadha, Neha Satam Vidyalankar Institute of Technology, Mumbai (ankit.chadha@vit.edu.in)

Abstract:- The abstract is to be in fully-

justified italicized text as it is here, below the author information. se the word !Abstract" as the title, in #$-%oint Times New &oman, boldface ty%e, left ali'ned as shown, initially ca%italized. The abstract is to be in #(-%oint, sin'le-s%aced ty%e, and may be u% to a ()) word len'th. *ea+e one blank line after the abstract, to be followed by the keywords, then be'in the main text after lea+in' another blank line. All manuscri%ts must be in ,n'lish.

should be some %ro%erties followed by any al'orithm7 #. ni+ersality7 the al'orithm should work for all ty%es of ima'es. 2t should be ada%ti+e. Authors in 3$4-384 ha+e de+elo%ed a method for such ada%ti+e ima'e se'mentation.

(. &obust7 al'orithm should be robust in e+ery as%ect. 9. :erformance7 in order to im%lement it %ractically, method should be hi'hly efficient and yieldin' best out%uts. 2t should achie+e accuracy and 'i+e desired %erformance. $. Time efficient7 it should achie+e hi'h s%eed to %ro+ide best out%uts. Se'mentation can also be thou'ht as %ixel labelin' %rocess where the %ixels belon'in' to the same homo'eneous re'ion are assi'ned the same label. There are many ei'en +ector-based methods for ima'e se'mentation but they are too slow for %ractical a%%lications 3;4. 6or error-free and ra%id o%eration, some of the techni0ues can be 'i+en as below 3<47 5isto'ram-based se'mentation7 2f the ima'e is com%osed of re'ions with different 'rey le+el ran'es, i.e., the re'ions are distinct, the histo'rams of ima'e usually shows different %eaks, each corres%ondin' to one re'ion and adjacent %eaks are likely to be se%arated by a +alley 3=4. Thus, when histo'ram has +alleys, selection of threshold becomes easy because it becomes a %roblem of detectin' +alleys. Thou'h this is an easy method, it has its own drawbacks. As only histo'ram information is taken into consideration, such al'orithm may fail to detect thresholds if they are not %ro%erly reflected as +alleys in histo'ram.

Keywords: -e would like to encoura'e you to


list $ to . keywords in this section.

I. Introduction
/ue to ad+ent of +arious techni0ues, ima'e %rocessin' has been an attracti+e to%ic amon'st enthusiasts. 1ut it is e0ually challen'in' as an ima'e re%resents +arious sha%es, colors, tonal 'radations, intensities and this information should be %reser+ed in %rocessin'. 2t lar'ely de%ends on features extracted, their uni0ueness and their correctness. Thou'h the features can +ary from ima'e to ima'e, there are few common features, such as ed'e or boundary between object and back'round. Se'mentation is one useful method for %rocessin' such ima'es. 2ma'e se'mentation refers to %rocess of %artitionin' an ima'e into 'rou%s of %ixels which are homo'eneous with res%ect to some criterion 3#4. 2t se%arates out fore'round and back'round in meanin'ful way. 2t basically detects the ed'e of objects by findin' transitions in bri'htness of ima'e. Althou'h se'mentation by ed'e detection is one of the major tools to aid ran'e ima'e analysis, it is still considered an unsol+ed %roblem 3(4. An al'orithm workin' for some ty%e of ima'es may not work for some other. 5ence it should be ada%ti+e in nature. 6ollowin'

,d'e-based se'mentation7 2n ed'e-based methods, the local discontinuities are detected first and then connected to form lon'er, com%lete boundaries 3#)4. 2t is the most common a%%roach for detectin' meanin'ful discontinuities in the 'rey le+el. An ed'e is a +ector +ariable with two com%onents ma'nitude and orientation, where ed'e ma'nitude 'i+es the amount of the difference between %ixels in the nei'hborhood >the stren'th of the ed'e? and ed'e orientation 'i+es the direction of the 'reatest chan'e, which %resumably is the direction across the ed'e 3##4. 1ut it becomes difficult for noisy ima'es. &e'ion-based se'mentation7 2n re'ion-based methods, areas of an ima'e with homo'eneous %ro%erties are found, which in turn 'i+e the boundaries 3#)4. 2t relies on common %atterns in intensity +alues within a cluster of nei'hborin' %ixels. The cluster is referred to as the re'ion. 5ere the ima'e is first se'mented into %redefined small re'ions, and then each %redefined re'ion is assi'ned a sin'le motion label 3#(4. This re'ionbased label assi'nment a%%roach facilitates obtainin' s%atially continuous se'mentation ma%s which are closely related to actual object boundaries. 5ybrid-techni0ues se'mentation7 2n this techni0ue, +arious methods abo+e described are combined. They are mainly centered on ed'ebased and re'ion-based techni0ues. 6or many times, ed'e is defined initially and then ima'e is se'mented into different re'ions. The al'orithm %ro%osed here belon's to the fourth cate'ory, i.e., hybrid-based techni0ue. This %a%er tries to com%are se'mentation with and without thresholdin', where the method used for se'mentation is watershed se'mentation, a well-known se'mentation method which considers the ima'e to be %rocessed as a to%o'ra%hic surface. The to%o'ra%hic surface is most often built from an ima'e 'radient, since object ed'es >also known as watershed lines? are most %robably located at %ixels with hi'h 'radient +alues. 2t is a sim%le method which is less time-consumin' and %ro+ides closest contours e+en for the re'ions ha+in' low contrast and weak boundaries.

The %a%er is or'anized as follows7 section ( 'i+es brief idea about watershed transform and watershed se'mentation. Section 9 de%icts ste%s of im%lementation. ,x%erimental results are %ro+ided in Section $ and conclusions are %resented in Section ..

II. Watershed transform watershed Segmentation

and

Conce%t of watershed is well known in to%o'ra%hy. A watershed is a basin-like landform defined by hi'h%oints and rid'elines that descend into lower ele+ations and stream +alleys. 2t se%arates out different re'ions de%endin' on their de%th. 2n ima'e %rocessin', a 'rayscale ima'e is considered to be a to%o'ra%hic re'ion. ,+ery 'ray le+el denotes altitude of that re'ion. 2f the surface is flooded from minima and mer'in' of waters is %re+ented then ima'e is %artitioned into two distinct re'ions- catchment basin and watershed lines. 6i'. # de%icts %ictorial re%resentation of these %hrases 3#94.

fi'.#7 :ictorial re%resentation of watershed transform Catchment basin is set of those %oints at which a dro% of water will certainly fall to a sin'le minimum whereas watershed line is set of those %oints at which a dro% of water will be e0ually likely to fall to more than one minimum. They are 'enerally crest lines on the to%o'ra%hic surface. Aim of watershed transform is to find all the watershed lines. -atershed can be defined for two casescontinuous and discrete.

A. Continuous Assume that the ima'e f is an element of the s%ace C >/? of real twice continuously differentiable functions on a connected domain / with only isolated critical %oints. Then the to%o'ra%hical distance between %oints % and 0 in / is defined by7
Tf > , q ? = inf

>#?

@@ f > > s ?? @@ ds

*et - be some label where - 2. the watershed transform of f is a ma%%in' G 7/ 2 C-D, such that G>%?A 2 if % C1>mi? and G>%?A - if % -shed >f?. So the watershed transform of f assi'ns labels to the %oints of /, such that >i? different catchment basins are uni0uely labeled, and >ii? a s%ecial label - is assi'ned to all %oints of the watershed of f.

where the infimum is o+er all %aths >smooth cur+es? inside / with >)? A %, >#? A 0. The to%o'ra%hical distance between a %oint % / and a set A / is defined as7 Tf >%,A? AB2Na
A Tf >%, a?.

III. Steps of implementation


Considerin' an ima'e as in%ut, all the ste%s were carried out. The ima'e can be colored or 'rayH the al'orithm works %ro%erly on both ty%es of ima'es. 6lowcharts for both-with and without thresholdin' are shown in fi'.(.

>(?

The %ath with shortest Tf -distance between % and 0 is a %ath of stee%est slo%e. B. iscrete A %roblem which arises for di'ital ima'es is the occurrence of %lateaus, i.e., re'ions of constant 'rey +alue, which may extend o+er lar'e ima'e areas. Such %lateaus form a difficulty when tryin' to extend the continuous watershed definition based on to%o'ra%hical distances to discrete ima'es. Thus watershed transform can be defined as follows 3#$47 *et f C>/? ha+e minima CmkDk 2, for some index set 2. the catchment basin C1>mi? is defined as the set of %oints x / which are to%o'ra%hically closer to mi than any other re'ional minimum mj 7 C1>mi?A C x / @ j f>mj? E Tf>x,mj? D E Tf>x,mi?F >9?

The watershed of f is the set of %oints which do not belon' to any catchment basin7 -shed >f? A /
c

>$?

6i'.(7 flowchart of al'orithm A. !hresholding The ima'e taken is firstly con+erted to 'rayscale if it is colored. Then thresholdin' is a%%lied on 'ray ima'e. 2t is sim%lest kind of ima'e se'mentation. 2t se%arates out re'ions of an ima'e corres%ondin' to objects which we want to analyze. This se%aration is based on the +ariation of intensity between the object %ixels and the back'round %ixels. To differentiate the %ixels a com%arison of each %ixel intensity +alue is %erformed with res%ect to a threshold, known as thresholdin' +alue. The thresholdin' +alue is determined from the intensity of ima'e in 'rayscale. The thresholdin' o%eration can be mathematically ex%lained as follows7 2>x,y? A maxI+alue if src>x,y? J thresholdin'I+alue A ) otherwise 6i'.9 shows o%eration of thresholdin'.

6i'.97 Thresholdin' o%eration Thus if the intensity of the %ixel src>x,y? is hi'her than thresholdin'I+alue, then the new %ixel intensity is set to a maxI+alue. Ktherwise, the %ixels are set to ). B. Binary gradient mas"ing #$%&: -hen considerin' a 'rayscale ima'e, the objects to be detected differ 'reatly in contrast from their back'round. Chan'es in contrast can usually be detected by s%ecific o%erators that calculate the 'radient of an ima'e. /urin' calculatin' the 'radient of that ima'e thresholdin' +alue is first determined and then a%%lied in subse0uent ste%s to create a binary 'radient mask >1LB?. The threshold +alue will be tuned for second use under another combination of the same o%erator in order to obtain the re0uired 1LB ima'e containin' the se'mented objects. C. ilation: The dilation o%erator takes two %ieces of data as in%ut7 a binary ima'e, which is to be dilated and a structurin' element >or kernel?, which determines the beha+ior of the mor%holo'ical o%eration. To com%ute the dilation of a binary in%ut ima'e by this structurin' element, we consider each of the back'round %ixels in the in%ut ima'e in turn. 6or each back'round %ixel >also known as in%ut %ixel? the structurin' element is su%erim%osed on to% of the in%ut ima'e so that the ori'in of the structurin' element coincides with the in%ut %ixel %osition. 2f at least one %ixel in the

structurin' element coincides with a fore'round %ixel in the ima'e underneath, then the in%ut %ixel is set to the fore'round +alue. 2f all the corres%ondin' %ixels in the ima'e are back'round, howe+er, the in%ut %ixel is left at the back'round +alue. Considerin' that M is the set of ,uclidean coordinates of the in%ut ima'e, and N is the set of coordinates of the structurin' element let Nx denote the translation of N so that its ori'in is at x. The dilation of M by N is sim%ly the set of all %oints x such that the intersection of Nx with M is non-em%ty. Thus dilation of set A by structurin' element 1 is defined as7
! " = " ! !
a "

6i'. $>b?7 2n%ut ima'e Then after dilatin', we 'et fi'. $>c? as out%ut. 6i'. $>c?7 Kut%ut of dilation

. Watershed transform As ex%lained in section 22, watershed transform is based on floodin' simulation 3#84. 6ollowin' are the ste%s included in this7 i. :iercin' holes in each re'ional minimum of ima'e ii. The 9/ to%o'ra%hy is flooded from below 'radually iii. -hen the risin' water in distinct catchment basins is about to mer'e, a dam is built to %re+ent the mer'in' 6i'.. de%icts the floodin' %rocess on onedimensional si'nal with four re'ional minima 'eneratin' four catchment basins 3#84.

6i'..7 6loodin' %rocess 6inal floodin' shows three watershed lines and four catchment basins.

I'. ()perimental *esults Su%%ose that the structurin' element is a 9x9 s0uare with the ori'in at its center as shown in fi'.$ >a?. 6i'.$ >a?7 Structurin' element And let the in%ut ima'e is as shown in fi'. $>b?. The results are dis%layed in fi'.8 and ;. 6i'. 8>a? shows ori'inal ima'e used for this %ur%ose and fi'. ; shows its 'rayscale +ersion. 6i'. ; >a? shows thresholded ima'e.

'. Conclusion

The %ro%osed ima'e se'mentation al'orithm is time-efficient, i.e., ha+in' an execution time of #.;(.= seconds for se'mentation with thresholdin' on 2ntel Core ( /uo (.( L5z :rocessor. 2t can thus be extended to real-time se'mentation. The com%arison clearly shows that thresholdin' is im%ortant in ima'e se'mentation. 2t retains most of the ima'e details with minimum information loss. -atershed transform is an efficient se'mentation tool when combined with +arious methods as shown. The %ro%osed method was successfully able to se'ment the ima'e effecti+ely.

original image

Grayscale image

binary gradient mask binary image

binary gradient mask Thresholded Image

Gradient magnitude

Gradient magnitude

dilated gradient mask

dilated gradient mask

Watershed transform of gradient magnitude (Lrgb) Watershed transform of gradient magnitude (Lrgb)

&eferences7 3#4 Oayaraman, S. ,sakkirajan, T. Peerakumar, !/i'ital 2ma'e :rocessin'", Tata BcLraw-5ill ,ducation, ()## 3(4 Kl'a &. :. 1ellon and *uciano Sil+a, !New 2m%ro+ements to &an'e 2ma'e Se'mentation by ,d'e /etection", 2,,, S2LNA* :&KC,SS2NL *,TT,&S, PK*. =, NK. (, 6,1& A&Q ())( 3$4 1 1hanu, S *ee, O Bin' 3.4 O *iu, QQ Tan' 384 5* Anderson, & 1ajcsy, B Bintz 3;4 :edro 6. 6elzenszwalb, /aniel :. 5uttenlocher, R,fficient Lra%h-1ased 2ma'e Se'mentationR 3<4 Nostas 5aris, Serafim N. ,fstratiadis, Nicos Ba'la+eras, and A''elos N. Natsa''elos, R5ybrid 2ma'e Se'mentation sin' -atersheds and 6ast &e'ion Ber'in'R, 2,,, Transactions Kn 2ma'e :rocessin', Pol. ;, No. #(, /ecember #==< 3=4 Nikhil &. :al, Sankar N. :al, RA &e+iew on 2m'e Se'mentation Techni0uesR, :attern &eco'nition, Pol.(8, No.=, %%. #(;;-#(=$, #==9.

3#)4 B. Cheriet, O. N. Said, and C. Q. Suen, !A &ecursi+e Thresholdin' Techni0ue for 2ma'e Se'mentation", 2,,, Transactions Kn 2ma'e :rocessin', Pol. ;, No. 8, Oune #==<. 3##4 :unamThakare, !A Study of 2ma'e Se'mentation and ,d'e /etection Techni0ues", 2nternational Oournal on Com%uter Science and ,n'ineerin' >2OCS,?, Pol. 9 No. ( 6eb ()## 3#(4 Qucel Altunbasak,# :. ,rhan ,ren, and A. Burat Tekal%, !&e'ion-1ased :arametric Botion Se'mentation sin' Color 2nformation", Lra%hical Bodels and 2ma'e :rocessin' Pol. 8), No. #, Oanuary, %%. #9S(9, #==< Article No. 2:=;)$.9. 3#94 Tin' Chen, Miaoli Qan', ,mil B. :etriu, !-atershed Se'mentation for 1inary 2ma'es with /ifferent /istance Transforms". 3#$4 Oos 1.T.B. &oerdink and Arnold Beijster, !The -atershed Transform7 /efinitions, Al'orithms and :arallelization Strate'ies", 6undamenta 2nformaticae $# >())#? #<;((<,2KS :ress. 3#.4 N.P. Nale, S.C. Behrotra, &.&. Banza , !Com%uter Pision And 2nformation Technolo'y7

Ad+ances And A%%lications", 2. N. 2nternational :+t *td, ()#). 3#84 Tian' -u, 6atima Berchant, Nenneth Castleman, !Bicrosco%e 2ma'e :rocessin'", Academic :ress, ()#).

Anda mungkin juga menyukai