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.

The reasons for images distortion

Other Parts Discussed in Thread: TMS320DM365

in this picture, the pink circular shoud be a white light. But now it is pink, I don't Know why.

the post in the green rectangle could be straight. But now itis curve.

Our own camera didn't have the filter witch is covered the CMOS chip. Is the filter the reason for distortion?

Or may be there is another reason for this distortion?

 

  • Rachel,

    What DM3xx device are you using?  Can you give us any more information about your system configuration?  (i.e. is this using the DVSDK version x.xx, EVM, custom board, etc...)

  • Hi Rachel,

    The issue 1 looks to me as a saturation problem. I assume you are using the parallel raw sensor input to DM365. DM365 has a 16 bit input interface and but your sensor may or may not have those number of data output lines. Generally, if the sensor is 12 bit raw data output, it might be connected to lines 15:4 of DM365 and the same is set in the CGAMMAWD register of the ISIF.

    Can you tell me how is the sensor output connection to DM365? Also, whether your sensor is 10,12,14 bit raw data sensor?

    What mode of drivers are you using - i mean, chained mode or non-chained mode? Can you capture the sensor output from ISIF directly into DDR and share the raw data with us? Any sort of image processing is available in IPIPE and by looking at sensor raw output data we can find out how is the input from sensor.

     

    The issue #2 also looks to me as a sensor input issue itself but we can judge by looking at sensor data.

    If you can provide sensor data, you need to tell us the width, height, data width 98,10,12,14 bit etc).

    Regards,

    Anshuman

  • The device we used is TMS320DM365,  we produced our own camera. My system configuration is

    UBL:   ubl_297arm_270ddr_ipnc_dm36x_0.2.0.bin;

    U-Boot:     u-boot-1.3.4_ipnc_dm36x_0.6.0.bin

    DVSDK:     dvsdk_dm365_setuplinux_2_10_01_18.bin

    LINUX kernel:     uImage_ipnc_dm365_1.0.0

    File system:        cramfsImage_ipnc_dm365_1.0.0

  • Anshuman;

    Hi, this is our sensor's perameters

    According to the table, our sensor is 12 bit raw data sensor.

     

    /* CGAMMAWD */
    #define CSL_ISIF_CGAMMAWD__RSV_MASK (0x00008000u)
    #define CSL_ISIF_CGAMMAWD__RSV_SHIFT (0x0000000Fu)
    #define CSL_ISIF_CGAMMAWD__RSV_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_WBEN2_MASK (0x00004000u)
    #define CSL_ISIF_CGAMMAWD_WBEN2_SHIFT (0x0000000Eu)
    #define CSL_ISIF_CGAMMAWD_WBEN2_RESETVAL (0x00000000u)
    /*----WBEN2 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN2_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN2_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_WBEN1_MASK (0x00002000u)
    #define CSL_ISIF_CGAMMAWD_WBEN1_SHIFT (0x0000000Du)
    #define CSL_ISIF_CGAMMAWD_WBEN1_RESETVAL (0x00000000u)
    /*----WBEN1 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN1_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN1_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_WBEN0_MASK (0x00001000u)
    #define CSL_ISIF_CGAMMAWD_WBEN0_SHIFT (0x0000000Cu)
    #define CSL_ISIF_CGAMMAWD_WBEN0_RESETVAL (0x00000000u)
    /*----WBEN0 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN0_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN0_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD__RSV1_MASK (0x00000800u)
    #define CSL_ISIF_CGAMMAWD__RSV1_SHIFT (0x0000000Bu)
    #define CSL_ISIF_CGAMMAWD__RSV1_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN2_MASK (0x00000400u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_SHIFT (0x0000000Au)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_RESETVAL (0x00000000u)
    /*----OFSTEN2 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN1_MASK (0x00000200u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_SHIFT (0x00000009u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_RESETVAL (0x00000000u)
    /*----OFSTEN1 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN0_MASK (0x00000100u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_SHIFT (0x00000008u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_RESETVAL (0x00000000u)
    /*----OFSTEN0 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD__RSV2_MASK (0x000000C0u)
    #define CSL_ISIF_CGAMMAWD__RSV2_SHIFT (0x00000006u)
    #define CSL_ISIF_CGAMMAWD__RSV2_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_CFAP_MASK (0x00000020u)
    #define CSL_ISIF_CGAMMAWD_CFAP_SHIFT (0x00000005u)
    #define CSL_ISIF_CGAMMAWD_CFAP_RESETVAL (0x00000000u)
    /*----CFAP Tokens----*/
    #define CSL_ISIF_CGAMMAWD_CFAP_MOSAIC (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CFAP_STRIPE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_GWDI_MASK (0x0000001Eu)
    #define CSL_ISIF_CGAMMAWD_GWDI_SHIFT (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_GWDI_RESETVAL (0x00000000u)
    /*----GWDI Tokens----*/
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT15 (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT14 (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT13 (0x00000002u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT12 (0x00000003u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT11 (0x00000004u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT10 (0x00000005u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT9 (0x00000006u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT8 (0x00000007u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT7 (0x00000008u)

    #define CSL_ISIF_CGAMMAWD_CCDTBL_MASK (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_SHIFT (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_RESETVAL (0x00000000u)
    /*----CCDTBL Tokens----*/
    #define CSL_ISIF_CGAMMAWD_CCDTBL_OFF (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_ON (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_RESETVAL (0x00000000u)

     

    "it might be connected to lines 15:4 of DM365 and the same is set in the CGAMMAWD register of the ISIF."  what do you mean?

  • Anshuman;

    Hi, this is our sensor's perameters

    According to the table, our sensor is 12 bit raw data sensor.

     

    /* CGAMMAWD */
    #define CSL_ISIF_CGAMMAWD__RSV_MASK (0x00008000u)
    #define CSL_ISIF_CGAMMAWD__RSV_SHIFT (0x0000000Fu)
    #define CSL_ISIF_CGAMMAWD__RSV_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_WBEN2_MASK (0x00004000u)
    #define CSL_ISIF_CGAMMAWD_WBEN2_SHIFT (0x0000000Eu)
    #define CSL_ISIF_CGAMMAWD_WBEN2_RESETVAL (0x00000000u)
    /*----WBEN2 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN2_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN2_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_WBEN1_MASK (0x00002000u)
    #define CSL_ISIF_CGAMMAWD_WBEN1_SHIFT (0x0000000Du)
    #define CSL_ISIF_CGAMMAWD_WBEN1_RESETVAL (0x00000000u)
    /*----WBEN1 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN1_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN1_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_WBEN0_MASK (0x00001000u)
    #define CSL_ISIF_CGAMMAWD_WBEN0_SHIFT (0x0000000Cu)
    #define CSL_ISIF_CGAMMAWD_WBEN0_RESETVAL (0x00000000u)
    /*----WBEN0 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_WBEN0_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_WBEN0_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD__RSV1_MASK (0x00000800u)
    #define CSL_ISIF_CGAMMAWD__RSV1_SHIFT (0x0000000Bu)
    #define CSL_ISIF_CGAMMAWD__RSV1_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN2_MASK (0x00000400u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_SHIFT (0x0000000Au)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_RESETVAL (0x00000000u)
    /*----OFSTEN2 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN2_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN1_MASK (0x00000200u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_SHIFT (0x00000009u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_RESETVAL (0x00000000u)
    /*----OFSTEN1 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN1_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_OFSTEN0_MASK (0x00000100u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_SHIFT (0x00000008u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_RESETVAL (0x00000000u)
    /*----OFSTEN0 Tokens----*/
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_DISABLE (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_OFSTEN0_ENABLE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD__RSV2_MASK (0x000000C0u)
    #define CSL_ISIF_CGAMMAWD__RSV2_SHIFT (0x00000006u)
    #define CSL_ISIF_CGAMMAWD__RSV2_RESETVAL (0x00000000u)

    #define CSL_ISIF_CGAMMAWD_CFAP_MASK (0x00000020u)
    #define CSL_ISIF_CGAMMAWD_CFAP_SHIFT (0x00000005u)
    #define CSL_ISIF_CGAMMAWD_CFAP_RESETVAL (0x00000000u)
    /*----CFAP Tokens----*/
    #define CSL_ISIF_CGAMMAWD_CFAP_MOSAIC (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CFAP_STRIPE (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_GWDI_MASK (0x0000001Eu)
    #define CSL_ISIF_CGAMMAWD_GWDI_SHIFT (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_GWDI_RESETVAL (0x00000000u)
    /*----GWDI Tokens----*/
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT15 (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT14 (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT13 (0x00000002u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT12 (0x00000003u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT11 (0x00000004u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT10 (0x00000005u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT9 (0x00000006u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT8 (0x00000007u)
    #define CSL_ISIF_CGAMMAWD_GWDI_BIT7 (0x00000008u)

    #define CSL_ISIF_CGAMMAWD_CCDTBL_MASK (0x00000001u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_SHIFT (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_RESETVAL (0x00000000u)
    /*----CCDTBL Tokens----*/
    #define CSL_ISIF_CGAMMAWD_CCDTBL_OFF (0x00000000u)
    #define CSL_ISIF_CGAMMAWD_CCDTBL_ON (0x00000001u)

    #define CSL_ISIF_CGAMMAWD_RESETVAL (0x00000000u)

     

    "it might be connected to lines 15:4 of DM365 and the same is set in the CGAMMAWD register of the ISIF."  what do you mean?

  • Can you explain how is the connection between your sensor and the DM365 data pins and also the value of CGAMMAWD register in ISIF?

     

    Regards,

    Anshuman

  • From my point of view:

    (1) the pink and color shift of the first picture is caused by sensor data non linearized, for example: the raw data from sensor at mid-tone could be Raw(R,G,B)=(64,128,100) then you should apply WB gain of Gain(2, 1, 1.28) to get gray of RGB(128,128,128), while for some parts of data at bright areas, the raw data curved to Raw(80, 150, 117) while you appling the same WB gain (2, 1, 1.28) makes RGB(160, 150, 150) then it turned to be redish as you saw in your first picture. The possible reasons of that could be: (a) non appropriate gain settings on sensor (the sensor data you provided looks like Aptina MT9P031), make sure you didn't set a gain under x1 (b) over subscribed the dark level (c) different gamma curve on each channel or... something else?

    (2) The 2'nd picture for me is quite difficult to understand. It's on the center part of the picture, while the distortion caused by lens us usually on the corner. The first bar curved to left while the bar behind it curved in the middle. But it still looks like optical issues for me. Could you try to clean up the lens and sensor cover glass, make sure there is absolutely clear, no glue, no un-uniform object on it? Or you may just change another lens and sensor to test again.

        Hope it helps you.

    Best Regards,

    C.S.

    Collins Imaging Group
    collins.imaging@gmail.com

  • Hi,

    We are working with IPNC 5.0 and we are getting image problem in high light area.

    Please find the attached image for more details and assist. We checked CGAMMAWD register and it is matching with hardware.

    Thanks,