所以使用時必須加入下面的程式碼。
#include <opencv2/nonfree/nonfree.hpp> #pragma comment(lib, "opencv_nonfree247d.lib") #pragma comment(lib, "opencv_nonfree247.lib")
使用前須初始化
cv::initModule_nonfree();
#include <opencv2/nonfree/nonfree.hpp> #pragma comment(lib, "opencv_nonfree247d.lib") #pragma comment(lib, "opencv_nonfree247.lib")
cv::initModule_nonfree();
IplImage *iplImage = cvLoadImage(imageFile, 1); cv::Mat matImage(iplImage);
cv::Mat matImage(cv::Size(width, height), CV_8UC3); IplImage *iplImage = cvCreateImage(cvSize(width, height), 8, 3); iplImage = &matImage.operator IplImage();
glut.h → C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\GL glut.lib → C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib glut32.dll → C:\Windows\SysWOW64
#include <GL/gult.h>