The road plane and its homography
The vehicle frame has pointing forward, to the left and up, with its origin on the road below the camera. The camera sits at height and is tilted down by the pitch angle . A point in the vehicle frame projects to the pixel where holds the camera intrinsics, rotates the vehicle frame into the camera frame, and is the camera center. On a flat road every point has , so , and the projection becomes linear in : where are the columns of . is a homography from the road plane to the image. Its inverse takes any road pixel back to meters on the ground. Pixels above the horizon have no road point, because their rays never meet the road in front of the camera. The simulated camera has a 1280 by 720 image, a focal length of 900 px, a height of 1.5 m and a pitch of 3°.Calibrating the homography from four points
In the simulation is known. The height and pitch of a real camera are not known to the millimeter, so is usually calibrated on the road itself. On a straight, flat stretch, the centers of the two lane lines are 3.7 m apart, and points along them can be marked at known distances ahead. Four such points determine a homography. The direct linear transform solves for it from the eight linear equations the four pairs give. Here the points sit on both lines at 8 m and 30 m, and each is marked with half a pixel of error.Warping to the bird’s-eye view
The bird’s-eye view is a grid on the road, here from 6 to 36 m ahead and 6 m to each side, at 5 cm per pixel. A second matrix maps a grid pixel to its road point, so maps a grid pixel straight to the camera pixel that sees it. The warp fills each grid pixel by sampling the camera image at that position with bilinear interpolation. This is inverse warping: every output pixel gets exactly one value, and the result has no holes.Finding the lane
In the bird’s-eye view a lane line is a curve in meters. The code thresholds the bright paint and builds a histogram of its lateral positions over the 10 m nearest the car. The peak within 3 m on each side gives the starting position of each line. Sliding windows then follow each line forward. Each window collects the paint pixels near the line, recenters on them, and steps ahead along the line’s direction, which also carries it across the gaps of the dashed line. A quadratic fitted to the collected pixels gives the radius of curvature at the car (), and the lane center at the car is the mean of the two fitted values of .Back to the camera image
To show the result in the camera image, each camera pixel is sent to the road through . The pixel is painted when its road point lies between the two fitted lines and inside the grid. Only the inverse of the same homography is needed.When the road plane moves
The homography is valid only for the road plane it was calibrated on. When the car brakes or drives over a bump it pitches, and the camera’s real pitch no longer matches . Below, the car is pitched 1° nose up, and the image is warped with the calibrated .From a warped image to a bird’s-eye grid
The homography maps only the road plane. Anything with height, such as a car, a pedestrian or a curb, is smeared away from the camera in the warped image, because the homography treats every pixel as a point on the road. Driving stacks therefore treat the bird’s-eye view as a grid to fill rather than an image to warp. Lidar returns are projected into the grid directly. For cameras, networks learn to transform the images of several cameras into one bird’s-eye grid around the car and label each cell, for example as drivable road or as an obstacle. Tesla’s occupancy networks predict a 3D grid of occupied voxels from eight cameras (Elluswamy, 2022). These grids are occupancy grids filled by a learned inverse sensor model, and the planner uses them the same way.References
- Elluswamy, A. (2022). Keynote, Workshop on Autonomous Driving, CVPR 2022. Video.
- Monogioudis, P. (2017). Advanced lane finding. Perspective transform to a bird’s-eye view, sliding-window lane search and curvature estimation.
Found an error on this page? Report an issue.

