Manual exposure setting

Hello,

I am working on a Libargus API based C++ camera application and try to adjust manually the exposure time settings,. I read multiple threads about the topic one of the most helpful was that Problem with exposure setting on camera - Jetson & Embedded Systems / Jetson TX1 - NVIDIA Developer Forums
But unlike in the referred post I was not able to modify the exposure time value.
This code part responsible for turning of the auto exposure and set a new value:

ISourceSettings *iSourceSettings = interface_cast<ISourceSettings>(iRequest->getSourceSettings());
EXIT_IF_NULL(iSourceSettings, "Failed to get source settings interface");
    
IAutoControlSettings* iAutoControlSettings = interface_cast<IAutoControlSettings>(iRequest->getAutoControlSettings());
EXIT_IF_NULL(iAutoControlSettings, "Failed to get IAutoControlSettings");
Argus::Status status = STATUS_OK;
status = iAutoControlSettings->setAeLock(true);
EXIT_IF_NOT_OK(status, "Failed to setAeLock()");
status = iAutoControlSettings->setAwbLock(true);
EXIT_IF_NOT_OK(status, "Failed to setAwbLock()");

Range<uint64_t> limitExposureTimeRange = iSensorMode->getExposureTimeRange();
USER_AUTO_EXPOSURE_PRINT("Sensor Exposure Range min %ju, max %ju\n",
limitExposureTimeRange.min(), limitExposureTimeRange.max());
    
status = iSourceSettings->setExposureTimeRange(Range<uint64_t>{100000000, 100000000});
EXIT_IF_NOT_OK(status, "Failed to setExpoRange()");
status = iSourceSettings->setGainRange(Range<float>{16,16});
EXIT_IF_NOT_OK(status, "Failed to setGainRange()");
limitExposureTimeRange = iSensorMode->getExposureTimeRange();
USER_AUTO_EXPOSURE_PRINT("Sensor Exposure Range min %ju, max %ju\n",
limitExposureTimeRange.min(), limitExposureTimeRange.max());

I print the exposure values before and after the setting and during the video feed streaming and I always got back the same value:

Exposure range min 1000, max 355744000

I also tried to follow the exposure value with dmesg and proper grep and I noticed every application run produces 2 exposure setting but always sets the same value.

Now I have a code where I can turn off the auto exposure but it looks like I can not modify the exposure time, I tried multiple values which are in the range of the checked values. Where should I search for the root of the problem?

hello bence.lukacs,

you’ve to turn-off AE to configure exposure time manually.

Thank you for your fast response.
To be honest I am a bit confused I read the documentation pdf and checked the userAutoExposure sample in the multimediaapi folder and this previous post where you answered a similar question. I also checked the camera application in the multimediaapi.
I added the following line to the userAutoExposure example:
status = ac->setAeLock(false);
After that the camera kept the exposure value set by the setExposureTimeRange

But in my code it looks like the same command has no effect. It looks like I can set the autoexposure via the setAeLock command but I do not see the difference between the 2 implementation.

I guess I am missing something trivial.

hello bence.lukacs,

had you call… Argus::ICaptureSession::repeat() to queue a request with your settings?
please refer to Argus sample, it have to use iSession->repeat(request.get()) for sending those camera settings before fetching sensor frames.

BTW,
you may also test with argus_camera sample application, which provide the user-interface to control the exposure-time.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.