블로그 이미지
pgmr이상현
Instagram:sh_lee77 머신비전, YOLO, 영상처리, Deep Learning, 딥러닝

calendar

1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Notice

본인은 Ubuntu 16.04.1환경에서 설치 했습니다.

YOLO를 설치하기전에 Opencv를 선행으로 설치를 해주어야 합니다.


Opencv3.2설치


1. g++, cmake 설치

  1. sudo apt-get install g++
  2. sudo apt-get install cmake


2. Opencv설치를 위한 필요 패키지 설치

  1. sudo apt-get install build-essential cmake pkg-config libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libxvidcore-dev libx264-dev libxine2-dev libv4l-dev v4l-utils libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libqt4-dev mesa-utils libgl1-mesa-dri libqt4-opengl-dev libatlas-base-dev gfortran libeigen3-dev python2.7-dev python3-dev python-numpy python3-numpy


3. Opencv Download

  1. mkdir opencv
  2. cd opencv
  3. wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.2.0.zip
  4. unzip opencv.zip
  5. wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.2.0.zip
  6. unzip opencv_contrib.zip


4. Opencv build

  1. cd opencv-3.2.0/
  2. mkdir build
  3. cd build
  4. cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=OFF -D WITH_IPP=OFF -D WITH_1394=OFF -D BUILD_WITH_DEBUG_INFO=OFF -D BUILD_DOCS=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D ENABLE_NEON=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules -D WITH_V4L=ON -D WITH_FFMPEG=ON -D WITH_XINE=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D PYTHON_INCLUDE_DIR=/usr/include/python2.7 -D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7 -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so ../
  5. make -j
  6. sudo make install



5. 설치확인

  1. pkg-config --modversion opencv
  2. pkg-config --libs --cflags opencv



위 이미지와 같이 3.2.0 version으로 Opencv가 성공적으로 설치가된 것을 확인할 수 있습니다.

posted by pgmr이상현