Project Idea | Motion detection using Background Subtraction Techniques
Last Updated :
25 Nov, 2022
Foreground detection based on video streams is the first step in computer vision applications, including real-time tracking and event analysis. Many researchers in the field of image and video semantics analysis pay attention to
intelligent video surveillance in residential areas, junctions, shopping malls, subways, and airports which are closely associated with foreground detection.
Background modeling is an efficient way to obtain foreground objects. Though background modeling methods for foreground detection have been studied for several decades, each method has its own strength and weakness in detecting objects of interest from video streams.
Some of them are very significant for BS, and not usual in the other benchmarks. I have proposed a comparison of BGS methods namely (Adaptive BG Learning, ZivkovicGMM, Fuzzy Integral), with various methodologies.
Features:
- Can eliminate noise in the sequence of frames effectively using suitable BGS methods.
- Can efficiently detect foreground provided alpha and threshold is fixed.
- Motions in different challenges can be detected by subtracting issues like dynamic background etc.
BG Modeling Steps:
- Background initialization: The first aim to build a background model is to fix number of frames. This model can be designed by various ways (Gaussian, fuzzy etc.).
- Foreground detection: In the next frames, a comparison is processed between the current frame and the background model. This subtraction leads to the computation of the foreground of the scene.
- Background maintenance: During this detection process, images are also analyzed in order to update the background model learned at the initialization step, with respect to a learning rate. An object not moving during long time should be integrated in the background for example.
BG Subtraction Methods step by step
- Adaptive BG Learning: In a simple way, this can be done by setting manually a static image that represents the background, and having no moving object
- For each video frame, compute the absolute difference between the current frame and the static image.
- If absolute difference exceeds threshold, frame is regarded as background, otherwise foreground.
- Gaussian mixture model (GMM): In order to model a background which is dynamic texture(such as waves on the water or trees shaken by the wind), each pixel with a mixture of K Gaussian distribution is modeled.
- For each video frames, find the probability of input pixel value x from current frame at time t being a background pixel is represented by the following mixture of Gaussian
P(x_i)=\sum_{i=1}^{k}\omega _{i,t}.\eta \left ( x_{t},U_{i,t}\sum_{i,t} \right )
- A new pixel is checked against the exiting K Gaussian distributions, until a match is found.
- If none of K distributions match the current pixel value, the least probable distribution is replaced
with a distribution with the current value as its mean value.
- If pixel values cannot match the background model distributions, they will be labeled “in motion”, otherwise background pixel.
- Fuzzy Integral:: The background initialization is made by using the average of the N first video frames where objects are present. An update rule of the background image is necessary to adapt well the system over time to some environmental changes. For this, a selective maintenance scheme is adopted as follows:
\begin{align*}
B_{t+1}(x,y) &=(1-\alpha )B_t(x,y)+\alpha T_{t+1}(x,y) \\
, &if (x,y) is Background \\
B_{t+1}(x,y)&= (1-\beta )B_t(x,y)+\beta T_{t+1}(x,y) \\
&, if (x,y) is Background
\end{align*}
The fuzzy integrals aggregates nonlinearly the outcomes of all criteria.
- The pixel at position(x, y)is considered as foreground if its Choquet integral value is less than a certain constant threshold which means that pixels at the same position in the background and the current images are not similar.
- This a constant value depending on each video data set.
Software and hardware required:
- Library: OpenCV
- Language: C++
- Environment: Visual Studio
- Hardware: 2.67 GHz Core i5 4 GB RAM
Diagram
This shows that how our foreground detection methods are performed in different challenges.
Result
Conclusion
In this work, we have proposed several methods of background subtraction which is required for foreground detection.
These are necessary for several technologies used in computer vision.
Though each tested method has different advantages and disadvantages, we found that AGMM and Fuzzy Integral are the most promising methods.
These will be helpful in understanding and developing new algorithms for foreground detection with parameters taking into account.
Project Link
https://
[email protected]/saanjk/bgs-methods-for-motion-detection.git
Video
&feature=youtu.be">
Research
Detecting foreground objects in motion is a challenging task owing to their variable appearance.
This is a booming research topic which is still going on for surveillance of large crowds
in real time applications.
Research areas include image processing, artificial Intelligence and machine learning.
- https://hal.archives-ouvertes.fr/hal-00333086/document
- http://ieeexplore.ieee.org/document/7565562/
- http://vc.cs.nthu.edu.tw/home/paper/codfiles/whtung/200603141526/Improved_Adaptive_Gaussian_Mixture_Model_for_Background.PDF
Application:
Video Surveillance System including residential areas, junctions, shopping malls, subways, and airports.
This article is contributed by
Afzal Ansari and co-guided by
Prof. Subrata Mohanty.
Similar Reads
Project Idea - Object Detection and Tracking
Project title: Object Detection and Tracking Introduction: A lot of people go to supermarkets and retail stores and shops to idle around and window-shop instead of purchasing any products. The thought of analyzing this kind of behavior was intriguing. How does this kind of behavior affect product sa
5 min read
Python | Background subtraction using OpenCV
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 abl
2 min read
Background Subtraction in an Image using Concept of Running Average
Background subtraction is a technique for separating out foreground elements from the background and is done by generating a foreground mask. This technique is used for detecting dynamically moving objects from static cameras. Background subtraction technique is important for object tracking. There
4 min read
Sliding Window vs. Anchor Boxes: Comparing Object Detection Techniques
Sliding windows and anchor boxes are the two most widely used methods in detecting objects in images as used in this research. The sliding window approach covers the image using a window of fixed size and overlaps with each other to detect the objects present at different locations and scales. This
8 min read
Project Idea | (Robust Pedestrian detection)
The aim of this project is to develop an application which can detect pedestrians effectively. The problem of motion-based object detection can be divided into two parts: a) Classifying pedestrians and non pedestrians features a) Detecting pedestrians in each frame b) Associating the detections corr
2 min read
Explain Image Segmentation : Techniques and Applications
Image segmentation is one of the key computer vision tasks, It separates objects, boundaries, or structures within the image for more meaningful analysis. Image segmentation plays an important role in extracting meaningful information from images, enabling computers to perceive and understand visual
9 min read
How to make background image transparent using Python?
In this article, the task is to create a background transparent of the image in Python Library Required : First Install pillow library on your Python Application before going ahead. Python Imaging Library is a free and open-source additional library for the Python programming language that adds supp
1 min read
Real time object color detection using OpenCV
In this article, we will discuss how to detect a monochromatic colour object using python and OpenCV. Monochromatic color means light of a single wavelength. We will use the video, captured using a webcam as input and try to detect objects of a single color, especially Blue. But you can detect any c
4 min read
Feature Extraction in Image Processing: Techniques and Applications
Feature extraction is a critical step in image processing and computer vision, involving the identification and representation of distinctive structures within an image. This process transforms raw image data into numerical features that can be processed while preserving the essential information. T
15+ min read
Arithmetic Operations on Images using OpenCV | Set-1 (Addition and Subtraction)
Arithmetic Operations like Addition, Subtraction, and Bitwise Operations(AND, OR, NOT, XOR) can be applied to the input images. These operations can be helpful in enhancing the properties of the input images. The Image arithmetics are important for analyzing the input image properties. The operated
3 min read