複数ファイルに対してコマンド実行
Show older comments
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枚目にしかプログラムが適用されませんでした.エラーはなかったのですが,どう変えればよいのでしょうか.
Accepted Answer
More Answers (0)
Categories
Find more on イメージ タイプの変換 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!




