Questions tagged [background-subtraction]

Background-subtraction is a Computer-Vision technique that given a frame sequence from a fixed camera, processes pixels and separates them into foreground and background pixels.

Background Subtraction is a type of image segmentation which goal is to separate the parts of the image that are invariant over time (background) from the objects that are moving or changing (foreground).

The simplest techniques use frame differencing and more advanced techniques require using statistical methods. For example, a moving leaf of a tree would be considered foreground using simple frame differencing but with a proper statistical method it can be considered background as the leaf is always there, moving periodically.

Methods:

  • Frame differencing
  • Background as the average or the median of the previous nframes.
  • Background as the running average.
  • Pfinder (one Gaussian)
  • Mixture of K Gaussians
290 questions
0
votes
1 answer

CodeBook background subtraction with moving objects

I am trying to use CodeBook method for OpenCV to subtract the background. So far so good, but I am not sure if I can update the codebook for moving objects after some time span, say 5 minutes, I need to update the codebook after which I get lots of…
user349026
0
votes
1 answer

CvBGCodeBookModel A good explanation?

I have been running in and out of OpenCV 2.4.3 trying to figure out the extra functions and parameters that can be used to CvBGCodeBookModel based background subtraction. The documentation is not very helpful, does anyone know a resource/tutorial…
user349026
0
votes
1 answer

Code Book Background Subtraction - Everything explodes to become white

I am new to the OpenCV background subtraction model that is definte using codebook method. I was running the sample code here and to see how it works, seems a very great approach. I was trying to segment out a cup. Works fine until the cup gets…
user349026
0
votes
1 answer

OpenCV C++ videocapture image background subtracting

I am trying to make a simple program that will subtract an object from a background with OpenCV and C++. The idea is to use the VideoCapture to: Capture a static background (without the object) Then continuously capture the current frame and…
Wikzo
  • 170
  • 2
  • 12
0
votes
1 answer

Background Subtraction for Road Traffic Monitoring

I have to detect cars on a video stream (recorded) and provide some traffic data. I have read that background subtraction is the most important step so that we can be able to extract foreground objects. The question is, how do we do this for colour…
0
votes
1 answer

How does opencv store matrix value in Gaussian mixture? In which order?

I've searched the "bgfg_gaussmix2.cpp" code, it says in gaussian mixture model, it stores mixture weight (w), mean ( nchannels values ) and covariance for each gaussian mixture of each pixel background model. I want to know the order of its storage,…
0
votes
2 answers

Detecting objects in an image

Alright so this one might be a little tricky and I'm more looking for direction than a specific answer I suppose. Essentially I need to do some object detection in a VB.net application. I want to know if there is a car in a picture or not. It's a…
0
votes
1 answer

How to track detected object

I've read a lot about object/tracking detection. There are a lot algorithms in moving objects tracking such as frame differencing, background subtraction etc. Also there are a lot object detection algorithms: Viola Jones, Haar-like features etc. And…
Frankie Drake
  • 1,338
  • 9
  • 24
  • 40
0
votes
2 answers

Detect rect of white objects on a black background using opencv

I'm using frame differencing and opencv to detect movement between frames (absdiff, threshold, erode, etc). How can I get the coordinates of the individual locations of the movements (the rect: x, y, width, height), basically of the white blobs?
MB.
  • 4,167
  • 8
  • 52
  • 79
-1
votes
5 answers

PHP with Loop Calculation

Can some help, don’t know how to solve this using loop in PHP $pay = [20, 40 , 89, 300, 190, 15];
$Capital = 1000;
I want the loop to achieve this result 1000-20 = 980
980-40 = 940
940-89 = 851
851-300 = 551…
Segun
  • 29
  • 5
-1
votes
1 answer

Camera tampering in a movable camera

I am working on a project for camera tampering. I have the code for tamper detection for a static camera. Tampering means blocking or defocussing the camera. I want to modify it for a moving camera or rotating camera so that it takes all the frames…
-1
votes
1 answer

Thresholding an image in OpenCV using another image matrix of pixel standard deviations as threshold values

I have two videos, one of a background and one of that same background with a person sitting in the frame. I generated two images from the video of just the background: the mean image of the background video (by accumulating the frames and dividing…
user4028648
-1
votes
1 answer

Can I use approxPolyDP to improve the people detection?

Can I use approxPolyDP to improve the people detection? I am trying to detect people using BackgroundSubtractorMOG2. So after I receive the foreground of the image I obtain all the contours of the image using this…
Rares
  • 597
  • 1
  • 5
  • 21
-1
votes
1 answer

Car (object) extraction from a image

How will I proceed with the extraction of the whole car from an image containing a front, side or rear views, keeping in account of the shadows, other distant cars in the image and different types of cars (hatchback, sedan, etc.)? The car in the…
Sachin
  • 3,576
  • 1
  • 15
  • 24
-1
votes
1 answer

Opencv python background substraction and motion tracking

I read about opencv on google and found the following sample code online to play with: import cv2 def diffImg(t0, t1, t2): d1 = cv2.absdiff(t2, t1) d2 = cv2.absdiff(t1, t0) return cv2.bitwise_and(d1, d2) cam =…
Harshit Laddha
  • 2,044
  • 8
  • 34
  • 64
1 2 3
19
20