latest version v1.9 - last update 10 Apr 2010 |
This functor calculates for each location in a given list color-features. More...
#include <ltiLocalColorFeature.h>
Classes | |
class | parameters |
The parameters for the class localColorFeature. More... | |
class | sliceMask |
Simple structure used to hold a mask and the correspoinding io-points of the circle. More... | |
Public Member Functions | |
localColorFeature () | |
localColorFeature (const parameters ¶m) | |
localColorFeature (const localColorFeature &other) | |
virtual | ~localColorFeature () |
virtual const char * | getTypeName () const |
bool | apply (const lti::image &src, const std::list< location > &locs, std::list< dvector > &dest) |
bool | apply (const lti::image &src, const location &locs, dvector &dest) |
const kernel2D< ubyte > & | getMask () const |
localColorFeature & | copy (const localColorFeature &other) |
localColorFeature & | operator= (const localColorFeature &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
virtual bool | updateParameters () |
Protected Attributes | |
sliceMask | normalMask |
sliceMask | overlapMask |
This functor calculates for each location in a given list color-features.
Each location will be considered as a circular region, that will be divided in a specified number of slices. The color feature will compute for each slice the average color.
It is also possible to compute overlapping slices, to make the feature more robust against noise.
You can compute the locations with the functor lti::axLocationSearch or with lti::pyramidLocationSearch.
lti::localColorFeature::localColorFeature | ( | ) |
Default constructor.
lti::localColorFeature::localColorFeature | ( | const parameters & | param | ) |
Constructor with default parameters.
lti::localColorFeature::localColorFeature | ( | const localColorFeature & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::localColorFeature::~localColorFeature | ( | ) | [virtual] |
Destructor.
bool lti::localColorFeature::apply | ( | const lti::image & | src, | |
const location & | locs, | |||
dvector & | dest | |||
) |
Compute the color feature for the given location.
src | original image to be analyzed. | |
locs | location that need to be analyzed. | |
dest | feature vector. This vector contains the average color of the the slices. The structure of the vector for slices=2 and overlapping set to true would be: rrrrggggbbbb. |
bool lti::localColorFeature::apply | ( | const lti::image & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dest | |||
) |
Compute the color feature for each location.
src | original image to be analyzed. | |
locs | locations that need to be analyzed. | |
dest | list of feature vectors. This list will have the same size as locs and contains the average color of the location and of the slices. The structure of an element of the vector list for slices=2 and overlapping would be: rrrrggggbbbb. |
virtual functor* lti::localColorFeature::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Reimplemented from lti::localFeatureExtractor.
localColorFeature& lti::localColorFeature::copy | ( | const localColorFeature & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::localFeatureExtractor.
Slices mask.
This method returns a read-only reference to the main mask. It is intended for debug purposes only.
const parameters& lti::localColorFeature::getParameters | ( | ) | const |
Get a read-only reference to the current parameter set.
Reimplemented from lti::localFeatureExtractor.
virtual const char* lti::localColorFeature::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("localColorFeature").
Reimplemented from lti::localFeatureExtractor.
localColorFeature& lti::localColorFeature::operator= | ( | const localColorFeature & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::localFeatureExtractor.
virtual bool lti::localColorFeature::updateParameters | ( | ) | [virtual] |
Update parameters.
Reimplemented from lti::functor.
sliceMask lti::localColorFeature::normalMask [protected] |
Slice mask used to compute the normal feature.
sliceMask lti::localColorFeature::overlapMask [protected] |
Slice mask used to compute the overlapped feature.