loading multiple.im7 images into Matlab using readimx function

Hi folks,
I'm working with 20000 of .im7 (Davis) images. How could I read and load these images into Matlab (uint16)? Here is my simple code. I used 'readimx' function but it only works for single image.
filename = 'C:\....\n_2000_075';
im7_files = dir([filename,'/*.im7']);
imgNum = length(im7_files);
for i = 1:imgNum
A = readimx([filename, im7_files(i).name]); % Load the image infomation
A_rot = imrotate(A.Data(:, :), -90);
A_flip = fliplr(A_rot);
D(:, :, i) = A_flip(:, :); % Saving in Matrix D
i = i+1;
end

Réponses (1)

filename = 'C:\....\n_2000_075';
im7_files = dir([filename,'/*.im7']);
imgNum = length(im7_files);
A_flip_old = [];
for i = 1:imgNum
A = readimx([filename, im7_files(i).name]); % Load the image infomation
A_rot = imrotate(A.Data(:, :), -90);
A_flip = fliplr(A_rot);
if i ~= 1
A_flip = imresize(A_flip, size(A_flip_old));
end
D(:, :, i) = A_flip(:, :); % Saving in Matrix D
A_flip_old = A_flip;
end
There is no way to have readimx() read many files at at the same time.

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by