Consistently failing to compile openCV with RPi 3B+

asked 2020-10-29 16:08:05 -0600

emuemu gravatar image

I'm attempting to compile and install openCV on my Rasberry Pi 3B+ - I need to make use of the SIFT and SURF utilities in the contrib package, and they dont come with the standard pip3 install.

Starting from a fresh install of Buster on the RPi, I've followed upwards of 10-15 online tutorials on how to do this, and they all fail at the Make stage. There is a litany of complaints from the make -j4 (or make -j1, whatever) command, far, far too many to post here, but I cant get past 50% completion.

It's probably worth noting that I can operate openCV just fine with python3, using pip3 install, but I cant use SIFT with the pip3 install of the opencv-contrib-python package.

Recently I've attempted to follow the proceedures at the blogs below:

https://circuitdigest.com/microcontroller-projects/how-to-install-python-opencv-on-raspberry-pi

https://linuxize.com/post/how-to-install-opencv-on-raspberry-pi/

https://pimylifeup.com/raspberry-pi-o...

https://www.learnopencv.com/install-opencv-4-on-raspberry-pi/

https://github.com/EdjeElectronics/Te...

Even along with

https://raspberrypi.stackexchange.com...

Every single one of these has failed at the make stage.

I know this is a very general question, since I've not really provided very many details on the errors - there's just too many. But can anyone direct me to a blog, or some instructions or something that they KNOW works on a fresh OS install on a Raspberry pi 3B+?

I can upload some make logs, etc. for more information, but honestly, this is out of hand for me right now.

edit retag flag offensive close merge delete

Comments

all your links are useless here, we need to see, what YOU have tried, and what problems YOU ran into, not other ppl. !

also, since it is about SIFT - opencv version ?

berak gravatar imageberak ( 2020-10-30 01:40:05 -0600 )edit

sudo pip3 install opencv-contrib-python==4.x.x (x denote version)

supra56 gravatar imagesupra56 ( 2020-10-30 03:56:17 -0600 )edit

btw, since the SIFT patent expired, it was moved to the main opencv repo in 4.4 and can be used without restrictions

berak gravatar imageberak ( 2020-10-30 04:23:55 -0600 )edit

Didn't u installed sudo apt install python3-pip? B u doing this. Did u updated and upgraded?. If not, u will to reinstall again in order u can passed to 100%. I have pi3 but stopped @ 57%. But only pi4 will do nicely job.. I will have to attempt again

supra56 gravatar imagesupra56 ( 2020-10-30 08:41:50 -0600 )edit

@berak. He stopped @50%.

supra56 gravatar imagesupra56 ( 2020-10-30 08:42:36 -0600 )edit

Also, first try to use the official install docs: https://docs.opencv.org/4.5.0/d7/d9f/...

They are up to date. And they work on the Raspberry Pi.

kbarni gravatar imagekbarni ( 2020-11-03 04:28:24 -0600 )edit