Argus saturation and colorCorrectionMatrix

Hallo,

It seems that I can not set the CCM and the Saturation at the same time.
If I enable the CCM (with setColorCorrectionMatrixEnable(true)), the saturation set with setColorSaturationBias(sat) or setColorSaturationEnable(true) and setColorSaturation(sat) dose not effect the generated image.

Is this a bug or an inherent limitation of the argus library?

Environment

Platform: Jetson Xavier NX
Multimedat API: 0.98
Operating System + Version: L4T 32.7.2

hello rbayr,

may I have your pseudo-code for setting CCM (i.e. Color Correction Matrix)
how you evaluate the image quality, did you running matlab to examine the pixel saturation?

I basically use the following code to set the CCM and saturation.

if(saturation < 0.0){
    request->iAutoControlSettings->setColorSaturationEnable(false);
}else{
    request->iAutoControlSettings->setColorSaturationEnable(true);
    request->iAutoControlSettings->setColorSaturation(saturation);
}

if(bias < 0.0){
    request->iAutoControlSettings->setColorSaturationBias(1.0);
}else{
    request->iAutoControlSettings->setColorSaturationBias(bias);
}

request->iAutoControlSettings->setColorCorrectionMatrix(matrix);
request->iAutoControlSettings->setColorCorrectionMatrixEnable(true);

If I set request->iAutoControlSettings->setColorCorrectionMatrixEnable(true); than all generated images look the same no matter witch values I use for the saturation and / or bias.

If I set request->iAutoControlSettings->setColorCorrectionMatrixEnable(false); than the gernated images look visibly different, as expected by the given saturation.

hello rbayr,

could you please also calling Argus::ICaptureSession::repeat() to update your capture settings.
it is a convenience method that will queue a request whenever the request queue is empty and the camera is ready to accept new requests.

Currently, I use Argus::ICaptureSession::capture() for every image i capture, so the capture settings should be updated

hello rbayr,

please give it a try for setting CCM first, and then using APIs for tuning saturation and bias,
for instance,

request->iAutoControlSettings->setColorCorrectionMatrix(matrix);
request->iAutoControlSettings->setColorCorrectionMatrixEnable(true);


if(saturation < 0.0){
    request->iAutoControlSettings->setColorSaturationEnable(false);
}else{
    request->iAutoControlSettings->setColorSaturationEnable(true);
    request->iAutoControlSettings->setColorSaturation(saturation);
}

if(bias < 0.0){
    request->iAutoControlSettings->setColorSaturationBias(1.0);
}else{
    request->iAutoControlSettings->setColorSaturationBias(bias);
}

There is no difference in the captured images if I set the CCM before or after the saturation.

hello rbayr,

could you please helps to add getColorSaturation() to confirm the values has set to auto-control, but it’s not taking effects.

I can confirm that getColorSaturation return the set value and that the ICaptureMetadata of the generated images also have the right saturation values.

It seems like as if the saturation value is set correctly in the autocontrol setting but it is not applied to the image.

So, is there any progress on this issue?

Are there any Updates?

hello rbayr,

this is our Argus API behavior, Argus API only allow control either CCM or saturation.
for instance, we’re using unity matrix as saturation matrix if the user defined CCM is used.

Then please update you documentation, there it sates for the setColorSaturation() function:

Jetson Linux API Reference → setColorSaturation()

This saturation value may be used to modify the color correction matrix used for processing (
setColorCorrectionMatrix), and these changes will be reflected in the color correction matrix output to the capture metadata.

and for the setColorCorrectionMatrix() function:

Jetson Linux API Reference → setColorCorrectionMatrix()

The active color correction matrix used for image processing may be internally modified to account for the active color saturation value (either user-specified or automatically generated, after biasing,

From this documentation I would conclude, that both options can be used within one request.