0

I am trying to use EmguCV with Python, but failed. Here are the things I have done and tried:

Python version: 3.6.9
pip version: 20.1.1

I have installed the requirements of pythonnet:

pytest==3.2.5
coverage
psutil
pycparser
mono

Then installed pythonnet(command: pip install pythonnet) and EmguCV (follow the instructions of Download_And_Installation)

and here is my code:

import cv2
import numpy as np
from PIL import Image
import clr
#-----------import EmguCV--------------
clr.AddReference("Emgu.CV")
#clr.AddReferenceToFile("Emgu.CV.dll") #is it not supported in pythonnet?
from Emgu.CV import *

I tried to import EmguCV but failed, here is the message:

Traceback (most recent call last):
  File "try.py", line 15, in <module>
    clr.AddReference("Emgu.Util")
System.IO.FileNotFoundException: Unable to find assembly 'Emgu.Util'.
  at Python.Runtime.CLRModule.AddReference (System.String name) [0x00057] in <ad8146de257247f091af8d3b9a402023>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 
Nyakui
  • 1
  • 1

0 Answers0