Motion - Bug Report 2006x 02x 07x 212816

BUG: auto brightness "blinks"

i can't determine, if my problem is not related to a particular cam, but here it goes.

if i turn the auto brightness on, it adjusts the brightness to the light level, so it seems to be working fine. but if the light in front of the camera drops down below certain level, the auto brightnes feature starts "blinking". this means, every n-th frame on the output is completely white (except for the time stamp). you can see it on the live stream but these white frames are also saved in the picture files, most probably because there is "motion" detected, as the white frame surely differs from the previous one.

i don't think this is the same problem as described above as "unstable auto brightness" because i wouldn't call it oscillation. it is just rapid white blinking and the completely white frames are saved.

Test case

labtec cam working on spca5xx driver, vendor id/product id: 046d/0929. system: Ubuntu 5.10, kernel 2.6.12-10-386. motion: 3.2.4.

i'm not sure my camera has built-in autobrightness feature. i don't think so though as this is a very cheap model and there are no changes in brightness if the auto mode is off. wink

if you want to see the effect i'm writing about, write to newsgabber-remove@pocztaPLEASENOSPAM.onet.pl

Environment

Motion version: 3.2.4
ffmpeg version: n/a
Shared libraries: n/a
Server OS: ubuntu breezy, kernel 2.6.12-10-386

-- AndrzejJanuszkiewicz - 07 Feb 2006

Follow up

Please try to reproduce that problem with daily snap . Also the framerate that you're using will be useful.

-- AngelCarpintero - 10 Feb 2006


The problem is that the brightness settings in different cameras are very different. The minimum and maximum values are rarely the entire V4L defined range, the actual step size varies and the sensitivity. It is close to impossible to write a universal algoritm. I could add 3-4 more config options but I am very reluctant because Motion already have too many of them.

You can try and experiment yourself.

I am adding some constants to video.c that you can play with

/* Constants used by auto brightness feature
 * Defined as constant to make it easier for people to tweak code for a
 * difficult camera.
 * The experience gained from people could help improving the feature without
 * adding too many new options.
 * AUTOBRIGHT_HYSTERESIS sets the minimum the light intensity must change before
 * we adjust brigtness.
 * AUTOBRIGHTS_DAMPER damps the speed with which we adjust the brightness
 * When the brightness changes a lot we step in large steps and as we approach the
 * target value we slow down to avoid overshoot and oscillations. If the camera
 * adjusts too slowly decrease the DAMPER value. If the camera oscillates try
 * increasing the DAMPER value. DAMPER must be minimum 1.
 * MAX and MIN are the max and min values of brightness setting we will send to
 * the camera device.
 */
#define AUTOBRIGHT_HYSTERESIS 10
#define AUTOBRIGHT_DAMPER 5
#define AUTOBRIGHT_MAX 255
#define AUTOBRIGHT_MIN 0

Let us know how it goes.

Implemented in SVN 45, daily 20060222

-- KennethLavrsen - 21 Feb 2006

Fix record

No more actions on this

-- KennethLavrsen - 18 Jul 2006
Topic revision: r5 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.