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.

9 lines
196 B
Matlab

function I=preprocess_usps_image(data)
%normalise each image to fill range [0,1]
data=data-min(data);
data=data./max(data);
%reshape and pad
I=reshape(data,16,16)';
I=padarray(I,[7,7],0,'both');