OpenCV  4.2.0
Open Source Computer Vision
Public Member Functions | List of all members
cv::tbm::CosDistance Class Reference

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

#include <opencv2/tracking/tracking_by_matching.hpp>

Inheritance diagram for cv::tbm::CosDistance:
cv::tbm::IDescriptorDistance

Public Member Functions

 CosDistance (const cv::Size &descriptor_size)
 CosDistance constructor. More...
 
float compute (const cv::Mat &descr1, const cv::Mat &descr2) override
 Computes distance between two 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

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

Constructor & Destructor Documentation

◆ CosDistance()

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

CosDistance constructor.

Parameters
[in]descriptor_sizeDescriptor size.

Member Function Documentation

◆ compute() [1/2]

float cv::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::tbm::IDescriptorDistance.

◆ compute() [2/2]

std::vector<float> cv::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::tbm::IDescriptorDistance.


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