8

我有对文档执行 OCR 的 android 应用程序。我希望能够在将图像发送到服务器之前对其进行一些测试。所以我的问题是在将图像发送到服务器之前是否有任何工具/代码可用于测量图像焦点。我希望能够知道图像是否不在焦点上(不够清​​晰),以节省服务器端的处理时间而不是发送它。谢谢大卫

4

1 回答 1

2

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.

于 2013-06-05T00:21:05.400 回答