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
Install OpenCV python module
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
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
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 :
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: Select all
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)
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?
would this allow to use a lot of cameras with ZEN, which are not supported bei ZEISS MIC?
-
- Posts: 180
- Joined: Wed May 20, 2020 10:10 am