Auto-Brightness, Exposure Time and Long Time Exposure [ too bright and blurry images]

Hey Once again,

I have some specific questions related as you could expect from the heading of this post.

So, I have a Teledyne Dalsa Nano c1930 camera. I am trying to acquire the images with 30 fps having image resolution of 1984x1264 using fisheye lens. I am using cvb python for image acquisition.

I have 2 questions and would be thankful if anyone could answer it,

  • Why does the Auto brightness does not work, I mean it works in the beginning and later it is always bright and does not auto-adjust. I don’t know the reason, even tried to change the settings from the GeniCam browser but not yet solved the issue, you can see the below image, it get to normal brightness but is than fixed.

Furthermore, I trigger (configure) the auto-brightness grammatically with the following code:

CAMERA_WIDTH=1984
CAMERA_HEIGHT=1264
CAMERA_HORIZONTAL_OFFSET=0
CAMERA_VERTICAL_OFFSET=0
FPS=30

def deviceConfiguration(dev_node_map):
    dev_node_map['Cust::autoBrightnessMode'].value = "Active"
    dev_node_map['Std::Width'].value = CAMERA_WIDTH
    dev_node_map['Std::Height'].value = CAMERA_HEIGHT
    dev_node_map['Std::AcquisitionFrameRate'].value = FPS
    dev_node_map['Std::OffsetX'].value = CAMERA_HORIZONTAL_OFFSET
    dev_node_map['Std::OffsetY'].value = CAMERA_VERTICAL_OFFSET

Now, to exposure time and long time exposure, You can see the blurry images below:

I read about the these two on this page and also looked at this post where he was trying to set the exposure time.

I am beginner in this domain, and did not get it but I what I understand that the exposure time has to be set which is mentioned here can anyone guide me how to set the correct exposure Time and long Time Exposure for 30fps and 1984x1264 resolution. So in the end my images are not blurry.

Regards,
Aftab

Hi Aftab,

To set the exposure you have several options. Set the values with the acqusition stopped, you shoud see the change when staring the acquisition then.

  1. Set Exposure manually. For this to work you need to set the Cust::autoBrightnessMode to off. Then adjust the exposure time in µs with the Std::ExposureTime node. Also check that the Std::ExposureMode is set to timed, which might be the default and not changeable on your camera model.

  2. Getting an automatic exposure once, which might be good for similar illumination for the current camera run but not huge changes in light intensity e.g. when driving on the road with avenues, tunnels etc. For this setting, first turn on the Cust::autoBrightnessMode by setting it to active, like you did. Then set the Std::ExposureAuto node to Once (if supported by the device).

  3. Getting continuous automatic exposure updates. This is the same as 2) but setting the Std::ExposureAuto node to Continuous.

For 2) and 3) you can then also set the exposure time range (Cust::exposureAutoMinValue and Cust::exposureAutoMaxValue).
Gain can also be automaticially adjusted (Std::GainAuto set to Once or Continuous) in the range Cust::gainAutoMinValue and Cust::gainAutoMaxValue.

To check all features of your camera I would suggest opening the GenICam Browser, set the visibility to “Guru” (four bars on the top right → Max Visibility → Guru). Then play with the nodes under Sensor Control / Auto Brightness. When you click on the nodes e.g. Auto-Brightness Mode you’ll see the actual name of the node in the camera and the possible settings for the node. These can then be used in your program to be set.

A remedy for the blurry image might be a lower gain. Also check the physical focus on your lense and that the lense is screwed in all the way.

I hope that helps :slight_smile:

Hey @usernv,

Thank you so much. I checked all the features from GeniCam Browser. You can see the features below.

2

I also adjusted the brightness manually from the lens. Its look better now but when there is light, brightness does not auto adjust. Furthermore. for blurry images I have to test it by performing the acquisition on the roads. But I don’t understand why the auto brightness is not enforced. Is I am missing any configuration?

Thanks in advance :slight_smile:

Regards,
Affi

Hi @aftab,

Your settings look fine to me. When you point the camera at a light source and manually adjust the brightness on the lense, you shoud see it dimming back a bit/brightening up a bit. It’s not as pronounced as with consumer cameras where you’ll always get a crisp, perfectly balanced image. That’s because with these cameras you get the actual raw image of a high-end sensor instead of a highly processed image which looks good but is not suitable to do reliable processing on.

Can you confirm that this subtle dimming effect is not visible?
Which lense are you using with your camera?

Hey @usernv,

Thank you. Yes I see the brightening up a little bit but not dimming when the light is more, the things cannot be visible, its look like I am looking at sun.

I am using this lens Fujinon Fish-Eye FE185C057HA-1.

Regards,
Affi

If the image is too bright, you probably want a shorter Auto-Exposure Time Min Value (Cust::exposureAutoMinValue). If it is still blurry (is it?) it might be an issue that the lens is not fully screwed in or is smudged, Can you please check that?

yes, I double checked, the lens is properly screwed. When there is less light, the setting is taking into account which I configured by adjusting the lens but when the sun is out than the brightness is very high.

what will be the suitable value for Cust::exposureAutoMinValue? and I fear that when there will too much light and it will be a problem? I mean I will not see anythings, you can see the first image which I uploaded. This is very weird because, When I tune the the setting for the current light it works fine but if there is sun out or less light than that settings will be too bright or vice versa.

Thank you.

I would propose to just set the exposureAutoMinValue to the miniumum that the camera supports (check the GenICam browser for that). Probably around 34 µs. You will have to find a balanced setting of the aperture and the range the camera can support.
The image above also looks like you are moving. If that’s the case, a shorter exposure time should also help getting less blur.

Hi @aftab,

I’m not familiar with this particular camera, but I think it’s a general problem. I think you need to reduce the Auto-Brightness Target value, because the correct exposure is probably calculated from an average value over the whole image. Since there are a lot of dark areas around the hole, the algorithm tries to reach the target value by brightening the middle area more. A better solution than reducing the target value would be, of course, if the auto exposure metering would only take place in the center, but I don’t know if it is possible with the camera to define this area.
The fact that the motion blur is so strong is also due to the relatively high exposure time. With a lower target value, the motion blur should also decrease. If the blur is still too high, the gain must be increased. Note, however, that this also increases the image noise, i.e. the image quality decreases.

So what you should do first is to find the right Auto-Brightness Target value so that the middle area has the desired brightness. Then you need to find the exposure time at which there is just acceptable motion blur and set the Auto-Exposure Time Max Value to that value. When this exposure time is reached, the gain goes up. Of course, this has its limits: if it gets too dark (at night), it will no longer work at some point.