Get Started with the Lidar Labeler

The Lidar Labeler app enables you to interactively label ground truth data in a point cloud or a point cloud sequence and generate corresponding ground truth data.

Lidar labeler app screenshot

This example demonstrates the capabilities of the Lidar Labeler app in a lidar ground truth data labeling workflow.

Load Lidar Data to Label

Use the Lidar Labeler app to interactively label point cloud files and sequences of point cloud files.

Open Lidar Labeler App

To open the Lidar Labeler app, at the MATLAB® command prompt, enter this command.

lidarLabeler

The app opens to an empty session.

Alternatively, you can open the app from the Apps tab, under Image Processing and Computer Vision.

Load Signals from Data Sources

The Lidar Labeler app enables you to load signals from multiple types of data sources. In the app, a data source is a file or folder containing one or more signals to label. Use this process to load the data for a point cloud sequence.

  1. On the app toolstrip, click Open > Add point cloud. The Select Pointcloud window opens with the Source Type parameter already set to Point Cloud Sequence.

    Toolstrip to open file

  2. In the Folder Name parameter, browse to the folder that contains the sequence of point cloud data(PCD) files that you want to load and click Select Folder.

  3. If you have a variable of timestamps in the MATLAB workspace, set the Timestamps parameter to From Workspace and, in the Import From Workspace window, select the variable and click OK. Otherwise, set it to Use Default.

    Set timestamps

  4. In the Select Pointcloud window, click OK. The point cloud sequence loads into the app.

Create Labels and Attributes

After loading the point cloud data into the Lidar Labeler app, create label definitions and attributes. Label definitions contain the information about the labels that you wish to annotate the points with. You can create label definitions interactively within the app or programmatically by using a labelDefinitionCreatorLidar object.

Create an ROI Label Definition

An ROI label is a label that corresponds to a region of interest (ROI).

  1. On the ROI Labels tab in the left pane, click Label.

  2. Create a Cuboid label and provide a name for the label.

    Define ROI

  3. From the Group list, select New Group and provide a name for the group. Adding labels to groups is optional.

  4. The specified group name appears on the ROI Labels tab with the specified label name under it.

For more details about these labels, see ROI Labels and Attributes.

Create an ROI Attribute

An ROI attribute specifies additional information about an ROI label. You can define ROI attributes of these types.

  • Numeric Value — Specify a numeric scalar attribute, such as the number of doors on a labeled vehicle.

  • String — Specify a string scalar attribute, such as the color of a vehicle.

  • Logical — Specify a logical true or false attribute, such as whether a vehicle is in motion.

  • List — Specify a drop-down list attribute of predefined strings, such as make or model of a vehicle.

Use this process to create an attribute.

  1. On the ROI Labels tab in the left pane, select a label and click Attribute.

  2. Provide a name in the Attribute Name box. Select the attribute type and click OK.

    Define ROI attribute

For more details about these attributes, see ROI Labels and Attributes.

Create a Scene Label Definition

A scene label defines additional information across a scene. Use scene labels to describe conditions, such as lighting and weather, or events, such as lane changes.

Use this process to create a scene label definition.

  1. Select the Scene Labels tab in the left pane of the app and click Define new scene label.

  2. In the Define new scene label window provide a name for the label.

  3. Choose a Color for the label.

    Define new scene label

  4. From the Group list, select New Group and provide a name for the group. Adding labels to groups is optional.

  5. The Scene Labels pane shows the scene label definition.

Label Point Cloud Using Automation

You can use an automation algorithm to automatically label your data by using one of the included algorithms or by creating and importing a custom automation algorithm. For more details on creating a custom automation algorithm, see Create Automation Algorithm for Labeling. The app includes the Lidar Object Tracker and Point Cloud Temporal Interpolator labeling automation algorithms.

Use this process to label point cloud data using an automation algorithm.

  1. Load the data into the app and create a ROI label definition.

  2. On the LABEL tab of the app toolstrip, in the Automate Labeling section, click Select Algorithm.

    Select algorithm

  3. Select an algorithm for automation.

  4. Click Automate and then follow the automation instructions in the right pane of the app.

View and Adjust the Labels

Once you have created labels for your point cloud data, the app provides options for viewing, adjusting, and comparing your point cloud and label data.

  • On the LIDAR tab of the app toolstrip, click Projected View to view the selected label in front-view, top-view, and side-view simultaneously. Use these views to manually adjust the accuracy of your labels.

    Projected view of point cloud data

  • Enable the Auto Align option to fit the cuboid to the label data and align the label in the direction of the object. This image shows the difference in a label with and without the Auto Align option enabled.

    Label without Auto Align optionLabel with Auto Align option

    No autoalign

    Autoalign

  • Use the Camera View option to save and reuse custom views of the point cloud data. You can rotate, pan, and zoom the view, then save the view by clicking Camera View and selecting Save Camera View. Specify a name for the view and click OK. You can return to the saved view at any time by clicking Camera View and selecting the saved view from the drop-down list.

    Select camera view

    Camera view 1

    Camera view 2

    Camera view 3

  • Connect an external tool to the application to display time-synchronized images for use as reference while labeling. See the lidar.syncImageViewer.SyncImageViewer class.

Export the Labels

On the LABEL tab of the app toolstrip, select Export Labels > To Workspace. In the Export to workspace window, leave the default export variable name, gTruth, and click OK. The app exports a groundTruthLidar object, gTruth, to the MATLAB workspace. This object contains the ground truth lidar label data captured from the app session.

The properties of the groundTruthLidar object, gTruth, contain information about the signal data source, label definitions, and labels from the associated app session. Display information about the object and each of its properties using these commands.

  • gTruth — Display the properties of the groundTruthLidar object.

  • gTruth.DataSource — Display the information about source of the point cloud data.

  • gTruth.LabelDefinitions — Display the table of information about label definitions.

  • gTruth.LabelData — Display the ROI and scene label data.

See Also

Apps

Objects

Related Topics