Ask Your Question
1

Opencv + python + raspberry pi minimum required size on disk

asked 2015-12-10 02:22:29 -0600

WH gravatar image

updated 2020-10-05 06:43:25 -0600

I want to process image with my pi by using opencv. I have a 8gb sd card but I followed a toturial to set up opencv in pi, the error occured like disk space is not enough. Do you know the minimum disk space for these processes ???

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-12-10 10:49:00 -0600

kbarni gravatar image

updated 2015-12-10 10:49:51 -0600

There are two ways to install OpenCV on a Raspberry Pi:

  • Use the Debian repositories (sudo apt-get install libopencv-dev). This is the simplest way, but you'll only get OpenCV 2.4.9, and you won't be able to customize the install. It takes around 80M when installed.
  • Compile the sources yourself. The compiled code takes more than 4GB disk space (that's why you are having problems), but the installed libs take <100M. If you don't have enough space on the SD card, I suggest to use a USB stick or an external hard disk for the build directory. After installing OpenCV, you can delete the build directory.
edit flag offensive delete link more

Comments

I would like to compile sources myself as you described on the second point, but I am completely new to the rasp pi 2.

Can I plug my USB into a laptop, download the build directory onto the USB, then do:

  • $ unzip opencv-2.4.10.zip
  • $ cd opencv-2.4.10
  • $ mkdir build
  • $ cd build
  • $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON ..
  • $ make
  • $ sudo make install
  • $ sudo ldconfig
camilap gravatar imagecamilap ( 2017-03-04 13:04:05 -0600 )edit

Just follow the official guide, it works.

For easier configuration I suggest to use cmake-gui. There are lots of customization options.

kbarni gravatar imagekbarni ( 2017-03-06 06:05:44 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-10 02:22:29 -0600

Seen: 10,328 times

Last updated: Dec 10 '15