Install OpenCV & Mediapipe on Raspberry Pi 4B -YouTube demo
sudo apt-get update
sudo apt-get upgrade
HDF5 is a file format and library for storing scientific data. HDF5 was designed and implemented to address the deficiencies of HDF4.x. It has a more powerful and flexible data model, supports files larger than 2 GB, and supports parallel I/O.
sudo apt-get install -y libhdf5-dev
ATLAS is an approach for the automatic generation and optimization of numerical software. Currently ATLAS supplies optimized versions for the complete set of linear algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines in the LAPACK library.
sudo apt-get install -y libatlas-base-dev
Install JPEG-2000 library
sudo apt-get install -y libjasper-dev
Install QT GUI related packages
sudo apt-get install -y libqtgui4
sudo apt-get install -y libqt4-test
sudo apt-get install -y python3-pyqt5
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade numpy==1.21.2
python3 -m pip install matplotlib
python3 -m pip install imutils
Install OpenCV with version 4.5.3.56 (has been tested and compatible with numpy 1.21.2)
python3 -m pip install opencv-python==4.5.3.56
Install Mediapipe for Raspberry Pi 4
python3 -m pip install mediapipe-rpi4==0.8.4.0