offlinemot.background_subtraction.BG_subtractor

class offlinemot.background_subtraction.BG_subtractor(bg, config=<config.configs object>)[source]

A class to perform background subtraction on videos based on opencv implementation.

…

Variables
  • ~BG_subtractor.history (int) – Number of frames to calculate the background from.

  • ~BG_subtractor.thresh (int) – Threshold on the squared distance between the pixel and the sample to decide whether a pixel is close to that sample. This parameter does not affect the background update.

  • ~BG_subtractor.shadows (bool) – whether to detect the shadows or not.

  • ~BG_subtractor.fgbg (class instance) – The background subtraction object of type KNN

  • ~BG_subtractor.bg (numpy array) – The current calculated background

  • ~BG_subtractor.kernel (numpy array) – The kernel array to do erosion process on the resulting foreground

bg_substract(numpy array) → numpy array[source]

Process a new frame to find the foreground

get_big_objects(numpy array, numpy array) -> (numpy array, list)[source]

Process a foreground with its frame to get the group of the different background objects.