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.

[参考译文] Linux/TDA2:如何使用 OpenCV 添加 algplugin?

Guru**** 1996415 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/702428/linux-tda2-how-to-add-a-algplugin-use-opencv

器件型号:TDA2

工具/软件:Linux

当我在 a15 (Linux)上编写 algplugin 时使用 OpenCV,编译是可以的,但链接 是错误的。 我不知道为什么?? 我提到的例子是 opencvcanny  

#应用:tda2per-EVM:创建存档 apps.a
#应用:tda2px-EVM:编译 chains_vipSingleCamOpenCVOpenCLDilationSgxDisplay.c
#应用:tda2px-EVM:编译 chains_vipSingleCamOpenCVOpenCLDilationSgxDisplay_priv.c
#应用:tda2per-EVM:创建存档 apps.a
#应用:tda2px.EVM:编译 openCLDilationAlgo
#应用:tda2pc-EVM:编译 openCLDilationLink_algPlugin.c
#应用:tda2per-EVM:编译 openclDilation.cpp
#应用:tda2per-EVM:创建存档 apps.a
#应用:tda2per-EVM:链接
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`int cv::OCL::getStringInfo (int (*)(_cl_device_id*、unsigned int、unsigned int、void*、unsigned int*)、 cl_device_id*、unsigned int、std:_cxx11 <char, std::char_traits: ,std::分配器 &&)[clone .constprop.320]':
OCL.CPP:(.text_ZN2cv3ocl13getStringInfoIPFP13_cl_device_idjPvPjES3_EEiT_T0_jRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEee.conv2+Z2v_ENTIv_Z2V 引用0xC1112_GetImplv_Z2CL_ENTRENTRB `)
OCL.CPP:(.text_ZN2cv3ocl13getStringInfoIPFP13_cl_device_idjPvES3_EEiT_T0_jRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEee.conv3_jRNst7__cxx1112basic_undefined Incl_stringIcSt11char_traitsIc2v_GetInv_GetInv_Z2v+Z2v_Contv+Z3e.t2v_Z3e.cl_Incl_Inv_Incl_`
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL::OpenCLBufferPoolBaseImpl :freeAllReservedBuffers()':
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS2_13CLBufferEntryEP7_cl_E22MemfreeAllReservedBuffersEvv[_ZN2cv3ocl24OpenCLerPoolEndeBufferBufferE24C24C24C24C24C24CLDERZCLS0_EntryE22MemReserveReservedBufferBufferBufferE24E24InMem_InBufferBufferBufferE24InEleUndefined `0x24E24E24E24E24E24E24E24E24E24E24E24E24In
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL::OpenCLBufferPoolBaseImpl :setMaxReservedSize(unsigned int)':
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_E18MemsetMaxReservedSizeEj[_ZN2cv3ocl24OpenCLerBufferE80_InMemSetMaxReservedS0_InBufferEVM_InPoolEj]`未定义的0x20InBufferEndeS0_InBufferEVM_Inset0)
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_E18MemsetMaxReservedSizeEj[_ZN2cv3ocl24OpenCLerEntryEP7_cl_MemE18MemsetMaxReservedS0[_ZN2cv3oClInBufferEndeObject_InPoolS0_InBuffer0_Inset0x20InPoolS0_EndeObject_InBuffer0_Inset0x20InPoolS0_Inset0 `未定义)
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL::OpenCLBufferPoolBaseImpl :~OpenCLBufferPoolBaseImpl()':
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memED2Ev[_ZN2cv3ocl24OpenCLMemerPoolBaseImplENS0_13CLBufferEntryEP7_cl_memEED2Ev[_ZN2EP2EP_InBufferOnCv_In85_InBufferOnCv_InBufferOnCv_In85_Ina `):0xN2Encl24OpenCLMem24OpenCLMemMemMemMemMemMemMem_
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL:::器件::Impl:::getStrProp (unsigned int) const [clone .isra.50]':
OCL.CPP:(.text._ZNK2cv3ocl6Device4Impl10getStrPropEj.isra.50+0x2C):未定义对`clGetDeviceInfo'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL:::平台信息:::Impl:::getStrProp (unsigned int) const [clone .isra.55]':
OCL.CPP:(.text._ZNK2cv3ocl12PlatformInfo4Impl10getStrPropEj.isra.55+0x2C):未定义对`clGetPlatformInfo'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL::OpenCLBufferPoolBaseImpl :release (_cl_mem*)':
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_releaseES5_[_ZN2cv3ocl24OpenCLBufferPoolInPLeESS0_13CLMemReleaseES5_EVM_IneMemBEEBEE7_EN0_EN017_REFRES0_EN24_ENREFRES0_ENREFRES0_EN24_ENREFLEC24_EN24EVMREFRES0_EN24_EN24_ENREFERC24_ENREFRES0_EN `
OCL.CPP:(.text_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_releaseES5_[_ZN2cv3ocl24OpenCLBufferPoolInPLeESS0_13CLMemReleaseES5_EVM_IneMemBEEBEE7_EN0_REFRES0_EN24_REFLEC24_EN24C24EVMREFRES0_EN24_EN24_EN24EVMREFRES0_EN24_ENREFERC106_ENEVMREFRES0_ENEVM_`
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (ocl.cpp.o):在函数中`cv:::ocl::::get_platform_name (_cl_platform_id*、cv::String&)[克隆.constprop.314]':
OCL.CPP:(.text._ZN2cv3oclL17get_platform_name EP15_cl_platform_idRns_6StringE.constprop.314+0x2a):未`对"clGetPlatformInfo"的引用
OCL.CPP:(.text._ZN2cv3oclL17get_platform_name EP15_cl_platform_idRNs_6StringE.constprop.314+0x58):未定义对`clGetPlatformInfo'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL::haveOpenCL ()':
OCL.CPP:(.text._ZN2cv3ocl10haveOpenCLEv+0x20):未`对 clGetPlatformIDs'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (ocl.cpp.o):在函数中`cv::ocl:::平台::Impl::init()':
OCL.CPP:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0x26):未定义对`clGetPlatformIDs'的引用
OCL.CPP:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0x50):未定义对`clGetPlatformInfo'的引用
OCL.CPP:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0xa8):未定义对`clGetPlatformInfo'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.cpp.o):在函数中`CV::OCL:::器件::SET (void*)':
OCL.CPP:(.text._ZN2cv3ocl6Device3setEPv+0x11e):对`clGetDeviceInfo'的引用未定义
OCL.CPP:(.text._ZN2cv3ocl6Device3setEPv+0x14c):对`clGetDeviceInfo'的引用未定义
OCL.CPP:(.text._ZN2cv3ocl6Device3setEPv+0x17c):对`clGetDeviceInfo'的引用未定义
OCL.CPP:(.text._ZN2cv3ocl6Device3setEPv+0x1aa):对`clGetDeviceInfo'的引用未定义
OCL.CPP:(.text._ZN2cv3ocl6Device3setEPv+0x1e2):未定义对`clGetDeviceInfo'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):OCL.CPP:(.text._ZNK2cv3ocl6Device11addressBitsEv+0x22):后面有更多未定义的`clGetDeviceInfo'引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a (OCL.CPP.o):在函数中`CV::OCL:::队列::操作员=(CV::OCL:::队列常量&)':
OCL.CPP:(.text._ZN2cv3ocl5QueueaSERKS1_+0x64):未`对"clFinish"的引用
OCL.CPP:(.text._ZN2cv3ocl5QueueaSERKS1_+0x6a):未`对 clReleaseCommandQueue'的引用
/home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    你(们)好
    您使用的 VISION SDK 版本是什么?
    A15、Linux 或 BIOS 上的哪个操作系统?

    此致、Shiju
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    visionsdk 版本为3.3,在 A15上运行 Linux

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我可能会看到对某些符号的大量未定义引用、我想这些引用来自您的新算法、请在\vision_sdk\apps\Makefile.mk 中包含 Alg 库
    了解其他 OPENVX_A15_libs 如何作为参考包含在内

    另一个选项是将文件与 ALG 插件文件一起编译


    此致、Shiju