Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
747 Views

OpenCV 4.4.0 build of OpenVINO destroyAllWindows crashes

I am having running some python code under OpenVINO some of the OpenCV APIs are crashing.

the following API crashed cv2.destroyAllWindows()

I got the following error message:

Traceback (most recent call last):
File "C:\Python_venv\yolo\yolo_object_detection.py", line 115, in <module>
cv2.destroyAllWindows()
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-z5gfhs5a\opencv\modules\highgui\src\window.cpp:645:
error: (-2:Unspecified error)
The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support.
If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure
script in function 'cvDestroyAllWindows'

I'm certain that I initialized the OpenVINO vars by calling setupvars.bat every time I open the console.

Does anyone have any idea how to fix this problem? If I have to rebuild OpenCV, can anyone provide the instructions as I am new to OpenVINO and still figuring things out.

Thank you in advance.

0 Kudos
4 Replies
Highlighted
Moderator
737 Views

Greetings,

 

I'm using Anaconda myself with opencv 4.4.0 Openvino and it is validated to works fine.

Please help to ensure that you had set it up properly.

I recommend you to ensure the pre-requisite in your system first:

  1. Microsoft Visual Studio* with C++ 2019 or 2017 with MSBuild ( I recommend 2019)
  2. CMake 2.8.12 or higher 64-bit (ensure that this added to your system's path)
  3. Python 3.5 - 3.7 64-bit ( I recommend 3.6)
  4. Intel® Distribution of OpenVINO™ toolkit core components (2021.1 is the latest)

After you already done that, you can proceed to next steps.

create a virtual env : conda create --name

conda activate

(then proceed the next steps of installation here, as in official Openvino documentation provided below)

conda cheat sheet: https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-chea...

This is Openvino official documentation that shows step by step installation process:https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_windows.htm...

 

Sincerely,

Iffa

0 Kudos
Highlighted
Beginner
731 Views

I'm not using Conda. The OpenVINO installation guide, guided me to install Python 3.7. and that is what I have been using.

I can share my code with you, nothing proprietary yet.

I trained my model using yolov3 on Google Colab and now trying to use OpenVINO environment to detect the obj.

Please let me know how you can help maybe a Zoom or Webex session and I can also show to you.

Thanks,

Gil

0 Kudos
Highlighted
Moderator
720 Views

Greetings,


Any Python version between Python 3.6 - 3.8 64-bit should do it.


Please note that you need to convert your model to IR first before you able to use it with Openvino.

This is the official documentation on how to do it: https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_tf_specific_...


And also a step by step tutorial's video on how to convert and use the IR with Openvino:

  1. https://www.youtube.com/watch?v=FaqVhvJ6-Uc


Note: You can do this with or without Anaconda as long as you have a compatible Python version and other pre-requisite as stated in https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_windows.htm...


Sincerely,

Iffa


0 Kudos
Highlighted
Moderator
615 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question


Sincerely,

Iffa


0 Kudos