The new version of OpenCV's changed the way to install by using cmake. I also have to update myself and find some information regarding it. Recently, I've read the tutorial on installing OpenCV 2.1 in Ubuntu which explains very well; so, I follow this tutorial and I would note my installation steps here.
- install dependencies as follows (please also see the screen shots below).
- libcv4
- libcv-dev
- libcvaux4
- libcvaux-dev
- libhighgui4
- libhighgui-dev
- opencv-doc (optional)
- ffmpeg (optional; if you want to use ffmpeg to do video processing)
- install cmake using the command
sudo apt-get install cmake
. - run
cmake -D WITH_FFMPEG=ON -D CMAKE_INSTALL_PREFIX=${HOME}/opencv/ .
.- Note that there is a dot at the end of the command above which means to run at the current directory.
- The options mean to use ffmpeg and to set the OpenCV path in your home directory.
- check if ffmpeg is available and the folder to install is correct. See the screen shot below.
- run the command
make
- run the command
sudo make install
. - The last thing is to is to tell the dynamic linker where the DLLs are; so, add the line:
export LD_LIBRARY_PATH=${HOME}/opencv/lib
to ~/.bashrc and then relogin.
finish.. 🙂
@Zatknis yes, you can. I'm glad that my post is interesting to you though. 🙂