pub struct Detail_AffineBestOf2NearestMatcher { /* private fields */ }
Expand description
Features matcher similar to cv::detail::BestOf2NearestMatcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold match_conf.
Unlike cv::detail::BestOf2NearestMatcher this matcher uses affine transformation (affine transformation estimate will be placed in matches_info).
§See also
cv::detail::FeaturesMatcher cv::detail::BestOf2NearestMatcher
Implementations§
Source§impl Detail_AffineBestOf2NearestMatcher
impl Detail_AffineBestOf2NearestMatcher
Sourcepub fn new(
full_affine: bool,
try_use_gpu: bool,
match_conf: f32,
num_matches_thresh1: i32,
) -> Result<Detail_AffineBestOf2NearestMatcher>
pub fn new( full_affine: bool, try_use_gpu: bool, match_conf: f32, num_matches_thresh1: i32, ) -> Result<Detail_AffineBestOf2NearestMatcher>
Constructs a “best of 2 nearest” matcher that expects affine transformation between images
§Parameters
- full_affine: whether to use full affine transformation with 6 degress of freedom or reduced transformation with 4 degrees of freedom using only rotation, translation and uniform scaling
- try_use_gpu: Should try to use GPU or not
- match_conf: Match distances ration threshold
- num_matches_thresh1: Minimum number of matches required for the 2D affine transform estimation used in the inliers classification step
§See also
cv::estimateAffine2D cv::estimateAffinePartial2D
§C++ default parameters
- full_affine: false
- try_use_gpu: false
- match_conf: 0.3f
- num_matches_thresh1: 6
Sourcepub fn new_def() -> Result<Detail_AffineBestOf2NearestMatcher>
pub fn new_def() -> Result<Detail_AffineBestOf2NearestMatcher>
Constructs a “best of 2 nearest” matcher that expects affine transformation between images
§Parameters
- full_affine: whether to use full affine transformation with 6 degress of freedom or reduced transformation with 4 degrees of freedom using only rotation, translation and uniform scaling
- try_use_gpu: Should try to use GPU or not
- match_conf: Match distances ration threshold
- num_matches_thresh1: Minimum number of matches required for the 2D affine transform estimation used in the inliers classification step
§See also
cv::estimateAffine2D cv::estimateAffinePartial2D
§Note
This alternative version of [new] function uses the following default values for its arguments:
- full_affine: false
- try_use_gpu: false
- match_conf: 0.3f
- num_matches_thresh1: 6
Trait Implementations§
Source§impl Boxed for Detail_AffineBestOf2NearestMatcher
impl Boxed for Detail_AffineBestOf2NearestMatcher
Source§unsafe fn from_raw(
ptr: <Detail_AffineBestOf2NearestMatcher as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <Detail_AffineBestOf2NearestMatcher as OpenCVFromExtern>::ExternReceive, ) -> Self
Source§fn into_raw(
self,
) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSendMut
Source§fn as_raw(
&self,
) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSend
fn as_raw( &self, ) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSend
Source§fn as_raw_mut(
&mut self,
) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <Detail_AffineBestOf2NearestMatcher as OpenCVTypeExternContainer>::ExternSendMut
Source§impl Detail_AffineBestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher
impl Detail_AffineBestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher
fn as_raw_mut_Detail_AffineBestOf2NearestMatcher(&mut self) -> *mut c_void
Source§impl Detail_AffineBestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher
impl Detail_AffineBestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher
fn as_raw_Detail_AffineBestOf2NearestMatcher(&self) -> *const c_void
Source§impl Detail_BestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher
impl Detail_BestOf2NearestMatcherTrait for Detail_AffineBestOf2NearestMatcher
fn as_raw_mut_Detail_BestOf2NearestMatcher(&mut self) -> *mut c_void
fn collect_garbage(&mut self) -> Result<()>
Source§impl Detail_BestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher
impl Detail_BestOf2NearestMatcherTraitConst for Detail_AffineBestOf2NearestMatcher
fn as_raw_Detail_BestOf2NearestMatcher(&self) -> *const c_void
Source§impl Detail_FeaturesMatcherTrait for Detail_AffineBestOf2NearestMatcher
impl Detail_FeaturesMatcherTrait for Detail_AffineBestOf2NearestMatcher
fn as_raw_mut_Detail_FeaturesMatcher(&mut self) -> *mut c_void
Source§fn apply(
&mut self,
features1: &impl Detail_ImageFeaturesTraitConst,
features2: &impl Detail_ImageFeaturesTraitConst,
matches_info: &mut impl Detail_MatchesInfoTrait,
) -> Result<()>
fn apply( &mut self, features1: &impl Detail_ImageFeaturesTraitConst, features2: &impl Detail_ImageFeaturesTraitConst, matches_info: &mut impl Detail_MatchesInfoTrait, ) -> Result<()>
Source§fn apply2(
&mut self,
features: &Vector<Detail_ImageFeatures>,
pairwise_matches: &mut Vector<Detail_MatchesInfo>,
mask: &impl UMatTraitConst,
) -> Result<()>
fn apply2( &mut self, features: &Vector<Detail_ImageFeatures>, pairwise_matches: &mut Vector<Detail_MatchesInfo>, mask: &impl UMatTraitConst, ) -> Result<()>
Source§fn apply2_def(
&mut self,
features: &Vector<Detail_ImageFeatures>,
pairwise_matches: &mut Vector<Detail_MatchesInfo>,
) -> Result<()>
fn apply2_def( &mut self, features: &Vector<Detail_ImageFeatures>, pairwise_matches: &mut Vector<Detail_MatchesInfo>, ) -> Result<()>
Source§fn collect_garbage(&mut self) -> Result<()>
fn collect_garbage(&mut self) -> Result<()>
Source§impl From<Detail_AffineBestOf2NearestMatcher> for Detail_BestOf2NearestMatcher
impl From<Detail_AffineBestOf2NearestMatcher> for Detail_BestOf2NearestMatcher
Source§fn from(s: Detail_AffineBestOf2NearestMatcher) -> Self
fn from(s: Detail_AffineBestOf2NearestMatcher) -> Self
Source§impl From<Detail_AffineBestOf2NearestMatcher> for Detail_FeaturesMatcher
impl From<Detail_AffineBestOf2NearestMatcher> for Detail_FeaturesMatcher
Source§fn from(s: Detail_AffineBestOf2NearestMatcher) -> Self
fn from(s: Detail_AffineBestOf2NearestMatcher) -> Self
impl Send for Detail_AffineBestOf2NearestMatcher
Auto Trait Implementations§
impl Freeze for Detail_AffineBestOf2NearestMatcher
impl RefUnwindSafe for Detail_AffineBestOf2NearestMatcher
impl !Sync for Detail_AffineBestOf2NearestMatcher
impl Unpin for Detail_AffineBestOf2NearestMatcher
impl UnwindSafe for Detail_AffineBestOf2NearestMatcher
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