Installation configuration for Linux under OpenCV

Source: Internet
Author: User

1 installing cmake and some dependent libraries

sudo apt-get install CMake
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev Libtiff4.dev Libswscale-dev Libjasper-dev

CentOS or Redhat:

Yum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-d Evel Libpng-devel gstreamer-devellibavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils Swig Python libtool nasm

2 Installing OPENCV

Download OpenCV and unzip from official website, cd command to enter OPENCV directory

: http://opencv.org/downloads.html

CMake.
(CMake time is longer, about half an hour)

sudo make

sudo makeinstall

3 Configuration

Add the OpenCV library to the path so that the system can be found, not the first one plus the second

sudo gedit/etc/ld.so.conf.d/opencv.conf

sudo gedit/etc/ld.so.conf

Add/usr/local/lib at the end to save the exit

sudo ldconfig #使配置生效

sudo gedit/etc/bash.bashrc

Join at the end
Pkg_config_path= $PKG _config_path:/usr/local/lib/pkgconfig
Export Pkg_config_path

Save exit
sudo source/etc/bash.bashrc #使配置生效

Installation configuration for Linux under OpenCV

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.