|
在海康威视公司的sdk开发包中,提供了一些与运动侦测有关的函数: , X* p1 ?8 n- o5 M
int SetupMotionDetection(HANDLE hChannelHandle,RECT *rectList,int numberOF) & R$ A$ I9 C8 ~( J4 {0 I9 B( f6 k, {
设置运动检测区域
6 c1 ]. R( O% ^3 e4 |) qint StartMotionDetection(HANDLE hChannelHandle) 启动运动检测
* f) i$ x Q( Y% ?5 n8 Q5 M9 U; h( BReadStreamData(HANDLE ChannelHandle,void *DataBuf,DWORD *Length,int *FrameType) 7 l2 B7 u. h5 [) C) k( L% \
读指定长度的数据流
& I9 s5 ^# K- n- p. lint AdjustMotionDetectPrecision(HANDLE hChannelHandle, int iGrade, int iFastMotionDetectFps, int iSlowMotionDetectFps)
" B: M, w1 i( ^! H调整运动分析灵敏度 5 A7 G" Y, e, B
int MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult)
( n9 ]4 X. m, Z! E1 `/ M动态监测分析
L6 {; e5 W* ~& {8 D1 vint StartVideoCapture(HANDLE hChannelHandle) $ O# v" l6 b; Y
启动数据截取 / ?! X0 H" _" c$ c
int RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId) ( ~9 b- v1 u* ^: P/ w
当数据准备好时,SDK会向hWnd窗口发送MessageId 消息,目标窗口收到Message后调用ReadStreamData读取一帧数据
6 ~1 u: @2 Q6 y' V通过以上相关函数如何来实现运动侦测,请各位大侠帮忙看看!!谢谢!! |
|