Omnivision OV5647
Omnivision OV5647
2592x1944 (5 megapixels)
Up to 15fps at 2592x1944, up to 60fps at 1280x720, up to 90fps at 640x480
CSI-2 (Camera Serial Interface)
approximately 250mA
65 degrees
Adjustable
25mm x 25mm x 9mm (1 inch x 1 inch x 0.35 inch)
approximately 10g (0.35 oz)
0C to 50C (32F to 122F)
Applications
| The Raspberry Pi 5MP Camera Module with Cable is suitable for a wide range of applications, including |
Home security and surveillance systems
Robotics and autonomous vehicles
Computer vision projects
Image processing and machine learning applications
Media and entertainment systems
IoT and home automation projects
Conclusion
The Raspberry Pi 5MP Camera Module with Cable is an excellent addition to any Raspberry Pi project, providing high-quality imaging capabilities in a compact and affordable package. With its adjustable focus, wide viewing angle, and low power consumption, this module is ideal for a range of applications, from home security systems to computer vision projects.
Raspberry Pi 5MP Camera Module with Cable DocumentationOverviewThe Raspberry Pi 5MP Camera Module with Cable is a high-quality camera module designed specifically for the Raspberry Pi series of single-board computers. This module features a 5-megapixel sensor, capable of capturing still images and video at resolutions up to 2592x1944 pixels. The included 15cm camera cable allows for easy connection to the Raspberry Pi's camera port.Technical SpecificationsSensor: 5-megapixel Omnivision OV5647
Resolution: Up to 2592x1944 pixels
Lens: 3.6mm focal length, f/2.9 aperture
Interface: CSI-2 (Camera Serial Interface)
Cable length: 15cmSoftware SupportThe Raspberry Pi 5MP Camera Module is supported by the Raspberry Pi OS and various third-party libraries, including:Raspbian: The official OS for Raspberry Pi, which includes camera support out of the box.
OpenCV: A popular computer vision library that provides extensive camera functionality.
Picamera: A Python library specifically designed for camera interaction with the Raspberry Pi.Code Examples### Example 1: Capturing a Still Image using RaspbianThis example demonstrates how to capture a still image using the `raspistill` command in Raspbian.Code:
```bash
raspistill -o image.jpg
```
Explanation:The `raspistill` command is used to capture a still image.
The `-o` option specifies the output file name, in this case, `image.jpg`.### Example 2: Real-time Video Streaming using OpenCV and PythonThis example demonstrates how to use OpenCV and Python to capture and stream real-time video from the camera module.Code:
```python
import cv2# Initialize the camera
cap = cv2.VideoCapture(0)while True:
# Capture a frame
ret, frame = cap.read()
# Display the frame
cv2.imshow('Camera Feed', frame)
# Exit on key press
if cv2.waitKey(1) & 0xFF == ord('q'):
break# Release the camera and close the window
cap.release()
cv2.destroyAllWindows()
```
Explanation:The `cv2.VideoCapture(0)` function initializes the camera module.
The `while` loop captures and displays each frame in real-time using `cv2.imshow`.
The `cv2.waitKey(1) & 0xFF == ord('q')` statement checks for the 'q' key press to exit the loop.
Finally, the camera is released and the window is closed using `cap.release()` and `cv2.destroyAllWindows()`.### Example 3: Timelapse Photography using Picamera and PythonThis example demonstrates how to use Picamera and Python to capture a timelapse sequence of images.Code:
```python
import picamera
import time# Initialize the camera
camera = picamera.PiCamera()# Set the camera resolution and framerate
camera.resolution = (2592, 1944)
camera.framerate = 1# Capture a timelapse sequence
for i in range(10):
camera.capture('image_%03d.jpg' % i)
time.sleep(5) # Wait 5 seconds between captures# Close the camera
camera.close()
```
Explanation:The `picamera.PiCamera()` function initializes the camera module.
The `camera.resolution` and `camera.framerate` properties are set to desired values.
The `for` loop captures a timelapse sequence of 10 images, with a 5-second delay between each capture using `camera.capture`.
Finally, the camera is closed using `camera.close()`.These examples demonstrate the versatility of the Raspberry Pi 5MP Camera Module with Cable and its applications in various contexts, including still image capture, real-time video streaming, and timelapse photography.