Before starting you'll need to install Raspbian Buster operating system to your microSD card.
- Head on over to the official Raspberry Pi download page and download “Raspbian Buster with Desktop and recommended software”
- Download Balena Etcher — software for flashing memory cards. It works on every major OS
- Unzip .img file from downloaded .zip
- Use Etcher to flash .img to your memory card (min 16GB recommended)
- Do necessary changes to initial configuration, make sure to expand filesystem via raspi-config
- Open terminal, enter:
cd ~
wget https://raw.githubusercontent.com/z-hex/OpenCV/master/install-opencv.sh
chmod +x install-opencv.sh
./install-opencv.sh
IMPORTANT I tested a script with Raspberry Pi 3B + and it worked You need to do following changes in lines 100-102 - instead of:
-D BUILD_EXAMPLES=ON ..
make -j$(nproc)
use:
-D BUILD_EXAMPLES=OFF ..
make
Be patient, could take 3-4 hours to complete it.