how to click a point in an image

6 ビュー (過去 30 日間)
zhang
zhang 2012 年 4 月 18 日
Is there any function which can be used to click a point and save the point's location aside from impoint?
Thanks,
Zhong

採用された回答

Image Analyst
Image Analyst 2012 年 4 月 18 日
You can also use impixel(). It gives you the image intensity or color as well as the x,y coordinate(s). From the help:
"
Description
impixel returns the red, green, and blue color values of specified image pixels. In the syntax below, impixel displays the input image and waits for you to specify the pixels with the mouse.
P = impixel(I)
P = impixel(X,map)
P = impixel(RGB)
[xi,yi,P] = impixel(x,y,...)"

その他の回答 (1 件)

Kye Taylor
Kye Taylor 2012 年 4 月 18 日
Check out the function ginput
doc ginput

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by