Label ground truth data in lidar point clouds
The Lidar Labeler app enables you to label objects in a point cloud or a point cloud sequence. The app reads point cloud data from PLY, PCAP, LAS, LAZ, ROS and PCD files. Using the app, you can:
Define cuboid region of interest (ROI), line, voxel ROI labels, and scene labels. Use them to interactively label your ground truth data.
Define attributes for the labels and use them to provide further detail about the labels.
Use built-in algorithms for clustering, ground plane segmentation, automated labeling, and tracking.
Save label definitions, point cloud data, and ground truth data to a session file for future use.
Use the Projected View option to view the labels in top, front and side views simultaneously.
Use the Camera View option to create and reuse custom views of the point cloud data.
Use the Auto Align option to rotate and best fit the cuboid to the cluster.
lidar.syncImageViewer.SyncImageViewerclass to sync the app to an external visualization or analysis tool.
Write, import, and use a custom automation algorithm for automated labeling.
Evaluate the performance of your label automation algorithms with a visual summary.
Export the labeled ground truth as a
groundTruthLidarobject. This object can be used for system verification and training an object detector.
To learn more about this app, see Get Started with the Lidar Labeler.
Open the Lidar Labeler App
MATLAB® Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the app icon.
MATLAB command prompt: Enter
lidarLabeler opens a new session of the app, enabling you to label
ground truth data in point clouds.
opens the app and loads the
lidarLabeler(ptCloudSeqFolder) opens the app and loads the point
cloud sequence from the folder
ptCloudSeqFolder is a string scalar or character vector specifying a
folder that contains point cloud files. The point cloud files must have extensions supported
pcformats, and are loaded in the order returned by the
lidarLabeler(lasSeqFolder) opens the app and loads the LAS sequence
from the folder
lasSeqFolder is a
string scalar or character vector specifying a folder contains LAS files. LAS files must
have extensions supported by
lasformats, and are loaded in the order
returned by the
opens the app and loads both of these components:
A point cloud signal, specified using any of the input argument combinations from previous syntaxes.
An external video or image sequence display tool that is time-synchronized with the specified point cloud signal.
syncImageViewer input is a handle to a
lidar.syncImageViewer.SyncImageViewer class that implements the external
For example, this code opens the app with a point cloud signal and synchronized video visualization tool.
sourceName = fullfile(toolboxdir('lidar'),'lidardata','lcc', ... 'HDL64','pointCloud'); lidarLabeler(sourceName,'SyncImageViewerTargetHandle',@SyncImageDisplay)
lidarLabeler(sessionFile) opens the app and loads a saved app
contains the path and file name of a MAT-file. The MAT-file that
sessionFile points to contains the saved session.
lidarLabeler(gTruth) opens the app and loads a
groundTruth object .
The labels do not support sublabels.
The Label Summary window does not support sublabels.
ROI Labels and Attributes
On the left side of the app, the ROI Labels pane contains the ROI
label definitions that you can mark on the point cloud frames. You can create label
definitions directly from this pane. Alternatively, you can create label definitions
programmatically by using a
labelDefinitionCreatorLidar object and then import these label definitions into
an app session.
The app supports the definition of ROI labels and attributes.
An ROI label is a label that corresponds to an ROI in a signal frame. This table describes the supported label type.
Draw cuboidal ROI labels around objects.
|Draw line labels.||
|Draw voxel ROI labels around objects.||
You can show or hide the labels by using the icon on the ROI Labels pane.
The appears only after you define a label. By default, the app displays all the labels. To hide a label, click on the icon alongside the label name. The app hides the corresponding label and displays the icon.
|Show Label||Hide Label|
An ROI attribute specifies additional information about an ROI label. For example, in a driving scene, attributes might include the type or color of a vehicle. This table describes the supported attribute types.
|Attribute Type||Sample Attribute Definition||Sample Default Values|
lidar.syncImageViewer.SyncImageViewerclass to create a tool for viewing the image corresponding to the point cloud data.
Remove the ground plane to clearly view the created object labels.
Use the rotate, translate, expand, and shrink options to edit the cuboids after drawing them.
Use the Camera View option to save the a view of the data from the current angle and direction.
To avoid having to relabel ground truth with new labels, organize the labeling scheme you want to use before you begin marking your ground truth.
You can copy and paste the labels between signals that are of the same type.
Introduced in R2020b