Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
C#
Hello everyone,
I am a student just started with one image processing project.
I am working on OCR and want to reject/handle images based on low and high contrast separately. 
Currently I am working on differentiating low and high contrast text images. 
These images are of metallic plates and having various of noises, few samples are attached below.
<a href="https://drive.google.com/open?id=0B81c7NmWqSF9OEE3MWNLZ0haQ2s">1.jpg - Google Drive</a>[<a href="https://drive.google.com/open?id=0B81c7NmWqSF9OEE3MWNLZ0haQ2s" target="_blank" title="New Window">^</a>]

<a href="https://drive.google.com/open?id=0B81c7NmWqSF9UGFYTW0wRUNQM2c">3.jpg - Google Drive</a>[<a href="https://drive.google.com/open?id=0B81c7NmWqSF9UGFYTW0wRUNQM2c" target="_blank" title="New Window">^</a>]

<a href="https://drive.google.com/open?id=0B81c7NmWqSF9enB4NzVKTkJWZU0">4.jpg - Google Drive</a>[<a href="https://drive.google.com/open?id=0B81c7NmWqSF9enB4NzVKTkJWZU0" target="_blank" title="New Window">^</a>]

<a href="https://drive.google.com/open?id=0B81c7NmWqSF9OGgwVFR2LXJEZG8">2.jpg - Google Drive</a>[<a href="https://drive.google.com/open?id=0B81c7NmWqSF9OGgwVFR2LXJEZG8" target="_blank" title="New Window">^</a>]

Can anyone suggest a way/parameter to differentiate theses images?

Thank you in advance for your valuable time.


What I have tried:

Images are of varying resolution.
Tried cumulative histogram but failed.
Posted
Updated 27-Jun-16 5:03am

1 solution

Unlike many other things in image recognition, the measures of contrast can be objective; always solvable and easy to obtain. You can start here:
Contrast (vision) — Wikipedia, the free encyclopedia,
Display contrast — Wikipedia, the free encyclopedia.

Of course, you cannot use the measure operating the concepts of "feature" and "background" (Weber), because an image does not contain any predefined information of how to tell feature from background.

Now, I'm not quite sure that you have to apply the contrast measure to discriminate input images and rejecting them. In some cases, this approach is needed. Just one thing: one of the image transforms needed to apply before image recognition is boosting the image contrast; often (perhaps not always), you need to boost it to extremes. It depends on particular problem.

—SA
 
Share this answer
 
Comments
Member 9379249 27-Jun-16 11:14am    
Thanks Sergey for your reply. I am using these images for binarization and later send to OCR. Before sending to binarization want to ensure best quality. If image contrast can be enhance then will perform enhancement or will reject these images. Are you able to check images?
Sergey Alexandrovich Kryukov 27-Jun-16 11:37am    
I doubt you really need binarization. Reasonably good OCR libraries work with gray-scale images. You just need to improve contrast, sometimes reduce noise (those two kinds of transform are kinds of opposites). Your images certainly need processing (yes, I looked at your example). Here is what I did: created an application with several important transformations applied interactively with different parameters and played with them. It gave me certain experience. You really need to create such experimental application.

Will you accept my answer formally now? In all cases, I'll gladly try to answer if you have other follow-up questions.

—SA
Member 9379249 30-Jun-16 5:38am    
As you know there are many transformation/filters in image processing, very rare chance to produce results with a single set of parameters on all type of images. My problem is not to work on single type of images but need to handle multiple noises, and variable background(metallic/printed background, embossed/engraved/printed text) images. I have already tried multiple filter, still not satisfied with results.
I had accepted your answer but not satisfied with that.
Sergey Alexandrovich Kryukov 30-Jun-16 9:46am    
I know. That's why I advised what I advised. You need to start with some experimenting, to feel the process of recognition. I can not possibly "satisfy" you, because for that I would need to do all the work you have to do yourself. One more advice: "trying multiple filters" is also not quite right approach. You should first predict what you expect from each filter, then it will make some sense. I tell you: I faced the same problems, which I resolved pretty quickly after I played a bit. And for that, I created the experimental application. The goal was: to play quickly.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900