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

how to do Background Subtraction in opencv (opencv-master) python

I am using Enthought Canopy as my IDE(python with opencv-masters), i want to do Background Subtraction, but the problem is, the webcam(window which starts with webcam) is not responding if I run the code. My code is: import cv2 import numpy as…
varsha_holla
  • 852
  • 7
  • 23
  • 41
0
votes
1 answer

frame difference method[background subtraction]

i m trying to implement frame difference method for performing background subtraction. The problem is when i try to show frame difference in a window. I dun get any output[black window].This is the code implemented #include #include…
Mohit Rustagi
  • 198
  • 1
  • 10
0
votes
2 answers

Object extraction using color separation in OpenCV

Hi all I am developing an application where in i'm extracting red colored apple from the image. I have thresholded the image [cvInRangeS(imgHSV, cvScalar(160,100,40), cvScalar(180,256,256), imgThresh);] so that i'm able to get a binary mask of the…
0
votes
1 answer

How to detect a background change in image processing?

I'd like to be able to detect if a camera's line of sight has been changed, thus seeing a sudden change in the background. Surely there's a clever way to do this? When it comes to tracking changes in a video stream, it seems most of the work is…
0
votes
1 answer

Frame rate drops when using background subtraction MOG2?

I'm trying to learn about background subtraction. I am using this tutorial as reference. However, my frame rates have dropped and the video has become "choppy". Is there a fix for this? Thanks.
0
votes
1 answer

Taking mean of images for background subtraction - incorrect results

When I try to sum up N previous frames stored in a list and then dividing by num frames, the background model produced is not as expected. I can tell because I've tried the algo in Matlab earlier on the same video. class TemporalMeanFilter…
0
votes
0 answers

Image Background Subtraction using EmguCv

How can I implement background subtraction to a static picture taken from a webcam? I've read some post that says to take a look at the example "Motion Detection" of EmguCV would it be still applicable if I used it in an image? Example: (Sorry for…
newbie07
  • 83
  • 3
  • 16
0
votes
2 answers

Matlab creating median on entire movie (Avoid memory issue)

So my computer is not too strong.. to say the least.. Yet I want to create a median of all pixels in an entire specific movie. I was able to do it for a sequence of frames in memory.. but I am not sure on how to do it when reading more frames each…
Alon
  • 1,776
  • 13
  • 31
0
votes
1 answer

DataSets and Background Subtraction

I am working on a Project that has to detect vehicles and classify them according to their shape (Pickup,Muv,Sedan,etc). Its my minor project and I need to submit it in a month(obviously not much time left) I am confused that should I use Image or…
0
votes
2 answers

c++ Opencv accumulateWeighted - strange behaviour

I'm trying to get an running average of frames from my cam, but after a few secounds the image of the averaged frames gets brighter and brighter and than white. my cam provides an image in gray scale with 3 channels. I'm on windows 7, Visualstudio…
0
votes
2 answers

Object Counter in Opencv + BeagleBone Black Performance Issue

I am facing performance issue in BeagleBone Black + Opencv Object Counter. I am using BackgroundSubtractorMOG2 for background subtraction and Contours Detection. Here is the code below: cv::Mat frame; cv::Mat resizedFrame; cv::Mat back; cv::Mat…
0
votes
0 answers

Movie snapshots have other dimensions than movie itself.

I want to track a moving object on a video using swistrack. https://en.wikibooks.org/wiki/SwisTrack I will use a simple background subtraction algorithm for that. Therefore, I need a snapshot of the first frame of my movie. The movies are in .avi…
0
votes
1 answer

Background Subtaction using Emgu cv

I need to know that is there a method to remove the background of a live streaming web cam. There is a method called background Subtractor. If anyone knows to use that please help me out with the issue..
Dilshan Zuhdi
  • 199
  • 1
  • 1
  • 5
0
votes
0 answers

using cvRetrieveFrame get strange image

I am reading a avi file, and do some background subtrcation work. The wierd thing is when I use cvRetrieveFrame, I got a strange image, like below: origin: cvRetrieveFrame returns: I don't know what's the problem. Here is my code…
hakunami
  • 2,351
  • 4
  • 31
  • 50
0
votes
1 answer

Combining Background subtraction and Opticalflow

I'm trying to make some moving object detection (segmentation of foreground moving object from background) with slow illumination changes (= background change). Sometimes osme parts of the object are of the same size of the background, so the blob…
nkint
  • 11,513
  • 31
  • 103
  • 174