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

lti::faceThreshold::parameters Class Reference

The parameters for the class faceThreshold. More...

#include <ltiFaceThreshold.h>

Inheritance diagram for lti::faceThreshold::parameters:
Inheritance graph
[legend]
Collaboration diagram for lti::faceThreshold::parameters:
Collaboration graph
[legend]

List of all members.

Public Types

enum  OperationMode

Public Member Functions

 parameters ()
 parameters (const parameters &other)
 ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
parametersoperator= (const parameters &other)
virtual functor::parametersclone () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Public Attributes

int computationMode
int thresholdStep
int gaussKernelSize
float interpolationStep
int optModePrecision
int compactnessExponent
int mainAxisOrientationExponent
int dRatioExponent
float dRatioOptRatio
int dRatioWidth
int hDistExponent
int hDistExpectedPosition
int hDistWidth
int vDistExponent
int vDistExpectedPosition
int vDistWidth
int sizeExponent
float sizeMin
float sizeMax
int thresholdProbabilityExponent

Detailed Description

The parameters for the class faceThreshold.


Note: for reasons of simplicity, in the blob ranking parameters formulas, all parameters (i.e.not the arguments) are written without the method-related prefix that makes them unique in the code. For example, both 'compactnessExponent' and 'mainAxisOrientationExponent' are just named 'exponent'.(Since, after all, one can conclude the full name by the methods's name...)


Member Enumeration Documentation

Constants for the possible values of lti::faceThreshold::parameters::computationMode.

  • linearMode = 0
  • timeOptimizedMode = 1

Constructor & Destructor Documentation

lti::faceThreshold::parameters::parameters (  ) 

default constructor

Reimplemented from lti::functor::parameters.

lti::faceThreshold::parameters::parameters ( const parameters other  ) 

copy constructor

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

destructor

Reimplemented from lti::functor::parameters.


Member Function Documentation

virtual functor::parameters* lti::faceThreshold::parameters::clone (  )  const [virtual]

returns a pointer to a clone of the parameters

Implements lti::functor::parameters.

parameters& lti::faceThreshold::parameters::copy ( const parameters other  ) 

copy the contents of a parameters object

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object
const char* lti::faceThreshold::parameters::getTypeName (  )  const [virtual]

returns name of this type

Reimplemented from lti::functor::parameters.

parameters& lti::faceThreshold::parameters::operator= ( const parameters other  ) 

copy the contents of a parameters object

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object
virtual bool lti::faceThreshold::parameters::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the parameters from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if read was successful

Reimplemented from lti::functor::parameters.

virtual bool lti::faceThreshold::parameters::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the parameters in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::functor::parameters.


Member Data Documentation

Blob ranking parameter: score for a blob's compactness.


Compactness is a measure for a blob's area-to-circumference ratio and ranges from 0 to 1, where 1 is the compactness of a circle. Thus, higher compactness values result in higher scores. The corresponding score formula is:

\[ \text{compactness} (c) := 100 - 100 \cdot (1-c)^{\text{exponent}} \]

Effect of this parameter: the greater, the more scores are achieved with relative small compactness values.
Range: >=0, Default: 2, Disable: 0

Specification of computation mode:.

See lti::faceThreshold::parameters::OperationMode for a list of predefined mode-constants.
Default: 0

Blob ranking parameter: score for a blob's ratio of border points distances relative to the main axis.


The sum of the leftmost and rightmost blob points distances to the main axis (i.e.orthogonal to the main axis) is set in relation to the sum of the frontmost and rearmost blob points distances to the blob's center of gravity (i.e.along the main axis). This ratio is compared to the specified desired ratio 1 : lti::faceThreshold::parameters::dRatioOptRatio. The closer these two values are, the more score is achieved. This results in the rating of a main axis dependent bounding box's sides proportion. The corresponding formula is:

\[ \text{dRatio} (\Sigma_{\,ortho},\Sigma_{\,along}) := 100 - 100 \cdot \left( \text{width} \cdot \left\arrowvert \dfrac{\Sigma_{\,ortho}}{\Sigma_{\,along}} - \dfrac{1}{\text{optRatio}} \right\arrowvert \right)^{\text{exponent}} \]

Effect of this parameter: the greater, the more binary is the ranking (i.e.in extreme cases almost equal scores for tolerable blobs and a sharp switch to penalty scores), but without changing the null (i.e.the sign itself of the score remains unchanged). The tolerable deviation is determined by lti::faceThreshold::parameters::dRatioWidth.
Range: >=0, Default: 2, Disable: 0

Blob ranking parameter: score for a blob's ratio of border points distances relative to the main axis (i.e.a kind of main axis dependent bounding box rating).

For formula and more detailed description see lti::faceThreshold::parameters::dRatioExponent.
Effect of this parameter: specification of the desired bounding box edges relation, e.g. a value of 1 would specify a quadrat and a value of 2 a rectangle with edges parallel to main axis twice as long as the edges orthogonal to it.
Range: >=1, Default: 1.5 (to disable this criterion, set lti::faceThreshold::parameters::dRatioExponent to 0)

Blob ranking parameter: score for a blob's ratio of border points distances relative to the main axis (i.e.a kind of main axis dependent bounding box rating).

For formula and more detailed description see lti::faceThreshold::parameters::dRatioExponent .
Effect of this parameter: determines the width of the region for positive scores around the ratio that reaches maximum score. Note that a smaller value results in a wider region, i.e.a more generous ranking.
Range: >=1, Default: 2 (to disable this criterion, set lti::faceThreshold::parameters::dRatioExponent to 0)

Besides interpolation (see lti::faceThreshold::parameters::interpolationStep), smoothing provides better results for a blob's compactness value, since the blob's 'fringes' are reduced.

Possible values of this parameter:

  • <= 1 : smoothing disabled
  • 2 <= n: smoothing of the skin probability mask with kernel of size n

Note: in case the input image has not yet been smoothed, a kernel size of 19 has shown good results.
Default: 0

Blob ranking parameter: score for a blob's horizontal position.

For corresponding formula see lti::faceThreshold::parameters::hDistExponent.
Effect of this parameter: determines where the face has to be expected relative to image width, i.e.50 (%) means in the middle.
Range: [0..100], Default: 50 (to disable this criterion, set lti::faceThreshold::parameters::hDistExponent to 0)

Blob ranking parameter: score for a blob's horizontal position.


The closer a blob's center of gravity is to a specified horizontal position (see lti::faceThreshold::parameters::hDistExpectedPosition), the more score is reached. The corresponding formula is:

\[ \text{hDist} (x, cols) := 100 - 100 \cdot \left( \text{width} \cdot \dfrac { | x - \frac{cols\cdot\text{expectedPosition}}{100} | } {\frac{cols}{2}} \right)^{\text{exponent}} \]

Effect of this parameter: the greater, the more generous the ranking (without changing null).
Range: >=0, Default: 2, Disable: 0

Blob ranking parameter: score for a blob's horizontal position.

For corresponding formula see lti::faceThreshold::parameters::hDistExponent.
Effect of this parameter: the greater, the smaller the region for positive scores
Range: >=1, Default: 1 (to disable this criterion, set lti::faceThreshold::parameters::hDistExponent to 0)

To reduce a blob's 'fringes', its border points can be interpolated, where this parameter determines the distance between two unchanged border points.

Possible values:

  • <= 0: interpolation disabled
  • 0 < n < 100: interpolation with the distance between two unchanged border points being n% of the maximum of the image's height and width

Thus, with increasing value, the roughness of the resulting polygon blob's outline increases, too.
Default: 1.0

Blob ranking parameter: score for a blob's main axis orientation.


The more vertical a blob's main axis is, the more score is achieved. The corresponding score formula is:

\[ \text{axisOrientation} (a) := 100 \cdot \left\arrowvert \dfrac{a}{90} \right\arrowvert^{\text{exponent}} \]

Effect of this parameter: the greater, the stricter the ranking.
Range: >=0, Default: 2, Disable: 0

If the time-optimized threshold search mode is used (see lti::faceThreshold::parameters::computationMode), this parameter specifies, at which precision to stop the threshold search (where a greater value results in a faster computation but more inexact threshold).


Range: [1..15], Default: 2

Blob ranking parameter: score for a blob's size.


Blobs with an area size between the minimal an maximal size (both specified relative to image size by lti::faceThreshold::parameters::sizeMin and lti::faceThreshold::parameters::sizeMax) gain positive score, favouring the middel. The penalty score increases for both smaller and bigger blobs. The corresponding forumla is:

\[ \text{blobSize} (A_{\,blob}, A_{\,image}) := 100 - 100 \cdot \left( \dfrac {| 2 \cdot A_{\,blob} - \frac{\text{min}\cdot A_{\,image}}{100} - \frac{\text{max}\cdot A_{\,image}}{100} | } {\frac{\text{max}\cdot A_{\,image}}{100} - \frac{\text{min}\cdot A_{\,image}}{100}} \right)^{exponent} \]

Effect of this parameter: The greater, the more generous the ranking (i.e.higher score for blobs with size within range but close to min or max).
Range: >= 0, Default: 3, Disable: 0

Blob ranking parameter: score for a blob's size.

For corresponding formula see lti::faceThreshold::parameters::sizeExponent.
Effect of this parameter: specification of the maximal blob size relative to image size.
Range: [0..100] , Default: 5.5 (to disable this criterion, set lti::faceThreshold::parameters::sizeExponent to 0)

Blob ranking parameter: score for a blob's size.

For corresponding formula see lti::faceThreshold::parameters::sizeExponent.
Effect of this parameter: specification of the minimal blob size relative to image size.
Range: [0..100] , Default: 0.5 (to disable this criterion, set lti::faceThreshold::parameters::sizeExponent to 0)

Blob ranking parameter: Since a higher treshold means that at least the outer points of a blob are skin with equivalent higher probability, higher thresholds are favoured.

Furthermore a threshold increase in lower regions is rewarded more than in higher regions. The corresponding formula is:

\[ \text{thresholdProbability}(t) := 100 \cdot \left( \dfrac{t}{255} \right)^ {\frac{1}{\text{exponent}}} \]

Effect of this parameter: The greater, the greater the score for increase in low threshold regions.
Range: >= 0, Default: 2, Disable: 0

Except for time-optimized mode (see lti::faceThreshold::parameters::computationMode), this parameter specifies the distance between two tested thresholds for the linear threshold search.


Thus, a greater value results in a faster but more inexact blob ranking.
Range: [1..127], Default: 5

Blob ranking parameter: score for a blob's vertical position.

For corresponding formula see lti::faceThreshold::parameters::vDistExponent.
Effect of this parameter: determines where the face has to be expected relative to image height, i.e.50(%) means in the middle.
Range: [0..100], Default: 30 (to disable this criterion, set lti::faceThreshold::parameters::vDistExponent to 0)

Blob ranking parameter: score for a blob's vertical position.


The closer a blob's center of gravity is to a specified vertical position (see lti::faceThreshold::parameters::vDistExpectedPosition), the more score is reached. The corresponding formula is:

\[ \text{vDist} (y, rows) := 100 - 100 \cdot \left( \text{width} \cdot \dfrac {| \frac{y-rows\cdot\text{expectedPosition}}{100} |} {\frac{rows}{2}} \right)^{\text{exponent}} \]

Effect of this parameter: the greater, the more generous the ranking (without changing null).
Range: >=0, Default: 3, Disable: 0

Blob ranking parameter: score for a blob's vertical position.

For corresponding formula see lti::faceThreshold::parameters::vDistExponent.
Effect of this parameter: the greater, the smaller the region for positive scores
Range: >=1, Default: 3 (to disable this criterion, set lti::faceThreshold::parameters::vDistExponent to 0)


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

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