Hi @Prospecto,
We do not have such a feature natively currently as this is quite specific, but you could code this behavior on your own. You do have to take into account that as the depth compute is done after the capture, applying the ROI will be at least one frame late.
Activating the AEC/ACG enables the auto-exposure/gain provided by nvargus. Here are a few details about how this is configured internally:
The ratio between exposure and gain is controlled by a coefficient in the nvargus ISP file located at: /var/nvidia/nvcam/settings/zedx_ar0234.isp
The ratio between exposure and gain is controlled by a coefficient in the ISP file:
ae.ExposureTuningTable.Preview[0] = {2.4, 0.01666, 13.0, 1.0};
ae.ExposureTuningTable.Preview[1] = {2.4, 0.03333, 13.0, 1.0};
ae.ExposureTuningTable.Preview[2] = {2.4, 0.03333, 13.0, 1.0};
ae.ExposureTuningTable.Preview[3] = {2.4, 0.03333, 13.0, 1.0};
ae.ExposureTuningTable.Preview[4] = {2.4, 0.03333, 13.0, 1.0};
ae.ExposureTuningTable.Preview[5] = {2.4, 0.06666, 13.0, 1.0};
ae.ExposureTuningTable.Preview[6] = {2.4, 0.06666, 13.0, 1.0};
ae.ExposureTuningTable.Preview[7] = {2.4, 0.06666, 13.0, 1.0};
The coefficient in question is the 3rd value (13.0) in the previous snippet. Each line is supposed to control the exposure/gain ratio over an illumination range, but due to a lack of documentation on the subject, we recommend always using the same value.
By default, we set this coefficient to 13 to avoid motion blur when the camera is in motion. If this parameter is set to 1, the gain will remain at a minimum as long as the exposure is not at its maximum. The higher this value, the higher the gain level for a given illumination, and consequently, the shorter the exposure time.
You are welcome to experiment with these values if you wish to adapt your own behavior for this.
To load the new ISP parameters, you will need to reload the daemon with the command: “sudo systemctl restart zed_x_daemon.service”. The ISP of a camera cannot be modified if it is not turned off. Since the daemon controls all cameras via Argus, all cameras must be turned off when reloading a new ISP.