Main Content

vision.labeler.loading.MultiSignalSource Class

Namespace: vision.labeler.loading
Superclasses: matlab.mixin.Heterogeneous

Interface for loading signal data into Ground Truth Labeler app

Since R2020a

Description

The vision.labeler.loading.MultiSignalSource class creates an interface for loading signals from a data source into the Ground Truth Labeler app. The data source can be a file format or any custom source.

The interface created using this class enables you to customize the panel for loading custom data sources in the Add/Remove Signal dialog box of the app. The figure shows a sample loading panel.

Add/Remove Signal dialog box

The class also provides an interface to read frames from loaded signals. The app renders these frames for labeling.

To define a custom class to load a data source into the app, follow these steps.

  1. Create a class that inherits from the vision.labeler.loading.MultiSignalSource class. The class definition must have this format, where customSourceClass is the name of your custom data source class.

    classdef customSourceClass < vision.labeler.loading.MultiSignalSource

  2. Save the class to this folder, where matlabroot is the full path to your MATLAB® installation folder as returned by the matlabroot function.

    <matlabroot>\toolbox\vision\vision\+vision\+labeler\+loading

    Alternatively, create a +vision/+labeler/+loading folder structure, add these folders to the MATLAB search path, and save the class to the +vision/+labeler/+loading folder. The Ground Truth Labeler app recognizes data source classes in folders with this path only.

  3. Define the class properties and methods required to load the data source into the app. This table shows the predefined custom classes that you can use as starting points for defining these properties and methods.

    ClassData Source Loaded by ClassCommand to View Class Source Code
    vision.labeler.loading.VideoSourceVideo file
    edit vision.labeler.loading.VideoSource
    vision.labeler.loading.ImageSequenceSourceImage sequence folder
    edit vision.labeler.loading.ImageSequenceSource
    vision.labeler.loading.VelodyneLidarSourceVelodyne® packet capture (PCAP) file
    edit vision.labeler.loading.VelodyneLidarSource
    vision.labeler.loading.RosbagSourceRosbag file
    edit vision.labeler.loading.RosbagSource
    vision.labeler.loading.PointCloudSequenceSourcePoint cloud sequence folder
    edit vision.labeler.loading.PointCloudSequenceSource
    vision.labeler.loading.CustomImageSourceCustom image format
    edit vision.labeler.loading.CustomImageSource

    For an explanation of the required properties and methods used for defining a custom data source class, see the Create Class for Loading Custom Ground Truth Data Sources example.

The vision.labeler.loading.MultiSignalSource class is a handle class.

Class Attributes

Abstract
true

For information on class attributes, see Class Attributes.

Properties

expand all

Name of the type of source that this class loads, specified as a string scalar.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Description of the functionality that this class provides, specified as a string scalar.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Name of the data source, specified as a string scalar. Typically, SourceName is the name of the file from which the signal is loaded.

Attributes:

GetAccess
public
SetAccess
protected

Parameters for loading signals from the data source into the app, specified as a structure. The fields of this structure contain values that the loadSource method requires to load the signal.

Attributes:

GetAccess
public
SetAccess
protected

Names of the signals that can be loaded from the data source, specified as a string vector.

Attributes:

GetAccess
public
SetAccess
protected

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 SignalType.

Attributes:

GetAccess
public
SetAccess
protected

Timestamps of the signals that can be loaded from the data source, specified as a cell array of duration vectors. Each signal listed in the SignalName property has the timestamps in the corresponding position of Timestamp.

Attributes:

GetAccess
public
SetAccess
protected

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 SignalName property.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Methods

expand all

Version History

Introduced in R2020a