Build OpenCV-Python environment on Raspberry Pi B +

OpenCV installation

--Install OpenCV-python on RasPi

RaspberryPi


$ sudo apt-get install libopencv-dev
$ sudo apt-get install python-opencv

--If you install with apt-get, it will be 2.3.1 and the old version at the moment (2014/8/16). --If you want to install the latest version, please build by referring to this area.

Operation check

--Create a python script for checking the operation on RasPi (grayscale conversion) --lena has been dropped from the WEB

cvTest.py


import cv2

img = cv2.imread('lena.jpg')
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite('lena_gray.jpg', img_gray)

--Execute

RaspberryPi


$ python cvTest.py

--The left is the original image and the right is the converted image.

RasPi_OpenCV_Python_Test.jpg

Referenced site

-Install OpenCV on Raspberry Pi

-DERiVE: [Series] "CV programming using python and OpenCV" Part 7: Overview of OpenCV's python interface

Recommended Posts

Build OpenCV-Python environment on Raspberry Pi B +
Build a Django environment on Raspberry Pi (MySQL)
Build a Python development environment on Raspberry Pi
Build an Arch Linux environment on Raspberry Pi
Build an OpenCV4 environment on Raspberry Pi using Poetry
Build wxPython on Ubuntu 20.04 on raspberry pi 4
USB boot on Raspberry Pi 4 Model B
Build a Tensorflow environment with Raspberry Pi [2020]
I installed OpenCV-Python on my Raspberry Pi
pigpio on Raspberry pi
Cython on Raspberry Pi
Introduced Ceph on Kubernetes on Raspberry Pi 4B (ARM64)
Raspberry Pi 4B initial setting
Build Python environment on Windows
Build python environment on windows
raspberry pi 1 model b, python
Introduced pyenv on Raspberry Pi
Use NeoPixel on Raspberry Pi
Install OpenCV4 on Raspberry Pi 3
Install TensorFlow 1.15.0 on Raspberry Pi
[Note] Installing vmware ESXi on Arm Fling on Raspberry Pi 4B
Port FreeRTOS to Raspberry Pi 4B
Testing uart communication on Raspberry Pi
raspberry pi 1 model b, node-red part 17
MQTT on Raspberry Pi and Mac
raspberry pi 4 centos7 install on docker
Install ghoto2 on Raspberry Pi (memo)
Try using ArUco on Raspberry Pi
OpenCV installation procedure on Raspberry Pi
Power on / off Raspberry pi on Arduino
Detect switch status on Raspberry Pi 3
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Build a python3 environment on CentOS7
Install OpenMedia Vault 5 on Raspberry Pi 4
L Chika on Raspberry Pi C #
Python 2.7, 3.4, 3.5 extension module build environment on Windows
"Honwaka Notification Lamp" on Raspberry Pi Part 2
Detect "brightness" using python on Raspberry Pi 3!
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
"Honwaka Notification Lamp" on Raspberry Pi Part 1
Enable UART + serial communication on Raspberry Pi
Adafruit Python BluefruitLE works on Raspberry Pi.
Accelerate Deep Learning on Raspberry Pi 4 CPU
Set swap space on Ubuntu on Raspberry Pi
Programming normally with Node-RED programming on Raspberry Pi 3
Build an LNPP environment on Amazon Linux 2
Use the Grove sensor on the Raspberry Pi
Install 64-bit OS (bate) on Raspberry Pi
Build Python environment with Anaconda on Mac
Install docker-compose on 64-bit Raspberry Pi OS
Run servomotor on Raspberry Pi 3 using python
"Honwaka Notification Lamp" on Raspberry Pi Part 3
Build WordPress on CentOS 8 in LAMP environment
Working with sensors on Mathematica on Raspberry Pi
Detect temperature using python on Raspberry Pi 3!
Build a Python + OpenCV environment on Cloud9
Mount Windows shared folder on Raspberry Pi
Matrix multiplication on Raspberry Pi GPU (Part 2)
How to install NumPy on Raspberry Pi
Working with GPS on Raspberry Pi 3 Python