“Use Image > Adjustments > Posterize to reduce the number of shades of gray in the image. A value of 4 levels works well.
Finally, change the mode of the photo layer from Normal to Multiply. Now all you’ll see will be the numbers, tinted to exactly match the shades of gray in your photograph.”