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.

TDA4VM: AWB failure in dark environment

Part Number: TDA4VM


Hi all,

I found that AWB will fail to control when the module is placed in dark environmont, which can be seen in the fingure below, the image looks very greenish. As the light brightens, the image returns to normal. The problem did not disappear after re-calibration AWB.

There are the AWB calibration result and xml file. please help me check. 

reAWB resuls.zip

Thanks.

  • Hi Zhili,

    The calibration does not look good.

    Please (1) check your calibration lights and (2) follow AWB plugin guide carefully in doing AWB calibration.

  • Hi Gang,

    I have checked my operation process and redid AWB calibration, the calibration output you can see in "AWB cali results.zip" attached below, but the result still not good. The image is normal under bright environment, it will become greenish when the environment get dark (Below about 5lux), which you can see in the "greenish images.zip" attached below.

    In addition, when the image is greenish, the AWB gain is change to R gain=1.012, G gian = 1, B gain = 1.012, and the color temperature = 2311K (No matter what the current color temperature is) , these data come from Algorithm View tap in Camera Information & Control in DCC. It seems that the AWB failed.

    AWB cali results.zip 

    greenish images.zip

    Please help me check, thanks.

    BR.

  • Hi Zhili,

    Your new calibration looks better than previous.
    Please include the black level correctly in your "WDR Decompanding Knee Points" tab.

    Could you please share the HDR companding knee points and black level of your shared raw images?
    I used the ones from a previous e2e thread, but it does not seem to work properly.

  • Please share your AWB calibration project in tuning tool if possible.

    BTW, it will help debugging if you can also share the bin file dumped from H3A for the failure scene.

  • There is the whole project that I am using, you can open it to recurrence. 

    X3C_Project_tuning_FOV120.zip

    The black level is set to 64 in "WDR Decompanding Knee Points" tab that is same with the value set in sensor setting.

  • Hi Gang,

    Do you have any idea on this problem?

    Thanks.

  • Hi Zhili,

    I see several suspicious things in your shared images and tuning projects, but your output YUV images does not match well with the xml files.
    So, I am not sure what is actually used in your system and which one is actually causing you trouble.

    1. AWB tuning is roughly correct, but it looks like having black level issues.
    Your AWB plugin has black level of 0 (rather than 64) for each input raw file, but changing them to 64 does not really help.

    That suggests there might be some problem in the raw images (could be due to lens flare/glare or nonlinear sensor response).

    2. Your "normal-bright environment.yuv" has WB issue on the white patch and the wall of the lightbox.
    That also suggests nonlinear response in sensor.

    3. Your "OVX3C-MAX9295_MARS_h3a_aewb_dcc.xml" in X3C project is not valid, but the GUI input values are OK.
    I am not sure what is actually used in your actual system because the invalid values would cause driver error.
    Please redo H3A plugin in tuning tool V3.0 and export to the xml file.

    4. Your H3A parameter has H3A input is b5~b14 out of 20b, which is b9~b18 out of 24b.

    That will make your H3A input very dark for "normal-bright" and almost 0 for "dark" scene.
    Then, AWB will not have good scene information in input to work properly.

    The last one (4) may be the main cause of your trouble in dark conditions.
    Please try lower values (note that it will affect AE as well).

  • Hi Gang,

    1. AWB tuning is roughly correct, but it looks like having black level issues.
    Your AWB plugin has black level of 0 (rather than 64) for each input raw file, but changing them to 64 does not really help.

    How to set black level in AWB plugin? I didn't see the way.

    2. Your "normal-bright environment.yuv" has WB issue on the white patch and the wall of the lightbox.
    That also suggests nonlinear response in sensor.

    This may because of the calibrition of AWB is not so good.

    3. Your "OVX3C-MAX9295_MARS_h3a_aewb_dcc.xml" in X3C project is not valid, but the GUI input values are OK.
    I am not sure what is actually used in your actual system because the invalid values would cause driver error.
    Please redo H3A plugin in tuning tool V3.0 and export to the xml file.

    4. Your H3A parameter has H3A input is b5~b14 out of 20b, which is b9~b18 out of 24b.

    I'm sorry I got mixed up with the parameters, the h3a xml in the project I upload is not the one i am using, the default H3A seeting is what i am acturally using.

    I will check again the H3A parameter that i am using, BTW, do you have any advice on how to tuning H3A plugin?

    Thanks.

  • How to set black level in AWB plugin? I didn't see the way.

    This may because of the calibrition of AWB is not so good.

    It does not look like.
    The other gray patches are much better and consistent.

    BTW, do you have any advice on how to tuning H3A plugin?

    You may try similar settings as IMX390 in PSDK as a start point (e.g., 32H x 16V windows).

    H3A input bit may start at b0, b1, or b2 out of 20b on GUI (higher values may give more issue in low light).

    For 24-bit WDR, most customers use gamma value around 0.5.

  • Hi Gang,

    There is a good news that the greenish image become normal in low light after reset the H3A parameter, thank you very much.

    I put the new H3A xml file export from DCC V3.0 here, the previous one is also attached.

    H3A_xml_files.zip

    Howerer, I have some questions about this problem:

    1. Is the greenish image in low light caused by the wrong statistic data judging by the results so far?

    2. If I set the value of "output 10 out of 20 linear bits from LSB#" to 5, does that mean the data below b5 will not be used for AE/AWB process?

    3. I found that the value of "v_skip" and "h_skip" in "_h3a_aewb_dcc.xml" exported from DCC V2.5 is 2 while the one exported from DCC V3.0 is 4, the parameter settings of the two software are the same, which is shown in below:

    Is the results from V3.0 recommended?

    Thanks.

    BR.

  • Thanks for the update!

    1. Is the greenish image in low light caused by the wrong statistic data judging by the results so far?

    I cannot tell for 100% sure, but AWB input from H3A must be wrong in this case (either too dark or completely wrong).
    The best way to confirm is dumping the h3a output to SD card or printing the AWB input at "AWB_TI_parse_H3a_buf( )" to console.

    2. If I set the value of "output 10 out of 20 linear bits from LSB#" to 5, does that mean the data below b5 will not be used for AE/AWB process?

    Yes, that is correct for 20-bit WDR sensor (H3A input image is 10-bit only -- b5~b14).
    Your sensor works in 24-bit WDR mode rather than 20-bit, which means b9~b18 in your 24-bit input.

    3. I found that the value of "v_skip" and "h_skip" in "_h3a_aewb_dcc.xml" exported from DCC V2.5 is 2 while the one exported from DCC V3.0 is 4

    That is a known bug in V2.5.