SwiftOCR icon indicating copy to clipboard operation
SwiftOCR copied to clipboard

Preprocessing on small images

Open pabloromeu opened this issue 9 years ago • 4 comments
trafficstars

Hi again,

I have been playing around with some small images of text to check whether I could recognize some text on them, although I retrained the NN, tweaked some parameters... But no luck. I think it might be the preprocessing algorithm that lead to a non-readable text.

My original image: sample5

What SwiftOCR debug says: captura de pantalla 2016-07-23 a las 16 27 16

Maybe it is the size of the image?

pabloromeu avatar Jul 23 '16 14:07 pabloromeu

First of all this image is way to small. Try to get a higher resolution image. Another problem is, that the characters are touching the edge of the image. If they are touching the edge they automatically get filtered out, so don't crop the image that much.

NMAC427 avatar Jul 23 '16 14:07 NMAC427

Which is the minimum? What about resizing the image?

pabloromeu avatar Jul 23 '16 15:07 pabloromeu

I would say each character should be at least 20 x 20 px large. You can try to resize the image as long as the characters aren't touching each other. Good luck.

NMAC427 avatar Jul 23 '16 15:07 NMAC427

I've scaled up the image to about twice its original size and added a 5px border. It got all bounding boxes correct except for the i.

48baa5c2-50f2-11e6-8c35-a03893aaf6b2 bildschirmfoto 2016-07-23 um 20 56 53

NMAC427 avatar Jul 23 '16 18:07 NMAC427