offlinemot.background_subtraction.BG_subtractor.bg_substract

BG_subtractor.bg_substract(frame)[source]

Find out the background and foreground and post process them

It applies the background subtraction object several times on the background to focus more on the last changes. Then it erode the resulting foreground.

Parameters

frame (numpy array) – The image whose foreground should be found.

Returns

The foreground of the frame as grayscale image

Return type

numpy array