To visualize the different levels of gray in your image as text, it is extremely important that you replace the value of your background by the value -1.
Image with background at -9999
Image with background at -1