Tesseract in a specific information

I want to scan a Spanish DNI ang get some information and print it in the screen. A DNI has this form: 1

And i want to take the fields DNI, Nombre and Apellidos (in the image, it would be 99999999R, CARMEN, ESPAÑOLA ESPAÑOLA).

I thought that the best way is using "cut tool" and use the OCR in the cut images. What do you think? I have to make the project in HTML/JS and I don't really know how to program this.

Thanks.

Upvotes: 0

Views: 971

Answers (1)

Cerovec
Cerovec

Reputation: 1313

This is not an easy task and to do it, you need to do the following:

  1. Make sure you "cut" the image precisely around the borders. This method needs to be robust to lightning conditions, low contrast situations, etc. Ideally, it should use advanced computer vision and ML techniques

  2. Then you need to define where the individual fields are. This is also not an easy task, because the sizes and positions of the fields vary between different IDs.

  3. In the final step, you need to have a very reliable OCR tool, one which would give you a low error rate, so that you actually have a benefit of doing this automatically, compared to just retyping all these fields manually. Although OCR seems like an easy problem today, it's still very hard, especially on ID documents which can be worn out and damaged and taken in weird lighting conditions.

My company Microblink has spent years working on ID scanning, not just for Spanish DNIs, but also for many other document types (there are more than 5000 different types in the world).

If you are interested in reading how we're doing it, here are some of the materials:

  1. Goodbye Templates
  2. BlinkID v5
  3. From OCR to DeepOCR

As for the "cut tool" - we do have a feature that allows you to automatically capture the image of a document and crop it around the edges of the document. We call it "Document capture" and it's a part of our BlinkID SDK.

As for the HTML/JS - it's not clear what exactly you need, but we do have a React Native and Cordova plugins which allow you to build cross-platform mobile apps in JS, and we also have a Frontend SDK and Web API which allow you to scan documents in any browser.

Upvotes: 1

Related Questions