Main Content

preview

Read first row of data in datastore

Since R2020a

Description

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

example

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
    {[126 78 20 16]}    {[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.

Version History

Introduced in R2020a