opencv (emgucv) not working in unity in osx?

i am at the point, where i just would want to know if anybody out there has emguCV.unity running inside unity in osx?

there are many tips concerning DllNotFoundExceptions and unity. all of them do not work in my case. i spent allmost four days searching and trying out everything.

the exact error is:

System.TypeInitializationException: An
exception was thrown by the type
initializer for Emgu.CV.OCR.OcrInvoke
—> System.TypeInitializationException: An
exception was thrown by the type
initializer for Emgu.CV.CvInvoke —>
System.DllNotFoundException:
Assets/Plugins/emgucv.bundle/Contents/MacOS/libopencv_core.3.0.0.dylib
at (wrapper managed-to-native)
Emgu.CV.CvInvoke:cvRedirectError
(Emgu.CV.CvInvoke/CvErrorCallback,intptr,intptr)
at Emgu.CV.CvInvoke…cctor ()
[0x001f7] in
/Users/Lev/Documents/workspace/Text_Scanner/Assets/Emgu.CV/Emgu.CV/PInvoke/CvInvoke.cs:353
— End of inner exception stack trace — at Emgu.CV.OCR.OcrInvoke…cctor () [0x00006] in
/Users/Lev/Documents/workspace/Text_Scanner/Assets/Emgu.CV/Emgu.CV.OCR/OcrInvoke.cs:26
— End of inner exception stack trace — at Emgu.CV.OCR.Tesseract…ctor () [0x00011] in
/Users/Lev/Documents/workspace/Text_Scanner/Assets/Emgu.CV/Emgu.CV.OCR/Tesseract.cs:45

(there is the emgucv.bundle in Assets/Plugins/ with the libopencv_core.3.0.0.dylib inside at the correct position. i copied the dylibs and the whole bundle to alle possible positions. including the project folder, unity-editor folder, …)

there is no compilition error. the error happens after starting play in editor and in standallone mac as well. i built emgucv with the cmake settings in emgucv.unity from emgucv 3.0.0.

(i even tried opencvsharp did not work neither)

i am desperate. please help me or just tell me, there is no way.

thanks in advance,
lev

this is, how i got it to work:

  1. do as instructed here until the
    cmake command (don’t do the cmake)
    http://www.emgu.com/wiki/index.php/Download_And_Installation#OSX
    instead do:
  2. cd platforms/osx/
  3. ./configure_universal
  4. ./makeBundle
  5. cd …/…/Emgu.CV.Unity/
  6. ./copy_unity_assets
  7. ./copy_demo_assets
  8. then copy the
    folder Emgu.CV.Unity to your
    workspace and open it with unity as
    a project.

that was it for me :slight_smile: