16
1 Shape Shape representation representation by by skeletonization skeletonization Kálmán álmán Pal Palágyi gyi Dept. Image Processing & Computer Graphics Dept. Image Processing & Computer Graphics University of Szeged, Hungary University of Szeged, Hungary Shape Shape It It is a fundamental concept in computer is a fundamental concept in computer vision. vision. It can be regarded as the basis for high It can be regarded as the basis for high- level level image processing stages concentrating on image processing stages concentrating on scene analysis and interpretation. scene analysis and interpretation. Shape Shape It It is is formed formed by by any any connected connected set set of of points points. examples examples of of planar planar shapes shapes (L.F. Costa, R. L.F. Costa, R. Marcondes Marcondes, 2001 , 2001) The The generic generic model model of of a a modular modular machine machine vision vision system system (G.W. G.W. Awcock Awcock, R. , R. Thomas Thomas, 1996 , 1996) Feature Feature extraction extraction – shape shape representation representation (G.W. Awcock, R. Thomas, 1996) Shape Shape representation representation to to apply apply a a transform transform in in order order to to represent represent an an object object in in terms terms of of the the transform transform coefficients coefficients, to to describe describe the the boundary boundary that that surrounds surrounds an an object object, to to describe describe the the region region that that is is occupied occupied by by an an object object.

Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

Embed Size (px)

Citation preview

Page 1: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

1

ShapeShape representationrepresentation bybyskeletonizationskeletonization

KKálmánálmán PalPaláágyigyi

Dept. Image Processing & Computer Graphics Dept. Image Processing & Computer Graphics University of Szeged, HungaryUniversity of Szeged, Hungary

ShapeShape

ItIt is a fundamental concept in computer is a fundamental concept in computer vision.vision.

It can be regarded as the basis for highIt can be regarded as the basis for high--level level image processing stages concentrating on image processing stages concentrating on scene analysis and interpretation.scene analysis and interpretation.

ShapeShape

ItIt is is formedformed byby anyany connectedconnected setset ofof pointspoints..

examplesexamples ofof planarplanar shapesshapes

((L.F. Costa, R. L.F. Costa, R. MarcondesMarcondes, 2001, 2001))

The The genericgeneric modelmodel ofof a a modularmodular machinemachine visionvision

systemsystem

((G.W. G.W. AwcockAwcock, R. , R. ThomasThomas, 1996, 1996))

FeatureFeature extractionextraction ––shapeshape representationrepresentation

(G.W. Awcock, R. Thomas, 1996)

ShapeShape representationrepresentation

toto applyapply a a transformtransform inin orderorder toto representrepresentanan objectobject inin termsterms ofof thethe transformtransformcoefficientscoefficients,,

toto describedescribe thethe boundaryboundary thatthat surroundssurroundsanan objectobject,,

toto describedescribe thethe regionregion thatthat is is occupiedoccupied bybyanan objectobject..

Page 2: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

2

TransformTransform--basedbasedshapeshape representationrepresentation

FourierFourier descriptiondescriptionwaveletwavelet--basedbased analysisanalysisscalescale--spacespace / / multiscalemultiscalecharacterizationcharacterizationsphericalspherical harmonicsharmonics –– basedbaseddescriptiondescription (3D)(3D)……

ContourContour--basedbasedshapeshape representationrepresentation

chainchain--codecoderunrun--lengthlengthpolygonalpolygonal approximationapproximationsyntacticsyntactic primitiveprimitivesssplinesplinesnakesnake / / activeactive contourcontourmultiscalemultiscale primitivesprimitives……

RegionRegion--basedbasedshapeshape representationrepresentation

polygonpolygonVoronoiVoronoi / / DelaunayDelaunayquadtreequadtreemorphologicalmorphological decompositiondecompositionconvexconvex hull / hull / deficiencydeficiencyrunrun--lengthlengthdistancedistance transformtransformskeletonskeleton……

SkeletonSkeleton

result of the Medial Axis Transform: objectpoints having at least two closest boundarypoints;

praire-fire analogy: the boundary is set on fireand skeleton is formed by the loci where thefire fronts meet and quench each other;

the locus of the centers of all the maximalinscribed hyper-spheres.

NearestNearest boundaryboundary pointspointsandand inscribedinscribed hyperhyper--spheresspheres

ObjectObject = = unionunion ofof thethe inscribedinscribedhyperhyper--spheresspheres

objectobject boundaryboundary maximalmaximal inscribedinscribed disksdisks centers

Page 3: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

3

The The skeletonskeleton inin 3D 3D generallygenerally containscontainssurfacesurface patchespatches (2D (2D segmentssegments).).

SkeletonSkeleton inin 3D3D Skeleton → Original object

Skeleton → Original object Skeleton → Original object

Skeleton → Original object Skeleton → Original object

Page 4: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

4

Skeleton → Original object UniquenessUniqueness

The The samesame skeletonskeleton maymay belongbelong toto differentdifferent elongatedelongated objectsobjects..

InnerInner andand outerouter skeletonskeleton

((innerinner) ) skeletonskeleton

outerouter skeletonskeleton((skeletonskeleton ofof thethenegativenegative image)image)

StabilityStability

RepresentingRepresenting thethe topologicaltopologicalstructurestructure

PropertiesPropertiesrepresentsrepresents•• thethe generalgeneral formform ofof anan objectobject,,•• thethe topologicaltopological structurestructure ofof anan objectobject, ,

andand•• locallocal objectobject symmetriessymmetries..

invariantinvariant toto•• translationtranslation, , •• rotationrotation, , andand•• (uniform) (uniform) scalescale changechange..

simplifiedsimplified andand thinthin..

Page 5: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

5

originaloriginal medialmedialsurfacesurface

medialmediallineslines

topologicaltopologicalkernelkernel

SkeletonSkeleton--likelike descriptorsdescriptors inin 3D3D

ExampleExampleofofmedialmedialsurfacesurface

S. S. SvenssonSvensson (SUAS, (SUAS, UppsalaUppsala))

ExampleExampleofof medialmediallineslines

SkeletalSkeletal pointspoints inin 2D 2D ––pointpoints in s in 3D 3D centerlinescenterlines

ExampleExample ofof topologicaltopological kernelkernel

originaloriginal imageimage topologicaltopological kernelkernel

ExampleExample ofof topologicaltopological kernelkernel

simplysimply connectedconnected →→anan isolatedisolated pointpoint

multiplymultiply connectedconnected →→closedclosed curvecurve

Page 6: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

6

SkeletonizationSkeletonization techniquestechniques

distancedistance transformtransform

VoronoiVoronoi diagramdiagram

thinningthinning

DistanceDistance transformtransform

Input:Input:BinaryBinary arrayarray AA containingcontaining featurefeature elementselements (1’s) (1’s) andand nonnon--featurefeature elementselements (0’s).(0’s).

Output:Output:NonNon--binarybinary arrayarray BB containingcontaining thethe distancedistance totothethe closestclosest featurefeature elementelement..

DistanceDistance transformtransform

input (input (binarybinary)) output (output (nonnon--binarybinary))

DistanceDistance transformtransformusingusing citycity--blockblock ((oror 4) 4) distancedistance

DistanceDistance transformtransformusingusing chesschess--boardboard ((oror 8) 8) distancedistance

DistanceDistance--basedbasedskeletonizationskeletonization

1. BorderBorder pointspoints ((asas featurefeatureelementselements) ) areare extractedextracted fromfrom thetheoriginaloriginal binarybinary image.image.

2.2. DistanceDistance transformtransform is is executedexecuted(i.e., (i.e., distancedistance mapmap is is generatedgenerated).).

3.3. The The ridgesridges ((locallocal extremasextremas) ) arearedetecteddetected asas skeletalskeletal pointspoints..

Page 7: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

7

DistanceDistance--basedbasedskeletonizationskeletonization –– stepstep 11

detectingdetecting borderborder pointspoints

DistanceDistance--basedbasedskeletonizationskeletonization –– stepstep 22

distancedistance mappingmapping

LinearLinear--timetimedistancedistancemappingmapping

G. G. BorgeforsBorgefors (1984(1984))

LinearLinear--timetime distancedistance mappingmapping

forwardforward scanscan backwardbackward scanscan

LinearLinear--timetime distancedistance mappingmapping

forwardforward scanscan backwardbackward scanscan

generallygenerally: : dd1=3, 1=3, dd2=42=4

DistanceDistance--basedbasedskeletonizationskeletonization –– stepstep 33

detectingdetecting ridgesridges ((locallocal extremasextremas))

Page 8: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

8

VoronoiVoronoi diagramdiagram

InputInput::SetSet ofof pointspoints ((generatinggenerating poinspoins))

OutputOutput::the partition of the space into cells the partition of the space into cells so that each cell contains exactly so that each cell contains exactly one generating point and the locus one generating point and the locus of all points which are closer to this of all points which are closer to this generating point than to others. generating point than to others.

VoronoiVoronoi diagram diagram inin 3D3D

VoronoiVoronoi diagram diagram ofof 20 20 generatinggenerating pointspoints

IncrementalIncremental constructionconstructionO(n)

DivideDivide andand conquerconquerO(n·logn)

leftleftdiagramdiagram

rightrightdiagramdiagram

mergingmerging

VoronoiVoronoi diagram diagram -- skeletonskeleton

setset ofof generatinggenerating pointspoints = = sampledsampled boundaryboundary

VoronoiVoronoi diagram diagram -- skeletonskeleton

IfIf thethe densitydensity ofof boundaryboundary pointspoints goesgoes toto infinityinfinity, , thenthen thethecorrespondingcorresponding VoronoiVoronoi diagram diagram convergesconverges toto thethe skeletonskeleton..

Page 9: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

9

VoronoiVoronoi skeletonskeleton

originaloriginal 3D 3D objectobject VoronoiVoronoi skeletonskeleton

M. M. StynerStyner (UNC, (UNC, ChapelChapel HillHill))

TThinninghinning

modelingmodeling firefire--frontfront propagationpropagation

IterativeIterative objectobject reductionreduction

MMatryoshkaatryoshka::Russian nesting Russian nesting woodenwooden dolldoll..

originaloriginalobjectobject

reducedreducedstructurestructure

OneOne iterationiteration stepstep

ThinningThinning algorithmsalgorithms

repeatremove „deletable” border pointsfrom the actual binary image

until no points are deleted

oneoneiterationiterationstepstep

degrees of freedom:– which points are regarded as „deletable” ?– how to organize one iteration step?

TopologyTopology preservationpreservation inin 2D2D((a a countercounter exampleexample))

objectobject

cavitycavity

backback--groundground

originaloriginalboundaryboundary((notnot is is thetheimage)image)

Page 10: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

10

TopologyTopology inin 3D3Dholehole -- a a newnew conceptconcept

””A A topologisttopologist is a is a manman whowho doesdoes notnot knowknow thethe differencedifferencebetweenbetween a a coffeecoffee cupcup andand a a doughnutdoughnut.”.”

TopologyTopology preservationpreservation inin 3D3D(a (a countercounter exampleexample))

createdcreated

mergedmerged

destroyeddestroyed

ShapeShape preservationpreservation ShapeShape preservationpreservation

ExampleExample ofof 2D 2D thiningthining ExampleExample ofof 3D 3D thinningthinning

originaloriginal objectobject centerlinecenterline

Page 11: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

11

I I preferprefer thinningthinning sincesince itit ……

allowsallows directdirect centerlinecenterline extractionextraction inin3D,3D,makes easy implementation makes easy implementation possiblepossible,,takes the least computational costs, takes the least computational costs, andandcan be executed in parallel.can be executed in parallel.

GeometricalGeometrical::The The skeletonskeleton must be must be inin thethe middlemiddle ofof thetheoriginaloriginal objectobject andand must be must be invariantinvariant tototranslationtranslation, , rotationrotation, , andand scalescale changechange..TopologicalTopological::The The skeletonskeleton must must retainretain thethe topologytopology ofof thetheoriginaloriginal objectobject..

RequirementsRequirements

ComparisonComparison

yes yes nonothinning

yes yes yes yes Voronoi-based

nonoyes yes distance-based

topologicalgeometricalmethod „„exoticexotic” ” charactercharacter recognitionrecognitionrecognitionrecognition ofof handwrittenhandwritten texttextsignaturesignature verificationverificationfingerprintfingerprint andand palmprintpalmprint recognitionrecognitionrasterraster--toto--vectorvector--conversionconversion……

ApplicationsApplications inin 2D2D

ExoticExotic charactercharacter recognitionrecognition

K. K. UedaUeda

characterscharacters ofof a a JapaneseJapanese signaturesignature

SignatureSignature verificationverification

L.C. L.C. BastosBastos etet alal..

signaturesignature beforebefore andandafterafter skeletonizationskeletonization

detecteddetected lineline--endend pointspointsandand branchbranch--pointspoints

Page 12: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

12

FingerprintFingerprint verificationverification

A. A. RossRossfeaturesfeatures inin fingerprintsfingerprints

corecore

ridgeridge endingending

ridgeridge bifurcationbifurcation

A. A. RossRoss

thetheprocessprocess

FingerprintFingerprint verificationverification

input image orientation field

extracted ridges

minutiae points thinned ridges

PalmprintPalmprint verificationverification

N. Dutamatchingmatching extractedextracted featuresfeatures

RasterRaster--toto--vectorvector conversionconversion

scannedscanned mapmapKatona E.Katona E.

„„rawraw” ” vectorvector image image afterafter skeletonizationskeletonization

RasterRaster--toto--vectorvector conversionconversion

Katona E.Katona E.correctedcorrected vectorvector imageimage

RasterRaster--toto--vectorvector conversionconversion

Katona E.Katona E.

Page 13: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

13

ApplicationsApplications inin 3D3D

ThereThere areare somesome frequentlyfrequently usedused 3D 3D medicalmedical scannersscanners ((e.ge.g., CT, MR, ., CT, MR, SPECT, PET), SPECT, PET), thereforetherefore, , applicationsapplications inin medicalmedical image image processingprocessing areare mentionedmentioned..

ThereThere areare a a lotslots ofof tubulartubularstructuresstructures ((e.ge.g., ., bloodbloodvesselsvessels, , airwaysairways) ) inin thethehumanhuman bodybody, , thereforetherefore, , centerlinecenterline extractionextraction is is fairlyfairly importantimportant. .

E. E. SorantinSorantin etet alal..

BBloodlood vesselvessel((infrainfra--renalrenal aorticaortic aneurysmsaneurysms))

E. Sorantin et al.

AAirwayirway((trachealstenosistrachealstenosis))

E. Sorantin et al.

AAirwayirway ((trachealstenosistrachealstenosis))

E. Sorantin et al.

CColonolon

Page 14: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

14

VirtualVirtual dissectiondissection ofof thethe coloncolon

E. E. SorantinSorantin etet alal..

cylindriccylindric projectionprojection

detecteddetected polypspolyps

VirtualVirtual colonoscopycolonoscopy

A. A. VillanovaVillanova etet alal..

QuantitativeQuantitative analysisanalysis ofofintrathoracicintrathoracic airwayairway treestrees

Kálmán Kálmán PalágyiPalágyiJuergJuerg TschirrenTschirrenMilanMilan SonkaSonkaEricEric A. A. HoffmanHoffman

ImagesImages

MultiMulti--detectordetectorRowRow SpiralSpiral CTCT

512 x 512 512 x 512 voxelsvoxels

500 500 –– 600 slices600 slices

0.65 x 0.65 x 0.6 mm0.65 x 0.65 x 0.6 mm33

(almost isotropic)(almost isotropic)

LungLung segmentationsegmentation CenterlinesCenterlines

Page 15: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

15

detecteddetectedbranchbranch--pointspoints

BranchBranchpartitioningpartitioning

ccenterlineenterline labelinglabeling llabelabel propagationpropagation treetree withwith itsits centerlinescenterlines formalformal treetree ((inin XML)XML)

Quantitative indices Quantitative indices for tree branchesfor tree branches

•• lengthlength (Euclidean distance between the (Euclidean distance between the parent and the child branch points)parent and the child branch points)

•• volumevolume (volume of all (volume of all voxelsvoxels belonging to the belonging to the branch)branch)

•• surface areasurface area (surface area of all boundary (surface area of all boundary voxelsvoxels belonging to the branch)belonging to the branch)

•• average diameteraverage diameter ((assumingassuming cylindriccylindricsegmentssegments))

ExampleExample ofof thethe entireentire processprocess

ssegmentedegmentedtreetree

prunedprunedccenterlinesenterlines

llabeledabeled treetree fformalormal treetree

Page 16: Shape representation by Shape skeletonization - … · shape representation chain-code ... Skeleton result of the Medial Axis Transform: object points having at least two closest

16

MatchingMatching

FRCFRC TLCTLC

AnatomicalAnatomical labelinglabeling

ByeBye