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>
Computes distance between images using MatchTemplate function from OpenCV library and its cross-correlation computation method in particular.
◆ MatchTemplateDistance()
cv::detail::tracking::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::detail::tracking::tbm::MatchTemplateDistance::~MatchTemplateDistance |
( |
| ) |
|
|
inlinevirtual |
◆ compute() [1/2]
float cv::detail::tracking::tbm::MatchTemplateDistance::compute |
( |
const cv::Mat & |
descr1, |
|
|
const cv::Mat & |
descr2 |
|
) |
| |
|
overridevirtual |
◆ compute() [2/2]
std::vector<float> cv::detail::tracking::tbm::MatchTemplateDistance::compute |
( |
const std::vector< cv::Mat > & |
descrs1, |
|
|
const std::vector< cv::Mat > & |
descrs2 |
|
) |
| |
|
overridevirtual |
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::detail::tracking::tbm::IDescriptorDistance.
The documentation for this class was generated from the following file: