29
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ラズパイ: Buster向け OpenCV4

Last updated at Posted at 2019-06-26

real 57m25.179s
user 195m27.130s
sys 14m11.865s

> https://github.com/mt08xx/files/raw/master/opencv-rpi/libopencv3-buster_3.4.6-20190715.1_armhf.deb




# 概要
Buster向けに、OpenCV 4.1.0 をビルドしてみました。
([いつもの](https://qiita.com/mt08/items/e8e8e728cf106ac83218))顔検出(test-face_detect.py)しか、**テストしてません..**
busterで、python3は、`3.7.3`になりました。



# TL;DR

```bash
curl -SLO  https://raw.githubusercontent.com/mt08xx/files/master/libopencv4-buster_4.1.0-20190625.1_armhf.deb
sudo apt install -y ./libopencv4-buster_4.1.0-20190625.1_armhf.deb

環境

  • Raspberry Pi 3B
  • microSD 16GB
  • Raspbian: 2019-06-20-raspbian-buster.img

実行例

pi@raspberrypi:~ $ python2 --version
Python 2.7.16
pi@raspberrypi:~ $ python2 -c 'import cv2; print(cv2.__version__)'
4.1.0
pi@raspberrypi:~ $ python3 --version
Python 3.7.3
pi@raspberrypi:~ $ python3 -c 'import cv2; print(cv2.__version__)'
4.1.0
pi@raspberrypi:~ $ 

その他

  • うごかない場合、以下を実行すれば、必要なライブラリはインストールされると思います。

     sudo apt-get install -y \
     	build-essential cmake pkg-config \
     	libjpeg-dev libtiff5-dev libpng-dev \
     	libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
     	libxvidcore-dev libx264-dev \
     	libgtk2.0-dev libgtk-3-dev \
     	libcanberra-gtk* \
     	gfortran \
     	python2.7-dev python3-dev \
     	libavresample-dev libtesseract-dev libleptonica-dev \
     	libgstreamer1.0-dev  libgstreamer-plugins-base1.0-dev libhdf5-dev \
     	libatlas-base-dev liblapacke-dev \
     	python3-numpy python-numpy libjasper-dev
    
29
20
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?