我正在将 kinect 与 OpenCV 一起使用。我在没有 Cmake 的情况下对其进行了配置。我已经包含了所有内容,但是当我编写以下代码时:
#include "stdafx.h"
#include <cv.h>
#include <highgui.h>
#include <XnCppWrapper.h>
using namespace std;
using namespace cv;
int main()
{
Mat image = imread("c:\\im.jpg");
imshow("image",image);
VideoCapture Cap (CV_CAP_OPENNI);
if (!Cap.isOpened())
{
cout << "wrong";
}
waitKey(0);
return 0;
}
我在屏幕上看到“错误”这个词。我认为 Xncore.dll 有问题如何添加它或我的代码有什么问题?