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.

AM572x openCV application

Hello Community,

I am trying to build an example OpenCV application on TI AM572X using the TI Processor SDK for linux which is : ti-processor-sdk-linux-am57xx-evm-03.00.00.04

The example application is present on the path : 

ti-processor-sdk-linux-am57xx-evm-03.00.00.04\targetNFS\usr\share\OpenCV\opencv_extramaster\3d\tracker3d

But the Makefile compilations fails.

I think the problem might be some header file or library is not included in the project.

Can somebody who had on this processor can help me resolve the issue.

  • Please let me know if more information is required . I shall provide you the same.
  • Please post the build log.
  • Hi ,

    Thanks for coming.

    Please find the enclosed logs and Makfile which I am using.

    make[2]: Entering directory '/home/rapuser/ti-processor-sdk-linux-am57xx-evm-03.00.00.04/example-applications/opencl-examples-1.1.9.1/Z-Effective'
    awk: line 2: function gensub never defined
    AlgoCV.o: In function `doAlgorithmCV(float*, unsigned short*, int, int)':
    AlgoCV.cpp:(.text+0x8a): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0xce): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0xdc): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x178): undefined reference to `cv::Mat::create(int, int const*, int)'
    AlgoCV.cpp:(.text+0x228): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x266): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x274): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x2dc): undefined reference to `cv::GaussianBlur(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
    AlgoCV.cpp:(.text+0x2ea): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x33c): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x34a): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x356): undefined reference to `cv::Mat::reshape(int, int) const'
    AlgoCV.cpp:(.text+0x444): undefined reference to `cv::kmeans(cv::_InputArray const&, int, cv::_InputOutputArray const&, cv::TermCriteria, int, int, cv::_OutputArray const&)'
    AlgoCV.cpp:(.text+0x4c6): undefined reference to `cv::Mat::create(int, int const*, int)'
    AlgoCV.cpp:(.text+0x4ce): undefined reference to `cv::Mat::operator=(cv::Scalar_<double> const&)'
    AlgoCV.cpp:(.text+0x55a): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x59c): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x5aa): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x5c8): undefined reference to `cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
    AlgoCV.cpp:(.text+0x682): undefined reference to `cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
    AlgoCV.cpp:(.text+0x68e): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x6e2): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x6f0): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x7b6): undefined reference to `cv::connectedComponentsWithStats(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, int)'
    AlgoCV.cpp:(.text+0x7c4): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x804): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x812): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x86c): undefined reference to `cv::rectangle(cv::Mat&, cv::Rect_<int>, cv::Scalar_<double> const&, int, int, int)'
    AlgoCV.cpp:(.text+0x880): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0x8c4): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
    AlgoCV.cpp:(.text+0x8d2): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0x924): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text+0x976): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text+0x9dc): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text+0xa42): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text+0xa94): undefined reference to `cv::fastFree(void*)'
    AlgoCV.o:AlgoCV.cpp:(.text+0xae6): more undefined references to `cv::fastFree(void*)' follow
    AlgoCV.o: In function `doAlgorithmCV(float*, unsigned short*, int, int)':
    AlgoCV.cpp:(.text+0xd08): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.cpp:(.text+0xd38): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text+0xd4c): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.cpp:(.text+0xd54): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.cpp:(.text+0xd5c): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.cpp:(.text+0xd64): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.cpp:(.text+0xd6c): undefined reference to `cv::Mat::deallocate()'
    AlgoCV.o:AlgoCV.cpp:(.text+0xd74): more undefined references to `cv::Mat::deallocate()' follow
    AlgoCV.o: In function `doAlgorithmCV(float*, unsigned short*, int, int)':
    AlgoCV.cpp:(.text+0xdb2): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0xdfe): undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
    AlgoCV.cpp:(.text+0xe04): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0xe2c): undefined reference to `cv::String::allocate(unsigned int)'
    AlgoCV.cpp:(.text+0xe78): undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
    AlgoCV.cpp:(.text+0xe7e): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0xe96): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0xea6): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0xefc): undefined reference to `cv::String::deallocate()'
    AlgoCV.cpp:(.text+0xf16): undefined reference to `cv::String::deallocate()'
    AlgoCV.o:AlgoCV.cpp:(.text+0xf2e): more undefined references to `cv::String::deallocate()' follow
    AlgoCV.o: In function `cv::Mat::~Mat()':
    AlgoCV.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x54): undefined reference to `cv::fastFree(void*)'
    AlgoCV.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x5c): undefined reference to `cv::Mat::deallocate()'
    collect2: error: ld returned 1 exit status
    Makefile:12: recipe for target 'rapexe' failed
    make[2]: *** [rapexe] Error 1
    make[2]: Leaving directory '/home/rapuser/ti-processor-sdk-linux-am57xx-evm-03.00.00.04/example-applications/opencl-examples-1.1.9.1/Z-Effective'

    Here is the Makefile which I am using :

    EXE = rapexe
    CPP_FLAGS = -O3 -mfpu=neon -ftree-vectorize -funsafe-math-optimizations

    include ../make.inc

    OCL_VER := $(shell clocl --version | awk '/ver/ {print gensub(/\./, "", "G", $$6) }')
    CL6X_FLAGS = -O3 -D__TI_OCL_VERSION=0x$(OCL_VER)

    LD_FLAGS = -L/home/rapuser/ti-processor-sdk-linux-am57xx-evm-03.00.00.04/targetNFS/usr/lib/ -llibopencv_ml -llibopencv_cvv -llibopencv_core -llibopencv_calib3d -llibopencv_highgui -llibopencv_imgproc

    $(EXE): Array.o AlgoCV.o BmpImage.o BxpRead.o Cbmp.o ClipBuf.o DEToZRGB.o DEToZRGBServer.o DEToZRgbTest.o DualEnergyInfo.o ErrorHandler.o FileIo.o FileName.o Geometry.o ImageAppearance.o ImageResample.o ImgImage.o LutProcess.o MD.o PortingFunctions.o ReadModel.o RealTimeAirDetector.o SysCfg.o Utils.o ZtoColor.o
    @$(CPP) $(CPP_FLAGS) Array.o AlgoCV.o BmpImage.o BxpRead.o Cbmp.o ClipBuf.o DEToZRGB.o DEToZRGBServer.o DEToZRgbTest.o DualEnergyInfo.o ErrorHandler.o FileIo.o FileName.o Geometry.o ImageAppearance.o ImageResample.o ImgImage.o LutProcess.o MD.o PortingFunctions.o ReadModel.o RealTimeAirDetector.o SysCfg.o Utils.o ZtoColor.o $(LD_FLAGS) $(LIBS) -o $@

    Can please somebody help me in compiling this simple OpenCV application?

    Thanks for your time in going through this issue.

    Thanks and Regards,
    Mohit
  • Hi,

    If anybody can share me an example makefile to how to compile Open CV application on linux SDK for TI AM 572X processor. That would also be great for me.

    Thanks,
    Mohit
  • Thanks. I have asked the software team to look at this. They will respond here.
  • Hello,

    Please check this wiki page:
    processors.wiki.ti.com/.../OpenCV
    Chapter:OpenCV OpenCL development setup

    Hope this helps.

    BR
    Margarita
  • Hi Margarita,

    Thanks for the document.

    I am able to get useful information from this document and solve my problem.

    Thanks and Regards,
    Mohit