You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
371 B
Matlab

function data = preprocessData(data,targetSize)
% Resize image and bounding boxes to targetSize.
sz = size(data{1},[1 2]);
scale = targetSize(1:2)./sz;
data{1} = imresize(data{1},targetSize(1:2));
% Sanitize box data, if needed.
data{2} = helperSanitizeBoxes(data{2}, sz);
% Resize boxes.
data{2} = bboxresize(data{2},scale);
end