You are on page 1of 17

Pruning

By: Joseph Fernandes


General Description

Š Complement to thinning and skeletonizing


Š “Cleans up” parasitic components
Algorithm Overview

Š Thinning

Š Hit-or-miss (endpoints)

Š Dilation (endpoints)

Š Union
Example Problem
Example continued

Š First, we construct
structure elements that
detect endpoints.
Example: Step 1 - Thinning

Š First morphological
operation applied is
thinning using the
structure elements.
Thinning “Simplified”

Š Given a structure element


B, subtract the set of
pixels found using hit-or-
miss from image A.
Thinning Result

Š The purpose of the


thinning is to eliminate
branches with 3 or less
pixels.
Š After 3 cycles of
thinning, we get the
result to the right.
Example continued

Š Next, we want to restore the original image


sans the parasitic branches.
Š First step is to find the endpoints of the
thinned image.
Example: Step 2 – Hit-or-Miss

Š Using the structure


element set {B}, find
the union of each set of
pixels found
performing the hit-or-
miss operation on the
thinned image.
Hit-or-Miss Result

Š Performing the hit-or-


miss operation using
the given structure
element set results in
the two endpoints
shown.
Example: Step 3 - Dilation

Š The third step is to


dilate the endpoints in
order to restore
pertinent branches.
Š H is a 3x3 structure
element of 1’s.
Dilation Result

Š Upon dilating the


endpoints, we find its
intersection with the
original image, so as to
not introduce new
unwanted branches.
Example: Final Step - Union

Š Our last step is to find


the union of the
thinned image and the
dilated endpoints.

Š We result in a
“cleaner” image.
Example Recap

Š Step 1: thin image A using


structure element set {B}.
Š Step 2: hit-or-miss to find
the endpoints of Step 1.
Š Step 3: dilate the endpoints
to regain pertinent
branches.
Š Step 4: find the union of
Step 1 and Step 3.
Pruning Problems

Š If an endpoint of a parasitic branch is near


the skeleton of the original image, it is
possible for the dilation to pick up the “tip”
of the parasitic branch.
Š Unless this “tip” is the entire parasitic
element, the tip will be disconnected from
the rest of the pruned image, so it will be
easy to detect and eliminate it.
References

Š Gonzalez, R., R. Woods. Digital Image


Processing: Second Edition. New Jersey:
Prentice Hall. 2002.

You might also like