If I load and display an image, for example
c = imread('cameraman.tif');
imshow(c)
then in the plot window, under the image itself, there are two numbers indicating the current cursor position, in the form
[39.25, 120.6]
I have two questions about this:
- Can the display be tweaked so that the positions are integers? So one image pixel per screen pixel?
Can this information include the grayscale/rgb value of the pixel, such as
[23, 46] = 127
or
[23, 46] = (46,128,210)
?
I've tried fiddling with the "axis" command, but I haven't found anything which helps.
I guess what I want is something like Matlab's "Pixel Information Tool" impixelinfo
:
http://www.mathworks.com.au/help/images/ref/impixelinfo.html though I know from the octave image wiki at http://wiki.octave.org/Image_package that impixelinfo
is not currently implemented in Octave. But maybe there's another way to achieve the same result?
I'm using Octave-3.8.0, the image package 2.2.0, under linux (Ubuntu 12.04).