how to distinguish "I" and "l" in image

asked 2019-11-12 03:59:20 -0500

I got a sequence of characters in images, but I cannot figure out which one is "I" and which one is"l" ? image description image description image description image description image description image description

The two image do have some difference, i.e. the shadow of last image are different, whic I can see. But I cannot figure out which one is "I" or the "l".

Any suggestions on this work?

Or can anyone figure out which kind of writing genre it is?

edit retag flag offensive close merge delete

Comments

That's not a shadow. It's antialiasing that depends on the exact position of the letter on the image's pixel grid. Your task is hopeless without trying to recognize words from the character sequence.

....And no, from that sample it is impossible to figure out the genre...

mvuori gravatar imagemvuori ( 2019-11-12 05:11:13 -0500 )edit

well, thanks for your suggestion, but I think there must a point to help out of this problem

atagolee gravatar imageatagolee ( 2019-11-12 20:48:22 -0500 )edit
1

As there is no important difference between the image of the two Ietters, you must use some semantic analysis of the recognized text (you do the same thing: just before I wrote Ietters with an uppercase i, but you read it "Letters").

After the text recognition run a spell checker on the text (e.g. myspell). Most OCR programs use this technique. Another widely used technique is to train a LTSM neural network to predict the next character based on the recognized text and consider this probability for next character.

If you want to do it yourself, a simple solution would be to consider uppercase i if the letter follows a .!? and a whitespace.

kbarni gravatar imagekbarni ( 2019-11-13 07:40:30 -0500 )edit