OpenCV installeerimine: Difference between revisions
Line 4: | Line 4: | ||
Käivita järgnevad korraldused | Käivita järgnevad korraldused | ||
<source lang="bash"> | |||
sudo apt-get -y install pkg-config cmake qtcreator build-essential libgtk-3-dev libjpeg62-dev | |||
sudo apt-get -y install libjasper-dev libpng12-dev zlib1g-dev openexr ffmpeg | |||
sudo apt-get -y libgstreamer0.10-dev libv4l-dev libxine-dev libunicap2-dev | |||
sudo apt-get -y libavformat-dev libswscale-dev subversion qtcreator libv4l-dev | |||
sudo apt-get -y install libavformat-dev libswscale-dev | |||
</source> | |||
Lae alla OpenCV Unix versioon 2.4.3 | |||
</ | |||
<source lang="bash"> | |||
cd ~ | |||
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2 | |||
tar jxf OpenCV-2.4.3.tar.bz2 | |||
cd OpenCV-2.4.3 | |||
</source> | |||
Tõmba viimane vers robotvision projektist | Tõmba viimane vers robotvision projektist | ||
< | <source lang="bash"> | ||
svn co http://robot.itcollege.ee/svn/vision/ | svn co http://robot.itcollege.ee/svn/vision/botmaster2012/ | ||
</ | </source> | ||
==OpenCV kompileerimine== | ==OpenCV kompileerimine== |
Revision as of 17:30, 8 November 2012
Eeldused
Luba failis /etc/apt/sources.list seal vaikimisi väljakommenteeritud repositooriumid multiverse ja universe
Käivita järgnevad korraldused
sudo apt-get -y install pkg-config cmake qtcreator build-essential libgtk-3-dev libjpeg62-dev
sudo apt-get -y install libjasper-dev libpng12-dev zlib1g-dev openexr ffmpeg
sudo apt-get -y libgstreamer0.10-dev libv4l-dev libxine-dev libunicap2-dev
sudo apt-get -y libavformat-dev libswscale-dev subversion qtcreator libv4l-dev
sudo apt-get -y install libavformat-dev libswscale-dev
Lae alla OpenCV Unix versioon 2.4.3
cd ~
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2
tar jxf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
Tõmba viimane vers robotvision projektist
svn co http://robot.itcollege.ee/svn/vision/botmaster2012/
OpenCV kompileerimine
- lae alla opencv stabiilse haru algteks http://opencv.willowgarage.com/wiki/ Dowloads alt;
- paki tulemus lahti
- sisene lahtipakkimisel loodud kausta
- loo alamkaust release
- sisene kausta relase ja käivita
cmake .. -DWITH_JPEG=OFF -DCMAKE_BUILD_TYPE=RELEASE
PS: võib muuta ka march=native cmake konfifailist, kui tegu on robotile mineva asusega
PPS: JPEG=OFF on hea, et kaamerast tuleb stream ei oleks MJPEG.
Kui nutetakse v4lv1 puudumise üle a'la OpenCV-2.2.0/modules/highgui/src/ cap_v4l.cpp:217:28: fatal error: linux/videodev.h: No such file or directory
Siis paigalda v4lv1 dev pakk
sudo apt-get install libv4l-dev
Ja muuta modules/highgui/src/cap_v4l.cpp
rida #include <linux/videodev.h> asendada reaga #include <libv4l1-videodev.h> Probleemide korral uue ubuntuga: - http://tech.groups.yahoo.com/group/OpenCV/message/79758