4 #include "AppearanceModel.h"    21     typedef double ElementType;
    22     typedef double ResultType;
    23     RIUDist(
const string &_name, 
const bool _dist_from_likelihood,
    24         const double _likelihood_alpha, 
const unsigned int _patch_size);
    25     double operator()(
const double* a, 
const double* b,
    26         size_t size, 
double worst_dist = -1) 
const override;
    30     const unsigned int patch_size;
    39     RIU(
const ParamType *riu_params = 
nullptr, 
const int _n_channels = 1);
    41     double getLikelihood() 
const override;
    46     void initializeSimilarity() 
override;
    47     void initializeGrad() 
override;
    51     void updateSimilarity(
bool prereq_only = 
true) 
override;
    52     void updateInitGrad() 
override;
    53     void updateCurrGrad() 
override;
    56     void cmptInitHessian(MatrixXd &init_hessian, 
const MatrixXd &init_pix_jacobian) 
override;
    57     void cmptInitHessian(MatrixXd &init_hessian, 
const MatrixXd &init_pix_jacobian,
    58         const MatrixXd &init_pix_hessian) 
override;
    59     void cmptCurrHessian(MatrixXd &curr_hessian, 
const MatrixXd &curr_pix_jacobian) 
override;
    60     void cmptCurrHessian(MatrixXd &curr_hessian, 
const MatrixXd &curr_pix_jacobian,
    61         const MatrixXd &curr_pix_hessian) 
override;
    62         void cmptSelfHessian(MatrixXd &self_hessian, 
const MatrixXd &curr_pix_jacobian) 
override;
    63     void cmptSelfHessian(MatrixXd &self_hessian, 
const MatrixXd &curr_pix_jacobian,
    64         const MatrixXd &curr_pix_hessian) 
override;
    67     VectorXd curr_feat_vec;
    68     const DistType* getDistFunc()
 override{
    69         return new DistType(name, params.dist_from_likelihood, 
    70             params.likelihood_alpha, patch_size);
    74         curr_feat_vec.resize(patch_size + 1);
    76     void updateDistFeat(
double* feat_addr) 
override;
    77     const double* getDistFeat()
 override{ 
return curr_feat_vec.data(); }
    79         updateDistFeat(curr_feat_vec.data());
    90     VectorXd dr_dIt, dr_dI0;
 
bool dist_from_likelihood
use negative of likelihood as the distance measure 
Definition: AMParams.h:17
 
void updateDistFeat() override
computes a "distance" vector using the current image patch such that, when the distance vectors corre...
Definition: RIU.h:78
 
double likelihood_alpha
multiplicative and additive factors for the exponent in the likelihood 
Definition: AMParams.h:15
 
bool isSymmetrical() const override
return false if the similarity function f is not symmetrical, i.e. 
Definition: RIU.h:43
 
Definition: AMParams.h:12
 
bool debug_mode
decides whether logging data will be printed for debugging purposes; only matters if logging is enabl...
Definition: RIU.h:12
 
Ratio Image Uniformity. 
Definition: RIU.h:34
 
Distance functor for FLANN. 
Definition: AppearanceModel.h:40
 
unsigned int getDistFeatSize() override
returns the size of the distance vector 
Definition: RIU.h:72
 
RIUParams(const AMParams *am_params, bool _debug_mode)
value constructor 
 
Similarity function that indicates how well a candidate warped patch matches the template. 
Definition: AppearanceModel.h:63
 
void initializeHess() override
even though the Hessian of the error norm w.r.t. 
Definition: RIU.h:48
 
void initializeDistFeat() override
to be called once during initialization if any of the distance feature functionality is to be used ...
Definition: RIU.h:73