loicmarie / sign-language-alphabet-recognizer

Simple sign language alphabet recognizer using Python, openCV and tensorflow for training Inception model (CNN classifier).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cvWaitKey not Supported on Mac (classify_webcam.py)

DennisFaucher opened this issue · comments

Traceback (most recent call last):
File "classify_webcam.py", line 68, in
a = cv2.waitKey(1) # waits to see if esc is pressed
cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:654: error: (-2) 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 cvWaitKey

Going to try "brew install opencv3 --with-python" to fix

[Edit: "brew install opencv3" did not solve the issue, but also running "pip3 uninstall opencv-python; pip3 install opencv-python" did solve the problem]

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()