C# 클래스 AForge.Vision.Motion.GridMotionAreaProcessing

Motion processing algorithm, which performs grid processing of motion frame.

The aim of this motion processing algorithm is to do grid processing of motion frame. This means that entire motion frame is divided by a grid into certain amount of cells and the motion level is calculated for each cell. The information about each cell's motion level may be retrieved using MotionGrid property.

In addition the algorithm can highlight those cells, which have motion level above the specified threshold (see MotionAmountToHighlight property). To enable this it is required to set HighlightMotionGrid property to .

Sample usage:

// create instance of motion detection algorithm IMotionDetector motionDetector = new ... ; // create instance of motion processing algorithm GridMotionAreaProcessing motionProcessing = new GridMotionAreaProcessing( 16, 16 ); // create motion detector MotionDetector detector = new MotionDetector( motionDetector, motionProcessing ); // continuously feed video frames to motion detector while ( ... ) { // process new video frame detector.ProcessFrame( videoFrame ); // check motion level in 5th row 8th column if ( motionProcessing.MotionGrid[5, 8] > 0.15 ) { // ... } }
상속: IMotionProcessing
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
GridMotionAreaProcessing ( ) : System

Initializes a new instance of the GridMotionAreaProcessing class.

GridMotionAreaProcessing ( int gridWidth, int gridHeight ) : System

Initializes a new instance of the GridMotionAreaProcessing class.

GridMotionAreaProcessing ( int gridWidth, int gridHeight, bool highlightMotionGrid ) : System

Initializes a new instance of the GridMotionAreaProcessing class.

GridMotionAreaProcessing ( int gridWidth, int gridHeight, bool highlightMotionGrid, float motionAmountToHighlight ) : System

Initializes a new instance of the GridMotionAreaProcessing 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 calculates motion level for each grid's cell. In the case if HighlightMotionGrid property is set to , the cell with motion level above threshold are highlighted.

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.

메소드 상세

GridMotionAreaProcessing() 공개 메소드

Initializes a new instance of the GridMotionAreaProcessing class.
public GridMotionAreaProcessing ( ) : System
리턴 System

GridMotionAreaProcessing() 공개 메소드

Initializes a new instance of the GridMotionAreaProcessing class.
public GridMotionAreaProcessing ( int gridWidth, int gridHeight ) : System
gridWidth int Width of motion grid (see property).
gridHeight int Height of motion grid (see property).
리턴 System

GridMotionAreaProcessing() 공개 메소드

Initializes a new instance of the GridMotionAreaProcessing class.
public GridMotionAreaProcessing ( int gridWidth, int gridHeight, bool highlightMotionGrid ) : System
gridWidth int Width of motion grid (see property).
gridHeight int Height of motion grid (see property).
highlightMotionGrid bool Highlight motion regions or not (see property).
리턴 System

GridMotionAreaProcessing() 공개 메소드

Initializes a new instance of the GridMotionAreaProcessing class.
public GridMotionAreaProcessing ( int gridWidth, int gridHeight, bool highlightMotionGrid, float motionAmountToHighlight ) : System
gridWidth int Width of motion grid (see property).
gridHeight int Height of motion grid (see property).
highlightMotionGrid bool Highlight motion regions or not (see property).
motionAmountToHighlight float Motion amount to highlight cell (see property).
리턴 System

ProcessFrame() 공개 메소드

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

Processes provided motion frame and calculates motion level for each grid's cell. In the case if HighlightMotionGrid property is set to , the cell with motion level above threshold are highlighted.

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 ).
리턴 void

Reset() 공개 메소드

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
리턴 void