问题描述:

I am trying to run tutorial code of openCV at Fedora17. I installed it as it specified on its internal tutorial that comes with openCV installation pack. Here is the code .

#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;

}

and I am getting an error about GTK, here is the error that I get.

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/erogol/Desktop/OpenCV-2.4.3/modules/highgui/src/window.cpp, line 602

terminate called after throwing an instance of 'cv::Exception'

what(): /home/erogol/Desktop/OpenCV-2.4.3/modules/highgui/src/window.cpp:602: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

Aborted (core dumped)

Do you have an solution or suggestion for the problem.

相关阅读:
Top