Ask Your Question
0

How to get background image from frames,android?

asked 2013-04-04 11:07:55 -0600

Qichao Chen gravatar image

updated 2013-04-04 11:15:59 -0600

OpenCV4Android(2.4.4) doesn't support BackgroundSubtractorMOG2,it has BackgroundSubtractorMOG.how to get background and foreground image from frames.BTW,why OpenCV4Android doesn't support BackgroundSubtractorMOG2? thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-04 15:36:35 -0600

Basically, what you could do is implement a basic background subtraction algorithm.

  • Each 20 frames you create a reference frame for example (could be only once if static environment
  • For the next frames, subtract the reference frame from the current one, resulting in regions with change and movement
  • You could than use all 0 results in the subtraction as a binary mask for defining background and the pixel values as a mask for the foreground.
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-04 11:07:55 -0600

Seen: 1,324 times

Last updated: Apr 04 '13