Zed can be closed with close() function, but the auto exposure etc will change and cause overexposure when start a new recording in daylight. I’m trying to record the SVO every 5 minutes.
This is a behavior that we could not replicate.
Have you tried to force the disable and re-enable of the AEC_AGC control to trigger a quick exposure processing?
Correction on previous question: the auto exposure adjustment take about 10 seconds, not 30 seconds.
The work flow is as this:
// open zed with init parameters
auto returned_state = zed.open(init_parameters);
...
// Setup ZED recording parameters.
recordingParameters.video_filename = sl::String(filename_svo.c_str());
auto err = zed.enableRecording(recordingParameters);
...
// grab frames
auto state = zed.grab(runtime_parameters);
...
zed.disableRecording();
zed.close()
We are recording SVO files on 5 minutes chunks. If we open and close the zed for each 5 minutes (repeat the above code), each svo file shows from over-exposure to normal in about 10 seconds at the beginning. I just tried the following with AEC_AGC:
// open zed with init parameters
auto returned_state = zed.open(init_parameters);
zed.setCameraSettings(sl::VIDEO_SETTINGS::AEC_AGC, 0);
zed.setCameraSettings(sl::VIDEO_SETTINGS::AEC_AGC, 1);
...
the results are about the same. Here are the screen grabs:
Beginning of SVO file:
Then about 10 seconds when the auto exposure settles (I can only put one embedded picture, but the exposure gradually becomes correct within ~ 10 seconds)
So I’m think these possible solutions:
keep the zed open (unless need to change the init parameters), and enable and disable recordings only. (possible long term stability? say for 2-3 days stay open, and enable and disable recording every 5 minutes.)
get the current video settings before the zed close, and apply the same video settings, then switch to auto AEC_AGC after 20 seconds.
My code is wrong and the auto exposure adjust should be very quick? (i.e. no over-exposure at the beginning of the SVO file.)
Before re-enabling the AEC_AGC control, I recommend setting a good value for exposure/gain and waiting for 5-10 frames to allow the ISP to set the new value.