Ask Your Question
0

[Noobie] Do I need to complie OpenCV to do anything?...

asked 2018-01-07 14:03:46 -0600

Greetings, I wish to use OpenCV to do image opencv with an Raspberry Pi Zero W. I wish to create custom haar cascades for various brands or logos. I'm currently in the process of installing and configuring OpenCV on the Rpi Zero. All the tutorials say I need to compile OpenCV, which will take around 10 hours!

My question is can I compile OpenCV on my powerful desktop to create the haar cascades. Then just use like the python-opencv package or library on the Rpi? I saw one suggestion to install opencv via conda and pip. https://anaconda.org/conda-forge/opencv (Despite that being 64 bit.)

Thanks!

edit retag flag offensive close merge delete

Comments

Nope, cross compiling is a hassle and never really works. You will just have to put it on, and continue working the next day.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-08 03:38:40 -0600 )edit

I don't believe I'm talking about cross compiling exactly except for conda.

I got many error 2s while compiling on the rpi. I got up to 50%. But one "solution" I found for the next issue broke my make files or something so it's back to square one. fubar type of situation. I can only expect my next attempt to do the same.

datguy.dev gravatar imagedatguy.dev ( 2018-01-08 05:27:33 -0600 )edit

@datguy.dev. I haven't attempted pi zero(i'm too lazy). You can install OpenCV and then download zip and run it. If you see 4 errors on prompt or debug window, just ignore it.

You can run on pc desktop. You must burn img on dvd or cd.

supra56 gravatar imagesupra56 ( 2018-01-08 10:00:55 -0600 )edit

If you want to compile. Kindly, use make J1 not j2 or j4. Using make j1 will take about 3 hrs

supra56 gravatar imagesupra56 ( 2018-01-08 10:29:40 -0600 )edit

" I wish to create custom haar cascades for various brands or logos" -- just saying, use your pi for detecting things, but train on a beefy pc, not a raspi.

berak gravatar imageberak ( 2018-01-08 11:39:30 -0600 )edit

@berak. Can do both pc and mac.

supra56 gravatar imagesupra56 ( 2018-01-08 14:02:31 -0600 )edit

@supra56 please stop. @berak yep.

datguy.dev gravatar imagedatguy.dev ( 2018-01-08 17:40:38 -0600 )edit

@supra56, can you please stop your comments, adding j1 is just plain stupid, you literally tell it to use a single core, but it does that by default. Also most of your comments make no sense at all.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-09 03:06:30 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-01-09 17:40:59 -0600

updated 2018-01-09 17:42:12 -0600

For what it is worth. This tutorial worked for me: https://www.pyimagesearch.com/2017/09... Used just make instead of any arguments. The swap is a must. OpenCV took 1 & 1/2 days to compile. OS is 10GB total in disk space with the DE. I will be cloning this OS :D

edit flag offensive delete link more

Comments

The compilation time is of course related to what you want to build in. What I mostly do is compile a lightweight OpenCV, only containing the modules I actually need. You can then prototype on desktop with full OpenCV, and make your tiny version on the pi to verify it.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-10 02:21:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-07 14:01:16 -0600

Seen: 311 times

Last updated: Jan 07 '18