Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking if a image contains text?

I do have few images. Some of the images contains text and few other doesn't contains text at all. I want a robust algorithm which can conclude if image contains text or not.

Even Probabilistic Algorithms are fine.

Can anyone suggest such algorithm?

Thanks

like image 527
Mayank Jain Avatar asked Nov 12 '22 07:11

Mayank Jain


1 Answers

There are a some specifics that you'll want to pin down:

  1. Will there be much text in the image? Or just a character or two?
  2. Will the text be oriented properly? Or does rotation also need to be performed?
  3. How big will you expect the text to be?
  4. How similar to text will be background be?

Since images can vary significantly you want to define the problem and find as many constraints as you can to make the problem as simple as possible. It's a difficult problem.

For such an algorithm you'll want to focus on what makes text unique from the background (consistent spacing between characters and lines, consistent height, consistent baseline, etc. There's an area of research in "text detection" that you'll want to investigate and you'll find a number of algorithms there. Two surveys of some of these methods can be found here and here

like image 127
Noremac Avatar answered Jan 04 '23 02:01

Noremac