displaying pixel values with imtool
The Image Tool displays information about the location and value of individual pixels in an image in the bottom left corner of the tool. (You can also obtain this information by opening a figure with imshow and then calling impixelinfo from the command line.) The pixel value and location information represent the pixel under the current location of the pointer. The Image Tool updates this information as you move the pointer over the image.
Now click the Inspect Pixel Values button as shown in the following image :