-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic exposure gain control doesn't work #63
Comments
I found a workaround to this issue is to read a 324x324 image before reading the actual image you want. This seems to force the camera to update the exposure. It does lead to a bit of flickering, but it is worth it for to get dynamic exposure. |
Hi! Sorry for the late reply. The dynamic exposure has posed a bit of a problem but we don't have an good fix for it now unfortunately. But good you found an solution for it now. Let's keep this issue open for others to comment on it as well. |
The solution by @neoamos doesn't appear to work for me but I am not sure if it is due to some change since it was last posted or maybe it was something I did. Maybe someone else has a better way to do this now? |
Not sure if it helps, but we had a hard time figuring out how to disable automatic exposure. Our solution is at https://github.com/IMRCLab/aideck-gap8-examples/blob/1da6336c290da14c9be7f9b298835c09084acbbe/examples/other/wifi-img-streamer/wifi-img-streamer.c#L105-L121. Perhaps first disabling and then re-enabling every second or so will work? |
Thanks @whoenig. I've tried that with the face detection example, using Will try a few more things and report back if I find anything. |
After some testing, this seems to work for setting the auto exposure in the face detection example:
Not sure why it needs to be set twice but I tried various combinations and it looks like this is working for me. Another unrelated observation is that the |
Hmmm that is indeed odd that it needs to be set twice. I would imagine that perhaps if you do it too early that the registries won't go through well... So if you remove the first registry-set it doesn't work for the second one? |
I tested again and it seems to work if I set it once like this:
I saw that PI_CAMERA_CMD_STOP is defined in https://github.com/GreenWaves-Technologies/gap_sdk/blob/ef8ee923dfb39cf2ef962d25e5bf69f8881ebfb3/rtos/pmsis/bsp/camera/himax/himax.c#L455C10-L455C28, I'm wondering if calling |
Hmmm that is perhaps a better question for the Greenwaves folks I'm afraid... I'm not sure what the function does either. |
Just some update - I was still having trouble and it seems the most reliable way is to set the exposure after
The image will oscillate between a darker and brighter image if the brightness is on some threshold, I'm guessing that the exposure gain control is very coarse (ANALOG_GLOBAL_GAIN setting only has options like 2x, 4x). |
From what I understand, the Himax camera should be able to adjust the exposure continuously to adapt to different lighting conditions. In the WiFi streaming example, this is not the case. If you turn on the camera in a dark room, and then turn the lights on, the image will be completely washed out and the camera does not adjust the new lighting conditions. If you start the camera in a room that is already bright, the exposure will be set correctly. It seems that the exposure is only set at the time the camera is turned on, and then it stays the same.
I have the AI deck v1.1
The text was updated successfully, but these errors were encountered: