You are on page 1of 25

Binary Images

Computer Vision Systems


Dr. Ferenc Vajda
Associate Professor
2017

Severalalgorithmsaremucheasieraftera
binarization.Binaryimagescontainonlytwotypes
ofpixels:black/white,object/backgroundetc.
Binarizationisdonebysegmentation,e.g.
thresholding.
Simplethresholdingoftendoesnotwork...
SeealsoSegmentation06
Logicalcombinationofmultiplechannels/images:

twoormoremodalsofamultimodalimage(e.g.
Infrachannelandcolorchannels)
resultofmultiplesegmentationmethods,
thresholdings
etc.
Multiplicationoforiginalimageandbinaryzedimage.

Theresultisanimage,onwhichobjectspreserve
theiroriginalintensityvalues,butbackgroundis
completelyremoved.
Standardfilteringmethods(e.g.convolution)donot
work.Specialmethodsare:

Erosion:removingsmall(e.g.onepixel)objects,but
remainingobjectsarealsoeroding,theywillbealso
smaller.

Dilatation:removingsmallbackgroundnoises.
Objectswillbeenlarged,duringthisoperation.
Closing:performingadilatationandanerosion
respectively.Holescanberemoved,whileobjects
maypreservetheirsize

Opening:performinganerosionandthenadilatation.
Unnecessaryobjectscanberemoved,preserving
sizesoflargerobjects.

Acombinationofclosingandopening(respectively)
mayremoveseveralnoises.Ifobejctsarelargeand
backgroundismuchsmaller,theoppositeorderis
recommended
Optimalkernelformisrounded.However,thisisnot
possibleifkernelissmall.Ifitisnotroundedthe
isotropyfails:runningdilatationanderosiononan
object(e.g.circle)theresultwillbedeformed.
Task:drawtheperimeterofthecells.

a,Originalimage
b,Simplethreshold
c,Invertedthreshold
d,Bminusthelargeobjectscontactingtheborder
e,CORconnectedtoD
f,Noiseremoved(opening/closing)+nonmerging
dilatation

Result:Outlinesuperponatedtotheoriginalimage
Asimplebinaryalgorithmforcountourdetection...
Findingobjects...
Objectselectingmask

Maskcanbecreatedusingadifferentchannel
createdfromadifferentfeature(e.g.Focus,
differentcolorchannelorevenanalgorithmical
image)
Objectswillbecompletelyremovedorcompletely
kept.
Task:findgoldparticleswithinthecells.

1,searchthecells
2,searchtheparticles
3,Maskparticlesbycells(fullparticlesare
preserved!)
Task:separatecells

Problem:edgescannotbeseparatedeasily

1,Searchcorners(theyaredarkerthanotherparts)
2,Performedgedetection:varianceoperator
(distancesquarefrommean)+thresholding
3,maskedgesbycorners(edgesnotconnectedto
anycornersaredummyedges,theycanbe
removed)
4,Removingnoise(opening,closing),and
skeletonization.
1,Erosionuntilobjectsareseparated.
2,Dilatationisperformedstepbystep.Ifdifferently
labeledobjectsarewithinakernel,nodilatationis
performed.
DilatationandErosioncanbedefinedtograyscale
(ormultichannel)imagesasabove.
Severalalgorithmsarebuiltonneighbourhoodsand
shortdistances.Asasimplificationinteger
distancesarecalculated.Thiscausesartifacts.

Euclideandistancemapcanbeusedinstead,but
muchmorecomputationisnecessary.

E.g.Erosionanddilatationcanbealsodoneusing
nonintegers
Searchingaonepixelwideapproximationofany
objects.
Thelinestowardsthecornersarenecessary!
Seealgorithmabove.
Gearabove:8neighbours
Gearbelow:EDM
Vectoriscreatedusingtheseinformation.

Avectorspaceisconstructedfromseveralvectors.
Clusterscanbebuilt(eachpersonisacluster)

Thecurrentvectorissearchedinthevectorspace,
clustercanbefound.
Allobjectswillbelabeleddifferentlyattheend.
Resultisthenumberoftheobjects.

You might also like