AForge.NET

Package of the week: AForge.NET

AForge.NET is an open source C# framework designed for developers and researchers in the fields of Computer Vision and Artificial Intelligence – image processing, neural networks, genetic algorithms, fuzzy logic, machine learning, robotics, etc.
Motion detection using AForge.NET
Here’s the code for simple motion detection from a video feed:
IMotionDetector detector = new MotionDetector(
new SimpleBackgroundModelingDetector(),
new MotionAreaHighlighting());
while (!needToStop)
{
detector.ProcessFrame(videoFrame);
if (detector.MotionLevel > 0.01)
{
// motion level is greater then 1% - fire alarm
// make sound, start blinking, start saving video, etc.
// ...
}
}
view rawaforge.cs hosted with ❤ by GitHub
AForge.NET AForge.NET Reviewed by board4allll on 5:43:00 AM Rating: 5

Facebook

Comments