Background subtraction is the process of separating out foreground objects from the background in a sequence of video frames. It is widely used in object detection and tracking applications to remove the background part. Background subtraction is performed in four steps:
- Image preprocessing
- Modeling of background
- Detection of foreground
- Data validation
Image preprocessing is always performed to remove any kind of noise present in the image. The second step is to model the background so that it can be separated from the foreground. In some applications, the first frame of the video is taken as the background and it is not updated. The absolute difference between each frame and the first frame is taken to separate foreground from background.
In other techniques, the background is modeled by taking an average or median of all the frames...