内容填充
This commit is contained in:
26
KalmanFilter.h
Normal file
26
KalmanFilter.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef KALMANFILTER_H
|
||||
#define KALMANFILTER_H
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class KalmanFilter {
|
||||
public:
|
||||
KalmanFilter();
|
||||
|
||||
void update(const cv::Point2f& measurement);
|
||||
cv::Point2f predict();
|
||||
|
||||
cv::Point2f get_last_measurement() const { return last_measurement; }
|
||||
cv::Point2f get_last_prediction() const { return last_prediction; }
|
||||
bool is_initialized() const { return initialized; }
|
||||
|
||||
private:
|
||||
cv::KalmanFilter kf;
|
||||
bool initialized;
|
||||
cv::Point2f last_measurement;
|
||||
cv::Point2f last_prediction;
|
||||
|
||||
void init_params();
|
||||
};
|
||||
|
||||
#endif // KALMANFILTER_H
|
||||
Reference in New Issue
Block a user