当前位置: 首页 > article >正文

VisionPro - 基础 - 模板匹配技术-Search/PMAlign/PatMax(6)-纹理屏蔽和重叠匹配

前言:

1 特征掩膜屏蔽:

模板匹配的应用中,去除非感兴趣的区域,或者去除一些枝端末节的特征,突出需要的主特征的匹配是一个基本原则。这一节,介绍了PatMax的一些处理方法:

2 重叠匹配


1 Ignoring Clutter When Scoring (纹理屏蔽)

When you specify the PatMax algorithm, you can tell PatMax to ignore clutter when computing the score of an instance of the pattern in the run-time image. If you tell PatMax to ignore clutter, then pattern instances receive the same score regardless of the presence of extraneous features.

 【Clutter的屏蔽,能提升匹配度的提升】

上图中,

 这个小横就是一个Clutter,在算子的屏蔽设定中,如果启动Clutter,将把匹配得分从0.92 提升到 0.98

2 Pattern Masking 和 Run-Time Image Masking 图像掩膜

VP里面,在进行模板训练的时候,就有一个pattern masking的功能,

这一点我们在第二章的介绍里面已经比较详细的介绍,大家可以参考下面的连接:

VisionPro - 基础 - 模板匹配技术和在VP中的使用 - PMAlign - PatMax(2)- 模板特征、极性、粒度-CSDN博客

 Run-Time Image Masking,则是在进行模板匹配搜索的时候,进行的掩膜的设定:


3  Controlling Overlap Tolerance 控制图像的重叠匹配

By default, when PatMax finds multiple pattern instances in the run-time image that largely overlap each other, PatMax assumes that these instances actually represent the same pattern in the image. For example, if you use PatMax to search for the part shown in Figure 26 with the angle degree of freedom enabled, PatMax will locate three instances of the part at the same location but at three different angles. By default, PatMax discards all but the strongest match and returns a single result.

 

上图中,通过使能角度的自由度模板匹配。PatMax能够匹配到不同角度的模板实例。

【案,这个例子对largely overlap的定义的理解有帮助,上图的图片的旋转,图片大部分旋转后,主要的部分都重叠在一起了】

3.1 重叠的阈值设定

PatMax lets you control how multiple overlapping pattern instances are handled by letting you specify an overlap threshold. You can specify an area overlap threshold (expressed as the percentage of the pattern training area that overlaps) and a separate zone overlap threshold for each enabled degree of freedom.

Note: The area overlap and zone overlap thresholds behave differently.

As you increase the area overlap threshold, PatMax requires that multiple instances overlap to a greater degree before it treats them as a single instance. As you decrease the area overlap threshold, PatMax requires that multiple instances overlap to a lesser degree before it treats them as a single instance.

As you increase a zone overlap threshold, PatMax increases the maximum of the range of distances over which multiple instances are treated as a single instance. As you decrease a zone overlap threshold, PatMax decreases the maximum of the range of distances over which multiple instances will be treated as a single instance.

PatMax uses the procedure shown in Figure 27 to determine whether or not to discard overlapped pattern instances.

 

 【案,在控制图像重叠匹配上,有两个阈值,一个就是area overlap重叠率,也就是几张图片有百分之多少的部分是重叠在一起。另外一个,就是zone overlap重叠率,指不同的图片实例之间的距离范围。】


4 Degenerate Results 退化结果

4.1 定义:

For a given trained pattern, set of enabled degrees of freedom, and run-time image, PatMax returns the transformation that best describes the appearance of the trained pattern in the run-time image. For some combinations of patterns, degrees of freedom, and run-time images there are multiple equally correct transformations.

For example, if you train a circular pattern, then search for that pattern with the angle degree of freedom enabled in an image containing a circle, there are an infinite number of equally valid transformations. The combination of such a trained pattern, enabled degrees of freedom, and run-time image is called a degenerate system. Each of the results is called a degenerate result.

If a particular PatMax result is degenerate, that means that there are other equally accurate transformations that describe the difference between the trained pattern and the object in the run-time image. You can determine whether or not a particular result is degenerate by requesting diagnostic information for that result. See Run-time Information Strings.

Note: In most cases, PatMax will have detected the potential for degenerate solutions when you trained the pattern.

对已经有了,1已经训练好的模板,2一组使能的自由度,3一个待测的实时图片,PatMax 就能模板匹配的给出变化的最佳描述。对一些综合的模板,这三个输入值往往是一起影响最后的变换结果信息。例如,如果我们训练了一个圆形的模板,然后搜索一个角度自由度包括一个圆,那么将会有无限个可能的角度满足要求。

这些组合的模板匹配,被官方名为:退化系统, a degenerate system

a degenerate system的结果被叫做a degenerate result 退化结果

4.2 退化系统例子

下面是一个退化系统的例子,训练的模板是一个正方体,而实时的图片是一个很长的长方体。

如果我们要做一个等比例的匹配,只要左边的竖边对齐,那么,可以有无穷多个匹配的实例。也就是退化结果有无穷度多个。

if you specified an area overlap value of 5%, then PatMax would return approximately the number of results shown

这时候,我们可以设定area overlap重叠率,比如5%,这些无穷的实例现在可以因为约束变得如下:

哪些重叠率大于5%的匹配都被丢弃了。

Note: Individual regions of a PatFlex pattern might be locally degenerate in which case the resulting transform may not have correct information about some aspects of the pattern. For example, if part of the pattern is a circle with no other features around it, the region containing only the circle would be degenerate in that the transform has no valid information about rotational changes.

【案,也就是算子,会有局限性,例如PatFlex,角度的变换在面对圆的模板的时候,不会有任何返回的变换信息。】

Working with Non-square Pixels

If your camera has non-square pixels and your application requires high-accuracy location of rotated patterns, you must calibrate your system and apply the calibration to run-time images and to training images when training from an image. When using shape descriptions, the shapes should be specified in the calibrated space, and the calibrated space should be the selected space of each run-time image.

【案,这也许是一个不太好的结论,在一个没有直角我理解应该是直角的应用图片里面,如果又需要高精度的旋转的角度定位。你必须标定你的系统。在PatMax,shape 和 图像是两种不用的基本目标匹配的模式。标定旋转的坐标系,图像坐标系和标定坐标系需要进行特定的选择】


http://www.kler.cn/a/314936.html

相关文章:

  • 大数据架构设计:数据分层治理的全景指南
  • Hbuilder ios 离线打包sdk版本4.36,HbuilderX 4.36生成打包资源 问题记录
  • 三维卷积( 3D CNN)
  • Lua语言的文件IO
  • CDP集成Hudi实战-spark shell
  • 打包部署若依(RuoYi)SpringBoot后端和Vue前端图文教程
  • Redis面试真题总结(四)
  • 多模态交互才是人机交互的未来
  • MoFA: 迈向AIOS
  • 【QGIS入门实战精品教程】6.1:QGIS根据属性条件查询数据(SQL表达式)
  • 如何在GitHub上Clone项目:一步步指南
  • 暑假考研集训营游记
  • 李宏毅机器学习2023-HW13-Network Compression
  • 4.《DevOps》系列K8S部署CICD流水线之Helm部署Harbor私人镜像仓库
  • 机器学习中求解模型参数的方法
  • LabVIEW编程能力如何能突飞猛进
  • 【数据优化】基于GEE填补遥感缺失数据
  • 测试面试题:接口自动化测试流程?
  • Vue3入门 - ElementPlus中左侧菜单和Tabs菜单组合联动效果
  • linux下的日志编写
  • Linux 文件 IO 管理(第二讲)(重定向和缓冲区)
  • 鸿蒙开发的基本技术栈及学习路线
  • 【JVM安装MinIO】
  • IO流中的异常捕获
  • 搜索引擎onesearch3实现解释和升级到Elasticsearch v8系列(三)-文档
  • C++模版初阶