import cv2
img = cv2.imread('316.jpg', 1)
cv2.imshow('img', img)
That's it, the minimal complete program. All the examples I've seen on the net don't do anything before doing the imshow. On running it, I get ...
(py_env_lib) neil@i5 ~/Documents/slides $ python equalise.py
QObject::moveToThread: Current thread (0x17ecab0) is not the object's thread (0x1927630).
Cannot move to target thread (0x17ecab0)
Segmentation fault
If I comment out the cv2.imshow line, openCV works. I can even go on to do complicated processing, and write the image out to a new file.
I'm using Linux Mint 18 MATE 64 bit, with a 4.4.0-146-generic kernel, on a quad core i5, with python 3.5.2 installed in a virtual environment, with openCV 3.3.0.
How do I start trying to debug a seg fault?
It's a fairly 'clean' linux system, because I'm timid, and still don't really know what I'm doing after coming to Mint from XP, everything has been downloaded using the standard package manager. However there are some oddities, like I use KCalc rather than the buggy Gnome version that comes with Mint, and I was surprised how many dependencies came down with that, which could conceivably have messed up something under the hood.