I'm just getting started with OpenCV. I came across this question, and I'm trying to find where that code came from. Any ideas?
A:
If you don't have reference image of the background then you could try to make an average of first n
frames and use such resultant image as a reference. This number, n
, could be 20 or similar and it should be enough if the scene isn't too complex. I recommend you to read a chapter about background subtraction in official OpenCV book (http://www.amazon.com/Learning-OpenCV-Computer-Vision-Library/dp/0596516134) as there are some of other similar techniques presented.
Adi
2010-09-07 10:14:55