Welcome to RDK X5 MagicBox repository
12.MIPI Camera Usage
Using the MIPI Camera
1. Feature Overview
The RDK MagicBox Sweet Potato Stereo Camera comes with a complete set of calibration parameters, including stereo calibration parameters, IMU intrinsic parameters, and the extrinsic parameters between the stereo cameras and the IMU. Users can start using it immediately without the need for additional calibration. Using these parameters, high-precision depth maps can be calculated via stereo matching algorithms, enabling real-time 3D environmental perception. Additionally, the camera data can be used with open-source Visual-Inertial Odometry (VIO) algorithms, such as OpenVINS, to calculate camera pose and trajectory information. Suitable for applications such as robot navigation and obstacle avoidance, it provides developers with plug-and-play depth perception and visual-inertial fusion capabilities.
2. How to Run
Update the system environment
xsource /opt/tros/humble/setup.bashOr:source ~/.bashrc
Run the MIPI example
xxxxxxxxxxros2 launch mipi_cam mipi_cam_dual_channel.launch.py \mipi_channel:=2 mipi_channel2:=0 \mipi_lpwm_enable:=True mipi_frame_ts_type:=realtime \mipi_image_width:=816 mipi_image_height:=960 \mipi_image_framerate:=10.0 mipi_gdc_enable:=True \mipi_out_format:=bgr8 \log_level:=info- mipi_channel:=2 mipi_channel2:=0 Adjusts the stitching order of the left and right eyes
- mipi_lpwm_enable:=True Enable LPWM hardware synchronization
- mipi_frame_ts_type:=realtime Use system time for timestamps
- mipi_image_width:=816 mipi_image_height:=960 Adjust image resolution; maximum setting is 1088×1280
- mipi_image_framerate:=10.0 Adjust the camera frame rate; can be set up to 30.0
- mipi_gdc_enable:=True Enable GDC correction to output corrected stereo images; otherwise, distorted images will be output
- mipi_out_format:=nv12 Sets the image format; supports nv12/bgr8
- log_level:=info Log level; the “info” level prints calibration parameters. If you do not need to display that much information, set it to “warn”
You can modify the parameters inside according to your needs. If startup fails, you can simply run the startup command again.
3. Expected Results

