struct cvflann::HammingLUT

Overview

Hamming distance functor - counts the bit differences between two strings - useful for the Brief descriptor bit count of A exclusive XOR’ed with B More…

#include <dist.h>

struct HammingLUT
{
    // typedefs

    typedef unsigned char ElementType;
    typedef False is_kdtree_distance;
    typedef False is_vector_space_distance;
    typedef int ResultType;

    // methods

    ResultType
    operator()(
        const unsigned char* a,
        const unsigned char* b,
        size_t size
        ) const;
};

Detailed Documentation

Hamming distance functor - counts the bit differences between two strings - useful for the Brief descriptor bit count of A exclusive XOR’ed with B

Methods

ResultType
operator()(
    const unsigned char* a,
    const unsigned char* b,
    size_t size
    ) const

this will count the bits in a ^ b