4 #include "AppearanceModel.h" 9 typedef bool is_kdtree_distance;
10 typedef double ElementType;
11 typedef double ResultType;
13 double operator()(
const double* a,
const double* b,
14 size_t size,
double worst_dist = -1)
const override;
15 double accum_dist(
const double& a,
const double& b,
int)
const{
31 const int _n_channels = 1);
32 void initializeSimilarity()
override;
34 double getLikelihood()
const override;
38 void updateSimilarity(
bool prereq_only =
true)
override;
44 return new DistType(name);
47 for(
size_t pix = 0; pix < feat_size; ++pix) {
48 *feat_addr++ = It(pix);
53 const double* getDistFeat()
override{
return It.data(); }
57 double likelihood_alpha;
58 unsigned int feat_size;
void updateDistFeat() override
computes a "distance" vector using the current image patch such that, when the distance vectors corre...
Definition: SAD.h:52
double operator()(const double *a, const double *b, size_t size, double worst_dist=-1) const override
computes the distance / dissimilarity between two patches where each is codified or represented by a ...
Definition: AMParams.h:12
Distance functor for FLANN.
Definition: AppearanceModel.h:40
const DistType * getDistFunc() override
Support for FLANN library.
Definition: SAD.h:43
unsigned int getDistFeatSize() override
returns the size of the distance vector
Definition: SAD.h:54
void initializeDistFeat() override
to be called once during initialization if any of the distance feature functionality is to be used ...
Definition: SAD.h:51
Similarity function that indicates how well a candidate warped patch matches the template.
Definition: AppearanceModel.h:63
void updateDistFeat(double *feat_addr) override
overloaded version to write the distance feature directly to a row (or column) of a matrix storing th...
Definition: SAD.h:46
Sum of Absolute Differences or L1 norm of raw pixel values This is not differentiable so the derivati...
Definition: SAD.h:24