使用C ++ / CLI包装器进行opencv face检测 [英] opencv face detection using C++/CLI wrapper

查看:181
本文介绍了使用C ++ / CLI包装器进行opencv face检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用C ++ / CLI包装器实现opencv face检测并从C#访问它。但我得到了以下错误。

任何人都可以帮助我,请帮助!



I am trying to implement opencv face detection using C++/CLI wrapper and accessing it from C#. But i got following error.
Can anybody help me,please help!.

error LNK2005: "struct CvSeq * pFaceRectSeq" (?pFaceRectSeq@@3PAUCvSeq@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct _IplImage * pInpImg" (?pInpImg@@3PAU_IplImage@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct CvHaarClassifierCascade * pCascade" (?pCascade@@3PAUCvHaarClassifierCascade@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct CvMemStorage * pStorage" (?pStorage@@3PAUCvMemStorage@@A) already defined in FaceDetcCliWrapper.obj
fatal error LNK1169: one or more multiply defined symbols found



我可以将其作为win32控制台应用程序运行在Visual Studio 10中。


I can able to run it as a win32 console application in Visual studio 10.

推荐答案

您的标题具有误导性:首先是链接器错误。 :-(



你已经声明了一些结构并将它们多次包含在内。为了解决这个问题,你应该在每个头文件的顶部写这个语句,这个类抛出这样的错误



#pragma一次
Your header is misleading: at first it are linker errors. :-(

You have declared some structs and included them multiple time. To solve this problem you should write this statement at the top in every header file which class throws such an error

#pragma once


这篇关于使用C ++ / CLI包装器进行opencv face检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆