java.lang.Object
imagingbook.common.regions.BinaryRegionSegmentation
imagingbook.common.regions.RecursiveSegmentation
Binary region segmentation based on a recursive (depth-first) flood filling algorithm. See Sec. 8.1.1 (Alg. 8.2) of [1] for additional details. Note that this implementation may easily run out of stack space and should be used for demonstration purposes only.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/09/28 revised
-
Field Summary
Fields inherited from class imagingbook.common.regions.BinaryRegionSegmentation
DefaultNeighborhoodT
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Methods inherited from class imagingbook.common.regions.BinaryRegionSegmentation
getHeight, getLabel, getMaxLabel, getMinLabel, getRegion, getRegion, getRegions, getRegions, getWidth, isSegmented
-
Constructor Details
-
RecursiveSegmentation
Constructor. Creates a new region segmentation from the specified image, which is not modified. The input image is considered binary, with 0 values for background pixels and values ≠ 0 for foreground pixels. The 4-neighborhood is used by default (BinaryRegionSegmentation.DefaultNeighborhoodT
).- Parameters:
ip
- the binary input image to be segmented
-
RecursiveSegmentation
Constructor. Creates a new region segmentation from the specified image and neighborhood type (4- or 8-neighborhood). The input image is considered binary, with 0 values for background pixels and values ≠ 0 for foreground pixels.- Parameters:
ip
- the binary input image to be segmentednh
- the neighborhood type (4- or 8-neighborhood)
-