LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::localMoments Class Reference
[Feature Extraction]

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>

Inheritance diagram for lti::localMoments:
Inheritance graph
[legend]
Collaboration diagram for lti::localMoments:
Collaboration graph
[legend]

List of all members.

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
localMomentscopy (const localMoments &other)
localMomentsoperator= (const localMoments &other)
virtual functorclone () const
const parametersgetParameters () const

Protected Attributes

array< int > circPoints

Detailed Description

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";

Constructor & Destructor Documentation

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.

Parameters:
other the object to be copied
virtual lti::localMoments::~localMoments (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
src original channel to be analyzed.
locs locations that need to be analyzed.
dests feature vectors.
Returns:
true if successful, or false otherwise.

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.

Parameters:
src original channel to be analyzed.
locs list of locations that need to be analyzed.
dests list of feature vectors.
Returns:
true if successful, or false otherwise.

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.

Parameters:
src original image to be analyzed.
loc location that need to be analyzed.
dest feature vector.
Returns:
true if successful, or false otherwise.

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.

Parameters:
src original channel to be analyzed.
loc location that need to be analyzed.
dest feature vector.
Returns:
true if successful, or false otherwise.

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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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().

See also:
useParameters(),updateParameters()
Returns:
true if successful, false otherwise

Reimplemented from lti::functor.


Member Data Documentation

Internal array for circular mask of fixedGridSampling.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:32 2010 for LTI-Lib by Doxygen 1.6.1