@Alex-Kushleyev I was able to get it working with some changes to hal3_camera_mgr.cpp. The short version is I added int32_t aeExposureCompensation = -12; requestMetadata.update(ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION, &aeExposureCompensation, 1);
to the AE_ISP case here in hal3_camera_mgr.cpp and recompiled and deployed the voxl-camera-server following the docs here. I also had a hard time finding the docs for these parameters for some reason so I'll like them here just in case it's useful to others.
The slightly longer version is I really added a custom auto exposure mode AE_CUSTOM to lines 169-189 of common_defs.h, and then copied the AE_ISP case, renamed it custom, and added the two lines above to that. With this method, I also had to modify this line and add if(ae_mode != AE_ISP && ae_mode != AE_CUSTOM){
to prevent the exposure and gains from being overwritten. I'd like to add the autoexposure compensation as a parameter to /etc/modalai/voxl-camera-server.conf
so it's more convenient to change, but it's not urgent.
If there's a better way to do any of this, I'd appreciate any feedback, but it is working now. I've attached my /etc/modalai/voxl-camera-server.conf
below
* voxl-camera-server Configuration File
*
* Each camera has configurations for up to 4 HAL3 streams:
* - `preview` stream for raw unprocessed images from CV cameras
* - `small_video` 720p (ish) h264/h265 compressed for fpv video streaming
* - `large_video` 4k (ish) h264/h265 for onboard video recording to disk
* - `snapshot` ISP-processed JPG snapshots that get saved to disk
*
* on QRB5165 platforms (VOXL2 and VOXL2 mini) you can only have 3 of the 4 enabled
*
* This file is generated from default values by voxl-configure-cameras.
* Do not expect arbitrary resolutions to work, the ISP and video compression
* pipelines only support very specific resolutions.
*
* The default video compression mode is cqp or Constant Quantization Parameter
*
*
*
*/
{
"version": 0.1,
"fsync_en": false,
"fsync_gpio": 109,
"cameras": [{
"type": "imx412",
"name": "hires",
"enabled": true,
"camera_id": 0,
"fps": 30,
"en_preview": false,
"preview_width": 640,
"preview_height": 480,
"en_raw_preview": false,
"en_small_video": true,
"small_video_width": 1024,
"small_video_height": 768,
"small_venc_mode": "h265",
"small_venc_br_ctrl": "cqp",
"small_venc_Qfixed": 30,
"small_venc_Qmin": 15,
"small_venc_Qmax": 40,
"small_venc_nPframes": 9,
"small_venc_mbps": 2,
"en_large_video": true,
"large_video_width": 4056,
"large_video_height": 3040,
"large_venc_mode": "h265",
"large_venc_br_ctrl": "cqp",
"large_venc_Qfixed": 38,
"large_venc_Qmin": 15,
"large_venc_Qmax": 50,
"large_venc_nPframes": 29,
"large_venc_mbps": 30,
"en_snapshot": true,
"en_snapshot_width": 4056,
"en_snapshot_height": 3040,
"exif_focal_length": 3.0999999046325684,
"exif_focal_length_in_35mm_format": 17,
"exif_fnumber": 1.2400000095367432,
"ae_mode": "custom"
}]
}```