在C#图像变换

编程入门 行业动态 更新时间:2024-10-26 01:30:47
本文介绍了在C#图像变换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的工作产生并读取形式的文档处理应用程序。附着在样品形式的印刷文件中产生,由人填写,扫描并反馈到应用以检测​​填充值,包括光学标记(气泡),文本(OCR)等点击此处查看表格样本。

I am working on a document processing application that generates and reads forms. The sample form attached is generated as a printed document, filled out by people, scanned and fed back to the application to detect filled values including Optical Marks (Bubbles), Text (OCR), etc. Click here for Sample Form.

由于扫描扭曲而言图像旋转,缩放和平移的,我用三个标记检测方向和在是计算和存储非常昂贵的一个相当原始的方式调整影像。下面是它的要点:

Since scanning distorts the image in terms of rotation, scale and translation, I use the three markers to detect orientation and correct the image in a rather primitive way that is VERY expensive on computation and memory. Here is the gist of it:

  • 从磁盘读取图像中
  • 检测使用bolbs AForge。
  • 使用形状,相对大小和其他属性过滤掉标记。
  • 计算旋转和旋转图像。
  • 使用AForge从旋转的图像检测bolbs。
  • 计算比例和规模旋转图像。
  • 从检测bolbs缩放后的图像使用AForge。
  • 计算翻译和翻译旋转,缩放后的图像。
  • 使用检测从翻译图像bolbs AForge。
  • 中筛选出答案标记(气泡),因为我已经有了原始形态的位置。
  • 提取平均颜色,并比较阈值确定选项填写。
  • Read in the image from disk.
  • Detect bolbs using AForge.
  • Filter out the markers using shape, relative size and other properties.
  • Calculate rotation and rotate image.
  • Detect bolbs from the rotated image using AForge.
  • Calculate scale and scale rotated image.
  • Detect bolbs from the scaled image using AForge.
  • Calculate translation and translate rotated, scaled image.
  • Detect bolbs from the translated image using AForge.
  • Filter out answer marks (bubbles) since I already have the positions of the original form.
  • Extract mean color and compare to threshold to determine if the option is filled.
  • 是处理一个非常准确的,但低效的方式,我希望利用几何的方法来提取斑点以上只有一次,过滤掉标记/气泡和使用简单的数学计算出相对于标记的气泡期望职位。这应该由60%减少加工时间80%和内存使用情况。

    The above being an extremely accurate but inefficient way to process, I am looking to take a geometric approach to extracting blobs only ONCE, filtering out markers/bubbles and using simple math to figure out expected positions of bubbles relative to the markers. This should cut down the processing time by 80% and memory usage by 60%.

    另外,必须有适用单个图像上的所有三个转变没有办法1影响下。这也将减少斑点检测三次的需求。

    Alternately, there HAS to be a way to apply all three transformations on a single image without one affecting the next. That would also reduce the need for blob detection thrice.

    推荐答案

    我的图像模型,并且在内存模式转换而不是实际的图像。然后,一旦你已经计算出的变换矩阵可以将其应用到实际的图像做OCR。

    I would model the image and do the transformations on that model in memory instead of the actual image. Then once you have calculated the transformation matrix you can apply it to the actual image to do the OCR.

    更多推荐

    在C#图像变换

    本文发布于:2023-11-12 01:13:06,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1580088.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:图像

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!