Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How to see the image pixel info , even though i move my mouse point cursor over the image using command [x,y]=ginput(1).

Asked by Naresh Naik on 2 Jan 2013

here my programme is i=imread(anyimage); figure,imshow(i); [x,y]=ginput(1); pixelinfo

How to see the pixel info data even though i move the cursor on imgae?

0 Comments

Naresh Naik

Products

2 Answers

Answer by Walter Roberson on 2 Jan 2013

Use the datacursor tool . You can activate that from the figure toolbar, or you can activate it inside a program by using datacursormode()

0 Comments

Walter Roberson
Answer by Image Analyst on 2 Jan 2013

If you have the Image Processing Toolbox, use impixelinfo(). See the help for an example.

% Let them mouse around and see the values.
hPixelInfo = impixelinfo();
set(hPixelInfo, 'Unit', 'Normalized', 'Position', [.81 .89 .2 .1]);

Use the Position property to place the status label anywhere you want. I haven't tested it while ginput() is being called but it works all other times so I imagine it would still work then.

0 Comments

Image Analyst

Contact us