Class cv::detail::tracking::tbm::MatchTemplateDistance#
Computes distance between images using MatchTemplate function from OpenCV library and its cross-correlation computation method in particular.
#include <opencv2/tracking/tracking_by_matching.hpp>Collaboration diagram for cv::detail::tracking::tbm::MatchTemplateDistance:
Public Member Functions#
Public Member Functions inherited from cv::detail::tracking::tbm::IDescriptorDistance
Return |
Name |
Description |
|---|---|---|
|
Computes distance between two descriptors. |
|
|
|
Computes distances between two descriptors in batches. |
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::detail::tracking::tbm::MatchTemplateDistance::MatchTemplateDistance(
int type = cv::TemplateMatchModes::TM_CCORR_NORMED,
float scale = -1,
float offset = 1 )
Constructs the distance object.
Parameters
type— Method of MatchTemplate function computation.scale— Scale parameter for the distance. Final distance is computed as: scale * distance + offset.offset— Offset parameter for the distance. Final distance is computed as: scale * distance + offset.
~MatchTemplateDistance()#
cv::detail::tracking::tbm::MatchTemplateDistance::~MatchTemplateDistance()
Member Function Documentation#
compute()#
float cv::detail::tracking::tbm::MatchTemplateDistance::compute(
const cv::Mat & descr1,
const cv::Mat & descr2 )
Computes distance between image descriptors.
Parameters
descr1— First image descriptor.descr2— Second image descriptor.
Returns
Distance between image descriptors.
compute()#
std::vector< float > cv::detail::tracking::tbm::MatchTemplateDistance::compute(
const std::vector< cv::Mat > & descrs1,
const std::vector< cv::Mat > & descrs2 )
Computes distances between two descriptors in batches.
Parameters
descrs1— Batch of first descriptors.descrs2— Batch of second descriptors.
Returns
Distances between descriptors.
Member Data Documentation#
offset_#
float cv::detail::tracking::tbm::MatchTemplateDistance::offset_
Offset parameter for the distance. Final distance is computed as: scale * distance + offset.
scale_#
float cv::detail::tracking::tbm::MatchTemplateDistance::scale_
Scale parameter for the distance. Final distance is computed as: scale * distance + offset.
type_#
int cv::detail::tracking::tbm::MatchTemplateDistance::type_
Method of MatchTemplate function computation.
Source file#
The documentation for this class was generated from the following file:
opencv2/tracking/tracking_by_matching.hpp