The Change_Detection.m MATLAB tool detects changes in an image by comparing the image to a background estimation. The change detection software is a MATLAB function designed to work on either a single image or a sequence of images, and computes changes with respect to a background image by one of four techniques:

  1. Frame-to-frame change detection — the change detection image represents the difference between two frames.
  2. Rolling median change detection — the change detection image represents the difference between an image and a median background estimation taken over a subset of the total frames presented to the function.
  3. Rolling mean change detection — the change detection image represents the difference between an image and a mean background estimation taken over a subset of the total frames presented to the function.
  4. Rolling mode change detection — the change detection image represents the difference between an image and a mode background estimation taken over a subset of the total frames presented to the function.

The software is an improvement on other scripting techniques by functionalizing the code with an INPUT/OUTPUT structure format that may work either at the command line or in conjunction with a separate graphic user interface function. The function also allows periodic background estimations instead of background estimations on a per-frame basis.

All computation is done on grayscale imagery, so color or multispectral images will be first converted to grayscale. Differences from the background that exceed a preset threshold are reported as changes in the form of a returned binary mask.

The algorithm can work in singleframe or multi-frame mode. In singleframe mode, only one image is being investigated for changes relative to a background. In multi-frame mode, a sequence of images is being investigated for changes relative to the background.

After the image changes are detected, the image is then converted into a binary representation of the change detection image by setting a threshold. The threshold is given as multiples of a standard deviation of the values in the difference image (the difference between the image and the background). The binary change detection mask is then multiplied by the original image in the sequence to obtain the values of the pixels that have changed. The outputted mask is the same size as the inputted frame, but now only the pixels that have changed are non-zero.

This work was done by David M. Palacios and Steven J. Lewis of Caltech for NASA’s Jet Propulsion Laboratory. NPO-47671



This Brief includes a Technical Support Package (TSP).
Document cover
Change_Detection.m

(reference NPO-47671) is currently available for download from the TSP library.

Don't have an account? Sign up here.