数据集 —— ground truth 数据集

本文介绍如何在Matlab中加载并使用自带的停车标志数据集。通过代码演示了如何加载数据、拓展图像路径以及利用预标注信息进行目标标注。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. matlab 自带含 ground truth 数据集

%% 加载停车标志数据到内存;
data = load('stopSignsAndCars.mat', 'stopSignsAndCars');
stopSignsAndCars = data.stopSignsAndCars;

% 将 stopSignsAndCars 下的图像名,拓展为绝对路径加图像名,以方便读取
imagePath = fullfile(toolboxdir('vision'), 'visiondata');
stopSignsAndCars.imageFilename = fullfile(imagePath, stopSignsAndCars.imageFilename);

summary(stopSignsAndCars)   
            % 查看该数据集的主要描述信息,主要标注了 stop sign,car rear:车尾,car front:车头

stopSignsAndCarRears = stopSignsAndCars(:, {'imageFilename', 'stopSign', 'carRear'});

% 使用已给的标注信息,对其中一副图像进行标注
I = imread(stopSignsAndCarRears.imageFilename{1});
I = insertObjectAnnotation(I, 'rectangle', stopSignsAndCarRears.stopSign{1}, 'stop sign', 'linewidth', 4, 'color', 'r');
I = insertObjectAnnotation(I, 'rectangle', stopSignsAndCarRears.carRear{1}, 'car rear', 'linewidth', 4, 'color', 'g');

imshow(I)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五道口纳什

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值