Installing OpenCV On Linux
Installing OpenCV On Linux
Here is brief description on how to build the latest version of OpenCV. See
INSTALL file shipped with OpenCV for more detail. The required packages are
listed below:
cd ~/<your_working_dir>
svn co
https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/trunk
cd ~/<your_working_dir>
svn co
https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/tags/la
test_tested_snapshot
Compilation
You will see the configuration results. Various build options can be adjusted
interactively using CMake GUI. Then you build the library and install it to the
target directory:
make
sudo make install
Path Configuration
In order to use the libraries in Linux, thier path should be specified. Library path
can be specified in /etc/ld.so.conf.d/ by creating a file called 'opencv.conf' which
contains the opencv library path (Default configuration is /usr/local/lib). Once the
file is created, execute
sudo ldconfig -v
to make new set library pathes effective. Or you can also add the path to
LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Test OpenCV
You can run the correctness tests cxcoretest and cvtest for a quick sanity check:
cd ~/<your_working_dir>/opencv/release/bin
./cxcoretest
./cvtest -d ~/<your_working_dir>/opencv/tests/cv/testdata
cd ~/<your_working_dir>/opencv/samples/c
. build_all.sh
./delaunay
# try other samples (some of them require a camera) ...
OpenCVWiki: InstallGuide_Linux (last edited 2009-10-08 17:29:46 by BenoitR)