Template: Ir-cut camera
Overview
The IMx290-83 IR-CUT Camera is a starlight camera for the Raspberry Pi board and module series. Using a Sony IMX290 starlight sensor with 2 million pixels, onboard IR-CUT, it can freely switch the modes between daytime (RGB) and nighttime (monochrome) through the onboard button.
Quick Test
Hardware Connection
To test the Raspberry Pi camera, you need to connect an HDMI screen or a DSI screen to the Raspberry Pi
The interfaces of the CSI (camera) and DSI (display) on the Raspberry Pi board are similar, so be careful not to connect them wrongly when wiring. The CSI interface is between the audio interface and the HDMI interface, and the camera interface of the Raspberry Pi Zero series is next to the Power interface. If you are using a computing module, you must refer to the specific layout of the backplane.
- Connect to Raspberry Pi Zero series
Turn the metal side of the cable down, and connect it the camera
- Other Raspberry Pi motherboards
Direct the metal side of the cable to the HDMI port and connect it to the camera port
About the model
Camera Sensor | Supported Board | Supported driver type |
---|---|---|
OV5647 | All Raspberry Pi boards | libcamera / Raspicam |
OV9281 | All Raspberry Pi boards | libcamera |
IMX219 (Raspberry Pi official) | All Raspberry Pi boards | libcamera / Raspicam |
IMX219 (the third party) | Compute Module series only | libcamera |
IMX290/ IMX327 | All Raspberry Pi boards | libcamera |
IMX378 | All Raspberry Pi boards | libcamera |
IMX477 (Raspberry Pi official) | All Raspberry Pi boards | libcamera / Raspicam |
IMX477 (the third party) | Compute Module series only | libcamera |
Enable Camera Interface
If you are using the latest bullseye image, the camera interface has been enabled by default, so you can skip the modification steps.
- Open the Raspberry Pi terminal and use the command to enter the setting interface
sudo raspi-config
- Set up the camera
Select Interface Options -> Camera -> Yes -> Finish -> Yes
- Reboot the Raspberry Pi
Test Camera (Bullseyes)
Configure
If you use OV9281, IMX290, IMX378, or non-Raspberry Pi official IMX219 and IMX477 cameras, you need to configure the config.txt file separately
sudo nano /boot/config.txt
Find "camera-auto-detect=1" and modify it to "camera_auto_detect=0"
At the end of the file, add the following setting statements according to the camera model
model | set statement |
---|---|
OV9281 | dtoverlay=ov9281 |
IMX290/IMX327 | dtoverlay=imx290,clock-frequency=37125000 |
IMX378 | dtoverlay=imx378 |
IMX219 | dtoverlay=imx219 |
IMX477 | dtoverlay=imx477 |
- Open the Raspberry Pi terminal and enable the camera preview
sudo libcamera-hello -t 0
If you want to close the preview window, you can directly combine the keys Alt-F4, or click x to close. You can also go back to the terminal interface and terminate the program with ctrl-c.
Test Camera (Buster)
Open the Raspberry Pi terminal and enable the camera preview:
sudo raspistill -t 0
If you want to close the preview window, you can terminate the program with ctrl-c.