在图像中查找图像 C#
我扫描了一份文档(实际上是一份表格),其中包含一些手写信息。
我有一个空表单的位图。
我如何“取消”打印表格以仅提取手写内容。
我用C#... 谢谢 乔纳森
I have a scan of a document (a form actually) filled with some handwritten infos.
I have a bitmap of the form empty.
how can i "cancel" the printed form to extract the handwritting only.
I use C#...
Thanks
Jonathan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您要做的就是从带有手写内容的表单图像中减去空表单图像。 这将为您提供仅笔迹的合理图像。
请注意,这不会注册图像。 配准会将它们排列起来,使它们处于相同的方向,从而为减法提供最大的成功机会。 如果您的图像对齐不佳,则必须检查图像配准。
这是我不久前编写的一段代码,用于执行类似的操作(此代码以红色突出显示差异):
What you want to do is subtract the empty form image from the image of the form with handwriting in it. This will give you a reasonable image of the handwriting alone.
Please note that this will not register the images. Registration will line them up so that they are at identical orientations to give the subtraction the best chance of success. If your images are poorly aligned you'll have to look into image registration.
Here's a snippet of code I wrote a while back to do something similar (this code highlights differences in red):
作为替代方案(可能更快的方法),您是否可以不只存储“字段”所在位置的矩形位置,然后简单地提取每个矩形的像素?
黑夜
As an alternative (and possibly much faster method) could you not just store the rectangle psoitions of where the "fields" are going to be, then simply extract the pixels for each rectangles?
Darknight