# Auto-Exposure Issue with Tracking Camera

Source: https://forum.modalai.com/topic/1090/auto-exposure-issue-with-tracking-camera
Category: Development Drones (https://forum.modalai.com/category/44/development-drones)
Tags: m500
Posted: 2022-07-06 18:20:23 UTC by Michael Hinckley
Replies: 6 · Views: 1086

## Michael Hinckley · 2022-07-06 18:20:23 UTC

Hello, I am experiencing an auto-exposure issue with the tracking camera. The camera constantly flashes between bright and dim frames when it is exposed to sunlight. I recently flashed the drone with the VOXL 3.6.0 system image, but the problem still persists. Additionally, I tried sending the drone a manual gain and exposure, but the flashing continued after voxl-streamer was restarted.

## Reply by Guest · 2022-07-11 22:54:20 UTC

Hi Michael,

We're aware of the flickering issue and have fixed it on our dev branch which we're planning to do a full release of in the coming weeks. 

As for the failure to set manual exposure/gain, how are you sending these instructions?

## Reply by Michael Hinckley · 2022-07-12 13:45:48 UTC

Hi Alex,

We were using:
```
voxl-send-command tracking set_exp_gain <exposure> <gain>
```
However, it seems that we were not setting the auto exposure mode to "off" before sending the commands.

## Reply by hmlow · 2022-08-24 05:01:06 UTC (in reply to Guest)

@Alex-Gardner 
I'm looking forward to the fix as well.
Which version will it be released on? Is fix applied to voxl-camera-server or voxl-qvio-server?

## Reply by david.moro · 2023-07-24 20:34:11 UTC

Hi! It has been almost a year since the last response in this thread. I assume the change made it to the full release. I just flashed a board with SDK 1.0.0 and I see the problem when flying outdoors. Can you confirm this fix got pushed? DM and I can share a link to a video.

Cheers!

## Reply by Moderator (ModalAI staff) · 2023-07-25 00:34:08 UTC

The AE defaults are configured for OV7251. If you are using a different sensor, you'll need to tweak the PI values yourself to achieve your desired setup

Details here: 
https://docs.modalai.com/voxl-camera-server/#camera-server-config-file

If there is flicker, you could probably start by turning down the P gain. Here are the relevant parameters

ae_k_p_ns: the desired p_ns for the exposure algorithm
ae_k_i_ns: the desired k_i for the exposure algorithm
ae_max_i: the desired max_i for the exposure algorithm

## Reply by david.moro · 2023-07-25 12:42:20 UTC (in reply to Moderator)

@Moderator , I am using the standard OV7251 sensor. The Flicker does not happen indoors though. Happy to share a video.

Regards,
