pub struct MSDDetector { /* private fields */ }
Expand description
Class implementing the MSD (Maximal Self-Dissimilarity) keypoint detector, described in Tombari14.
The algorithm implements a novel interest point detector stemming from the intuition that image patches which are highly dissimilar over a relatively large extent of their surroundings hold the property of being repeatable and distinctive. This concept of “contextual self-dissimilarity” reverses the key paradigm of recent successful techniques such as the Local Self-Similarity descriptor and the Non-Local Means filter, which build upon the presence of similar - rather than dissimilar - patches. Moreover, it extends to contextual information the local self-dissimilarity notion embedded in established detectors of corner-like interest points, thereby achieving enhanced repeatability, distinctiveness and localization accuracy.
Implementations§
Source§impl MSDDetector
impl MSDDetector
Sourcepub fn create(
m_patch_radius: i32,
m_search_area_radius: i32,
m_nms_radius: i32,
m_nms_scale_radius: i32,
m_th_saliency: f32,
m_k_nn: i32,
m_scale_factor: f32,
m_n_scales: i32,
m_compute_orientation: bool,
) -> Result<Ptr<MSDDetector>>
pub fn create( m_patch_radius: i32, m_search_area_radius: i32, m_nms_radius: i32, m_nms_scale_radius: i32, m_th_saliency: f32, m_k_nn: i32, m_scale_factor: f32, m_n_scales: i32, m_compute_orientation: bool, ) -> Result<Ptr<MSDDetector>>
§C++ default parameters
- m_patch_radius: 3
- m_search_area_radius: 5
- m_nms_radius: 5
- m_nms_scale_radius: 0
- m_th_saliency: 250.0f
- m_k_nn: 4
- m_scale_factor: 1.25f
- m_n_scales: -1
- m_compute_orientation: false
Sourcepub fn create_def() -> Result<Ptr<MSDDetector>>
pub fn create_def() -> Result<Ptr<MSDDetector>>
§Note
This alternative version of MSDDetector::create function uses the following default values for its arguments:
- m_patch_radius: 3
- m_search_area_radius: 5
- m_nms_radius: 5
- m_nms_scale_radius: 0
- m_th_saliency: 250.0f
- m_k_nn: 4
- m_scale_factor: 1.25f
- m_n_scales: -1
- m_compute_orientation: false
Trait Implementations§
Source§impl AlgorithmTrait for MSDDetector
impl AlgorithmTrait for MSDDetector
Source§impl AlgorithmTraitConst for MSDDetector
impl AlgorithmTraitConst for MSDDetector
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 MSDDetector
impl Boxed for MSDDetector
Source§unsafe fn from_raw(
ptr: <MSDDetector as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <MSDDetector as OpenCVFromExtern>::ExternReceive, ) -> Self
Source§fn into_raw(self) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw(self) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSendMut
Source§fn as_raw(&self) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSend
Source§fn as_raw_mut(
&mut self,
) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <MSDDetector as OpenCVTypeExternContainer>::ExternSendMut
Source§impl Debug for MSDDetector
impl Debug for MSDDetector
Source§impl Drop for MSDDetector
impl Drop for MSDDetector
Source§impl Feature2DTrait for MSDDetector
impl Feature2DTrait for MSDDetector
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 MSDDetector
impl Feature2DTraitConst for MSDDetector
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<()>
Source§impl From<MSDDetector> for Algorithm
impl From<MSDDetector> for Algorithm
Source§fn from(s: MSDDetector) -> Self
fn from(s: MSDDetector) -> Self
Source§impl From<MSDDetector> for Feature2D
impl From<MSDDetector> for Feature2D
Source§fn from(s: MSDDetector) -> Self
fn from(s: MSDDetector) -> Self
Source§impl MSDDetectorTrait for MSDDetector
impl MSDDetectorTrait for MSDDetector
fn as_raw_mut_MSDDetector(&mut self) -> *mut c_void
fn set_patch_radius(&mut self, patch_radius: i32) -> Result<()>
fn set_search_area_radius(&mut self, use_orientation: i32) -> Result<()>
fn set_nms_radius(&mut self, nms_radius: i32) -> Result<()>
fn set_nms_scale_radius(&mut self, nms_scale_radius: i32) -> Result<()>
fn set_th_saliency(&mut self, th_saliency: f32) -> Result<()>
fn set_knn(&mut self, k_nn: i32) -> Result<()>
fn set_scale_factor(&mut self, scale_factor: f32) -> Result<()>
fn set_n_scales(&mut self, use_orientation: i32) -> Result<()>
fn set_compute_orientation(&mut self, compute_orientation: bool) -> Result<()>
Source§impl MSDDetectorTraitConst for MSDDetector
impl MSDDetectorTraitConst for MSDDetector
fn as_raw_MSDDetector(&self) -> *const c_void
fn get_patch_radius(&self) -> Result<i32>
fn get_search_area_radius(&self) -> Result<i32>
fn get_nms_radius(&self) -> Result<i32>
fn get_nms_scale_radius(&self) -> Result<i32>
fn get_th_saliency(&self) -> Result<f32>
fn get_knn(&self) -> Result<i32>
fn get_scale_factor(&self) -> Result<f32>
fn get_n_scales(&self) -> Result<i32>
fn get_compute_orientation(&self) -> Result<bool>
fn get_default_name(&self) -> Result<String>
impl Send for MSDDetector
Auto Trait Implementations§
impl Freeze for MSDDetector
impl RefUnwindSafe for MSDDetector
impl !Sync for MSDDetector
impl Unpin for MSDDetector
impl UnwindSafe for MSDDetector
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 unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more