マウスのクリックで押している間に連続的にfigから値を取得するにはどのような方法が必要でしょうか?
4 views (last 30 days)
Show older comments
Figの中の値をマウスのクリックして取り出す方法は関数「ginput」でできますが、これではクリック一回につき一つの値しか取得できません。 領域分割をしたく、画像解析アプリ「イメージの領域分割」を参考にしながらプログラムを書いていますが、graph cutの前景と背景を選ぶときにこのアプリでは連続で多くのポイントの値を選ぶことができました。これと同じことができるようにするにはどのようにしたらいいのでしょうか?
0 Comments
Accepted Answer
Etsuo Maeda
on 29 Jun 2018
Image Processing Toolboxを持っているなら、imfreehand関数が便利です。
figure, imshow('pout.tif');
h = imfreehand;
position = wait(h);
HTH
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!