个人工具

UbuntuHelp:OpenCV

来自Ubuntu中文

跳转至: 导航, 搜索

OpenCV

What is it?

OpenCV is a software better yet a collection of libraries that make image processing easier for people. I have seen and read that many people are having problems with installing OpenCV from source and its integration with OpenMP.

Installing OpenCV

Here is how to install it: (using terminal) First go to terminal and type: sudo su Now type: sudo apt-get install build-essential Once that is done type: sudo apt-get install libavformat-dev Now type: sudo apt-get install ffmpeg After that is done type in ffmpeg on the command line, this should give you something similar to this: FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Apr 10 2009 23:18:41, gcc: 4.3.3 At least one output file must be specified Alright almost done, now type: sudo apt-get install libcv1 libcvaux1 libhighgui1 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev There you go...

Compiling and Viewing the examples

For doing this type: cp -r /usr/share/doc/opencv-doc/examples . cd examples cd c sh build_all.sh This will build most/all of the examples. You will also get the python examples they can be compiled with python filename.py

Advanced Tasks

Other advanced tasks such as haartraining and such are also available. To access them type: opencv-haartraining (for haartraining) opencv-createsamples (for creating samples) opencv-performance (checking performance of the classifier) The actual training procedure can be found here: http://note.sonots.com/SciSoftware/haartraining.html

Future Developement

I hope Ubuntu team also adds OpenMP with the advanced features... Thanks, Vikram