Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6376 Discussions

OpenCV 4.4.0 build of OpenVINO does not show image in python

gilmotta
Beginner
3,361 Views

Hello,

I just want to report that I can't display an object-identification with OpenCV 4.4.0 from OpenVINO.

when I call cv2.imshow(label, img) the script crashes with the following error message:

cv2.imshow("Image", img)
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-z5gfhs5a\opencv\modules\highgui\src\window.cpp:651: 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 'cvShowImage'

=======

Here is a dump of the OpenCV built with OpenVINO:

eneral configuration for OpenCV 4.4.0-openvino =====================================
Version control: 62eece0d7e67df1e79d9646f0870a90e56feca10

Platform:
Timestamp: 2020-06-29T23:51:02Z
Host: Windows 10.0.19041 AMD64
CMake: 3.14.5
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900

CPU/HW features:
Baseline: SSE SSE2 SSE3 SSSE3 SSE4_1 POPCNT SSE4_2
requested: SSE4_2
Dispatched code generation: FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
FP16 (1 files): + FP16 AVX
AVX (5 files): + AVX
AVX2 (31 files): + FP16 FMA3 AVX AVX2

C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /GS /sdl /guard:cf /w34018 /w34146 /w34244 /w34267 /w34302 /w34308 /w34509 /w34532 /w34533 /w34700 /w34789 /w34995 /w34996 /MP /MD /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /GS /sdl /guard:cf /w34018 /w34146 /w34244 /w34267 /w34302 /w34308 /w34509 /w34532 /w34533 /w34700 /w34789 /w34995 /w34996 /MP /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /GS /sdl /guard:cf /w34018 /w34146 /w34244 /w34267 /w34302 /w34308 /w34509 /w34532 /w34533 /w34700 /w34789 /w34995 /w34996 /MP /MD /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /GS /sdl /guard:cf /w34018 /w34146 /w34244 /w34267 /w34302 /w34308 /w34509 /w34532 /w34533 /w34700 /w34789 /w34995 /w34996 /MP /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /guard:cf /dynamicbase /INCREMENTAL:NO
Linker flags (Debug): /machine:x64 /guard:cf /dynamicbase /debug /INCREMENTAL
ccache: NO
Precompiled headers: NO
Extra dependencies:
3rdparty dependencies:

OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: java js python2
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

Windows RT support: NO

GUI:
Win32 UI: YES

Media I/O:
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 2.0.4-62)
PNG: build (ver 1.6.37)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
FFMPEG: YES (prebuilt binaries)
avcodec: YES (58.54.100)
avformat: YES (58.29.100)
avutil: YES (56.31.100)
swscale: YES (5.5.100)
avresample: YES (4.0.0)
DirectShow: YES
Media Foundation: YES
DXVA: YES
Intel Media SDK: YES (S:/msdk/win-2018R2/lib/x64/libmfx_vs2015.lib)

Parallel framework: Concurrency

Trace: YES (with Intel ITT)

Other third-party libraries:
Intel IPP: 2020.0.0 Gold [2020.0.0]
at: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/build_release/3rdparty/ippicv/ippicv_win/icv
Intel IPP IW: sources (2020.0.0)
at: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/build_release/3rdparty/ippicv/ippicv_win/iw
Inference Engine: YES (2020040000 / 2.1.0)
* libs: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/ie/inference_engine/lib/intel64/Release/inference_engine_legacy.lib / C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/ie/inference_engine/lib/intel64/Debug/inference_engine_legacyd.lib
* includes: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/ie/inference_engine/include
nGraph: YES (0.0.0+21e0921)
* libs: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/ie/ngraph/lib/ngraph.dll
* includes: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/ie/ngraph/include
Custom HAL: NO
Protobuf: build (3.5.1)

OpenCL: YES (NVD3D11)
Include path: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python 3:
Interpreter: C:/miniconda/envs/py3_env/python.exe (ver 3.4.5)
Libraries: C:/miniconda/envs/py3_env/libs/python34.lib (ver 3.4.5)
numpy: C:/miniconda/envs/py3_env/lib/site-packages/numpy/core/include (ver 1.11.3)
install path: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/build_release/install/python/python3

Python (for build): C:/miniconda/envs/py3_env/python.exe

Install to: C:/jenkins/workspace/OpenCV/OpenVINO/2020.4/build/windows/build_release/install
-----------------------------------------------------------------

-----------------------------------------------------------------

Does anyone have any ideas on how to fix this issue? if I have to rebuild the OpenCV can anyone give me the instructions?

I really appreciate your help.

Thanks,

Gil

0 Kudos
6 Replies
Iffa_Intel
Moderator
3,346 Views

Greetings,


May I know you are trying to run what model(eg: tensorflow yolov3, ONNX,etc) on which Openvino sample so that I could replicate?



Sincerely,

Iffa


0 Kudos
gilmotta
Beginner
3,333 Views

I am running tests with yolov3.

I am not using anaconda just pure Python. 

OpenVINO/2020.4

What else do you need you so you can help me? I am kind of stuck.

Do you need my project files?

Thanks,

Gil

0 Kudos
Woodrowl
Beginner
3,336 Views

Checkout versions of repos from first section of this issue. Assume both opencv and openvino are in $HOME
apt-get all prerequisites
Increase swap partition to 2048
Build OpenVino with following cmake config.

0 Kudos
gilmotta
Beginner
3,331 Views

I'm not on Ubuntu.

I am using Windows 10!

Thank you.

0 Kudos
Maksim_S_Intel
Employee
3,320 Views
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-z5gfhs5a\opencv\modules\highgui\src\window.cpp:651

This message does not come from OpenCV for OpenVINO. I suppose you have opencv-python-headless installed via pip somewhere. Make sure you have PYTHONPATH environment variable set up correctly, so that OpenCV from OpenVINO would be loaded first.

 

Iffa_Intel
Moderator
3,264 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
Reply