Questions about exposure time range in Libarugs

I have following questions regarding exposure time range in Libarugs.

  1. How is the range determined? Does it depend on the frame rate? For example, with frame rate being 20 frames per second, the exposure time could be up to about 50ms. But if the frame rate is 10 frames per second, the exposure time could be up to about 100ms.
  2. If I set a value out of the range, what will happen? Will Libargus change the value to the range limit or doesn’t change the exposure time and return an error?
  3. If it reports an error and exits, what if Libargus is streaming, will the stream be torn down? Will there be any problem with the whole system, such as the system hangs up?

hello suchao,

>> Q1.
it depends-on your sensor capability,
for instance,
it’ll report all available sensor modes by running camera stream through gst pipeline with nvarguscamerasrc plugin.

GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 44.400002; Exposure Range min 44000, max 478696000;
GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 177.000000; Exposure Range min 58000, max 184611000;
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 30.000000; Exposure Range min 864000, max 20480000;
GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 177.000000; Exposure Range min 859000, max 15649000;

>> Q2.
it’ll fall back to sensor’s default support settings if you’re given out of range settings.
here’s an example to launch camera stream at 1920x1080@60-fps, and assign gain range.
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 aelock=1 gainrange="99 199" ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=60/1, format=NV12' ! nvvidconv ! xvimagesink -e
by checking the logs… you’ll see it’s following the specified settings to assign gain range.
GST_ARGUS: NvArgusCameraSrc: Setting Gain Range : 99 199
however, the specified the gain (max gain) has exceed the support range.
it’ll fall back max analog gain to 177 for streaming.
GST_ARGUS: Invalid max gain value, using default maximum gain: 177.000000 instead.

>>Q3
I think above example-2 has given demonstration already.

I am a little confused with the first two modes.

Assume that the frame rate is 50 frames per second. That means there is one frame in every 20 ms. But the maximum exposure time is 478 ms for mode 1 and 184 ms for mode 2.

If I set the exposure time to 100 ms with frame rate being set to 50 frames per second, how will that work?

Does that mean the shutter will keep open all the time? Then there is no difference between 20 ms and 100 ms. Any number bigger than 20 ms will keep the shutter open all the time.

In this case, will the system still work? Will there be anything reporting error?

hello suchao,

it’s not always true, there’s dynamic frame-rate for increasing exposure time.

Thank you for your reply.

Can I say this? No matter which value the user tries to set to the gain and exposure, Argus will always set the value within the range and won’t exit with an error just because the value is out of range?

hello suchao,

ummm… may I know what’s the real use-case.
please give it a try, and sharing your test steps (failure messages if it reported) for reference.

Sorry I don’t have any real use-case yet. Currently, I am still gathering information.

The situation I imagined is something like follows.

  1. Given certain frame rate, the customer wants to set the exposure. But the customer doesn’t know which is the acceptable range. So the customer may set any value, which could be out of range.
  2. Do I need to check the range before calling Libargus set exposure function or I can just pass the value to Libargus set exposure function? If I directly send the value, can I be confident that Libargus will handle that without setting an invalid value to the image sensor and exiting with an error.

hello suchao,

as mentioned in above comment #4, there’ll be error reported, and it’ll fall-back to sensor’s capability for image capture.

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