Ask Your Question
0

BackgroundSubtractor::getBackgroundImage in pure C

asked 2013-04-09 14:10:44 -0500

TrueBers gravatar image

updated 2013-04-09 14:13:25 -0500

Hi, guys!
I'm a bit confused with algos using in pure C. I didn't find C-interfaces for BackgroundSubtractor(MOG)::getBackgroundImage. How should one use it properly? I suspect, it must be implemented by myself if I want to use pure C? Are there some short examples in C?
Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-09 15:15:24 -0500

Like you say, backgroundsubtraction was implemented in the C++ interface, in which OpenCV still performs best. These C++ algorithms are all highly optimized and there might even be some day that the C - interface will die out slowly.

Basically what you could do to simulate background subtraction yourself is

  • Read in a reference frame
  • For following frames, just subtract the reference frame from the new frame

All static objects will get removed. You can then clean out the image using dilation and erosion.

edit flag offensive delete link more

Comments

1

Thank you! Already started to implement the whole program in C++ :D

TrueBers gravatar imageTrueBers ( 2013-04-09 15:46:38 -0500 )edit

That is also what I would recommend :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-09 16:33:27 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-09 14:10:44 -0500

Seen: 397 times

Last updated: Apr 09 '13