如何在扫描的文档图像上查找空白字段 [英] How to find blank field on scanned document image

查看:114
本文介绍了如何在扫描的文档图像上查找空白字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的应用程序以以下形式填写一个字段: 作为黑白图像文件存在.形式总是 以相同的纸质版本开始,但是到了我的时候 应用程序从我的用户那里获得了它,它可能已经被扫描或传真了更多 不止一次.因此,我需要的字段不在 每个文件中都位于同一位置.

I want my application to fill in a single field in a form that exists as an black-and-white image file. The form always starts as the same paper version, but by the time my application gets it from my users, it may have been scanned or faxed more than once. Because of that, the field I need is not in the same place in every file.

我的用户并非总是从我这里获得空白表格,因此我不会 有能力打印我可以的标记或占位符 以后再认.

My users do not always get the blank form from me, so I do not have the ability to print a mark or placeholder that I can recognize later.

原始空白表格上有文字,但是因为它可能 传真后,我的分辨率只有200 dpi.文本 足够大,足以供人类阅读,但我对此表示怀疑 关于OCR.

There is text on the original blank form, but because it may have been faxed, I have only 200 dpi of resolution. The text is always big enough for a human to read, but I'm skeptical about OCR.

我有一些预算,所以我不需要免费的解决方案...让我们 只需说$ 2000.

I have some budget so I do not need a free solution ... let's just say $2000.

也就是说,我正在考虑

  1. 获取OCR解决方案以查找文本 在我需要的字段上贴上标签.我不 认为我有资源或 专长于我自己.我不 需要完美的认可,因为我 已经知道文字说了什么. 但是我确实需要知道X-和 Y坐标.有软件吗 那是吗?还是编程比我想象的容易?

  1. Get an OCR solution to find the text label on the field I need. I do not think I have the resources or expertise to roll-my-own. I do not need perfect recognition, since I already know what the text says. But I do need to know X- and Y-coordinates. Is there software that does this? Or is the programming easier than I think?

构建或购买可识别的软件 表单的边缘.从那里, 我可以得到的相对位置 我需要的领域.我在想 我的扫描仪软件将虚线围绕 一个小文件.那是已知的吗 algorhthm还是有可用的 解决方案?

Build or buy software to recognize the edges of the form. From there, I could get the relative position of the field I need. I'm thinking of the dashed line my scanner software puts around the image of a small document. Is that a known algorhthm or is there an available solution?

以其他方式识别 我需要的领域.尝试谷歌 表格填写软件给我 Web表单的数百个匹配项, pdf表格等不符合我的要求 需要.

Some other way to recognize the field I need. Attempts to google form filling software give me hundreds of matches for web forms, pdf forms, etc. that do not do what I need.

我对语言不挑剔.我的应用程序在Linux上运行,但是如果最好的解决方案是Microsoft,那么我可能可以使它工作.

I'm not picky about language. My application runs on Linux, but if the best solution is Microsoft, I can probably make that work.

感谢您的想法.

推荐答案

如果我理解正确,则表单始终是相同的,但是由于复印/传真可能会移动,缩放或稍微旋转.在这种情况下,您的问题是图像配准之一:找到最佳的刚性变换,使用户根据您的模型"表单排列表单,从而知道表单的位置兴趣.知道转换之后,就可以计算用户表单中字段的位置.

If I understand correctly, the form is always the same, but may be shifted, scaled, or slightly rotated due to photocopying/faxing. In that case, your problem is one of image registration: find the optimal rigid transformation that makes a form from a user line up with your "model" form, in which you know the location of the field of interest. Once you know the transformation, you can compute the location of the field in the user's form.

有许多图像配准算法,通常是为诸如对齐大脑的MR图像之类的应用开发的.它们在计算上昂贵并且需要统计先验.幸运的是,您的情况更容易:您所需要做的就是在用户表单的内容周围放置一个矩形.协调后裔应该起作用.您将需要一定的噪声容忍度(表格外的垃圾).

There are many image registration algorithms, typically developed for applications such as aligning MR-images of the brain. They are computationally expensive and require statistical priors. Fortunately, your case is easier: all you need to do is fit a rectangle around the contents of the user's form. Coordinate descent should work. You will need some tolerance for noise (junk outside the form).

这篇关于如何在扫描的文档图像上查找空白字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆