Zoeken…


Invoering

OpenCV-installatie op Linux, Mac OS en Windows

OpenCV-installatie op Ubuntu

Bron link

Open de terminal en schrijf de volgende opdrachten.

1-Update en upgrade pakket uw systeem ubuntu:

sudo su

sudo apt-get -y update

sudo apt-get -y upgrade

sudo apt-get -y dist-upgrade

sudo apt-get -y autoremove

2-Afhankelijkheden installeren:

sudo apt-get install libopencv-dev

3-Build Tools voor OpenCV Broncode:

sudo apt-get install build-essential checkinstall cmake pkg-config

4-Image I / O Libraries voor OpenCV:

sudo apt-get install libtiff5-dev libjpeg-dev libjasper-dev libpng12-dev zlib1g-dev libopenexr-dev libgdal-dev

5-Video I / O-bibliotheken voor OpenCV:

sudo apt-get install libavcodec-dev libavformat-dev libmp3lame-dev libswscale-dev libdc1394–22-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev v4l-utils libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev x264 yasm

6-Parallellisme en lineaire algebra-bibliotheken:

sudo apt-get install libtbb-dev libeigen3-dev

Bibliotheken met 7 grafische gebruikersinterface:

sudo apt-get install libqt4-dev libgtk2.0-dev qt5-default

sudo apt-get install libvtk6-dev

8 – Java-installatie:

sudo apt-get install ant default-jdk

9-Python installatie:

sudo apt-get install python-dev python-tk python-numpy python3-dev python3-tk python3-numpy python-matplotlib

sudo apt-get install python-opencv

sudo apt-get install doxygen

10-Download OPENCV broncode van Github:

wget https://github.com/opencv/opencv/archive/3.2.0.zip

11-Decomprimeer OPENCV Zip-bestand:

unzip 3.2.0.zip

12-Verwijder OPENCV Zip-bestand:

rm 3.2.0.zip

13-Build OPENCV:

mv opencv-3.2.0 opencv

cd opencv

mkdir build

cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_DOC=ON -D BULD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_EIGEN=ON -D FORCE_VTK=TRUE -D WITH_VTK=ON ..

make -j4

sudo make installeren

sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

sudo ldconfig

14-Voltooid Controleer uw OpenCV-versienummer:

pkg-config — modversion opencv

pkg-config — cflags opencv


Modified text is an extract of the original Stack Overflow Documentation
Licentie onder CC BY-SA 3.0
Niet aangesloten bij Stack Overflow