23 using namespace Eigen;
57 inline bool empty()
const {
return _templates.empty(); }
59 inline int size()
const {
return (
int)_templates.size(); }
61 inline int width()
const {
return _largestTemplate.width; }
63 inline int height()
const {
return _largestTemplate.height; }
72 void addTemplate(cv::Mat& t);
74 void addTemplates(vector<cv::Mat>& t);
76 void copyTemplate(
const cv::Mat& t);
78 void copyTemplates(
const vector<cv::Mat>& t);
84 vector<cv::Mat> responses(
const cv::Mat& img,
int method = CV_TM_CCORR);
86 vector<cv::Mat> responses(
int method = CV_TM_CCORR);
88 cv::Mat response(
const cv::Mat& img,
unsigned tid,
int method = CV_TM_CCORR);
90 cv::Mat response(
unsigned tid,
int method = CV_TM_CCORR);
96 const cv::Mat& operator[](
unsigned i)
const;
100 void cacheDFTAndIntegrals(
const cv::Mat& image);
int size() const
returns the number of templates
Definition: drwnTemplateMatcher.h:59
cv::Size _largestTemplate
dimensions of the largest template
Definition: drwnTemplateMatcher.h:37
int height() const
returns the height of the largest template
Definition: drwnTemplateMatcher.h:63
int width() const
returns the width of the largest template
Definition: drwnTemplateMatcher.h:61
cv::Mat _imgSqSum
buffer for integral square image
Definition: drwnTemplateMatcher.h:45
vector< pair< double, double > > _templateStats
template mean and energy
Definition: drwnTemplateMatcher.h:36
Utility class for computing multiple template matches.
Definition: drwnTemplateMatcher.h:33
vector< cv::Mat > _templates
vector of templates to match
Definition: drwnTemplateMatcher.h:35
cv::Mat _dftResponse
buffer for response image
Definition: drwnTemplateMatcher.h:43
vector< cv::Mat > _dftTemplates
buffered templates in fourier space
Definition: drwnTemplateMatcher.h:41
cv::Size _imgSize
size of image being buffered
Definition: drwnTemplateMatcher.h:40
cv::Mat _imgSum
buffer for integral image
Definition: drwnTemplateMatcher.h:44
bool empty() const
returns true if there are no templates
Definition: drwnTemplateMatcher.h:57
cv::Mat _dftImage
buffered image in fourier space
Definition: drwnTemplateMatcher.h:42