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.

CCS/TMS320C6748: TMS320C6748

Part Number: TMS320C6748
Other Parts Discussed in Thread: DLP4500

Tool/software: Code Composer Studio

Dear Mr. :

Now I am using TMS320C6748  DSP Development Kit ( LDCK )  , and I aleady connect the LCD screen and CMOS Camera to the board , they can work together well .

I can capsure a picture by using the CMOS camera , and show the picture on the LCD screen .

And I also have a DLP projector ( using DLP4500 chipset ) to make the structured light ,  it also can work well .

Depending on all above , I want to realize the 3D scan .

I want to use the VLIB_Canny_Edge_Detection function ,  from the TI's VLIB lib ( VLIB 3.3.0.3 ) ,  to finish the image edge detection .

Can someone help me , to tell me , how can I get a project files , which contain the contents of calling the VLIB_Canny_Edge_Detection_ ....() function ?

Or tell me how can I finish the image edge detection by using the VLIB ?

Thanks !

Good Luck !

Zhangbin , Alex .

  • Hi,

    I've notified the sw team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Thanks ! I will waiting for the answer .
  • Zhangbin,

    Interesting use of the C6748 LCDK board. Can you provide details of the CMOS sensor and the LCD screen you used with the LCDK board.
    Are you using the LCD expansion connector at the back of the LCDK for interfacing the LCD screen?

    For Canny edge detection using VLIB, you can look at the App note provided here:
    www.ti.com/.../sprab78.pdf


    VLIB library provides test examples for Canny edge detection API in the package in the source path :
    vlib_c674x_3_3_0_3\packages\ti\vlib\src\VLIB_Canny_Edge_Detection

    Hope this helps.

    Regards,
    Rahul
  • Mr. Rahul :
    Thanks for your answer !

    I add the following content in vpif_lcd_loopback.c ,

    //// add the following 2017-07-11

    if( VLIB_cache_init())
    {

    VLIB_memError("VLIB_Canny_Edge_Detection");

    }
    else
    {

    //// VLIB_Canny_Edge_Detection_d-aa(0);


    canny_getTestParams(&prm, &test_cases);

    /* Initialize profiling */
    VLIB_profile_init(2, "VLIB_Canny_Edge_Detection");

    /* Run each test case */
    for( tpi=0; tpi < test_cases; tpi++ )
    {

    /* Initialize status flags */
    int32_t status_nat_vs_int = vlib_KERNEL_PASS; /* Test status : Natural c vs. Optimized */
    int32_t status_nat_vs_ref = vlib_KERNEL_PASS; /* Test status : Natural c vs. Static Reference */

    /* Compute buffer sizes */
    uint32_t bufferSize = prm[tpi].width * prm[tpi].height;

    /* Allocate buffers for each test vector */
    uint8_t *pInput = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    int16_t *pBufGradX = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufGradY = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufMag = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    uint8_t *pScratch = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut_cn = (uint8_t *) malloc(bufferSize * sizeof(uint8_t));
    int32_t numItems;
    int32_t numItems_cn;

    /* Only run the test if the buffer allocations fit in the heap */
    if( pInput && pBufGradX && pBufGradY && pBufMag && pScratch && pBufOut && pBufOut_cn )
    {
    uint32_t fail;

    /* Fill input arrays according to desired test pattern */
    VLIB_fillBuffer(prm[tpi].testPattern,
    (uint8_t)127,
    pInput, prm[tpi].input,
    prm[tpi].width, prm[tpi].height, prm[tpi].width,
    sizeof(uint8_t), testPatternString);

    /* initialize memory */
    memset(pBufGradX, 0, bufferSize * sizeof(int16_t));
    memset(pBufGradY, 0, bufferSize * sizeof(int16_t));
    memset(pBufMag, 0, bufferSize * sizeof(int16_t));
    memset(pBufOut, 0, bufferSize * sizeof(uint8_t));
    memset(pScratch, 0, bufferSize * sizeof(uint8_t));

    /* Test optimized kernel */
    VLIB_profile_start(vlib_KERNEL_OPT);
    }
    }

    }

    //// add the above 2017-07-11
    /////////////////////////////////////////////////

    then , Project -> Build Project ,

    appear :

    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    warning: creating output section ".sram_start" without a SECTIONS
    specification

    in problem window , appear :

    Description Resource Path Location Type
    errors encountered during linking; "vpif_lcd_loopback.out" not built vpif_lcd_loopback_c674x_c6748_lcdkC6748 C/C++ Problem

    Description Resource Path Location Type
    symbols in the reserved far sections cannot be accessed as near; symbol vpif_lcd_loopback_c674x_c6748_lcdkC6748 C/C++ Problem

    Description Resource Path Location Type
    unresolved symbol _sram_start, first referenced in C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_memory.oe674> vpif_lcd_loopback_c674x_c6748_lcdkC6748 C/C++ Problem

    Description Resource Path Location Type
    unresolved symbol canny_getTestParams, first referenced in ./vpif_lcd_loopback.obj vpif_lcd_loopback_c674x_c6748_lcdkC6748 C/C++ Problem

    Description Resource Path Location Type
    unresolved symbols remain vpif_lcd_loopback_c674x_c6748_lcdkC6748 C/C++ Problem





    Can you tell me , what can I do ?
    Waiting for your response .
    Good Luck !

    Zhangbin , Alex .
  • Mr. Rahul :

    I add the following content in the vpif_lcd_loopback.c file ,


    //// add the following 2017-07-11

    if( VLIB_cache_init())
    {

    VLIB_memError("VLIB_Canny_Edge_Detection");

    }
    else
    {

    //// VLIB_Canny_Edge_Detection_d-aa(0);


    canny_getTestParams(&prm, &test_cases);

    /* Initialize profiling */
    VLIB_profile_init(2, "VLIB_Canny_Edge_Detection");

    /* Run each test case */
    for( tpi=0; tpi < test_cases; tpi++ )
    {

    /* Initialize status flags */
    int32_t status_nat_vs_int = vlib_KERNEL_PASS; /* Test status : Natural c vs. Optimized */
    int32_t status_nat_vs_ref = vlib_KERNEL_PASS; /* Test status : Natural c vs. Static Reference */

    /* Compute buffer sizes */
    uint32_t bufferSize = prm[tpi].width * prm[tpi].height;

    /* Allocate buffers for each test vector */
    uint8_t *pInput = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    int16_t *pBufGradX = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufGradY = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufMag = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    uint8_t *pScratch = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut_cn = (uint8_t *) malloc(bufferSize * sizeof(uint8_t));
    int32_t numItems;
    int32_t numItems_cn;

    /* Only run the test if the buffer allocations fit in the heap */
    if( pInput && pBufGradX && pBufGradY && pBufMag && pScratch && pBufOut && pBufOut_cn )
    {
    uint32_t fail;

    /* Fill input arrays according to desired test pattern */
    VLIB_fillBuffer(prm[tpi].testPattern,
    (uint8_t)127,
    pInput, prm[tpi].input,
    prm[tpi].width, prm[tpi].height, prm[tpi].width,
    sizeof(uint8_t), testPatternString);

    /* initialize memory */
    memset(pBufGradX, 0, bufferSize * sizeof(int16_t));
    memset(pBufGradY, 0, bufferSize * sizeof(int16_t));
    memset(pBufMag, 0, bufferSize * sizeof(int16_t));
    memset(pBufOut, 0, bufferSize * sizeof(uint8_t));
    memset(pScratch, 0, bufferSize * sizeof(uint8_t));

    /* Test optimized kernel */
    VLIB_profile_start(vlib_KERNEL_OPT);
    }
    }

    }

    //// add the above 2017-07-11


    then Project-> Build Project

    the following appear in the Console window ,

    <Linking>
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "act_kernel" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>

    (.far)" is accessed as near in the section "./vpif_lcd_loopback.obj(.text)"
    >> Compilation failure
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "beg_count" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
    74>(.far)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "beg_count" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
    74>(.far)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    warning: creating output section ".sram_start" without a SECTIONS
    specification

    undefined first referenced
    symbol in file
    --------- ----------------
    _sram_start C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_memory.oe674>
    canny_getTestParams ./vpif_lcd_loopback.obj

    error: unresolved symbols remain
    error: errors encountered during linking; "vpif_lcd_loopback.out" not built
    gmake: *** [vpif_lcd_loopback.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


    What can I do ?
    Waiting for your helpful message .
    Good Luck !

    Zhangbin , Alex .
  • Mr. Rahul :

    I add the following content in the vpif_lcd_loopback.c file ,


    //// add the following 2017-07-11

    if( VLIB_cache_init())
    {

    VLIB_memError("VLIB_Canny_Edge_Detection");

    }
    else
    {

    //// VLIB_Canny_Edge_Detection_d-aa(0);


    canny_getTestParams(&prm, &test_cases);

    /* Initialize profiling */
    VLIB_profile_init(2, "VLIB_Canny_Edge_Detection");

    /* Run each test case */
    for( tpi=0; tpi < test_cases; tpi++ )
    {

    /* Initialize status flags */
    int32_t status_nat_vs_int = vlib_KERNEL_PASS; /* Test status : Natural c vs. Optimized */
    int32_t status_nat_vs_ref = vlib_KERNEL_PASS; /* Test status : Natural c vs. Static Reference */

    /* Compute buffer sizes */
    uint32_t bufferSize = prm[tpi].width * prm[tpi].height;

    /* Allocate buffers for each test vector */
    uint8_t *pInput = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    int16_t *pBufGradX = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufGradY = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    int16_t *pBufMag = (int16_t *) VLIB_malloc(bufferSize * sizeof(int16_t));
    uint8_t *pScratch = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut = (uint8_t *) VLIB_malloc(bufferSize * sizeof(uint8_t));
    uint8_t *pBufOut_cn = (uint8_t *) malloc(bufferSize * sizeof(uint8_t));
    int32_t numItems;
    int32_t numItems_cn;

    /* Only run the test if the buffer allocations fit in the heap */
    if( pInput && pBufGradX && pBufGradY && pBufMag && pScratch && pBufOut && pBufOut_cn )
    {
    uint32_t fail;

    /* Fill input arrays according to desired test pattern */
    VLIB_fillBuffer(prm[tpi].testPattern,
    (uint8_t)127,
    pInput, prm[tpi].input,
    prm[tpi].width, prm[tpi].height, prm[tpi].width,
    sizeof(uint8_t), testPatternString);

    /* initialize memory */
    memset(pBufGradX, 0, bufferSize * sizeof(int16_t));
    memset(pBufGradY, 0, bufferSize * sizeof(int16_t));
    memset(pBufMag, 0, bufferSize * sizeof(int16_t));
    memset(pBufOut, 0, bufferSize * sizeof(uint8_t));
    memset(pScratch, 0, bufferSize * sizeof(uint8_t));

    /* Test optimized kernel */
    VLIB_profile_start(vlib_KERNEL_OPT);
    }
    }

    }

    //// add the above 2017-07-11


    then Project-> Build Project

    the following appear in the Console window ,

    <Linking>
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "act_kernel" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>

    (.far)" is accessed as near in the section "./vpif_lcd_loopback.obj(.text)"
    >> Compilation failure
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "beg_count" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
    74>(.far)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "beg_count" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
    74>(.far)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    error: symbols in the reserved far sections cannot be accessed as near; symbol
    "test_cases" in the far section
    "C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
    (.fardata)" is accessed as near in the section
    "./vpif_lcd_loopback.obj(.text)"
    warning: creating output section ".sram_start" without a SECTIONS
    specification

    undefined first referenced
    symbol in file
    --------- ----------------
    _sram_start C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_memory.oe674>
    canny_getTestParams ./vpif_lcd_loopback.obj

    error: unresolved symbols remain
    error: errors encountered during linking; "vpif_lcd_loopback.out" not built
    gmake: *** [vpif_lcd_loopback.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


    What can I do ?
    Waiting for your helpful message .
    Good Luck !

    Zhangbin , Alex .
  • It looks like you are not using the lnk.cmd that comes with the example projects.  Please refer to the lnk.cmd file that is in the vlib_c674x_3_3_0_3\packages\ti\vlib\src\common\c64P folder.

    You are probably missing the following line from your lnk.cmd file:

    .sram_start START(_sram_start) > L2_SRAM NOINIT