フォルダ内に含まれる全画像の処理
Show older comments
フォルダ内に含まれる画像全てを同時に処理する方法を教えてください。
bmpFiles = dir('*.bmp');
numfiles = length(bmpFiles);
mydata = cell(1, numfiles);
for k = 1:numfiles
mydata{k} = imread(bmpFiles(k).name);
imshow(mydata{k}); hold on;
B = mydata{k} > 254; % 二値化
X = 498;
Y = round(mean(rmoutliers(find(B(:,X))))); % y座標(indexの外れ値を除き平均)
xline(X,'Color','w'); % x座標を白い線で表示
yline(Y,'Color','w'); % y座標を白い線で表示
end
現在このようにやろうとしたのですがうまくいっていません
Accepted Answer
More Answers (0)
Categories
Find more on コンピューター ビジョンと Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!