본문 바로가기

찐s/Raspberry Pi

[RPi] Lab.06-2: Install OpenCV (pip)

라즈베리파이 OPenCV 를 설치한다. 

 

1. 패키지 업데이트 

$ sudo apt-get update
$ sudo apt-get upgrade -y

2. OpenCV 관련 패키지 설치

$ sudo apt-get install build-essential cmake pkg-config
$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng-dev
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev
$ sudo apt-get install libfontconfig1-dev libcairo2-dev
$ sudo apt-get install libgdk-pixbuf2.0-dev libpango1.0-dev
$ sudo apt-get install libgtk2.0-dev libgtk-3-dev
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103
$ sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5

3. Install OpenCV 

$ sudo apt-get install python3-dev
$ sudo pip3 install opencv-python==4.1.0.25
$ sudo pip3 install opencv-contrib-python==4.1.0.25

012

. OpenCV 설치 확인

$ python3

>>> import cv2
>>> cv2.__version__

0

 

 

[참조]

www.raspberrypi.org 

docs.opencv.org 

https://pypi.org/project/opencv-python/

'찐s > Raspberry Pi' 카테고리의 다른 글

[RPi] Lab.06-3: Camera (OpenCV)  (0) 2021.11.06
[RPi] Lab.06-1: Install OpenCV  (0) 2021.10.23
[RPi] Lab.05-6: GUI (tkinter)  (0) 2021.10.09
[RPi] Lab.05-5: GUI (tkinter)  (0) 2021.10.03