I’m using [Jetpack 5.1.2] Argus nvraw tool to capture raw and jpg images along with metadata. I noticed that for jpg images, there is a ISP digital gain applied based on the metadata file. From the documentation, there are no sensor controls available to fix the digital gain for nvraw utility.
Is there a way to fix digital gain for jpg images captured using nvraw tool? Is the source code for nvraw tool available to modify sensor controls?
The command used to capture jpg image is -
sudo nvargus_nvraw --format "raw,jpg" --exp0 "0.1,1" --file "nvraw_1ms" --mode 1
The generated metadata file adds ISP digital gain of 3.204291 as shown below.
frame[0].plane[0].exposure_time = 0.100000;
frame[0].plane[0].sensor_gain = 1.000000;
frame[0].plane[0].sensor_awb_gains[0] = -1.000000;
frame[0].plane[0].sensor_awb_gains[1] = -1.000000;
frame[0].plane[0].sensor_awb_gains[2] = -1.000000;
frame[0].plane[0].sensor_awb_gains[3] = -1.000000;
frame[0].plane[0].isp_digital_gain = 3.204291;
hello userc1274,
may I also confirm the sensor module you’re using, had you apply ISP overrides?
besides, we did not public release Argus nvraw source code.
Hello JerryChang, thanks for your reply.
For this test, I deleted the ISP overrides file and verified in nvargus-daemon
logs that ISP overrides file is not applied, but still see that digital gain is applied for jpg and raw images (in the generated metadata file). Is there a way to fix the digital gain to 1.0 for nvraw captures?
hello userc1274,
let me double confirm your Jetpack release version and Jetson platform you’re working with.
it seems this is topic from Jetson TX2 which doesn’t looks right.
Hello JerryChang,
Looks like I’ve posted in the wrong forum. I’m using Jetpack 5.1.2 on AGX Orin, not TX2. Can I continue this topic here or could you help move this topic to the correct forum? Thanks.
I’ve moving this bug ticket to AGX Orin category.
could you please gather camera stack debug logs.
you may follow below configuration on the target to enable the logs.
$ sudo su
# pkill nvargus-daemon
# export enableCamCoreLogs=5
# nvargus-daemon 2>&1 | tee argus-output.log
it’ll output lots of logs,
please dig into convergence status, which contain the ISP digital gains applied by camera software stack.
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
Sorry for the delayed response.
ISP overrides file is removed for the below tests.
Test 1 - For nvraw captures with 1ms exposure, ISP digital gain is being applied.
Command - sudo nvargus_nvraw --format "raw,nvraw" --exp0 "0.001,1" --file "nvraw_m2" --mode 1
In the nvargus-daemon logs, we can see that ISP digital gain settles at 2.28519 - Attached AE_log-m2.txt
How is digital gain applied for raw captures?
AE_log-m2.txt (18.2 KB)
Test 2 - For jpg captures with 1ms exposure, ISP digital gain is being applied.
Command - sudo nvargus_nvraw --format "raw,jpg" --exp0 "0.001,1" --file "nvraw_m4" --mode 1
In the nvargus-daemon logs, we can see that ISP digital gain settles at 2.28487 - Attached AE_log-m4.txt
For longer exposures, digital gain is fixed at 1. Is there a way to control digital gain for shorter exposures?
AE_log-m4.txt (18.2 KB)
hello userc1274,
I’m also curious your sensor capability, please also share your mode-1 exposure/gain limitations,
also, let’s try adding verbosity config to gather more logs for running nvargus_nvraw.
for instance,
$ sudo nvargus_nvraw --format "raw,jpg" --exp0 "0.1,1" --file "nvraw_1ms" --mode 1 --verbosity debug
hello userc1274,
BTW, we cannot repo this locally on developer kit.
runBreakDownAlgorithm output ---: convergenceStatus: 2, framerate 9.52381, requiredCain 0.01736 totalAchievedCGains 0.01736 with AA 0.17361 {step 0, f-Number 2.40000}, ET 0.10000, AG 1.00000, ISPDG 1.00000
may I know what’s your environment setups, for instance, did you capture frames at low-light environment?