[][src]Struct opencv::line_descriptor::BinaryDescriptorMatcher

pub struct BinaryDescriptorMatcher { /* fields omitted */ }

furnishes all functionalities for querying a dataset provided by user or internal to class (that user must, anyway, populate) on the model of @ref features2d_match

Once descriptors have been extracted from an image (both they represent lines and points), it becomes interesting to be able to match a descriptor with another one extracted from a different image and representing the same line or point, seen from a differente perspective or on a different scale. In reaching such goal, the main headache is designing an efficient search algorithm to associate a query descriptor to one extracted from a dataset. In the following, a matching modality based on Multi-Index Hashing (MiHashing) will be described.

Multi-Index Hashing

The theory described in this section is based on MIH . Given a dataset populated with binary codes, each code is indexed m times into m different hash tables, according to m substrings it has been divided into. Thus, given a query code, all the entries close to it at least in one substring are returned by search as neighbor candidates. Returned entries are then checked for validity by verifying that their full codes are not distant (in Hamming space) more than r bits from query code. In details, each binary code h composed of b bits is divided into m disjoint substrings inline formula, each with length inline formula or inline formula bits. Formally, when two codes h and g differ by at the most r bits, in at the least one of their m substrings they differ by at the most inline formula bits. In particular, when inline formula (where inline formula is the Hamming norm), there must exist a substring k (with inline formula) such that

block formula

That means that if Hamming distance between each of the m substring is strictly greater than inline formula, then inline formula must be larger that r and that is a contradiction. If the codes in dataset are divided into m substrings, then m tables will be built. Given a query q with substrings inline formula, i-th hash table is searched for entries distant at the most inline formula from inline formula and a set of candidates inline formula is obtained. The union of sets inline formula is a superset of the r-neighbors of q. Then, last step of algorithm is computing the Hamming distance between q and each element in inline formula, deleting the codes that are distant more that r from q.

Implementations

impl BinaryDescriptorMatcher[src]

impl BinaryDescriptorMatcher[src]

pub fn create_binary_descriptor_matcher(
) -> Result<Ptr<BinaryDescriptorMatcher>>
[src]

Create a BinaryDescriptorMatcher object and return a smart pointer to it.

pub fn default() -> Result<BinaryDescriptorMatcher>[src]

Constructor.

The BinaryDescriptorMatcher constructed is able to store and manage 256-bits long entries.

Trait Implementations

impl AlgorithmTrait for BinaryDescriptorMatcher[src]

impl BinaryDescriptorMatcherTrait for BinaryDescriptorMatcher[src]

impl Boxed for BinaryDescriptorMatcher[src]

impl Drop for BinaryDescriptorMatcher[src]

impl Send for BinaryDescriptorMatcher[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.