I have this code which imread
s several 20x20 monochromatic .bmp's. The first call, though, takes very long (up to hours). Immediately after it, everything just flows normally. I have seen mention of another MATLAB function (sortrows
) also taking unusually long at the first call, but no answer to that (MatLab's slow first call of sortrows()). Suggestions?
The only thing happening before the first imread
call is the loading of a 1000-dimensional vector. Is this what's hindering performance?
The code looks like that:
load('W','W');
c = 1;
while c > 0.01;
run readimage
end
readimage:
for k = 1:1000;
l = sprintf('%d',k);
m = '.bmp';
m = strcat(l,m);
X = imread(m);
...
The first image is just a handwritten zero. It loads just fine if I try to load it elsewhere.