Class OpenCVWatershedRegionDetection

  • All Implemented Interfaces:
    RegionDetection<org.opencv.core.Mat,​Double>

    public class OpenCVWatershedRegionDetection
    extends Object
    implements RegionDetection<org.opencv.core.Mat,​Double>
    Use watershed algorithm to isolate objects from each other. Isolates object, then transforms them into recognized objects containing coordinates.

    Suggestion from: https://stackoverflow.com/questions/19273161/watershed-in-opencv-android

    Since:
    1.0
    Author:
    Christoph Praschl, Andreas Pointner
    • Constructor Detail

      • OpenCVWatershedRegionDetection

        public OpenCVWatershedRegionDetection()
    • Method Detail

      • recognizeRegion

        public List<RecognizedObject<org.opencv.core.Mat,​Double>> recognizeRegion​(org.opencv.core.Mat image,
                                                                                        double threshold)
        Description copied from interface: RegionDetection
        Recognize regions using a specific threshold and information of an image-object.
        Specified by:
        recognizeRegion in interface RegionDetection<org.opencv.core.Mat,​Double>
        Parameters:
        image - image to find regions in for
        threshold - threshold to use during the region search process
        Returns:
        list containing the found regions