Class BreadthFirstSegmentation

java.lang.Object
imagingbook.common.regions.BinaryRegionSegmentation
imagingbook.common.regions.BreadthFirstSegmentation

Binary region segmentation based on a breadth-first flood filling algorithm using a queue. See Sec. 8.1.1 (Alg. 8.2) of [1] for additional details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/09/28 revised
  • Constructor Details

    • BreadthFirstSegmentation

      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
    • BreadthFirstSegmentation

      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 segmented
      nh - the neighborhood type (4- or 8-neighborhood)