background-subtraction


How to use BackgroundSubtractorMOG2 for images

三世轮回 提交于 2020-01-05 11:01:49
问题 I am pretty new to OpenCV and I am stuck at the moment. I am dealing with images, not a video. Since I will have same background in my project, I thought it would be easier to work, if I could remove my background. But first, I have to ask one thing. Can I use BackgroundSubtractorMOG2 for images? Because it is under video analysis/motion analysis title. I read the documentation on opencv.org and looked through countless examples/tutorials but I am still having difficulty understanding how

Is there any documentation describes the way GSOC algorithm (background subtraction) works?

随声附和 提交于 2020-01-05 05:38:09
问题 I need to track some moving objects so want to use one of background subtraction algorithms implemented in opencv. Saw some examples of how they work and it seems like GSOC is the one I need (the best result for my purposes), but can't find any good explanation of the way it works. Documentation says like this: Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper. This algorithm demonstrates better

OpenCv Issue of Image Subtraction?

和自甴很熟 提交于 2020-01-05 03:48:02
问题 i am trying to subtract 2 image using the function cvAbsDiff(img1, img2, dest); it working but sometimes when i bring my hand before my head or body the hand is not clear and background comes into picture... the background image(head) overlays my foreground.(hand).. it works correctly on plain surfaces i.e when the background is even like a wall. please check out my image...so that you can better understand my problem...!!!! http://www.2shared.com/photo/hJghiq4b/bg_overlays_foreground.html if

How to save masks of videos in openCV2 python

陌路散爱 提交于 2020-01-01 14:49:07
问题 I can capture a video from the webcam and save it fine with this code cap = cv2.VideoCapture(0) fgbg= cv2.BackgroundSubtractorMOG() fourcc = cv2.cv.CV_FOURCC(*'DIVX') out = cv2.VideoWriter('output.avi', fourcc, 20.0, (640,480)) while(cap.isOpened()): ret,frame = cap.read() if ret: fgmask = fgbg.apply(frame) out.write(frame) #Save it cv2.imshow('Background Subtraction', fgmask) if cv2.waitKey(1) & 0xFF == ord('q'): break #q to quit else: break #EOF cap.release() out.release() cv2

OpenCV Android Background Subtraction

白昼怎懂夜的黑 提交于 2019-12-30 04:36:09
问题 I am working on a robotics project using an Android phone as the main processor and the camera to detect movement. I got the Android binary package from OpenCV and got it correctly installed. I can capture images using the OpenCV native camera and display them to the screen. I'm having problems using the background subtraction class, though. I can make a new BackgroundSubtractorMOG object in the constructor, but when I attempt to run the code below, it force quits I get the error "Only 1- and

Save opencv BackgroundSubtractorMOG to file?

Deadly 提交于 2019-12-23 10:26:11
问题 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 long time? 回答1: I happened to be searching for this exact thing, so I'll just share what I've learned, if someone else is still looking for it. It seems like the short answer is no . At least it does not seem to be supported by OpenCV.

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

≡放荡痞女 提交于 2019-12-22 07:08:46
问题 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: You can use the DSP for all kinds of computations. It is a general purpose CPU optimized for DSP applications. So yes, even floating point stuff will work albeit the performance will not be great. The DSP really shines if you do integer computations over large arrays of data. Here the DSP can easily compute so fast that the time to transfer data

Edge Detection and transparency

时光怂恿深爱的人放手 提交于 2019-12-21 13:37:10
问题 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 this and the open source library opencv. Aside from rolling my own or using opencv is there an easy way to do this? I am open to any language or platform. Thanks 回答1: If your background is consistend in an image but inconsistent across images it

Edge Detection and transparency

杀马特。学长 韩版系。学妹 提交于 2019-12-21 13:36:10
问题 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 this and the open source library opencv. Aside from rolling my own or using opencv is there an easy way to do this? I am open to any language or platform. Thanks 回答1: If your background is consistend in an image but inconsistent across images it

Background subtracting in MATLAB

廉价感情. 提交于 2019-12-19 07:43:29
问题 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 image to another)? 2) In the Math Works explanation for imsubtract() why do they make their structuring element a disk? This seems rather difficult so far because every time I try something, I end up not only subtracting the noisy background but

工具导航Map