can you suggest a good option for background subtraction using emgucv? my project is real time pedestrian detection.
2 Answers
Not sure if you still need this, but...in EmguCV, if you have 2 images of say type Image<Bgr, Byte>
or any other type, called img1 and img2, doing img1 - img2
does work! There is a function called AbsDiff as well, I think it works like this: img1.AbsDiff(img2)
, you could look into that.
If you already have the picture of the background (img1) and you have the current frame (img2), you could do the above.

- 9,284
- 10
- 59
- 80
This is quite possible take a look at the "MotionDetection" example provided with EMGU this should get you started.
Effectively the code that removes the foreground is effectively named "_forgroundDetector" it is the "_motionHistory" that presents stores what movement has occurred.
The example has everything you need if you have trouble running it let me know,
Cheer
Chris