OpenCV installeerimine: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Mernits (talk | contribs)
No edit summary
Mernits (talk | contribs)
No edit summary
Line 11: Line 11:
sudo apt-get -y install libavformat-dev libswscale-dev subversion qtcreator  libv4l-dev
sudo apt-get -y install libavformat-dev libswscale-dev subversion qtcreator  libv4l-dev
sudo apt-get -y install libavformat-dev libswscale-dev
sudo apt-get -y install libavformat-dev libswscale-dev
apt-get install cmake
apt-get install g++
</source>
</source>
Lisaks võib paigaldada ka pakke: qtcreator
Lisaks võib paigaldada ka pakke: qtcreator
Line 21: Line 27:
cd ~
cd ~
wget https://github.com/Itseez/opencv/archive/2.4.6.1.tar.gz
wget https://github.com/Itseez/opencv/archive/2.4.6.1.tar.gz
 
tar zxvf 2.4.6.1.tar.gz
 
cd opencv-2.4.6.1/
 
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
mkdir build
mkdir build
cd build
cd build
</source>
</source>



Revision as of 16:58, 10 September 2013

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  build-essential libgtk-3-dev libjpeg62-dev  
sudo apt-get -y install libjasper-dev libpng12-dev zlib1g-dev openexr ffmpeg 
sudo apt-get -y install libgstreamer0.10-dev libv4l-dev libxine-dev libunicap2-dev 
sudo apt-get -y install libavformat-dev libswscale-dev subversion qtcreator  libv4l-dev
sudo apt-get -y install libavformat-dev libswscale-dev




apt-get install cmake
apt-get install g++

Lisaks võib paigaldada ka pakke: qtcreator

OpenCV kompileerimine

Lae alla OpenCV Unix versioon 2.4.3


cd ~
wget https://github.com/Itseez/opencv/archive/2.4.6.1.tar.gz
tar zxvf 2.4.6.1.tar.gz 
cd opencv-2.4.6.1/
mkdir build
cd build


cmake .. -DWITH_JPEG=OFF -DCMAKE_BUILD_TYPE=RELEASE  -DCMAKE_CXX_FLAGS="-march=native -O3 -ftree-vectorize"  -DCMAKE_C_FLAGS="-march=native -O3 -ftree-vectorize"

make -j4 #Kui sul on 4 trheadi/coret
sudo make install
sudo ldconfig

Tõmba viimane vers robotvision projektist

svn co http://robot.itcollege.ee/svn/vision/botmaster2012/


PS: JPEG=OFF on hea, et kaamerast tuleb stream ei oleks MJPEG.