Documentation of 'boofcv.alg.segmentation.ms.MergeSmallRegions' Java class
MergeSmallRegions
boofcv.alg.segmentation.ms

Class MergeSmallRegions<T extends ImageBase>



  • public class MergeSmallRegions<T extends ImageBase>
    extends RegionMergeTree
    Finds regions which are too small and merges them with a neighbor that is the most similar to it and connected. The process is repeated until there are no more regions below the size threshold. How similar two neighbors are is determined using each region's average color. Connectivity is determined using a 4-connect rule.
    • Constructor Detail

      • MergeSmallRegions

        public MergeSmallRegions(int minimumSize,
                                 ConnectRule rule,
                                 ComputeRegionMeanColor<T> computeColor)
        Constructor
        Parameters:
        minimumSize - Minimum number of pixels a region must have for it to not be pruned.
        computeColor - Computes the color of each region
    • Method Detail

      • setMinimumSize

        public void setMinimumSize(int minimumSize)
      • process

        public void process(T image,
                            GrayS32 pixelToRegion,
                            GrowQueue_I32 regionMemberCount,
                            FastQueue<float[]> regionColor)
        Merges together smaller regions. Segmented image, region member count, and region color are all updated.
        Parameters:
        image - Input image. Used to compute color of each region
        pixelToRegion - (input/output) Segmented image with the ID of each region. Modified.
        regionMemberCount - (input/output) Number of members in each region Modified.
        regionColor - (Output) Storage for colors of each region. Will contains the color of each region on output.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.