このチュートリアルを使用して、VS 2008 で OpenCV 2.4.6 を使い始めています: http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html
私はすべての指示に従いました (私の OpenCV はデフォルトの Program Files (x86) フォルダーにはありません。
C:\opencv_built
チュートリアルとは異なり、含まれているすべてのファイルが到達可能であること、およびビルドが成功したかどうかなどを確認するためだけに、非常に単純なコードを配置しました。
#include "stdafx.h"
#include <iostream> // for standard I/O
#include <string> // for strings
#include <iomanip> // for controlling float print precision
#include <sstream> // string to number conversion
#include <opencv2/imgproc/imgproc.hpp> // Gaussian Blur
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
#include <opencv2/highgui/highgui.hpp> // OpenCV window I/O
using namespace std;
using namespace cv;
double getPSNR ( const Mat& I1, const Mat& I2);
Scalar getMSSIM( const Mat& I1, const Mat& I2);
int main(int argc, char *argv[])
{
return 0;
}
しかし、ビルドしようとすると致命的なエラーが発生します。
fatal error C1083: Cannot open include file: 'opencv2/imgproc/imgproc.hpp': No such file or directory c:\Users\Administrator\Documents\Visual Studio 2008\Projects\firstopencv\firstopencv\firstopencv.cpp 17
これは明らかに次の行を指しています。
#include <opencv2/imgproc/imgproc.hpp> // Gaussian Blur
dll ファイルがどこにあるか、または次に何をすればよいかわかりません。これは本当に簡単に違いないことはわかっていますが、dllファイルを検索しました。
opencv_core243d.lib
しかし、検索結果が得られません。