firat2135
Posts: 2
Joined: Sun Dec 15, 2019 11:01 am

PLEASE HELP!!! raspberry pi zero w dont compiler opencv

Sun Dec 15, 2019 12:48 pm

hello guys,we have a raspberry pi zero w.we doing a face recognition project.we download opencv library and then we dont compile opencv library .our pi freezed along time (like +9 hours) . How we compile the opencv library ? Please Help

Heater
Posts: 15838
Joined: Tue Jul 17, 2012 3:02 pm

Re: PLEASE HELP!!! raspberry pi zero w dont compiler opencv

Sun Dec 15, 2019 3:07 pm

I have no idea how one builds opencv but it sounds like you might be running out of memory.

Be sure to setup a decent sized swap space.

Be sure to run your build on only one thread. Often make files will try to compilation multiple files in parallel, which takes more memory.

I managed to compile the Qt5 libraries on an early Pi with a swap space that was actually on an NFS mount from my PC. It took all night!

Or, why not make life easy and build opencv on a Pi 4? Then move the executables to the zero.
Memory in C++ is a leaky abstraction .

User avatar
scruss
Posts: 3155
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: PLEASE HELP!!! raspberry pi zero w dont compiler opencv

Sun Dec 15, 2019 3:14 pm

There's also a version (3.2) in the repos:

Code: Select all

sudo apt install libopencv-dev opencv-doc
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

gordon77
Posts: 4992
Joined: Sun Aug 05, 2012 3:12 pm

Re: PLEASE HELP!!! raspberry pi zero w dont compiler opencv

Sun Dec 15, 2019 3:24 pm

Try...

Code: Select all

sudo apt-get install python3-opencv
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev 
sudo apt-get install libqtgui4 
sudo apt-get install libqt4-test 

Return to “General discussion”