driving.connector.Connector class

Package: driving.connector

Interface to connect external tool to Ground Truth Labeler app

Description

The driving.connector.Connector class creates an interface between a custom visualization or analysis tool and the Ground Truth Labeler app.

The driving.connector.Connector class is a handle class.

Creation

The Connector class that is inherited from the Connector interface is called a client.

The client can:

  • Sync an external tool to each frame change event in the Ground Truth Labeler. Syncing allows you to control the external tool through the range slider and playback controls of the app.

  • Control the current time in the external tool and the corresponding display in the app.

  • Export custom labeled data from an external tool via the app.

To connect an external tool to the Ground Truth Labeler app, follow these steps:

  1. Define a client class that inherits from driving.connector.Connector. You can use the Connector class template to define a class and implement your custom visualization or analysis tool. At the MATLAB® command prompt, enter:

    driving.connector.Connector.openTemplateInEditor
    Follow the steps found in the template.

  2. Save the file to any folder on the MATLAB path. Alternatively, save the file to a folder and add the folder to MATLAB path by using the addpath function.

Properties

expand all

Start time of the source video file, specified as a real scalar in seconds.

Attributes:

GetAccess
public
SetAccess
private

End time of the source video file, specified as a real scalar in seconds.

Attributes:

GetAccess
public
SetAccess
private

Start time of the video interval in the app, specified as a real scalar in seconds. To set the start time, use the start flag interval in the app.

Attributes:

GetAccess
public
SetAccess
private

Time of the video frame currently displaying in the app, specified as a real scalar in seconds.

Attributes:

GetAccess
public
SetAccess
private

End time of the video in the app, specified as a real scalar in seconds. To set the end time, use the end flag interval in the app.

Attributes:

GetAccess
public
SetAccess
private

Timestamps for the loaded video, specified as an array.

Attributes:

GetAccess
public
SetAccess
private

Label data imported from the external tool, specified as a two-column table. The first column contains the timestamps and the second column contains the label information that you specify for the corresponding timestamp.

Attributes:

GetAccess
public
SetAccess
private

Names of labels, specified as a character vector, a string scalar, a cell array of character vectors, or a string array. These names must be valid MATLAB variables that correspond to the label names specified in the second column of LabelData.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true

Descriptions of labels, specified as a character vector, a string scalar, a cell array of character vectors, or a string array. Each description of LabelDescription corresponds to a label specified in LabelName.

Attributes:

GetAccess
public
SetAccess
public

Methods

expand all

Examples

collapse all

Connect a lidar data visualization tool to the Ground Truth Labeler app. Use the app and tool to display synchronized lidar and video data. To use another set of data, modify the MATLAB code in this example.

Specify the video name to display in the Ground Truth Labeler.

videoName = '01_city_c2s_fcw_10s.mp4';

Add the path to the lidar display data.

addpath(fullfile(matlabroot,'toolbox','driving','drivingdemos'));

Connect the lidar display to the Ground Truth Labeler.

groundTruthLabeler(videoName,'ConnectorTargetHandle',@LidarDisplay);

Introduced in R2017a