PARP Research Group Universidad de Murcia


QVBRIEFDetector Class Reference
[Image processing]

Simple implementation of BRIEF (Binary Robust Independent Elementary Features) descriptors. More...

#include <qvbriefdetector.h>

List of all members.

Public Member Functions

unsigned int distance (const QVector< unsigned int > &descriptorsA, const QVector< unsigned int > &descriptorsB, const int indexA=0, const int indexB=0) const
 Evaluates the Hamming distance between two binary descriptors.
 QVBRIEFDetector (const unsigned int descriptorInts=4, const unsigned int windowRadius=16)
 Main constructor.
QVector< unsigned int > getDescriptors (const QVImage< uChar, 1 > &image, const QVector< QPointF > &keypoints, const unsigned int octave=1) const
 Gets the descriptor for a set of features in an image.

Detailed Description

Simple implementation of BRIEF (Binary Robust Independent Elementary Features) descriptors.

BRIEF descriptors are designed to perform accelerated image keypoint matching.

These descriptors are variant to scale and orientation, but their lightweight evaluation and matching speed make them suitable for many different image matching applications.

BRIEF descriptors are binary strings representing a pattern of pair-wise comparations of pixels or tests, located inside a patch on the image centered at the given keypoint.

This class obtains BRIEF descriptors for points from an input image, and can be used to perform an efficient matching between them.

The following is an example usage code:

// Init BRIEF detector.
// The detector will generate 3*32 test patterns.
// Each descriptor contains 3 integer values, and 32 bits for each integer value store tests results.
// The maximal distance between the tested pixels in the pattern to the feature location is 5 pixels.
// The binary test pattern is different for each BRIEF detector object created.
QVBRIEFDetector BRIEFDetector(3,5);

// Init images and keypoint lists
QVImage<uChar, 1> imageA, imageB;
QVector<QPointF> keypointsA, keypointsB;

[...]

// Get descriptors for keypoints and images.
// It is important to use the same BRIEF detector to compare descriptors from different images.
// Each vector of binary descriptors will contain n*m integers, where 'n' is the size of the keypoint list,
// and 'm' is the number of integers per descriptor (in this case, m = 3).
QVector<unsigned int>   binaryDescriptorsA = BRIEFDetector.getDescriptors(imageA, keypointsA), // Get descriptors for keypoints in image A.
                        binaryDescriptorsB = BRIEFDetector.getDescriptors(imageB, keypointsB);  // Get descriptors for keypoints in image B.

[...]

// Example code to obtain the distance between the descriptor for each keypoint in A, and the descriptor for each point in B.
// The result is stored in the following distance matrix.
QVMatrix distanceMatrix(keypointsA.count(), keypointsB.count(), 0.0);

for(int i = 0; i < keypointsA.count(); i++)
        for(int j = 0; j < keypointsB.count(); j++)
                // Get distance between i-th descriptor from image A, and j-th descriptor from image B.
                // The comparison must be done with the same BRIEF detector used to obtain the descriptors.
                distanceMatrix(i,j) = BRIEFDetector.distance( binaryDescriptorsA, binaryDescriptorsB, i, j);

Definition at line 86 of file qvbriefdetector.h.


Constructor & Destructor Documentation

QVBRIEFDetector::QVBRIEFDetector ( const unsigned int  descriptorInts = 4,
const unsigned int  windowRadius = 16 
) [inline]

Main constructor.

Parameters:
descriptorInts Size of the descriptor. Each element of the descriptor is an integer containing 32 bit tests.
windowRadius Max radius for the testing window around the pixel.

Definition at line 129 of file qvbriefdetector.h.


Member Function Documentation

unsigned int QVBRIEFDetector::distance ( const QVector< unsigned int > &  descriptorsA,
const QVector< unsigned int > &  descriptorsB,
const int  indexA = 0,
const int  indexB = 0 
) const [inline]

Evaluates the Hamming distance between two binary descriptors.

This method uses the xor operator and the qvNiftyParallelBitCount function to evaluate the number of bits which differ between two binary descriptors.

Parameters:
descriptorsA set of descriptors for the first image.
descriptorsB set of descriptors for the second image.
indexA index for the feature descriptor in the first image.
indexB index for the feature descriptor in the second image.
Returns:
the number of bits set in the integer obtained from the xor operation between the two descriptors.

Definition at line 111 of file qvbriefdetector.h.

QVector<unsigned int> QVBRIEFDetector::getDescriptors ( const QVImage< uChar, 1 > &  image,
const QVector< QPointF > &  keypoints,
const unsigned int  octave = 1 
) const [inline]

Gets the descriptor for a set of features in an image.

Returns:
a vector containing the concatenated descriptors for the features in the image. The order of the features is preserved in the vector of descriptors.

Definition at line 166 of file qvbriefdetector.h.


The documentation for this class was generated from the following file:



QVision framework. PARP research group. Copyright © 2007, 2008, 2009, 2010, 2011.