OpenCV with Linux

UPDATE: It’s been a long time since I wrote this article, it’s now obsoleted.   For the newer version of OpenCV ( >2.2) I recommend to look for the related information from this site:
And the installation details are on this site:
I believe this website should contains all the related references and tutorials for your OpenCV project. Best Wish.

OpenCV (Open-source Computer Vision) is a open-source C library for handling with image processing. Actually most of nowadays computer image applications is based on this OpenCV. The OpenCV can do the following tasks: Basic image processing (all Photoshop can do), very easy Real-time and hardware interfacing, GUI library, and so on.

In order to use OpenCV with Linux, there are quite complicate task. this is the step for setting up my own Linux Mint for using OpenCV.

1. install compiler, open the Terminal and type this command:
sudo apt-get install build-essential
2. install related dependencies:
sudo apt-get install libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg62-dev libtiff4-dev
3. Download OpenCV source files from, untar and place it wherever you want OpenCV to be at.
4. Type command as follows:
./configure --prefix=/opt/opencv --enable-apps --enable-shared --with-ffmpeg --with-gnu-ld --with-x --without-quicktime CXXFLAGS=-fno-strict-aliasing
sudo make install
sudo nano /etc/
Then add this /usr/local/lib into a file.
sudo ldconfig -v
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

That’s all. Now we can test this OpenCV by using examples in /opencv/samples/c
by: sudo sh
./edge (or any others examples)
OpenCV with Linux

One thought on “OpenCV with Linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s