How can i import multiple fits images
Afficher commentaires plus anciens
I have abou 900 fits images where i want to import them indivudually and store each image as part of a bigger matrix. So for example A = (image 1),(image 2)....
each image itself is 1023x1536.
FolderL = cd('C:\Users\pruth\Desktop\3070\LightsBadOut')
LDir = dir('*.fits');
for i =1:2
LightsC = fitsread(LDir(i).name)
i = i +1;
end
This code seems to only show me the values for when i = 2.
Réponses (1)
Mark Sherstan
le 13 Déc 2018
Modifié(e) : Mark Sherstan
le 13 Déc 2018
Try the following. If it doesent work please provide 2-3 of your images so we arent 100% blind trying to help you.
% Read in all images from a folder called 'images'
imgFolder = fullfile('images');
imgs = imageDatastore(imgFolder);
numOfImgs = length(imgs.Files);
for ii = 1:numOfImgs
LightsC{ii} = fitsread(imgs.Files{ii});
end
1 commentaire
assia assia
le 30 Juin 2021
Thank you. That helps so much.
Catégories
En savoir plus sur Image Arithmetic 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!