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

lti::pyramidLocationSearch Class Reference

Search for salient locations in the scale space of a channel. More...

#include <ltiPyramidLocationSearch.h>

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

List of all members.

Classes

class  parameters
 The parameters for the class pyramidLocationSearch. More...

Public Member Functions

 pyramidLocationSearch ()
 pyramidLocationSearch (const parameters &par)
 pyramidLocationSearch (const pyramidLocationSearch &other)
virtual ~pyramidLocationSearch ()
virtual const char * getTypeName () const
pyramidLocationSearchcopy (const pyramidLocationSearch &other)
pyramidLocationSearchoperator= (const pyramidLocationSearch &other)
virtual functorclone () const
const
pyramidLocationSearch::parameters
getParameters () const
Apply methods



bool apply (const channel &src, std::list< location > &locs)
bool apply (const channel &src, std::list< location > &locs, int &totalLocs)
bool apply (const channel &src, std::map< int, std::list< location > > &locs)
bool apply (const channel &src, std::map< int, std::list< location > > &locs, int &totalLocs)
bool apply (const channel &c1, const channel &c2, std::list< location > &locs)
bool apply (const channel &c1, const channel &c2, std::list< location > &locs, int &totalLocs)
bool apply (const channel &c1, const channel &c2, std::map< int, std::list< location > > &locs)
bool apply (const channel &c1, const channel &c2, std::map< int, std::list< location > > &locs, int &totalLocs)
bool apply (const channel &c1, const channel &c2, const channel &c3, std::list< location > &locs)
bool apply (const channel &c1, const channel &c2, const channel &c3, std::list< location > &locs, int &totalLocs)
bool apply (const channel &c1, const channel &c2, const channel &c3, std::map< int, std::list< location > > &locs)
bool apply (const channel &c1, const channel &c2, const channel &c3, std::map< int, std::list< location > > &locs, int &totalLocs)
Read-only access to the created pyramids in an apply method.

This methods are used not only for debugging purposes, but also to save some time with the computation of a channel pyramid, which is usually employed in the computation of features.



const scaleSpacePyramid
< channel > & 
getSaliencyPyramid () const
const scaleSpacePyramid
< channel > & 
getOrientationPyramid () const
const scaleSpacePyramid
< channel > & 
getChannelPyramid () const

Protected Member Functions

bool computeDoGKernel ()
bool qmaximum (const float ym1, const float y0, const float y1, float &x) const
float getAngle (const vector< float > &angles, const int idx) const
float edgenessRatio (const channel &chnl, const int y, const int x) const
void concatLocsMap (std::map< int, std::list< location > > &src1dest, std::map< int, std::list< location > > &src2) const
bool densityFilter (std::map< int, std::list< location > > &srcDest) const
Saliency Methods



void applyLaplacian (const channel &src, channel &dest) const
void applyMag (const channel &src, channel &mag, channel &angle) const
void applyCornerness (const channel &src, channel &dest) const
void applyDoG (const channel &src, channel &dest) const
Apply helper methods



bool computePyramids (const channel &src)
bool computeLocationsPosition (std::map< int, std::list< location > > &locMap)
bool computeLocationOrientation (std::map< int, std::list< location > > &locMap, int &totalLocs)

Protected Attributes

gradientFunctor gradient
sepKernel< float > doGKernel



scaleSpacePyramid< channeliPyr
scaleSpacePyramid< channellapPyr
fvector lapMax
scaleSpacePyramid< channelargPyr
scaleSpacePyramid< channelmagPyr
scaleSpacePyramid< channelmaxPyr
double firstLevelFactor

Detailed Description

Search for salient locations in the scale space of a channel.

The detected locations can be used to extract local features.

For more information see: David G. Lowe "Distinctive Image Features from Scale-Invariant Keypoints" June, 2003

This functor is more robust but also computationally more expensive than its predecessor lti::axLocalRegions.

The method is not 100% any of the variants published by Lowe, but it got his name since the general principle is the one explain in the previously mentioned paper.

One of the major differences with Lowe's approach is the use of a scale-space pyramid where all levels has their own scale. Lowe uses the same size for all level within an octave. The Gaussian smoothing is done here only for the first level, and thereafter only the one required to keep the downsampling valid.

See also:
lti::axLocalRegions, lti::locationSelector, lti::localColorFeature, lti::axOGDFeature

Constructor & Destructor Documentation

lti::pyramidLocationSearch::pyramidLocationSearch (  ) 

Default constructor.

lti::pyramidLocationSearch::pyramidLocationSearch ( const parameters par  ) 

Construct a functor using the given parameters.

lti::pyramidLocationSearch::pyramidLocationSearch ( const pyramidLocationSearch other  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
const channel c3,
std::map< int, std::list< location > > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from the given channel, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
c1 first color or other feature component
c2 second color or other feature component
c3 third color or other feature component
locs map of lists of relevant locations per level
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
const channel c3,
std::map< int, std::list< location > > &  locs 
)

Extracts the most relevant locations from the given channel, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
c1 first color or other feature component
c2 second color or other feature component
c3 third color or other feature component
locs map of lists of relevant locations per level
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
const channel c3,
std::list< location > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from the given channel, and return them as list of lti::location objects.

Parameters:
c1 first color or other feature component
c2 second color or other feature component
c3 third color or other feature component
locs list of relevant locations
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
const channel c3,
std::list< location > &  locs 
)

Extracts the most relevant locations from the given channel, and return them as list of lti::location objects.

Parameters:
c1 first color or other feature component
c2 second color or other feature component
c3 third color or other feature component
locs list of relevant locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
std::map< int, std::list< location > > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from both channels, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
c1 first color or other feature component
c2 second color or other feature component
locs map of lists of relevant locations per level
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
std::map< int, std::list< location > > &  locs 
)

Extracts the most relevant locations from both channels, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
c1 first color or other feature component
c2 second color or other feature component
locs map of lists of relevant locations per level
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
std::list< location > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from both channels, and return them as list of lti::location objects.

Parameters:
c1 first color or other feature component
c2 second color or other feature component
locs list of relevant locations
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel c1,
const channel c2,
std::list< location > &  locs 
)

Extracts the most relevant locations from both channels, and return them as list of lti::location objects.

Parameters:
c1 first color or other feature component
c2 second color or other feature component
locs list of relevant locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel src,
std::map< int, std::list< location > > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from the given channel, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
src channel with the source data.
locs map of lists of relevant locations per level
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel src,
std::map< int, std::list< location > > &  locs 
)

Extracts the most relevant locations from the given channel, and return them as map where the key equals the level in which the locations where found and the value is a list of lti::location objects in that level.

Note: This apply is faster than apply(const channel&,std::list<location>&).

Parameters:
src channel with the source data.
locs map of lists of relevant locations per level
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel src,
std::list< location > &  locs,
int &  totalLocs 
)

Extracts the most relevant locations from the given channel, and return them as list of lti::location objects.

Parameters:
src channel with the source data.
locs list of relevant locations
totalLocs total number of detected locations
Returns:
true if apply successful or false otherwise.
bool lti::pyramidLocationSearch::apply ( const channel src,
std::list< location > &  locs 
)

Extracts the most relevant locations from the given channel, and return them as list of lti::location objects.

Parameters:
src channel with the source data.
locs list of relevant locations
Returns:
true if apply successful or false otherwise.
void lti::pyramidLocationSearch::applyCornerness ( const channel src,
channel dest 
) const [protected]

Applies the Harris cornerness extraction to the source souce channel this is a measure for the curvature at a pixel.

void lti::pyramidLocationSearch::applyDoG ( const channel src,
channel dest 
) const [protected]

Applies a DoG kernel to the given channel.

void lti::pyramidLocationSearch::applyLaplacian ( const channel src,
channel dest 
) const [protected]

Applies the edge and/or corner extraction to the source souce channel based on Laplace-Operator.

void lti::pyramidLocationSearch::applyMag ( const channel src,
channel mag,
channel angle 
) const [protected]

Extracts the magnitude and angle of the gradient for the given for the given channel.

Parameters:
src original channel
mag magnitude of the gradient
angle angle of the gradient.
virtual functor* lti::pyramidLocationSearch::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements lti::functor.

bool lti::pyramidLocationSearch::computeDoGKernel (  )  [protected]

Compute the doGKernel as wished by the user.

bool lti::pyramidLocationSearch::computeLocationOrientation ( std::map< int, std::list< location > > &  locMap,
int &  totalLocs 
) [protected]

Compute the orientation of each location in each level.

The total number of locations is also computed

bool lti::pyramidLocationSearch::computeLocationsPosition ( std::map< int, std::list< location > > &  locMap  )  [protected]

Compute the position of the locations for each level, based on the pyramids.

bool lti::pyramidLocationSearch::computePyramids ( const channel src  )  [protected]

Compute the pyramids.

void lti::pyramidLocationSearch::concatLocsMap ( std::map< int, std::list< location > > &  src1dest,
std::map< int, std::list< location > > &  src2 
) const [protected]

Transport all data in the second map into the first one, without copying it.

At the end of the operation the second map will be empty.

pyramidLocationSearch& lti::pyramidLocationSearch::copy ( const pyramidLocationSearch 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::pyramidLocationSearch::densityFilter ( std::map< int, std::list< location > > &  srcDest  )  const [protected]

Density filter.

If the saliency threshold is too low, too many locations will be detected. The density filter chooses the most salient locations such that in the radio of each level no more than

float lti::pyramidLocationSearch::edgenessRatio ( const channel chnl,
const int  y,
const int  x 
) const [protected]

Compute the edgeness ratio.

The value computed here corresponds to the Tr(H)^2/Det(H), with the Hessian matrix H.

This method expects x and y to be greater 1 and to be not larger than 1 minus the last valid index bei each coordinate.

float lti::pyramidLocationSearch::getAngle ( const vector< float > &  angles,
const int  idx 
) const [protected]

Compute the angle given an index.

It will use the neighbors to compute the position of the maximum.

const scaleSpacePyramid<channel>& lti::pyramidLocationSearch::getChannelPyramid (  )  const

Return the input channel pyramid of the last channel of the last apply.

Note that the multi-channel apply-methods use only one pyramid for all channels, and therefore only the last one is kept.

const scaleSpacePyramid<channel>& lti::pyramidLocationSearch::getOrientationPyramid (  )  const

Return the orientation pyramid of the last channel of the last apply.

Note that the multi-channel apply-methods use only one pyramid for all channels, and therefore only the last one is kept.

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

Returns used parameters.

Reimplemented from lti::transform.

const scaleSpacePyramid<channel>& lti::pyramidLocationSearch::getSaliencyPyramid (  )  const

Return the saliency pyramid of the last channel of the last apply.

Note that the multi-channel apply-methods use only one pyramid for all channels, and therefore only the last one is kept.

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

Returns the name of this type ("pyramidLocationSearch").

Reimplemented from lti::transform.

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

Alias for copy member.

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

Reimplemented from lti::functor.

bool lti::pyramidLocationSearch::qmaximum ( const float  ym1,
const float  y0,
const float  y1,
float &  x 
) const [inline, protected]

Compute the maximum for the given three values, assuming that the middle value has an offset of zero and using a quadratic function that passes through all three points.

The returned value x will be between -1.0 and 1.0 if a maximum was detected, or will remain untouched if no maximum was found. If a maximum is found, the function returns true.


Member Data Documentation

Pyramid containing the angles of the gradient, used to compute the rotation of each feature.

Kernel used to compute the DoG.

First level factor.

If the pyramid was upsampled, this is the factor with which the first level was created.

Functor used to compute gradients.

The required pyramids.

Pyramid of original channel.

Vector containing the maxima at each level of the pyramid.

Pyramid of Laplacians, DoG, Harris cornerness, or gradient magnitude, depending on the mode selected in the parameters.

Pyramid containing the magnitude of the gradient.

Pyramid with maxima detected in the lapPyr.

This pyramid will only be initialized if the spatial maximum neighborhood is greater than 3.


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

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