【发布时间】:2014-07-09 23:32:03
【问题描述】:
我在里面用 Opencv 构建了一个项目,然后在 C# 中使用它。
但是我不能将我的项目包含 opencv 库打包到动态 DLL 中,然后在 C# 中调用它。
有人可以给我一些提示吗? :(
我的代码:
#include "opencv\cv.h"
#include "opencv\highgui.h"
using namespace cv;
extern "C" _declspec(dllexport) string OpenCVTest(string fileName)
{
Mat img = imread(fileName);
IplImage image = img;
cvShowImage("Hello world", &image);
cvWaitKey(0);
cvDestroyAllWindows();
return "";
}
【问题讨论】: