| [mmMaxopenrec] [Up] [mmMaxaopen] | Reconstruction and Marker Propagation |
| User Feedback |
| y | Image
Labeled image (int32). Zone of influence of each marker. |
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].
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] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |