MTF
PFParams.h
1 #ifndef MTF_PF_PARAMS_H
2 #define MTF_PF_PARAMS_H
3 
4 #include "mtf/Macros/common.h"
5 
6 _MTF_BEGIN_NAMESPACE
7 
8 struct PFParams{
9  // supported dynamic models for sample generation
10  enum class DynamicModel{
11  RandomWalk,
12  AutoRegression1
13  };
14  enum class UpdateType{
15  Additive,
16  Compositional
17  };
18  enum class ResamplingType{
19  None,
20  BinaryMultinomial,
21  LinearMultinomial,
22  Residual
23  };
24  enum class LikelihoodFunc{
25  AM,
26  Gaussian,
27  Reciprocal
28  };
29  enum class MeanType{
30  None,
31  SSM,
32  Corners
33  };
34  static const char* toString(DynamicModel _dyn_model);
35  static const char* toString(UpdateType _upd_type);
36  static const char* toString(ResamplingType _resampling_type);
37  static const char* toString(LikelihoodFunc _likelihood_func);
38  static const char* toString(MeanType _likelihood_func);
40  int max_iters;
44  double epsilon;
45  DynamicModel dynamic_model;
46  UpdateType update_type;
47  LikelihoodFunc likelihood_func;
48  ResamplingType resampling_type;
55  MeanType mean_type;
61  vectorvd ssm_sigma;
65  vectorvd ssm_mean;
75  double min_distr_wt;
82  vectord pix_sigma;
83  double measurement_sigma;
84  int show_particles;
85  bool enable_learning;
86  bool jacobian_as_sigma;
88  bool debug_mode;
89  PFParams(int _max_iters, int _n_particles, double _epsilon,
90  DynamicModel _dyn_model, UpdateType _upd_type,
91  LikelihoodFunc _likelihood_func,
92  ResamplingType _resampling_type,
93  MeanType _mean_type, bool _reset_to_mean,
94  const vectorvd &_ssm_sigma, const vectorvd &_ssm_mean,
95  bool _update_distr_wts, double _min_distr_wt,
96  double _adaptive_resampling_thresh,
97  const vectord &_pix_sigma, double _measurement_sigma,
98  int _show_particles, bool _enable_learning,
99  bool _jacobian_as_sigma, bool _debug_mode);
100  PFParams(const PFParams *params = nullptr);
105  bool processDistributions(vector<VectorXd> &state_sigma,
106  vector<VectorXd> &state_mean, VectorXi &distr_n_samples,
107  unsigned int &n_distr, unsigned int ssm_state_size);
108 };
109 
110 _MTF_END_NAMESPACE
111 
112 #endif
113 
bool reset_to_mean
reset all particles to the mean/optimal corners found in each frame
Definition: PFParams.h:57
Definition: PFParams.h:8
MeanType mean_type
method used for computing the mean of the SSM states corresponding to the particles.
Definition: PFParams.h:55
bool debug_mode
decides whether logging data will be printed for debugging purposes;
Definition: PFParams.h:88
bool update_distr_wts
update the proportion of samples taken from different sampler according to the weights of the samples...
Definition: PFParams.h:70
vectorvd ssm_mean
mean of the Gaussian distributions to use for the samplers
Definition: PFParams.h:65
double adaptive_resampling_thresh
maximum ratio between the number of effective particles and the total particles for resampling to be ...
Definition: PFParams.h:81
double epsilon
iterations will be terminated when L2 norm of the change in tracker corners exceeds this ...
Definition: PFParams.h:44
double min_distr_wt
fraction of the total particles that will always be evenly distributed between the samplers; ...
Definition: PFParams.h:75
bool processDistributions(vector< VectorXd > &state_sigma, vector< VectorXd > &state_mean, VectorXi &distr_n_samples, unsigned int &n_distr, unsigned int ssm_state_size)
parse the provided mean and sigma and apply several priors to get the final parameters for all distri...
int max_iters
maximum iterations of the PF algorithm to run for each frame
Definition: PFParams.h:40
int n_particles
number of particles to use
Definition: PFParams.h:42
vectorvd ssm_sigma
standarsd deviations of the Gaussian distributions to use for the samplers
Definition: PFParams.h:61