How to make script look for specific files for processing?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Large Files and Big Data 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!