Vehicle Lidar Calibration
Last updated
Last updated
The API requires the client to upload the PCD (pcap, csv, and bin are also supported), and configuration for vehicle lidar setup in a zip file (.zip extension) in the format defined below. The contents of the zip file are called a dataset.
The client makes an Upload and calibrate API call, which uploads their files and runs the calibration algorithm on the lidar files for the given configuration.
The calibration process is completed without errors if the response to the Upload and calibrate API call will contain datasetId and Status as Done.
The client can call the Get Extrinsic Parameters API using the datasetId obtained from the Upload response and calibrate API. This API responds with the various extrinsic parameters, error stats, and the query's status.
We require image and lidar frame pairs from the camera and lidar for a given calibration.
Place the images captured from the camera in a folder.
Place the Lidar data captured from the LiDAR in a folder.
config.json contains configuration details of the calibration (intrinsic parameters, calibration name, etc.)
The names of the folders and the images shown here are for demonstration purposes. Users should avoid using space in the folder and the image names.
The name of the JSON file should be config.json (case sensitive)
Key | Value type | Description |
calibration_name | string | Name of the calibration |
calibration_type | string | Non-editable field.*Value should be lidar_camera_calibration |
multi_target | boolean | true: if multiple targets are used false: if single target is used |
max_correspondence | double | Accepted range is from 0 to 1 |
deep_optimisation | Boolean | Performs optimisation for the board edges. true: If tilted = true and deep optimisation is needed false: If deep optimisation is not required or the tilted = false |
lidar_name | string | It is the name given by the client to the lidar. The client can modify it as willed. |
camera_name | string | It is the name given by the client to the camera. The client can modify it as willed. |
lens_model | string | Describes the type of lens used by the camera. Accepted values
|
fx | double | Focal length of the cameras in the X-axis. Value in pixels. |
fy | double | Focal length of the camera in the Y-axis. Value in pixels. |
cx | double | Optical centre of the camera in the X-axis. Value in pixels. |
cy | double | Optical centre of the camera in the Y-axis. Value in pixels. |
distortion_enabled | boolean | Makes use of distortion coefficients (k1, k2, k3, k4, p1, p2) for the calibration algorithm when set true. Distortion coefficients (k1, k2, k3, k4, p1, p2) are not required if it is false. |
k1, k2, k3, k4, p1, p2 | double | These are the values for distortion coefficients of the camera lens.Note:
|
targets | Object | It is a dictionary of dictionary with each dictionary having target properties |
type | string | Describes the type of target used. Accepted values
|
x | integer | number of horizontaol corners in the checkerboard (this property is needed if the type = checkerboard) |
y | integer | number of vertical corners in the checkerboar (this property is needed if the type = checkerboard) |
rows | integer | number of horizontaol squares in the charucoboard (this property is needed if the type is charucoboard) |
columns | integer | number of vertical squares in the charucoboard (this property is needed if the type is charcuboard) |
square_size | double | Size of each square in meters |
marker_size | double | The size of marker in a charucoboard in meters ( Normally it is 0.8 times of square size ) (this property is needed if the type is charucoboard) |
dictionary | string | It is the string that defines the charuco dictionary of the target. We support
This property is needed if the type is charucoboard |
padding_right | double | padding to the right of the board |
padding_left | double | padding to the left of the board |
padding_top | double | padding to the top of the board |
padding_bottom | double | padding to the bottom of the board |
on_ground | Boolean | true: if the board is kept on ground false: if the board is not on the ground |
tilted | Boolean | true: if the board is tilted false: if the board is not tilted |
data | Object | It stores the data related to mapping of the camera and the lidar files |
mappings | List of lists | It is a list of lists, where each sub-list is a tuple containing names of the image and pcd paired together. Note:
|
extrinsic_params_initial_estimates | Object with all values as double | The estimated extrinsic parameters which will be optimised during calibration process.
|
Before invoking the APIs, the client must obtain the clientId and auth token from Deepen AI. If you are a calibration admin, you can create different Access Tokens using the UI and use those instead. clientId is part of the path parameters in most API calls, and the auth token should be prefixed with “Bearer “ and passed to the ‘Authorization’ header in all API requests. How to get Access Tokens can be found on the following link: Access token for APIs
This API sends a zip file to the server and runs the calibration algorithm. Returns datasetId, extrinsic parameters, and status to the user as the response.
URL
POST https://tools.calibrate.deepen.ai/api/v2/external/clients/{clientId}/calibration_dataset
Request
Path parameters
Parameter name | Parameter type | Description |
---|---|---|
clientId | string | ClientId obtained from Deepen AI |
Body
Key | Value | Description |
---|---|---|
file | .zip file | Zip file containing config and images in a suitable format |
Response
JSON file containing dataset_id and status of the calibration.
Response object:
Key | Status |
dataset_id | A unique value to identify the dataset. dataset_id can be used to retrieve the extrinsic parameters. |
status | Current status of the dataset.
|
Returns the extrinsic parameters, error statistics, and the query's status.
URL
GET https://tools.calibrate.deepen.ai/api/v2/external/datasets/{datasetId}/extrinsic_parameters
Request
Path parameters
Parameter name | Parameter type | Description |
---|---|---|
datasetId | string | datasetId obtained from the response of Upload file and calibrate API. |
Response
Returns a JSON dictionary containing datasetId, extrinsic parameters, error statistics, and query status.
Response Object:
Key | Description |
---|---|
dataset_id | A unique value to identify the dataset. dataset_id can be used to retrieve the extrinsic parameters. |
extrinsic_parameters | roll, pitch, and yaw are given in degrees and px, py, and pz are given in meters. |
error_stats | translation_error: Mean of difference between the centroid of points of checkerboard/charucoboard in the LiDAR and the projected corners in 3-D from an image rotation_error: Mean of difference between the normals of the checkerboard/charucoboard in the point cloud and the projected corners in 3-D from an image reprojection_error: Mean of difference between the centroid of image corners and projected lidar checkerboard/charucoboard points on the image in 3-D |