How to install OpenCV on Ubuntu

OpenCV (Open Source Computer Vision Library) is an open source library of programming functions developed by Intel. It is free for commercial and research use under the open source BSD license. The library is cross-platform, will run on Mac OS X, Windows and Linux. It focuses mainly towards real-time image processing routines and algorithms for software development.

To install OpenCV using the terminal on Ubuntu:

$ su -
# apt-get update
# apt-get install build-essential
# apt-get install libavformat-dev
# apt-get install x264 v4l-utils ffmpeg
# apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev

OpenCV should be installed in /usr/local/ Installation Directory

You may also want to compile and view examples

$ cp -r /usr/share/doc/opencv-doc/examples .
$ cd examples
$ cd c
$ sh

Related Articles

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button