Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
icl::cv::ViewBasedTemplateMatcher Class Reference

TemplateMatching class (wrapping UsefulFunctions::matchTemplate) More...

#include <ViewBasedTemplateMatcher.h>

List of all members.

Public Types

enum  mode { sqrtDistance, crossCorrelation }
 internally use matching mode More...

Public Member Functions

 ViewBasedTemplateMatcher (float significance=0.9, mode m=sqrtDistance, bool clipBuffersToROI=false)
 Create a new ViewBasedTemplateMatcher instance with given matching significance and mode.
void setSignificance (float significance)
 set significance level
void setMode (mode m)
 set matching mode (see constructor description)
void setClipBuffersToROI (bool flag)
 set buffer clipping mode (see constructor description)
const std::vector< utils::Rect > & match (const core::Img8u &image, const core::Img8u &templ, const core::Img8u &imageMask=core::Img8u::null, const core::Img8u &templMask=core::Img8u::null)
 apply matching with given image and template (optionally image and template masks can be given)
const core::Img8u getBuffer ()
 returns the interanly used binary buffer buffer

Private Attributes

float m_fSignificance
 significance level
mode m_eMode
 matching mode
bool m_bClipBuffersToROI
 buffer clipping mode
utils::UncopiedInstance
< RegionDetector
m_oRD
 internally recycled RegionDetector instance
utils::UncopiedInstance
< core::Img8u
m_aoBuffers [3]
 interanlly used buffers
std::vector< utils::Rectm_vecResults
 internal result buffer

Detailed Description

TemplateMatching class (wrapping UsefulFunctions::matchTemplate)


Member Enumeration Documentation

internally use matching mode

Enumerator:
sqrtDistance 

use square distance proximity measurement

crossCorrelation 

use normalized cross correlation proximity measurement


Constructor & Destructor Documentation

icl::cv::ViewBasedTemplateMatcher::ViewBasedTemplateMatcher ( float  significance = 0.9,
mode  m = sqrtDistance,
bool  clipBuffersToROI = false 
)

Create a new ViewBasedTemplateMatcher instance with given matching significance and mode.

Parameters:
significancesignificance level for matching appropriate range depends on matching mode
mmatching mode:
  • sqrtDistance (better mode for good matching) appropriate range; [0.5,...]
  • crossCorrelation appropriate range: [0.92, ...]
clipBuffersToROIif set, internally all buffers are clipped to ROI. This might be usefull, if given templates and source images do change size in successive calls otherwise, it's more efficient, to use buffers of constant size and to adapt the bufers ROI only.

Member Function Documentation

returns the interanly used binary buffer buffer

const std::vector<utils::Rect>& icl::cv::ViewBasedTemplateMatcher::match ( const core::Img8u image,
const core::Img8u templ,
const core::Img8u imageMask = core::Img8u::null,
const core::Img8u templMask = core::Img8u::null 
)

apply matching with given image and template (optionally image and template masks can be given)

set buffer clipping mode (see constructor description)

set matching mode (see constructor description)

set significance level

Parameters:
significancesignificance level (apropriate range depends on matching mode
See also:
class constructor for more detail

Member Data Documentation

interanlly used buffers

buffer clipping mode

matching mode

significance level

internally recycled RegionDetector instance

internal result buffer


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines