I am making some tests with the camera if it’s possible to use it in a commercial application. Therefore it is necessary to use constant light and camera settings. For my tests I have disabled white_balance_auto_present, set the auto_exposure to manual and set the scene_mode to none.
Now when I change the shutter value, especially setting it to 0 and then increasing it, I get an almost white image with a lot of noise.
In the net I have found a spec of the image sensor. I have seen that the chip has an auto gain control and a night mode. I think that these features are making me problems.
I have tried to disable these features by setting the chip registers but it didn’t work. I had a look in the source of the V4L2 driver and it seems that the feature, to set a chip register, is not implemented. When I am wrong please correct me.
So is it possible to disable the auto gain control and night mode?
The AGC algorithms on the sensor are all disabled - it is done in the Broadcom ISP within BCM283[5|6]. All the control to the OV5647 is also from the GPU side of BCM283[5|6], so mess with the I2C on port 0 at your peril when the camera is running.
V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL, and then setting V4L2_CID_EXPOSURE_ABSOLUTE to a value in the range 1 to 10,000,000 should set the exposure time in 100usec increments. 0 is not a valid setting.
Have you set V4L2_CID_ISO_SENSITIVITY as well? That is providing gain control.
Setting V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE to V4L2_WHITE_BALANCE_MANUAL generally means you need to set V4L2_CID_RED_BALANCE and V4L2_CID_BLUE_BALANCE too, otherwise they'll default to 0 and you'll get a totally green image. See www.raspberrypi.org/forums/viewtopic.ph ... 58#p530358
If you're unsure of settings, then I'd suggest downloading the source from http://git.linuxtv.org/cgit.cgi/v4l-uti ... tree/utils and building qv4l2 as a quick and easy swiss-army knife for tweaking anything V4L2 related. You can also use the command-line version which is v4l2-ctl.