Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV installation into eclipse

General Note: I'm using Ubuntu 14.04.3 I am following the standard tutorial for installing OpenCV with eclipse cdt : http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html

I installed all the libraries, exactly as directed. I checked where all of the libraries were installed in the terminal. However, eclipse tells me that it doesn't recognize the printf function.

Also in the tutorial, it says if you look in the folder, you'll find an executable. All I have that looks remotely runnable is a .o file. (I called my file test2.cpp, so this file is called test2.o) Is this the executable? Nothing in the Release folder looks like it could be run.

I actually had the same problem in another tutorial - this one by Rodrigo Berriel. http://rodrigoberriel.com/2014/10/using-opencv-3-0-0-with-eclipse/ This one is different, because most of the work done is in the terminal.

With both tutorials, the results are the same. I get all the libraries installed, but for some reason, there isn't a clear executable. In the case of Berriel's tutorial, we went into the Release folder from the terminal, and the executable is supposed to be clearly marked(because it is coloured in the Linux terminal), but nothing like that was there. I've asked him why, but its been several days and he hasn't gotten back to me(which I don't mind- there's probably 100 people with questions like mine).

When I do the step in the tutorial that goes into run configurations, and then presses on the c++ application tab, my Release folder comes up, instead of the file names. (test.cpp is for Berriel's tutorial, test2.cpp is for the standard one).

Specifically: C/C++ Application Machine Vision CPP Release C/C++ Container Launcher

Note that my whole project is called Machine Vision CPP. I don't think my Release folder is an executable. Even then, I don't get the Debug keyword at the end.

What should I do? Help? (note that i would really appreciate detailed instructions because i've followed 3 tutorials now, all with extremely clear and simple steps, and it still doesn't work me!)

OpenCV installation into eclipse

General Note: I'm using Ubuntu 14.04.3 I am following the standard tutorial for installing OpenCV with eclipse cdt : http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html

I installed all the libraries, exactly as directed. I checked where all of the libraries were installed in the terminal. However, eclipse tells me that it doesn't recognize the printf function.

Also in the tutorial, it says if you look in the folder, you'll find an executable. All I have that looks remotely runnable is a .o file. (I called my file test2.cpp, so this file is called test2.o) Is this the executable? Nothing in the Release folder looks like it could be run.

I actually had the same problem in another tutorial - this one by Rodrigo Berriel. http://rodrigoberriel.com/2014/10/using-opencv-3-0-0-with-eclipse/ This one is different, because most of the work done is in the terminal.

With both tutorials, the results are the same. I get all the libraries installed, but for some reason, there isn't a clear executable. In the case of Berriel's tutorial, we went into the Release folder from the terminal, and the executable is supposed to be clearly marked(because it is coloured in the Linux terminal), but nothing like that was there. I've asked him why, but its been several days and he hasn't gotten back to me(which I don't mind- there's probably 100 people with questions like mine).

we are still working on it. When I do the step in the tutorial that goes into run configurations, and then presses on the c++ application tab, my Release folder comes up, instead of the file names. (test.cpp is for Berriel's tutorial, test2.cpp is for the standard one).

Specifically: C/C++ Application Machine Vision CPP Release C/C++ Container Launcher

Note that my whole project is called Machine Vision CPP. I don't think my Release folder is an executable. Even then, I don't get the Debug keyword at the end.

What should I do? Help? (note that i would really appreciate detailed instructions because i've followed 3 tutorials now, all with extremely clear and simple steps, and it still doesn't work me!)

Here is the code I'm trying to run: file: test.cpp

 #include <opencv2/opencv.hpp>
using namespace cv;

int main(int argc, char** argv) {
    Mat inputImage = imread(argv[1]);
    imshow("Input Image", inputImage);

    waitKey(0);
    return 0;
}

file test2.cpp

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

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
  Mat image;
  image = imread( argv[1], 1 );

  if( argc != 2 || !image.data )
    {
      printf("No image data \n");
      cout <<  "No image data";
  return -1;
    }

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );

  waitKey(0);

  return 0;
}

OpenCV installation into eclipse

General Note: I'm using Ubuntu 14.04.3 I am following the standard tutorial for installing OpenCV with eclipse cdt : http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html

I installed all the libraries, exactly as directed. I checked where all of the libraries were installed in the terminal. However, eclipse tells me that it doesn't recognize the printf function.

Also in the tutorial, it says if you look in the folder, you'll find an executable. All I have that looks remotely runnable is a .o file. (I called my file test2.cpp, so this file is called test2.o) Is this the executable? Nothing in the Release folder looks like it could be run.

I actually had the same problem in another tutorial - this one by Rodrigo Berriel. http://rodrigoberriel.com/2014/10/using-opencv-3-0-0-with-eclipse/ This one is different, because most of the work done is in the terminal.

With both tutorials, the results are the same. I get all the libraries installed, but for some reason, there isn't a clear executable. In the case of Berriel's tutorial, we went into the Release folder from the terminal, and the executable is supposed to be clearly marked(because it is coloured in the Linux terminal), but nothing like that was there. I've asked him why, and we are still working on it. When I do the step in the tutorial that goes into run configurations, and then presses on the c++ application tab, my Release folder comes up, instead of the file names. (test.cpp is for Berriel's tutorial, test2.cpp is for the standard one).

Specifically: C/C++ Application Machine Vision CPP Release C/C++ Container Launcher

Note that my whole project is called Machine Vision CPP. I don't think my Release folder is an executable. Even then, I don't get the Debug keyword at the end.

What should I do? Help? (note that i would really appreciate detailed instructions because i've followed 3 tutorials now, all with extremely clear and simple steps, and it still doesn't work me!)

Here is the code I'm trying to run: file: test.cpp

 #include <opencv2/opencv.hpp>
using namespace cv;

int main(int argc, char** argv) {
    Mat inputImage = imread(argv[1]);
    imshow("Input Image", inputImage);

    waitKey(0);
    return 0;
}

file test2.cpp

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

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
  Mat image;
  image = imread( argv[1], 1 );

  if( argc != 2 || !image.data )
    {
      printf("No image data \n");
      cout <<  "No image data";
  return -1;
    }

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );

  waitKey(0);

  return 0;
}