Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TemplateMatchChannel Class Reference

#include <Channels/TemplateMatchChannel.H>

Inheritance diagram for TemplateMatchChannel:

Inheritance graph
[legend]
Collaboration diagram for TemplateMatchChannel:

Collaboration graph
[legend]
List of all members.

Detailed Description

Convolves each level of its pyramid with a feature template.

This type of channel is useful for searching for a specific feature shape at multiple scales. For example, it is used by VisualCortex to search for possible pedestrians in an input image.

Definition at line 48 of file TemplateMatchChannel.H.

Public Member Functions

 TemplateMatchChannel (OptionManager &mgr, const Image< float > &filt)
 Construct with the standard params, plus a filter specification.
virtual ~TemplateMatchChannel ()
 Virtual destructor.
void findBestMatch (const Rectangle &r, Point2D< int > &matchpos, int &match_lev, float &score)
 Look for the most likely template match in a given rectangular region.
virtual void drawResults (Image< PixRGB< byte > > &traj, const Rectangle &foa)
 Draws a box in traj around the last best template match found.

Protected Member Functions

virtual void start1 ()

Protected Attributes

Point2D< int > itsBestMatchPos
int itsBestMatchLev
float itsBestMatchScore
Dims itsFiltDims


Constructor & Destructor Documentation

TemplateMatchChannel::TemplateMatchChannel OptionManager mgr,
const Image< float > &  filt
 

Construct with the standard params, plus a filter specification.

The filter is specified by a C array, which will be interpreted to have dimensions filt_x and filt_y. A private copy of the filter will be made, so the filt pointer does not have to be persistent.

Definition at line 54 of file TemplateMatchChannel.C.

TemplateMatchChannel::~TemplateMatchChannel  )  [virtual]
 

Virtual destructor.

Definition at line 65 of file TemplateMatchChannel.C.


Member Function Documentation

void TemplateMatchChannel::drawResults Image< PixRGB< byte > > &  traj,
const Rectangle foa
[virtual]
 

Draws a box in traj around the last best template match found.

Definition at line 105 of file TemplateMatchChannel.C.

References drawRect(), findBestMatch(), Dims::h(), Point2D< T >::i, itsBestMatchLev, itsBestMatchPos, itsFiltDims, Point2D< T >::j, rutz::max(), rutz::min(), Rectangle::tlbrI(), and Dims::w().

void TemplateMatchChannel::findBestMatch const Rectangle r,
Point2D< int > &  matchpos,
int &  match_lev,
float &  score
 

Look for the most likely template match in a given rectangular region.

The position of the match in 0-level coordinates is returned in matchpos, the pyramid level at which the match was found is returned in match_lev, and a score rating the goodness of the match is returned in score.

Definition at line 74 of file TemplateMatchChannel.C.

References crop(), findMax(), ChannelBase::getInputDims(), OModelParam< T >::getVal(), Point2D< T >::i, i, itsBestMatchLev, itsBestMatchPos, itsBestMatchScore, SingleChannel::itsLevelSpec, Point2D< T >::j, Rectangle::left(), LevelSpec::levMax(), LevelSpec::levMin(), LINFO, p, rescale(), and Rectangle::top().

Referenced by drawResults().

void TemplateMatchChannel::start1  )  [protected, virtual]
 

If you overload this, make sure you call SingleChannel::start1() at the beginning of your overload

Reimplemented from SingleChannel.

Reimplemented in PedestrianChannel.

Definition at line 68 of file TemplateMatchChannel.C.

References SingleChannel::start1().

Referenced by PedestrianChannel::start1().


The documentation for this class was generated from the following files:
Generated on Mon Nov 23 15:51:19 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4