NVargus auto white balance Jetson Nano

we are using a 4K IMX 415 sensor in conjunction with a Jetson Nano. We would like to grab the values the auto-white balance function in NVArgus calculates in terms of RGB and Gain for calibration purposes. Is there a way to get access to these numbers ?

Dear @hausenbernard

This topic does not belong to NVAPI section. I have moved it to Jetson Nano section, the moderators of that section will attend this further.

Thank you.
NVAPI Forum Moderator

hello hausenbernard,

you may download MMAPI, i.e. $ sudo apt install nvidia-l4t-jetson-multimedia-api
there’s Argus sample to obtain while balance gains, you may also call the API, setWbGains to control the WB settings.
for example,

Hi Jerry, thank you for your commment. It is not setting custom white balance that we are interested, but actually getting the current setpoint. When auto white balance with white balance lock is active we want to preserve the values during nvargus-daemon restart.

hello hausenbernard,

why don’t you just execute userAutoWhiteBalance sample. it’ll free run AWB and report the converge WB gains.

We have compared white balance performance earlier between userAutoWhiteBalance and the native WB done with the built-in Nvidia algorithm and found the results with the built-in algorithm to be better for our application. Is there no way to get the RGB values and perhaps gamma/gain that this features uses ?

hello hausenbernard,

there’s API, Argus::IAutoControlSettings::getWbGains.
you may try adding this to argus_camrea to obtain the results.

Thank you again for your continued efforts to solve this. Argus::IAutoControlSettings::getWbGains only works for manual white balance. In contrast we are looking for the individual levels of each variable when using Auto-white- balance when using the built-in Nvidia algorithm. When we have those we can store and restore them for when the camera is restarted. Otherwise the user has to recaiibrate each time which we want to avoid.

hello hausenbernard,

may I know what’s the actual failure. is there a demonstration for the issue.
besides, don’t it be manual white balance when you’re trying to restore wbgain?

Every time we use our camera we perform a white balance “calibration” by basically lock the settings that are derived from white balance in auto mode, without ever knowing the actual numbers obtained inside the Nvidia algorithm. This means when we lose connectivity to our camera or the Nano we lose these white balance “calibration” settings. Therefore we need to know the actual white balance numbers that the Nvidia algorithm determined during our “calibration” so we can feed these numbers into our application thereby avoiding a new white balance calibration.

hello hausenbernard,

if I understand this correctly, Nvidia algorithm have determined AWB, but that’s not the results your implementation expected.

so, this is the tuning related issue.
we don’t support this, please contact with camera vendor for further supports.

Hi Jerry. No, no, no. We are happy with how the Nvidia algorithm determines the white balance in auto mode. We just need the raw data behind that AWB, ie the RGB values and the gamma , gain and exposure if they are also involved. As eluded to previously, we need the raw data to reimplement the same white balance settings without having to “calibrate”.

hello hausenbernard,

you may export camera stack debug logs.
it’s able to check those settings, such as exposure, gain, tonemap…etc.
however, white balance logs were disabled by default, it’ll need to rebuild scf binary manually to enable them.

you may follow below steps to configure debug flag and also Argus daemon LOGs

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

you may put a terminal for gathering the logs. it’ll spewing debug messages after you enable the camera stream.
note, you may only consider the logs with following… runBreakDownAlgorithm output ---: convergenceStatus:
this is the very last AE calculation, and sending controls to low-level driver for register programming.
whereas, convergenceStatus=1 for Searching, 2 for Converged, 4 for Timeout.

hello hausenbernard,

how about calling this API, Argus::ICaptureMetadata::getAwbWbEstimate.
you may refer to below example to obtain the current AWB WB estimate,
for example,

+                    std::vector<float> wbEstimate;
+                    iMetadata->getAwbWbEstimate(&wbEstimate);
+                    printf("wbEstimate: ");                    
+                    for (unsigned int i = 0; i < 4; i++)
+                        printf("%f ", wbEstimate[i]);
+                    printf("\n");

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