How to make script look for specific files for processing?
Afficher commentaires plus anciens
Hi all,
I was wondering if there was a way for my script to look for specific files to import (jpg files) so it can crop multiple images selected.
%Insert file names (without extensions) for processing
for LFAfile={'0W_1pc','0W_2pc','0W_3pc','0NoC_1pc','0NoC_2pc','0NoC_3pc'};
%Add the file extension and look for the file
if(exist(strcat(LFAfile{1}, '.jpg'),'file'))
LFA = imread(strcat(LFAfile{1}, '.jpg'));
%Uncropped set to 0 means that the image must still be manually
%cropped
if(uncropped==0)
%Image will appear in upper panel.
%Manually crop by drawing a box around the test and control lines
%Make sure the control line is in the left half of the crop window
%and the test line is in the right half of the crop window
subplot(3,1,1);
LFAGray = imcrop(rgb2gray(LFA), [46.5 3.5 219 31]);
close all;
else
LFAGray = rgb2gray(LFA);
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Large Files and Big Data 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!