Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
906 Views

How to setup OpenCV on Intel System Studio IoT edition?

Jump to solution

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.

http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html# linux-eclipse-usage Using OpenCV with Eclipse (plugin CDT) — OpenCV 2.4.13.1 documentation

Errors:

DescriptionResourcePathLocationTypeundefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'CVtest.cpp/CVtest/srcline 22C/C++ Problemundefined 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\us.../C++ Problemundefined reference to `cv::imread(std::string const&, int)'CVtest.cpp/CVtest/srcline 13C/C++ Problemundefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'CVtest.cpp/CVtest/srcline 22C/C++ Problemundefined 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\us.../C++ Problemundefined 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\us.../C++ Problemundefined reference to `cv::namedWindow(std::string const&, int)'CVtest.cpp/CVtest/srcline 21C/C++ Problemundefined reference to `cv::waitKey(int)'CVtest.cpp/CVtest/srcline 24C/C++ Problem

Code:

# include

# include

# include

# include

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.

0 Kudos

Accepted Solutions
Highlighted
Community Manager
37 Views

Hi Abinsaju,

I will try to help with this. I followed the guide that you posted, and I compiled the code without errors. I used another paths for the compiler and linker settings, I used the paths that are in the Intel® System Studio IoT Edition files (C:\...\iss-iot-win_03-14-16\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\include).

I'm going to show you what I did in the Compiler and Linker settings:

Compiler Settings

Linker Settings

In Libraries(-l) you can add the following libraries:

opencv_core opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_features2d opencv_calib3d opencv_objdetect opencv_contrib opencv_legacy opencv_flann

I only added opencv_core opencv_imgproc opencv_highgui, but you can add all of them if you want.

I hope this works for you.

Regards,

 

-Leonardo

View solution in original post

0 Kudos
3 Replies
Highlighted
Community Manager
38 Views

Hi Abinsaju,

I will try to help with this. I followed the guide that you posted, and I compiled the code without errors. I used another paths for the compiler and linker settings, I used the paths that are in the Intel® System Studio IoT Edition files (C:\...\iss-iot-win_03-14-16\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\include).

I'm going to show you what I did in the Compiler and Linker settings:

Compiler Settings

Linker Settings

In Libraries(-l) you can add the following libraries:

opencv_core opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_features2d opencv_calib3d opencv_objdetect opencv_contrib opencv_legacy opencv_flann

I only added opencv_core opencv_imgproc opencv_highgui, but you can add all of them if you want.

I hope this works for you.

Regards,

 

-Leonardo

View solution in original post

0 Kudos
Highlighted
Beginner
37 Views

Thank you so much!! That worked!

it seems as if the error was because I kept using an external opencv library while there was an internal one.

0 Kudos
Highlighted
Community Manager
37 Views

Hi Abinsaju,

 

 

It is great to see that it worked.

 

 

Remember that we are here to help, just contact us.

 

 

Regards,

 

-Leonardo
0 Kudos