preview

Read first row of data in datastore

Description

example

preview(ds) returns the first row of data in the input datastore.

Examples

collapse all

Load training data that contains bounding boxes with labels for a vehicles class.

data = load('vehicleTrainingData.mat');
trainingData = data.vehicleTrainingData;

Add the fullpath to the local vehicle data folder.

dataDir = fullfile(toolboxdir('vision'),'visiondata');
trainingData.imageFilename = fullfile(dataDir,trainingData.imageFilename);
blds = boxLabelDatastore(trainingData(:,2:end));

Preview the data from the box label datastore.

preview(blds)
ans=1×2 cell array
    {1x4 double}    {[vehicle]}

Input Arguments

collapse all

Datastore with labeled data for training a semantic segmentation network or an object detection network, specified as a boxLabelDatastore or a pixelLabelDatastore object.

Introduced in R2020a