The NXP Surround View System is a technology which provides a 360-degree wraparound a view that can be used for automotive, industrial, and consumer use cases. Providing a 360-degree view assists the driver of an automobile in parking the vehicle safely. Industrial and consumer use cases include building, store and home views of the surrounding property or interior of key rooms for both security, safety and key retail use cases such as customer counting.
NOTE: Evaluated on BSP LF-6.6.52_2.2.0.
i.MX Board | Main Software Components |
---|---|
i.MX 95 EVK | GStreamer + Libcamera + OpenGL |
There is a meta layer that includes the camera mirror patch.
Information | Value |
---|---|
Camera resolution | 4x 1920*1280@30fps fisheye |
Display resolution | 1920*1080@60fps LVDS->HDMI |
ISP frequency | 667 MHZ |
GPU frequency | 1 GHZ |
There are 3 applications in this demo:
Perform Lens calibration and system calibration to get intrinsic parameter of cameras and extrinsic parameter.
For a proper lens (intrinsic camera) calibration, the image capturing for each separate camera must be done first.
The system calibration is performed using the Automatic Calibration application. It makes all preprocessing calculation and generates files for texture mapping (rendering).
- Load camera frames.
- Remove fisheye distortion.
- Estimate extrinsic pose of each camera.
- Generate 3D grid for texture mapping.
- Calculate masks for seamless blending.
- Generate grid of overlap ROIs for exposure correction.
It renders the camera frames on a prepared 3D mesh and blends them.
- Load vertices and texels coordinates from external files.
- Load blending mask from external files.
- Load 3D car model.
- Load camera frames from static images.
- Directly map the camera frames on 3D plane with use of OpenGL.
- Blend the frames with use of OpenGL shaders.
- Apply exposure correction.
OpenCV library is used for images, videos and masks loading. Assimp library is used for 3D car model loading. GLM library is used for view rotation/translation on the screen. OpenGL ES library is used for rendering.
There are 2 input types in this demo, camera input and video input, camera input uses 4 fisheye cameras, video input uses 4 clips of video instead of real cameras.
The surround view system uses 4 fisheye cameras and displays a 360° output view. It uses a Serializer-Deserializer to interface with the cameras and uses LVDS or MIPI DSI to display the output onto a screen (1080p).
Component | i.MX 95 |
---|---|
Power Supply | ✅ |
HDMI Display | ✅ |
USB Type-C cable | ✅ |
HDMI cable | ✅ |
IMX-LVDS-HDMI (LVDS to HDMI adapter) | ✅ |
Mini-SAS cable | ✅ |
4x OX03C10 with Serializer | ✅ |
De-serializer Board convert board | ✅ |
USB Mouse | ✅ |
USB Keyboard | ✅ |
In this demo, choose imx95-19x19-evk-ox03c10-isp-it6263-lvds0.dtb
u-boot=> setenv fdtfile imx95-19x19-evk-ox03c10-isp-it6263-lvds0.dtb
u-boot=> saveenv
Steps for compiling and running the SV3D project on i.MX target board:
- Git clone the application source code.
- source the toolchain.
- Go to the App/Source folder.
- Build the project using command:
make -f Makefile.xdg
For video input, clean the environment first:
make -f Makefile.xdg clean
Build with command:
make -f Makefile.xdg INPUT=video
NOTE: Delete this line 'use-g2d=true' in /etc/xdg/weston/weston.ini, and reboot, it will use g3d render.
- push the whole surround-view folder to i.MX95 EVK
- Set the environment parameter:
export LD_LIBRARY_PATH=/usr/lib/plugins/wayland-shell-integration/
- Go to the App/Build folder, Copy the calibration file.
cp -r ../Content/calibration_files/* ./
- Execute the 'SV3D-1.4_cameras' binary.
In this demo, an enclosure printed by 3D printer is used to fix the camera positions. If you don’t have this enclosure, you need to find a way to fix the camera.
Here is the demo using camera input:
Demo using video input:
This demo requires aligning 4 camera previews, in L6.6.52, libcamera don't support the configuration of the camera orientation. We can change the sensor driver to ajust the camera orientation:
drivers/media/i2c/ox03c10.c
- { 0x3820, 0x20 }, { 0x3821, 0x19 }, { 0x3832, 0x00 }, { 0x3834, 0x00 }, { 0x384c, 0x02 },
+ { 0x3820, 0x00 }, { 0x3821, 0x19 }, { 0x3832, 0x00 }, { 0x3834, 0x00 }, { 0x384c, 0x02 },
libcamera will support camera orientation configuration in the future release.
Version | Description | Date | tag |
---|---|---|---|
1.0.0 | Initial release | Mar 11th 2025 | imx_ec_sv_v1.0 |
i.MX Surround View is licensed under the BSD_3_Clause.