Reprint: Ubuntu14.04 and opencv2.4.8, opencv3.0 version Coexistence

Source: Internet
Author: User

Reprint to: http://blog.csdn.net/hansry/article/details/75309906

Due to the installation of Ros, the Ros-indigo-destop-full version was installed with the version 2.4.8 OpenCV. Due to the need to use 3 in the program. X version of the OpenCV, so on the original opencv2.4.8 installed OPENCV3, you need to set the OPENCV3 installation path, etc., to achieve multi-version OpenCV coexistence.

View current OPENCV version:
Pkg-config--modversion OpenCV  
Installing the OPENCV3 series:
(1) After downloading the installation package on the official website, unzip, first install the OpenCV dependencies,
sudo apt-GetInstall Build-essential libgtk2.0-dev libvtk5-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev Libtbb-dev
(2) Enter the OPENCV installation package, create a new build directory, and enter the directory
mkdir build && cd build
(3) Compiling and installing
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_TBB=ON -D WITH_V4L=ON -D CMAKE_INSTALL_PREFIX=/usr/local/opencv320 ..
make
sudo make install
修改bashrc文件:
sudo gedit ~/. BASHRC Add the following two statements to the end of the file: Export pkg_config_path=/usr/local/opencv320/lib/pkgconfig export ld_ Library_path=/usr/local/opencv320/

How to use it in the CMake tool:

Use Opencv2. 4  3 REQUIRED)


Reprint: Ubuntu14.04 and opencv2.4.8, opencv3.0 version Coexistence

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.