| OpenCV 4.3.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:

## 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_size | Descriptor size.

## Member Function Documentation

## ◆ compute() [1/2]

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

Computes distance between two descriptors.

Parameters

  descr1 | First descriptor.
  descr2 | Second 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
| ) |  |
| 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