Struct opencv::features2d::AKAZE
source · pub struct AKAZE { /* private fields */ }
Expand description
Class implementing the AKAZE keypoint detector and descriptor extractor, described in ANB13.
@details AKAZE descriptors can only be used with KAZE or AKAZE keypoints. This class is thread-safe.
Note: When you need descriptors use Feature2D::detectAndCompute, which provides better performance. When using Feature2D::detect followed by Feature2D::compute scale space pyramid is computed twice.
Note: AKAZE implements T-API. When image is passed as UMat some parts of the algorithm will use OpenCL.
Note: [ANB13] Fast Explicit Diffusion for Accelerated Features in Nonlinear Scale Spaces. Pablo F. Alcantarilla, Jesús Nuevo and Adrien Bartoli. In British Machine Vision Conference (BMVC), Bristol, UK, September 2013.
Implementations§
source§impl AKAZE
impl AKAZE
sourcepub fn create(
descriptor_type: AKAZE_DescriptorType,
descriptor_size: i32,
descriptor_channels: i32,
threshold: f32,
n_octaves: i32,
n_octave_layers: i32,
diffusivity: KAZE_DiffusivityType,
max_points: i32
) -> Result<Ptr<AKAZE>>
pub fn create( descriptor_type: AKAZE_DescriptorType, descriptor_size: i32, descriptor_channels: i32, threshold: f32, n_octaves: i32, n_octave_layers: i32, diffusivity: KAZE_DiffusivityType, max_points: i32 ) -> Result<Ptr<AKAZE>>
The AKAZE constructor
§Parameters
- descriptor_type: Type of the extracted descriptor: DESCRIPTOR_KAZE, DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.
- descriptor_size: Size of the descriptor in bits. 0 -> Full size
- descriptor_channels: Number of channels in the descriptor (1, 2, 3)
- threshold: Detector response threshold to accept point
- nOctaves: Maximum octave evolution of the image
- nOctaveLayers: Default number of sublevels per scale level
- diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or DIFF_CHARBONNIER
- max_points: Maximum amount of returned points. In case if image contains more features, then the features with highest response are returned. Negative value means no limitation.
§C++ default parameters
- descriptor_type: AKAZE::DESCRIPTOR_MLDB
- descriptor_size: 0
- descriptor_channels: 3
- threshold: 0.001f
- n_octaves: 4
- n_octave_layers: 4
- diffusivity: KAZE::DIFF_PM_G2
- max_points: -1
sourcepub fn create_def() -> Result<Ptr<AKAZE>>
pub fn create_def() -> Result<Ptr<AKAZE>>
The AKAZE constructor
§Parameters
- descriptor_type: Type of the extracted descriptor: DESCRIPTOR_KAZE, DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.
- descriptor_size: Size of the descriptor in bits. 0 -> Full size
- descriptor_channels: Number of channels in the descriptor (1, 2, 3)
- threshold: Detector response threshold to accept point
- nOctaves: Maximum octave evolution of the image
- nOctaveLayers: Default number of sublevels per scale level
- diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or DIFF_CHARBONNIER
- max_points: Maximum amount of returned points. In case if image contains more features, then the features with highest response are returned. Negative value means no limitation.
§Note
This alternative version of AKAZE::create function uses the following default values for its arguments:
- descriptor_type: AKAZE::DESCRIPTOR_MLDB
- descriptor_size: 0
- descriptor_channels: 3
- threshold: 0.001f
- n_octaves: 4
- n_octave_layers: 4
- diffusivity: KAZE::DIFF_PM_G2
- max_points: -1
Trait Implementations§
source§impl AKAZETrait for AKAZE
impl AKAZETrait for AKAZE
fn as_raw_mut_AKAZE(&mut self) -> *mut c_void
fn set_descriptor_type(&mut self, dtype: AKAZE_DescriptorType) -> Result<()>
fn set_descriptor_size(&mut self, dsize: i32) -> Result<()>
fn set_descriptor_channels(&mut self, dch: i32) -> Result<()>
fn set_threshold(&mut self, threshold: f64) -> Result<()>
fn set_n_octaves(&mut self, octaves: i32) -> Result<()>
fn set_n_octave_layers(&mut self, octave_layers: i32) -> Result<()>
fn set_diffusivity(&mut self, diff: KAZE_DiffusivityType) -> Result<()>
fn set_max_points(&mut self, max_points: i32) -> Result<()>
source§impl AKAZETraitConst for AKAZE
impl AKAZETraitConst for AKAZE
fn as_raw_AKAZE(&self) -> *const c_void
fn get_descriptor_type(&self) -> Result<AKAZE_DescriptorType>
fn get_descriptor_size(&self) -> Result<i32>
fn get_descriptor_channels(&self) -> Result<i32>
fn get_threshold(&self) -> Result<f64>
fn get_n_octaves(&self) -> Result<i32>
fn get_n_octave_layers(&self) -> Result<i32>
fn get_diffusivity(&self) -> Result<KAZE_DiffusivityType>
fn get_default_name(&self) -> Result<String>
fn get_max_points(&self) -> Result<i32>
source§impl AlgorithmTrait for AKAZE
impl AlgorithmTrait for AKAZE
source§impl AlgorithmTraitConst for AKAZE
impl AlgorithmTraitConst for AKAZE
fn as_raw_Algorithm(&self) -> *const c_void
source§fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>
fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>
source§fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>
fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>
source§fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
source§fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>
fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>
§Note
source§fn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
source§fn save(&self, filename: &str) -> Result<()>
fn save(&self, filename: &str) -> Result<()>
source§fn get_default_name(&self) -> Result<String>
fn get_default_name(&self) -> Result<String>
source§impl Boxed for AKAZE
impl Boxed for AKAZE
source§unsafe fn from_raw(ptr: <AKAZE as OpenCVFromExtern>::ExternReceive) -> Self
unsafe fn from_raw(ptr: <AKAZE as OpenCVFromExtern>::ExternReceive) -> Self
source§fn into_raw(self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw(self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSendMut
source§fn as_raw(&self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSend
source§fn as_raw_mut(&mut self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut(&mut self) -> <AKAZE as OpenCVTypeExternContainer>::ExternSendMut
source§impl Feature2DTrait for AKAZE
impl Feature2DTrait for AKAZE
fn as_raw_mut_Feature2D(&mut self) -> *mut c_void
source§fn 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<()>
source§fn 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<()>
source§fn 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<()>
source§fn 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<()>
source§fn 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<()>
source§fn 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<()>
source§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( &mut self, image: &impl ToInputArray, mask: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl ToOutputArray, use_provided_keypoints: bool ) -> Result<()>
source§fn 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<()>
fn read(&mut self, file_name: &str) -> Result<()>
fn read_from_node(&mut self, unnamed: &impl FileNodeTraitConst) -> Result<()>
source§impl Feature2DTraitConst for AKAZE
impl Feature2DTraitConst for AKAZE
fn as_raw_Feature2D(&self) -> *const c_void
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 write_to_storage(&self, unnamed: &mut impl FileStorageTrait) -> Result<()>
fn get_default_name(&self) -> Result<String>
fn write_to_storage_with_name( &self, fs: &mut impl FileStorageTrait, name: &str ) -> Result<()>
fn write_to_storage_ptr_with_name( &self, fs: &Ptr<FileStorage>, name: &str ) -> Result<()>
impl Send for AKAZE
Auto Trait Implementations§
impl Freeze for AKAZE
impl RefUnwindSafe for AKAZE
impl !Sync for AKAZE
impl Unpin for AKAZE
impl UnwindSafe for AKAZE
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance
sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold
. Read more