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

fl::DescriptorColorHistogram3D Class Reference

#include <descriptor.h>

Inheritance diagram for fl::DescriptorColorHistogram3D:

fl::Descriptor List of all members.

Public Methods

 DescriptorColorHistogram3D (int width=5, int height=-1, float supportRadial=4.2f)
 height == -1 means use value of width

 DescriptorColorHistogram3D (std::istream &stream)
 ~DescriptorColorHistogram3D ()
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.

int height
 Number of bins in the Y dimension.

bool * valid
 A 3D block of booleans that stores true for every bin that translates to a valid RGB color.

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


Detailed Description

Form a 3D color histogram of the UV components in a YUV patch. If the need arises to use other color spaces, this class could be generalized.


Constructor & Destructor Documentation

DescriptorColorHistogram3D::DescriptorColorHistogram3D int    width = 5,
int    height = -1,
float    supportRadial = 4.2f
 

height == -1 means use value of width

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

DescriptorColorHistogram3D::DescriptorColorHistogram3D std::istream &    stream
 

DescriptorColorHistogram3D::~DescriptorColorHistogram3D  
 


Member Function Documentation

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

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

void DescriptorColorHistogram3D::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 DescriptorColorHistogram3D::clear  
 

Zero out histogram in preparation for a round of binning.

Comparison * DescriptorColorHistogram3D::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 > DescriptorColorHistogram3D::finish  
 

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

void DescriptorColorHistogram3D::initialize  
 

Image DescriptorColorHistogram3D::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 DescriptorColorHistogram3D::read std::istream &    stream [virtual]
 

Reimplemented from fl::Descriptor.

Vector< float > DescriptorColorHistogram3D::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 > DescriptorColorHistogram3D::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 DescriptorColorHistogram3D::write std::ostream &    stream,
bool    withName = true
[virtual]
 

Reimplemented from fl::Descriptor.


Member Data Documentation

int fl::DescriptorColorHistogram3D::height
 

Number of bins in the Y dimension.

float* fl::DescriptorColorHistogram3D::histogram
 

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

bool* fl::DescriptorColorHistogram3D::valid
 

A 3D block of booleans that stores true for every bin that translates to a valid RGB color.

int fl::DescriptorColorHistogram3D::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