Pink 0.9

toposhrink.c File Reference

topologically controled binary shrinking guided by a priority image More...


Detailed Description

topologically controled binary shrinking guided by a priority image

Usage: toposhrink in.pgm prio.pgm connex tmin tmax tbmin tbmax [inhibit] out.pgm

Description: Topologically controled binary shrinking guided by a priority image. The lowest values of the priority image correspond to the highest priority.

The parameter prio is an image (byte or int32_t).

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

If the parameter inhibit is given and is a binary image name, then the points of this image (set Y) will be left unchanged.

Let X be the set of points of the binary image in.pgm .

Repeat until stability: 
    select a point p of X \ Y such that
        tmin <= T(p) <= tmax and tbmin <= Tb(p) <= tbmax 
        and with the lowest possible priority value
    X := X \ { p }

Types supported: byte 2d, byte 3d

Category: topobin

Author:
Michel Couprie