内容填充

This commit is contained in:
2025-11-19 20:21:45 +08:00
parent a52d1118c9
commit ad5ced1cff
58 changed files with 15670 additions and 2 deletions

26
KalmanFilter.h Normal file
View 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