123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef KLT_H
- #define KLT_H
- #include<opencv2/core/core.hpp>
- #include "opencv2/opencv.hpp"
- class LucasKanadeTracker {
- public:
-
- LucasKanadeTracker();
-
- LucasKanadeTracker(const cv::Size _winSize, const int _maxLevel, const int _maxIters,
- const float _epsilon, const float _minEigThreshold);
-
- void SetReferenceImage(cv::Mat &refIm, std::vector<cv::Point2f> &refPts);
- int PRE_Track(cv::Mat &newIm,
- std::vector<cv::Point2f> &nextPts, std::vector<bool> &status, const bool bInitialFlow,
- const bool bCheckLength);
- void DeleteRefPt(const int idx);
- cv::Point2f GetPrevPoint(const int idx);
- private:
-
-
-
- cv::Size winSize;
- int maxLevel;
- int maxIters;
- float epsilon;
- float minEigThreshold;
-
-
-
- std::vector<cv::Point2f> prevPts;
- std::vector<cv::Mat> refPyr;
- std::vector<std::vector<float>> vMeanI;
- std::vector<std::vector<float>> vMeanI2;
- std::vector<std::vector<cv::Mat>> Iref;
- std::vector<std::vector<cv::Mat>> Idref;
- };
- #endif
|