Checking the "cleanliness" of an image for Optical Character Recognition
Your images are gray-scaled. In order to perform the OCR you might want to first threshold it to apply OCR on the binary image. 

The effectiveness of the thresholding will definitely affect the performance of the algorithm. A simple way is say Otsu's thresholding. In your case, you can think of this as character vs. non-character pixels. And the measure of the cleanliness can be treated as the amount of energy (such as class variance) of the non-character pixels. 

Unfortunately the measure I described is post applying your (first step) of OCR. Hence, I am not sure if this helps you.