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/PROCESSOR-SDK-OMAPL138: Issue integrating OpenCV libraries into FaceDetectDemo

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: BIOSSW-C6748, OMAPL138

Tool/software: Code Composer Studio

Hi,

I am currently trying to load the OpenCV 1.0 (or maybe 1.1) library to the FaceDetectDemo project located in the link below. The ultimate goal is to call the cvHoughCircles() function.

The problem we are encountering is that the header for cvHoughCircles() is located in cv.h of OpenCV 1.0 and the body is located in cvhough.cpp.  We have already tried to fix this problem in the following way:

We tried to copy cvhough.cpp into the project via add files in project explorer and added an include path to the cv.h located in the OpenCV 1.0 directory. Code Composer Studio (v5.5.0) was unable to locate the function when called from the main() of facedetect_lcdk project that we created.

Question #1: Is it possible to link a .cpp file into CCS 5.5.0?

Question #2: If this is the wrong approach, where can we find cvHoughCircles() in a .c file to import into the project? 

Link to download FaceDetect: www.ti.com/tool/BIOSSW-C6748

  • Hello,

    Ethan Liang said:
    Question #1: Is it possible to link a .cpp file into CCS 5.5.0?

    Yes

    Ethan Liang said:
    Code Composer Studio (v5.5.0) was unable to locate the function when called from the main() of facedetect_lcdk project that we created.

    Can you provide your full build output in the build console, including all error messages?

    Thanks

    ki

  • I want to include highgui.h because IplImage is declared there. The cvLoadImage function header is located in highgui.h and the function implementation is located in loadsave.cpp, both of which are included in the highgui directory.

    The cvHoughCircles function is implemented in the cvhough.cpp file located in the cv directory.

    Both loadsave.cpp and cvhough.cpp have been linked to the project through the add functionality of the project explorer.

    These are the includes at the top of the facedetect_lcdk.c:

    #include <cv.h>
    #include <highgui.h>
    #include <math.h>

    This is the code in main() that I am trying to run:

    IplImage* src = cvLoadImage("C:/Users/EE113D/Desktop/image1.bmp", CV_LOAD_IMAGE_COLOR);
    printf("Image 1 loaded.\n");
    CvMemStorage* storage = cvCreateMemStorage(0);
    IplImage* src_gray = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 1);
    cvCvtColor(src, src_gray, CV_BGR2GRAY);
    int threshold = 200;
    CvSeq* circles = cvHoughCircles(src_gray, storage, CV_HOUGH_GRADIENT, 1, src_gray->width/6, 10, threshold, 0, 0);

    These are the project include paths for the OpenCv 1.0 download:

    "C:\Program Files\OpenCV\cv\include"
    "C:\Program Files\OpenCV\otherlibs\highgui"
    "C:\Program Files\OpenCV\cxcore\include"

    Here are the build errors and warnings:

    Description Resource Path Location Type
    unresolved symbol cvLoadImage, first referenced in ./facedetect_lcdk.obj facedetect_lcdk C/C++ Problem
    RTSC product 'SYS/BIOS' v6.33.1.25 (or equivalent) is not currently installed. A compatible version 6.35.4.50 will be used during build. Please install a product of equivalent version, or enable one of the supported versions of this product. facedetect_lcdk facedetect_lcdk Problems
    This project was created using a version of XDCtools that is not currently installed: 3.23.0.32. Please install the XDCtools of this version, or migrate the project to one of the supported versions. facedetect_lcdk facedetect_lcdk Problems
    #10010 errors encountered during linking; "facedetect_lcdk.out" not facedetect_lcdk C/C++ Problem
    This project was created using a version of compiler that is not currently installed: 7.3.1 [C6000]. Another version of the compiler will be used during build: 7.4.4. Please install the compiler of the required version, or migrate the project to one of the available compiler versions by adjusting project properties. facedetect_lcdk properties Problems
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain facedetect_lcdk C/C++ Problem
    #176-D ..\..\..\..\include\cvcompat.h expression has no effect facedetect_lcdk.c /facedetect_lcdk line 425 C/C++ Problem
    #29 expected an expression cvhough.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    #29 expected an expression loadsave.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/5.html">#5</a> could not open source file "cvconfig.h" loadsave.cpp /facedetect_lcdk line 56, external location: C:\Program Files\OpenCV\otherlibs\highgui\_highgui.h C/C++ Problem


    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain facedetect_lcdk C/C++ Problem
    #176-D ..\..\..\..\include\cvcompat.h expression has no effect facedetect_lcdk.c /facedetect_lcdk line 425 C/C++ Problem
    #29 expected an expression cvhough.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    #29 expected an expression loadsave.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/5.html">#5</a> could not open source file "cvconfig.h" loadsave.cpp /facedetect_lcdk line 56, external location: C:\Program Files\OpenCV\otherlibs\highgui\_highgui.h C/C++ Problem

  • Ethan Liang said:
    RTSC product 'SYS/BIOS' v6.33.1.25 (or equivalent) is not currently installed. A compatible version 6.35.4.50 will be used during build. Please install a product of equivalent version, or enable one of the supported versions of this product. facedetect_lcdk facedetect_lcdk Problems

    Ethan Liang said:
    This project was created using a version of compiler that is not currently installed: 7.3.1 [C6000]. Another version of the compiler will be used during build: 7.4.4. Please install the compiler of the required version, or migrate the project to one of the available compiler versions by adjusting project properties.

    These warnings are letting you know that the versions of some dependent tools you have installed differ than what was originally used for the project and that CCS will try using the versions you have.

    If you want to be extra safe, you can use those exact versions:

    SYS/BIOS 6.33.1.25: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_33_01_25/index_FDS.html

    Compiler: 7.3.1: You find it on: http://software-dl.ti.com/codegen/non-esd/downloads/download.htm#C6000

    Ethan Liang said:
    This project was created using a version of XDCtools that is not currently installed: 3.23.0.32. Please install the XDCtools of this version, or migrate the project to one of the supported versions

    You can get it from:

    http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_00_32/index_FDS.html

    Ethan Liang said:
    unresolved symbol cvLoadImage, first referenced in ./facedetect_lcdk.obj facedetect_lcdk C/C++ Problem

    As for your your various build errors, it is hard for me to comment on what the resolutions are since I am unfamiliar with the C6748 SDK. I am going to move this thread to the appropriate device forum where the experts there can provide more suggestions on how to move forward with your project

    Thanks

    ki

  • Update: I downloaded SYS/BIOS 6.33.1.25, Compiler: 7.3.1, and XDCtool 3.23.0.32 and included them in my project preferences. As a result, the build warnings were resolved. However, the other build errors remain.

    Here is the updated list of build errors and warnings:

    Description Resource Path Location Type
    #29 expected an expression cvhough.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    unresolved symbol cvLoadImage, first referenced in ./facedetect_lcdk.obj facedetect_lcdk C/C++ Problem
    #10010 errors encountered during linking; "facedetect_lcdk.out" not facedetect_lcdk C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/5.html">#5</a> could not open source file "cvconfig.h" loadsave.cpp /facedetect_lcdk line 56, external location: C:\Program Files\OpenCV\otherlibs\highgui\_highgui.h C/C++ Problem
    #29 expected an expression loadsave.cpp /facedetect_lcdk line 133, external location: C:\Program Files\OpenCV\cxcore\include\cxmisc.h C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain facedetect_lcdk C/C++ Problem
    #176-D ..\..\..\..\include\cvcompat.h expression has no effect facedetect_lcdk.c /facedetect_lcdk line 425 C/C++ Problem
  • Ethan,

    Unfortunately this software is legacy code that was created in 2011 and is no longer supported by TI . The BIOS-SW was supported at the time as the software package for C6748. OpenCV on OMAPL138/C6748 is not under active develop or maintained by TI so we have stopped offering support for this legacy software

    We recommend that you look at the Processor SDK offering for OMAPL138 as that is the only software under active development and is supported across all TI ARM and DSP processors.

    Regards,
    Rahul