[maxopenrec] [Up] [maxaopen] Reconstruction and Marker Propagation

maxpropagate
Find the zone of influence of the given markers.

Synopsis

y = maxpropagate ( maxtree , marker )

Input

maxtree MaxTree

The MaxTree.

marker Image Unsigned gray-scale (uint8 or uint16), signed (int32) or binary image

Markers defined by a labeled image (uint8, uint16 or int32).

Output

y Image

Labeled image (int32). Zone of influence of each marker.

Description

Returns a labeled image representing the zone of influence of the given markers. The pruning algorithm is presented in [Gar02], pp. 96-113. Each marker is defined by a label that is propagated toward the root of the tree until a conflict with another label occur. If a MinTree is considered, the result is similar to the watershed with markers, as noted in [Gar02].

Examples

a = mmreadgray("cameraman.tif")
g = mmneg(mmgradm(a))
mxt = maxtree(g)
v = maxregmax(mxt, 'v-dyn-image')   # volume extinction values
#
for scale in [500, 1000, 4000, 7000]:
    marker = mmlabel(v > scale)
    regions = uint16(maxpropagate(mxt, marker))
    mmlblshow(regions)
    print 'N(%d) = %d regions' % (scale, max(marker.flat))
    #
        
N(500) = 118 regions
N(1000) = 78 regions
N(4000) = 32 regions
N(7000) = 22 regions
regions regions
regions regions

[maxopenrec] [Up] [maxaopen]