Ask Your Question

Video feed starts white and it's messing with my background subtraction

asked 2017-02-02 02:31:18 -0500

kieranfish gravatar image

Hey there, I've made an motion tracker in C++ and I'm running into issues with the video feed. The video starts off white and then the brightness fades as the camera adjusts to the brightness. I'm using BackgroundSubtractorMOG and it detects this as a constantly changing background. Is there anyway to auto detect the brightness and keep it at a certain level, or even just detect when an image is too bright to detect and only apply the subtractor when it reaches an acceptable level?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-02-03 21:56:11 -0500

Tetragramm gravatar image

Just skip the first hundred frames or so?

Take the average value of the image and only update if it's below a certain value?

Start the learning rate really high and lower it to the default as time goes on?

edit flag offensive delete link more


Some great suggestions up there! I'm thinking of taking a frame from somewhere in the middle and using it as a 'template frame'-type thing. And then getting the value of that image and adjusting the brightness of each frame until it's that value, do you think that will be affective? I like the sound of changing the learning rate as the lighting gets better. Would the learning rate in BackgroundSubtractorMOG be the history parameter?

kieranfish gravatar imagekieranfish ( 2017-02-06 03:28:12 -0500 )edit

That would be the parameter to change, yes.

Tetragramm gravatar imageTetragramm ( 2017-02-06 18:11:40 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-02-02 02:31:18 -0500

Seen: 58 times

Last updated: Feb 03 '17