About Ubuntu 16.04 Install opencv-3.2.0 and opencv_contrib-3.2.0 all kinds of pits

Source: Internet
Author: User

The most recent use of OPENCV for video data preprocessing is the use of OpenCV KCF Tracker in:

#include <opencv2/tracking.hpp>

When the error, said no this hpp file, and then found that this is the expansion of the library, that is, opencv_contrib-3.2.0. Then began to embark on a pit trip. Although a lot of search on the internet, but pieces, here is a summary of the following considerations:
   1. If there are already installed OpenCV, want to add contrib library of small partners, recommend unloading load, otherwise there may be cuda.cpp file not found problems, in addition, if installed on Windows, you may need ffmpeg related DLLs, I put it under the relevant documents in the resource .
   2. About the contrib library, written on the GitHub, More than 3.0-beta source code, you need to modify three cmake files, while the compilation process needs to download a heap of clutter, due to network reasons (you know) may cause anomalies, here, the end of the article I will put the full version of the OPENCV_ contrib-3.2.0 Library links are attached, you can save all the above operations directly compile and install, compared to the various versions of the Internet and GitHub on the main do the following:
1 The following files were added under Opencv_contrib-3.2.0/modules/xfeature2d:
-BOOSTDESC_BGM.I
-Boostdesc_bgm_bi.i
-BOOSTDESC_BGM_HD.I
-BOOSTDESC_BINBOOOST_064.I
-BOOSTDESC_BINBOOST_128.I
-BOOSTDESC_BINBOOST_256.I
-VGG_GENERATED_48.I
-VGG_GENERATED_64.I
-VGG_GENERATED_80.I
-VGG_GENERATED_120.I

2) in opencv_contrib-3.2.0/modules/dnn/.../. (ellipses are cmake to customize a hash-like value, the above link is already added) under the Add:

-Protobuf-cpp-3.1.0.tar.gz

PS: There are two source code online, one is opencv_contrib_3.2.0, the other is Opencv_contrab_master, the latter is not DNN this directory, but Dnn_models, the specific content is not textual research.

   3. With regard to the OpenCV library, added under opencv-3.2.0/3rdparty/ippicv/downloads/..../(ellipsis ditto, Windows below the file is not the same, I put in the information in the relevant documents, Copy to the appropriate folder by then: ippicv_linux_20151201.tgz

Because opencv-3.2.0 more than 110M can not upload, I put ippicv_linux_20151201.tgz into the "relevant documents", opencv-3.2.0 please own Baidu.

then you can install the ....
The specific steps are as follows: Decompression opencv-3.2.0, for example, for/home/xxx/opencv-3.2.0 decompression I gave opencv_contrib-3.2.0 to opencv-3.2.0 directory (after the path for the decompression is/home/xxx/ opencv-3.2.0/opencv_contrib-3.2.0) and creates a new build folder (the path is/home/xxx/opencv-3.2.0/build) to enter the build, where it executes:

cmake-d cmake_build_type=release-d cmake_install_prefix = path 1-d opencv_extra_modules_path= path 2.

Path 1: You want to compile the location of the installation OpenCV,
Path 2:opencv_contrib-3.2.0 The path of the modules, where that is/home/xxx/opencv-3.2.0/opencv_contrib-3.2.0/modules
PS: After a space and two "...", do not omit to perform sequentially:

sudo make
sudo make install

It's best to add sudo, or sometimes you'll have to start again, super slow, because you don't have permissions to cause a compile installation to break. Then there is the long wait ...

Over

opencv_contrib-3.2.0 Revised edition
Related documents

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.