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

fl::Comparison Class Reference

#include <descriptor.h>

Inheritance diagram for fl::Comparison:

fl::ChiSquared fl::ComparisonCombo fl::HistogramIntersection fl::MetricEuclidean fl::NormalizedCorrelation List of all members.

Public Methods

virtual ~Comparison ()
 Establishes that destructor is virtual, but doesn't do anything else.

virtual Vector< float > preprocess (const Vector< float > &value) const
virtual float value (const Vector< float > &value1, const Vector< float > &value2, bool preprocessed=false) const=0
virtual void read (std::istream &stream)
virtual void write (std::ostream &stream, bool withName=true)

Static Public Methods

void addProducts ()
 Registers with the Factory all basic Comparison classes other than ComparisonCombo.


Detailed Description

Takes two feature vectors and returns a value in [0,1]. This could be interpreted as a probability, but there is no guarantee that for any given data it actually predicts the likelihood of a correct match. What is guaranteed is the 1 means perfect match, and 0 means no chance whatsoever of a match.

The application should remap [0,1] to an actual probability if that is what it requires. At some point, it may make sense to add a Function object that we run on behalf of the application to reshape the result.


Constructor & Destructor Documentation

Comparison::~Comparison   [virtual]
 

Establishes that destructor is virtual, but doesn't do anything else.


Member Function Documentation

void Comparison::addProducts   [static]
 

Registers with the Factory all basic Comparison classes other than ComparisonCombo.

Since at present all Comparisons (other than ComparisonCombo) are lightweight classes implemented in this single source file, it makes sense to just register them all at once. Another alternative would be to hard code a factory just for Comparisons. However, the Factory template is more flexible.

Vector< float > Comparison::preprocess const Vector< float > &    value const [virtual]
 

Reimplemented in fl::ComparisonCombo, fl::NormalizedCorrelation, and fl::ChiSquared.

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

Reimplemented in fl::ComparisonCombo, fl::NormalizedCorrelation, and fl::MetricEuclidean.

virtual float fl::Comparison::value const Vector< float > &    value1,
const Vector< float > &    value2,
bool    preprocessed = false
const [pure virtual]
 

Implemented in fl::ComparisonCombo, fl::NormalizedCorrelation, fl::MetricEuclidean, fl::HistogramIntersection, and fl::ChiSquared.

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

Reimplemented in fl::ComparisonCombo, fl::NormalizedCorrelation, and fl::MetricEuclidean.


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