如何在图像中找到对齐标记 [英] How to Locate Alignment Marks in an Image

查看:332
本文介绍了如何在图像中找到对齐标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个将以标准化形式扫描到图像(例如,TBitmap)的系统。我想在这些页面上识别对齐标记,并使用这些裁剪标记的位置将页面旋转到正确的方向(因此顶部实际上是),并将图像裁剪到对齐标记的位置。



我需要找到的典型标记的示例图像是:



作物标记http://draftingmanuals.tpub.com/14065/img/14065_69_1.jpg



什么是评估从扫描仪获取的图像以查找图像中的各种标记的技术?我需要找到多个标记及其中心点位置。

解决方案

只需集思广益的一些可能的方法。 b
$ b

模板匹配



强力方法将是一个位图图像的注册标记应该看起来像。然后,对于图像中与模板位图具有相同宽度和高度的每个可能的矩形,都可以将图像像素与模板像素进行比较。如果大多数相应的像素匹配,您可能已经找到了一个注册标记。这是非常计算密集型的,因为你必须扫描所有可能的位置,旋转,比例因子等。你可以通过利用你知道的东西来减少这个。例如,您的注册标记是对称的,因此您不需要检查所有可能的轮换。也许你知道标记的确切尺寸,因此可以避免迭代不同的比例因子。最后,您可能会知道注册标记应该靠近角落,因此可以跳过图像中间的大部分。



有趣的点



找到一种方法来识别图像中的有趣点。例如,似乎位于交叉点中心的点可以通过使用加强在基本方向上具有匹配像素的像素的小内核进行卷积然后对结果进行阈值来找到。这给出了一个似乎是交点的像素列表(可能会有一些噪点)。您可以搜索这个坐标的子集,使其看起来像您的注册标记中的五个交叉点。您可能仍然需要应用模板匹配来查找最有可能的位置,但这将大大减少您将要尝试的位置,旋转和比例因子的数量。



特征检测



有线性检测,圈检测等算法。您可以运行一堆然后查找一个圆圈内的两条交叉线段的组合。这可能是最强大的方法,但它也可能是最难得到的。



一些预处理步骤,如运行边缘检测器,阈值或扩张,以及侵蚀过滤器如果图像不是真正的干净开始,也可能有帮助。


I am designing a system that will scan in standardized forms to images (e.g., TBitmap). I would like to identify alignment marks on these pages and use the locations of these crop marks to rotate the page to its proper orientation (so top is actually up) and to crop the image to the location of the alignment marks.

An example image of a typical mark I'd need to locate is:

Crop mark http://draftingmanuals.tpub.com/14065/img/14065_69_1.jpg

What are techniques to evaluate an image obtained from a scanner to locate various marks within the image? I'd need to locate multiple marks and their center point locations.

解决方案

Just brainstorming some possible approaches.

Template Matching

A brute-force method would be to have a bitmap image of what a registration mark should look like. Then, for every possible rectangle in the image that has the same width and height as the template bitmap, you compare the image pixels to the template pixels. If most of the corresponding pixels match, you've probably found a registration mark. This is very compute intensive because you have to scan over all possible positions, rotations, scale factors, etc. You can whittle this down by taking advantage of things you know. For example, your registration mark is symmetric, so you don't need to check all possible rotations. Perhaps you know the exact size the mark should be and thus can avoid iterating over different scale factors. Finally, you might know that the registration marks should be near the corners and thus can skip over most of the middle of the image.

Interesting Points

Find a way to identify "interesting points" in the image. For example, points that seem to be at the center of an intersection could be found by doing a convolution with a small kernel that reinforces pixels that have matching pixels in the cardinal directions and then threshold the result. This gives a list of pixels that seem to be intersection points (there might be some noise). You can search this subset of coordinates for a "constellation" that looks like the five intersection points in your registration mark. You might still need to apply template matching to find the most likely positions, but this would vastly reduce the number of locations, rotations, and scale factors that you'd otherwise have to try.

Feature Detection

There are algorithms for line detection, circle detection, etc. You might be able to run a bunch of these and then look for a combination of two crossing line segments within a circle. This may be the most robust way, but it's probably also the hardest to get working.

Some preprocessing steps, like running edge detectors, thresholding, or dilation, and erosion filters might also help if the images aren't real clean to begin with.

这篇关于如何在图像中找到对齐标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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