Closed rickstaa closed 3 years ago
cv2.imshow("ir", ir.asarray() / 65535.)
cv2.error: OpenCV(3.4.2) /tmp/build/80754af9/opencv-suite_1535558553474/work/modules/highgui/src/window.cpp:632: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon 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'
Looks like you are using a headless
version of this package. If you tried to install it multiple times via different tools, it's also possible you have a mess of files from different packages in your Python installation so you'll need to recreate your environment from scratch.
conda install opencv
That package is not related to this project. See https://github.com/skvark/opencv-python#installation-and-usage for a complete list of what this project supplies.
Also note that this project is only tested against vanilla CPython. If the problem doesn't reproduce there, it's most probably Anaconda's problem.
@native-api Thanks for your response. This was indeed a problem with the opencv-contrib-pyton
and opencv-python
packages:
pip install opencv-python
pip install opencv-contrib-python
Like you stated above when creating a fresh conda environment and installing OpenCV directly using conda install -c conda-forge opencv
both the error and the icon problem disappeared.
I am also having the same issue. I have recreated my environment from scratch but it doesn't seem to help. Also I am not using conda but pip, and I do not think that the opencv-python
is headless. According to the documentation as the headless version is indicated the opencv-python-headless
.
@TheodoreT Thanks for your message. For me, the only solution that help was to switch to the conda package. I However opened the topic so that @native-api or any of the other maintainers can look into your question.
@TheodoreT As the conda OpenCV
package contains a number of additional python packages you can also try to install them individually to see which package you are missing. The following packages are contained in the conda opencv
package:
package | build
---------------------------|-----------------
bzip2-1.0.8 | h7b6447c_0 78 KB
ca-certificates-2019.10.16 | 0 131 KB
mkl-service-2.3.0 | py37he904b0f_0 218 KB
mkl_fft-1.0.14 | py37ha843d7b_0 155 KB
mkl_random-1.1.0 | py37hd6b4f25_0 321 KB
numpy-1.17.2 | py37haad9e8e_0 4 KB
numpy-base-1.17.2 | py37hde5b4d6_0 4.2 MB
opencv-3.4.2 | py37h6fd60c2_1 11 KB
pip-19.3.1 | py37_0 1.9 MB
py-opencv-3.4.2 | py37hb342d67_1 1.0 MB
python-3.7.4 | h265db76_1 32.1 MB
------------------------------------------------------------
Total: 40.1 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
blas pkgs/main/linux-64::blas-1.0-mkl
bzip2 pkgs/main/linux-64::bzip2-1.0.8-h7b6447c_0
ca-certificates pkgs/main/linux-64::ca-certificates-2019.10.16-0
cairo pkgs/main/linux-64::cairo-1.14.12-h8948797_3
certifi pkgs/main/linux-64::certifi-2019.9.11-py37_0
ffmpeg pkgs/main/linux-64::ffmpeg-4.0-hcdf2ecd_0
fontconfig pkgs/main/linux-64::fontconfig-2.13.0-h9420a91_0
freeglut pkgs/main/linux-64::freeglut-3.0.0-hf484d3e_5
freetype pkgs/main/linux-64::freetype-2.9.1-h8a8886c_1
glib pkgs/main/linux-64::glib-2.56.2-hd408876_0
graphite2 pkgs/main/linux-64::graphite2-1.3.13-h23475e2_0
harfbuzz pkgs/main/linux-64::harfbuzz-1.8.8-hffaf4a1_0
hdf5 pkgs/main/linux-64::hdf5-1.10.2-hba1933b_1
icu pkgs/main/linux-64::icu-58.2-h9c2bf20_1
intel-openmp pkgs/main/linux-64::intel-openmp-2019.4-243
jasper pkgs/main/linux-64::jasper-2.0.14-h07fcdf6_1
jpeg pkgs/main/linux-64::jpeg-9b-h024ee3a_2
libedit pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
libffi pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libgfortran-ng pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0
libglu pkgs/main/linux-64::libglu-9.0.0-hf484d3e_1
libopencv pkgs/main/linux-64::libopencv-3.4.2-hb342d67_1
libopus pkgs/main/linux-64::libopus-1.3-h7b6447c_0
libpng pkgs/main/linux-64::libpng-1.6.37-hbc83047_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
libtiff pkgs/main/linux-64::libtiff-4.0.10-h2733197_2
libuuid pkgs/main/linux-64::libuuid-1.0.3-h1bed415_2
libvpx pkgs/main/linux-64::libvpx-1.7.0-h439df22_0
libxcb pkgs/main/linux-64::libxcb-1.13-h1bed415_1
libxml2 pkgs/main/linux-64::libxml2-2.9.9-hea5a465_1
mkl pkgs/main/linux-64::mkl-2019.4-243
mkl-service pkgs/main/linux-64::mkl-service-2.3.0-py37he904b0f_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.0.14-py37ha843d7b_0
mkl_random pkgs/main/linux-64::mkl_random-1.1.0-py37hd6b4f25_0
ncurses pkgs/main/linux-64::ncurses-6.1-he6710b0_1
numpy pkgs/main/linux-64::numpy-1.17.2-py37haad9e8e_0
numpy-base pkgs/main/linux-64::numpy-base-1.17.2-py37hde5b4d6_0
opencv pkgs/main/linux-64::opencv-3.4.2-py37h6fd60c2_1
openssl pkgs/main/linux-64::openssl-1.1.1d-h7b6447c_3
pcre pkgs/main/linux-64::pcre-8.43-he6710b0_0
pip pkgs/main/linux-64::pip-19.3.1-py37_0
pixman pkgs/main/linux-64::pixman-0.38.0-h7b6447c_0
py-opencv pkgs/main/linux-64::py-opencv-3.4.2-py37hb342d67_1
python pkgs/main/linux-64::python-3.7.4-h265db76_1
readline pkgs/main/linux-64::readline-7.0-h7b6447c_5
setuptools pkgs/main/linux-64::setuptools-41.4.0-py37_0
six pkgs/main/linux-64::six-1.12.0-py37_0
sqlite pkgs/main/linux-64::sqlite-3.30.0-h7b6447c_0
tk pkgs/main/linux-64::tk-8.6.8-hbc83047_0
wheel pkgs/main/linux-64::wheel-0.33.6-py37_0
xz pkgs/main/linux-64::xz-5.2.4-h14c3975_4
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
zstd pkgs/main/linux-64::zstd-1.3.7-h0b5b093_0
@rickstaa thanks for the pkgs list. However, it does not seem that any of the other packages has to do anything with the icons. I would argue that the issue is related with the opencv pkg itself. Most likely the conda version and this one are kind of different created, or I do not know I might actually be wrong here.
The conda package is this one https://github.com/conda-forge/opencv-feedstock which means if you run something like conda install libopencv opencv py-opencv
you are not using this package.
The package provided by this repository can be installed with pip install opencv-python
. Please note it's very important that you did run only that command, nothing else. If you installed OpenCV Python bindings from multiple providers then we can't be sure which package you are using.
Please post the output of cv2.getBuildInformation()
so we can see exact info about the package.
Also, do not do this:
pip install opencv-python pip install opencv-contrib-python
This will break your environment as explained in the readme. Install only one of the packages. opencv-python
includes only OpenCV stable main modules. opencv-contrib-python
includes both OpenCV main modules and the extra contrib modules. If you need extra modules, install only opencv-contrib-python
.
@skvark I was aware of the need to have only one of the available modules installed as well as not having both commands run for installing the cv2 module. Thus I have only installed the opencv-contrib-python
module. I have tried it in another computer and I am facing the same problem. In any case please find below the output of the command that you have asked hopefully this helps:
General configuration for OpenCV 4.1.1 =====================================
Version control: 4.1.1
Extra modules:
Location (extra): /io/opencv_contrib/modules
Version control (extra): 4.1.1
Platform:
Timestamp: 2019-09-02T15:48:01Z
Host: Linux 4.15.0-1028-gcp x86_64
CMake: 3.9.0
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/gmake
Configuration: Release
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (13 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (27 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: NO
C++ Compiler: /usr/lib/ccache/compilers/c++ (ver 4.8.2)
C++ flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/lib/ccache/compilers/cc
C flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release): -L/root/ffmpeg_build/lib -Wl,--gc-sections
Linker flags (Debug): -L/root/ffmpeg_build/lib -Wl,--gc-sections
ccache: YES
Precompiled headers: NO
Extra dependencies: ade /opt/Qt4.8.7/lib/libQtGui.so /opt/Qt4.8.7/lib/libQtTest.so /opt/Qt4.8.7/lib/libQtCore.so /lib64/libz.so dl m pthread rt
3rdparty dependencies: ittnotify libprotobuf libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc
OpenCV modules:
To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
Disabled: world
Disabled by dependency: -
Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java js matlab ovis python2 sfm ts viz
Applications: -
Documentation: NO
Non-free algorithms: NO
GUI:
QT: YES (ver 4.8.7 EDITION = OpenSource)
QT OpenGL support: NO
GTK+: NO
VTK support: NO
Media I/O:
ZLib: /lib64/libz.so (ver 1.2.3)
JPEG: libjpeg-turbo (ver 2.0.2-62)
WEBP: build (ver encoder: 0x020e)
PNG: build (ver 1.6.37)
TIFF: build (ver 42 - 4.0.10)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 2.3.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: NO
FFMPEG: YES
avcodec: YES (58.55.100)
avformat: YES (58.31.101)
avutil: YES (56.33.100)
swscale: YES (5.6.100)
avresample: NO
GStreamer: NO
v4l/v4l2: YES (linux/videodev2.h)
Parallel framework: pthreads
Trace: YES (with Intel ITT)
Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)
OpenCL: YES (no extra features)
Include path: /io/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python 3:
Interpreter: /opt/python/cp37-cp37m/bin/python (ver 3.7.4)
Libraries: libpython3.7m.a (ver 3.7.4)
numpy: /opt/python/cp37-cp37m/lib/python3.7/site-packages/numpy/core/include (ver 1.14.5)
install path: python
Python (for build): /opt/python/cp37-cp37m/bin/python
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Install to: /io/_skbuild/linux-x86_64-3.7/cmake-install
-----------------------------------------------------------------
as I see it depends on the Qt4.8 package, is this dynamically or statically linked? Because my Qt4 installation is not in the /opt
folder.
It's dynamically linked. However, opencv-python
does not use your global system Qt. The packages ship with their own Qt. The manylinux wheel packages are crafted with a special auditwheel
tool: https://github.com/pypa/auditwheel
If you have a look at the installation folder you should see something like this inside the .libs folder under cv2:
~/.local/lib/python3.6/site-packages/cv2:
drwxrwxr-x 5 skvark skvark 4096 Jun 17 19:32 .
drwx------ 7 skvark skvark 4096 Jul 4 09:50 ..
-rwxrwxr-x 1 skvark skvark 28481592 Jul 4 09:49 cv2.cpython-36m-x86_64-linux-gnu.so
drwxrwxr-x 3 skvark skvark 4096 Jun 17 19:32 data
-rw-rw-r-- 1 skvark skvark 233 Jul 4 09:49 __init__.py
drwxrwxr-x 2 skvark skvark 4096 Jul 4 09:50 .libs
-rw-rw-r-- 1 skvark skvark 30910 Jul 4 09:49 LICENSE-3RD-PARTY.txt
-rw-rw-r-- 1 skvark skvark 1097 Jul 4 09:49 LICENSE.txt
drwxrwxr-x 2 skvark skvark 4096 Jun 17 19:32 __pycache__
~/.local/lib/python3.6/site-packages/cv2/.libs:
libavcodec-874f3d51.so.58.47.106 libQtCore-3dbacd8a.so.4.8.7 libswresample-a49c020a.so.3.4.100 libz-a147dcb0.so.1.2.3
libavformat-fb41c63f.so.58.26.101 libQtGui-6d0f14dd.so.4.8.7 libswscale-4e6f4703.so.5.4.100
libavutil-473e9eb1.so.56.26.100 libQtTest-1183da5d.so.4.8.7 libvpx-8459aeef.so.6.0.0
I did some digging and it seems that OpenCV has its own icon set: https://github.com/opencv/opencv/tree/master/modules/highgui/src/files_Qt https://github.com/opencv/opencv/blob/master/modules/highgui/src/window_QT.qrc
This is the most likely reason why the icons are not appearing. You could try to add the icons manually to the cv2 folder (I have no idea will that work).
Due to the license of the icons (https://github.com/opencv/opencv/tree/master/modules/highgui/src/files_Qt/Milky) I'm not sure if I can redistribute them within opencv-python
.
@skvark it shouldn't be a problem redistributing the icons (considering that the conda package for example redistributes them). In any case if you want to be sure you could ask the guys at the opencv project.
On a clean MacOS Catalina withous macports od homebrew I have created a virtual environment and installed numpy
, opencv
, and QT5
pip install numpy
pip install opencv-python
pip install pyqt5
And then ran the following program
import cv2
img = cv2.imread("m.png")
cv2.imshow("Mountains", img)
cv2.waitKey(0)
cv2.destroyAllWindows()
I had an error
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I removed opencv-python
and verified that PyQt5
was working properly.
Finally, i removed opencv-python
and installed opencv-python-headless
instead, allong with PyQt5
. This time it worked well.
Is this the expected behavior? I found the package list and the installation order in a tutorial on OpenCV with Python on MacOS. The tutorial did not mention installation conflicts.
I found that if I do not install PyQt5
and install opencv-python
in isolation, I have the same error.
opencv-python
ships with its own Qt5 which is why you are seeing the error. opencv-python-headless
does not ship with Qt5 but it's compiled against cocoa (which cannot be turned off) which means that opencv-python-headless
is able to use imshow
on macOS while the Windows and Linux wheels are not able to do that (macOS isn't usually used in server environments...). The qt.qpa.plugin
issue is related to latest opencv-python
version and is tracked here: https://github.com/skvark/opencv-python/issues/290
There are no conflicts with pyqt5
.
Thank you very much. I actually do not care about Qt at this stage of my experimentation. I am trying to port and actualize something I did in C++ in 2018, which needs nothing more than imshow. This means that with opencv-python-headless
I am all set and happily going forward.
Thank you for making me understand.
Had the same issue and solved it by installing & removing opencv-contrib-python
.
pip install --user opencv-contrib-python
pip uninstall opencv-contrib-python
FYI, I'm on Fedora 31.
@skvark I was aware of the need to have only one of the available modules installed as well as not having both commands run for installing the cv2 module. Thus I have only installed the
opencv-contrib-python
module. I have tried it in another computer and I am facing the same problem. In any case please find below the output of the command that you have asked hopefully this helps:General configuration for OpenCV 4.1.1 ===================================== Version control: 4.1.1 Extra modules: Location (extra): /io/opencv_contrib/modules Version control (extra): 4.1.1 Platform: Timestamp: 2019-09-02T15:48:01Z Host: Linux 4.15.0-1028-gcp x86_64 CMake: 3.9.0 CMake generator: Unix Makefiles CMake build tool: /usr/bin/gmake Configuration: Release CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX SSE4_1 (13 files): + SSSE3 SSE4_1 SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (27 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: NO C++ Compiler: /usr/lib/ccache/compilers/c++ (ver 4.8.2) C++ flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG C++ flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: /usr/lib/ccache/compilers/cc C flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG C flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release): -L/root/ffmpeg_build/lib -Wl,--gc-sections Linker flags (Debug): -L/root/ffmpeg_build/lib -Wl,--gc-sections ccache: YES Precompiled headers: NO Extra dependencies: ade /opt/Qt4.8.7/lib/libQtGui.so /opt/Qt4.8.7/lib/libQtTest.so /opt/Qt4.8.7/lib/libQtCore.so /lib64/libz.so dl m pthread rt 3rdparty dependencies: ittnotify libprotobuf libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc OpenCV modules: To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto Disabled: world Disabled by dependency: - Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java js matlab ovis python2 sfm ts viz Applications: - Documentation: NO Non-free algorithms: NO GUI: QT: YES (ver 4.8.7 EDITION = OpenSource) QT OpenGL support: NO GTK+: NO VTK support: NO Media I/O: ZLib: /lib64/libz.so (ver 1.2.3) JPEG: libjpeg-turbo (ver 2.0.2-62) WEBP: build (ver encoder: 0x020e) PNG: build (ver 1.6.37) TIFF: build (ver 42 - 4.0.10) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 2.3.0) HDR: YES SUNRASTER: YES PXM: YES PFM: YES Video I/O: DC1394: NO FFMPEG: YES avcodec: YES (58.55.100) avformat: YES (58.31.101) avutil: YES (56.33.100) swscale: YES (5.6.100) avresample: NO GStreamer: NO v4l/v4l2: YES (linux/videodev2.h) Parallel framework: pthreads Trace: YES (with Intel ITT) Other third-party libraries: Lapack: NO Eigen: NO Custom HAL: NO Protobuf: build (3.5.1) OpenCL: YES (no extra features) Include path: /io/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 3: Interpreter: /opt/python/cp37-cp37m/bin/python (ver 3.7.4) Libraries: libpython3.7m.a (ver 3.7.4) numpy: /opt/python/cp37-cp37m/lib/python3.7/site-packages/numpy/core/include (ver 1.14.5) install path: python Python (for build): /opt/python/cp37-cp37m/bin/python Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Install to: /io/_skbuild/linux-x86_64-3.7/cmake-install -----------------------------------------------------------------
as I see it depends on the Qt4.8 package, is this dynamically or statically linked? Because my Qt4 installation is not in the
/opt
folder.
I also built opencv to static library (Windows+VS2019) and I have same problem.
Why this bug is closed, if it is still happenning?
@jcbritobr This issue was closed since it is not a problem with the opencv-python
package but is the result of how a user sets up the python environment and installs the required packages. The comments above, especially https://github.com/opencv/opencv-python/issues/213#issuecomment-545088716 explain how to solve the icons missing problem.
This is not a bug. Shipping the icons along the packages would be a license violation and cannot be done. OpenCV team is looking for an alternative icon set that does not have such a restrictive license. Please follow the issue here: https://github.com/opencv/opencv-python/issues/585
@jcbritobr This issue was closed since it is not a problem with the
opencv-python
package but is the result of how a user sets up the python environment and installs the required packages. The comments above, especially #213 (comment) explain how to solve the icons missing problem.
I did a fresh installation that way
julio@jcbritobr:~/Workspace/python$ mkdir test_issue
julio@jcbritobr:~/Workspace/python$ cd test_issue/
julio@jcbritobr:~/Workspace/python/test_issue$ python3 -m venv test_issue
julio@jcbritobr:~/Workspace/python/test_issue$ . test_issue/bin/activate
(test_issue) julio@jcbritobr:~/Workspace/python/test_issue$ pip install opencv-python
Collecting opencv-python
Using cached opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.4 MB)
Collecting numpy>=1.17.3; python_version >= "3.8"
Using cached numpy-1.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.22.0 opencv-python-4.5.5.62
(test_issue) julio@jcbritobr:~/Workspace/python/test_issue$ code .
Its happening yet even only installing that way you show in #213
This is not a bug. Shipping the icons along the packages would be a license violation and cannot be done. OpenCV team is looking for an alternative icon set that does not have such a restrictive license. Please follow the issue here: #585
Understood. Thank you. I think change the iconset for a mit or bsd license should solve this issue.
I met the similar issue and answered here. Basically it is all related to Qt and its enablity with Opencv
Any workaround to show the icons while waiting for a fix?
System information
OS: Ubutun 16.04 Container: Yes created with singularity 3.2.1 Pylibfreenect2 installation: Installed with pip Python version: 3.7 Virtual environment: Conda Enviroment
Problem description
When running the pylibfreenect
multiframe_listener.py
example thecv2.imshow
window doesn't show icons. I also raised an issue on the repository of the pylibfreenect package but as I am not sure if the problem has to do with a missing pylibfreenect or opencv dependency I also opened a topic here.Expected
Current
Troubleshooting steps
I am currently looking at whether a system icon package is missing and whether this is a bug related to opencv.
What I already tried
Installing opencv from different channels:
pip install opencv
conda install opencv
conda install opencv-python
Installing GTK and VTK as explained in this topic.