Results 1 to 10 of 10

Thread: Install OpenCV python module

  1. #1
    Junior Member
    Join Date
    Mar 2018
    Posts
    5

    Install OpenCV python module

    Hi,
    I'm working on image registration.
    I would like to install the OpenCV module to do image processing.
    Is it possible ?

    Kind regards,
    Thomas

  2. #2
    Member
    Join Date
    Dec 2017
    Posts
    89
    Hi,
    OpenCV doesn't work with ironpython, try Emgu CV instead. Emgu CV is a cross platform .Net wrapper to the OpenCV image processing library.

    Kind regards
    Fredrik Olsson

  3. #3
    Junior Member
    Join Date
    Mar 2018
    Posts
    5
    Thanks for your answer.
    I didn't knew it wasn't compatible with ironpython.

    I never installed an external module to work with Zen.
    All I need to do is download the .exe avaible on their website and install it ?

    Kind regards,
    Thomas

  4. #4
    Member
    Join Date
    Dec 2017
    Posts
    89
    Hi,
    I have only tried it in an environment not connected to Zen. I think even with Zen you need a to make a separate installation of ironpython. The installation of EmguCv was quite straight forward but then it took some time to get the dependecies right since the ironpython guide referers to an old and obsolete version. You need to add OpenCV x86 and x64 dlls (included in the EmguCV installation) into the folder of the executable. Add reference to your Emgu.CV.World.dll, the full path and also Emgu.CV.UI.dll. Then import Emgu.CV.UI, Emgu.CV and Emgu.CV.Structure.

    Kind regards,
    Fredrik

  5. #5
    Junior Member
    Join Date
    Mar 2018
    Posts
    5
    Hi,
    Thanks for the explanation,
    I will try to install it soon.

    Kind regards,
    Thomas

  6. #6
    Junior Member
    Join Date
    Mar 2018
    Posts
    5
    Hi, thanks to you I managed to install EmguCV

    After copying all the dlls (EmguCV + Opencv) in the same folder,

    I used the following code to add references to EmguCv dlls and import it :

    Code:
    import os
    import clr
    from System import *
    
    #Create the reference to EmguCV
    clr.AddReferenceToFileAndPath("D:\\Users\\zeiss\\Desktop\\EmguCv Opencv dlls\\Emgu.CV.World.dll")
    clr.AddReferenceToFileAndPath("D:\\Users\\zeiss\\Desktop\\EmguCv Opencv dlls\\Emgu.CV.UI.dll")
    
    #Import Emgu CV
    from Emgu.CV import *
    from Emgu.CV.UI import *
    from Emgu.CV.Structure import *
    
    #Creation of an image to test if EmguCV works well
    image = Image[Gray, Byte](640, 480)
    image.SetRandNormal(MCvScalar(100), MCvScalar(100))
    ImageViewer.Show(image)

  7. #7
    Member
    Join Date
    Dec 2017
    Posts
    89
    Great!

    BR
    Fredrik

  8. #8
    Junior Member
    Join Date
    Sep 2013
    Posts
    10

    Cool import OPen CV - -cool

    Sounds pretty cool,
    would this allow to use a lot of cameras with ZEN, which are not supported bei ZEISS MIC?

  9. #9
    Junior Member
    Join Date
    Nov 2018
    Posts
    1
    Thanks for the information.

  10. #10
    Junior Member
    Join Date
    Feb 2020
    Posts
    1
    there aren't very many individuals who might choose this alternative of coctool

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •