【发布时间】:2017-08-03 11:16:39
【问题描述】:
我正在尝试使用 AForge.net 框架制作一个简单的运动检测程序。在 AForge 网站上有一个这样的程序的例子,但它很模糊:
// create motion detector
MotionDetector detector = new MotionDetector(
new SimpleBackgroundModelingDetector( ),
new MotionAreaHighlighting( ) );
// continuously feed video frames to motion detector
while ( ... )
{
// process new video frame and check motion level
if ( detector.ProcessFrame( videoFrame ) > 0.02 )
{
// ring alarm or do something else
}
}
我需要一些有关 while 循环条件的帮助,因为我找不到如何将视频帧输入 MotionDetector 对象的解决方案。
谢谢。
【问题讨论】:
标签: c# aforge motion-detection