Build OpenCV on 410c error


#1

I have strange result running OpenCV on SnapDragon board (410c) with Linaro-Debian.
The Tools (Eclipse-CDT, OpenCV-V2.4.91) are all from Debian repository release.

include “cv.h”

include “highgui.h”

include “opencv2/opencv.hpp”

using namespace std;
using namespace cv;

Mat image; image = imread("…/SI3100.jpg", 1 );

Build ERROR :
Invalid arguments ’ Candidates are: cv::Mat imread(const std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>> &, int)

Now, this code works when I tested on VirtualBox (Debian) on PC. Also using Eclipse CDT gcc++

Anyone has ideas ??


#2

I rebuilt openCV on the 410c a while ago and it was working. I have put instructions here https://github.com/lawrencek52/FirstRobotics of course the infrastructure underneath is constantly changing so the instructions may no longer work, but it is a good start.


#3

Thanks for the info.
I finally locate the issue which I think is the gcc c++ version from Eclipse.
The function parameters is defined as “string”
image = imread("…/SI3100.jpg", 1 );

If I type cast it, then it works.
image = imread(string("…/SI3100.jpg"), 1 );

Looks like newer version of gcc is more forgiving in casting.