Main.cpp(19):致命错误C1083:无法打开包含文件:' opencv2 / nonfree / nonfree.hpp':没有这样的文件或目录

时间:2015-10-27 15:32:59

标签: c++ opencv

我正在测试此代码,我安装了OpenCV-3.0.0_2但是它出错:

Main.cpp(19):致命错误C1083:无法打开包含文件:' opencv2 / nonfree / nonfree.hpp':没有这样的文件或目录 ==========构建:0成功,1个失败,0个最新,0个跳过==========

这个错误是否可能是由于openCV的版本造成的?

这是要测试的代码的一部分

//Include statements
#include <iostream>
#include <fstream>
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/nonfree/nonfree.hpp" ///Here is the error

//Name spaces used
using namespace cv;
using namespace std;

int main()
{
    //turn performance analysis functions on if testing = true
    bool testing=false;
    double t; //timing variable

    //load training image
    Mat object = imread ("C:/School/Image Processing/book.jpg", CV_LOAD_IMAGE_GRAYSCALE);
    if (!object.data){
        cout<<"Can't open image";
        return -1;
    }

。 。 。 。

0 个答案:

没有答案
相关问题