[][src]Struct opencv::features2d::FlannBasedMatcher

pub struct FlannBasedMatcher { /* fields omitted */ }

Flann-based descriptor matcher.

This matcher trains cv::flann::Index on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. FlannBasedMatcher does not support masking permissible matches of descriptor sets because flann::Index does not support this. :

Methods

impl FlannBasedMatcher[src]

pub fn as_raw_FlannBasedMatcher(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl FlannBasedMatcher[src]

pub fn add(&mut self, descriptors: &VectorOfMat) -> Result<()>[src]

pub fn clear(&mut self) -> Result<()>[src]

pub fn train(&mut self) -> Result<()>[src]

pub fn is_mask_supported(&self) -> Result<bool>[src]

pub fn create() -> Result<PtrOfFlannBasedMatcher>[src]

pub fn clone(&self, empty_train_data: bool) -> Result<PtrOfDescriptorMatcher>[src]

C++ default parameters

  • empty_train_data: false

Trait Implementations

impl Algorithm for FlannBasedMatcher[src]

fn clear(&mut self) -> Result<()>[src]

Clears the algorithm state

fn empty(&self) -> Result<bool>[src]

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

fn save(&self, filename: &str) -> Result<()>[src]

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more

fn get_default_name(&self) -> Result<String>[src]

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string. Read more

impl DescriptorMatcher for FlannBasedMatcher[src]

fn add(&mut self, descriptors: &VectorOfMat) -> Result<()>[src]

Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor collection. Read more

fn get_train_descriptors(&self) -> Result<VectorOfMat>[src]

Returns a constant link to the train descriptor collection trainDescCollection .

fn clear(&mut self) -> Result<()>[src]

Clears the train descriptor collections.

fn empty(&self) -> Result<bool>[src]

Returns true if there are no train descriptors in the both collections.

fn is_mask_supported(&self) -> Result<bool>[src]

Returns true if the descriptor matcher supports masking permissible matches.

fn train(&mut self) -> Result<()>[src]

Trains a descriptor matcher Read more

fn train_matches(
    &self,
    query_descriptors: &Mat,
    train_descriptors: &Mat,
    matches: &mut VectorOfDMatch,
    mask: &Mat
) -> Result<()>
[src]

Finds the best match for each descriptor from a query set. Read more

fn knn_train_matches(
    &self,
    query_descriptors: &Mat,
    train_descriptors: &Mat,
    matches: &mut VectorOfVectorOfDMatch,
    k: i32,
    mask: &Mat,
    compact_result: bool
) -> Result<()>
[src]

Finds the k best matches for each descriptor from a query set. Read more

fn train_radius_matches(
    &self,
    query_descriptors: &Mat,
    train_descriptors: &Mat,
    matches: &mut VectorOfVectorOfDMatch,
    max_distance: f32,
    mask: &Mat,
    compact_result: bool
) -> Result<()>
[src]

For each query descriptor, finds the training descriptors not farther than the specified distance. Read more

fn matches(
    &mut self,
    query_descriptors: &Mat,
    matches: &mut VectorOfDMatch,
    masks: &VectorOfMat
) -> Result<()>
[src]

Parameters * queryDescriptors: Query set of descriptors. * matches: Matches. If a query descriptor is masked out in mask , no match is added for this descriptor. So, matches size may be smaller than the query descriptors count. * masks: Set of masks. Each masks[i] specifies permissible matches between the input query descriptors and stored train descriptors from the i-th image trainDescCollection[i]. Read more

fn knn_matches(
    &mut self,
    query_descriptors: &Mat,
    matches: &mut VectorOfVectorOfDMatch,
    k: i32,
    masks: &VectorOfMat,
    compact_result: bool
) -> Result<()>
[src]

Parameters * queryDescriptors: Query set of descriptors. * matches: Matches. Each matches[i] is k or less matches for the same query descriptor. * k: Count of best matches found per each query descriptor or less if a query descriptor has less than k possible matches in total. * masks: Set of masks. Each masks[i] specifies permissible matches between the input query descriptors and stored train descriptors from the i-th image trainDescCollection[i]. * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the matches vector does not contain matches for fully masked-out query descriptors. Read more

fn radius_matches(
    &mut self,
    query_descriptors: &Mat,
    matches: &mut VectorOfVectorOfDMatch,
    max_distance: f32,
    masks: &VectorOfMat,
    compact_result: bool
) -> Result<()>
[src]

Parameters * queryDescriptors: Query set of descriptors. * matches: Found matches. * maxDistance: Threshold for the distance between matched descriptors. Distance means here metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in Pixels)! * masks: Set of masks. Each masks[i] specifies permissible matches between the input query descriptors and stored train descriptors from the i-th image trainDescCollection[i]. * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the matches vector does not contain matches for fully masked-out query descriptors. Read more

fn write(&self, file_name: &str) -> Result<()>[src]

fn read(&mut self, file_name: &str) -> Result<()>[src]

fn clone(&self, empty_train_data: bool) -> Result<PtrOfDescriptorMatcher>[src]

Clones the matcher. Read more

impl Send for FlannBasedMatcher[src]

impl Drop for FlannBasedMatcher[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]