Skip to content
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

Wot no gtk #35

Open
adrianmay opened this issue Apr 27, 2020 · 1 comment
Open

Wot no gtk #35

adrianmay opened this issue Apr 27, 2020 · 1 comment

Comments

@adrianmay
Copy link

Attempting to run camodet_python I get:

OpenCv version: 4.1.1
Video Height 1944 Width 2592
Traceback (most recent call last):
  File "/app.py", line 300, in <module>
    main()
  File "/app.py", line 292, in main
    if( (cv2.waitKey(1) & 0xFF) == ord('q') ):
cv2.error: OpenCV(4.1.1) /opencv-4.1.1/modules/highgui/src/window.cpp:693: 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 'cvWaitKey'

Taking the suggestion of installing libgtk2.0-dev and pkg-config before the cmake fixes it. The waitKey still doesn't actually work, and I don't really need it, but this doesn't seem like a bad additiion to your image anyway.

@maxirmx
Copy link

maxirmx commented Mar 11, 2021

I believe that waitKey does not work because the application that runs within container does not have an X terminal attached.
This sample shows how to make it work:
https://github.com/maxirmx/docker-python3-opencv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants