Is there some mechanism to say whether the image is "clean" for the purpose of image processing?

For example, in the following image, the topmost row is the cleanest and the bottom one is the least clean. As a result, the top-image gives accurate output; the bottom-one gives less accurate.

Examples of noisy and noise-less images

The purpose is to use the image for Optical Character Recognition. And, I wanted to check beforehand, if the image is sufficiently clean or not.

  • 1
    $\begingroup$ Well, cleanliness in not an awfully technical term. I assume you mean "absence of noise". Posting some images with examples would be of great help. $\endgroup$ – Phonon Dec 28 '11 at 14:13
  • $\begingroup$ Please do not refer to your profile pic for additional info. First of all, it is small and you can change it at will, thereby invalidating this question when you decide to use something fancy. All necessary info should be in the question. $\endgroup$ – Lorem Ipsum Dec 28 '11 at 15:12
  • $\begingroup$ I would start by reducing the colour depth to eliminate most of the noise $\endgroup$ – CaffGeek Dec 28 '11 at 17:17

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.

| improve this answer | |
  • $\begingroup$ You seem to have understood my question, without me using proper words. $\endgroup$ – eeerahul Dec 29 '11 at 11:14
  • $\begingroup$ The downloadable code in the link provided seems to be corrupt (or this is what is reported by winzip, while untarring). Do other stack-exchangers have the same observation? $\endgroup$ – eeerahul Jan 3 '12 at 10:18
  • $\begingroup$ @eeerahul I don't quite know know about the code. i just referred that page for good explanations and visuals. If you want code - may be you should check if OpenCV or matlab has implementation. $\endgroup$ – Dipan Mehta Jan 3 '12 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.