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

lti::curvatureScaleSpace Class Reference

Curvature Scale Space Representation (CSS). More...

#include <ltiCurvatureScaleSpace.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class curvatureScaleSpace More...

Public Types

enum  eFeatureIndices { MaxY = 0, MaxX, Width, Offset }

Public Member Functions

 curvatureScaleSpace ()
 curvatureScaleSpace (const curvatureScaleSpace &other)
virtual ~curvatureScaleSpace ()
virtual const char * getTypeName () const
bool apply (const borderPoints &src, channel8 &dest, float &maxSigma, int &maxRow) const
bool apply (const borderPoints &src, channel8 &dest, pointList &rows) const
bool apply (const borderPoints &src, channel8 &dest) const
bool apply (const borderPoints &src, channel8 &css, dmatrix &vcts) const
bool apply (const borderPoints &src, channel8 &css, dmatrix &vcts, pointList &rows) const
bool apply (const borderPoints &src, dmatrix &vcts) const
curvatureScaleSpacecopy (const curvatureScaleSpace &other)
virtual functorclone () const
const parametersgetParameters () const

Protected Member Functions

bool borderToXY (const borderPoints &src, vector< float > &theX, vector< float > &theY) const
void calcKernels (const float &sigma, kernel1D< float > &first, kernel1D< float > &second) const
int curvature (const float &sigma, const vector< float > &theX, const vector< float > &theY, vector< float > &curv, vector< ubyte > &zeroCross) const
void calcKernels (float &sigma, gaussKernel1D< float > &gaussian) const
int curvature (const gaussKernel1D< float > &gaussian, vector< float > &theX, vector< float > &theY, vector< float > &curv, vector< ubyte > &zeroCross, const int &lastZC) const
bool cssOriginal (const borderPoints &src, channel8 &dest, float &maxSigma, int &maxRow, pointList &rows) const
bool cssFast (const borderPoints &src, channel8 &dest, float &maxSigma, int &maxRow, pointList &rows) const
int zeroCross (const vector< float > &curv, vector< ubyte > &dest, const ubyte &posNeg, const ubyte &negPos) const
int extractBlobs (const channel8 &css, const pointList &rows, matrix< int > &blobs, dmatrix &features) const

Detailed Description

Curvature Scale Space Representation (CSS).

This functor extracts from a boundary (borderPoints) the CSS representation as described in Mokhtarian, F. et. al "Robust and efficient shape indexing through curvature scale space", British Machine Vision Conference, 1996

The apply methods will check if there are enough points in the input parameters to compute the css. If there are not enough points, nothing will be done (see the apply methods for more details).


Member Enumeration Documentation

indices for the columns of the feature-vectors in the matrix

Enumerator:
MaxY 

maximum sigma value of the blob

MaxX 

position x (length index) of the blob maximum

Width 

average width of the blob

Offset 

diference between the average width position and the position x of the maximum


Constructor & Destructor Documentation

lti::curvatureScaleSpace::curvatureScaleSpace (  ) 

default constructor

lti::curvatureScaleSpace::curvatureScaleSpace ( const curvatureScaleSpace other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::curvatureScaleSpace::apply ( const borderPoints src,
dmatrix vcts 
) const

operates on the given parameter.

This member computes the CSS-image and the feature vectors. Each row of the matrix will correspond to a feature vector which contains:

  • Column 0: (alias for 0: MaxY) the value of the maximum of the blob.
  • Column 1: (alias for 1: MaxX) the x-position of maximum of the blob.
  • Column 2: (alias for 2: Width) the average width
  • Column 3: (alias for 3: Offset) the offset between the x-position of the maximum of the blob and the center of the average width.
Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
vcts feature vectors. Each row corresponds to a CSS "blob"
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::apply ( const borderPoints src,
channel8 css,
dmatrix vcts,
pointList rows 
) const

operates on the given parameter.

This member computes the CSS-image and the feature vectors. Each row of the matrix will correspond to a feature vector which contains:

  • Column 0: (alias for 0: MaxY) the value of the maximum of the blob.
  • Column 1: (alias for 1: MaxX) the x-position of maximum of the blob.
  • Column 2: (alias for 2: Width) the average width
  • Column 3: (alias for 3: Offset) the offset between the x-position of the maximum of the blob and the center of the average width.
Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
css the CSS image will be left here.
vcts the feature vectors packed in a matrix.
rows a list of points p, where p.x contains the number of blobs crossing the row of dest with index p.y. In a "clean" CSS representation the number of blobs has to decrease or be equal with increasing index p.y. If you detect here the opposite effect is because there is too much noise in the high-resolution levels (small variance of Gaussians).
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::apply ( const borderPoints src,
channel8 css,
dmatrix vcts 
) const

operates on the given parameter.

This member computes the CSS-image and the feature vectors. Each row of the matrix will correspond to a feature vector which contains:

  • Column 0: (alias for 0: MaxY) the value of the maximum of the blob.
  • Column 1: (alias for 1: MaxX) the x-position of maximum of the blob.
  • Column 2: (alias for 2: Width) the average width
  • Column 3: (alias for 3: Offset) the offset between the x-position of the maximum of the blob and the center of the average width.
Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
css the CSS image will be left here.
vcts the feature vectors packed in a matrix.
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::apply ( const borderPoints src,
channel8 dest 
) const

operates on the given parameter.

Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
dest the CSS image will be left here.
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::apply ( const borderPoints src,
channel8 dest,
pointList rows 
) const

operates on the given parameter.

Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
dest the CSS image will be left here.
rows a list of points p, where p.x contains the number of blobs crossing the row of dest with index p.y. In a "clean" CSS representation the number of blobs has to decrease or be equal with increasing index p.y. If you detect here the opposite effect is because there is too much noise in the high-resolution levels (small variance of Gaussians).
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::apply ( const borderPoints src,
channel8 dest,
float &  maxSigma,
int &  maxRow 
) const

operates on the given parameter.

Parameters:
src list of boundary points. If this list has less than 9 points (the smallest "circle" has 8 points), false will be returned with the respective message in the status string
dest the CSS image will be left here.
maxSigma the maximum sigma in the CSS image.
maxRow the row corresponding to the maximum sigma.
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::borderToXY ( const borderPoints src,
vector< float > &  theX,
vector< float > &  theY 
) const [protected]

extract the x and y components of the borderPoints object and resize (normalize the length) of the vectors if required.

void lti::curvatureScaleSpace::calcKernels ( float &  sigma,
gaussKernel1D< float > &  gaussian 
) const [protected]

calculate the gaussian first and second derivative kernels.

The size of the kernel is recomputed considering the parameters object. The sigma term will be updated to the new one.

void lti::curvatureScaleSpace::calcKernels ( const float &  sigma,
kernel1D< float > &  first,
kernel1D< float > &  second 
) const [protected]

calculate the gaussian first and second derivative kernels.

The size is calcultated considering the parameters object.

virtual functor* lti::curvatureScaleSpace::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

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

copy data of "other" functor.

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

Reimplemented from lti::functor.

bool lti::curvatureScaleSpace::cssFast ( const borderPoints src,
channel8 dest,
float &  maxSigma,
int &  maxRow,
pointList rows 
) const [protected]

operates on the given parameter.

Parameters:
src list of boundary points.
dest modified CSS image will be left here.
maxSigma the maximum sigma in the CSS image.
maxRow the row corresponding to the maximum sigma.
rows a list of points, where x contains the number of maxima of the row with the index given in the point's y.
Returns:
true if apply successful or false otherwise.
bool lti::curvatureScaleSpace::cssOriginal ( const borderPoints src,
channel8 dest,
float &  maxSigma,
int &  maxRow,
pointList rows 
) const [protected]

operates on the given parameter.

Parameters:
src list of boundary points.
dest the CSS image will be left here.
maxSigma the maximum sigma in the CSS image.
maxRow the row corresponding to the maximum sigma.
rows a list of points, where x contains the number of maxima of the row with the index given by y.
Returns:
true if apply successful or false otherwise.
int lti::curvatureScaleSpace::curvature ( const gaussKernel1D< float > &  gaussian,
vector< float > &  theX,
vector< float > &  theY,
vector< float > &  curv,
vector< ubyte > &  zeroCross,
const int &  lastZC 
) const [protected]

calculate the curvature using the derivatives

int lti::curvatureScaleSpace::curvature ( const float &  sigma,
const vector< float > &  theX,
const vector< float > &  theY,
vector< float > &  curv,
vector< ubyte > &  zeroCross 
) const [protected]

calculate the curvature using the derivatives

int lti::curvatureScaleSpace::extractBlobs ( const channel8 css,
const pointList rows,
matrix< int > &  blobs,
dmatrix features 
) const [protected]

extract the blobs from the css image (only the first 127 blobs will be extracted)

const parameters& lti::curvatureScaleSpace::getParameters (  )  const

returns used parameters

Reimplemented from lti::transform.

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

returns the name of this type ("curvatureScaleSpace")

Reimplemented from lti::transform.

int lti::curvatureScaleSpace::zeroCross ( const vector< float > &  curv,
vector< ubyte > &  dest,
const ubyte posNeg,
const ubyte negPos 
) const [protected]

calculate the zero crossings.

The output vector MUST have the same size as the input vector.

This member returns the number of zero crossings detected.


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

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