CSI Camera
1. Overview
- CSI (Camera Serial Interface) is a serial interface standard used for image transmission. It is developed and managed by the MIPI Alliance, an organization dedicated to mobile device interface standards. CSI is primarily used to connect image sensors with image processors or other devices, such as digital signal processors (DSPs) or application processors. It provides a high-speed, low-power method for transmitting images and related control signals.
- The CSI interface is widely used in many applications, especially in mobile devices, embedded systems, and consumer electronics. It provides a reliable and efficient connection between image sensors and image processors, enabling real-time capture and processing of high-quality images.
2. Hardware Connection
The Omni3576 is currently compatible with the IMX415 camera. To test the CSI camera, it is recommended to connect the Omni3576 to either an HDMI or a DSI screen.
On the Omni3576 baseboard, the packaging for the CSI (camera) and DSI (display) interfaces is similar. Care should be taken not to connect them incorrectly. The DSI interface is located next to the USB interface. Please note that if you are using a different baseboard, the specific layout may differ, so refer to the layout of the baseboard you are using.
Insert the ribbon cable with the metal side facing down into the camera interface.
3. Check Camera Information
Use the
v4l2-ctl
command to list the device information:v4l2-ctl --list-devices
root@luckfox:/home/luckfox# v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
/dev/video17
/dev/video18
rkcif (platform:rkcif-mipi-lvds):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/video4
/dev/video5
/dev/video6
/dev/video7
/dev/video8
/dev/video9
/dev/video10
/dev/media0
rkisp_mainpath (platform:rkisp-vir0):
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video19
/dev/media1
rkvpss_scale0 (platform:rkvpss-vir0):
/dev/video21
/dev/video22
/dev/video23
/dev/video24
/dev/media2List camera-related parameters:
v4l2-ctl --list-formats-ext --device=/dev/video11
Preview the camera:
# If running on an SSH terminal, set the display to the first screen
export DISPLAY=:0.0
gst-launch-1.0 v4l2src device=/dev/video11 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! xvimagesinkTake a picture:
v4l2-ctl -d /dev/video11 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=4 --stream-count=1 --stream-to=/root/cap1.raw --stream-skip=2