|
|
在海康威视公司的sdk开发包中,提供了一些与运动侦测有关的函数: 8 i2 F# r1 ^0 R5 {0 U ]- t
int SetupMotionDetection(HANDLE hChannelHandle,RECT *rectList,int numberOF) ! D2 A' c" z2 J$ x* _ Z& B( E
设置运动检测区域 4 O. Q! M3 h6 L a( Q6 o
int StartMotionDetection(HANDLE hChannelHandle) 启动运动检测 , F" I! f9 F6 f
ReadStreamData(HANDLE ChannelHandle,void *DataBuf,DWORD *Length,int *FrameType) 5 N ^! t2 v1 M- s9 }" e6 L/ A
读指定长度的数据流
, ^6 M- M2 j+ p) E/ k$ S/ Rint AdjustMotionDetectPrecision(HANDLE hChannelHandle, int iGrade, int iFastMotionDetectFps, int iSlowMotionDetectFps)
% b- F, N# \7 d- s7 R/ H: q调整运动分析灵敏度
( f N. ~" Y6 I0 z6 Nint MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult)
0 D% ~$ G, T8 T; w: ?) D动态监测分析
; k* H' G8 e! J* Nint StartVideoCapture(HANDLE hChannelHandle)
3 s- |9 U6 v' R- Y* O启动数据截取 4 D/ N9 ~) J& S
int RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId) $ Y; w4 H% `$ x8 \2 s/ R
当数据准备好时,SDK会向hWnd窗口发送MessageId 消息,目标窗口收到Message后调用ReadStreamData读取一帧数据
$ V6 R8 F$ D; f通过以上相关函数如何来实现运动侦测,请各位大侠帮忙看看!!谢谢!! |
|