AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Detects motion level per motion zones

The forum is to discuss topics related to different areas of image processing and computer vision.

Detects motion level per motion zones

Postby jemt01 » Thu Apr 13, 2017 11:04 pm

I want to detects the motion level per motion zones. I have 7 motion zones and i need to detects the motion lever for each of them.

This is the example code of the sample liberary that i'm using:

private void defineMotionregionsToolStripMenuItem_Click( object sender, EventArgs e )
{



if ( videoSourcePlayer.VideoSource != null )
{
Bitmap currentVideoFrame = videoSourcePlayer.GetCurrentVideoFrame( );

if ( currentVideoFrame != null )
{
MotionRegionsForm form = new MotionRegionsForm( );
form.VideoFrame = currentVideoFrame;
form.MotionRectangles = detector.MotionZones;

// show the dialog
if ( form.ShowDialog( this ) == DialogResult.OK )
{
Rectangle[] rects = form.MotionRectangles;

if ( rects.Length == 0 )
rects = null;

detector.MotionZones = rects;

}

return;
}
}
jemt01
 
Posts: 1
Joined: Thu Apr 13, 2017 11:01 pm

Re: Detects motion level per motion zones

Postby andrew.kirillov » Mon Apr 17, 2017 11:05 am

You will have to modify MotionDetector class, so it provides motion level for each zone instead of single value for entire video frame.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3206
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to Image Processing and Computer Vision