Draw circle over an image inside a GUI

2 ビュー (過去 30 日間)
as hz
as hz 2014 年 1 月 5 日
回答済み: Image Analyst 2014 年 1 月 5 日
Hi,
I wish to draw a circle on an image (using GUI). What I want is to first click the centre point and when I will move the mouse the circle will grow or shrink. On the second click, it will stay on top of the image and I will get the x0, y0 and the radius, is it possible?
Thx.

回答 (1 件)

Image Analyst
Image Analyst 2014 年 1 月 5 日
Yes, you'll probably have to use ginput to get the center, then use the mousemove callback event to erase and draw circles as you move the mouse. You can use the rectangle function to draw circles. No, I don't have code for that all ready to hand you - I'd have to figure it out just as you do.

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by