Interface to connect external tool to Lidar Labeler app
lidar.syncImageViewer.SyncImageViewer class creates an interface
between a custom visualization or analysis tool and a point cloud signal in the Lidar Labeler app. You can use the
SyncImageViewer class to sync video
and image sequence signals to the app only.
SyncImageViewer specifies the interface for connecting an external tool
to the Lidar Labeler app. An external tool can be a
custom visualization tool or custom analysis tool. The class that inherits from the
SyncImageViewer interface is called the client. The
client performs these tasks:
Syncs an external tool to each frame change event for a specific signal loaded into the Lidar Labeler app. Syncing enables you to control the external tool through the range slider and playback controls of the app.
Controls the current time in the external tool and the corresponding display in the app.
To connect an external tool to the Lidar Labeler app, follow these steps:
Define a client class that inherits from
lidar.syncImageViewer.SyncImageViewer. You can use the
SyncImageViewer class template to define a class and implement
your custom visualization or analysis tool. At the MATLAB® command prompt, enter this
Save the file to any folder on the MATLAB path. Alternatively, save the file to a folder outside the MATLAB path and add the folder to MATLAB path by using the
VideoStartTime— Start time of signal
Start time of the signal, specified as a real scalar in seconds.
VideoEndTime— End time of signal
End time of the signal, specified as a real scalar in seconds.
StartTime— Start of time interval in app
Start of the time interval in the app, specified as a real scalar in seconds. To set the start time, use the start flag interval in the app.
CurrentTime— Time of frame currently displaying in app
Time of the frame currently displaying in the app for the connected signal, specified as a real scalar in seconds. If the slider is between two timestamps, then the currently displaying frame is the frame that is at the previous timestamp.
EndTime— End of time interval in app
End of the time interval in the app, specified as a real scalar in seconds. To set the end time, use the end flag interval in the app.
TimeVector— Timestamps for connected signal
Timestamps for the connected signal, specified as a
vector. This signal must be the master signal. If you change the master signal, the
TimeVector property updates to the timestamps for new master
|Update external tool when connecting to signal being loaded into Lidar Labeler app|
|Update external tool when new frame is displayed in Lidar Labeler app|
|Update current time in Lidar Labeler app|
|Close external tool connected to Lidar Labeler app|
|Disconnect external tool from Lidar Labeler app|
Connect an image display tool to the Lidar Labeler app. Use the app and tool to display synchronized lidar and image data.
Specify the source for the image data and lidar data to load into the app.
sourceName = fullfile(toolboxdir('lidar'),'lidardata','lcc', ... 'HDL64','pointCloud');
Display the image data in sync with the lidar data.
For an example of an external tool, see the
implementation of the
lidar.syncImageViewer.SyncImageViewer class. This
class implements an image display tool. You can use this code as a starting point for
creating your own tools.