pub trait Feature2DTrait: AlgorithmTrait + Feature2DTraitConst {
// Required method
fn as_raw_mut_Feature2D(&mut self) -> *mut c_void;
// Provided methods
fn detect(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &impl ToInputArray,
) -> Result<()> { ... }
fn detect_def(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
) -> Result<()> { ... }
fn detect_multiple(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &impl ToInputArray,
) -> Result<()> { ... }
fn detect_multiple_def(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
) -> Result<()> { ... }
fn compute(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn compute_multiple(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn detect_and_compute(
&mut self,
image: &impl ToInputArray,
mask: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
use_provided_keypoints: bool,
) -> Result<()> { ... }
fn detect_and_compute_def(
&mut self,
image: &impl ToInputArray,
mask: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn read(&mut self, file_name: &str) -> Result<()> { ... }
fn read_from_node(
&mut self,
unnamed: &impl FileNodeTraitConst,
) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::features2d::Feature2D
Required Methods§
fn as_raw_mut_Feature2D(&mut self) -> *mut c_void
Provided Methods§
Sourcefn detect(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &impl ToInputArray,
) -> Result<()>
fn detect( &mut self, image: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, mask: &impl ToInputArray, ) -> 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()
Sourcefn detect_def(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
) -> Result<()>
fn detect_def( &mut self, image: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, ) -> 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.
§Note
This alternative version of Feature2DTrait::detect function uses the following default values for its arguments:
- mask: noArray()
Sourcefn detect_multiple(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &impl ToInputArray,
) -> Result<()>
fn detect_multiple( &mut self, images: &impl ToInputArray, keypoints: &mut Vector<Vector<KeyPoint>>, masks: &impl ToInputArray, ) -> 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.
§Overloaded 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()
Sourcefn detect_multiple_def(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
) -> Result<()>
fn detect_multiple_def( &mut self, images: &impl ToInputArray, keypoints: &mut Vector<Vector<KeyPoint>>, ) -> 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.
§Overloaded 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].
§Note
This alternative version of Feature2DTrait::detect_multiple function uses the following default values for its arguments:
- masks: noArray()
Sourcefn compute(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
) -> Result<()>
fn compute( &mut self, image: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl ToOutputArray, ) -> 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.
Sourcefn compute_multiple(
&mut self,
images: &impl ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut impl ToOutputArray,
) -> Result<()>
fn compute_multiple( &mut self, images: &impl ToInputArray, keypoints: &mut Vector<Vector<KeyPoint>>, descriptors: &mut impl ToOutputArray, ) -> 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.
§Overloaded 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.
Sourcefn detect_and_compute(
&mut self,
image: &impl ToInputArray,
mask: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
use_provided_keypoints: bool,
) -> Result<()>
fn detect_and_compute( &mut self, image: &impl ToInputArray, mask: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl ToOutputArray, use_provided_keypoints: bool, ) -> Result<()>
Detects keypoints and computes the descriptors
§C++ default parameters
- use_provided_keypoints: false
Sourcefn detect_and_compute_def(
&mut self,
image: &impl ToInputArray,
mask: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl ToOutputArray,
) -> Result<()>
fn detect_and_compute_def( &mut self, image: &impl ToInputArray, mask: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl ToOutputArray, ) -> Result<()>
Detects keypoints and computes the descriptors
§Note
This alternative version of Feature2DTrait::detect_and_compute function uses the following default values for its arguments:
- use_provided_keypoints: false
fn read(&mut self, file_name: &str) -> Result<()>
fn read_from_node(&mut self, unnamed: &impl FileNodeTraitConst) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.