Introduction
With the development of autonomous driving technology, more and more people are being exposed to newer technologies, and are increasingly curious about how the computer world actually achieves autonomous driving. They are also curious about how some of the features that come with autonomous driving systems are implemented. This time, we will explain and practice the algorithm logic behind the "360° reversing camera" in the system.
Inverse Perspective Mapping
When capturing the image, the vehicle calls multiple cameras and stitches them into a "360° panoramic photo".
To form the top-down view of the "360° reversing camera", a mathematical operation is required, which is Inverse Perspective Mapping, or IPM for short.
In this field, there are many IPM transformation methods, such as the "corresponding point homography transformation method" and the "simplified camera model inverse perspective transformation", but they all use matrix transformation rules.
Corresponding Point Homography Transformation Method
This transformation method is relatively simple, so we won't describe it in too much detail.
Input at least four corresponding point pairs, with no three or more points being collinear. No information about the camera parameters or the plane position is needed. Using the point pairs, solve for the perspective transformation matrix, where the matrix is a third-order square matrix, so a linear equation can be constructed to solve it. If there are more than four points, the method can be used to solve it, and the point selection method is usually manual, typically by selecting vanishing points.

This transformation is relatively simple to implement in code, and the IPM transformation can be implemented relatively easily. We won't go into too much detail here, and we won't provide a code example either.
Simplified Camera Model IPM Method
This is the transformation method we will focus on this time. The essence of this algorithm is to use the conversion relationships between various coordinates during the camera imaging process, then abstract and simplify it, finally obtaining the world coordinates.
Then, establish the correspondence between world coordinates and image coordinates, and use this relationship to perform the mathematical transformation.

Unlike some complex and lengthy calculation formulas, we still use coordinate operations here. For this IPM calculation method, we need to first measure the actual camera parameters.
Here, the elevation angle is , the center height is , and the distance from the viewpoint to the view plane is . Then, we find the world coordinate .
Assume the camera image coordinate is , and establish the matrix equation based on the relationship between world coordinates and image coordinates,
Substitute the image coordinates into equation to find the matrix of world coordinates, i.e.,
Let , , , , and . From the geometric relationship, we know that . The simplest form of is
Finally, process the image. Since the image being processed is a two-dimensional plane image, the image depth is always 0. According to , we only need to substitute the horizontal and vertical coordinates of the array to obtain the coordinate values in world coordinates, which is the top-down view after IPM.
