Getting pixel coordinates efficiently in Matlab

帅比萌擦擦* 提交于 2019-12-05 19:40:36

ginput

Graphical input from mouse or cursor Syntax

    [x,y] = ginput(n) 
    [x,y] = ginput 
    [x,y,button] = ginput(...)

Description

[x,y] = ginput(n) enables you to identify n points from the current axes and returns their x- and y-coordinates in the x and y column vectors. Press the Return key to terminate the input before entering n points.

I think this is what you want:

A=imread('filename.jpg');
image(A)
[x,y]=ginput()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!