latest version v1.9 - last update 10 Apr 2010 |
The orientation feature takes two channels: a "relevance" channel and an "orientation" channel, and with them it creates an orientation histogram with the given number of cells. More...
#include <ltiOrientationFeature.h>
Classes | |
class | parameters |
the parameters for the class orientationFeature More... | |
Public Member Functions | |
orientationFeature () | |
orientationFeature (const orientationFeature &other) | |
virtual | ~orientationFeature () |
virtual const char * | getTypeName () const |
bool | apply (const channel &orientation, const channel &magnitude, dvector &dest) const |
orientationFeature & | copy (const orientationFeature &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
The orientation feature takes two channels: a "relevance" channel and an "orientation" channel, and with them it creates an orientation histogram with the given number of cells.
Due to the fact that the orientation is Pi cyclic (0° is the same thing as 180°) the histogram created will consider the angles as being between 0 and Pi (angle mod Pi).
A relevance/orientation pair can be for example the gradient magnitude and phase channels (see lti::gradientKernelX and lti::cartesicToPolar) and the OGD local energy maps (lti::axOGDFeature). Both methods are ready implemented in the lti::orientationMap functor.
lti::orientationMap omapper; lti::orientationFeature ofeat; lti::channel chnl,mag,dir; lti::vector<double> vct; // construct a channel with a rectangle on it: chnl.resize(256,256,0.0); chnl.fill(1.0,32,32,200,240); // extract the orientation map from the channel omapper.apply(chnl,dir,mag); // generate the orientation feature ofeat.apply(dir,mag,vct);
If you need a rotation invariant feature vector see also lti::shiftInvariance
lti::orientationFeature::orientationFeature | ( | ) |
default constructor
lti::orientationFeature::orientationFeature | ( | const orientationFeature & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::orientationFeature::~orientationFeature | ( | ) | [virtual] |
destructor
bool lti::orientationFeature::apply | ( | const channel & | orientation, | |
const channel & | magnitude, | |||
dvector & | dest | |||
) | const |
generates the "weighted histogram" of the given magnitude and orientations channels.
orientation | channel with the orientation of edges | |
magnitude | channel with the relevance of the orientation. | |
dest | the result vector with the histogram data |
virtual functor* lti::orientationFeature::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::globalFeatureExtractor.
orientationFeature& lti::orientationFeature::copy | ( | const orientationFeature & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::globalFeatureExtractor.
const parameters& lti::orientationFeature::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::globalFeatureExtractor.
virtual const char* lti::orientationFeature::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("orientationFeature")
Reimplemented from lti::globalFeatureExtractor.