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
1
vote
1 answer

Using background subtraction in a webcam-video feed in a HTML page

I'm trying to make a prototype for a photobooth-ish setup where the interface is being shown on a html page. I've managed to embed a video within a canvas element that basically uses the integrated/external webcam on my computer to show the user's…
Darth Coder
  • 1,738
  • 7
  • 33
  • 56
1
vote
1 answer

Background Subtraction with Shadow Removal with EmguCV

I am looking for a way to extract foreground (without shadow) from a video sequence using C# (EmguCV). I have tried several method such as KNN, MOG, and MOG2. At the end, MOG2 is the best which is very close to my desired result. However, it is…
1
vote
2 answers

MOG2 background subtraction Parameters

I am trying to use the OpenCVs Background Subtractor class MOG2 to seperate a person moving infront of a camera. I got everything set up and working nicely. But the resulting mask I am getting looks something like this: (default settings) Now what…
1
vote
1 answer

video processing with opencv

i'm trying to detect car in a video file.i can do background subtraction and the moving cars are visible as foreground object. but i can't draw rectangle around the car. how can i do it? or how can i say in a particular area of the frame there is a…
1
vote
2 answers

Background subtraction

I'm doing background subtraction using opencv. The problem is the foreground object is not always detected correctly. To deal with this I would like to use four or five images, and take their average as the background image. How can I do that?
riyana
  • 21,385
  • 10
  • 35
  • 34
1
vote
0 answers

Background Subtraction: Creating an ensemble structure of mixture of gaussians

I want to improve the background subtraction in a video by modifying the standard MOG algorithm and creating an ensemble structure of Gaussians modeled on various features of a frame like normalized chromaticity values, spatial gradient and texture.…
1
vote
2 answers

Subtract background from image

I am trying to to subtract the background from a picture of an object to leave only the foreground object. I have found the RGB values of the background as 218 220 219 using imshow(). How can I use the RGB values with imsubtract()? y = [218 220…
Jak
  • 471
  • 5
  • 20
1
vote
2 answers

Vehicle detection, count and classification in Python

I have to ultimately count the total number of vehicles in a video, distinguish between cars and trucks and color of the vehicles detected. I am using OpenCV, Python and SimpleCV for this. What I have done so far is: 1. Background subtraction 2.used…
GradStudent
  • 166
  • 1
  • 3
  • 12
1
vote
0 answers

OpenCV: Object abstraction after background subtraction?

I need a background subtraction application that gives me as a ouput a black/white image with an abtract representation of the objects. See the image below for further information. It should be an online algorithm so the background adapts to…
user2212461
  • 3,105
  • 8
  • 49
  • 87
1
vote
1 answer

Parameters for the wallflower dataset for mixture of gaussian algorithm

I am trying to implement the MOG algorithm which is the standard algorithm in openCV for background modeling. Right now I am a beginner to this so I am experimenting with the wallflower algorithm dataset by microsoft research and I cant figure out…
Aditya
  • 1,240
  • 2
  • 14
  • 38
1
vote
2 answers

how to label a binarized image?

please help me to segment a image in binary image... more clearly, i got a image from background subtraction, which is binary...means, the object area is of white color and non object object is black..now problem is how to label that white area? i…
ranzan
  • 51
  • 2
  • 6
1
vote
4 answers

Foreground Extraction

I am doing some work regarding tracking a person, I am using this dataset. I am trying right now to extract foreground using background subtraction method i.e. Mean Filter My background is like and if I try to subtract my current frame like…
1
vote
1 answer

Extracting foreground from video stream

I am working on a video processing project which takes camera feed as input and have got a static background. I dont need any sort of dynamic background generation as that of BackgroundSubtractorMOG in opencv. I am trying to bound foreground object…
hunter
  • 111
  • 1
  • 1
  • 4
1
vote
1 answer

Back projection (backgorund subtraction) using Imgproc.calcHist in OpenCV (openCv4Android)

I am currently working on an Android application and would like to make back projection. The tutorial I am following is : http://docs.opencv.org/doc/tutorials/imgproc/histograms/back_projection/back_projection.html#back-projection The problem I am…
test
  • 2,538
  • 4
  • 35
  • 52
1
vote
2 answers

Convex hull on the mask outputted by BackgroundSubtractorMOG

I am using the BackgroundsubtractorMOG() to basically extract a mask to separate out the foreground. I am then using convexHull() on the mask to locate the position of a moving object. But i am getting the following error: openCV Error: Assertion…
Ameya005
  • 31
  • 1
  • 5