OpenCVSharp for Unity

I’ve seen lots of Youtube videos with people demonstrating using openCV with Unity, but haven’t found many that include demo source code to actually play around and learn.

So I wrote my own Unity demo based on shimat’s openCVSharp wrapper for openCV. In the demo, the user can select a region of interest to track via openCV’s CAMshift algorithm.

The code is open sourced. I’m hoping people can use it to learn openCV for Unity and maybe even suggest improvements in my implementation.

Thanks.
-Tony

The source and executables are on SourceForge Unity OpenCVSharp Camshift download | SourceForge.net

1835052--117684--screenshot.jpg

4 Likes

Here’s a Youttube video of the program is action.

-Tony

Oh, many thanks for that. :sunglasses:

Works in Unity free?

Possibly. It only depends on the OpenCVSharp Dlls from shimat’s project. I think Unity free will work, but haven’t tried it.

-Tony

https://code.google.com/p/unity-opencvsharp-camshift/

I’ve significantly updated the code and posted it to Google Code.

-Tony

Looks like SourceForge is preferable for this: Unity OpenCVSharp Camshift download | SourceForge.net

hey, im interested with your project.
Can you create a tutorial how to do it?
cause when i download unitypackage from sourceforge, i my unity not responding.

is this project just need your UnityOpenCvSharp_2_4_9_Package.unitypackage ?

hello sir, i want to ask, what object should I add to game object tracker and when I run it, it’s always not responding? sorry I’m newbie

After you pm i just try it. Same trouble here. :frowning:

Works fine for me with Unity 64Bits. Just run with the included scene (openCVtextureScene.unity)
Someone has found tutorials about face detection?

I’m getting the same error, Unity hangs when I play the supplied scene in the editor. Has anyone figured this out yet?

Same here, any update?

Hi thete i am newbie in unity as well as This Field of VR i would like to learn how to integrate OpenCV with unity as there is not any source that can help if anyone helps me it would be appriciated

for tbreina… link of unity project is deleted… Here’s the link to my dropbox folder of the Unity project:
https://www.dropbox.com/sh/shr73bl12pnllfa/AACXVKosOlcV7Z5pXA3GcPC2a?dl=0

can u release a new link for unity project about openCV with Unity?? … i hope you help

Could you share android build setup? It seems crash on Android device without proper port of OpenCVSharp wrapper.

Thanks!

The source and executables are on SourceForge Unity OpenCVSharp Camshift download | SourceForge.net

The openCVSharp libraries and source are at GitHub - shimat/opencvsharp: OpenCV wrapper for .NET.

You’ll need to make sure that the DLL in the Assets directory is built for your platform. So 32-bit or 64-bit depending on your computer. I don’t know about Android, but I’m guessing you can re-build the openCVSharp DLLs for Android.

-Tony

Hello tbreina!
I am a new user of unity, and I want to use opencvsharp in unity too. But I met problem in building opencvsharp. I want to build DLL for my unity projects, cause DLLs in your project are 32-bit. But I don’t know how to. Could you please give me some advice on this?

Hi,
Anyone has done tutorial for ocr in unity for text recognition? Can anyone give me startup tutorial to do text recognition.
I am in need of help.
Thanks in advance.

We’ve recently made an asset OpenCV plus Unity that extends OpenCVSharp library to Unity. It supports all major platforms: Mac, Windows, iOS, Android for reasonable price. If you have any questions please fell free to ask me.