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

lti::axLocalRegions Class Reference

This functor is based on concepts described in Lowe, D.G. More...

#include <ltiAxLocalRegions.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class axLocalRegions More...

Public Member Functions

 axLocalRegions ()
 axLocalRegions (const axLocalRegions &other)
virtual ~axLocalRegions ()
virtual const char * getTypeName () const
bool apply (const channel &src, std::list< location > &locs) const
bool apply (const channel &src, std::map< float, std::list< location > > &locs) const
axLocalRegionscopy (const axLocalRegions &other)
axLocalRegionsoperator= (const axLocalRegions &other)
virtual functorclone () const
const parametersgetParameters () const

Protected Member Functions

bool pyramidToLocs (const channel &src, const pyramid< channel > &pyr, std::list< location > &locs) const

Detailed Description

This functor is based on concepts described in Lowe, D.G.

"Object Recognition from Local Scale-Invariant Features", Proc. of the International Conference on Computer Vision, Corfu, Greece Sept. 1999. pp. 1150-1157. This paper can be found at

http://www.cs.ubc.ca/spider/lowe/papers/iccv99.pdf

It uses the DoG to detect relevant locations, and depending on the scale at which the location was found, a corresponding radius will be assigned. The orientation of the location will be computed using a small orientation histogram on the gradient of the image.

The location detection is done somehow different as in Lowe's paper, in order to get a result much faster (but maybe with more locations as necessary):

  1. For the given channel, a gaussian pyramid is build, where the differences between the std. deviation of the gaussians for the different levels are sqrt(2) instead of 2.
  2. The DoG (differences of gaussians) between the levels of the pyramid are computed.
  3. Compute the local maxima of each level. If their values are greater than the given threshold multiplied by the maximum value in the image, then consider that region as a valid interesting location and insert it in the locations list.
  4. For each location in the list, compute its orientation using the maximal value in a orientation histogram computed for a window of the size given in the parameters.

Constructor & Destructor Documentation

lti::axLocalRegions::axLocalRegions (  ) 

default constructor

lti::axLocalRegions::axLocalRegions ( const axLocalRegions other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::axLocalRegions::apply ( const channel src,
std::map< float, std::list< location > > &  locs 
) const

extracts the most relevant locations from the given channel, and return them in a map of lists of lti::location objects, the map first key is the radius of the locations.

You can iterate in the lists of locations with the same radius as follows:

 std::map<float,std::list<location> > locs; // map of lists of locations
 channel chnl;                              // channel to be analyzed
 draw<float> drawer;                        // draw on channel
 drawer.use(chnl);                          // using chnl as canvas

 // ... load or create the channel to be analyzed

 axLocalRegions localizer;   // our local regions functor
 localizer.apply(chnl,locs); // get the local regions

 std::map<float,std::list<location> >::const_iterator locsIt;
 std::list<location>::const_iterator it;

 for (locsIt=locs.begin();locsIt!=locs.end();++locsIt) {
   cout << "Locations for radius " << (*locsIt).first << endl;

   // do something with each location at this level:
   for (it=(*locsIt).second.begin();
        it!=(*locsIt).second.end();
        ++it) {
     // for example, draw the location:
    drawer.set(*it);
   }
 }
Parameters:
src channel with the source data.
locs map of relevant locations
Returns:
true if apply successful or false otherwise.
bool lti::axLocalRegions::apply ( const channel src,
std::list< location > &  locs 
) const

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.
virtual functor* lti::axLocalRegions::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

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

copy data of "other" functor.

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

Reimplemented from lti::functor.

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

returns used parameters

Reimplemented from lti::transform.

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

returns the name of this type ("axLocalRegions")

Reimplemented from lti::transform.

axLocalRegions& lti::axLocalRegions::operator= ( const axLocalRegions 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::axLocalRegions::pyramidToLocs ( const channel src,
const pyramid< channel > &  pyr,
std::list< location > &  locs 
) const [protected]

with the final DoG pyramid, compute the location list


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

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