C# Class AForge.Vision.Motion.MotionBorderHighlighting

Motion processing algorithm, which highlights border of motion areas.

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

The motion processing algorithm is supposed to be used only with motion detection algorithms, which are based on finding difference with background frame (see SimpleBackgroundModelingDetector and CustomFrameDifferenceDetector as simple implementations) and allow extract moving objects clearly.

Sample usage:

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

Public Methods

Method Description
MotionBorderHighlighting ( ) : System

Initializes a new instance of the MotionBorderHighlighting class.

MotionBorderHighlighting ( Color highlightColor ) : System

Initializes a new instance of the MotionBorderHighlighting 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 borders of 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

MotionBorderHighlighting() public method

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

MotionBorderHighlighting() public method

Initializes a new instance of the MotionBorderHighlighting class.
public MotionBorderHighlighting ( 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 borders of 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