blinkinput / blinkinput-android

BlinkOCR SDK for Android
https://microblink.com/ocr
104 stars 29 forks source link

Scan some fields from ID CARD's with accuracy ? #1

Closed achinverma closed 6 years ago

achinverma commented 8 years ago

hi , i am using this library to perform scans of various ID cards in my app. i am scanning the below image to get fields ame, fathers name, sex, age, address , date, as you can see in the sample image below.

but i am not getting accurate results , i am getting some useless characters in the output after scanning the ID card, please can you suggest me how can extract the mentioned above fields with accuracy ? i want to extract the fields and i wan to show in form in next activity after scanning successfully , so can you guide me what are the things that i have to change in your OCR demo? voter_card

DoDoENT commented 8 years ago

Hi, you should change the OCR demo in following way:

If you want more control over BlinkOCR process, you can modify custom UI demo's ScanActivity and each time you receive scan result you can use raw OCR result to extract required data, considering OCR char recognition variants and time redundancy.

To get a better understanding of BlinkOCR's scanning process, consider reading documentation and playing with our demo app. Also, bear in mind that OCR engine will never be able to give you 100% correct results, but using different OCR engine parameters you might achieve very good results.

achinverma commented 8 years ago

thanks for your reply @DoDoENT i will try and update you , if i got any issue.

achinverma commented 8 years ago

hi @DoDoENT , i have scanned an image, i will share the image below , but that image is same as in my first comment , i have scanned the first part of the image , actually it was voter card id of india , which will contain two Languages one is ENGLISH and Other is Hindi ,i want to extract the English lines
when i scanned the image i got got some better results ,but i want to improve this results , so please can you guide me to do this and about my code , i have used this image voterid3

and i have placed in assets folder and then i am reading this image from assets folder to Bitmap this is my complete code https://gist.github.com/achinverma/c53db4889f1bb8178492 and my output after scanning is as you can on the left side of the image which i scanned and you see the results on the right of the image device-2015-10-01-102126

£ ,4_Rö * *'T@" us== qa ELeCTlON coMM SSION OF !NDA : NLN1016971 -<:s?š- £) f xz?v<ran av<Ta :s?seä Ž5T #+T Eiectoćs Name : lttpel Deka Barooah üam m=m :fŽ?@T_ä W3RT Fathe(s Name :Nityamanda Barooah fäm / SeX :W/ Male l.1 2008 =Ü 3TI3 Age as onii 2008 39

DoDoENT commented 8 years ago

Hi @achinverma,

the problem is that you are trying to scan the whole image and this confuses the OCR engine because it tries to read both Hindi and English (OCR does not understand Hindi).

If using DirectAPI, I suggest using method [recognize](https://blinkocr.github.io/blinkocr-android/com/microblink/directApi/Recognizer.html#recognize%28android.graphics.Bitmap, com.microblink.geometry.Rectangle, com.microblink.view.recognition.ScanResultListener%29) which also receives scanning region. The region should be set as region in image that needs to be scanned (for example region around text containing elector's name). The position of that region should be determined by you for each image you are scanning.

If you plan to scan voter with device's camera, then I recommend checking out BlinkOCR demo app.