2

can you suggest a good option for background subtraction using emgucv? my project is real time pedestrian detection.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ranzan
  • 51
  • 2
  • 6

2 Answers2

0

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.

Aishwar
  • 9,284
  • 10
  • 59
  • 80
0

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

See:Removing background from _capture.QueryFrame()

Community
  • 1
  • 1
Chris
  • 3,462
  • 20
  • 32