AE flickering issue on camera

Hi Nvidia support team,

We are using agx orin with OV 0x08B40 sensor, it is using 3 exp 20bit companded data. when the camera is very bright condition. the auto exposure is flickering all the time. we dont have this problem in dark.

How can I resolve or debug this?

Thanks,
Samuel

hello samuel.shen,

let’s narrow down the isse,
is the flicker issue only reproduced with WDR mode?
please check whether you’ll see the same with SDR mode.

I checked linear mode. it also have severe flicker in bright condition. exposure or gain changes every frame in bright condition.

  1. is there some command we can check the ae statistics?
  2. we also tried to set ae parameter in camera_overrides.isp file, like lower ae.MeanAlg.ConvergeSpeed, ae.MaxFstopDeltaPos, ae.MaxFstopDeltaNeg, it slow down the ae convergence speed. but AE still flicker when it is bright.
    Thanks,
    Samuel

hello samuel.shen,

is there underflow? gain/ae should apply its minimum settings under this scene.

please configure below settings on the target.

$ sudo su 
# pkill nvargus-daemon
# export enableCamScfLogs=5
# export enableCamCoreLogs=5
# nvargus-daemon 2>&1 | tee argus-output.log

you may enable the camera stream to collect the logs.
let’s dig into the logs as following to check the AE status,
for instance..
runBreakDownAlgorithm output ---: convergenceStatus: 1, framerate 30.00000, requiredCain 0.01330 totalAchievedCGains 0.01330 with AA 0.17361 {step 0, f-Number 2.40000}, ET 0.03333, AG 2.29763, ISPDG 1.00000

argus-output2.log (3.7 MB)
Hi Jerry,

sorry it take a while, here is the log of the data. starting from cc330, you can see the exposure jumps around when it’s close to the minimum exposure time of the sensor. the row time of the sensor is about 30um.

Thanks,
Samuel

I’m also attaching the video and plot of Exposure fluctuation. it is similar to when the sun is inside field of view. the luxEstimates also fluctuates.



luxEstimates.txt (8.5 KB)

hello samuel.shen,

there’s convergenceStatus to indicate the specific algorithm state.
for instance,
convergenceStatus: 1 to indicate searching, algorithm is still searching for an optimal set of values.
convergenceStatus: 2 to indicate the specific algorithm is in a converged state.
convergenceStatus: 4 to indicate the 3A algorithm has failed to converge because the image is overexposed.

BTW,
may I know which Jetpack release version you’re working with?

HI Jerry,

Is there any solution for overexposure causing 3a fail? as our application will have sun in the FOV during day time. We are using jetpack5 now.

Thanks,
Samuel

hello samuel.shen,

it’ll enter converge state if the sensor output setting close to the scene lux estimation.
so, you may dig into the camera logs, it’s likely the sensor operation cannot lower the exposure or gain..etc.

Hi Jerry,
the sensor exposure and gain are close to the min exposure but not quite yet. as I mentioned the camera row time is 29.77us so the step size is 29.77us, and 59.54us(value=2) as min exposure time. it feels like the auto exposure is trying to set a value in between the step size and it is fluctuating. is there some parameter I could config to let ae know there is certain limitation?
for example, Here is two sample video, with one exposure set at min value, 60us and it is not flickering.
another one trying to set exposure between 120us and 90us, ae is keep hunting. similar behavior if I move the camera when the ae jump between 263.5us and 234.2us.
another question? if the sensor has step size limitation, will the ae be able to use gain to smooth the transition?


Regard,
Samuel Shen

hello samuel.shen,

may I know what’s your device tree settings, especially the.. min_gain_val, min_framerate, and min_exp_time.

Hi Jerry,

here is the value in device tree setting. Do you see any issue with the setting?
define OX08B40_INHERENT_GAIN “1”
define OX08B40_GAIN_FACTOR “16”
define OX08B40_MIN_GAIN_VAL “16” // 1.0x * 16
define OX08B40_STEP_GAIN_VAL “1”
define OX08B40_DEFAULT_GAIN “16”

define OX08B40_EXPOSURE_FACTOR “1000000” // scale to 1 us units
define OX08B40_MIN_EXP_TIME “59”
define OX08B40_MAX_EXP_TIME “32003”
/* The sensor can only step exposure by double row times = ~29.60 us.
*/
define OX08B40_STEP_EXP_TIME “30”

define OX08B40_DEFAULT_EXP_TIME “2000”

/* We use PWL WDR, not HDR */
define OX08B40_MIN_HDR_RATIO “1”
define OX08B40_MAX_HDR_RATIO “1”

/* Units are FPS */
define OX08B40_FRAMERATE_FACTOR “1”
define OX08B40_MIN_FRAMERATE “30”
define OX08B40_MAX_FRAMERATE “30”
define OX08B40_STEP_FRAMERATE “1”
define OX08B40_DEFAULT_FRAMERATE “30”

And I also notice in device tree, this was set as true.
define OX08B40_DELAYED_GAIN “true”
Does this means the it expect sensor have delayed gain that syncs with exposure time change(normally N+2), or it is expecting the sensor has constant gain change(N+1)?

Thanks

hello samuel.shen,

here’s another approach, you may try to specify AeRegion,
as you can see of.. $ gst-inspect-1.0 nvarguscamerasrc

Element Properties:
...
  aeregion            : Property to set region of interest for auto exposure
                        with values of ROI coordinates (left, top, right, bottom)
                        and weight (float number) in that order, to set the property
                        use for example: aeregion="0 0 256 256 1"

here’s a sample gst pipeline, which specify top-left as AeRegion.
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 aeregion="0 0 256 320 1.0" ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvoverlaysink -ev
however, the AE algorithm currently does not ignore completely outside setAeRegion(), instead, it gives more weights to the selected region.

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