Camera Module + Raspberry Pi 2
Step 1: Install OpenCV on your Raspberry Pi and Import it to Python
Follow these instructions to install OpenCV onto your Raspberry Pi using the terminal. After you have successfully installed OpenCV and imported the library to Python, you will be able to use the code
import cv2 at the top of your files to gain access to the OpenCV library.
Step 2: Enabling the Camera Module
Next, you will have to connect the camera on the Raspberry Pi. Start by inserting the ribbon cable into the camera slot on the board. After the cable has been inserted, use the terminal to enable the camera module on the OS. In the terminal, type in
sudo raspi-config and then select
Enable Camera. Press Enter and then select
Finish. You will then have to reboot and log back on to the Raspberry Pi. After this has been done, your camera module should be able to work on your Raspberry Pi.