ubuntu12.04安装OpenCV2.4.1

更新时间:2023-07-03 23:24:05 阅读: 评论:0

ubuntu12.04安装OpenCV2.4。1
分类: opencv2012-06-26 14:411230人阅读评论(0)收藏举报
目录(?)[+]
1. The Installation Procedure
2. More Information
The Installation Procedure
To install and configure OpenCV 2.4.1, complete the following steps. The commands shown in each step can be copy and pasted directly into a Linux command line.
1. Remove any installed versions of ffmpeg and x264.
sudo apt-get remove ffmpeg x264 libx264-dev
2. approximationGet all the dependencies for x264 and ffmpeg.
stan
sudo apt-get update
columnist
sudo apt-get install build-esntial checkinstall git cmake libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev
3. Download and install gstreamer.
sudo apt-get install libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstreamer0.10-plugins-ba libgstreamer-plugins-ba0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg
4. Download and install gtk.
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
5. Download and install libjpeg.ene
sudo apt-get install libjpeg8 libjpeg8-dev
6. Create a directory to hold source code.
cd ~
mkdir src
7. Download and install install x264.
雪绒花英文歌词a. Download a recent stable snapshot of x264 from ftp://ftp.videolan/pub/videolan/x264/snapshots/. The exact version does not em to matter. To write this guide, I ud version x264-snapshot-20120528-2245-stable.tar.bz2, but I have ud previous versions too.
cd ~/src
wget ftp://ftp.videolan/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2
tar xvf x264-snapshot-20120528-2245-stable.tar.bz2
cd x264-snapshot-20120528-2245-stable
b. Configure and build the x264 libraries.
./configure --enable-static
make
sudo make installshelly怎么读
IMPORTANT: If you are running a 64-bit version of Ubuntu, you must configure x264 as shown in the following command:
./configure --enable-shared --enable-pic
not until
The -shared and -pic options might also be required when you compile for some other architectures, such as ARM. You know you need the options if you get the following error when compiling OpenCV:
小学英语三年级下册[ 25%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.c
pp.o
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32S against `av_destruct_packet' can not be ud when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
8. Download and install install ffmpeg.
a. Download ffmpeg version 0.11.x from ffmpeg/download.html.
cd ~/src
wget ffmpeg/releas/ffmpeg-0.11.tar.bz2
tar xvf ffmpeg-0.11.tar.bz2
cd ffmpeg-0.11
b. Configure and build ffmpeg. //如果是ubuntu是安装在虚拟机上,需要加上--enable-shared
.
/configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
make
sudo make install
IMPORTANT: Just like with x264 in the previous step, you must configure ffmpeg with the -shared option if you are running a 64-bit version of Ubuntu or some other architectures, such as ARM. The -pic option is not necessary for ffmpeg.
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
9. Download and install install a recent version of v4l (video for linux) from www.linuxtv/downloads/v4l-utils/. For this guide I ud version 0.8.8.
cd ~/src
wget www.linuxtv/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
tar xvf v4l-utils-0.8.8.tar.bz2
cd v4l-utils-0.8.8cockpit
make
sudo make install
10. Download and install install OpenCV 2.4.1.
a. Download OpenCV version 2.4.1 from sourceforge/projects/opencvlibrary/files/
cd ~/src
wget downloads.sourceforge/project/opencvlibrary/opencv-unix/2.4.1/OpenCV-2.4.1.tar.bz2
tar xvf OpenCV-2.4.1.tar.bz2
b. Create a new build directory and run cmake:
cd OpenCV-2.4.1/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
c. Verify that the output of cmake includes the following text:
found gstreamer-ba-0.10
GTK+ 2.x: YES
FFMPEG: YES
GStreamer: YES
note

本文发布于:2023-07-03 23:24:05,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/166247.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:收藏   小学   需要   举报   下册   加上
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图