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
7
votes
6 answers

Laser light detection with OpenCV and C++

I want to track a laser light dot(which is on a wall) with a webcam and i am using openCV to do this task. can anybody suggest me a way to do it with C++. Thank you !
Keshan
  • 14,251
  • 10
  • 48
  • 72
7
votes
1 answer

Save opencv BackgroundSubtractorMOG to file?

I use opencv for a vehicle counting process. How could I save my BackgroundSubtractorMOG object such as BackgroundSubtractorMOG2 etc to a file, so that I can read it from the file, use the trained background model again without training it for a…
7
votes
1 answer

OpenCV Python cv2.BackgroundSubtractor parameters

Summary It seems like changing the parametes of BackgroundSubtractorMOG doesn't affect the results of the algorithm. I'm usign Python: 2.7.6 |Anaconda 2.1.0 (64-bit) OpenCV: '2.4.10' OS: Windows 7 x64 The default parameters for the algorithm are:…
tiangolo
  • 1,536
  • 1
  • 15
  • 29
7
votes
4 answers

Cannot set user parameters in BackgroundSubtractorMOG2

OpenCV library version 2.42. I'd like to set a parameter in BackgroundSubtractorMOG2 object, e.g. BackgroundSubtractorMOG2 bgr; // the following doesn't work because 'nmixtures', 'backgroundRatio' // and 'fVarMin' are a protected…
Alexey
  • 5,898
  • 9
  • 44
  • 81
6
votes
3 answers

Background subtraction marks shadows as foreground

I've got background subtraction to work quite well. But the problem is, it marks shadows as foreground as well. Has anyone found some technique to get rid of shadows from the background? Links to techniques, papers, articles, etc you've used and got…
6
votes
1 answer

Remove background and noise from image

Im trying to remove the background from a video and get a binary images( or 8-bit) where value of the object that moves is 1 and static background is 0. something like this: at first I tried it with getting the difference absDiff() from running…
user4312643
6
votes
2 answers

What are the standard techniques for removing a segmentation (such as a human or bird) from a video?

Let's say you are taking a video (with the camera in a steady position) and a bird flies through the view of the camera. It should be possible to do image segmentation and automatically remove this bird from the video. What are these styles of…
amssage
  • 277
  • 1
  • 2
  • 7
6
votes
3 answers

Background subtracting in MATLAB

I'm looking to do background subtracting on an image. I'm new to MATLAB and new to image processing/analysis, so sorry if any of this sounds stupid. 1) Other than imsubtract() are there other ways to do background subtracting (besides comparing one…
eiphyomin
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

OpenCV background subtraction: How to precompute background model?

I am working on a tracking algorithm and one of the earliest steps it does is background subtraction. The algorithm gets a series of frames that represent the video with a moving object and static background. The object is in every frame. In my…
Alex B.
  • 647
  • 7
  • 21
6
votes
4 answers

Moving background subtraction (OpenCV)

Do you know any sources with background subtraction from moving camera? I want to write something similar to this: http://vimeo.com/72577177 There is a lot of materials about movement detection with still background, but I can't find any code…
lmmalino
  • 81
  • 1
  • 1
  • 6
6
votes
4 answers

Edge Detection and transparency

Using images of articles of clothing taken against a consistent background, I would like to make all pixels in the image transparent except for the clothing. What is the best way to go about this? I have researched the algorithms that are common for…
5
votes
3 answers

Tips for background subtraction in the face of noise

Background subtraction is an important primitive in computer vision. I'm looking at different methods that have been developed, and I've begun thinking about how to perform background subtraction in the face of random, salt and pepper noise. In a…
phantom
  • 51
  • 2
5
votes
2 answers

Background subtraction and Optical flow for tracking object in OpenCV C++

I am working on a project to detect object of interest using background subtraction and track them using optical flow in OpenCV C++. I was able to detect the object of interest using background subtraction. I was able to implement OpenCV Lucas…
user3693028
  • 53
  • 1
  • 5
5
votes
1 answer

BackgroundSubtractorMOG still keep the object after it left the frame

I tried to use BackgroundSubtractorMOG to remove the background but there are some object that already left the frame but the result from BackgroundSubtractorMOG.apply() still show that the object is still on the scene. Here is my code inputVideo =…
Marciano
  • 73
  • 1
  • 4
5
votes
4 answers

For what kind of applications can i use dsp core of beagleboard? Can i use the DSP acceleration for background subtraction algorithm?

For what kind of applications can i use dsp core of beagleboard? Can i use the DSP acceleration for background subtraction algorithm in OpenCV?
1
2
3
19 20