Create a bird's-eye-view image from an image obtained by a front-facing camera mounted on a vehicle. Display points within the bird's-eye view using the vehicle and image coordinate systems.
Define the camera intrinsics and create an object containing these intrinsics.
Set the height of the camera to be about 2 meters above the ground. Set the pitch of the camera to 14 degrees toward the ground.
Create an object containing the camera configuration.
Define the area in front of the camera that you want to transform into a bird's-eye view. Set an area from 3 to 30 meters in front of the camera, with 6 meters to either side of the camera.
Set the output image width to 250 pixels. Compute the output length automatically from the width by setting the length to NaN
.
Create an object for performing bird's-eye-view transforms, using the previously defined parameters.
Load an image that was captured by the sensor.
Transform the input image into a bird's-eye-view image.
In the bird's-eye-view image, place a 20-meter marker directly in front of the sensor. Use the vehicleToImage
function to specify the location of the marker in vehicle coordinates. Display the marker on the bird's-eye-view image.
Define a location in the original bird's-eye-view image, this time in image coordinates. Use the imageToVehicle
function to convert the image coordinates to vehicle coordinates. Display the distance between the marker and the front of the vehicle.