Computer

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:
http://opencv.itseez.com/
And the installation details are on this site:

http://opencv.itseez.com/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction
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 http://sourceforge.net/project/showfiles.php?group_id=22870&package_id=16948, 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
make
sudo make install
sudo nano /etc/ld.so.conf.d/opencv.conf
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 build_all.sh
./edge (or any others examples)
OpenCV with Linux
credited: http://dircweb.king.ac.uk/reason/opencv_cvs.php
http://tspp.exteen.com/20090816/beginning-opencv-in-linux

One thought on “OpenCV with Linux

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s