Skip to content

Background Subtraction

Allen Lee edited this page Mar 16, 2018 · 6 revisions

APT enables using background-subtracted images while training and tracking, to reduce the impact of static artifacts on tracking.

When Background Subtraction is enabled, movie images are preprocessed and a constant background is removed. Trackers are trained and applied on difference images rather than the original/raw data.

Background Subtraction requires specification of the following Tracking Parameters:

  • Background Type. This is currently either 'light on dark', 'dark on light', or 'other'.
  • Background Read Function. This is the name of a MATLAB function (m-file) that generates/produces the background image, given the full path to a movie. This function must have the signature [bg,bgdev] = fcn(movfile,movifo) and it must be on the MATLAB path. TODO: clarify movifo in signature

Note that the Background Type and Background Read Function are also used by Neighbor Masking. Neighbor Masking uses background subtraction to perform pixel segmentation, but this usage is unrelated to the usage of difference images during training and prediction. Enabling Neighbor Masking does not require that Background Subtraction be enabled, or vice versa; you may activate/deactivate Background Subtraction and Neighbor Masking independently.

After performing a Train or Track operation, you may browse the preprocessed data in the data cache: lObj.preProcData.