1.下载OpenCv2.3.1 安装
superpack需要run as administor
设置Environment variables中的
System variables
Path=.....\opencv\build\x86\vc10\bin\
user variables
Path=.....\opencv\build\x86\vc10\bin\ (没有需要自己创建)
2.下载OpenCvSharp
解压安装
3.在vs2012中配置
因为要使用OpenCvSharp,所以Template 选择c#
创建WindowsForm Application
Project->add reference
Browse到OpenCvSharp的文件夹,添加其中的一系列OpenCvSharp的.dll文件(除了OpenCvSharpExtern.dll)
reference里面不需要添加opencv的dll,也添加不了,会提示Please make sure taht the file is accessbile and that it is a valid assembly or COM component
这是因为
“ the file is a native DLL which means you can't add it to a .NET project via Add Reference... you can use via DllImport (see