我试图让emgu cv在osx上使用unity3d。我按照http://www.emgu.com/wiki/index.php/Download_And_Installation#OSX和opencv (emgucv) not working in unity in osx?
上的步骤操作不幸的是我一直遇到DllNotFoundException错误:
DllNotFoundException: Assets/Emgu.CV/Plugins/emgucv.bundle/Contents/MacOS/libcvextern.dylib
Emgu.CV.CvInvoke..cctor () (at Assets/Emgu.CV/Emgu.CV/PInvoke/CvInvoke.cs:464)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.CvInvoke
CameraTexture.Start () (at Assets/Emgu.CV/Emgu.CV.Demo/CameraTexture.cs:49)
和
DllNotFoundException: Assets/Emgu.CV/Plugins/emgucv.bundle/Contents/MacOS/libcvextern.dylib
Emgu.CV.CvInvoke..cctor () (at Assets/Emgu.CV/Emgu.CV/PInvoke/CvInvoke.cs:464)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.CvInvoke
Emgu.CV.Image`2[Emgu.CV.Structure.Bgr,System.Byte].AllocateData (Int32 rows, Int32 cols, Int32 numberOfChannels) (at Assets/Emgu.CV/Emgu.CV/Image.cs:331)
Emgu.CV.Image`2[Emgu.CV.Structure.Bgr,System.Byte]..ctor (Int32 width, Int32 height) (at Assets/Emgu.CV/Emgu.CV/Image.cs:281)
HelloTexture.Start () (at Assets/Emgu.CV/Emgu.CV.Demo/HelloTexture.cs:19)
是否有人知道是否需要任何其他步骤或文件应位于不同的文件夹中?
答案 0 :(得分:2)
好吧所以我通过摆弄来回答我自己的问题,因为事实证明我正在寻找一个更复杂的解决方案,而事实证明这是一个参考问题,需要将一些文件移动到不同的文件夹......
对于任何想要在Unity中运行EmguCV的人来说,就在这里:
应该是这样......我的错误问题是EmguCV库正在.bundle
文件夹中查找Emgu.CV/Plugins
而不是默认的Plugins
文件夹。