Process new video frame.

Namespace:  AForge.Vision.Motion
Assembly:  AForge.Vision (in AForge.Vision.dll) Version: 2.2.4.0 (2.2.4.0)

Syntax

C#
public float ProcessFrame(
	UnmanagedImage videoFrame
)

Parameters

videoFrame
Type: AForge.Imaging..::.UnmanagedImage
Video frame to process (detect motion in).

Return Value

Returns amount of motion, which is provided MotionLevel property of the motion detection algorithm in use.

Remarks

The method first of all applies motion detection algorithm to the specified video frame to calculate motion level and motion frame. After this it applies motion processing algorithm (if it was set) to do further post processing, like highlighting motion areas, counting moving objects, etc.

Note:In the case if MotionZones property is set, this method will perform motion filtering right after motion algorithm is done and before passing motion frame to motion processing algorithm. The method does filtering right on the motion frame, which is produced by motion detection algorithm. At the same time the method recalculates motion level and returns new value, which takes motion zones into account (but the new value is not set back to motion detection algorithm' MotionLevel property).

See Also