9

I have android application that perform OCR on documents. I want to be able to make some test on the image before sending it to the server. so my question is if there's any tool/code available to measure the image focus before I send it to the server. I want to be able to know if the image not in focus(not sharp enough), to save the processing time from the server side and not to sent it. Thank's David

5

1 Answer 1

3

David, that is a good question. Please share your findings for all of us as you collect more feedback.

I have used and have seen several techniques for this important step in processing. Reality is that it is MUCH easier to have user take a good picture, than to detect or correct a bed picture, which in many cases not even possible. So detection is nice to have, but that should not be the first action. There are so many options that can be triggered before image check, and I'll list a few below.

Techniques (technical and non-technical) that worked for me in the past, or worked for people I worked with or heard of:

  • Shake detection. Using the acceleration of the device to check for shaking at the time of taking the picture. Good approach, but works mostly in bright lighting. In dark environment, even with minimal shaking, picture can be easily smudged. This method has to be used in combination with other methods.

  • Binarization on device. Not only it allows you to compress and prepare the image for efficient transmission, it allows you to clearly see the quality of text. Looking at color image with dark backgrounds is not as obvious about sharpness of individual characters as looking at black-and-white edges of those characters.

  • Preview screen. Allow the user to see the picture they took and are about to submit. Frequently I see apps that allow to preview the picture, but have zoom disabled when I double-tap on it. Any text (even if it is bad) will look good on a tiny screen, because you cannot actually see the text.

  • I call it 'forced preview'. After taking the picture, and preferably after binarization, automatically zoom 10x and ask the user to confirm if they see sharp text or not. It seems invasive, so a good design is important here, but this method is reliable because it can be made as a required step.

  • Simple guided instructions on... How to take good pictures! Some apps show ti once at firstrun. Some apps give you chance to disable. In my apps, I have seen a substantial increase in quality after providing these instructions after update of my app FotoNote on iOS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.