Skip to content
Advertisement

OpenCV v1/v2 error: the function is not implemented

I’m trying to get OpenCV working with Python on my Ubuntu machine. I’ve downloaded and installed OpenCV, but when I attempt to run the following python code (which should capture images from a webcam and push them to the screen)

JavaScript

I get the following error:

JavaScript

So I do what they ask: install the packages, move to the folder from whence I installed OpenCV, and run

JavaScript

But when I try to run the python, it gives me the same error. Am I missing something?

Advertisement

Answer

If it’s giving you errors with gtk, try qt.

JavaScript

If this doesn’t work, there’s an easy way out.

JavaScript

This will download all the required dependencies(although it seems that you have all the required libraries installed, but still you could try it once). This will probably install OpenCV 2.3.1 (Ubuntu 12.04). But since you have OpenCV 2.4.3 in /usr/local/lib include this path in /etc/ld.so.conf and do ldconfig. So now whenever you use OpenCV, you’d use the latest version. This is not the best way to do it but if you’re still having problems with qt or gtk, try this once. This should work.

Update – 18th Jun 2019

I got this error on my Ubuntu(18.04.1 LTS) system for openCV 3.4.2, as the method call to cv2.imshow was failing (e.g., at the line of cv2.namedWindow(name) with error: cv2.error: OpenCV(3.4.2). The function is not implemented.). I am using anaconda. Just the below 2 steps helped me resolve:

JavaScript

If you are using pip, you can try

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement