|
在海康威视公司的sdk开发包中,提供了一些与运动侦测有关的函数:
- K2 ]! n4 \5 J6 _. r+ ]int SetupMotionDetection(HANDLE hChannelHandle,RECT *rectList,int numberOF)
7 c6 F; @# M$ ]/ l9 C' D; _设置运动检测区域
! ]8 B1 r; {1 z3 \int StartMotionDetection(HANDLE hChannelHandle) 启动运动检测
0 I, S( |! w' h2 d" gReadStreamData(HANDLE ChannelHandle,void *DataBuf,DWORD *Length,int *FrameType) 1 S2 e5 @+ f7 {& G8 a; `4 s) [
读指定长度的数据流
6 l6 J, x: a+ i8 M4 M/ O2 {5 vint AdjustMotionDetectPrecision(HANDLE hChannelHandle, int iGrade, int iFastMotionDetectFps, int iSlowMotionDetectFps)
1 M, W9 h" a+ {) W调整运动分析灵敏度
% u% Z' H- K6 K! T1 @int MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult)
) h% Z* g, k! _; i& _2 r" K( G6 L7 u动态监测分析
4 F5 k+ n: Y; ]/ ~. J3 h' ~7 [int StartVideoCapture(HANDLE hChannelHandle)
( @: c9 N5 Y7 I3 e% s' e. U9 b% I W启动数据截取
4 Q- O& X4 g4 s2 u3 D# h( Qint RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId) 7 F' F. _0 `+ `5 c; f& U" _. g, n
当数据准备好时,SDK会向hWnd窗口发送MessageId 消息,目标窗口收到Message后调用ReadStreamData读取一帧数据
c% p0 [- T( N8 K通过以上相关函数如何来实现运动侦测,请各位大侠帮忙看看!!谢谢!! |
|