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: DCC Tuning Tool (LDC), Flashback occurs.

Part Number: TDA4VM

Using the Mesh LDC plugin of DCC Tuning Tool, I will exit the tool when I click on Process Plugin. May I ask what is causing this?

  • Hi qian,

    Could you please share your tuning tool version and a sample LDC project that crashes?

  • Hi,

    The tuning tool version is 3.10. And now, I can  run the 'tuning tool'. However, the image displayed in the tuning output is black and white.

    Here is the project setting:

    The YUV image format is YUV420 planar I420.

    The mesh.txt is here:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    1671 940
    1576 909
    1482 878
    1390 845
    1299 812
    1210 778
    1123 743
    1038 707
    954 671
    873 634
    795 596
    718 557
    644 518
    573 478
    505 437
    439 395
    377 353
    318 311
    262 268
    210 225
    161 181
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • And, I have a more confusing question. I am using a new camera that is not available in "/imaging/sensor_drv/src/". We created the driver earlier, but we do not have the content of the "dcc_xmls" folder. How can we obtain the folder for further work?

  • The YUV image format is YUV420 planar I420.

    I suppose you the common yuv420 format as your input image.
    However, LDC and tuning tool supports only NV12.

  • BTW, in your screenshot, "YUV420SP 8b" is for NV12.

  • And, I have a more confusing question.

    I suppose you have a raw image sensor.

    You may refer to the python script for generating the xml folder.

    git.ti.com/.../default_DCC_profile_gen

  • OK, thank you!  However, when I use an image in the "YUV420 planar NV12" format, clicking on "Process Plugin" in the "Execute" menu bar will exit the tool.

    The following is the relevant settings interface:

    After selecting the image, we can see that the Preview is fine, and the format of this image is "YUV420 planar NV12".

    The other settings are the same as the screenshot of the previous email. But, clicking on "Process Plugin" in the "Execute" menu bar will exit the tool.

  • OK,thank you!

    I used a camera (ar0147) with a built-in ISP, and the output image format is YUV.

    I can generate the "dcc_xmls" folder through "default-DCC_profile_gen/scripts/ctt_def_xml_gen. py", which contains "linear" and "wdr".

    But I found that under the "gw_ar0233_yuv/dcc_xmls" and "ub9xx_yuv_test_pattern" folders, there are only "generate_dcc. sh" and the corresponding "*_ldc. xml" files, while under the other "ar0233, ar0820, imx219, imx390, ov2312" folders, there are "dccbins" and "dccxmls", and under the "dccxmls" folder, there are "linear" and "wdr".

    Is there any difference?

    I just want to execute the xml (asamplesensor_mesh_ldc_dcc. xml) and bin(cid42_asamplesensor_mesh_ldc_dcc. bin) files of the "DCC Tuning Tool" through the "generate_dcc. sh" file.Furthermore, it is possible to perform distortion processing on the camera (ar0147).


    Regards,

    Yueqian

  • After selecting the image, we can see that the Preview is fine, and the format of this image is "YUV420 planar NV12".

    Can you share a simple LDC tuning project so that I can reproduce the issue?
    I am not aware of any similar issues and your input and mesh lut look fine.

  • I used a camera (ar0147) with a built-in ISP, and the output image format is YUV.

    In the case of YUV sensors, you only need the LDC xml file from tuning tool.
    You may copy the files from "ub9xx_yuv_test_pattern settings", then update the script and replace the xml file.

  • Furthermore, it is possible to perform distortion processing on the camera (ar0147).

    This is a question for onsemi.

  • OK,

    I just need to modify the content of 'generate_dcc. sh' as follows:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    DCC_TOOL_PATH=../../../../tools/dcc_tools/
    OUT_PATH=../../../include
    rm *.bin
    rm $OUT_PATH/dcc_ldc_ar0147_yuv_uyvy.h
    $DCC_TOOL_PATH/dcc_gen_linux asamplesensor_mesh_ldc_dcc.xml
    cat *.bin > ../dcc_bins/dcc_ldc.bin
    $DCC_TOOL_PATH/dcc_bin2c ../dcc_bins/dcc_ldc.bin $OUT_PATH/dcc_ldc_ar0147_yuv_uyvy.h dcc_ldc_ar0147_yuv_uyvy
    rm *.bin
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Is the 'cid42_asamplesensor_mesh_ldc_dcc. bin' generated using the 'DCC Tuning Tool' unusable here, as the 'bin' file seems to have been cleaned up in 'generate_dcc. sh'.

    May I ask if 'dcc_ldc_ar0147_yuv_uyvy. h' is the generated file, such as changing it to 'ldc_lut_1280x720. h' to replace 'ldc_lut_1920x1080. h' in the SDK?

    Regards,

    Yueqian

  • Is the 'dcc_ldc. bin' here the 'cid42_asamplesensor_mesh_ldc_dcc. bin' file generated by the 'DCC Tuning tool'?

  • Is the 'cid42_asamplesensor_mesh_ldc_dcc. bin' generated using the 'DCC Tuning Tool' unusable here, as the 'bin' file seems to have been cleaned up in 'generate_dcc. sh'.

    The script regenerates all the bin files.

    May I ask if 'dcc_ldc_ar0147_yuv_uyvy. h' is the generated file, such as changing it to 'ldc_lut_1280x720. h' to replace 'ldc_lut_1920x1080. h' in the SDK?

    No, it is not the same.
    The script generates a DCC data structure.


    "dc_lut_1280x720. h" is in the LDC H/W LUT format.
    It should be equivalent to the LUT included your "asamplesensor_mesh_ldc_dcc.xml".

  • >> cat *.bin > ../dcc_bins/dcc_ldc.bin

    No, it is a new file.

    We don't require copying the bin files from tuning tool.
    xml files are enough.

  • sorry, I sent you the attachment via email the day before yesterday, but it seems that you have not received it.test_fail.zip

  • OK,thank you very much.

    However, it seems that there needs to be a '../dcc_bins/dcc_ldc. bin' file first, otherwise when running  "cat *.bin > ../dcc_bins/dcc_ldc.bin" in the "./generate_dcc. sh", the following error occurs:  "ERROR: Input file [../dcc_bins/dcc_ldc.bin] not found. How can I run this script correctly?

    At the beginning, I corrected the distortion based on this guide manual.But it's a bit different from what you guided. I am currently performing distortion correction based on your guidance, rather than following the guidance manual in the link above.

    https://www.ti.com.cn/cn/lit/an/zhcabz8/zhcabz8.pdf?ts=1695430433473&ref_url=https%253A%252F%252Fwww.ti.com.cn%252Fsitesearch%252Fzh-cn%252Fdocs%252Funiversalsearch.tsp%253FlangPref%253Dzh-CN%2526searchTerm%253DTDA4VM%2BLDC%2526nr%253D606

                    "dc_lut_1280x720. h" is in the LDC H/W LUT format.

                    It should be equivalent to the LUT included your "asamplesensor_mesh_ldc_dcc.xml".

    How can I obtain the 'ldc_lut_1280x720. h'' file through "asamplesensor_mesh_ldc_dcc.xml"

    Or, how can I utilize the generated "dcc_ldc_ar0147_yuv_uyvy. h" file after running "./generate_dcc. sh"?

    If "dcc_ldc_ar0147_yuv_uyvy. h" file can be  obtained, can you tell me what to do next about Ldc(distortion correction)? Thank you very much!

    Regards,

    Yueqian

  • However, it seems that there needs to be a '../dcc_bins/dcc_ldc. bin' file first, otherwise when running  "cat *.bin > ../dcc_bins/dcc_ldc.bin"

    That is the output of the command.
    You may not have the ../dcc_bins/ folder in place.

  • How can I obtain the 'ldc_lut_1280x720. h'' file through "asamplesensor_mesh_ldc_dcc.xml"

    I suppose by "ldc_lut_1280x720.h", you mean using LDC without DCC data structure.
    That is a pure LDC mesh LUT without any other DCC information.
    If you call tiovx LDC kernel without DCC data structure, you may use that pure mesh LUT and convert it to an openvx image for LDC kernel input.

    If you use DCC data structure as in single-cam app, then you may use the header file generated by the "./generate_dcc.sh".
    That is a header file can be included into the single-cam app for testing.

    You may see how "dcc_ldc_imx390_wdr.h" is included and used in "app_iss_common.c".

  • sorry, I sent you the attachment via email the day before yesterday, but it seems that you have not received it.test_fail.zip

    This project is not properly saved.
    I can open it, but there is nothing in LDC plugin.

    Could you please check your project and save it before zipping?

  • Okay, you can try this one.

    4403.test_fail.zip

    Regards,

    Yueqian

  • 4403.test_fail.zip

    This is still an empty project.
    I don't see necessary things under ".plugoutdir/DC_Mesh_LDC/"

    I tried with your yuv and mesh file as in the below project.
    It does not crash on my side although the output image does not look distortion corrected.

    /cfs-file/__key/communityserver-discussions-components-files/791/1832.test.7z

  • At the beginning, I corrected the distortion based on this guide manual.

    I don't see any real difference.
    The guide looks the same as the LDC FAQ -- https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1058565/faq-tda4vm-how-to-create-a-ldc-mesh-lut-for-fisheye-distortion-correction-on-tda4?keyMatch=LDC%20FAQ

    How can I obtain the 'ldc_lut_1280x720. h'' file through "asamplesensor_mesh_ldc_dcc.xml"

    The LUT data is in the included file in your xml file.

    { //mesh_lut
    #include "asamplesensor_mesh_lut.txt"
    }

  • OK, thank you for your help. We are currently encountering a new issue, and my undistorted image has some issues. Just like the following, the position circled by the red line will experience linearization. What can be done to cancel this department?

    Regards,

    Yueqian

  • Hi qian,

    We are currently encountering a new issue,

    It is getting out of the input image boundary there.
    You will have to use a smaller output view or pad your input image.

    Please start a thread with proper title for new questions.

  • OK, thank you again for your help! Here is another thread I started to address this issue.

    TDA4VM: Distortion processing - Processors forum - Processors - TI E2E support forums

  • Thank you and close this thread!