[mmMaxopenrec] [Up] [mmMaxaopen] Reconstruction and Marker Propagation

mmMaxpropagate
Find the zone of influence of the given markers.

Synopsis

Image mmMaxpropagate ( const MaxTree& maxtree , const Image& 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

Image a = mmReadgray("cameraman.tif");
Image g = mmNeg(mmGradm(a));
MaxTree mxt = mmMaxtree(g);
Image v = mmMaxregmax(mxt, "v-dyn-image");   // volume extinction values
//
double lbmin, lbmax;
int scale[4] = {500, 1000, 4000, 7000};
for(int i = 0; i < 4; i++) {
    Image marker = mmLabel(mmBinary(mmSubm(v.uint16(), scale[i])));
    Image regions = mmMaxpropagate(mxt, marker);
    mmLblshow(regions);
    cvMinMaxLoc((IplImage *)marker, &lbmin, &lbmax);
    printf("N(%d) = %d regions\n", scale[i], (int)lbmax);
}
        

N(500) = 118 regions
N(1000) = 78 regions
N(4000) = 32 regions
N(7000) = 22 regions

regions regions
regions regions

[mmMaxopenrec] [Up] [mmMaxaopen]