主要内容

Load and View Point Cloud Data

R2026b

Open Lidar Labeler App

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

lidarLabeler

Alternately, you can open the app from the Apps tab of the MATLAB toolstrip, under Image Processing and Computer Vision. The app opens to an empty session.

Import Point Cloud Data

You can load point clouds from multiple types of data sources into the Lidar Labeler app. On the app toolstrip, select Import > Add Point Cloud > From File to open the Select Point Cloud dialog box, when enables you to specify a file from which to load a point cloud.

Import Point Cloud Sequence

In the Select Point Cloud dialog box, the default value of Source Type parameter is Point Cloud Sequence.

Select Point Cloud dialog box.

  1. To specify Folder Name parameter, select Browse and navigate to the folder that contains the sequence of point cloud data (PCD) files you want to load and click Select Folder.

  2. To specify timestamps using a MATLAB workspace variable, set the Timestamps parameter to From Workspace and, in the Import From Workspace dialog box, select a variable with the duration data type and click OK. Otherwise, set Timestamps to Use Default.

    Import From Workspace dialog box.

  3. In the Select Point Cloud dialog box, select OK. The app loads the specified point cloud sequence.

Note

When Source Type is Point Cloud Sequence, the app reads point cloud frames lexicographically, where the arrangement of characters, words, or numbers is in alphabetical order.

Other Import Options

You can also import data from these sources into the app.

To load data from Velodyne Lidar sensors, you must additionally specify the calibration file and the device model for the sensor.

Import Velodyne Lidar dialog box

You can load data from a custom source by specifying a custom reader function. Specify Source Name as the path to the data folder.

Import Custom Point Cloud dialog box

Specify the Folder Name, and Timestamps parameters.

Import E57 dialog box

Specify the File Name, Calibration File, Device Model, and Timestamps parameters.

Import Hesai lidar dialog box

Specify File Name of a LAS or LAZ file. To import classification attributes stored in the LAS/LAZ file, select Use classification attribute to create labels and label definitions parameter. The app automatically creates voxel labels and label definitions. For more information on classification categories of a LAS/LAZ file, see Classification.

Import LAS dialog box

Specify the File Name, Calibration File, and Timestamps parameters.

Import Ouster lidar dialog box

Specify Folder Name as the path to a folder containing rosbag file.

Import Rosbag dialog box

Alternately, select Import > Add Point Cloud > From Workspace to import data from the MATLAB workspace.

Visualize Point Cloud Data

Labeling 3-D point cloud data is a challenging task due to the sparse and unstructured nature of the data. The Lidar Labeler app provides a variety of visualization options on the LIDAR tab of the app toolstrip, enabling you to more easily label 3-D data points.

Color Controls

On the LIDAR tab of the app toolstrip, you can choose color options to control the display of the point cloud.

Colormap section on app toolstrip

Choose the color profile for the point cloud data, from these options.

Colormap options

The app enables the ColorData option only when the input point cloud data has color information.

Choose how the color profile applies to the point cloud, from these options:

Colormap Value options

  • Z Height — The color changes as the distance between points increases.

  • Radial Distance — The color changes as the distance between points and the ego vehicle increases.

Choose a background color for the point cloud.

ROI View Options

On the Lidar tab of the app toolstrip, you can choose options to select, reset, or save a region of interest (ROI) for the point cloud data.

ROI View options

Click Select ROI to define and view a region of interest (ROI) in the point cloud. The app opens the Adjust ROI Limits dialog box, which contains the ROI parameters. Specify the x-, y-, and z-axes limits for the ROI. The dialog box also visualizes the rectangular ROI on the xy-axes of a point cloud. You can also adjust x- and y-limits for the ROI by dragging and resizing the rectangle on the xy-plane.

Dialog box to adjust ROI limits

To reset the axis limits to the default values, click Reset ROI.

To save the selected ROI, click Save ROI. The app opens the Save ROI View dialog box. Enter a name for the ROI view and click OK.

Save ROI View dialog box

To view a previously saved ROI, from the Save ROI list, select the desired view.

List of saved ROI views

Camera View Options

Use these camera options to view, adjust, and compare your point cloud and label data.

Camera views

Use projected view to adjust the cuboid label in top-view, side-view and front-view simultaneously. For more information on how to create labels and label definitions, see Create and Export Labels and Label Definitions.

Projected view of point cloud data

View the xy-axes of a point cloud. This is the top view of the scene, line of sight is along z axis.

XY View of a driving scene

View the yz-axes of a point cloud. This is the front view of the scene, line of sight is along x axis.

YZ View of a driving scene

View the xz-axes of a point cloud. This is the side view of the scene, line of sight is along y axis.

XZ View of a driving scene

View from a high angle above a point cloud.

Bird's Eye View of a driving scene

View the point cloud from a fixed distance behind the ego vehicle (actor).

Chase View of a driving scene

View a point cloud from the perspective of the ego vehicle.

Ego View of a driving scene

Use the Ego Direction list to select the direction the camera faces for Ego View and Chase View.

Camera View Drop-down

Select Camera View to save and reuse custom views of the point cloud data. You can interactively rotate, pan, and zoom the camera to create a view, then save the view by clicking Camera View and selecting Save Camera View. Specify a name for the view and select OK. You can return to the saved view at any time by clicking Camera View and selecting the saved view from the list. Select Organize Camera Views from the list to delete or rename the saved views.

To restore the point cloud display to the default view, click Camera View, and then click Restore Default Camera View. Note that the default camera view does not restore the default values of the axis limits. You must click Reset ROI to reset the axis limits.

Point Size Option

To adjust the displayed point size of the point cloud, specify the value of the Point Size parameter.

Point size parameter

Ground View Options

Lidar Labeler ground views

  1. Set Ground View to specify whether the visualization displays all the points, only the ground points, or only the nonground points in the point cloud.

  2. Select Ground Settings to change the ground segmentation algorithm and tune the corresponding parameters.

    Lidar Labeler ground settings dialog

  3. In the Hide Ground dialog box, select a segmentation algorithm from the list. The dialog box then displays the parameters for the selected algorithm, along with their values, and a slider for each with which to adjust that parameter value, to fine-tune your ground segmentation results. The app supports these algorithms:

    • Segment ground SMRF (default) — Segment the ground plane in either organized or unorganized point cloud data using the segmentGroundSMRF function. Use this algorithm for non-uniform ground planes and aerial lidar data. The default parameters have been tuned for aerial data. For ground lidar data, decrease the Max Window Radius parameter to 5 and the Elevation Threshold parameter to a value in the range [0.2, 0.3].

    • Range-based floodfill — Segment the ground plane in organized point cloud data using the segmentGroundFromLidarData function.

    • Fit ground plane — Segment the ground plane in organized point cloud data using the pcfitplane function.

See Also

Apps

Objects

Topics