RunTrack.h
资源名称:VIS.zip [点击查看]
上传用户:sdgangtie
上传日期:2020-03-07
资源大小:7324k
文件大小:1k
源码类别:
数值算法/人工智能
开发平台:
Visual C++
- #pragma once
- #pragma comment(lib, "cv200.lib")
- #pragma comment(lib, "cvaux200.lib")
- #pragma comment(lib, "cxcore200.lib")
- #pragma comment(lib, "highgui200.lib")
- #include "cv.h"
- #include "cvaux.h"
- #include "cxcore.h"
- #include "highgui.h"
- #include "BlobTracker.h"
- typedef struct ParamSet{
- int m_FG;
- int m_BT;
- int m_BPP;
- int m_BTA;
- double m_Threshold;
- double m_WMin;
- double m_HMin;
- double m_WMax;
- double m_HMax;
- BOOL m_Check;
- } CvParamSet;
- class RunTrack
- {
- public:
- RunTrack(void);
- ~RunTrack(void);
- private:
- int m_State;
- int m_Style;
- int m_FrameCount;
- char* m_pFilePath;
- char m_GenFile[1024];
- IplImage* m_pImage;
- CvCapture* m_pCapture;
- CvBlobTrackerAuto* m_pTracker;
- CvBlobTrackerAutoParam m_Param;
- IplImage* ProcessResult(IplImage* pImage, CvBlobTrackerAuto* m_pTracker);
- void ReleaseParam(void);
- void ResetParam(CvParamSet m_ParamSet);
- public:
- int Init(char* pFilePath,int _style,CvParamSet m_ParamSet);
- void Run(void);
- void Pause(void);
- void Stop(void);
- int GetState(void);
- IplImage* GetNextFrame(void);
- void SetPosition(int Pos);
- int GetFrameCount(void);
- CString GetTimeFre(void);
- };