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

lti::channelStatistics Class Reference

This functor splits an image into three channels of a color space set in the parameters (see parameters::setSplitter() ). More...

#include <ltiChannelStatistics.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class channelStatistics More...

Public Member Functions

 channelStatistics ()
 channelStatistics (const channelStatistics &other)
virtual ~channelStatistics ()
virtual const char * getTypeName () const
bool apply (const image &src, const areaPoints &obj, dvector &dest) const
bool apply (const image &src, dvector &dest) const
channelStatisticscopy (const channelStatistics &other)
channelStatisticsoperator= (const channelStatistics &other)
virtual functorclone () const
const parametersgetParameters () const

Protected Member Functions

bool getMin (const channel &ch, const areaPoints &obj, double &dest) const
bool getMax (const channel &ch, const areaPoints &obj, double &dest) const
bool getAverage (const channel &ch, const areaPoints &obj, double &dest) const
bool getGaussian (const channel &ch, const areaPoints &obj, double &m, double &v) const
bool getMedian (const channel &ch, const areaPoints &obj, double &dest) const
bool getMin (const channel &ch, const channel8 &mask, double &dest) const
bool getMax (const channel &ch, const channel8 &mask, double &dest) const
bool getAverage (const channel &ch, const channel8 &mask, double &dest) const
bool getGaussian (const channel &ch, const channel8 &mask, double &m, double &v) const
bool getMedian (const channel &ch, const channel8 &mask, double &dest) const

Detailed Description

This functor splits an image into three channels of a color space set in the parameters (see parameters::setSplitter() ).

From these channels it then calculates the Minimum, Maximum, Average, Median or Average and Variance over their values, depending on the parameter type.

It is possible to define a "transparent color" which will be ignored by the calculation.


Constructor & Destructor Documentation

lti::channelStatistics::channelStatistics (  ) 

default constructor

lti::channelStatistics::channelStatistics ( const channelStatistics other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::channelStatistics::apply ( const image src,
dvector dest 
) const [virtual]

Calculates statics for each channel of the given image.

The kind of channels used depends on the parameter splitter which is a pointer of splitImage. Points which have the color param.ignoreColor are ignored.

Parameters:
src image for feature extraction.
dest the feature vector
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::globalFeatureExtractor.

bool lti::channelStatistics::apply ( const image src,
const areaPoints obj,
dvector dest 
) const

Calculates statics for each channel of the part of the given image indicated by the areaPoints.

The kind of channels used depends on the parameter splitter which is a pointer of splitImage. The different statistics are chosen through the parameter type:

Minimum

Minimum of each channel

3 dimensions

Maximum

Maximum of each channel

3 dimensions

Average

Average value of each channel

3 dimensions

Gaussian

First the mean values of each channel

6 dimensions

then the variances

Median

Median value of each channel

3 dimensions

Parameters:
src image for feature extraction.
obj area of the image that contains the object
dest the feature vector
Returns:
true if apply successful or false otherwise.
virtual functor* lti::channelStatistics::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::globalFeatureExtractor.

channelStatistics& lti::channelStatistics::copy ( const channelStatistics other  ) 

copy data of "other" functor.

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

Reimplemented from lti::globalFeatureExtractor.

bool lti::channelStatistics::getAverage ( const channel ch,
const channel8 mask,
double &  dest 
) const [protected]

Calculates the average value of the points of the given channel for which the mask entry is true.

Parameters:
ch channel to be evaluated
mask flag mask which tells for each point if it should be included in the statistics.
dest the minimum value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getAverage ( const channel ch,
const areaPoints obj,
double &  dest 
) const [protected]

Calculates the average value of the points in obj of the given channel .

Parameters:
ch channel to be evaluated
obj list of points belonging to the object
dest the average value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getGaussian ( const channel ch,
const channel8 mask,
double &  m,
double &  v 
) const [protected]

Calculates a gaussian distribution of the points of the given channel for which the mask entry is true.

Parameters:
ch channel to be evaluated
mask flag mask which tells for each point if it should be included in the statistics.
m the mean of the computed distribution
v the variance of the computed distribution
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getGaussian ( const channel ch,
const areaPoints obj,
double &  m,
double &  v 
) const [protected]

Calculates the Gaussian, ie the mean and variance, of the points in obj of the given channel .

Parameters:
ch channel to be evaluated
obj list of points belonging to the object
m the mean value
v the variance
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMax ( const channel ch,
const channel8 mask,
double &  dest 
) const [protected]

Calculates the maximum value of the points of the given channel for which the mask entry is true.

Parameters:
ch channel to be evaluated
mask flag mask which tells for each point if it should be included in the statistics.
dest the minimum value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMax ( const channel ch,
const areaPoints obj,
double &  dest 
) const [protected]

Calculates the maximum value of the points in obj of the given channel .

Parameters:
ch channel to be evaluated
obj list of points belonging to the object
dest the maximum value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMedian ( const channel ch,
const channel8 mask,
double &  dest 
) const [protected]

Calculates the median of the points of the given channel for which the mask entry is true.

Parameters:
ch channel to be evaluated
mask flag mask which tells for each point if it should be included in the statistics.
dest the minimum value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMedian ( const channel ch,
const areaPoints obj,
double &  dest 
) const [protected]

Calculates the median of all values of the points in obj of the given channel .

Parameters:
ch channel to be evaluated
obj list of points belonging to the object
dest the median of all values
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMin ( const channel ch,
const channel8 mask,
double &  dest 
) const [protected]

Calculates the minimum value of the points of the given channel for which the mask entry is true.

Parameters:
ch channel to be evaluated
mask flag mask which tells for each point if it should be included in the statistics.
dest the minimum value
Returns:
true if apply successful or false otherwise.
bool lti::channelStatistics::getMin ( const channel ch,
const areaPoints obj,
double &  dest 
) const [protected]

Calculates the minimum value of the points in obj of the given channel .

Parameters:
ch channel to be evaluated
obj list of points belonging to the object
dest the minimum value
Returns:
true if apply successful or false otherwise.
const parameters& lti::channelStatistics::getParameters (  )  const

returns used parameters

Reimplemented from lti::globalFeatureExtractor.

virtual const char* lti::channelStatistics::getTypeName (  )  const [virtual]

returns the name of this type ("channelStatistics")

Reimplemented from lti::globalFeatureExtractor.

channelStatistics& lti::channelStatistics::operator= ( const channelStatistics other  ) 

alias for copy member

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

Reimplemented from lti::functor.


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

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