5
$\begingroup$

I have images of identity cards (manually taken so not of same size) and I need to extract the text in it.

I used tesseract to predict bounding boxes for each letter and am successful to some extent but some letters are not bounded.

http://i.imgur.com/USVKp6h.png

So, I have around 5000 bounding boxes in all images combined.

I want to train it so as to predict bounding boxes for remaining letters.

After predicting the bounding boxes I will try to classify the image into characters.

This is different from conventional machine learning problem where I donot have training and testing data separately.

$\endgroup$
2
$\begingroup$

As you seem to plan to build your own character classifier, I assume that you are happy to do some programming but just want to avoid heavy graphics stuff. A practical approach would be to use tesseract's bounding boxes just as a guide. Look to the left and right for more characters. Knowing where the rows are and what height and width the characters are is a good basis. An extension of rows gives you the upper and lower boundaries of the new candidate boxes. To find the left and right boundaries, you can project the pixels to the baseline of the row and look for positions with a low number of black pixels. A second factor for the boundary decision can be the expected width, which should be somewhere between the width for "I" and "W". A third factor can be the letter/number that your classifier recognises and how well this fits into the context (e.g. use character language model).

| improve this answer | |
$\endgroup$
0
$\begingroup$

A simple solution might be to reduce the image resolution to hide details such as the small deformations such as in the "O" in "model". Half the resolution should still be enough.

| improve this answer | |
$\endgroup$

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.