- Home /
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
Did you ever figure this out? I can help if you need E$$anonymous$$GU running within unity on OSX, however, still working on getting it working when exporting to Android/iOS.
@daniellimahp Having the exact same problem here... Any news @mahlm ???
@daniellima - I contacted the E$$anonymous$$GU $$anonymous$$m, and they basically told me the public release wont work on iOS (as of stable release early aug) . However, you can request a trial for the Unity E$$anonymous$$GU asset.
And android? I can generate AP$$anonymous$$ file and install on androids, but get the error: cvextern library not found... Tried many things
@daniellima, sorry, I never tried exporting to Android - I'd assume it's the same case as iOS. Probably be easier to contact them.
Answer by Lev · Aug 05, 2015 at 09:23 AM
this is, how i got it to work:
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:
cd platforms/osx/
./configure_universal
./makeBundle
cd ../../Emgu.CV.Unity/
./copy_unity_assets
./copy_demo_assets
then copy the folder Emgu.CV.Unity to your workspace and open it with unity as a project.
that was it for me :-)
That works when exporting from unity into xcode for iOS? That's where I get my road blocks.
no sorry, i have no idea how to integrate E$$anonymous$$GUCV with iOS. that is just what i did to have E$$anonymous$$GUCV working in OSX. (answer for my own question) sorry mahlm :-(
No problem, I'll keep plugging away at it. I'll post a solution if I find one. Thanks!
Your answer
Follow this Question
Related Questions
Plugins on OSX (OpenCV and EmguCV) 2 Answers
C#, EmguCv, opencv and mavericks 0 Answers
OpenCV integration 2 Answers