Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

fl::DescriptorColorHistogram2D Class Reference

#include <descriptor.h>

Inheritance diagram for fl::DescriptorColorHistogram2D:

fl::Descriptor List of all members.

Public Methods

 DescriptorColorHistogram2D (int width=5, float supportRadial=4.2f)
 DescriptorColorHistogram2D (std::istream &stream)
void initialize ()
void clear ()
 Zero out histogram in preparation for a round of binning.

void addToHistogram (const Image &image, const int x, const int y)
 An inline used by both add() and value(). Contains the common code for incrementing color bins.

void add (const Image &image, int x, int y)
 Add color of image(x,y) to histogram.

Vector< float > finish ()
 Extract feature vector from the histogram. Only returns values for bins that map to a valid RGB color. See member "valid" below.

virtual Vector< float > value (const Image &image, const PointAffine &point)
 Returns a vector of floats that describe the image patch near the interest point.

virtual Vector< float > value (const Image &image)
 Describe entire region that has non-zero alpha values. Descriptor may treat all non-zero alpha values the same, or use them to weight the pixels. This method is only available in Descriptors that don't require a specific point of reference. IE: a spin image must have a central point, so it can't implement this method.

virtual Image patch (const Vector< float > &value)
 Return a graphical representation of the descriptor. Preferrably an image patch that would stimulate this descriptor to return the given value.

virtual Comparisoncomparison ()
 Return an instance of the recommended Comparison for feature vectors from this type of Descriptor. Caller is responsible to destroy instance.

virtual void read (std::istream &stream)
virtual void write (std::ostream &stream, bool withName=true)

Public Attributes

int width
 Number of bins in the U and V dimensions.

Matrix< bool > valid
 Stores true for every bin that translates to a valid RGB color.

Matrix< float > histogram
 Working histogram. Forces this Descriptor object to be single threaded.


Detailed Description

Form a 2D color histogram of the UV components in a YUV patch. Note on dimension: it is the total number of true entries in valid.


Constructor & Destructor Documentation

DescriptorColorHistogram2D::DescriptorColorHistogram2D int    width = 5,
float    supportRadial = 4.2f
 

Parameters:
width  An odd value provides a bin centered exactly on white, which may improve color matching.

DescriptorColorHistogram2D::DescriptorColorHistogram2D std::istream &    stream
 


Member Function Documentation

void DescriptorColorHistogram2D::add const Image   image,
int    x,
int    y
 

Add color of image(x,y) to histogram.

void DescriptorColorHistogram2D::addToHistogram const Image   image,
const int    x,
const int    y
[inline]
 

An inline used by both add() and value(). Contains the common code for incrementing color bins.

void DescriptorColorHistogram2D::clear  
 

Zero out histogram in preparation for a round of binning.

Comparison * DescriptorColorHistogram2D::comparison   [virtual]
 

Return an instance of the recommended Comparison for feature vectors from this type of Descriptor. Caller is responsible to destroy instance.

Reimplemented from fl::Descriptor.

Vector< float > DescriptorColorHistogram2D::finish  
 

Extract feature vector from the histogram. Only returns values for bins that map to a valid RGB color. See member "valid" below.

void DescriptorColorHistogram2D::initialize  
 

Image DescriptorColorHistogram2D::patch const Vector< float > &    value [virtual]
 

Return a graphical representation of the descriptor. Preferrably an image patch that would stimulate this descriptor to return the given value.

Implements fl::Descriptor.

void DescriptorColorHistogram2D::read std::istream &    stream [virtual]
 

Reimplemented from fl::Descriptor.

Vector< float > DescriptorColorHistogram2D::value const Image   image [virtual]
 

Describe entire region that has non-zero alpha values. Descriptor may treat all non-zero alpha values the same, or use them to weight the pixels. This method is only available in Descriptors that don't require a specific point of reference. IE: a spin image must have a central point, so it can't implement this method.

Reimplemented from fl::Descriptor.

Vector< float > DescriptorColorHistogram2D::value const Image   image,
const PointAffine   point
[virtual]
 

Returns a vector of floats that describe the image patch near the interest point.

Implements fl::Descriptor.

void DescriptorColorHistogram2D::write std::ostream &    stream,
bool    withName = true
[virtual]
 

Reimplemented from fl::Descriptor.


Member Data Documentation

Matrix<float> fl::DescriptorColorHistogram2D::histogram
 

Working histogram. Forces this Descriptor object to be single threaded.

Matrix<bool> fl::DescriptorColorHistogram2D::valid
 

Stores true for every bin that translates to a valid RGB color.

int fl::DescriptorColorHistogram2D::width
 

Number of bins in the U and V dimensions.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 17:13:26 2004 for fl by doxygen1.2.18