VisionPro - 基础 - 模板匹配技术和在VP中的使用 - PMAlign - PatMax (5)- 非线性模板变形匹配

news2024/9/22 10:34:51

前言:

本机继续对VP的PatMax 算子进行说明:本节讲非线性变形的模板匹配。


 Non-Linear Pattern Deformation

By default, PatMax requires that each boundary point in the instance of a pattern found in a run-time image closely correspond to a boundary point in the trained pattern. PatMax can match and identify any change that can be described by a linear geometric transformation (assuming you specify the appropriate degrees of freedom and zones).

When patterns exhibit nonlinear geometric changes, PatMax can fail to find them, or it can return a low score or inaccurate location information. There are two ways PatMax can work with patterns that exhibit nonlinear geometric change.

  • In cases with a small amount of deformation, you can specify a nonzero elasticity value (in pixels) that specifies how much non-linear deformation PatMax will tolerate.
  • In cases with substantial deformation, can use the PatFlex algorithm to locate and match patterns and return information about the deformation of the found pattern instance.

Each of these two methods is described in this section.

【在之前的几节,我们提到模板匹配的6个自由度匹配。同时解释了模板匹配的两种模式,基准标记和范围标记(ZONE)。然而,这些都是考虑的线性的几何变换。】

对于非线性的模板匹配,康耐视提供了两个思路:

  1. 对于小的形变,通过设定一个非零的弹性值(像素级)来定义PatMax的非线性的冗余度。
  2. 确实是有非线性形变,这时候需要通过 PatFlex 算子定位和匹配模版。

1 Elasticity 非零的弹性值的使用:

You can specify the degree to which you will allow PatMax to tolerate nonlinear deformation by specifying an elasticity value. You specify the elasticity value in pixels.

In general, you should specify a nonzero elasticity value if you expect inconsistent variation in patterns in run-time images.

You should keep the following points in mind when specifying a nonzero elasticity value:

  • Specifying a nonzero elasticity value does not affect PatMax's execution speed.
  • Increasing the elasticity value does not decrease PatMax's accuracy. However, location information returned about additional object instances that are found as a result of increasing the elasticity value can be less accurate.
  • If the elasticity value is too low, you will see low scores and your application may fail to find patterns in the run-time image and/or the positions will be incorrect or unstable.
  • If the elasticity value is too high, PatMax may match false instances and may return inaccurate or unstable results.

In general, you should start with an elasticity value of 0; if necessary, increase the value slowly until you obtain satisfactory results.

【案,从官网表述看康耐视的elasticity算法,不是很好用。设定的阈值完全需要根据实际的情况进行调整】

2 PatFlex Algorithm 

2.1 常见的非线性形变

扭曲匹配算法大约支持一些常见的非线性形变:

  • 球形 spherical
  • 圆柱形  cylindrical
  • 表面扭曲形  surface flex distortion

 2.2 How PatFlex Reports Deformation Information PatFlex的算子原理

 When you use the PatFlex algorithm, the tool detects changes in the features of the pattern independently, and then constructs a special type of transformation that maps between the trained pattern and the pattern instance found in the run-time image, as show in Figure 20.

 

 Because the PatFlex algorithm locates features independently, it can tolerate (and return information about) an arbitrary deformation.

The special nonlinear transformation that PatFlex computes can be used in two ways.

  • You can use it to generate an unwarped version of the run-time image. You can then perform additional operations on this unwarped image.
  • You can use it to display a deformed grid graphic that provides a graphical representation of the deformation.

 【PatFlex 的作用还是比较厉害的,首先他是独立的不影响其他的算子。然后,1 你可以用它直接把扭曲的图像给纠正回来 2 可以生成一个扭曲的网格图,来表征被测图片发生了哪些形变扭曲。】

2.3 PatFlex 的一些参数:

If you use the PatFlex algorithm, you have the opportunity to specify several parameters.

  • The expected (training time) and maximum (run time) deformation rate
  • The deformation fit (perspective or surface flex)
  • The number of control points
  • The smoothing value
  • The refinement mode

Each of these parameters is discussed in this section.

2.3.1 Expected and Maximum Deformation Rate 【期望和最大扭曲率】

这是两个可以在配置算子时候,设定的扭曲程度的参数。

Different instances of a trained pattern can exhibit different amounts of deformation. The PatFlex algorithm expresses the degree of pattern deformation as the pattern's deformation rate. A pattern's deformation rate is a value in the range 0.0 through 1.0. A value of 0.0 indicates no deformation, while a value of 1.0 indicates a highly deformed pattern.

The deformation rate represents the percentage of variance between the undeformed location of a control point in the run-time image and the found location of the control point. Figure 21 provides a visual guide for estimating pattern deformation

 

 【案,上图显示了不同扭曲程度下,图片的扭曲的实际情况】

2.3.2 Control Points

 You can specify the number of control points that PatFlex uses to map the pattern. By default, PatFlex creates a grid of control points evenly spaced across your pattern. In most cases this produces a satisfactory balance of reasonable execution time and accurate representation of the pattern's deformation.

If you expect high-frequency deformation, such as a crumpled piece of paper, you may need to increase the number of control points.

【控制位点,是PatFlex进行模型匹配的时候,用户设定的一些关键点,PatFlex通过这些设定的关键点进行模型匹配。注意,点越多,匹配精度越好,但是,执行时间更长。】

2.3.3 Smoothness Value 平滑值:

PatFlex creates a nonlinear transformation that describes the difference between the trained control points and the control points found in the run-time image. PatFlex refines this transformation so that you can use it to map any point between the trained pattern and the run-time image (CVL only) or create an unwarped version of the run-time image.

The smoothness value determines how closely PatFlex fits this transformation to the found control point locations. A smoothness value of 0.0 indicates that the transformation is to be perfectly fitted to the control points. A smoothness value of infinity indicates that the transform is an affine transform (does not incorporate any of the nonlinear deformation).

In most cases, the default value of 3.0 is appropriate. If too small a smoothness value is specified, the resulting transformation may be perfectly accurate for the control points, but less accurate for intervening points, as shown in Figure 22.

Figure 22. Effect of different smoothness values

平滑值是用来衡量PatFlex的扭曲变换的结果的。越低匹配的越完美。【当然,如果要对模板匹配特性执行完美的话,平滑值设定越高,图像的扭曲纠偏就约完美,如上图,很大的平滑值设定会将一个扭曲的图片展平为一个未被扭曲的图片。】

用模式设定值,可以更快捷的设定扭曲变形。

2.4 PatFlex Performance 的效果

The PatFlex algorithm generally requires substantially more time for both training and searching, than the other PatMax algorithms. Also, as you increase the number and size of the enabled degrees of freedom, PatFlex may require significant amounts of time to run. Finally, specifying large numbers of control points will increase search times. The maximum deformation rate (specified at run time) has a similar effect on performance; the larger the maximum deformation rate, the longer the search may take.

Increasing the expected deformation rate (specified at training time) can increase training time, but it has only a small affect on search time.

【首先,PatFlex 是 PatMax 算子的一部分。PatFlex的主要弱点,应该主要是运行效率。跟多的自由度和图像的大小,会影响执行时间。】

上一节,我们已经提到平滑值的设定,在进行模型匹配的时候,我们先训练,再查找。如果我们设定较高的平滑值来进行扭曲纠正,会占用很多训练的时间。但是算法在执行模板搜索的时候受到的影响不大】

2.5 PatFlex Results

In addition to returning a transformation that describes the pattern deformation, the PatFlex algorithm also returns all of the standard PatMax results, such as the pattern score and a linear transformation describing the result's pose. The returned pose represents a best-fit linear approximation

 【PatFlex 也会返回一些线性的纠偏结果】


 Perspective PatMax for Perspective Distortion

The PMAlign tool supports Perspective PatMax for locating 2D features that display various degrees of planar perspective distortion, as shown in the following figure:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2154866.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

低空经济火爆,稀缺无人机教员培训详解

随着科技的飞速发展和低空经济的日益火爆,无人机技术已广泛应用于航拍、农业、物流、救援、环境监测等多个领域,成为推动社会经济发展的新引擎。然而,无人机行业的快速发展也催生了对专业无人机教员的迫切需求。本文将从基础理论学习、实操技…

[Redis][List]详细讲解

目录 0.前言1.常用命令1.LPUSH / RPUSH2.LPUSHX / RPUSHX3.LRANGE4.LPOP / RPOP5.LINDEX6.LINSERT7.LLEN8.LREM9.LTRIM10.LSET 2.阻塞版本命令0.是什么?1.BLPOP / BRPOP 3.内部编码(旧版本,仅供参考)1.ziplist(压缩链表)2.linkedlist(链表)3.quicklist(快…

yolov8旋转目标检测之绝缘子检测-从数据加载到模型训练、部署

YOLOv8 是 YOLO (You Only Look Once) 系列目标检测算法的最新版本,以其高速度和高精度而著称。在电力行业中,绝缘子是电力传输线路上的重要组件之一,它们用于支撑导线并保持电气绝缘。由于长期暴露在户外环境中,绝缘子容易出现损…

详细分析Spring的动态代理机制

文章目录 1. JDK动态代理和CGLIB动态代理的区别1.1 适用范围1.2 生成的代理类1.3 调用方式 2. 问题引入3. 创建工程验证 Spring 默认采用的动态代理机制3.1 引入 Maven 依赖3.2 UserController.java3.3 UserService.java3.4 UserServiceImpl.java(save方法添加了Tra…

【Python】探索 TensorFlow:构建强大的机器学习模型

TensorFlow 是一个开源的深度学习框架,由 Google 开发,广泛应用于机器学习和人工智能领域。自从 2015 年推出以来,它已成为研究人员、开发者和数据科学家们不可或缺的工具。TensorFlow 提供了灵活、高效的工具集,可以帮助我们构建…

API接口在金融科技领域的创新应用

导语: 随着互联网的发展和技术的进步,API接口在金融科技领域的创新应用越来越受到关注。本文将介绍API接口的基本概念,以及它在金融科技领域的应用案例。 第一部分:API接口简介及原理 API是Application Programming Interface&…

2021-03-03人工智能应用的就业效应

【摘要】文章从人工智能的概念出发,在总结已有研究方法的基础上,回顾了人工智能对就业的产业分布、岗位、工资等方面影响的理论与实证研究。文章发现,人工智能技术在替代部分岗位、促使劳动力在不同产业间流动的同时,还会加快劳动…

java 获取集合a比集合b多出来的对象元素

public class OrderListEntity {/*** deprecated 对象集合的处理* param aData 集合a* param bData 集合b* return 返回集合a比集合b多出来的部分, 通过id判断*/public static List<OrderListEntity> AHasMoreThanBData(List<OrderListEntity> aData, List<Ord…

LEAN 赋型唯一性(Unique Typing)之 Church-Rosser 定理 (Church-Rosser Theorem)及 赋型唯一性的证明

有了并行K简化的概念及其属性&#xff0c;以及其在LEAN类型理论中的相关证明&#xff0c;就可以证明&#xff0c;在K简化下的Church-Rosser 定理。即&#xff1a; 其过程如下&#xff1a; 证明如下&#xff1a; 其中的 lemma 4.9 和 4.10 &#xff0c;及 4.8 是 这整个证明过程…

华为云centos7.9按装ambari 2.7.5 hostname 踩坑记录

华为云centos7.9按装ambari 2.7.5踩坑记录 前言升华总结 前言 一般都是废话&#xff0c;本人专业写bug业余运维。起初找了三台不废弃的台式机&#xff0c;开始重装centos系统&#xff0c;开始了HDP3.1.5Ambari2.7.5安装。 推荐一波好文&#xff0c;一路长绿。跑了一段时间没啥…

2024年最新版TypeScript学习笔记——泛型、接口、枚举、自定义类型等知识点

今天带来的是来自尚硅谷禹神2024年8月最新的TS课程的学习笔记&#xff0c;不得不说禹神讲的是真的超级棒&#xff01; 文章目录 TS入门JS中的困扰静态类型检查编译TS命令行编译自动化编译 类型检查变量和函数类型检查字面量类型检查 类型推断类型声明声明对象类型声明函数类型…

深度学习02-pytorch-08-自动微分模块

​​​​​​​ 其实自动微分模块&#xff0c;就是求相当于机器学习中的线性回归损失函数的导数。就是求梯度。 反向传播的目的&#xff1a; 更新参数&#xff0c; 所以会使用到自动微分模块。 神经网络传输的数据都是 float32 类型。 案例1: 代码功能概述&#xff1a; 该…

【Python篇】深入机器学习核心:XGBoost 从入门到实战

文章目录 XGBoost 完整学习指南&#xff1a;从零开始掌握梯度提升1. 前言2. 什么是XGBoost&#xff1f;2.1 梯度提升简介 3. 安装 XGBoost4. 数据准备4.1 加载数据4.2 数据集划分 5. XGBoost 基础操作5.1 转换为 DMatrix 格式5.2 设置参数5.3 模型训练5.4 预测 6. 模型评估7. 超…

重生之我们在ES顶端相遇第14 章 - ES 节点类型

文章目录 前言Coordinating nodeMaster-eligible nodeData nodeCoordinating only nodeRemote-eligible nodeMachine learning node 前言 通过前面的学习&#xff0c;我们已经初步的掌握了 ES 的大部分用法。 后面的篇章会介绍 ES 集群相关的内容。 本文着重介绍 ES 节点类型&…

华为HarmonyOS地图服务 3 - 如何开启和展示“我的位置”?

一. 场景介绍 本章节将向您介绍如何开启和展示“我的位置”功能&#xff0c;“我的位置”指的是进入地图后点击“我的位置”显示当前位置点的功能。效果如下&#xff1a; 二. 接口说明 “我的位置”功能主要由MapComponentController的方法实现&#xff0c;更多接口及使用方法…

软考高级:逻辑地址和物理地址转换 AI解读

一、题目 设某进程的段表如下所示&#xff0c;逻辑地址&#xff08; &#xff09;可以转换为对应的物理地址。 A. &#xff08;0&#xff0c;1597&#xff09;、&#xff08;1&#xff0c;30&#xff09;和&#xff08;3&#xff0c;1390&#xff09; B. &#xff08;0&…

Vue3 中组件传递 + css 变量的组合

文章目录 需求效果如下图所示代码逻辑代码参考 需求 开发一个箭头组件&#xff0c;根据父组件传递的 props 来修改 css 的颜色 效果如下图所示 代码逻辑 代码 父组件&#xff1a; <Arrow color"red" />子组件&#xff1a; <template><div class&…

3DMAX乐高积木插件LegoBlocks使用方法

3DMAX乐高积木插件LegoBlocks&#xff0c;用户可以通过控件调整和自定义每个乐高积木的外观和大小。 【适用版本】 3dMax2009或更高版本&#xff08;不仅限于此范围&#xff09; 【安装方法】 3DMAX乐高积木插件无需安装&#xff0c;使用时直接拖动插件脚本文件到3dMax视口中…

TS 运行环境

1、TS Playground&#xff08;在线&#xff09; TS Playground 是一个在线 TypeScript 编辑器&#xff0c;它允许你编写、共享和学习 TypeScript 代码。 2、Stackblitz&#xff08;在线&#xff09; StackBlitz 是面向web开发人员的基于浏览器的协作IDE。StackBlitz消除了耗时…

握手传输 状态机序列检测(记忆科技笔试题)_2024年9月2日

发送模块循环发送0-7&#xff0c;在每个数据传输完成后&#xff0c;间隔5个clk&#xff0c;发送下一个 插入寄存器打拍处理&#xff0c;可以在不同的时钟周期内对信号进行同步&#xff0c;从而减少亚稳态的风险。 记忆科技笔试题&#xff1a;检测出11011在下一个时钟周期输出…