I have a problem. I can't solve this problem for 5 days.
My task is to develop a plug-in for Autodesk Fusion 360 in python (CAD). The client wants to take a contour based on a photo and obtain a code to control the robot based on it.
I want to use the openCV library. Fusion 360 install my own version of python, I can't change it. I installed opencv-contrib-python, I also have media features in windows.
I still have a problem:
ImportError: DLL load failed while importing cv2: The specified module could not be found.
What else can I try?
Maybe there is another way to get contours from a photo?
Maybe using a different library or with ready-made functions from gitgub?
Related
I have a python project for OCR MRZ detection with 2 modules 1 is for ID which uses EasyOcr,pythorch and other one is for Passport documents which uses Pytesseract and tensorflow.
I need to prepare this project for deployment I have tried some methods but none of them was practible for deployment process.
I have tried pyinstaller with couple of configurations with --onefile
option the setup is great but it takes too long to unpack the exe
when executed.
I have then tried --onedir option the delay was gone but now
installation package was too complicated and size was too
large(1.8GB).
I have tried to "compile" python code by using Cython but even with a
helloworld.py sample app I couldn't manage to make this one work I
got couple of errors during gcc compiling the last error I got due to
msvcp package which i have installed but still got the error.
And as last I have used Nuitka to get a dll-like file to import this
in C# and use it like a package, I have successfully created a test
.pyd file from a helloworld.py but i couldn't import it in C# as i
planned.
What I need is to prepare this project as a simpler and low-sized application which is hard to reverse-engineered for source codes ready for deployment. For passport OCR I can switch development to C# but for ID I couldn't find any alternative OCR library to get the MRZ information so at least I need to use ID OCR module from my Python project.
Any help would be appreciated,
Thanks
I am working on fusion360 python API and face some library issue. Actually, I import PIL python library in my code and it give the error that ModuleNotFoundError: No module named 'PIL'. Can anyone knows how to add the external python libraries in Fusion360 environment that allows me to use the PIL python library for fusion360 API ?
There is no easy way to do that to my knowledge. Fusion 360 uses a separate Python version which only has standard libraries. There are some workarounds mentioned here:
https://forums.autodesk.com/t5/fusion-360-api-and-scripts/to-install-python-modules/td-p/5777176
But overall it is better to stick to standard libraries as making other libraries work will be tedious work. And most likely will stop working after Fusion 360 makes an update
I am currently trying to use the camera module from Pygame, a set of Python modules designed for writing video games. Trying to initialize the camera gives the error
from VideoCapture import vidcap as vc
ModuleNotFoundError: No module named 'VideoCapture'
I am trying to resolve this error using the instructions from python pygame.camera.init() NO vidcapture, but I am not sure how to execute step 2 in the recommended solution, which says to add the corresponding version of dll from a downloaded program to "your python path"\DLLs. I understand this is a reference to the python system path, but am not sure what it means to add the dll.
"your python path" is the path of your python installation. DLLs is the directory DLLs under that very path.
So if your python installation is at (e.g.)
C:\Users\max.power\AppData\Local\Programs\Python\Python37-32
then the "your python path"\DLLs directory refers to
C:\Users\max.power\AppData\Local\Programs\Python\Python37-32\DLLs
Also note that the camera module is marked as experimental, only works with v4l2 cameras and only supports linux out of the box, so I don't know if the answer you linked works at all.
I was working on a project on facial recognition using asift, which does PCA whitening before it processes the image. One of my friends downloaded a code and gave it to me for execution, so we have something to start with. But however, on execution, I got an error, which said -
AttributeError: module 'cv2' has no attribute 'PCAComputeVar'
On Googling, I found that PCAComputeVar is supported mainly in opencv 2. However, I couldn't find anything in opencv 3. I don't want to downgrade to opencv 2, because there are some features supported only in opencv 3.
Is there any method by which I can access opencv 2 libraries from opencv3? If not, atleast is there any function in opencv 3, which does something similar to this?
According to their 3.2 documentation, it was renamed to cv2.PCACompute().
More details on the parameters can be found here.
I'm very new with Python. I'm working with PyCharm IDE on Windows. I'm trying to run some 3rd party code, but I'm having troubles with some functions that says "unresolved reference". These functions are: load, transpose and arctan.
For example:
z=load(dir+name+'.txt')
LBR=A*transpose(cos(B+C*(t)))
uu=arctan((bb/aa)*tan(phi))
I thought it was because of this library: from pylab import *, so I searched in the web and found that it was contain in a package named matplotlib, so I downloaded and installed it.
So now I haven't solved the first issue and I'm also getting this bug:
Some skeletons failed to generate: 12 modules failed in 1 interpreter.
This image shows the details of that last bug.
So, how do I fix this and which library or package should I use? Thanks.