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.

TDA2EVM5777: OpenCV Support for DSP?

Part Number: TDA2EVM5777

Hi, 

I have few queries related to opencv support on DSP for TDA2X Platform. 

1. How to build a sample code with opencv functions for DSP ?

2. How to run a sample code with opencv fully on DSP without A15 ?

3. What are the changes required in the normal opencv based code to run it on DSP ?

4. Can we build opencv 3.4 using the steps mentioned in the openc_compute docs folder inside Vision SDK? Do you find any issues to run newly build opencv 3.4 on DSP ?

5. I referred a profiling test example http://processors.wiki.ti.com/index.php/OpenCV

For first run, I am getting different result. After that I am always getting same execution time with OPENCL and without OPENCL

Please check the log.

First Run :

root@dra7xx-evm:/opt/vision_sdk# ./a.out 
BGR2GRAY  tdiff=23.288173 ms 
GaussBlur tdiff=25.809181 ms 
Canny     tdiff=45.344797 ms 

Second Run :

root@dra7xx-evm:/opt/vision_sdk# ./a.out 
BGR2GRAY  tdiff=2.687742 ms 
GaussBlur tdiff=6.167669 ms 
Canny     tdiff=11.114363 ms

After Enabling OPENCL

root@dra7xx-evm:/opt/vision_sdk# export TI_OCL_LOAD_KERNELS_ONCHIP=Y
root@dra7xx-evm:/opt/vision_sdk#  export TI_OCL_CACHE_KERNELS=Y
root@dra7xx-evm:/opt/vision_sdk#  export OPENCV_OPENCL_DEVICE='TI DRA7:ACCELERATOR:TI Multicore C66 DSP'

Third Run:

root@dra7xx-evm:/opt/vision_sdk# ./a.out 
BGR2GRAY  tdiff=2.687742 ms 
GaussBlur tdiff=6.167669 ms 
Canny     tdiff=11.114363 ms

Regards,

Sagar

  • Q 1,2,3 >> The openCV is not supported without A15 (just on DSP)
    Q4 >> Its difficult to comment, you can give your try but I want to caution that support from TI for openCV is very limited and we will not be able to support you if you face any issues
    Q5 >> This link is for openCV as part of processor SDK, can you confirm if you are using processor SDK vision (www.ti.com/.../PROCESSOR-SDK-TDAX) or any other SDK?

    Thanks,
    With Regards,
    Pramod
  • Hi Pramod,

    Ok. I understood now that opencv is supported on A15 with some offload capability to DSP.

    Yes we are using same Processor-SDK- Vision from this link www.ti.com/.../PROCESSOR-SDK-TDAX
    I want to reproduce opencv given example profiling test results as per this link: processors.wiki.ti.com/.../OpenCV

    Can you tell me exact steps for TDA2EVM Board ?

    eg :
    export TI_OCL_LOAD_KERNELS_ONCHIP=Y
    export TI_OCL_CACHE_KERNELS=Y
    export OPENCV_OPENCL_DEVICE='TI AM57:ACCELERATOR:TI Multicore C66 DSP'
    echo "OpenCL on, canny"
    ./canny_ex1
    export OPENCV_OPENCL_DEVICE='disabled'
    echo "OpenCL off, canny"
    ./canny_ex

    Any changes required in the above steps ?


    Regards,
    Sagar