jeudi 26 mars 2015

Matlab - Opening more then one image extension - working with images

I need open and put in the same vector .jpg images and .bmp images. I can open or .jpg or .bmp, but i need to open both.


This is my code:



image_folder = 'C:\Users\Marco\Desktop\teste';
filenames = dir(fullfile(image_folder, '*.jpg'));
total_images = numel(filenames);

for n=1:total_images
images{n} = imread(sprintf('color%03d.jpg',n));
end;


(in this example i open jpgs but i need to open .jpg And .bmp )


Aucun commentaire:

Enregistrer un commentaire