Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install
Check you can run test.py
using both python 2 and 3 to verify that OpenCV python bindings were successfully installed
$ wget "https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png" -O lenna.jpg
$ python2 test.py lenna.jpg
$ python3 test.py lenna.jpg
WARNING: Users of boards with 1GB of memory
Compiling is very memory intensive, you will likely need to increase your swap size. Assuming you have a reasonably large SD card (>16GB to be safe), follow the procedure below to increase your swap size from the default 100MB to 2GB
$ sudo dphys-swapfile swapoff
$ sudo sed -i 's:CONF_SWAPSIZE=.*:CONF_SWAPSIZE=2048:g' /etc/dphys-swapfile
$ sudo reboot
this is my opencv 4.3.0 debian package for direct installation, you can get into package build instruction there is in this git also.
thank your script to enable this git repo to happen.
https://github.com/cyysky/OpenCV-Raspberry-Pi-4-Package-for-Python
Installation Step
wget https://github.com/cyysky/OpenCV-Raspberry-Pi-4-Package-for-Python/raw/master/opencv_4.3.0-1_armhf.deb
sudo dpkg -i opencv_4.3.0-1_armhf.deb # This will install fail for dependency
sudo apt-get -f install # Auto install dependency package
sudo dpkg -i opencv_4.3.0-1_armhf.deb # Now start install
sudo apt-get install tesseract-ocr # Optional : tesseract-ocr