Method and apparatus for calibrating extrinsic parameter of a camera
View Patent ↗This disclosure relates to the field of artificial intelligence, and in particular, to the field of autonomous driving, and provides a method and apparatus for calibrating an extrinsic parameter of a camera. The method includes: obtaining a photographed image photographed by the camera, the photographed image being an image photographed by the camera using a calibration reference object as a photographed object; and obtaining extrinsic parameters of the camera based on the photographed image and a high-precision map, the high-precision map including the calibration reference object. The extrinsic parameters of the camera are obtained using the photographed image of the calibration reference object that is photographed by the camera and the high-precision map, so that calibration precision of the extrinsic parameters of the camera can be improved. This disclosure may be applied to an intelligent vehicle, a connected vehicle, a new energy vehicle, or an autonomous vehicle.
1 . A method for calibrating extrinsic parameters of a camera, comprising:
obtaining a photographed image photographed by the camera, the photographed image being photographed using a calibration reference object as a photographed object; and
obtaining the extrinsic parameters of the camera based on the photographed image and a high-precision map, the high-precision map comprising the calibration reference object;
wherein the obtaining the extrinsic parameters of the camera based on the photographed image and the high-precision map comprises:
obtaining two-dimensional coordinates of the calibration reference object on the photographed image;
determining a location of the camera on the high-precision map based on positioning information of the camera and obtaining a location of the calibration reference object on the high-precision map based on the location of the camera on the high-precision map and based on:
obtaining candidate target road feature objects on the high-precision map based on the location of the camera on the high-precision map;
extracting a geometric feature of each of the calibration reference object on the photographed image; and
comparing a geometric feature of each road feature object in the candidate target road feature objects using the geometric feature of the calibration reference object to select the calibration reference object using a result of the comparing, wherein a location of a corresponding candidate target road feature object on the high-precision map is used as the location of the calibration reference object on the high-precision map;
obtaining three-dimensional coordinates of the calibration reference object relative to the camera based on the location of the calibration reference object on the high-precision map, wherein the high-precision map has a function of generating relative locations of two location points on the high-precision map, and wherein the obtaining the three-dimensional coordinates of the calibration reference object relative to the camera based on the location of the calibration reference object on the high-precision map includes generating the three-dimensional coordinates of the calibration reference object relative to the camera by using the high-precision map based on the location of the camera on the high-precision map and the location of the calibration reference object on the high-precision map; and
obtaining the extrinsic parameters of the camera through calculation based on the two-dimensional coordinates and the three-dimensional coordinates.
2 . A method for calibrating extrinsic parameters of a camera, comprising:
obtaining a photographed image photographed by the camera, the photographed image being photographed using a calibration reference object as a photographed object, wherein the calibration reference object is a road feature object;
obtaining the extrinsic parameters of the camera based on the photographed image and a high-precision map, the high-precision map comprising the calibration reference object, and wherein the obtaining the extrinsic parameters of the camera based on the photographed image and the high-precision map comprises:
obtaining a plurality of groups of camera parameters, wherein each group of camera parameters comprises intrinsic parameters, distortion parameters, and extrinsic parameters;
generating a plurality of road feature projection images using the high-precision map based on the plurality of groups of camera parameters and the positioning information of the camera;
obtaining, from the plurality of road feature projection images, a matched road feature projection image that has a highest degree of matching with the photographed image; and
obtaining the extrinsic parameters of the camera based on one group of camera parameters corresponding to the matched road feature projection image.
3 . The method according to claim 2 , wherein the obtaining the plurality of groups of camera parameters comprises:
generating, using an initial value of a rotation matrix of the camera as a reference, a plurality of groups of rotation matrix simulated values using a preset step; and
generating the plurality of groups of camera parameters based on the plurality of groups of rotation matrix simulated values.
4 . The method according to claim 2 , wherein the road feature object on the high-precision map is a binary image, and the obtaining, from the plurality of road feature projection images, the matched road feature projection image that has the highest degree of matching with the photographed image comprises:
obtaining a binary image of the photographed image; and
obtaining, from the plurality of road feature projection images, the matched road feature projection image that has the highest degree of matching with the binary image of the photographed image.
5 . The method according to claim 1 , wherein the camera is a vehicle-mounted camera, and a vehicle on which the camera is carried is in a moving state.
6 . An apparatus for calibrating extrinsic parameters of a camera, comprising:
a memory storing instructions; and
at least one processor in communication with the memory, the at least one processor configured, upon execution of the instructions, to perform the following steps:
obtaining a photographed image photographed by the camera, the photographed image being photographed using a calibration reference object as a photographed object; and
obtaining the extrinsic parameters of the camera based on the photographed image and a high-precision map,
the high-precision map comprising the calibration reference object, wherein the obtaining the extrinsic parameters of the camera based on the photographed image and the high-precision map comprises:
obtaining two-dimensional coordinates of the calibration reference object on the photographed image;
determining a location of the camera on the high-precision map based on positioning information of the camera and obtaining a location of the calibration reference object on the high-precision map based on the location of the camera on the high-precision map and based on:
obtaining candidate target road feature objects on the high-precision map based on the location of the camera on the high-precision map;
extracting a geometric feature of the calibration reference object on the photographed image; and
comparing a geometric feature of each road feature object in the candidate target road feature objects using the geometric feature of the calibration reference object to select the calibration reference object using a result of the comparing, wherein a location of a corresponding candidate target road feature object on the high-precision map is used as the location of the calibration reference object on the high-precision map;
obtaining three-dimensional coordinates of the calibration reference object relative to the camera based on the location of the calibration reference object on the high-precision map, wherein the high-precision map has a function of generating relative locations of two location points on the high-precision map, and wherein the obtaining the three-dimensional coordinates of the calibration reference object relative to the camera based on the location of the calibration reference object on the high-precision map includes generating the three-dimensional coordinates of the calibration reference object relative to the camera by using the high-precision map based on the location of the camera on the high-precision map and the location of the calibration reference object on the high-precision map; and
obtaining the extrinsic parameters of the camera through calculation based on the two-dimensional coordinates and the three-dimensional coordinates.
7 . The apparatus according to claim 6 , wherein the camera is a vehicle-mounted camera, and a vehicle on which the camera is carried is in a moving state.
8 . A vehicle, comprising:
a camera; and
an apparatus for calibrating extrinsic parameters of the camera according to the method of claim 1 .
9 . The vehicle according to claim 8 , wherein the vehicle is in a moving state.
10 . The method according to claim 2 , wherein the obtaining the plurality of groups of camera parameters comprises:
generating, using a rotation matrix and a translation matrix of the camera, separately, as a reference, a plurality of groups of rotation matrix simulated values and a plurality of groups of translation matrix simulated values using a preset step; and
generating the plurality of groups of camera parameters based on the plurality of groups of rotation matrix simulated values and the plurality of groups of translation matrix simulated values.
11 . The method according to claim 1 , wherein the positioning information of the camera is obtained by utilizing a real-time kinematic (RTK) technology based on satellite location, or a matching location technology based on vision radar or a laser radar.
12 . The method according to claim 2 , wherein matching the road feature projection image with the photographed image includes calculating an average pixel deviation between the road feature projection image and the photographed image.