latest version v1.9 - last update 10 Apr 2010 |
This local feature extractor can be used to estimate the standardized moments (Mean, Variance, Skew and Kurtosis) of a certain circular area around the given location. More...
#include <ltiLocalMoments.h>
Classes | |
class | parameters |
The parameters for the class localMoments. More... | |
Public Member Functions | |
localMoments () | |
localMoments (const parameters &par) | |
localMoments (const localMoments &other) | |
virtual | ~localMoments () |
virtual const char * | getTypeName () const |
virtual bool | setParameters (const parameters &theParam) |
virtual bool | apply (const lti::channel &src, const location &loc, dvector &dest) const |
virtual bool | apply (const lti::image &src, const location &loc, dvector &dest) const |
virtual bool | apply (const lti::image &src, const std::list< location > &locs, std::list< dvector > &dests) const |
virtual bool | apply (const lti::channel &src, const std::list< location > &locs, std::list< dvector > &dests) const |
localMoments & | copy (const localMoments &other) |
localMoments & | operator= (const localMoments &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Attributes | |
array< int > | circPoints |
This local feature extractor can be used to estimate the standardized moments (Mean, Variance, Skew and Kurtosis) of a certain circular area around the given location.
For Variance, Skew and Kurtosis unbiased estimators are used.
#include "ltiLocalMoments.h" lti::channel src; lti::point p(200,200); lti::location(p,0,5); lti::dvector dest; lti::localMoments lM; lM.apply(src,loc,dest); // per default all those moments are calculated: std::cout << "Mean ="<<dest[0]<<"\n"; std::cout << "Variance = "<<dest[1]<<"\n"; std::cout << "Skew = "<<dest[2]<<"\n"; std::cout << "Kurtosis = "<<dest[3]<<"\n";
lti::localMoments::localMoments | ( | ) |
Default constructor.
lti::localMoments::localMoments | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::localMoments::localMoments | ( | const localMoments & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::localMoments::~localMoments | ( | ) | [virtual] |
Destructor.
virtual bool lti::localMoments::apply | ( | const lti::channel & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dests | |||
) | const [virtual] |
Compute the local features for the given locations.
src | original channel to be analyzed. | |
locs | locations that need to be analyzed. | |
dests | feature vectors. |
Reimplemented from lti::localFeatureExtractor.
virtual bool lti::localMoments::apply | ( | const lti::image & | src, | |
const std::list< location > & | locs, | |||
std::list< dvector > & | dests | |||
) | const [virtual] |
Compute the local features for the given locations for each color channel of the given image.
The resulting vectors are concatinated in this order: red,green,blue.
src | original channel to be analyzed. | |
locs | list of locations that need to be analyzed. | |
dests | list of feature vectors. |
Reimplemented from lti::localFeatureExtractor.
virtual bool lti::localMoments::apply | ( | const lti::image & | src, | |
const location & | loc, | |||
dvector & | dest | |||
) | const [virtual] |
Compute the local feature for the given location for each color channel of the given image.
The resulting vectors are concatinated in this order: red,green,blue.
src | original image to be analyzed. | |
loc | location that need to be analyzed. | |
dest | feature vector. |
Reimplemented from lti::localFeatureExtractor.
virtual bool lti::localMoments::apply | ( | const lti::channel & | src, | |
const location & | loc, | |||
dvector & | dest | |||
) | const [virtual] |
Compute the local feature for the given location.
src | original channel to be analyzed. | |
loc | location that need to be analyzed. | |
dest | feature vector. |
Reimplemented from lti::localFeatureExtractor.
virtual functor* lti::localMoments::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Reimplemented from lti::localFeatureExtractor.
localMoments& lti::localMoments::copy | ( | const localMoments & | other | ) |
Returns whether the onPlace version of apply is faster or the onCopy version.
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::localFeatureExtractor.
const parameters& lti::localMoments::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::localFeatureExtractor.
virtual const char* lti::localMoments::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("localMoments").
Reimplemented from lti::localFeatureExtractor.
localMoments& lti::localMoments::operator= | ( | const localMoments & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::localFeatureExtractor.
virtual bool lti::localMoments::setParameters | ( | const parameters & | theParam | ) | [virtual] |
Set functor's parameters.
This member makes a copy of theParam: the functor will keep its own copy of the parameters!
Additionally, the updateParameters will be called, which in some functors initializes some Look-Up Tables, or filters, etc. in order to improve the execution times later in the apply methods.
Since the LTI-Lib follows a deep-copy philosophy, if you copy the functor, the copy will create an exact copy of the parameters, no matter if they have been specified with useParameters() or with setParameters().
You should always prefer this method over useParameters(). The latter one is used only in very special cases, when the user needs to control an instance of parameters outside the functor and he/she wants to take care of the memory management.
This method should never be overloaded. If you want to make some precomputations when setting the parameters, please overload updateParameters().
Reimplemented from lti::functor.
array<int> lti::localMoments::circPoints [protected] |
Internal array for circular mask of fixedGridSampling.