RPi Camera Module 3 Noir (with IR filter)
Overview
The Raspberry Pi Camera Module 3 NoIR is a compact camera from Raspberry Pi. It offers an IMX708 12-megapixel sensor with HDR, and features phase detection autofocus. This is the NoIR version without an infrared cut filter.
product webpage Buy a Raspberry Pi Camera Module 3 – Raspberry Pi
Specifications:
Resolution: 4608px × 2592px (11.9 megapixels)
Focus range: 10cm–∞
Focal length: 4.74mm
Diagonal field of view: 75 degrees
Horizontal field of view: 66 degrees
Vertical field of view: 41 degrees
Focal ratio (F-stop): F1.8
Infrared-sensitive: Yes
Connector: 15 × 1mm FPC (ribbon connector, connect directly to the Raspberry Pi’s CSI camera connector, see reference images)
Additional information can be found on the product brief here: https://datasheets.raspberrypi.com/camera/camera-module-3-product-brief.pdf
Software
Getting Started
Connect to a Raspberry Pi camera connector (see reference images).
Boot up the Pi and enter libcamera-hello
in the terminal to check for proper connection.
If ERROR: *** no cameras available ***
, ensure that camera_auto_detect=1
or camera_auto_detect=0
is present in /boot/firmware/config.txt
, depending on which camera connector is used. Save the file then sudo reboot
.
Additional troubleshooting info on module 3 pi cameras can be found here: module 3 camera setup & troubleshoot.
The Python library used to interface with it is picamera2
, the API docs can be found here: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf.
The picamera2
library comes pre-installed on the Raspberry Pi, and cannot be easily installed using pip
. Therefore, when creating virtual environments, add the --system-site-packages
flag to include it in your venv (You do not want to include it in your requirements.txt
).
Running Integration Tests:
For the general process, follow the video input worker tests section in Running Airside on the Raspberry Pi 5 - Comp 2025
Below are several key things to note/change while running tests with the Pi Camera to not lose your sanity while debugging. Note that the test WILL NOT run properly if these changes are not made.
These changes must be made because the system defaults to using configuration for the OpenCV camera instead of a Raspberry Pi Camera.
Also note that after the changes have been made, the video input hardware test must be run before the video input worker test to generate the correctly name log folder. This stands to be corrected by someone more knowledgable.
1. Changes in config.yaml:
Not to be confused with the config_logger.yaml
. This one is directly in the root of the Airside System Repository. It should look something like the following:
queue_max_size: 10
video_input:
worker_period: 1.0 # seconds
camera_enum: 0 # Enum values can be found in camera_factory.py
width: 1920
height: 1200
# For camera_enum=0, use the OpenCV camera config. For camera_enum=1, use the PiCamera2 config
# OpenCV camera config (regular cameras, enum 0)
camera_config:
device_index: -1
# PiCamera2 camera config (PiCamera NoIR, enum 1)
# camera_config:
# exposure_time: 250 # microseconds
# analogue_gain: 64.0 # Sets ISO, 1.0 for normal, 64.0 for max, 0.0 for min
# contrast: 1.0 # Contrast, 1.0 for nomral, 32.0 for max, 0.0 for min
# lens_position: null # Focal length, 1/m (0 for infinity, null for auto focus)
log_images: true # Set to true to save images
image_name: "log_image" # Image name when saving images
# more code below ...
The lines containing camera_config
and device_index
are to be commented out, and the other camera_config
section (contains exposure_time
, analogue_gain
, etc) should be uncommented.
Result should look like the following (for that specific section)
video_input:
worker_period: 1.0 # seconds
camera_enum: 0 # Enum values can be found in camera_factory.py
width: 1920
height: 1200
# For camera_enum=0, use the OpenCV camera config. For camera_enum=1, use the PiCamera2 config
# OpenCV camera config (regular cameras, enum 0)
# camera_config:
# device_index: -1
# PiCamera2 camera config (PiCamera NoIR, enum 1)
camera_config:
exposure_time: 250 # microseconds
analogue_gain: 64.0 # Sets ISO, 1.0 for normal, 64.0 for max, 0.0 for min
contrast: 1.0 # Contrast, 1.0 for nomral, 32.0 for max, 0.0 for min
lens_position: null # Focal length, 1/m (0 for infinity, null for auto focus)
log_images: true # Set to true to save images
image_name: "log_image" # Image name when saving images
2. Config in test_video_input_hardware.py
There is a group of variables being declared right after the import statements that may look like the following if it is configured to run OpenCV camera:
# Modify as needed
CAMERA = camera_factory.CameraOption.OPENCV
WIDTH = 640
HEIGHT = 480
CONFIG = camera_opencv.ConfigOpenCV(0)
IMAGE_NAME = None # Not saving any pictures
In any case, make the following changes to use PiCamera configuration instead:
3. Config in test_video_input_worker.py
exact same changes as the one above, but in the worker test instead.
Mechanical
Physical Dimensions
Standard Camera: 25 × 24 × 11.5mm
Operating Constraints
No operating constraints. Does not require active cooling.
Reference Images
camera:
Raspberry Pi connection (connector 1):