[mmMaxgetimage] [Up] [mmMaxgetnodes] Introspection Functions

mmMaxgetindex
Returns the node index array.

Synopsis

Image mmMaxgetindex ( const MaxTree& maxtree );

Input

maxtree MaxTree

Output

y Image

Description

The index array and the level array (the image, see mmMaxgetimage ) jointly maps image pixels to MaxTree nodes. The index array is an Int32 array and has the same dimension as the image.

Examples

Image orig_image = mmReadgray("cameraman.tif");
MaxTree mt = mmMaxtree(orig_image);
Image lev = mmMaxgetimage(mt);
Image ind = mmMaxgetindex(mt);
int i = (int)lev.getpixel(89, 14, 0);
int j = (int)ind.getpixel(89, 14, 0);
Image node_image = mmMaxsubimage(mt, i, j);
mmShow(orig_image);
mmShow(node_image);
        

orig_image node_image

[mmMaxgetimage] [Up] [mmMaxgetnodes]