How to display coordinates and use ginput

Viewed 9163

I cannot seem to get my image to display the coordinates of my mouse cursor, and also use ginput to store points at the same time.

I currently am trying the following:

MriHotrod = imread('Image.bmp');
Fig = figure('Name','BobDole'),...
    imshow(Image, 'InitialMagnification', 250)

axis on
impixelinfo

Image_1 = ginput(4)

close BobDole

The ginput still works, but the impixelinfo stays constant

Pixel Info = (X, Y) Pixel Value

I am aware of some methods of getting around this, but they involve functions. This seems like a rather simple problem that can avoid the use of functions.

1 Answers
Related