The function pixelgrid superimposes a grid of pixel edges on an image. The purpose is to easily visualize pixel extents when zooming in closely on an image. The grid is drawing using lines with contrasting colors so that it is visible regardless of the colors of the underlying pixels.
Steve Eddins (2019). Pixel Grid (https://www.mathworks.com/matlabcentral/fileexchange/71622-pixel-grid), MATLAB Central File Exchange. Retrieved .