Main Content

vision.labeler.loading.SignalType

Signal type enumerations for labeling

Since R2020a

Description

The vision.labeler.loading.SignalType enumerations enable you to specify the types of signals used in the Ground Truth Labeler app. When selecting signals from a groundTruthMultisignal object by using the selectLabelsBySignalType function, use these enumerations to select labels of a specific signal type.

Creation

Description

vision.labeler.loading.SignalType.Image creates an enumeration of signal type Image. Use this enumeration to specify image signals obtained from sources such as videos or image sequences.

example

vision.labeler.loading.SignalType.PointCloud creates an enumeration of signal type PointCloud. Use this enumeration to specify lidar point cloud signals obtained from sources such as Velodyne® packet capture (PCAP) files.

vision.labeler.loading.SignalType.Time creates an enumeration of signal type Time. Scene labels are Time signals and are of type duration. You cannot load Time signals into the Ground Truth Labeler app.

Examples

collapse all

Select ground truth labels from a groundTruthMultisignal object by specifying a signal type.

Load a groundTruthMultisignal object containing ROI and scene label data for a video and corresponding lidar point cloud sequence. The helper function used to load this object is attached to the example as a supporting file.

gTruth = helperLoadGTruthVideoLidar;

Inspect the label definitions. The object contains definitions for image, point cloud, and time signals.

gTruth.LabelDefinitions
ans =

  5x7 table

      Name       SignalType    LabelType       Group        Description           LabelColor            Hierarchy  
    _________    __________    _________    ____________    ___________    ________________________    ____________

    {'car'  }    Image         Rectangle    {'Vehicles'}    {0x0 char}     {[0.5862 0.8276 0.3103]}    {1x1 struct}
    {'car'  }    PointCloud    Cuboid       {'Vehicles'}    {0x0 char}     {[0.5862 0.8276 0.3103]}    {1x1 struct}
    {'truck'}    Image         Rectangle    {'Vehicles'}    {0x0 char}     {[     0.5172 0.5172 1]}    {0x0 double}
    {'truck'}    PointCloud    Cuboid       {'Vehicles'}    {0x0 char}     {[     0.5172 0.5172 1]}    {0x0 double}
    {'sunny'}    Time          Scene        {'None'    }    {0x0 char}     {[     0 0.7241 0.6552]}    {0x0 double}

Inspect the ROI labels. The object contains labels for the lidar point cloud sequence and the video.

gTruth.ROILabelData
ans = 

  ROILabelData with properties:

                lidarSequence: [34x2 timetable]
    video_01_city_c2s_fcw_10s: [204x2 timetable]

Create a new groundTruthMultisignal object that contains labels for only point cloud signals.

signalTypes = vision.labeler.loading.SignalType.PointCloud;
gtLabel = selectLabelsBySignalType(gTruth,signalTypes);

For the original and new objects, inspect the first five rows of label data for the lidar point cloud sequence. Because lidar signals are of type PointCloud, the new object contains the same label data for the lidar sequence as the original object.

lidarLabels = gTruth.ROILabelData.lidarSequence;
lidarLabelsSelection = gtLabel.ROILabelData.lidarSequence;

numrows = 5;
head(lidarLabels,numrows)
head(lidarLabelsSelection,numrows)
       Time            car            truck    
    ___________    ____________    ____________

    0 sec          {1x1 struct}    {1x0 struct}
    0.29926 sec    {1x1 struct}    {1x0 struct}
    0.59997 sec    {1x1 struct}    {1x0 struct}
    0.8485 sec     {1x1 struct}    {1x0 struct}
    1.1484 sec     {1x1 struct}    {1x0 struct}

       Time            car            truck    
    ___________    ____________    ____________

    0 sec          {1x1 struct}    {1x0 struct}
    0.29926 sec    {1x1 struct}    {1x0 struct}
    0.59997 sec    {1x1 struct}    {1x0 struct}
    0.8485 sec     {1x1 struct}    {1x0 struct}
    1.1484 sec     {1x1 struct}    {1x0 struct}

For the original and new objects, inspect the first five rows of label data for the video. Because video signals are of type Image, the new object contains no label data for the video.

videoLabels = gTruth.ROILabelData.video_01_city_c2s_fcw_10s;
videoLabelsSelection = gtLabel.ROILabelData.video_01_city_c2s_fcw_10s;

head(videoLabels,numrows)
head(videoLabelsSelection,numrows)
      Time          car            truck    
    ________    ____________    ____________

    0 sec       {1x3 struct}    {1x0 struct}
    0.05 sec    {1x3 struct}    {1x0 struct}
    0.1 sec     {1x3 struct}    {1x0 struct}
    0.15 sec    {1x3 struct}    {1x0 struct}
    0.2 sec     {1x3 struct}    {1x0 struct}

      Time  
    ________

    0 sec
    0.05 sec
    0.1 sec
    0.15 sec
    0.2 sec

Version History

Introduced in R2020a