[−][src]Struct opencv::features2d::BOWImgDescriptorExtractor
Class to compute an image descriptor using the bag of visual words.
Such a computation consists of the following steps:
- Compute descriptors for a given image and its keypoints set.
- Find the nearest visual words from the vocabulary for each keypoint descriptor.
- Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the vocabulary in the given image.
Implementations
impl BOWImgDescriptorExtractor
[src]
pub fn as_raw_BOWImgDescriptorExtractor(&self) -> *const c_void
[src]
pub fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void
[src]
impl BOWImgDescriptorExtractor
[src]
pub fn new(
dextractor: &Ptr<Feature2D>,
dmatcher: &Ptr<dyn DescriptorMatcher>
) -> Result<BOWImgDescriptorExtractor>
[src]
dextractor: &Ptr<Feature2D>,
dmatcher: &Ptr<dyn DescriptorMatcher>
) -> Result<BOWImgDescriptorExtractor>
The constructor.
Parameters
- dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
- dmatcher: Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image.
pub fn new_1(
dmatcher: &Ptr<dyn DescriptorMatcher>
) -> Result<BOWImgDescriptorExtractor>
[src]
dmatcher: &Ptr<dyn DescriptorMatcher>
) -> Result<BOWImgDescriptorExtractor>
The constructor.
Parameters
- dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
- dmatcher: Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image.
Overloaded parameters
Trait Implementations
impl BOWImgDescriptorExtractorTrait for BOWImgDescriptorExtractor
[src]
fn as_raw_BOWImgDescriptorExtractor(&self) -> *const c_void
[src]
fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void
[src]
fn set_vocabulary(&mut self, vocabulary: &Mat) -> Result<()>
[src]
fn get_vocabulary(&self) -> Result<Mat>
[src]
fn compute_desc(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut dyn ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>,
descriptors: &mut Mat
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut dyn ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>,
descriptors: &mut Mat
) -> Result<()>
fn compute(
&mut self,
keypoint_descriptors: &dyn ToInputArray,
img_descriptor: &mut dyn ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>
) -> Result<()>
[src]
&mut self,
keypoint_descriptors: &dyn ToInputArray,
img_descriptor: &mut dyn ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>
) -> Result<()>
fn compute2(
&mut self,
image: &Mat,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut Mat
) -> Result<()>
[src]
&mut self,
image: &Mat,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut Mat
) -> Result<()>
fn descriptor_size(&self) -> Result<i32>
[src]
fn descriptor_type(&self) -> Result<i32>
[src]
impl Boxed for BOWImgDescriptorExtractor
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for BOWImgDescriptorExtractor
[src]
impl Send for BOWImgDescriptorExtractor
[src]
Auto Trait Implementations
impl RefUnwindSafe for BOWImgDescriptorExtractor
impl !Sync for BOWImgDescriptorExtractor
impl Unpin for BOWImgDescriptorExtractor
impl UnwindSafe for BOWImgDescriptorExtractor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,