I had installed OpenCV following these steps (). After trying to compile one examples,i got this error :
OpenCV Error: Unspecified error (The function is no
I have had to deal with this issue a couple of times, this is what has worked consistently thus far:
conda remove opencv
conda install -c menpo opencv
pip install --upgrade pip
pip install opencv-contrib-python
I tried several of the answers mentioned above the one that worked for me in ubuntu is mentioned in the following steps:
conda remove opencv
.conda install python=3.5
.conda install -c menpo opencv3
@oxydron/Elliott Miller: I have Ubuntu 16.04 LTS environment with gtk 3 pre installed. I got the same error for Caffe build (master branch), Try the following steps, may be it should work for you.
sudo apt-get install libgtk-3-dev
cmake .. (WITH_GTK=ON and other settings),
make
And bingo the error was gone... in my python caffe code
Please note:
The CMAKE configuration should reflect GTK+ 3.x instead of GTK+ 2.x
GUI:
-- QT: NO
-- GTK+ 3.x: YES (ver 3.18.9)
-- GThread : YES (ver 2.48.2)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
I had the same problem, and fixed it by simply reinstalling opencv.
There is no need to uninstall it first.
I have the solved using Anaconda 3 installing on Ubuntu 16.04.
I have used pycharm editor for my python code.
I am using python 3.6 version.
I solved the issue using these processes.
IDEA: we need to install the package opencv-contrib-python package from the pycharm.
For me (Arch Linux, Anaconda with Python 3.6), installing from the suggested channels menpo
or loopbio
did not change anything. My solution was to
sudo pacman -Syu pkg-config
),conda remove opencv
) andconda install -c conda-forge opencv
)conda list
now returns opencv 3.3.0 py36_blas_openblas_203 [blas_openblas] conda-forge
and all windows launched using cv2 are working fine.