I have a folder F. Under that folder, I have 20 multipage stack .tiff image.
Each image A in the folder F is a stack of 50images and I need to average those 50images to get only one image B and do the average over the rows of image B then save the mean in an excel file. Here is my code
myexcel = 'F\interference2.xlsx';
out = zeros(1280,20);
for k = 1:20
fname = ['F\image',num2str(k),'.tiff'];
info = imfinfo(fname);
num_images = numel(info);
Z = zeros(1024,1280);
for jj = 1:num_images
Z = Z + double(imread(fname, jj, 'Info', info));
avrg = mean(Z/50);
out(:,k) = avrg;
It always gives an error: Error using imfinfo (line 100) Unable to open file "F\image1.tiff" for reading.
Error in interf (line 13) info = imfinfo(fname);
Thanks for your help.