Class RemoveWatersheds

java.lang.Object
boofcv.alg.segmentation.watershed.RemoveWatersheds

public class RemoveWatersheds extends Object
Examines a segmented image created by WatershedVincentSoille1991 and merged watershed pixels into neighboring regions. Since there is no good rule for which region the pixel should be merged into, it is merged into the first valid one.
  • Constructor Details

    • RemoveWatersheds

      public RemoveWatersheds()
  • Method Details

    • remove

      public void remove(GrayS32 segmented)
      Removes watersheds from the segmented image. The input image must be the entire original segmented image and assumes the outside border is filled with values < 0. To access this image call WatershedVincentSoille1991.getOutputBorder(). Each watershed is assigned the value of an arbitrary neighbor. 4-connect rule is used for neighbors. Doesn't matter if initial segmented was done using another connectivity rule. The value of each region i s reduced by one at the very end.
      Parameters:
      segmented - Entire segmented image (including border of -1 values) with watersheds