| OpenCV 4.3.0 Open Source Computer Vision

Public Member Functions | List of all members
cv::tbm::MatchTemplateDistance Class Reference

Computes distance between images using MatchTemplate function from OpenCV library and its cross-correlation computation method in particular. More...

`#include <opencv2/tracking/tracking_by_matching.hpp>`

Inheritance diagram for cv::tbm::MatchTemplateDistance:

## Public Member Functions
| MatchTemplateDistance (int type=cv::TemplateMatchModes::TM_CCORR_NORMED, float scale=-1, float offset=1)
| Constructs the distance object. More...
virtual | ~MatchTemplateDistance ()
float | compute (const cv::Mat &descr1, const cv::Mat &descr2) override
| Computes distance between image descriptors. More...
std::vector< float > | compute (const std::vector< cv::Mat > &descrs1, const std::vector< cv::Mat > &descrs2) override
| Computes distances between two descriptors in batches. More...
Public Member Functions inherited from cv::tbm::IDescriptorDistance
virtual | ~IDescriptorDistance ()

## Detailed Description

Computes distance between images using MatchTemplate function from OpenCV library and its cross-correlation computation method in particular.

## Constructor & Destructor Documentation

## ◆ MatchTemplateDistance()

cv::tbm::MatchTemplateDistance::MatchTemplateDistance | ( | int | type = `cv::TemplateMatchModes::TM_CCORR_NORMED`,
|  | float | scale = `-1`,
|  | float | offset = `1`
| ) |  |
| inline

Constructs the distance object.

Parameters

  [in] | type | Method of MatchTemplate function computation.
  [in] | scale | Scale parameter for the distance. Final distance is computed as: scale * distance + offset.
  [in] | offset | Offset parameter for the distance. Final distance is computed as: scale * distance + offset.

## ◆ ~MatchTemplateDistance()

virtual cv::tbm::MatchTemplateDistance::~MatchTemplateDistance | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ compute() [1/2]

float cv::tbm::MatchTemplateDistance::compute | ( | const cv::Mat & | descr1,
|  | const cv::Mat & | descr2
| ) |  |
| override virtual

Computes distance between image descriptors.

Parameters

  [in] | descr1 | First image descriptor.
  [in] | descr2 | Second image descriptor.

Returns
  Distance between image descriptors.

Implements cv::tbm::IDescriptorDistance.

## ◆ compute() [2/2]

std::vector<float> cv::tbm::MatchTemplateDistance::compute | ( | const std::vector< cv::Mat > & | descrs1,
|  | const std::vector< cv::Mat > & | descrs2
| ) |  |
| override virtual

Computes distances between two descriptors in batches.

Parameters

  [in] | descrs1 | Batch of first descriptors.
  [in] | descrs2 | Batch of second descriptors.

Returns
  Distances between descriptors.

Implements cv::tbm::IDescriptorDistance.

The documentation for this class was generated from the following file:

- opencv2/tracking/tracking_by_matching.hpp