Trying to recognize real-time objects using a webcam I will leave the stumbled part as a reminder. If you have a problem similar to yourself, please refer to it.
** ■ Referenced site ** I was working based on the following site, but an error occurred in the OpenCV part.
Referenced site: @ karaage0703 "Object Detection Tools, which makes it super easy to detect objects with TensorFlow, is now compatible with TensorFlow 2.x."
** ■ Error details ** <Situation 1> When I ran the object recognition sample program in ObjectDetectonTools with python, I got a runtime error with cv2.waitKey (0) of openCv saying "OpenCV is not installed".
I should have installed OpenCV, but for some reason I was getting an error saying that it was not installed.
<Situation 2> Try it with python I don't get an import error when I type "import cv2", When I hit cv2.waitKey (0) to execute it, an error occurred.
At that time, I had no idea what was happening.
** ■ Execution environment ** OS : Ubuntu 18.04.5 LTS python: python3 Use anaconda
** ■ Cause ** I don't know the exact cause, The root cause is libraries such as openCv installed with pip and anaconda. It seems that it was messed up. As a result, when I ran python3 (anaconda environment), it seems that I could not find the reference destination of openCv that I should have installed.
** ■ Solution ** ・ Delete anaconda I deleted anaconda and unified it with pip. After that, when I installed opencv etc. again, the same result as the reference site was obtained.
Recommended Posts