vision.ForegroundDetector
Foreground detection using Gaussian mixture models
Description
The ForegroundDetector
compares a color or grayscale
video frame to a background model to determine whether individual pixels are part of the
background or the foreground. It then computes a foreground mask. By using background
subtraction, you can detect foreground objects in an image taken from a stationary
camera.
To detect foreground in an image :
Create the
vision.ForegroundDetector
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
computes
and returns a foreground mask using the Gaussian mixture model (GMM).detector
= vision.ForegroundDetector
sets properties using one or more name-value pairs. Enclose each property name in
quotes. For example, detector
= vision.ForegroundDetector(Name,Value
)detector =
vision.ForegroundDetector('LearningRate',0.005)
Properties
Usage
Description
computes the foreground mask for input image foregroundMask
= detector(I
)I
, and
returns a logical mask. Values of 1
in the mask correspond to
foreground pixels.
computes the foreground mask using the foregroundMask
= detector(I
,learningRate
)LearningRate
.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object™ as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
References
[1] Kaewtrakulpong, P. and R. Bowden. An Improved Adaptive Background Mixture Model for Realtime Tracking with Shadow Detection. In Proc. 2nd European Workshop on Advanced Video Based Surveillance Systems, AVBS01, VIDEO BASED SURVEILLANCE SYSTEMS: Computer Vision and Distributed Processing (September 2001)
[2] Stauffer, C. and W.E.L. Grimson. Adaptive Background Mixture Models for Real-Time Tracking, Computer Vision and Pattern Recognition, IEEE Computer Society Conference on, Vol. 2 (06 August 1999), pp. 2246-252 Vol. 2.
Extended Capabilities
Version History
Introduced in R2011a