Page 1 of 1

Detects motion level per motion zones

PostPosted: Thu Apr 13, 2017 11:04 pm
by jemt01
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;
}
}

Re: Detects motion level per motion zones

PostPosted: Mon Apr 17, 2017 11:05 am
by andrew.kirillov
You will have to modify MotionDetector class, so it provides motion level for each zone instead of single value for entire video frame.