[−][src]Trait opencv::features2d::Feature2D
Abstract base class for 2D image feature detectors and descriptor extractors
Required methods
fn as_raw_Feature2D(&self) -> *mut c_void
Provided methods
fn detect(
&mut self,
image: &Mat,
keypoints: &mut VectorOfKeyPoint,
mask: &Mat
) -> Result<()>
&mut self,
image: &Mat,
keypoints: &mut VectorOfKeyPoint,
mask: &Mat
) -> Result<()>
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.
C++ default parameters
- mask: noArray()
fn detect_multiple(
&mut self,
images: &VectorOfMat,
keypoints: &mut VectorOfVectorOfKeyPoint,
masks: &VectorOfMat
) -> Result<()>
&mut self,
images: &VectorOfMat,
keypoints: &mut VectorOfVectorOfKeyPoint,
masks: &VectorOfMat
) -> Result<()>
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].
C++ default parameters
- masks: noArray()
fn compute(
&mut self,
image: &Mat,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut Mat
) -> Result<()>
&mut self,
image: &Mat,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut Mat
) -> Result<()>
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
Parameters
- image: Image.
- keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).
- descriptors: Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.
fn compute_multiple(
&mut self,
images: &VectorOfMat,
keypoints: &mut VectorOfVectorOfKeyPoint,
descriptors: &mut VectorOfMat
) -> Result<()>
&mut self,
images: &VectorOfMat,
keypoints: &mut VectorOfVectorOfKeyPoint,
descriptors: &mut VectorOfMat
) -> Result<()>
Parameters
- images: Image set.
- keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).
- descriptors: Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.
fn detect_and_compute(
&mut self,
image: &Mat,
mask: &Mat,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut Mat,
use_provided_keypoints: bool
) -> Result<()>
&mut self,
image: &Mat,
mask: &Mat,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut Mat,
use_provided_keypoints: bool
) -> Result<()>
fn descriptor_size(&self) -> Result<i32>
fn descriptor_type(&self) -> Result<i32>
fn default_norm(&self) -> Result<i32>
fn write(&self, file_name: &str) -> Result<()>
fn read(&mut self, file_name: &str) -> Result<()>
fn empty(&self) -> Result<bool>
Return true if detector object is empty