您的位置:首页 > 教育 > 培训 > VisionPro - 基础 - 00 模板匹配技术和在VP中的使用 - PMAlign - PatMax - (上)

VisionPro - 基础 - 00 模板匹配技术和在VP中的使用 - PMAlign - PatMax - (上)

2024/10/5 21:18:59 来源:https://blog.csdn.net/yellow_hill/article/details/142257652  浏览:    关键词:VisionPro - 基础 - 00 模板匹配技术和在VP中的使用 - PMAlign - PatMax - (上)

前言

模板匹配是机器视觉领域,尤其是工业视觉领域内,自动化经常要使用的一个视觉算法应用模式。在VP里面,有几种简单的模版匹配的算子,这里大致介绍一下VP的PatMax。

在视觉应用领域,搜索匹配的特征是经常要用到的方法。VP里面对于搜索匹配有几个不同类型的算子,

 其中的特点我归纳于下:

 本讲,我们主要讲PMAlign。

 


简介

Like other pattern-location technologies, PatMax trains a pattern, then locates one or more instances of that pattern in one or more run-time images. PatMax differs from other pattern-location technologies in that it is not based on pixel grid representations that cannot be efficiently and accurately rotated or scaled. Instead, PatMax uses a feature-based representation that can be transformed quickly and accurately for pattern matching.

和其他的模板匹配技术一样,PatMax通过在一个图像或者一个实时的运行图片中,设定一个或者多个匹配模版 。PatMax的主要特点,和其他的模板匹配技术不同的地方,在于他不是通过Pixel的觉得网格来匹配(这种方法往往在准确定位和缩放的时候效率低下),还是基于【案,我认为是抽象的特征】特征的表达,这样可以很快并且准确的获取匹配的结果。【由此,可以用于旋转和缩放发生的时候,单纯的pixel的对照无法实现的匹配】


模板训练和术语

1 PatMax 简介

PatMax can be trained from an image that contains features similar to those you wish to find at run time, or it can be trained from a geometric description of the target features. PatMax training results in a pattern that contains geometric features.

PatMax模板训练,通过设定的一些方法, 在实时运行的时候,找到相近的特征,并把目标特征转为几何表述。 

上图为PatMax的逻辑图,模板训练有两个类型,一个是形状训练和图像训练,并由此生成包括几何特征的模板。

1.1 PatMax 模板

The PatMax software supports two pattern-location algorithms: PatMax and PatQuick. PatMax offers higher accuracy and additional score information compared to PatQuick, but requires more time to execute.

PatMax包括, PatMax and PatQuick,两种处理模式,区别就是PatMax更精确一点,并包括了一个计分的计算,由此需要更多的计算时间。

PatMax Patterns

PatMax extracts patterns from the images of objects you acquire. A PatMax pattern is a collection of geometric features and the spatial relationship between them, where each feature is a collection of points on the boundary between two regions of dissimilar pixel values.

 PatMax 从待测图像中抽象出来模板。这些被抽象出来的模板就是收集了几何特征,和空间关系的一个集合,这些特征其实就是在一个阈值区域的Pixel值, 在阈值内被认为符合特征的点集,否则就是不符合特征的点集,由此图像进行了特征分割。

上图,显示了图像,模板,特征的抽象和被抽象的关系。


理解模板的变换(Transformation)的意义:

1 模板变化的衡量尺度 - degree

PatMax算子,可以表现支持一下3种图像模板的变化:

  • Size (overall size change or individual x- and y-axis size change)
  • Rotation
  • Location

 具体可以用下面6种变化来定义:

degree of freedom:

Part of a transformation that can be characterized by a single numeric value such as angle

【案,有关degree的定义,应该是在一下六个方面的变更程度的一个衡量标准】

 

【案,Uniform scale,应该是比例缩放的意思,图例的说明很明白,无需过多说明。每一种形式的变更,我们都可以用这种形式的程度变量degree来衡量】

2 组合的模板变化:

 

 上图,展示了一个组合的尺度变化。

Patmax算子,可以找到训练模板【案,这个是在算子的配置的时候,通过一些设定的方法,在图像中选取匹配的特征组合】在上面6个尺度的变化情况。

当然, PatMax 可以配置到你设定的上述6个方面的某个方面的自由度[案,这里借鉴了工程力学的定义】的衡量,并以0 到 1 的数值来衡量模板匹配度【案,这里匹配度就是和训练模板和找到的特征的相识程度】

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com