Load signals from point cloud sequence sources into Lidar Labeler app
vision.labeler.loading.PointCloudSequenceSource class creates an
interface for loading a signal from a point cloud sequence data source into the Lidar Labeler app. In the Select Point Cloud dialog box of the app, when
Source Type is set to
Point Cloud Sequence,
this class controls the parameters in that dialog box.
To access this dialog box, in the app, select Import > Add Point Cloud.
This class loads point cloud sequences composed of PCD or PLY files.
vision.labeler.loading.PointCloudSequenceSource class is a
When you export labels from a Lidar Labeler app session that contains a point
cloud sequence source, the exported
groundTruthLidar object stores an
instance of this class in its
To create a
PointCloudSequenceSource object programmatically, such as
when programmatically creating a
groundTruthLidar object, use the
vision.labeler.loading.PointCloudSequenceSource function (described
pcSeqSource = vision.labeler.loading.PointCloudSequenceSource
PointCloudSequenceSource object for loading a signal from a
point cloud sequence data source. To specify the data source and the parameters required
to load the source, use the
Name— Name of source type
"Point Cloud Sequence"(default) | string scalar
Name of the type of source that this class loads, specified as a string scalar.
Description— Description of class functionality
"A PointCloud sequence reader"(default) | string scalar
Description of the functionality that this class provides, specified as a string scalar.
SourceName— Name of data source
(default) | string scalar
Name of the data source, specified as a string scalar. Typically,
SourceName is the name of the file from which the signal is
SourceParams— Parameters for loading point cloud sequence signal from data source
(default) | structure
Parameters for loading a point cloud sequence signal from a data source, specified as a structure.
This table describes the required and optional fields of the
|Field||Description||Required or Optional|
Timestamps for the point cloud sequence signal, specified as a cell
array containing a single
In the Select Point Cloud dialog box of the app, if
you set the Timestamps parameter to
If you set the Timestamps
SignalName— Names of signals in data source
(default) | string vector
Names of the signals that can be loaded from the data source, specified as a string vector.
SignalType— Types of signals in data source
(default) | vector of
Types of the signals that can be loaded from the data source, specified as a vector of
vision.labeler.loading.SignalType enumerations. Each signal listed in the
SignalName property is of the type in the corresponding position of
Timestamp— Timestamps of signals in data source
(default) | cell array of
Timestamps of the signals that can be loaded from the data source, specified as a cell array
duration vectors. Each signal listed in the
SignalName property has the timestamps in the corresponding
NumSignals— Number of signals in data source
0(default) | integer
Number of signals that can be read from the data source, specified as a nonnegative integer.
NumSignals is equal to the number of signals in the
Customize the loading panel for the data source object. In the loading dialog box of the app, this method is invoked when you select the data source type from the Source Type list.
Obtain the data needed to load the data source object currently selected in the loading panel. In the loading dialog box of the app, this method is invoked when you add a source. The method returns these outputs.
[sourceName,sourceParams] = getLoadPanelData(sourceObj)
Both of these outputs are passed to the
Load a data source object into the app. In the loading dialog box of the app, this method is invoked after you add a source and the
Read a frame of data from a signal contained in a data source object at the specified timestamp index. The index must be in the bounds of the length of the timestamps for that signal.
frame = readFrame(sourceObj,signalName,tsIndex)
Check the load panel for the loading dialog box of the app. This method opens a dialog box similar to the loading dialog box that you open from the Open menu on the app toolstrip. Use this method to preview how the
Specify the path to a folder containing a point cloud sequence.
pcSeqFolder = fullfile(toolboxdir('vision'),'visiondata', ... 'pcdmapseq');
Create a point cloud sequence source. The sequence does not have a separate timestamps file to load with it, so specify the source parameters as empty. Load the folder path and the empty source parameters into the
sourceName = pcSeqFolder; sourceParams = ; pcseqSource = vision.labeler.loading.PointCloudSequenceSource; loadSource(pcseqSource,sourceName,sourceParams)
Read the first frame in the sequence. Display the frame.
signalName = pcseqSource.SignalName; pc = readFrame(pcseqSource,signalName,1); figure pcshow(pc)