OpenCV under Ubuntu 18.04

Create issue
Issue #99 new
Former user created an issue

Dear Itom Developers I'd like to start by saying that I really like the development environment. I've been developing Python scripts with Itom for three years now (previously on Windows) and have always been very satisfied.

Now I have built Itom under Ubuntu 18.04. Unfortunately Itom doesn't work under Ubuntu if I want to use OpenCV in my scripts. I use the following versions:

Ubuntu 18.04 Itom 3.2.1 Python 3.6.8 OpenCV 3.2.0

More precisely, whenever I run cv2.waitKey(...) the whole script is blocked and I have to kill the Itom process. I tested several OpenCV versions and built Itom several times, but the problem was not fixed.

Do you know what the reason is? How could this be fixed?

Comments (1)

  1. M. Gronle

    Unfortunately, I don’t have a final answer for your question. However I have some ideas:

    I never tried the GUI functionalities of OpenCV together with itom. Neither under Windows (which is used by most of the itom developers and probably users) nor under Linux. Usually we recommend using the built-in plot and GUI functionalities of itom itself to visualize images, show dialogs, input messages, create individual user interfaces or even wait for a key press in the command line. As far as I know, OpenCV uses the GUI framework Qt for visualizing images in its own GUIs. itom is also using Qt. At first glance, this looks like a fantastic combination. However Qt has one major issue: It is usually not allowed to open a GUI from another thread than the main thread. However the threading concept behind itom is to run all Python scripts in a secondary thread, such that calling a native GUI method from OpenCV might cause undesired behaviours (and it can also be that this behaviour is different between Windows and Linux). All the built-in GUI functionalities of itom, which can be triggered by Python, are programmed in a way, such that the GUI calls itself are executed from the main thread of itom, the one which has started the original Qt GUI application.

    Are you forced to use methods from the highgui module of OpenCV or would it also possible for you to display images (or similar) using itom plots?



  2. Log in to comment