The following Matlab project contains the source code and Matlab examples used for display pixels and pixel values. showPixelValues displays image pixels, a pixel grid, and superimposed pixel values. It uses impixelregion from the Image Processing Toolbox. Unlike an impixelregion figure, though, the figure created by showPixelValues can be captured in a published M-file script.
The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.