chapter15- segmentation
- 格式:pdf
- 大小:17.40 MB
- 文档页数:22
CHAPTER15
IMAGESEGMENTATION
WHATWILLWELEARN?
•Whatisimagesegmentationandwhyisitrelevant?
•WhatisimagethresholdingandhowisitimplementedinMATLAB?
•Whatarethemostcommonlyusedimagesegmentationtechniquesandhowdo
theywork?
15.1INTRODUCTION
Segmentationisoneofthemostcrucialtasksinimageprocessingandcomputervision.
AsyoumayrecallfromourdiscussioninChapter1(Section1.5),imagesegmentation
istheoperationthatmarksthetransitionbetweenlow-levelimageprocessingand
imageanalysis:theinputofasegmentationblockinamachinevisionsystemisa
preprocessedimage,whereastheoutputisarepresentationoftheregionswithinthat
image.Thisrepresentationcantaketheformoftheboundariesamongthoseregions
(e.g.,whenedge-basedsegmentationtechniquesareused)orinformationaboutwhich
pixelbelongstowhichregion(e.g.,inclustering-basedsegmentation).Onceanimage
hasbeensegmented,theresultingindividualregions(orobjects)canbedescribed,
represented,analyzed,andclassifiedwithtechniquessuchastheonespresentedin
Chapters18and19.
PracticalImageandVideoProcessingUsingMATLAB®.ByOgeMarques.©2011JohnWiley&Sons,Inc.Published2011byJohnWiley&Sons,Inc.
365366IMAGESEGMENTATION
Segmentationisdefinedastheprocessofpartitioninganimageintoasetof
nonoverlappingregionswhoseunionistheentireimage.Theseregionsshouldideally
correspondtoobjectsandtheirmeaningfulparts,andbackground.Mostimageseg-
mentationalgorithmsarebasedononeoftwobasicpropertiesthatcanbeextracted
frompixelvalues—discontinuityandsimilarity—oracombinationofthem.
Segmentationofnontrivialimagesisaveryhardproblem—madeevenharderby
nonuniformlighting,shadows,overlappingamongobjects,poorcontrastbetween
objectsandbackground,andsoon—thathasbeenapproachedfrommanydifferent
angles,withlimitedsuccesstothisdate.Manyimagesegmentationtechniquesand
algorithmshavebeenproposedandimplementedduringthepast40yearsandyet,
exceptforrelatively“easy”scenes,theproblemofsegmentationremainsunsolved.
Figure15.1illustratestheproblem.Atthetop,itshowsthecolorandgrayscale
versionsofahardtestimagethatwillbeusedlaterinthischapter.Segmentingthis
imageintoitsfourmainobjects(Legobricks)andthebackgroundisnotasimpletask
forcontemporaryimagesegmentationalgorithms,duetounevenlighting,projected
shadows,andocclusionamongobjects.Attemptingtodosowithoutresortingto
colorinformationmakestheproblemvirtuallyimpossibletosolveforthetechniques
describedinthischapter.
FIGURE15.1Testimagesforsegmentationalgorithms:(a)ahardtestimageand(b)itsgrayscaleequivalent;(c)aneasiertestimage(courtesyofMathWorks)and(d)theresultofmorphologicalpreprocessingandthresholding.INTENSITY-BASEDSEGMENTATION367
ThebottompartofFigure15.1showsanothertestimage,whichisconsiderably
simplerandwillprobablyleadtoperfectsegmentationwitheventhesimplesttech-
niques.Althoughtheoriginalimagehasafewimperfections(particularlyonone
cointhatissignificantlydarkerthantheothers),simplepreprocessingoperations
suchasregionfilling(Section13.6.2)usingimfillwillturnitintoanimagesuit-
ableforglobalthresholding(Section15.2.1)andsubsequentlabelingoftheindividual
regions.
Thereisnounderlyingtheoryofimagesegmentation,onlyadhocmethods,whose
performanceisoftenevaluatedindirectly,basedontheperformanceofthelargersys-
temtowhichtheybelong.Eventhoughtheysharethesamegoal,imagesegmentation
techniquescanvarywidelyaccordingtothetypeofimage(e.g.,binary,gray,color),
choiceofmathematicalframework(e.g.,morphology,imagestatistics,graphtheory),
typeoffeatures(e.g.,intensity,color,texture,motion),andapproach(e.g.,top-down,
bottom-up,graph-based).1
Thereisnouniversallyacceptedtaxonomyforclassificationofimagesegmenta-
tionalgorithmseither.Inthischapter,wehaveorganizedthedifferentsegmentation
methodsintothefollowingcategories:
•Intensity-basedmethods(Section15.2),alsoknownasnoncontextualmethods,
workbasedonpixeldistributions(i.e.,histograms).Thebest-knownexampleof
intensity-basedsegmentationtechniqueisthresholding.
•Region-basedmethods(Section15.3),alsoknownascontextualmethods,relyon
adjacencyandconnectivitycriteriabetweenapixelanditsneighbors.Thebest-
knownexamplesofregion-basedsegmentationtechniquesareregiongrowing
andsplitandmerge.
•Othermethods,wherewehavegroupedrelevantsegmentationtechniquesthat
donotbelongtoanyofthetwocategoriesabove.Theseincludesegmentation
basedontexture,edges,andmotion,amongothers.2
15.2INTENSITY-BASEDSEGMENTATION
Intensity-basedmethodsareconceptuallythesimplestapproachtosegmenta-
tion.Theyrelyonpixelstatistics—usuallyexpressedintheformofahistogram
(Chapter9)—todeterminewhichpixelsbelongtoforegroundobjectsandwhichpix-
elsshouldbelabeledasbackground.Thesimplestmethodwithinthiscategoryis
imagethresholding,whichwillbedescribedindetailintheremainingpartofthis
section.
1Thefieldofimagesegmentationresearchisstillveryactive.Mostrecentlypublishedalgorithmsarefartoocomplextobeincludedinthistext,andtheircomputationalrequirementsoftenpushMATLABtoitslimits.Referto“LearnMoreAboutIt”sectionattheendofthechapterforusefulpointers.2SegmentationofcolorimageswillbediscussedinChapter16.