#include <ShapeContext.h>
Public Member Functions | |
virtual Descriptor * | clone () const |
virtual double | distance (const Descriptor *descriptor) const |
const HistogramDistance< double > * | getDistanceFunction () const |
std::vector< std::vector < double > > & | getHistogram () |
const std::vector< std::vector < double > > & | getHistogram () const |
void | setDistanceFunction (const HistogramDistance< double > *distanceFunction) |
Protected Attributes | |
const HistogramDistance< double > * | m_distanceFunction |
std::vector< std::vector < double > > | m_histogram |
Representation of the shape context descriptor. The class represents the Shape Context descriptor of Belongie et al. It provides the interface to compare different descriptors, as well as to inspect the internal histogram representation.
Definition at line 41 of file ShapeContext.h.
Descriptor * ShapeContext::clone | ( | ) | const [virtual] |
Clone function for prototyping. It implements the Prototype pattern.
Implements Descriptor.
Definition at line 64 of file ShapeContext.cpp.
double ShapeContext::distance | ( | const Descriptor * | descriptor | ) | const [virtual] |
Implements the distance function between two shape context descriptors. The actual distance is computed using the histogram distance defined in m_distanceFunction .
Implements Descriptor.
Definition at line 68 of file ShapeContext.cpp.
const HistogramDistance<double>* ShapeContext::getDistanceFunction | ( | ) | const [inline] |
Returns the distance function used to compeare two shape contexts.
Definition at line 61 of file ShapeContext.h.
std::vector< std::vector< double > >& ShapeContext::getHistogram | ( | ) | [inline] |
Returns the shape context in the form of a bidimensional histogram. The first dimension represents the angle and the second dimension the distance.
Definition at line 57 of file ShapeContext.h.
const std::vector< std::vector< double > >& ShapeContext::getHistogram | ( | ) | const [inline] |
Returns the shape context in the form of a bidimensional histogram. The first dimension represents the angle and the second dimension the distance.
Definition at line 53 of file ShapeContext.h.
void ShapeContext::setDistanceFunction | ( | const HistogramDistance< double > * | distanceFunction | ) | [inline] |
Sets the distance function used to compeare two shape contexts.
Definition at line 65 of file ShapeContext.h.
const HistogramDistance<double>* ShapeContext::m_distanceFunction [protected] |
The distance function used to compeare two shape contexts.
Definition at line 69 of file ShapeContext.h.
std::vector< std::vector< double > > ShapeContext::m_histogram [protected] |
The histogram representing the shape context.
Definition at line 70 of file ShapeContext.h.