1 #ifndef MTF_SPI_UTILS_H 2 #define MTF_SPI_UTILS_H 4 #include "mtf/Macros/common.h" 6 #include <boost/any.hpp> 12 enum class Types{ None, PixDiff, Gradient,
GFTT };
13 typedef std::vector<boost::any> ParamsType;
15 Base(VectorXb &_mask) :mask(_mask){}
20 PixDiff(VectorXb &mask,
const ParamsType ¶ms);
21 void initialize(
const PixValT &init_pix_vals);
22 void update(
const PixValT &init_pix_vals,
const PixValT &curr_pix_vals);
24 double pix_diff_thresh;
25 VectorXd rel_pix_diff;
29 Gradient(VectorXb &mask,
const ParamsType ¶ms);
30 void initialize(
const PixGradT &init_pix_grad);
31 void update(
const PixGradT &curr_pix_grad);
36 VectorXd pix_grad_norm;
41 GFTT(VectorXb &mask,
const ParamsType ¶ms);
42 void initialize(
const PixValT &init_pix_vals,
43 unsigned int _resx,
unsigned int _resy);
44 void update(
const PixValT &curr_pix_vals);
50 bool use_harris_detector;
54 unsigned int resx, resy, n_pix;
55 cv::Mat curr_patch_32f, good_locations;
57 void getMask(
const PixValT &curr_pix_vals, VectorXb &init_spi_mask);
60 double getMean(
const bool *spi_mask,
const VectorXd &vec,
63 void getMean(RowVectorXd &mean_vec,
const bool *spi_mask,
64 const MatrixXd &mat,
int n_rows);
66 void getMean(VectorXd &mean_vec,
const bool *spi_mask,
67 const MatrixXd &mat,
int n_cols);
68 void getProd(RowVectorXd &df_dp,
const bool *spi_mask,
69 const RowVectorXd &df_dI,
const MatrixXd &dI_dp,
70 int n_pix,
int n_channels);
71 void getDiffOfProd(RowVectorXd &df_dp,
const bool *spi_mask,
72 const RowVectorXd &df_dIt,
const MatrixXd &dIt_dp,
73 const RowVectorXd &df_dI0,
const MatrixXd &dI0_dp,
74 int n_pix,
int n_channels);
75 void expandMask(
bool *out_mask,
const bool *in_mask,
int res_ratio_x,
76 int res_ratio_y,
int in_resx,
int in_resy,
int out_resx,
int out_resy);
Definition: spiUtils.h:19
Definition: spiUtils.h:28
Definition: spiUtils.h:14
basic functions for preprocessing the raw input image using filtering, resizing and histogram equaliz...
Definition: histUtils.h:20
Definition: FeatureTracker.h:100