You are not logged in.
I'm using Python and OpenCV on my laptop to make a simple motion detection script using the built in webcam.
Basically my script takes an initial reference image, and then constantly compares subsequent frames to the initial image and looks for any differences using cv2.absdiff(), which is how it detects motion. I greyscale and blur both images being compared, and then use a binary thresh on the resulting difference.
It works fine when the object being detected is small or far away, but if, say, a person walks up to within a few feet of the webcam, the webcam automatically adjusts its brightness, ruining the result.
How would I go about disabling this auto brightness function of the webcam in arch?
Last edited by lemonWater (2015-09-21 01:44:43)
Offline
Are you sure that it's even Arch doing this?
In most cases the auto-brightness is handled in the webcams hardware.
Offline
Try 'v4l2-ctl -l' and check if there is something like white_balance_temperature_auto and try changing it with 'v4l2-ctl -c white_balance_temperature_auto=0', if it works you can write an udev rule to do that for you every time the webcam is detected.
Other settings may be responsible for your "problem", such as backlight_compensation, so try to change a few settings and see if it solves your problem.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Turns out it was a hardware issue, fixed
Offline