Installing OpenCV on an RPi board
Follow these steps to install OpenCV on the RPi:
- First, we need to install a few dependencies. Run the following command to install all these dependencies:
sudo apt-get install -y libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test
- Once the installation is successful, we can install OpenCV on the RPi:
pip3 install opencv-python==4.0.1.24
- Once the installation of OpenCV is successful, we can verify it by running the following command:
python3 -c "import cv2; print(cv2.__version__)"
The following should be the output:
4.0.1
This means that the installation is completed and that we can import OpenCV in our Python 3 programs.
Next, we will learn how to overclock the RPi 4B and how to install heatsink on it.