function gTruth = helperLoadGTruthVideoLidar
%helperLoadGTruthVideoLidar Load ground truth labels for video and lidar signals
% gTruth = helperLoadGTruthVideoLidar loads ground truth labels for a video
% and corresponding point cloud sequence. gTruth is a groundTruthMultisignal
% object containing the data source information, label definitions, ROI label
% data, and scene label data.

%%
% Create a video signal.
videoSourceName = '01_city_c2s_fcw_10s.mp4';
videoSourceParams = [];
videoSource = vision.labeler.loading.VideoSource;
loadSource(videoSource,videoSourceName,videoSourceParams)

%%
% Create lidar point cloud sequence signal.
lidarFolder = fullfile(toolboxdir('driving'),'drivingdata','lidarSequence');
addpath(lidarFolder)
tsData = load(fullfile(lidarFolder,'timestamps.mat'));
lidarSourceName = lidarFolder;
lidarSourceParams = struct;
lidarSourceParams.Timestamps = tsData.timestamps;
lidarSource = vision.labeler.loading.PointCloudSequenceSource;
loadSource(lidarSource,lidarSourceName,lidarSourceParams)
rmpath(lidarFolder)

% Combine the signal data sources.
dataSources = [videoSource lidarSource];

% Load label definitions, ROI label data, and scene label data.
data = load('gTruthVideoLidar.mat');
labelDefs = data.LabelDefinitions;
roiData = data.ROILabelData;
sceneData = data.SceneLabelData;

% Create the groundTruthMultisignal object.
gTruth = groundTruthMultisignal(dataSources,labelDefs,roiData,sceneData);