FOR loop in matlab
古いコメントを表示
sir,
i want to run a loop and display images(subplots) for the threshold value changing from 0.1 to 0.9. and apply to canny edge detector. i tried like this:
for thresh=0;thresh<1;thresh=thresh+0.1;
BW=edge(ip,'canny',thresh);
imshow(BW)
end
when i run this program the output i am getting is the image with thresh=0.1 .
And i tried by
{
BW=edge(ip,'canny',thresh);
imshow(BW)
}
Error comes as "the expression to the left of the equal sign is not a valid target for an assignment" . CAn anyone help me for the same???
回答 (1 件)
Walter Roberson
2013 年 4 月 1 日
for thresh = 0:0.1:1
BW=edge(ip,'canny',thresh);
imshow(BW);
drawnow();
end
4 件のコメント
rakesh r
2013 年 4 月 2 日
編集済み: Walter Roberson
2013 年 4 月 2 日
Walter Roberson
2013 年 4 月 2 日
title( sprintf('th = %g', th) )
rakesh r
2013 年 4 月 2 日
rakesh r
2013 年 4 月 2 日
カテゴリ
ヘルプ センター および File Exchange で Object Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!