Ala*_*lan 2 c++ opencv visual-studio-2013
我使用的是 Visual Studio Professional 2013。在那里我使用了 opencv。我已经正确链接了所有的 opencv 库。
我该如何解决这个问题?
请在下面找到我使用的代码(这个未定义的 Mat 问题不会出现在 main.cpp 中)
#pragma once
#include "stdafx.h"
#include <opencv2/highgui/highgui.hpp> // import no include errors
#include <opencv2/imgproc/imgproc.hpp> // import no include errors
#include <opencv2/core/core.hpp> // import no include errors
class DepthImage
{
public:
DepthImage();
~DepthImage();
private:
Mat image; //identifier "Mat" is undefined
};
Run Code Online (Sandbox Code Playgroud)
#pragma once
//#include "stdafx.h" never in header file
#include <opencv2/highgui/highgui.hpp> // import no include errors
#include <opencv2/imgproc/imgproc.hpp> // import no include errors
#include <opencv2/core/core.hpp> // import no include errors
class DepthImage
{
public:
DepthImage();
~DepthImage();
private:
cv::Mat image; //no more identifier "Mat" is undefined
};
Run Code Online (Sandbox Code Playgroud)
希望能帮到你
| 归档时间: |
|
| 查看次数: |
4583 次 |
| 最近记录: |