Godot python and opencv (and numpy and others) #369
Unanswered
TheBricktop
asked this question in
Q&A
Replies: 1 comment 1 reply
-
IIRC opencv output is just normal image files (from when I experimented a bit with it) so should be doable but conversion to imagetexture every time will definitely hurt your performance |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
im starting a discussion about various ways one can use opencv and numpy (and other image / ai libs) to control and generate content realtime in godot.
First thing probably would be setting up pip and installing opencv :
After some poking around ive managed to use pip via console in VScode,
i've set the interpreter directly to the one provided by godot-python module by copying and pasting the path.
then ive copied and pasted the path one more time to the terminal to access the provided python interpreter and ensure pip via
path/to/python.exe -m ensurepip
and then installed the opencv and other packages by
path/to/python.exe -m pip install packagename
now ive managed to start the video capture and the webcam has lit so thats somethin'.
But the next step is kinda not so clear for me: how to convert the output of opencv to godot image?
is it possible to do it in a performant way (like realtime ?)
im referrig this thread
its kinda needed for me to make some arvr expirements.
Beta Was this translation helpful? Give feedback.
All reactions