You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
869 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __OPTICAL_FLOW_HEADERS__
  2. #define __OPTICAL_FLOW_HEADERS__
  3. #include "../../../components/base/basicVideoAnalyzer.h"
  4. #include "../filter/filterImage.h"
  5. #define MAX_COUNT 1024
  6. typedef vector< U8 > tArrayU8;
  7. typedef vector<float> tArrayFloat;
  8. class opticalFlowDetector: public basicVideoAnalyzer{
  9. private:
  10. int m_iWidth;
  11. int m_iHeight;
  12. double m_dArea;
  13. filterImage *m_oFilter;
  14. Mat m_oMat;
  15. tArrayU8 m_vStatus;
  16. tArrayFloat m_vErr;
  17. tPoints2F m_vOldPOI;
  18. tPoints2F m_vCurrentPOI;
  19. tContours m_vContours;
  20. tHierarhy m_vHierarchy;
  21. TermCriteria *m_pDetectionCriteria;
  22. protected:
  23. bool m_fImageAnalyzer(Mat &Picture);
  24. public:
  25. opticalFlowDetector();
  26. opticalFlowDetector( int Width, int Height, double Area );
  27. ~opticalFlowDetector();
  28. void markup( Mat &Picture );
  29. };
  30. #endif