The Wayback Machine - https://web.archive.org/web/20240612005153/https://www.geeksforgeeks.org/project-idea-motion-detection-using-background-subtraction-techniques/
Open In App

Project Idea | Motion detection using Background Subtraction Techniques

Last Updated : 25 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report
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

  1. 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.
  2. 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.
  3. 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. c4

Result

c6

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://saanjk@bitbucket.org/saanjk/bgs-methods-for-motion-detection.git

Video

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 | Pavement distress detection using Drone Imaging
Project Title: Pavement Distress Detection Using Drone Imaging Introduction: Street pavement construction and repair includes a huge part of Indian metropolitan spending budgets. Survey and monitoring upkeep are crucial and important measures against pavement distress like both holes, blocked drains, etc. that can bring down the money related weigh
5 min read
Project Idea (Augmented Reality - ARuco Code Detection and Estimation)
Project Idea : A project based on scanning and detecting Aruco codes. Implementing Homography for estimation of intrinsic and extrinsic camera calibration parameters and inclusion of Pose Estimation for the implementation of augmented Reality projects in further future projects. For Qr Code Detection Visit : this linkFor more Projects visit : Sahil
4 min read
Project Idea | Driver distraction and drowsiness detection system - DCube
Project Title: DCube Introduction:Car accident is the major cause of death in which around 1.3 million people die every year. Majority of these accidents are caused because of distraction or the drowsiness of driver. Construction of high-speed highway roads had diminished the margin of error for the driver. The countless number of people drives for
3 min read
Project Idea | Domain term detection and Hierarchical concept creation
Project Title: Domain term detection and Hierarchical concept creation Introduction: Domain Term Detection and Hierarchical Concept Creation in which given set of documents, main aims is to identify domain-specific term which mean that from given large set articles, tried to extract the domain for each article, and also created hierarchical represe
3 min read
Human Scream Detection and Analysis for Controlling Crime Rate - Project Idea
Project Title: Human Scream Detection and Analysis for Controlling Crime Rate using Machine Learning and Deep Learning Crime is the biggest social problem of our society which is spreading day by day. Thousands of crimes are committed every day, and still many are occurring right now also all over the world. A crime occurs in many faces, it can hap
6 min read
Project Idea | (Detection of Malicious Network activity)
Aim : As internet activities have incremented a lot now a days. The possibility of illegal access of private data is also increased. The aim of this project is to filter the network activities and to decide which are illegal of them. The process is similar to spam filtering from emails. Tool : This project is based on Machine learning algorithms wh
2 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 corresponding to the same object over time Tool :This
2 min read
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 sales?What time periods these people were coming in?
5 min read
Project Idea | (Project Approval System)
Academic Project management is a major issue which is faced by many educational institutes, the main reason for this is there is no automated system followed in any institute. College management/staff gathers all the project reports and project sources from students and store them physically in some locations probably libraries. To overcome this pr
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 are several techniques for background subtraction
4 min read