Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

OpenCVSharp for Unity

Discussion in 'Works In Progress - Archive' started by tbreina, Nov 4, 2014.

  1. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22
    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 https://sourceforge.net/projects/unityopencvsharpcamshift/

    screenshot.png
     
    Last edited: Apr 3, 2016
    ammarvohra, inko, r618 and 1 other person like this.
  2. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22


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

    -Tony
     
  3. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Oh, many thanks for that. :cool:
     
  4. nestg

    nestg

    Joined:
    Oct 8, 2012
    Posts:
    155
    Works in Unity free?
     
  5. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22
    Possibly. It only depends on the OpenCVSharp Dlls from shimat's project. I think Unity free will work, but haven't tried it.

    -Tony
     
  6. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22
  7. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22
  8. nicholausadi

    nicholausadi

    Joined:
    Jun 25, 2013
    Posts:
    4
    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 ?
     
  9. justadeveloper

    justadeveloper

    Joined:
    Jan 12, 2014
    Posts:
    33
    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
     
  10. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    After you pm i just try it. Same trouble here. :(
     
  11. cairon

    cairon

    Joined:
    Feb 21, 2015
    Posts:
    1
    Works fine for me with Unity 64Bits. Just run with the included scene (openCVtextureScene.unity)
    Someone has found tutorials about face detection?
     
  12. WarrenB

    WarrenB

    Joined:
    May 24, 2012
    Posts:
    21
    I'm getting the same error, Unity hangs when I play the supplied scene in the editor. Has anyone figured this out yet?
     
  13. Graphitech

    Graphitech

    Joined:
    Sep 14, 2012
    Posts:
    10
    Same here, any update?
     
  14. nitinmaru

    nitinmaru

    Joined:
    Jul 31, 2015
    Posts:
    3
    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
     
  15. rockinjambu

    rockinjambu

    Joined:
    Oct 18, 2015
    Posts:
    1
  16. Shuijingy

    Shuijingy

    Joined:
    Aug 23, 2014
    Posts:
    1
    Could you share android build setup? It seems crash on Android device without proper port of OpenCVSharp wrapper.

    Thanks!
     
  17. tbreina

    tbreina

    Joined:
    Mar 11, 2013
    Posts:
    22
  18. KJTang

    KJTang

    Joined:
    Aug 19, 2016
    Posts:
    1
    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?
     
  19. MuraliVenkat

    MuraliVenkat

    Joined:
    Jan 8, 2015
    Posts:
    14
    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.
     
    Last edited: May 16, 2017
  20. nikolay_alekseev

    nikolay_alekseev

    Joined:
    Oct 25, 2015
    Posts:
    34
    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.
     
    Last edited: May 30, 2017
  21. abhijit93

    abhijit93

    Joined:
    Mar 5, 2016
    Posts:
    4
    @dustylock Will this work for HoloLens UWP applications?
     
  22. Orion_78

    Orion_78

    Joined:
    Feb 13, 2014
    Posts:
    66
    Here is some tutorial I found
    https://forum.unity.com/threads/tutorial-using-c-opencv-within-unity.459434/