Install and configure OpenCV2.3.1 correctly in ubuntu. complete these steps and run the following command to delete any old versions of ffmpegandx264. Sudoapt-getremoveffmpegx264libx264-d... installation process
To correctly install and configure OpenCV 2.3.1 in ubuntu, complete these steps.
Run the following command to delete any old versions of ffmpeg and x264. if they have not been installed before, there is no problem.
Sudo apt-get remove ffmpeg x264 libx264-dev
Download and install all dependencies of x264 and ffmpeg:
Sudo apt-get update
Sudo apt-get install build-essential checkinstall git cmake libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-libdev VA-dev has-libdev Vorbis- dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev
Download and install x264:
Download a recent stable snapshot of x264 version, which is: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/. the downloaded version has no strict requirements.
Run the following command to configure and build x264:
Tar xvf x264-snapshot-20120214-2422-stable.tar.bz2
Cd x264-snapshot-20120214-2422-stable/
./Configure -- enable-static
Make
Sudo make install
Download and install ffmpeg.
Download ffmpeg 0.8.x, address: http://ffmpeg.org/download.html. note: OpenCV2.3.1 earlier versions need ffmpeg 0.7.x.
Run the following command to configure and build ffmpeg:
Tar xvf ffmpeg-0.8.10.tar.bz2
Download and install gtk:
Sudo apt-get install libgtk2.0-0 libgtk2.0-dev
Download and install libjpeg:
Sudo apt-get install lib1_62 libjpeg62-dev
Download and install v4l (video for linux ).
Download v4l-utils-0.8.5.tar.bz2 from http://www.linuxtv.org/downloads/v4l-utils/
Build v4l:
Make
Sudo make install
Download and install OpenCV.
Download OpenCV 2.3.1 from http://sourceforge.net/projects/opencvlibrary/files/
Run the following command:
Tar xvf OpenCV-2.3.1.tar.bz2
Cd OpenCV-2.3.1/
Mkdir build
Cd build
Cmake ..
Make
Sudo make install
Configure Linux. openCV parameters
Add a line to the/etc/ld. so. conf. d/opencv. conf file:/usr/local/lib. for example, run the following command:
Sudo vi/etc/ld. so. conf. d/opencv. conf
G
O
/Usr/local/lib
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.