I installed opencv on my Ubuntu 14.04 system system with
pip install python-opencv
my Python version is 2.7.14
import cv2
cv2.__version__
tells me that I have the OpenCV version 3.4.0.
After that I wanted to follow the tutorial on the OpenCV website
import numpy as np
import cv2 as cv
img = cv.imread('messi5.jpg',0)
print img
It works fine until this point, but then I am supposed to enter
cv.imshow('image',img)
and I get the following error:
QObject::moveToThread: Current thread (0x233cdb0) is not the object's thread (0x2458430).
Cannot move to target thread (0x233cdb0)
QObject::moveToThread: Current thread (0x233cdb0) is not the object's thread (0x2458430).
Cannot move to target thread (0x233cdb0)
QPixmap: Must construct a QApplication before a QPaintDevice
Does anyone know what the problem is?
from matplotlib import pyplot as plt.