Open and procces multiple images
Mostra commenti meno recenti
Hey everyone, I have a 870 images from 29 different classes and each class has 30 images in sequential number from 1 to 30, following this pattern NameOfTheImage_1-30. What I want to do is to open and then convert all of the images, automatically one by one, into grayscale. Can you help me with that? The codes from here are somehow usefull but not for my case (I think).
Risposta accettata
Più risposte (1)
KSSV
il 15 Giu 2021
Img = dir('*.png') ; % give your extension of images
N = length(Img) ;
for i = 1:N
thisImg = Img(i).name ;
I = imread(thisImg) ;
Ig = rgb2gray(I) ;
% do what you want
end
1 Commento
Pavel Todorov
il 15 Giu 2021
Categorie
Scopri di più su Convert Image Type in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!