Http://www.eefocus.com/DSP_geek/blog/10-12/200665_09816.html
The purpose of this article is to demonstrate how to install opencv on fedora 14.
1. Source Code
The source code of opencv for Linux can be downloaded from SourceForge.
2. Prerequisites
Following packages are required to be installed upfront.
GCC 4.x, cmake 2.6, subversion (SVN) client, GTK 2.x, pkgconfig libpng-devel, zlib, lib1__turbo, LibTIFF, Python, swig.
Because of the version incompatible reason, libpng-devel shoshould be updated to 1.4.3 before opencv installation.
3. Compilation and Installation
(1) extract source code
# Tar xvjf OpenCV-2.2.0.tar.bz2
(2) Compile source code and install
# Cd opencv-2.2.0
# Mkdir release; CD release
# Cmake-D cmake_build_type = release-D cmake_install_prefix =/usr/local-D build_python_support = on ..
Cmake_install_prefix represents the installation path
# Make
# Make install
(3) Configure path
# Vi/etc/lD. So. conf. d/opencv. conf
Add the opencv library path (default configuration is/usr/local/LIB ):
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib/
Note: I can't use this sentence directly./Usr/local/lib/
# Ldconfig
# Vi ~ /. Bashrc
Add the opencv library path (default configuration is/usr/local/LIB ):
Export pkg_config_path = $ pkg_config_path:/usr/local/lib/pkgconfig
This setting can be checked through
# PKG-config -- cflags opencv
# PKG-config -- libs opencv
Reference
Http://opencv.willowgarage.com/wiki/InstallGuide_Linux
Http://opencv.willowgarage.com/wiki/CompileOpenCVUsingLinux