Background Subtraction has several use cases in everyday life, It is being used for object segmentation, security enhancement, pedestrian tracking, counting the number of visitors, number of vehicles in traffic etc. It is able to learn and identify the foreground mask.
As the name suggests, it is able to subtract or eliminate the background portion in an image. Its output is a binary segmented image which essentially gives information about the non-stationary objects in the image. There lies a problem in this concept of finding non-stationary portion, as the shadow of the moving object can be moving and sometimes being classified in the foreground.
The popular Background subtraction algorithms are:
BackgroundSubtractorMOG: It is a gaussian mixture based background segmentation algorithm.
BackgroundSubtractorMOG2: It uses the same concept but the major advantage that it provides is in terms of stablity even when there is change in luminosity and better identification capablity of shadows in the frames.
Geometric multigrid: It makes uses of statiistical method and per pixel bayesin segmentation algorithm.
Original video frame:
Background subtracted video frame:
Thus, we saw an application of background subtraction algorithm detecting motions, life in video frames.
- Background Subtraction in an Image using Concept of Running Average
- Project Idea | Motion detection using Background Subtraction Techniques
- Arithmetic Operations on Images using OpenCV | Set-1 (Addition and Subtraction)
- Python | Subtraction of dictionaries
- Writing files in background in Python
- Python | Play a video using OpenCV
- Python | Grayscaling of Images using OpenCV
- Python OpenCV | cv2.copyMakeBorder() method
- Python OpenCV | cv2.cvtColor() method
- Python | Image blurring using OpenCV
- Circle Detection using OpenCV | Python
- Python OpenCV | cv2.imread() method
- Image Translation using OpenCV | Python
- Python OpenCV | cv2.arrowedLine() method
- Template matching using OpenCV in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.