This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: The issue of inaccurate AWB calibration in am62A

Part Number: AM62A7

Hi Ti experts

Currently, there is an issue of inaccurate calibration of AWB low color temperature using DCC.

The following is the gain value and corresponding result graph displayed by the calibrated AWB algorithm on DCC.

We can see that under A-light, the Bgain value is relatively small, resulting in a yellowed image.

After multiple AWB calibrations, the results are similar.

I want to know if calibration will cause the current problem?If so, which step should I pay attention to?

if not,can this issue also be caused by code?

Here are the Raw and Kneepoints used for calibration.There are also the raw images corresponding to the above images, as well as the raw and YUV images after turning off AWB.

3386.case.zip

  • Hi Peng

    The estimated color temperature under A light is to high, which results in a yellowed image. I think the problem lies on the calibration process since there are leaps in your calibration result.

    I suggest remove the image under 4848K and try calibration once. It's possible there are problems with this 4848K light source.

    Regards,

    Adam

  • Here are the Raw and Kneepoints used for calibration.

    Hi Peng,

    Could you please share the knee points?
    I am not able to find them in 3386.case.zip.

  • Hi Gang

    sorry,This is the kneepoints.

    0    0
    1023    1023
    1279    2044
    1535    4095
    2303    16383
    2559    24575
    2943    49151
    3071    65535
    3327    131071
    3455    196607
    3519    262143
    3647    524287
    3775    1048575
    3903    2097151
    3999    4194303
    4095    16777215
    65535    16777215

  • Hi Adam

    The following are the results after removing the color temperature of 4848.

    Although the color temperature estimation is indeed more accurate, the gain value has not changed.

    Is the gain value not directly related to the estimated color temperature value?

  • Hi Peng

    Is the gain value not directly related to the estimated color temperature value?

    The gain value is directly related to the estimated color temperature value and the calibration results.

    It seems to me that the gain values has changed a little compared with this:

    So what is the true color temperature of your A light? And would you please place the image under A light into DCC tuning tool and calibrate once more to see if the A light consistent with the interpolated calibration results? If you do so, please provide a calibration result like this

    Regards,

    Adam

  • Hi Adam

    what is the true color temperature of your A light?

    2755K

  • The black level is not tuned correctly according to this result:

    The tuned result should be in one line not in multiple lines like yours.

    Please subtract the black level in your decompanding LUT input to the DCC tuning tool and calibration once again to see if the problem solved. 

  • This is the result after adding the black level.

    The transformation direction of the gain value is opposite to what was expected. Bgain should be bigger, now it's even smaller.

  • Hi Peng 

    Have you put the changed decompanding LUT into xxx_decompand_dcc.xml too? You should modify lut in xxx_decompand_dcc.xml and lut in xxx_h3a_mux_luts_dcc.xml together with the change in awb. 

  • All the operations you mentioned have been implemented.

  • Hi Peng 

    Would you please provide all the xml and LUT related? 

  • Hi Gang

    There are no CFA and GLBCE.

    8078.case.zip

  • This is the result of another X3Csensor module in the same scenario, which is on the TDA4 platform.

  • Hi peng

    I used your knee points to generate a decompanding lut without subtracting the black level, here are parts of the result:

    and here is decompanding lut by you:

    How could them be almost the same if you do have subtracted black level as you said?

    All the operations you mentioned have been implemented.

    So there must be some problem in your decompand lut and h3a lut.

    Please compare all the dcc xml and lut with the one you used in TDA4, as your said the one in TDA4 works well.

  • Hi Peng,

    Your black level correction may not be accurate, but it should not cause AWB to fail so much.
    For the sake of clarity, could you please confirm the pedestal level in sensor and how you removed it in tuning tool?

    Looking at your AWB calibration images, xml file, and AWB_OFF raw images, I don't find any real problem other than inaccurate black level.
    I suppose the issue you have should be in the code/processing about applying AWB gain in sensor.

    Could you please first switch AWB gain from in-sensor to in-ISP and then test AWB again?
    I expect that you shall get correct white balance for both D65 and A in AWB_OFF/ON folders (and your other calibration lights as well).

    That can confirm your AWB calibration and locate the issue in the code for applying AWB gain in sensor.

  • Hi Gang 

    Solved my problem using AWBgain on the ISP side!Thank you very much for your support.

    I still have some questions. What is the data bit depth of WBgain on the ISP?

  • Hi Peng,

    The sensor may prefer applying AWB in sensor for better image quality.

    It looks like there is some issue in applying AWB gains in sensor on AM62A.
    You may have to debug more.

  • Hi Gang

    I still have some questions. What is the data bit depth of WBgain on the ISP?

    If the data bit depth of AWBgain on the sensor and ISP is inconsistent, is the gain value on the sensor consistent with the gain value on the ISP.

  • Hi Peng,

    I am not sure about the sensor driver you are using, but it should be straightforward for you to check if there is any integer/conversion issue there.
    Also, it might not be about the bit-depth of the gain.

    There is a slightly different data flow and some additional processing as raw images going into AM62A is already white balanced with in-sensor AWB gains.
    In-sensor AWB gains work well on RTOS platform for some other TDA4 projects at Hirain, but AM62A has slightly different AE code (2A wrapper) running on Linux instead of RTOS AE.
    It is also possible that there might be some issue in the Linux 2A wrapper code regarding in-sensor AWB gain.

  • Hi Gang

    Ti_ 2a_ Why is the gain value raised to the power of 0.6 in the wapper. c file?

  • Hi Peng

    If awb gain is applied in VISS, the gain is applied on an image with gamma (0.6 in your case).