Using CV2 with Python in Godot
Hello,
I've been able to find and get Python with CV2 to recognize gestures. I would like to use the code within Godot and I've used your Python video to get Python to work within Godot. I've gotten a number of functions and classes to be imported into Godot from other files. What I have NOT been able to do is import libraries such as numpy and cv2 (opencv-python). Is this possible? If so, please provide the syntax. If the syntax is within a small demo that would be of great help.
Thanks
Hello,
I contributed a writeup of how to do this, it's part of the FAQ: https://github.com/touilleMan/godot-python#faq It's the second question there.
Hopefully I've explained it well! Let me know.
Im on windows10 and none of the above ways worked for me. Ive tried to import the opencv packages using the command line method but the pip is always trying to reference the system wide python install and ignores the python.exe in the godot project. Ive tried also running the script that had the packages in list and called pip to install them all but the same happens. requirements are satisfied because the packages are installed system wide and not in the folder itself.
Try to git bash into the folder instead and reference python not from 'python -m ...' but from './python -m ...'. That will use the python.exe in the resource of Godot rather than on the system.