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
댓글 수: 1
Adam Meziane
2025년 2월 20일
Have you found a solution to this?
답변 (1개)
Walter Roberson
2025년 2월 20일
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.
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!