|
|
在海康威视公司的sdk开发包中,提供了一些与运动侦测有关的函数:
9 s3 l4 ^5 ^* V. |3 D' n* B Nint SetupMotionDetection(HANDLE hChannelHandle,RECT *rectList,int numberOF) : r0 y; v; ?# J" N- f) E% H
设置运动检测区域 e+ M" R1 z' T6 L: h: F. G
int StartMotionDetection(HANDLE hChannelHandle) 启动运动检测
" |/ i& {% j, _+ t, |ReadStreamData(HANDLE ChannelHandle,void *DataBuf,DWORD *Length,int *FrameType) " N" m! d$ C+ F" A7 X! o. |+ a5 A
读指定长度的数据流
; V, S: H b! O6 L/ s- ` f8 Oint AdjustMotionDetectPrecision(HANDLE hChannelHandle, int iGrade, int iFastMotionDetectFps, int iSlowMotionDetectFps)
* l. j2 h& d' n% V调整运动分析灵敏度
, m& V* g0 H8 e4 |/ P( y* b% Zint MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult) # L. w4 ?, U1 d
动态监测分析
# h' |" H, w, A8 [int StartVideoCapture(HANDLE hChannelHandle)
% U: P: i& L# q( K* _8 j; f启动数据截取
5 W% j/ e6 z4 ^" q0 vint RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId) ) X2 W! O" n" O3 c8 D3 y: l
当数据准备好时,SDK会向hWnd窗口发送MessageId 消息,目标窗口收到Message后调用ReadStreamData读取一帧数据 9 W8 r( {5 e0 @, z O! u: N% R
通过以上相关函数如何来实现运动侦测,请各位大侠帮忙看看!!谢谢!! |
|