EmguCV 插件的 Unity3d DllNotFoundException
Unity3d DllNotFoundException for EmguCV plugin
我正在尝试让 emgu cv 在 osx 上与 unity3d 一起工作。我按照 http://www.emgu.com/wiki/index.php/Download_And_Installation#OSX and 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)
有谁知道是否需要任何额外的步骤或者文件应该在不同的文件夹中?
好的,所以我通过摆弄来回答我自己的问题,结果我正在寻找一个更复杂的解决方案,而它原来是一个参考问题,需要将一些文件移动到不同的文件夹...
对于任何想在 Unity 中 运行 EmguCV 的人,这里是:
- git 克隆 git://git.code.sf.net/p/emgucv/code emgucv cd emgucv
- git checkout -b emgucv_3.0
- git 子模块更新 --init --recursive
- cd platforms/osx/
- ./configure_universal
- ./makeBundle
- cd ../../Emgu.CV.Unity/
- ./copy_unity_assets
- ./copy_demo_assets
- 现在将 Plugins 文件夹移动到 Emgu.CV 文件夹
- 将 Assets、Library 和 ProjectSettings 文件夹复制到您的 Unity 项目文件夹
应该是这样...我的错误问题是 EmguCV 库正在 Emgu.CV/Plugins
文件夹中寻找 .bundle
,而不是默认的 Plugins
文件夹。
我正在尝试让 emgu cv 在 osx 上与 unity3d 一起工作。我按照 http://www.emgu.com/wiki/index.php/Download_And_Installation#OSX and 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)
有谁知道是否需要任何额外的步骤或者文件应该在不同的文件夹中?
好的,所以我通过摆弄来回答我自己的问题,结果我正在寻找一个更复杂的解决方案,而它原来是一个参考问题,需要将一些文件移动到不同的文件夹...
对于任何想在 Unity 中 运行 EmguCV 的人,这里是:
- git 克隆 git://git.code.sf.net/p/emgucv/code emgucv cd emgucv
- git checkout -b emgucv_3.0
- git 子模块更新 --init --recursive
- cd platforms/osx/
- ./configure_universal
- ./makeBundle
- cd ../../Emgu.CV.Unity/
- ./copy_unity_assets
- ./copy_demo_assets
- 现在将 Plugins 文件夹移动到 Emgu.CV 文件夹
- 将 Assets、Library 和 ProjectSettings 文件夹复制到您的 Unity 项目文件夹
应该是这样...我的错误问题是 EmguCV 库正在 Emgu.CV/Plugins
文件夹中寻找 .bundle
,而不是默认的 Plugins
文件夹。