• 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
3
Question by arn.zhan · Oct 18, 2011 at 06:39 AM · opencv

Integrate OpenCV (Emgu or OpenCvSharp) how to?

Hi everyone,

I've saw videos like this: http://www.youtube.com/watch?v=fRAPaLEIQao which seems a successfully integrated OpenCvSharp into Unity.

I tried to contact this 'aiminable' but he's not giving back any response.

Did anyone here integrated OpenCV to Unity before? Could you give me some information on how to do that? I keep getting errors when I try to make OpenCvSharp or Emgu working.

Any help would be appreciated. Thanks.

Comment
Add comment · Show 3
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 hanen · Jan 26, 2012 at 10:53 PM 0
Share

I try to work with OpencvSharp and i always the same error? Can some help me please I"nternal compiler error. See the console log for more information. output was: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=b03f5f7f11d50a3a' or one of its dependencies."

avatar image arn.zhan · Jan 26, 2012 at 11:21 PM 0
Share

As I said in the answer, you need to delete System.Drawing in all OpenCvSharp's source code and recompile it.

avatar image goTAN_ · Apr 04, 2013 at 10:49 AM 0
Share

I am trying to get opencvsharp working as well, but I want to get this working with IOS and Android and I am not sure if this is possible. I am also planing to use a mac for developing but that should not be a problem I think.

Any hints would be much appreciated.

4 Replies

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

Answer by arn.zhan · Dec 25, 2011 at 01:32 AM

I actually figured it out months ago, but forget to post an answer here!

I finally made contact with animinable. The thing is OpenCvSharp need to be recompiled with System.Drawings deleted (unity do not support that). Then put the dlls in and it will work.

Thanks to animinable!

Comment
Add comment · Show 4 · 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 cecarlsen · Aug 31, 2012 at 07:39 PM 0
Share

I managed to get rid of the System.Drawings error by recompiling the OpenCvSharp.dll but now I get this: 'DllNotFoundException: opencv_core240'. Whats next?

avatar image cecarlsen · Aug 31, 2012 at 08:07 PM 0
Share

Simply adding ' opencv_core240.dll' to the Plugins directory does not do the trick.

avatar image hoffmanuel · Oct 24, 2012 at 11:26 AM 0
Share

I've got the same problem with 'DllNotFoundException: opencv_core220.dll' I've also added it to the Plugins directory, the question is now, if there is a problem that it is a C++ library while the E$$anonymous$$GU dlls are C# (the should work similar as the OpenCvSharp dlls)

avatar image cecarlsen · Jan 09, 2014 at 03:57 PM 0
Share

Ping. Still stuck. Did anyone make this work on OSX?

avatar image
1

Answer by davebuchhofer · Feb 15, 2013 at 09:13 PM

I ran across quite a few questions like this while searching around today to get OpenCV up and running, and after an embarassing length of time to figure it out, just figured I should follow up here:

The Internal Compiler/System.Drawing error that people see: in your project settings / Player / Api compatibility level, set your to .NET 2.0 instead of the Subset!

As to the other common error people are seeing, the OpenCVSharp popup for "DllNotFoundException: opencv_core220.dll" when using the OpenCvSharp from HERE the current build on there depends on OpenCV 2.4, you then need to download OpenCV 2.4 from HERE then take the .dll's you plan to use and place them in the same directory as your Exe...

EX: if you want to play in the editor, you can place them in the Program files/Unity/Editor/ dir.... if you want to play with a standalone, place them in the same dir as your standalone .exe file.

after that, fun with programming!

PS: I should also add that I ended up having to compile my own OpenCV before it would work, following the directions in the openCV help, cmake, visual studio, etc.

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 goTAN_ · Apr 05, 2013 at 10:59 AM 0
Share

Well I am stuck in trying to build the opencvsharp on mac. It cant find OpenCV and I dont know how to configure the FindOpenCV.cmake. I guess you were building on windows?

avatar image cecarlsen · Jan 09, 2014 at 03:57 PM 0
Share

Also stuck. I compiled the OpenCVSharp.dll (v.245) on OSX but have no idea how to compile the opencv_coreXXX.dll from the files downloaded at opencv.org

avatar image
1

Answer by tbreina · Apr 26, 2014 at 12:00 AM

Does anyone have a Unity plugin or sample program that we could just download?

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
avatar image
0

Answer by kevynshipp · May 29, 2017 at 03:08 PM

Hi,

I think the best approach is to get OpenCV plus Unity from Asset Store.

alt text


forum-small.png (10.3 kB)
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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Access Multiple Camera Streams 0 Answers

Unity Opencv 1 Answer

Face Recognition in unity without using OpenCv 0 Answers

AR: How to make a virtual try on app with unity ? 0 Answers

Linker errors on Xcode 4.5.2 with OpenCV 2.4.3 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges