C# Class AForge.Vision.Motion.MotionAreaHighlighting

Motion processing algorithm, which highlights motion areas.

The aim of this motion processing algorithm is to highlight motion areas with grid pattern of the specified color.

Sample usage:

// create motion detector MotionDetector detector = new MotionDetector( /* motion detection algorithm */, new MotionAreaHighlighting( ) ); // continuously feed video frames to motion detector while ( ... ) { // process new video frame detector.ProcessFrame( videoFrame ); }
Inheritance: IMotionProcessing
Mostrar archivo Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
MotionAreaHighlighting ( ) : System

Initializes a new instance of the MotionAreaHighlighting class.

MotionAreaHighlighting ( Color highlightColor ) : System

Initializes a new instance of the MotionAreaHighlighting class.

ProcessFrame ( UnmanagedImage videoFrame, UnmanagedImage motionFrame ) : void

Process video and motion frames doing further post processing after performed motion detection.

Processes provided motion frame and highlights motion areas on the original video frame with specified color.

Reset ( ) : void

Reset internal state of motion processing algorithm.

The method allows to reset internal state of motion processing algorithm and prepare it for processing of next video stream or to restart the algorithm.

Method Details

MotionAreaHighlighting() public method

Initializes a new instance of the MotionAreaHighlighting class.
public MotionAreaHighlighting ( ) : System
return System

MotionAreaHighlighting() public method

Initializes a new instance of the MotionAreaHighlighting class.
public MotionAreaHighlighting ( Color highlightColor ) : System
highlightColor Color Color used to highlight motion regions.
return System

ProcessFrame() public method

Process video and motion frames doing further post processing after performed motion detection.

Processes provided motion frame and highlights motion areas on the original video frame with specified color.

Motion frame is not 8 bpp image, but it must be so. Video frame must be 8 bpp grayscale image or 24/32 bpp color image.
public ProcessFrame ( UnmanagedImage videoFrame, UnmanagedImage motionFrame ) : void
videoFrame AForge.Imaging.UnmanagedImage Original video frame.
motionFrame AForge.Imaging.UnmanagedImage Motion frame provided by motion detection /// algorithm (see ).
return void

Reset() public method

Reset internal state of motion processing algorithm.

The method allows to reset internal state of motion processing algorithm and prepare it for processing of next video stream or to restart the algorithm.

public Reset ( ) : void
return void