class
TemplateMatchingMatch a template image to an image.
Contents
This algorithms matches a template image to an image using normalized cross correlation (NCC), sum of absolute differences (SAD) or sum of squared differences (SSD).
Base classes
- class ProcessObject
- Abstract base class for all process objects.
Public functions
- auto create(MatchingMetric matchingType, Vector2i center, Vector2i offset) void setRegionOfInterest(Vector2i center -> std::shared_ptr<TemplateMatching>
- auto getBestFitPixelPosition() const -> Vector2i
- auto getBestFitSubPixelPosition() const -> Vector2f
- void setMatchingMetric(MatchingMetric type)
Public variables
- Vector2i offset
Private functions
- void execute() override
Function documentation
std::shared_ptr<TemplateMatching> fast:: TemplateMatching:: create(MatchingMetric matchingType,
Vector2i center,
Vector2i offset) void setRegionOfInterest(Vector2i center
Parameters | |
---|---|
matchingType | |
center | 2D position |
offset |
Set region of interest of where to do the template matching.
Vector2i fast:: TemplateMatching:: getBestFitPixelPosition() const
Returns | Vector2i |
---|
Get position of best fit
Vector2f fast:: TemplateMatching:: getBestFitSubPixelPosition() const
Returns | Vector2f |
---|
Get position of best fit with sub pixel accuracy using parabolic fitting
void fast:: TemplateMatching:: setMatchingMetric(MatchingMetric type)
Parameters | |
---|---|
type |
Select which matching metric to use