仅以此文纪念过往岁月
Netbeans配置OpenCv 时,需要注意以下两点
1.Netbeans只能使用MinGW作为Compiler ,如果使用Cygwin不能够编译OpenCv的程序
2.OpenCv自带编译的dll库,不能使用,需要使用MinGW重新编译OpenCv,否则会存在能够编译过,但是运行时会报错 gxx_persiona...的错误
以下为采用Netbeans的OpenCv的第一个程序
#include <cv.h>
#include <highgui.h>
using namespace cv;
/*
*
*/
int main(int argc, char** argv) {
Mat img = imread("D:\\lena.bmp");
if(img.empty())
return -1;
namedWindow( "lena", CV_WINDOW_AUTOSIZE );
imshow("lena", img);
waitKey(0);
return 0;
}