OpenCV 2.4.11

org.opencv.features2d

Class FeatureDetector

    • Method Detail

      • create

        public static FeatureDetector create(int detectorType)

        Creates a feature detector by its name.

        The following detector types are supported:

        • "FAST" -- "FastFeatureDetector"
        • "STAR" -- "StarFeatureDetector"
        • "SIFT" -- "SIFT" (nonfree module)
        • "SURF" -- "SURF" (nonfree module)
        • "ORB" -- "ORB"
        • "BRISK" -- "BRISK"
        • "MSER" -- "MSER"
        • "GFTT" -- "GoodFeaturesToTrackDetector"
        • "HARRIS" -- "GoodFeaturesToTrackDetector" with Harris detector enabled
        • "Dense" -- "DenseFeatureDetector"
        • "SimpleBlob" -- "SimpleBlobDetector"

        Also a combined format is supported: feature detector adapter name ("Grid" -- "GridAdaptedFeatureDetector", "Pyramid" -- "PyramidAdaptedFeatureDetector") + feature detector name (see above), for example: "GridFAST", "PyramidSTAR".

        Note: When using the SIFT and SURF detector types be sure to add the following lines to your code

        • Add an extra include: "#include "
        • Add an initialisation function at the start of your code: "initModules_nonfree();"
        Parameters:
        detectorType - Feature detector type.
        See Also:
        org.opencv.features2d.FeatureDetector.create
      • detect

        public void detect(java.util.List<Mat> images,
                  java.util.List<MatOfKeyPoint> keypoints)

        Detects keypoints in an image (first variant) or image set (second variant).

        Parameters:
        images - Image set.
        keypoints - The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i].
        See Also:
        org.opencv.features2d.FeatureDetector.detect
      • detect

        public void detect(java.util.List<Mat> images,
                  java.util.List<MatOfKeyPoint> keypoints,
                  java.util.List<Mat> masks)

        Detects keypoints in an image (first variant) or image set (second variant).

        Parameters:
        images - Image set.
        keypoints - The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i].
        masks - Masks for each input image specifying where to look for keypoints (optional). masks[i] is a mask for images[i].
        See Also:
        org.opencv.features2d.FeatureDetector.detect
      • detect

        public void detect(Mat image,
                  MatOfKeyPoint keypoints)

        Detects keypoints in an image (first variant) or image set (second variant).

        Parameters:
        image - Image.
        keypoints - The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i].
        See Also:
        org.opencv.features2d.FeatureDetector.detect
      • detect

        public void detect(Mat image,
                  MatOfKeyPoint keypoints,
                  Mat mask)

        Detects keypoints in an image (first variant) or image set (second variant).

        Parameters:
        image - Image.
        keypoints - The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i].
        mask - Mask specifying where to look for keypoints (optional). It must be a 8-bit integer matrix with non-zero values in the region of interest.
        See Also:
        org.opencv.features2d.FeatureDetector.detect
      • empty

        public boolean empty()
      • read

        public void read(java.lang.String fileName)
      • write

        public void write(java.lang.String fileName)