org.opencv.features2d
public class FeatureDetector extends java.lang.Object
Abstract base class for 2D image feature detectors.
class CV_EXPORTS FeatureDetector
// C++ code:
public:
virtual ~FeatureDetector();
void detect(const Mat& image, vector& keypoints,
const Mat& mask=Mat()) const;
void detect(const vector& images,
vector >& keypoints,
const vector& masks=vector()) const;
virtual void read(const FileNode&);
virtual void write(FileStorage&) const;
static Ptr create(const string& detectorType);
protected:...
};
-
-
Field Summary
Fields
Modifier and Type
Field and Description
static int
BRISK
static int
DENSE
static int
DYNAMIC_BRISK
static int
DYNAMIC_DENSE
static int
DYNAMIC_FAST
static int
DYNAMIC_GFTT
static int
DYNAMIC_HARRIS
static int
DYNAMIC_MSER
static int
DYNAMIC_ORB
static int
DYNAMIC_SIFT
static int
DYNAMIC_SIMPLEBLOB
static int
DYNAMIC_STAR
static int
DYNAMIC_SURF
static int
FAST
static int
GFTT
static int
GRID_BRISK
static int
GRID_DENSE
static int
GRID_FAST
static int
GRID_GFTT
static int
GRID_HARRIS
static int
GRID_MSER
static int
GRID_ORB
static int
GRID_SIFT
static int
GRID_SIMPLEBLOB
static int
GRID_STAR
static int
GRID_SURF
static int
GRIDRETECTOR
static int
HARRIS
static int
MSER
static int
ORB
static int
PYRAMID_BRISK
static int
PYRAMID_DENSE
static int
PYRAMID_FAST
static int
PYRAMID_GFTT
static int
PYRAMID_HARRIS
static int
PYRAMID_MSER
static int
PYRAMID_ORB
static int
PYRAMID_SIFT
static int
PYRAMID_SIMPLEBLOB
static int
PYRAMID_STAR
static int
PYRAMID_SURF
static int
SIFT
static int
SIMPLEBLOB
static int
STAR
static int
SURF
-
Method Summary
Methods
Modifier and Type
Method and Description
static FeatureDetector
create(int detectorType)
Creates a feature detector by its name.
void
detect(java.util.List<Mat> images,
java.util.List<MatOfKeyPoint> keypoints)
Detects keypoints in an image (first variant) or image set (second variant).
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).
void
detect(Mat image,
MatOfKeyPoint keypoints)
Detects keypoints in an image (first variant) or image set (second variant).
void
detect(Mat image,
MatOfKeyPoint keypoints,
Mat mask)
Detects keypoints in an image (first variant) or image set (second variant).
boolean
empty()
void
read(java.lang.String fileName)
void
write(java.lang.String fileName)
-
-
Field Detail
-
BRISK
public static final int BRISK
- See Also:
- Constant Field Values
-
DENSE
public static final int DENSE
- See Also:
- Constant Field Values
-
DYNAMIC_BRISK
public static final int DYNAMIC_BRISK
- See Also:
- Constant Field Values
-
DYNAMIC_DENSE
public static final int DYNAMIC_DENSE
- See Also:
- Constant Field Values
-
DYNAMIC_FAST
public static final int DYNAMIC_FAST
- See Also:
- Constant Field Values
-
DYNAMIC_GFTT
public static final int DYNAMIC_GFTT
- See Also:
- Constant Field Values
-
DYNAMIC_HARRIS
public static final int DYNAMIC_HARRIS
- See Also:
- Constant Field Values
-
DYNAMIC_MSER
public static final int DYNAMIC_MSER
- See Also:
- Constant Field Values
-
DYNAMIC_ORB
public static final int DYNAMIC_ORB
- See Also:
- Constant Field Values
-
DYNAMIC_SIFT
public static final int DYNAMIC_SIFT
- See Also:
- Constant Field Values
-
DYNAMIC_SIMPLEBLOB
public static final int DYNAMIC_SIMPLEBLOB
- See Also:
- Constant Field Values
-
DYNAMIC_STAR
public static final int DYNAMIC_STAR
- See Also:
- Constant Field Values
-
DYNAMIC_SURF
public static final int DYNAMIC_SURF
- See Also:
- Constant Field Values
-
FAST
public static final int FAST
- See Also:
- Constant Field Values
-
GFTT
public static final int GFTT
- See Also:
- Constant Field Values
-
GRID_BRISK
public static final int GRID_BRISK
- See Also:
- Constant Field Values
-
GRID_DENSE
public static final int GRID_DENSE
- See Also:
- Constant Field Values
-
GRID_FAST
public static final int GRID_FAST
- See Also:
- Constant Field Values
-
GRID_GFTT
public static final int GRID_GFTT
- See Also:
- Constant Field Values
-
GRID_HARRIS
public static final int GRID_HARRIS
- See Also:
- Constant Field Values
-
GRID_MSER
public static final int GRID_MSER
- See Also:
- Constant Field Values
-
GRID_ORB
public static final int GRID_ORB
- See Also:
- Constant Field Values
-
GRID_SIFT
public static final int GRID_SIFT
- See Also:
- Constant Field Values
-
GRID_SIMPLEBLOB
public static final int GRID_SIMPLEBLOB
- See Also:
- Constant Field Values
-
GRID_STAR
public static final int GRID_STAR
- See Also:
- Constant Field Values
-
GRID_SURF
public static final int GRID_SURF
- See Also:
- Constant Field Values
-
GRIDRETECTOR
public static final int GRIDRETECTOR
- See Also:
- Constant Field Values
-
HARRIS
public static final int HARRIS
- See Also:
- Constant Field Values
-
MSER
public static final int MSER
- See Also:
- Constant Field Values
-
ORB
public static final int ORB
- See Also:
- Constant Field Values
-
PYRAMID_BRISK
public static final int PYRAMID_BRISK
- See Also:
- Constant Field Values
-
PYRAMID_DENSE
public static final int PYRAMID_DENSE
- See Also:
- Constant Field Values
-
PYRAMID_FAST
public static final int PYRAMID_FAST
- See Also:
- Constant Field Values
-
PYRAMID_GFTT
public static final int PYRAMID_GFTT
- See Also:
- Constant Field Values
-
PYRAMID_HARRIS
public static final int PYRAMID_HARRIS
- See Also:
- Constant Field Values
-
PYRAMID_MSER
public static final int PYRAMID_MSER
- See Also:
- Constant Field Values
-
PYRAMID_ORB
public static final int PYRAMID_ORB
- See Also:
- Constant Field Values
-
PYRAMID_SIFT
public static final int PYRAMID_SIFT
- See Also:
- Constant Field Values
-
PYRAMID_SIMPLEBLOB
public static final int PYRAMID_SIMPLEBLOB
- See Also:
- Constant Field Values
-
PYRAMID_STAR
public static final int PYRAMID_STAR
- See Also:
- Constant Field Values
-
PYRAMID_SURF
public static final int PYRAMID_SURF
- See Also:
- Constant Field Values
-
SIFT
public static final int SIFT
- See Also:
- Constant Field Values
-
SIMPLEBLOB
public static final int SIMPLEBLOB
- See Also:
- Constant Field Values
-
STAR
public static final int STAR
- See Also:
- Constant Field Values
-
SURF
public static final int SURF
- See Also:
- Constant Field Values
-
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"
.
- 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)