1

I followed installation procedure as in How to install OpenCV 3 on Raspbian Jessie. I am successful in entering OpenCV virtual environment. I am unable to compile and install OpenCVV (step 4 in the above link). The reason being is that it's eating up my space in the SD card. I have an 8GB SD card on my Pi. Is it OK to use USB for the same, i.e. compile and build?

P.S : I needed a Pi for OpenCV so that the Pi can detect objects and draw frames using camera module or USB cam.

1
  • are you making use of all the storage? In the console type 'sudo raspi-config' and Expand Filesystem – ganninu93 Mar 20 '16 at 19:21
1

Installing OpenCV on a RasPi is a straightforward process. If you would like you can download my cheat sheet and try it out. It works fine for a lot of people facing your problem. I have also some recommendations:

  1. Always use a 2A, 5V Adapter.

    Peripherals are current hungry, so give it sufficient current. The Pi will automatically shut down when it can't get enough current as a protection for the Pi from getting burnt.

  2. Stick to the cheat sheet especially in step 12.

    Sometimes the Pi is unable to handle all the processor cores, and the make process fails to continue.

Hope it works well for you.

1

I just finished to compile and install OpenCV 3.3 on a model 3. This version requires more memory to compile, because the "dnn" (deep learning) component has been vastly developed and improved in many ways. I found that the guide you mentioned is still valid but it is required to extend the swapfile to at least 256MB, in order to successfully complete the compile process without out of memory errors or a frozen Pi.

You can do it easily editing the /etc/dphys-swapfile file as follows:

sudo nano /etc/dphys-swapfile

change the default line:

CONF_SWAPSIZE=100

to:

CONF_SWAPSIZE=256

and reboot; then follow the make procedure, I suggest to limit the cores used by build to two to avoid race condition, so:

make -j2

should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.