Install Opencv2.2.0 in Ubuntu 10.04

来源:互联网 发布:网络语gn是什么意思 编辑:程序博客网 时间:2024/05/16 06:04

Steps for install Opencv2.2.0 in Ubuntu 10.04


Reference:
http://alexsleat.co.uk/2009/12/02/howto-install-opencv-in-ubuntu-karmic-9-10/
II http://opencv.willowgarage.com/wiki/InstallGuide_Linux

1, Make sure the latest GTK, GCC 4.x or later
$ sudo apt-get install build-essential libgtk2.0-dev

2, Configure and install ffmpeg
Download the ffmpeg from "http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2"
$ tar -jxvf ffmpeg-0.5.tar.bz2
$ mv ./ffmpeg-0.5 ~/software         ----------(move ffmpeg file into your own file, there my is "~/software")
$ cd ~/software/ffmpeg-0.5            -----------(enable shared)
$ make                
$ sudo make install

3, I already have downloads opencv2.2.0 sources in "~/Donwloads/OpenCV-2.2.0.tar.bz2"
$ tar -jxvf OpenCV-2.2.0.tar.bz2
$ mv ./OpenCV-2.2.0 ~/sotware      -------------(move opencv file into your own software file,)
$ cd ~/OpenCV-2.2.0
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ~/software/OpenCV-2.2.0/
$ make
$ sudo make install
$ cd ./samples/c                                -------------------(turn to c file, and compile it)
$ .build_all.sh                                    --------------------(this is so simple, we can only ".build_all.sh")
$ cd ../cpp                                         -------------------(turn to cpp file, and compile it)
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ~/software/OpenCV-2.2.0/samples/cpp/
                      
原创粉丝点击