MTF
Public Types | Public Member Functions | List of all members
SSDBaseDist Struct Reference

base class for appearance models that use the negative sum of squared differences ("SSD") or L2 norm of the difference between the initial and current pixel values (original or modified) as the similarity measure More...

#include <SSDBase.h>

Inheritance diagram for SSDBaseDist:
AMDist LSCVDist RSCVDist SCVDist SSDDist

Public Types

typedef bool is_kdtree_distance
 
typedef double ElementType
 
typedef double ResultType
 
- Public Types inherited from AMDist
typedef double ElementType
 
typedef double ResultType
 

Public Member Functions

 SSDBaseDist (const string &_name)
 
double operator() (const double *a, const double *b, size_t size, double worst_dist=-1) const override
 Squared Euclidean distance functor, optimized version. More...
 
double accum_dist (const double &a, const double &b, int) const
 Partial euclidean distance, using just one dimension. More...
 
- Public Member Functions inherited from AMDist
 AMDist (const string &_name)
 

Additional Inherited Members

- Public Attributes inherited from AMDist
const string name
 

Detailed Description

base class for appearance models that use the negative sum of squared differences ("SSD") or L2 norm of the difference between the initial and current pixel values (original or modified) as the similarity measure

Member Function Documentation

double SSDBaseDist::accum_dist ( const double &  a,
const double &  b,
int   
) const
inline

Partial euclidean distance, using just one dimension.

This is used by the kd-tree when computing partial distances while traversing the tree.

Squared root is omitted for efficiency.

double SSDBaseDist::operator() ( const double *  a,
const double *  b,
size_t  size,
double  worst_dist = -1 
) const
overridevirtual

Squared Euclidean distance functor, optimized version.

Compute the squared Euclidean distance between two vectors.

This is highly optimized, with loop unrolling, as it is one of the most expensive inner loops.

The computation of squared root at the end is omitted for efficiency.

Reimplemented from AMDist.


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