Last modified on 3 September 2007, at 11:11

SwisTrack/Components/BackgroundSubtractionGray

DescriptionEdit

This component subtracts a background image from the input image. If the camera is fixed, only the objects added to the scene remain after this subtraction. However, light condition varations or the camera noise can also produce differences between the two images. Subtracting the average intensity of the two images makes the system more robust to changing light conditions.

Most of the time, a threshold is applied after this method.

InputEdit

SwisTrack GrayImage.jpg

A grayscale image.

OutputEdit

SwisTrack BackgroundSubtractionGray.jpg

A grayscale image.

ParametersEdit

Background ImageEdit

Path to the background image file (grayscale). The background image must be a picture of the arena without the object to track.

SwisTrack GrayBackground.jpg

ModeEdit

The subtraction mode:

  • Abs(I - B) calculates the absolute difference between the input image and the background image. If an object has moved between the background image and the input image, this object will appear twice (indistinguishable) on the resulting image.
  • Truncate(I - B, 0..255) subtracts the background image from the input image and sets all negative values to zero. Hence, objects that have moved between the background image and the input image will only appear once.
  • Truncate(B - I, 0..255) is similar, but subtracts the input image from the background.

Correct MeanEdit

Specifies whether to correct the average intensity value of the input image with the average intensity value of the background image. This option makes the tracking less sensitive to varying light conditions.