Pixel Information tool
Use the impixelinfo
function to create a Pixel Information
tool. The Pixel Information tool displays information about the pixel in an image that
the pointer is positioned over. If the figure contains multiple images, the tool
displays pixel information for all the images. For more information about the tool, see
Pixel Information Tool.
Display an image and add a Pixel Information tool to the figure. The example shows how you can change the position of the tool in the figure using properties of the tool uipanel object.
h = imshow('hestain.png'); hp = impixelinfo; set(hp,'Position',[5 1 300 20]);
Use the Pixel Information tool in a figure containing multiple images of different types.
figure subplot(1,2,1), imshow('liftingbody.png'); subplot(1,2,2), imshow('autumn.tif'); impixelinfo;
If you want to display the pixel information without the “Pixel
Info” label, then use the impixelinfoval
function.
To copy the pixel information label to the clipboard, right-click while the pointer is positioned over a pixel. In the context menu displayed, choose Copy pixel info.