
#include <Channels/TemplateMatchChannel.H>
Inheritance diagram for TemplateMatchChannel:


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 |
|
||||||||||||
|
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. |
|
|
Virtual destructor.
Definition at line 65 of file TemplateMatchChannel.C. |
|
||||||||||||
|
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(). |
|
||||||||||||||||||||
|
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(). |
|
|
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(). |
1.4.4