DVision::BRIEF Class Reference

BRIEF descriptor. More...

#include <BRIEF.h>

List of all members.

Public Types

enum  Type { RANDOM, RANDOM_CLOSE }
 

Type of pairs.


typedef boost::dynamic_bitset bitset
 Bitset type.

Public Member Functions

 BRIEF (int nbits=256, int patch_size=48, Type type=RANDOM_CLOSE)
int getDescriptorLengthInBits () const
Type getType () const
int getPatchSize () const
void operator() (const cv::Mat &image, const std::vector< cv::KeyPoint > &points, std::vector< bitset > &descriptors, bool treat_image=true) const
void compute (const cv::Mat &image, const std::vector< cv::KeyPoint > &points, std::vector< bitset > &descriptors, bool treat_image=true) const
void exportPairs (std::vector< int > &x1, std::vector< int > &y1, std::vector< int > &x2, std::vector< int > &y2) const
void importPairs (const std::vector< int > &x1, const std::vector< int > &y1, const std::vector< int > &x2, const std::vector< int > &y2)

Static Public Member Functions

static int distance (const bitset &a, const bitset &b)

Protected Member Functions

void generateTestPoints ()

Protected Attributes

int m_bit_length
 Descriptor length in bits.
int m_patch_size
 Patch size.
Type m_type
 Type of pairs.
std::vector< int > m_x1
 Coordinates of test points relative to the center of the patch.
std::vector< int > m_x2
std::vector< int > m_y1
std::vector< int > m_y2

Detailed Description

BRIEF descriptor.


Constructor & Destructor Documentation

BRIEF::BRIEF ( int  nbits = 256,
int  patch_size = 48,
Type  type = RANDOM_CLOSE 
)

Creates the BRIEF a priori data for descriptors of nbits length

Parameters:
nbits descriptor length in bits
patch_size 
type type of pairs to generate

Member Function Documentation

void DVision::BRIEF::compute ( const cv::Mat &  image,
const std::vector< cv::KeyPoint > &  points,
std::vector< bitset > &  descriptors,
bool  treat_image = true 
) const

Returns the BRIEF descriptors of the given keypoints in the given image

Parameters:
image 
points 
descriptors 
treat_image (default: true) if true, the image is converted to grayscale if needed and smoothed. If not, it is assumed the image has been treated by the user
Note:
this function is similar to BRIEF::operator()
static int DVision::BRIEF::distance ( const bitset a,
const bitset b 
) [inline, static]

Returns the Hamming distance between two descriptors

Parameters:
a first descriptor vector
b second descriptor vector
Returns:
hamming distance
void DVision::BRIEF::exportPairs ( std::vector< int > &  x1,
std::vector< int > &  y1,
std::vector< int > &  x2,
std::vector< int > &  y2 
) const [inline]

Exports the test pattern

Parameters:
x1 x1 coordinates of pairs
y1 y1 coordinates of pairs
x2 x2 coordinates of pairs
y2 y2 coordinates of pairs
void BRIEF::generateTestPoints (  )  [protected]

Generates random points in the patch coordinates, according to m_patch_size and m_bit_length

int DVision::BRIEF::getDescriptorLengthInBits (  )  const [inline]

Returns the descriptor length in bits

Returns:
descriptor length in bits
int DVision::BRIEF::getPatchSize (  )  const [inline]

Returns the size of the patch

Type DVision::BRIEF::getType (  )  const [inline]

Returns the type of classifier

void DVision::BRIEF::importPairs ( const std::vector< int > &  x1,
const std::vector< int > &  y1,
const std::vector< int > &  x2,
const std::vector< int > &  y2 
) [inline]

Sets the test pattern

Parameters:
x1 x1 coordinates of pairs
y1 y1 coordinates of pairs
x2 x2 coordinates of pairs
y2 y2 coordinates of pairs
void DVision::BRIEF::operator() ( const cv::Mat &  image,
const std::vector< cv::KeyPoint > &  points,
std::vector< bitset > &  descriptors,
bool  treat_image = true 
) const [inline]

Returns the BRIEF descriptors of the given keypoints in the given image

Parameters:
image 
points 
descriptors 
treat_image (default: true) if true, the image is converted to grayscale if needed and smoothed. If not, it is assumed the image has been treated by the user
Note:
this function is similar to BRIEF::compute

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations
Generated on Thu Feb 7 19:24:57 2013 by  doxygen 1.6.3