Subversion Repositories Code-Repo

Rev

Rev 287 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#pragma once

#include <opencv2\video\tracking.hpp>

#define PROCESS_NOISE_VARIANCE 0.005
#define MEASUREMENT_NOISE_VARIANCE 10
#define ESTIMATE_ERROR_VARIANCE 0.1

class KalmanFilter {
public:
        KalmanFilter(float, float);
        ~KalmanFilter();

        cv::Point predict();
        cv::Point correct(float, float);

private:
        cv::KalmanFilter filter;
        cv::Mat_<float> measurement;
        cv::Mat prediction;
        cv::Mat estimation;
        cv::Point predictedPoint;
        cv::Point estimatedPoint;
        cv::Point measuredPoint;
};