-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpadding_images.m
More file actions
25 lines (20 loc) · 1008 Bytes
/
padding_images.m
File metadata and controls
25 lines (20 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%% AlexNet_SVM METHOD
%==========================================================================
% Juan M. Gandarias, Jesús M. Gómez-de-Gabriel and Alfonso J. García-Cerezo
% Telerobotics and Interactive Systems Lab
% System Engineering and Automation Department
% 20/03/2019
% University of Málaga, Spain
% -------------------------------------------------------------------------
% =========================================================================
function Iout = padding_images(filename)
I = imread(filename);
% Resize the image as required for the CNN.
Iout = padarray(I,[1 1],'both');
% Note that the aspect ratio is not preserved. In Caltech 101, the
% object of interest is centered in the image and occupies a
% majority of the image scene. Therefore, preserving the aspect
% ratio is not critical. However, for other data sets, it may prove
% beneficial to preserve the aspect ratio of the original image
% when resizing.
end