Pink 0.9

herosball.c File Reference

topologically controlled erosion More...


Detailed Description

topologically controlled erosion

Usage: herosball in.pgm radius dist connex out.pgm

Description: Performs a topologically controlled erosion, that is, a homotopic thinning constrained by the erosion of the input object.

The parameter radius gives the radius of the ball which is used as structuring element for the erosion.

The parameter dist is a numerical code indicating the distance which is used to compute the erosion. The possible choices are:

The parameter connex indicates the connectivity of the binary object. Possible choices are 4, 8 in 2d and 6, 26 in 3d.

Let X be the set corresponding to the input image in.pgm, and let Xbar denote its complementary set. The algorithm is the following:

I = erosball(X, dist, r)
Repeat:
    Select a point x in X \ I such that dist(x,Xbar) is minimal
    If x is simple for X then
        X = X \ {x}
	I = I union {x}
Until X == I
Result: X

Types supported: byte 2d, byte 3d

Category: topobin

Author:
Michel Couprie