• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Magnus Wolffelt · Jul 26, 2010 at 06:59 PM · pluginsosxopencvemgucv

Plugins on OSX (OpenCV and EmguCV)

Hey!

I'm trying to get OpenCV and EmguCV (.Net OpenCV wrapper) working on OSX. It's already working with DLLs on Windows.

However, on OSX Unity is unable to locate the proper OpenCV binaries it seems. I've dropped .so files into the Plugins directory, but this obviously doesn't work. It appears one is supposed to use .bundle files to add OSX plugins to Unity. How do these files related to .so files that commonly come with pre-built Unix libs? I encountered an OSX .framework package for OpenCV, and dropped it into the Plugins directory aswell, but it didn't seem to stick. :)

Can you build a .bundle file from .so files? What is the proper workflow for this kind of thing? Also, how are .so files related to .dylib files? Should I look for .dylib files on OSX, or do .so files work fine?

To be clear.. EmguCV is a pure .NET wrapper around the C library OpenCV, which can be compiled towards Linux and OSX.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by jonas-echterhoff · Jul 27, 2010 at 09:05 AM

If you have .so files, I think it is very likely that those are not built for Mac OS X. .so (shared object) is a commonly used extension on linux for dynamic libraries - on the mac, those typically have the .dylib extension. A bundle is basically a packaged dylib, but it has some different linking options, so you cannot make a bundle out of a dylib without rebuilding. However, AFAIK, a .framework is just a bundle plus some header files, so likely, just renaming your .framework to .bundle should do the trick. If not, you may have to set up a new build target in XCode for your project to output a bundle.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Magnus Wolffelt · Jul 27, 2010 at 11:41 AM 0
Share

Ok, thank you. Will try renaming to .bundle.

avatar image Magnus Wolffelt · Jul 29, 2010 at 09:41 AM 0
Share

The problem with this was that the framework I had appeared to be a single binary built from the sources, statically linked. The .Net wrapper does DlImport for specific parts of the OpenCV libraries.

avatar image
0

Answer by RustemKamun · Jan 31, 2011 at 09:01 AM

Hey guys! Hi. Please help me! I use unity pro right now, and I need to integrate OpenCV to Unity. I ' ve done it through [DllImport] importing EmguCv(DotNet wrapper) , but it is very uncomfortable to call function as: [DllImport('cv')] static extern void Laplace(args[]) Is there exist any other way ?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Mono and missing types using external library 2 Answers

How to make Unity find .dylib files? 5 Answers

opencv (emgucv) not working in unity in osx? 1 Answer

EMGUCV with Unity : System.Windows.Forms.dll assembly is referenced by user code, but is not supported on Android platform. 1 Answer

Computer Vision integration (OpenCV,EmguCV) 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges