-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GUI support (Qt) #17
Comments
On which OS you get this error? The error appears because OpenCV provided by this repo has not been built with GTK support (it can be enabled, but it requires work at least on Linux due to the Cent OS 5 containers). |
Ubuntu 16.04 |
Just to be more specific, I've encountered this problem when using |
The error says: "Rebuild the library with Windows, GTK+ 2.x or Carbon support.". OpenCV needs to be compiled with GTK support ( |
it would be very convenient for us to get this working, is there anything I can do to help? |
You can fork the repo and try to tune the build scripts. First you should try to install GTK+ 2.x to the CentOS container ( |
Hi. Any progress on this? |
I haven't had time to look at this. |
This still needs to be fixed badly. Any progress on this critical issue? OpenCV is rather useless for computer vision if you can't use it to efficiently display output. |
I have an idea how this could be implemented. However, introducing a new dependency (GTK) without breaking the library import on every system is not an easy task. After all, there are hundreds of GNU/Linux distributions which don't necessarily have GTK binaries easily available (including the Cent OS 5 containers where the packages are built). Implementing this will take time and surely you know that I'm doing this for free on my limited free time. Additionally, I don't think that OpenCV is useless without GUI features. It was never meant to be a comprehensive GUI framework. It might be good for showing images for debugging purposes, but there are many better ways to draw the images on the screen if needed. Here are few suggestions:
And you can always build OpenCV from sources. |
I suggest we consider to publish an OpenCV python module with Gtk/Qt support. Today I spent serval hours on building OpenCV from scratch in order to use If add new dependency is a problem, how about publishing a new module with Gtk/Qt support, like opencv-python-gtk and opencv-python-qt ? |
I second having two additional modules for gtk and qt. I found that qt was easier to get working than gtk, but I'm on Ubuntu, so it wasn't super difficult. I don't think Cent OS 5 has either GTK+ 2.x (which is what imshow requires) or Qt by default, so that might not work for skvark. @skvark - I've tried using those libraries for my purposes, however sometimes that requires rewriting large portions of code that already should work with OpenCV to instead work with another image display library. Another problem is performance, OpenCV displays images fast, which is definitely important for demo-ing a live feed from a tracking network (for example). |
I'll try to compile the packages with GTK to avoid separate packages. I hope that auditwheel / delocate can handle the dependencies automatically and embed them to the wheels. For this to work I have to fork the manylinux CentOS 5 containers and build GTK support to them manually since the default GTK provided in the EL5 repos is too old (2.10 and OpenCV needs at least 2.18). This should be easy with Docker. For macOS I'll have to go with homebrew and hope that the build times don't get too long. |
I have been testing different build setups during the last two weeks. Building newer version of GTK was too complicated so instead of GTK I built Qt 4.8.7 manually on the manylinux containers. These new customized containers seem to be working fine and the Linux wheels should have GUI support in the upcoming releases. I'll see if I can enable Qt on macOS builds too. EDIT: Looks like I can build with Qt 4.8.7 also on macOS (Qt was preinstalled on the Travis macOS images). |
The release builds for 3.3.0.10 are now in progress and the GUI supported wheels should be available to install during the next couple of hours. Please report if you have any issues with them. |
Hi, I did run into an issue with headless (docker) versions of ubuntu. #44 I think anyone running opencv-python in a cloud environment without X11 is going to have the same issue. |
Get exact a same error, any idea on the a best way to fix this? |
Should I be using a different IDE to avoid this error? I'm currently using Xcode 9. |
Could you elabolarate a bit more what it is excatly you're trying to do? This issue has been closed over a year ago. All recent |
pip install opencv-python fixed this issue for me |
It's because of 'opencv-python-headless'. Uninstall it! |
This one work for me on facefusion installation
|
uninstall opencv-python-headless doesn't work in my linux server |
Hi, I am having trouble with the library, I installed it and tried to use it on:
https://github.com/gliese581gg/YOLO_tensorflow
But the error I get when trying to run it is:
The text was updated successfully, but these errors were encountered: