|
在海康威视公司的sdk开发包中,提供了一些与运动侦测有关的函数:
. Q4 |8 }5 y0 z7 y& I2 D. g+ o' Rint SetupMotionDetection(HANDLE hChannelHandle,RECT *rectList,int numberOF)
5 g, H: Z( Q, X( G. \# v/ B设置运动检测区域 0 r# p2 b: a$ P- Q
int StartMotionDetection(HANDLE hChannelHandle) 启动运动检测
- x6 a! h- S6 x, r1 X& t$ R* p: wReadStreamData(HANDLE ChannelHandle,void *DataBuf,DWORD *Length,int *FrameType) 4 c( I" q' O, g4 p" Z
读指定长度的数据流 0 Q6 G0 R+ f( U; R7 `
int AdjustMotionDetectPrecision(HANDLE hChannelHandle, int iGrade, int iFastMotionDetectFps, int iSlowMotionDetectFps) 5 F' \+ Y& `, b L
调整运动分析灵敏度
7 i, l1 B, \! s& q$ ^int MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult) 5 W, W0 C6 P& k6 |" s0 C
动态监测分析
7 C; S% B, z- ~3 _int StartVideoCapture(HANDLE hChannelHandle) ( @+ f0 x0 Y& ]3 w5 M
启动数据截取
2 ?* L0 o- T2 s+ D3 U4 }int RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId)
! u7 j- r! L7 s5 n8 m1 Z9 W$ n6 {% e当数据准备好时,SDK会向hWnd窗口发送MessageId 消息,目标窗口收到Message后调用ReadStreamData读取一帧数据 7 T4 }( ?: F1 Z3 @
通过以上相关函数如何来实现运动侦测,请各位大侠帮忙看看!!谢谢!! |
|