MATLAB: What’s ginput()’s problem with grayscale images

ginputodd behaviorperformance

I've been using ginput to pick out points on in image (I'm then marking them with a cross or a circle using plot). When I use a rbg jpeg as the image, ginput acts just fine: the crosshairs track around with the mouse and there's no problem. However, if I convert the same image to grayscale (so I can see my markers more clearly), ginput bogs down: the crosshairs only update when I stop moving the mouse, making it far more difficult to use. Eliminating everything else that might be a factor, it still happens, as follows:
figure()
img=imread('some_rgb.jpg')
imshow(img)
ginput(1) %works just fine
figure()
imshow(rgb2gray(img))
ginput(1) %bogs down
Obviously, I can get around this by just using the original rgb image, but I'm just curious as to why it's behaving this way.
Cheers

Best Answer

I don't observe that. My crosshairs move immediately and update instantly when I move the mouse over the gray image.