Design Article
Introduction to video analytics
Nik Gagvani, PhD<br> Chief Technology Officer and Vice President, Engineering,<br>Cernium Corporation
8/22/2008 3:00 AM EDT
Segmentation
The goal of segmentation is to identify foreground blobs. The input to segmentation is a sequence of video frames, the output being a set of labeled and unique foreground blobs for each frame. Segmentation detects changes, measures the degree of change and localizes the change. It consists of several steps that may vary based on the desired result. Commonly used processing blocks are shown in Figure 2.

View full size
Figure 2: Processing Steps for Segmentation
A background model is initialized and updated over time. This model is used by background subtraction to detect changes and identify foreground pixels. A simple implementation of a background model is to use the first frame as a background frame. Background subtraction can then be implemented by subtracting this background frame from the current frame. This will yield a difference image.
A threshold can be used to convert the difference image to a foreground image, such that all pixels with differences greater than a pre-determined threshold are foreground pixels. Background updating can then consist of replacing the background frame every N frames.
Such a simple background subtraction scheme will work for simple scenes with uniform contrast and relatively little change. Specifically, the choice of the threshold value and the background update frequency will impact results. Figure 3 illustrates such a scenario.
Figure 3: Background subtraction using image differencing. The difference image is thresholded to obtain foreground pixels.
In practice, the background model tends to be more sophisticated. The simple model described above does not account for valid changes to the background that can occur due to changes in illumination or due to foreground blobs becoming part of the background.
For an outdoor camera, the ambient illumination changes over time, causing the background pixel intensities to change. This change needs to be well represented by the background model so spurious foreground pixels are not detected. Furthermore, foreground blobs such as cars that get parked must be inserted into the background.
Next: Mean images


