3 Replies Latest reply on Nov 2, 2016 1:40 PM by Intel Corporation

    How to setup OpenCV on Intel System Studio IoT edition?

    abinsaju

      I am trying to setup a camera capture rig, however, i cannot build the project in the Intel System Studio. I have followed the OpenCV guide to set up the project however the compiler gives giving me errors.

       

      Using OpenCV with Eclipse (plugin CDT) — OpenCV 2.4.13.1 documentation

       

      Errors:

      DescriptionResourcePathLocationType
      undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'CVtest.cpp/CVtest/srcline 22C/C++ Problem
      undefined reference to `cv::fastFree(void*)'CVtestline 278, external location: C:\Users\itsab\Desktop\tools\iss-iot-win_03-14-16\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\include\opencv2\core\mat.hppC/C++ Problem
      undefined reference to `cv::imread(std::string const&, int)'CVtest.cpp/CVtest/srcline 13C/C++ Problem
      undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'CVtest.cpp/CVtest/srcline 22C/C++ Problem
      undefined reference to `cv::Mat::copySize(cv::Mat const&)'CVtestline 298, external location: C:\Users\itsab\Desktop\tools\iss-iot-win_03-14-16\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\include\opencv2\core\mat.hppC/C++ Problem
      undefined reference to `cv::Mat::deallocate()'CVtestline 367, external location: C:\Users\itsab\Desktop\tools\iss-iot-win_03-14-16\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\include\opencv2\core\mat.hppC/C++ Problem
      undefined reference to `cv::namedWindow(std::string const&, int)'CVtest.cpp/CVtest/srcline 21C/C++ Problem
      undefined reference to `cv::waitKey(int)'CVtest.cpp/CVtest/srcline 24C/C++ Problem

       

      Code:

       

      #include <stdio.h>

      #include <unistd.h>

      #include <cv.h>

      #include <highgui.h>

       

       

       

       

      using namespace cv;

       

       

      int main( int argc, char** argv )

      {

        Mat image;

        image = imread( argv[1], 1 );

       

       

        if( argc != 2 || !image.data )

          {

            printf( "No image data \n" );

            return -1;

          }

       

       

        namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );

        imshow( "Display Image", image );

       

       

        waitKey(0);

       

       

        return 0;

      }

       

      Compiler settings

      Linker settings

      The OpenCV suggests adding libraries in the top (-I) however adding any libraries here keeps giving me a file not found error.