Morphological Operations

Implements connected-component labeling using geodesic dilation:

  1. Invert the binary image to make objects white.
  2. Select an unlabeled white pixel as a seed.
  3. Perform geodesic dilation constrained by the original mask.
  4. Label each connected region iteratively. alt text