Installing OpenCV 3.1.0 on Ubuntu

Itseez has finally released the first stable version of OpenCV in the 3.x series. It promises many new features over the 2.x version and many bug fixes over version 3.0. So if you want to install this new version, whether you  already have an older version installed or you just want to install it on a fresh GNU/Linux machine…you have come to the right place!

Removing  older versions of OpenCV

There are 2 methods of removing your old installation of OpenCV, and they depend on how have you had OpenCV installed in first place!

1- If you have installed from Ubuntu’s repository (or package managers like apt or the package manager of any other distros)

In this case, it is as simple as removing OpenCV’s package using your package manager. For example, on Ubuntu based Linux systems you can write the following commands in your favorite terminal. Pres TAB a few times to see which packages are related to open cv:

2-If you have installed from source (using make/make install):

In this case, the make command should have created an uninstall profile for you. So to remove OpenCV, go to the folder that you have compiled OpenCV (the place you had called make/make install) and execute the following command:

NOTE: If you do not remember how have you installed OpenCV, or none of the above method works for you, you can use the following command to delete any file that has something to do with OpenCV. Please note that removing files can be dangerous so do this on your own risk! I take no responsibility! 🙂

The first command will look for any file that contains “opencv” in its name and will remove it. The second line will update the linker cache to possibly reflect the removal of OpenCV and update the shared libraries.

Installing OpenCV 3.1.0 And opencv-contrib packages

First of all, please noet that the following guide has been taken from the OpenCV documentation itself, but with minor changes required to install version 3.1.0 and contrib package of OpenCV.

Preparation

The very first step is to make sure you have required packages (build tools like gcc compiler, cmake, git, etc.). Use the following commands to download the required packages (do not be worried, if you already have them the package manager will not download or install already existing packages)

First, build tools:

Then the required packages:

*Optional packages:

Downloading OpenCV source files

I assume that you want to download sources into “/opt/” folder. Feel free to change the base directory to wherever you want (granted that you have write access) but make sure to reflect the changes in the code snippets below!.

Clone OpenCV’s git repository:

After this, stay in the “/opt” folder and clone the contrib repository as well (if you need the extra packages)

After cloning both repositories, you will have two folders. First “opencv” and second “opencv_contrib”. Now you have to go to each folder and make sure to checkout the version 3.1.0 branch for both of them (It is important that the version of OpenCV and OpenCV Contrib packages match!):

As of Jun 2016 please leave both the opencv and opencv_contrib repositories to stay on Master branch. you do not need to check out 3.1.0…the code snippets are just here for example! do not checkout other branches!

The last command should bring you inside the opencv folder. Get ready for the configuration and compilation step!

Pre-Build Configuration

Before compiling OpenCV from source, we need to perform some configuration to let the compiler know what we need it to compile for us! The first step is to create a directory for the compiler to put the complied files there for us. I call this “release” directory:

Now we have to let the “cmake” build system know how we want to configure the OpenCV for compilation, while you are in the release folder, type the following command:

What the command above does, is to tell the cmake that we want to compile a release version, we want the resulted library files to be copied to /usr/local (this is where most shared libraries are installed on a GNU/Linux system) and finally we tell the cmake where the contirb package modules are located. If you do not want to install contrib packages, remove the last option. Finally as I told before, the double dot tells the cmake that source codes are one folder up in the folder structure! After this step, you should see some files and folders in the release folder (as well as the “Makefile” generatd by cmake).

Note that this is default configuration. If you want to have FFMPEG and CUDA support, you have to first install these libraries and edit the CMakeCache.txt to enable these features!

Make and install

This is the final step. The only thing you need to do is to call “make” command in release folder, wait for compilation (it might take up to one hour depending on your computer’s processing power!) and finally install the compiled libraries by calling “make install”. To do so:

That’s all folks! hopefully if you have done everything right, your installation should be done by now! To check, run the following command:

It should print out “3.1.0”…

Common Problems

Judging from comments on this guide and my YouTube channel, The most common problems are:

  • Old version of GCC! Please make sure you have a recent version of GCC (I recommend 4.8.X or higher)
  • You did not install all the required packages! Please install the packages (find them in the beginning of the article)
  • You executed the cmake in the wrong directory, or you pointed the sources to an invalid location
Whats next?

Please stay tuned, as I am working on preparing some tutorials on using OpenCV in conjunction with QtQuick on Linux!

Saeid Yazdani

An Electronics Engineer with passion in Embedded Systems, Wireless Sensor Networks, Assembly, Desktop and Mobile Development, Web Development and generally anything that has to do with hardware and software of any kind!

100 Comments:

  1. Also this could be useful for people (like me) running into the HDF5 compiling error: https://github.com/Itseez/opencv/issues/6016

  2. Thanks for your help! But running into an issue with the make command.
    Ubuntu version: 12.04
    gcc version 4.8.
    “[27%] Built target IlmImf
    CMake Error: Cannot open file for write: /opt/opencv/release/modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/depend.make.tmp”
    I tried to chmod /opt/opencv, that wasn’t the problem. Any suggestions? Thanks!

    • That could be a CMake specific error…did you try to run the command with sudo to see if it helps? whats your cmake version? I recommend 3.2+ or even 3.5.2 you can read the install guide in another article in my website.

      • That fixed that problem, thank you! The terminal is now saying /opt/opencv/release/modules/hdf/precomp.hpp.gch/opencv_hdf_RELEASE.gsh is not compatible with this GCC version. My cmake is 2.8.7. I did sudo apt-get upgrade, but that upgraded everything other than cmake basically. Can I follow your tutorial to upgrade cmake when it’s already downloaded? Or do I have to uninstall the current version. I looked into doing that previously, but it looked like a lot of ros packages would be removed so I didn’t.

        • If you follow my guide for building cmake at the end just before installing it you can see the compiled executables and libs in the folder. You can use it as standalone.

          • hi. thanks for the tutorial. but i`m having problem when i follow the cmake step.
            /opt/opencv/release$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib/modules /opt/opencv/
            CMake Error: The source directory “/opt/opencv” does not exist.

          • just have a closer look to the error message: the last “/opt/opencv”in the cmake command is the place where your source code of opencv should be! is your opencv source code exist in that directory!?

        • Removing your old cmake might remove some dependency packages but its fine at worst case you install them again. Just take a note from things that are going to be removed.

          • Okay I removed my 2.8 version and followed your tutorial step by step. When I run cmake –version now it says “bash: /usr/bin/cmake: No such file or directory” but when I ran cmake-gui, that popped up, so I ignored the error. But then when I went back to the /opt/opencv/release folder to run make, the same error “make: /usr/bin/cmake: Command not found” happened. Do I need to move something to my /usr/bin to fix this? Thanks for your help!

          • You can make a symbolic link to the cmake 3.5.2 bin file in the /usr/bin folder. That should take care of the problem.

  3. make: *** No rule to make target `install’. Stop. << i got this message at the last step

    And, how do i compile the program? can i use ./build.sh like I did in OpenCV 2.4.9? Thx 🙂

  4. thx a lot!

  5. hi i have some problem in installing
    [ 22%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/jpeg_exif.cpp.o
    make[2]: *** No rule to make target /usr/lib/libpng.so', needed by lib/libopencv_imgcodecs.so.3.1.0′. Stop.
    make[1]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/all] Error 2
    make: *** [all] Error 2
    thx for your help 😀

  6. i followed the steps
    but i got error in the ‘cmake’ step
    Configuring incomplete, errors occurred!
    See also “/home/ubuntu/imginfo_reader/opencv/opencv/release/CMakeFiles/CMakeOutput.log”.
    See also “/home/ubuntu/imginfo_reader/opencv/opencv/release/CMakeFiles/CMakeError.log”.

    please help

    • So what does the log file says? what is the actual error? paste your log into pastebin.com and put the link here.

      • Abdul Rehman

        Determining if the system is big endian passed with the following output:
        Change Dir: /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp

        Run Build Command:"/usr/bin/make" "cmTC_947a6/fast"
        /usr/bin/make -f CMakeFiles/cmTC_947a6.dir/build.make CMakeFiles/cmTC_947a6.dir/build
        make[1]: Entering directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Building C object CMakeFiles/cmTC_947a6.dir/TestEndianess.c.o
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_947a6.dir/TestEndianess.c.o -c /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/TestEndianess.c
        Linking C executable cmTC_947a6
        /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_947a6.dir/link.txt --verbose=1
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG CMakeFiles/cmTC_947a6.dir/TestEndianess.c.o -o cmTC_947a6 -rdynamic
        make[1]: Leaving directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'

        TestEndianess.c:
        /* A 16 bit integer is required. */
        typedef unsigned short cmakeint16;

        /* On a little endian machine, these 16bit ints will give "THIS IS LITTLE ENDIAN."
        On a big endian machine the characters will be exchanged pairwise. */
        const cmakeint16 info_little[] = {0x4854, 0x5349, 0x4920, 0x2053, 0x494c, 0x5454, 0x454c, 0x4520, 0x444e, 0x4149, 0x2e4e, 0x0000};

        /* on a big endian machine, these 16bit ints will give "THIS IS BIG ENDIAN."
        On a little endian machine the characters will be exchanged pairwise. */
        const cmakeint16 info_big[] = {0x5448, 0x4953, 0x2049, 0x5320, 0x4249, 0x4720, 0x454e, 0x4449, 0x414e, 0x2e2e, 0x0000};

        #ifdef __CLASSIC_C__
        int main(argc, argv) int argc; char *argv[];
        #else
        int main(int argc, char *argv[])
        #endif
        {
        int require = 0;
        require += info_little[argc];
        require += info_big[argc];
        (void)argv;
        return require;
        }

        Determining if the include file /home/shahid/anaconda3/include/libpng/png.h exists failed with the following output:
        Change Dir: /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp

        Run Build Command:"/usr/bin/make" "cmTC_874ac/fast"
        /usr/bin/make -f CMakeFiles/cmTC_874ac.dir/build.make CMakeFiles/cmTC_874ac.dir/build
        make[1]: Entering directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Building C object CMakeFiles/cmTC_874ac.dir/CheckIncludeFile.c.o
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_874ac.dir/CheckIncludeFile.c.o -c /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c
        /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:55: fatal error: /home/shahid/anaconda3/include/libpng/png.h: No such file or directory
        compilation terminated.
        CMakeFiles/cmTC_874ac.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_874ac.dir/CheckIncludeFile.c.o' failed
        make[1]: *** [CMakeFiles/cmTC_874ac.dir/CheckIncludeFile.c.o] Error 1
        make[1]: Leaving directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Makefile:126: recipe for target 'cmTC_874ac/fast' failed
        make: *** [cmTC_874ac/fast] Error 2

        Determining if the include file linux/videodev.h exists failed with the following output:
        Change Dir: /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp

        Run Build Command:"/usr/bin/make" "cmTC_5e10a/fast"
        /usr/bin/make -f CMakeFiles/cmTC_5e10a.dir/build.make CMakeFiles/cmTC_5e10a.dir/build
        make[1]: Entering directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Building C object CMakeFiles/cmTC_5e10a.dir/CheckIncludeFile.c.o
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_5e10a.dir/CheckIncludeFile.c.o -c /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c
        /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:28: fatal error: linux/videodev.h: No such file or directory
        compilation terminated.
        CMakeFiles/cmTC_5e10a.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_5e10a.dir/CheckIncludeFile.c.o' failed
        make[1]: *** [CMakeFiles/cmTC_5e10a.dir/CheckIncludeFile.c.o] Error 1
        make[1]: Leaving directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Makefile:126: recipe for target 'cmTC_5e10a/fast' failed
        make: *** [cmTC_5e10a/fast] Error 2

        Determining if the include file sys/videoio.h exists failed with the following output:
        Change Dir: /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp

        Run Build Command:"/usr/bin/make" "cmTC_5656e/fast"
        /usr/bin/make -f CMakeFiles/cmTC_5656e.dir/build.make CMakeFiles/cmTC_5656e.dir/build
        make[1]: Entering directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Building C object CMakeFiles/cmTC_5656e.dir/CheckIncludeFile.c.o
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_5656e.dir/CheckIncludeFile.c.o -c /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c
        /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:25: fatal error: sys/videoio.h: No such file or directory
        compilation terminated.
        CMakeFiles/cmTC_5656e.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_5656e.dir/CheckIncludeFile.c.o' failed
        make[1]: *** [CMakeFiles/cmTC_5656e.dir/CheckIncludeFile.c.o] Error 1
        make[1]: Leaving directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Makefile:126: recipe for target 'cmTC_5656e/fast' failed
        make: *** [cmTC_5656e/fast] Error 2

        Determining if the include file ffmpeg/avformat.h exists failed with the following output:
        Change Dir: /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp

        Run Build Command:"/usr/bin/make" "cmTC_0654b/fast"
        /usr/bin/make -f CMakeFiles/cmTC_0654b.dir/build.make CMakeFiles/cmTC_0654b.dir/build
        make[1]: Entering directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Building C object CMakeFiles/cmTC_0654b.dir/CheckIncludeFile.c.o
        /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_0654b.dir/CheckIncludeFile.c.o -c /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c
        /home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:29: fatal error: ffmpeg/avformat.h: No such file or directory
        compilation terminated.
        CMakeFiles/cmTC_0654b.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_0654b.dir/CheckIncludeFile.c.o' failed
        make[1]: *** [CMakeFiles/cmTC_0654b.dir/CheckIncludeFile.c.o] Error 1
        make[1]: Leaving directory '/home/shahid/cv/opencv/release/CMakeFiles/CMakeTmp'
        Makefile:126: recipe for target 'cmTC_0654b/fast' failed
        make: *** [cmTC_0654b/fast] Error 2

    • Abdul Rehman

      i m also facing this problem if you done it please tell me
      thanks

  7. great walkthrough. One point though. I had CUDA installed on my system and I think by default cmake compiles for CUDA. This is good in the long run for very intensive computations but can take several hours in make. So one might want exclude building for CUDA support by using this flag in their cmake command -D WITH_CUDA=OFF source: https://codeyarns.com/2013/07/23/how-to-compile-opencv-without-cuda-support/

  8. Sir, i’d followed all the instruction without error but when run make command i always got this problem:

    root@kali:/opt/opencv/release# make
    [ 0%] Built target opencv_core_pch_dephelp
    [ 0%] Built target opencv_test_core_pch_dephelp
    [ 0%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
    In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
    from /usr/include/c++/6/algorithm:62,
    from /opt/opencv/modules/core/include/opencv2/core/base.hpp:53,
    from /opt/opencv/modules/core/include/opencv2/core.hpp:54,
    from /opt/opencv/modules/core/include/opencv2/core/utility.hpp:52,
    from /opt/opencv/release/modules/core/precomp.hpp:49:
    /usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
    #include_next
    ^
    compilation terminated.
    modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch' failed
    make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1
    CMakeFiles/Makefile2:1887: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed
    make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2

    What should i do? Please help, thanks.

    • I finally solved the problem.
      I just added: -D ENABLE_PRECOMPILED_HEADERS=OFF to cmake command, it works for me until 95% then the another problem is about fatal error: hdf5.h: No such file or directory
      I solved it by adding:

      find_package(HDF5)
      include_directories(${HDF5_INCLUDE_DIRS})

      into modules/python/common.cmake
      (I just put it at the bottom)

      rerun make again i got 100% success compilation.

    • stdlib.h not found…is a very primitive error….you need to install required packages I named in the beginning of the article…namely build-essential and libstd

      • libstdc++-5-dev is already the newest version (5.4.1-3).
        libstdc++-5-dev set to manually installed.
        libstdc++-6-dev is already the newest version (6.2.0-9).
        libstdc++-6-dev set to manually installed.
        libstdc++6 is already the newest version (6.2.0-9).

        this is the output when i tried to install, is it right sir?

  9. Hi, Thanks for the article. When I do “make”, it goes until 8% and I get the following error on ubuntu 16.04:
    I don’t have gpu.
    Any clues??

    thanks in advance.
    —————————————————————————————————————–
    [ 8%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
    /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
    /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
    return (char *) memcpy (__dest, __src, __n) + __n;
    ^
    CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):
    Error generating file
    /home/snoopy/opencv-3.1.0/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

    modules/core/CMakeFiles/opencv_core.dir/build.make:399: recipe for target ‘modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o’ failed
    make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
    CMakeFiles/Makefile2:2166: recipe for target ‘modules/core/CMakeFiles/opencv_core.dir/all’ failed
    make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
    Makefile:160: recipe for target ‘all’ failed
    make: *** [all] Error 2
    —————————————————————————————————————

    • You have to disable cuda support, its best to open cmaketext file with cmake-gui and look for that option and disable it.

      • Thanks Saeid, D here. I disabled cuda support. however, a similar error still remained, but after few other changes, now it works!!!!!!!!

  10. Hey thanks. I screwed around for a couple hours trying to get opencv3.1 installed on ubuntu14.04 then found this post. worked the first time.

  11. Mehdi Sajjadi

    hi

    Appreciate your help and useful guide for Opencv installation.
    I want to install OpenCv on my Raspberry board for image processing, I am doing exactly as you mentioned, but whenever I am running the “Pre-buld Configuration” After running cmake command I am receiving an error as comes in following:

    Configuring incomplete, errors occurred!
    See also “/home/pi/opt/opencv/release/CMakeFiles/CMakeOutput.log”.
    See also “/home/pi/opt/opencv/release/CMakeFiles/CMakeError.log”.

    Would you please let me know how I can eliminate this error?
    Also I am running the command that is mentioned OpenCv website and seems it is working but when I am running program in Gcc,I cannot define “Mat” vector for storing image in it.

    I appreciate if you help and advice on this matter.

    Regards

    Mehdi

    • That’s a critical error, meaning you have not downloaded sources completely, or you are pointing to wrong folder of sources when trying to run cmake. If you follow the guide correctly, there should be no reason for that error to happen.

Leave a Reply

Your email address will not be published. Required fields are marked *