39 int _sub_regions_x,
int _sub_regions_y,
40 int _spacing_x,
int _spacing_y,
41 bool _affine_mapping,
bool _once_per_frame,
42 int _n_bins,
double _pre_seed,
bool _weighted_mapping,
43 bool _show_subregions,
bool _approx_dist_feat);
49 typedef double ElementType;
50 typedef double ResultType;
51 LSCVDist(
const string &_name,
const bool _approx_dist_feat,
52 const int _n_bins,
const int _n_sub_regions_x,
const int _n_sub_regions_y,
53 const int _n_sub_regions,
const unsigned int _n_pix,
54 const unsigned int _resx,
const unsigned int _resy,
55 const MatrixX2i *_sub_region_x,
const MatrixX2i *_sub_region_y,
56 const MatrixXd *_sub_region_wts,
const MatrixXi *_subregion_idx,
57 const ColPivHouseholderQR<MatrixX2d> *_intensity_vals_dec);
58 double operator()(
const double* a,
const double* b,
59 size_t size,
double worst_dist = -1)
const override;
62 const unsigned int n_pix,
resx, resy;
64 const MatrixX2i *sub_region_x, *sub_region_y;
65 const MatrixXd *sub_region_wts;
66 const MatrixXi *subregion_idx;
67 const ColPivHouseholderQR<MatrixX2d> *intensity_vals_dec;
78 LSCV(
const ParamType *lscv_params =
nullptr,
int _n_channels=1);
80 void initializePixVals(
const Matrix2Xd& init_pts)
override;
81 void updatePixVals(
const Matrix2Xd& curr_pts)
override;
83 void updateSimilarity(
bool prereq_only =
true)
override;
85 const DistType* getDistFunc()
override{
86 return new DistType(name, params.approx_dist_feat, n_pix,
resx, resy,
87 params.n_bins, params.n_sub_regions_x, params.n_sub_regions_y,
88 n_sub_regions, &sub_region_x, &sub_region_y, &sub_region_wts,
89 &_subregion_idx, &intensity_vals_dec);
99 VectorXd intensity_map;
102 int sub_region_size_x, sub_region_size_y;
108 VectorXd init_hist, curr_hist;
110 MatrixXdMr init_patch, curr_patch;
111 MatrixX2i sub_region_x, sub_region_y;
112 MatrixX2d sub_region_centers;
114 MatrixX2d intensity_vals;
115 ColPivHouseholderQR<MatrixX2d> intensity_vals_dec;
116 MatrixXd sub_region_wts;
119 MatrixX2i _std_bspl_ids;
120 MatrixX2i _init_bspl_ids;
121 MatrixX2i _curr_bspl_ids;
123 MatrixXi _subregion_idx;
127 cv::Mat patch_img_uchar;
128 char *patch_win_name;
132 void showSubRegions(
const EigImgT& img,
const Matrix2Xd& pts);
int n_sub_regions_x
no. of sub regions in horizontal and vertical directions
Definition: LSCV.h:11
int resx
horizontal and vertical sampling resolutions
Definition: ImageBase.h:23
Locally adaptive Sum of Conditional Variance.
Definition: LSCV.h:71
bool approx_dist_feat
decides whether logging data will be printed for debugging purposes; only matters if logging option i...
Definition: LSCV.h:35
Definition: AMParams.h:12
base class for appearance models that use the negative sum of squared differences ("SSD") or L2 norm ...
Definition: SSDBase.h:16
LSCVParams(const AMParams *am_params, int _sub_regions_x, int _sub_regions_y, int _spacing_x, int _spacing_y, bool _affine_mapping, bool _once_per_frame, int _n_bins, double _pre_seed, bool _weighted_mapping, bool _show_subregions, bool _approx_dist_feat)
value constructor
int n_bins
no. of bins in the histograms
Definition: LSCV.h:20
bool weighted_mapping
enable this to map each intensity to the weighted average of the two entries of the intensity map cor...
Definition: LSCV.h:28
int spacing_x
spacing in pixels between adjacent sub regions
Definition: LSCV.h:13
MatrixXd curr_joint_hist
n_bins x n_bins joint histograms;
Definition: LSCV.h:107
double pre_seed
initial value with which each bin of the joint histogram is pre-seeded to avoid numerical instabiliti...
Definition: LSCV.h:23