标签:opencv osx eclipse 配置
在Mac OSX上如果想使用OpenCV,可以通过自己手动编译源码的方式,但比较繁琐。等待几分钟,即可安装成功。
下面是配置eclipse:
#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv/cvaux.hpp> #include <fstream> using namespace std; #define BYTE unsigned char int main(int argc, const char * argv[]) { // insert code here... #if 1 //get the image from the directed path IplImage* img = cvLoadImage("/Users/kirchhoff/twd.png", 1); //NSLog(img); //create a window to display the image cvNamedWindow("picture", 1); //show the image in the window cvShowImage("picture", img); //wait for the user to hit a key cvWaitKey(0); //delete the image and window cvReleaseImage(&img); cvDestroyWindow("picture"); #endif //return return 0; }
标签:opencv osx eclipse 配置
原文地址:http://blog.csdn.net/wdkirchhoff/article/details/41910553