![]()  | 
  
  
  
    Face Engine SDK
    5.26.0
    
   A face detection, recognition and tracking engine. 
   | 
  
  
  
 
Descriptor matcher interface. More...
#include <IDescriptor.h>
  
 Public Member Functions | |
| virtual ResultValue< FSDKError,  MatchingResult >  | match (const IDescriptor *first, const IDescriptor *second) noexcept=0 | 
| Match descriptors 1:1.   | |
| virtual Result< FSDKError > | match (const IDescriptor *reference, const IDescriptorBatch *candidates, Span< MatchingResult > results) noexcept=0 | 
| Match descriptors 1:M.   | |
| virtual uint32_t | getModelVersion () const noexcept=0 | 
| Get algorithm model version this matcher works with.   | |
| virtual Result< FSDKError > | calcSimilarity (Span< MatchingResult > distances) const noexcept=0 | 
| Calculates similarity based on distance.   | |
| virtual Result< FSDKError > | calcDistance (Span< MatchingResult > similarities) const noexcept=0 | 
| Calculates distance from similarity.   | |
Descriptor matcher interface.
Matches descriptors 1:1 and 1:M (
As a result of the matching process the calling site gets a MatchingResult (or several of them in case of 1:M matching). The MatchingResult structure contains distance and similarity metrics.
Distance is measured in abstract units and tends to 0 for similar descriptors and to infinity for different ones. Similarity is the opposite metric and shows probability of two descriptors belonging to the same person; therfore it is normalized to [0..1] range.
| virtual Result<FSDKError> fsdk::IDescriptorMatcher::calcDistance | ( | Span< MatchingResult > | similarities | ) |  const [pure virtual] | 
        
Calculates distance from similarity.
The method gets similarity from `similarities`[i].similarity and assigns the result to `similarities`[i].distance.
| [in] | similarities | is a mutable span of matching results with calculated similarity. | 
| virtual Result<FSDKError> fsdk::IDescriptorMatcher::calcSimilarity | ( | Span< MatchingResult > | distances | ) |  const [pure virtual] | 
        
Calculates similarity based on distance.
The method gets distance from `distances`[i].distances. and assigns the result to `distances`[i].similarity.
| [in] | dinstances | is a mutable span of matching results with calculated distances. | 
| virtual uint32_t fsdk::IDescriptorMatcher::getModelVersion | ( | ) |  const [pure virtual] | 
        
Get algorithm model version this matcher works with.
| virtual ResultValue<FSDKError, MatchingResult> fsdk::IDescriptorMatcher::match | ( | const IDescriptor * | first, | 
| const IDescriptor * | second | ||
| ) |  [pure virtual] | 
        
Match descriptors 1:1.
| [in] | first | first descriptor. | 
| [in] | second | second descriptor. | 
| virtual Result<FSDKError> fsdk::IDescriptorMatcher::match | ( | const IDescriptor * | reference, | 
| const IDescriptorBatch * | candidates, | ||
| Span< MatchingResult > | results | ||
| ) |  [pure virtual] | 
        
Match descriptors 1:M.
Matches a reference descriptor to a batch of candidate descriptors. The results are layed out in the same order as the candidate descriptors in the batch.
| [in] | reference | the reference descriptor. | 
| [in] | candidates | the candidate descriptor batch to match with the reference. | 
| [out] | results | span of matching results. |