我已经使用 MinGW和 OpenCV 2.4.3 安装了 Code::Blocks。我想编译这个简单的程序:
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat im = imread("c:/path/to/lena.jpg");
if (im.empty()) {
cout << "Cannot open image!" << endl;
return 1;
}
imshow("Image", im);
waitKey(0);
}
如何正确设置 CodeBlocks 来编译上面的代码?
我已经在c:\opencv
.