Install OpenCV 2.4.9 in Ubuntu 14.04 and 13.10

Source: Internet
Author: User

Install OpenCV 2.4.9 in Ubuntu 14.04 and 13.10

OpenCV (OpenCV) is one of the most popular and advanced Computer Vision libraries, from many very simple basic tasks (image data capturing and preprocessing) to high-level algorithms (feature extraction, motion tracking, and machine learning. In addition, it is a free software that provides a wide range of APIS (application interfaces) for C, C ++, Java, and Python ). It also provides the wrappers Function Service. The OpenCV code library is cross-platform and is often used in real-time graphics processing and computer vision.

Install OpenCV 2.4.9 in Ubuntu 14.04, 13.10

  • New Features of OpenCV 2.4.9
  • Install OpenCV. 2.4.9
  • Step 1: create a directory
  • Step 2: Uninstall any previously installed ffmpeg and x264 Software
  • Step 3: install some dependencies
  • Step 4: Download and decompress extraction OpenCV
  • Step 5: Start compilation and Installation
  • Step 6: Use OpenCV as an Example
New Features of OpenCV 2.4.9
  • New 3D visualization module "viz"
  • Improvement on the performance of the "ocl" module
  • Fixed Android camera bug
  • Improve CUDA support for Mobile Platforms
  • Some bugs fixes from the community
  • 55 bugs reported have been disabled
  • 156 submitted pull requests (pull requests) have been accepted

Go to the following page to view our Update log: http://code.opencv.org/projects/opencv/wiki/ChangeLog

-------------------------------------- Split line --------------------------------------

Install the required OpenCV2.4.1 package in Ubuntu Linux

Install OpenCV2.4.2 on Ubuntu 12.04

OpenCV in CentOS cannot read Video Files

Summary of installing OpenCV 2.4.5 in Ubuntu 12.04

Install OpenCv2.1 in Ubuntu 10.04

Face Recognition System Based on QT and OpenCV

-------------------------------------- Split line --------------------------------------

OpenCV details: click here
OpenCV: click here

Step 1: create a directory

Mkdir opencv

Cd/opencv/

Step 2: Uninstall any previously installed ffmpeg and x264 Software

Sudo apt-get-qq remove ffmpeg x264 libx264-dev

Step 3: install some dependencies

According to a feedback from kumaranbus, installing the "libopencv-dev" dependency on a non-NVIDIA graphics card will damage the driver of the machine. If you are using a non-NVIDIA graphics card like AMD/ATI, Radeon series graphics card, replace the above dependency name with "ocl-icd-libopencl1" which is a universal driver. Please note: I did not try to test the feasibility of this method myself, because I do not have a machine for ATI/Radeon graphics card.

Sudo apt-get-qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10- dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils

-Install ffmpeg

Sudo add-apt-repository ppa: mc3man/trusty-media

Sudo apt-get update

Sudo apt-get install ffmpeg gstreamer0.10-ffmpeg

Step 4: Download and extract OpenCV

Step 4: Download and decompress extraction OpenCV

Wget-O OpenCV-2.4.9.zip http://fossies.org/linux/misc/opencv-2.4.9.zip

Unzip OpenCV-2.4.9.zip

Cd opencv-2.4.9

Step 5: Begin Build Process

Step 5: Start compilation and Installation

Tip: This process takes some time to complete compilation.

Mkdir build

Cd build

Cmake-D CMAKE_BUILD_TYPE = RELEASE-D CMAKE_INSTALL_PREFIX =/usr/local-D WITH_TBB = ON-d release = ON-D WITH_V4L = ON-D INSTALL_C_EXAMPLES = ON-d release = ON- D BUILD_EXAMPLES = ON-D WITH_QT = ON-D WITH_OPENGL = ON ..

Make-j2

Sudo make install

Sudo sh-c 'echo "/usr/local/lib">/etc/ld. so. conf. d/opencv. conf'

Sudo ldconfig

-Restart your computer.

Step 6: Use OpenCV as an Example

-Change the directory to the location of the sample file.

Cd/usr/local/share/OpenCV/samples/c

-Execute the following commands:

Sudo chmod + x build_all.sh

Sudo./build_all.sh

./Facedetect "/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" lena.jpg

Or

./Facedetect -- cascade = "/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" lena.jpg

The figure is shown at the top of this article.

Install OpenCV 2.4.9 in Ubuntu 14.04, 13.10

Translator: penguins in Madagascar

This article is launched by the help translation team's original translation help house.

This article permanently updates the link address:

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.