OpenCV  4.10.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cv::detail::tracking::tbm::CosDistance Class Reference

The CosDistance class allows computing cosine distance between two reidentification descriptors. More...

#include <opencv2/tracking/tracking_by_matching.hpp>

Collaboration diagram for cv::detail::tracking::tbm::CosDistance:

Public Member Functions

 CosDistance (const cv::Size &descriptor_size)
 CosDistance constructor.
 
float compute (const cv::Mat &descr1, const cv::Mat &descr2) override
 Computes distance between two descriptors.
 
std::vector< float > compute (const std::vector< cv::Mat > &descrs1, const std::vector< cv::Mat > &descrs2) override
 Computes distances between two descriptors in batches.
 
- Public Member Functions inherited from cv::detail::tracking::tbm::IDescriptorDistance
virtual ~IDescriptorDistance ()
 

Detailed Description

The CosDistance class allows computing cosine distance between two reidentification descriptors.

Constructor & Destructor Documentation

◆ CosDistance()

cv::detail::tracking::tbm::CosDistance::CosDistance ( const cv::Size descriptor_size)
explicit

CosDistance constructor.

Parameters
[in]descriptor_sizeDescriptor size.

Member Function Documentation

◆ compute() [1/2]

float cv::detail::tracking::tbm::CosDistance::compute ( const cv::Mat descr1,
const cv::Mat descr2 
)
overridevirtual

Computes distance between two descriptors.

Parameters
descr1First descriptor.
descr2Second descriptor.
Returns
Distance between two descriptors.

Implements cv::detail::tracking::tbm::IDescriptorDistance.

◆ compute() [2/2]

std::vector< float > cv::detail::tracking::tbm::CosDistance::compute ( const std::vector< cv::Mat > &  descrs1,
const std::vector< cv::Mat > &  descrs2 
)
overridevirtual

Computes distances between two descriptors in batches.

Parameters
[in]descrs1Batch of first descriptors.
[in]descrs2Batch of second descriptors.
Returns
Distances between descriptors.

Implements cv::detail::tracking::tbm::IDescriptorDistance.


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