how to read images from matlab? matlab image processing

2 次查看(过去 30 天)
Hello everyone,
I have 322 images. How to read lots of images data from matlab? I can read ony 1 image. Can you help me?
P = 'C:\Users\sy\Desktop\miasdbv1.21\MIASDBv1.21';
D = dir(fullfile(P,'*.pgm'));
C = cell(size(D));
dd = imread(fullfile(P,D(75).name));

回答(2 个)

Ameer Hamza
Ameer Hamza 2020-12-6
You can write a for-loop and save all the images in a cell array
P = 'C:\Users\sy\Desktop\miasdbv1.21\MIASDBv1.21';
D = dir(fullfile(P,'*.pgm'));
C = cell(size(D));
for i = 1:numel(C)
filename = fullfile(P, D(i).name);
C{i} = imread(filename);
end

Image Analyst
Image Analyst 2020-12-6

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by