複数ファイルに対してコマンド実行
Ältere Kommentare anzeigen
n = 12;
for i = 1:n
data = ['32deg_cam1_ (', num2str(i),').jpg'];
pic = imread(data);
gray = rgb2gray(pic);
bw = imbinarize(gray);
bw2 = bwareaopen(bw,30);
boundaries = bwboundaries(bw2,'noholes');
imshow(bw2);
hold on
for k = 1:n
b = boundaries{k};
plot(b(:,2),b(:,1),'g','LineWidth',2);
end
end
複数のイメージ(12枚の写真)に対してのコマンドです.途中までは12枚すべてに処理がなされているのですが,hold on 以下を追加すると1枚目にしかプログラムが適用されませんでした.エラーはなかったのですが,どう変えればよいのでしょうか.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu イメージ タイプの変換 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




