Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using background-subtraction to track moving objects

I'm trying to use background-subtraction to track moving objects, but thus far I'm not able to get good results. I made use of an algorithm very similar to what is given here:

http://study.marearts.com/2014/04/opencv-study-background-subtraction-and.html

I use the boundingRect() of each of the contours to get foreground ROIs, but the results are not fantastic. Among other things:

  • Sometimes there are little rectangles at the edge of some high-contrast division. Maybe I should just ignore ROIs that are smaller than some size?
  • Sometimes the entire frame (or half the frame) gets flagged as foreground. What's going on here? Lighting change? Any way to detect eliminate these false-foregrounds?
  • How to track the same object over multiple frames? Since the ROI size-position can change drastically it's hard to connect them from one frame to the next and be confident it's the same object...

Any help or pointers would be appreciated.

Using background-subtraction to track moving objects

I'm trying to use background-subtraction to track moving objects, but thus far I'm not able to get good results. I made use of an algorithm very similar to what is given here:

http://study.marearts.com/2014/04/opencv-study-background-subtraction-and.html

I use the boundingRect() of each of the contours to get foreground ROIs, but the results are not fantastic. Among other things:

  • Sometimes there are little rectangles at the edge of some high-contrast division. Maybe I should just ignore ROIs that are smaller than some size?
  • Sometimes the entire frame (or half the frame) gets flagged as foreground. What's going on here? Lighting change? Any way to detect eliminate these false-foregrounds?
  • How to track the same object over multiple frames? Since the ROI size-position can change drastically it's hard to connect them from one frame to the next and be confident it's the same object...

Any help or pointers would be appreciated.