Consistently failing to compile openCV with RPi 3B+

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

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:

Even along with

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


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 -0500 )edit

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

supra56 gravatar imagesupra56 ( 2020-10-30 03:56:17 -0500 )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 -0500 )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 -0500 )edit

@berak. He stopped @50%.

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

Also, first try to use the official install docs:

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

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