There are two ways to install OpenCV on a Raspberry Pi:
- Use the Debian repositories (apt-get). This is the simplest way, but you'll only get OpenCV 2.4, 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.