Ubuntu 14.04 + Mint 17.1 - Needs python-opencv package installed
13rac1 opened this issue · comments
The pip cv2 package doesn't contain a working opencv installation for Ubuntu 14.04 + Mint 17.1. Not sure about other OSs.
Installing the apt-get package makes this program run.
sudo apt-get install python-opencv
Thank you.
Will add this to the README
On Oct 12, 2015 8:46 PM, "Brad Erickson" notifications@github.com wrote:
The pip cv2 package doesn't contain a working opencv installation for
Ubuntu 14.04 + Mint 17.1. Not sure about other OSs.Installing the apt-get package makes this program run.
sudo apt-get install python-opencv
—
Reply to this email directly or view it on GitHub
#5.
I've run into the super common: https://bugs.launchpad.net/ubuntu/+source/cheese/+bug/1295247
I suggest recommending the above package, then if that doesn't work, compiling OpenCV from source: http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html I was able to get a far more detailed error message from OpenCV 3.0:
$ python slouchy.py
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
"sni-qt/24493" WARN 19:20:08.782 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream.: Bad file descriptor
Either way, this the same issue I've experienced before with an unsupported pixel format for my webcam. None of the different options for libv4l
fix the problem.
I'm not seeing this in the README. Why did you close it eosrei?
Also needs opencv-data installed for the /usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml file. Please re-open.
@eosrei Are you saying your camera works when run at 640x480? If so we may be able to force OpenCV to grab images at a specific resolution. Not sure though, I'd need to look at the docs. 640x480 is a high enough resolution for face detection.
@dgrant For the haarcascade issue I changed the config to use the local repo copy so everyone has a copy even if they're missing opencv-data. Please let me know if this resolves your issue. If not see if there's anything in issue #1. If not please open a new ticket :)