如何在Ubuntu 10.4上手OpenCV的2.4.2? [英] How to get started with OpenCV 2.4.2 in ubuntu 10.4?

查看:644
本文介绍了如何在Ubuntu 10.4上手OpenCV的2.4.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Linux安装最新版本的OpenCV 2.4.2(Ubuntu的10.4)的PC。

I am trying to install latest OpenCV version 2.4.2 on a linux (ubuntu 10.4) PC.

我下载的焦油球。
非焦油编吧。
并遵循在Ubuntu 10.04 安装OpenCV。

I downloaded the tar ball. Un-tar-ed it. And followed install opencv in ubuntu 10.04.

在'制作'我以后遇到错误 链接CXX可执行../../斌/ opencv_perf_core 进来红色这里;数以百万计的警告或错误封邮件后,它显示如下:

While 'Make' I got error after "Linking CXX executable ../../bin/opencv_perf_core" comes in red color here; after millions of warning or error msgs it shows as follows:

... ... ...
../../lib/libopencv_ts.so.2.4.2: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
../../lib/libopencv_ts.so.2.4.2: undefined reference to `typeinfo for int'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

关键词:链接CXX可执行../../bin/opencv_perf_core加上引号

Keyword: "Linking CXX executable ../../bin/opencv_perf_core" with quotes.

我GOOGLE了它,发现PC需要CUDA驱动程序。现在我不需要,也许。

I googled for it and found that the PC needs CUDA driver. For now I don't need that perhaps.

在这里所做的要求安装驱动程序或我可以绕过特定的创造的过程?

Does that driver installation required here or I can bypass that particular 'make' process?

我的目的就是要尽快在Ubuntu开始OpenCV的。是否需要使用编译OpenCV的2.4.2库的CPP文件中的这些构建流程?我不是集中于静态的还是非静态库。

My aim is to get started with OpenCV as soon as possible in ubuntu. Does these build processes required for compiling own cpp file using openCV 2.4.2 libraries? I am not concentrating on static or non static libraries.

有没有人曾在Ubuntu的作为就像在Windows上我安装OpenCV并获得通过设置路径,包括文件和.dll文件保持与自定义的可执行文件刚刚起步,说从摄像头捕获的图像。

Has anyone worked on for ubuntu as just like on windows I install OpenCV and get started just by setting path to the include file and keeping .dlls with the custom executable file, say for capturing images from a camera.

&LT; ===更新===>

<=== Update ===>

随后的http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html.

它通过链接CXX可执行../../斌/ opencv_perf_core。

It passed the Linking CXX executable ../../bin/opencv_perf_core.

现在stucks位于 链接CXX可执行../../斌/ opencv_perf_highgui 有以下错误:

now it stucks at Linking CXX executable ../../bin/opencv_perf_highgui with following errors:

/usr/bin/ld: ../../lib/libopencv_highgui.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_close'
/usr/bin/ld: note: 'v4l2_close' is defined in DSO /usr/lib/libv4l2.so.0 so try adding it to the linker command line
/usr/lib/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_highgui] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_perf_highgui.dir/all] Error 2
make: *** [all] Error 2

好像在 cmake的参数必须要很好的研究。任何快捷方式会有所帮助。

Seems the cmake parameters has to be studied well. Any shortcut will be helpful.

推荐答案

我已经安装了OpenCV的2.4.2,并写了一个脚本来安装它。你可以在这里找到它的https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_2.sh

I have installed OpenCV 2.4.2 and written a script to install it. You can find it here https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_2.sh

或Google Checkout我的博客文章更详细的说明。 <一href=\"http://jayrambhia.word$p$pss.com/2012/06/20/install-opencv-2-4-in-ubuntu-12-04-$p$pcise-pangolin/\" rel=\"nofollow\">http://jayrambhia.word$p$pss.com/2012/06/20/install-opencv-2-4-in-ubuntu-12-04-$p$pcise-pangolin/

Or checkout my blog post for more detailed instructions. http://jayrambhia.wordpress.com/2012/06/20/install-opencv-2-4-in-ubuntu-12-04-precise-pangolin/

echo "Installing OpenCV 2.4.2"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get remove remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get install libopencv-dev
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get install python-dev python-numpy
sudo apt-get install libtbb-dev
sudo apt-get install libqt4-dev libgtk2.0-dev
echo "Downloading ffmpeg"
wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2
echo "Installing ffmpeg"
tar -xvf ffmpeg-0.11.1.tar.bz2
cd ffmpeg-0.11.1/
./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
cd ..
echo "Downloading v4l"
wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
echo "Installing v4l"
tar -xvf v4l-utils-0.8.8.tar.bz2
cd v4l-utils-0.8.8/
make
sudo make install
cd ..
echo "Downloading OpenCV 2.4.2"
wget -O OpenCV-2.4.2.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.2/OpenCV-2.4.2.tar.bz2/download
echo "Installing OpenCV 2.4.2"
tar -xvf OpenCV-2.4.2.tar.bz2
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
sudo echo "/usr/local/lib" >> /etc/ld.so.conf
sudo ldconfig
echo "OpenCV 2.4.2 ready to be used"

这篇关于如何在Ubuntu 10.4上手OpenCV的2.4.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆