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: Distorted image of LDC is different from that of Opencv

Part Number: TDA4VM

Hello, we have some problems with the LDC of TDA4X. We found that there are differences between the LDC and Opencv images after distortion removal. According to the imaging principle, this should not be the case. Is there something we did wrong?

  • This is the original picture:

    On the left is the Opencv distortion map, and on the right is the LDC distortion map

                 

    This is the image diff after Opencv and LDC distortion removal. The white edge is the offset difference between the two:

  • Hi,

    I can see the geometry difference while flipping between the 2 output images above.
    Around image center, there is about 8~10 pixel horizontal shift.

    You may need to check the actual input pixel locations at image center in opencv vs LDC.
    You have have some issue in translating from opencv locations to LDC LUTs.

  • HI,  Gang Hua

    we refer to the https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1042074/faq-tda2pxevm-how-to-create-a-mesh-lut-for-tda2p-tda3-ldc?tisearch=e2e-sitesearch&keymatch=MESH%2520LUT.  

      

    impl by c++ :

     

    the mapX/mapY is gen by opencv,  the mesh_table is output for ti  mesh LUT ,  

    but we get che camera output 

    use default block size(64 * 64) , 

    Down-sampling factor 4:

    Down-sampling factor 3:

    Down-sampling factor 2:

    Down-sampling factor 1:

    Why the green block Mosaic changed with Down-sampling factor ? What's the reason?

    and we use Down-sampling factor 3 , change che  block size ,  we find 

    it also changed  with block width.

    Why the green block Mosaic changed with block size ? What's the reason?

     block size 32* 16:

     block size 32* 64:

     block size 16 * 64:

     block size 8 * 64:

    Above all,  We want to know:

    1. Why the green block Mosaic changed with Down-sampling factor ? What's the reason?

    2. Why the green block Mosaic changed with block size ? What's the reason?

    3. How to solve this problem, can you provide sample ?

  • Hi Dulei,

    the mapX/mapY is gen by opencv,  the mesh_table is output for ti  mesh LUT ,  

    It looks like your mapX/mapY may have some issues before converting to LDC H/W format at the right boundary.
    Mostly likely, they are out of the image boundary or invalid in some sense.
    Do you add the clipping of "h_p" and "v_p" in to valid image boundary in opencv?
    You may print out those mapX/mapY values in the green area to see if some entries have issues.

    With invalid mesh entries and down sampling, the error will propagate to entire down sampling block because LDC has to do interpolation to fill in the miss entries from down sampling.