19#include <opencv2/video/tracking.hpp>
55 public jevois::Parameter<kalman1d::usevel, kalman1d::procnoise,
56 kalman1d::measnoise, kalman1d::postnoise>
60 Kalman1D(std::string
const & instance);
74 float get(
float const eps = 0.01F);
78 void onParamChange(kalman1d::usevel
const & param,
bool const & newval)
override;
79 void onParamChange(kalman1d::procnoise
const & param,
float const & newval)
override;
80 void onParamChange(kalman1d::measnoise
const & param,
float const & newval)
override;
81 void onParamChange(kalman1d::postnoise
const & param,
float const & newval)
override;
Simple component to track a moving 2D point over time using a Kalman filter.
void onParamChange(kalman1d::postnoise const ¶m, float const &newval) override
void onParamChange(kalman1d::measnoise const ¶m, float const &newval) override
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(usevel, bool, "Use velocity tracking, in addition to position", false, ParamCateg)
Parameter.
void onParamChange(kalman1d::procnoise const ¶m, float const &newval) override
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(procnoise, float, "Process noise standard deviation", 0.003F, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(measnoise, float, "Measurement noise standard deviation", 0.05F, ParamCateg)
Parameter.
float get(float const eps=0.01F)
Function to call each time you want to get the Kalman-filtered coordinates.
virtual ~Kalman1D()
Destructor.
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(postnoise, float, "A posteriori error estimate standard deviation", 0.3F, ParamCateg)
Parameter.
void onParamChange(kalman1d::usevel const ¶m, bool const &newval) override
void set(float x)
Function to call each time you have a new measurement.