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

前言:

本机继续对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.xdnf.cn/news/1542201.html

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

相关文章

Java 使用递归方法遍历B站下载文件并解析重命名

目录 背景 操作方法 声明 背景 出于学习和日常使用方便的目的,且考虑到有的资源过一段时间会失效,所以有时会下载B站的音频,视频,进行存放保留,下面介绍下载和下载之后解析文件的方法,仅供学习…

C++20中头文件compare的使用

<compare>是C20中新增加的头文件&#xff0c;此头文件是language support库的一部分。它包括&#xff1a;concepts、classes、customization point objects、functions。 1.concepts&#xff1a;三向比较运算符<>&#xff0c;目的是简化比对对象的过程&#xff0c;…

【编程实践】利用高德地图开放平台制作简易地图规定半径范围

需求分析 [little demo] 使用高德地图API创建一个显示特定半径范围的简易地图。 注册高德开放平台账号&#xff0c;获取API Key。&#xff08;精度要求不高可不需要&#xff09; 创建HTML页面&#xff0c;引入高德地图API。 设置地图中心点和初始缩放级别。 编写代码绘制指定半…

本地电脑基于nginx的https单向认证和双向认证(自制证书+nginx配置)保姆级

目录 1、背景 2、运行环境 3、工具下载 3.1、OpenSSL下载 3.2、nginx下载 4、制作https证书&#xff1a; 4.1、CA与自签名&#xff1a; 4.2、制作CA根证书&#xff08;公钥&#xff09; 4.3、制作服务端证书&#xff1a; 4.4、制作客户端证书&#xff1a; 4.5、制作…

初识ZYNQ——FPGA学习笔记15

一、ZYNQ简介 ZYNQ&#xff1a;Zynq-7000 All Programmable SoC&#xff08;APSoC&#xff09;&#xff0c;赛灵思公司&#xff08;AMD Xilinx&#xff09;推出的新一代全可编程片上系统 PS&#xff1a;Processing System&#xff0c;处理系统 PL&#xff1a;Program Logic&…

828华为云征文 | 构建高效搜索解决方案,Elasticsearch Kibana的完美结合

前言 构建高效搜索解决方案&#xff0c;FlexusX服务器与Elasticsearch & Kibana的完美结合&#xff0c;为企业带来云端搜索新体验。FlexusX实例以其卓越性能与灵活扩展性&#xff0c;确保高并发搜索的流畅运行。部署Elasticsearch&#xff0c;享受分布式搜索的精准与快速&a…

MySQL:SQL语句执行过程

本篇文章会分析下一个 SQL 语句在 MySQL 中的执行流程&#xff0c;包括 SQL 的查询在 MySQL 内部会怎么流转&#xff0c;SQL 语句的更新是怎么完成的。 在分析之前我会先带着你看看 MySQL 的基础架构&#xff0c;知道了 MySQL 由那些组件组成以及这些组件的作用是什么&#xf…

9.22今日错题解析(软考)

前言 这是用来记录我每天备考软考设计师的错题的&#xff0c;大部分错题摘自希赛中的题目&#xff0c;但相关解析是原创&#xff0c;有自己的思考&#xff0c;为了复习&#xff1a;&#xff09;&#xff0c;最后希望各位报考软考的小伙伴都能上岸&#xff01;&#xff01;&…

掌上高考爬虫逆向分析

目标网站 aHR0cHM6Ly93d3cuZ2Fva2FvLmNuL3NjaG9vbC9zZWFyY2g/cmVjb21zY2hwcm9wPSVFNSU4QyVCQiVFOCU4RCVBRg 一、抓包分析 二、逆向分析 搜索定位加密参数 本地生成代码 var CryptoJS require(crypto-js) var crypto require(crypto);f "D23ABC#56"function v(t…

Redis数据结构之set

一.set集合特性 集合类型也是保存多个字符串类型的元素的&#xff0c;但和list列表不一样&#xff0c;集合中的元素是无序的&#xff0c;而且元素不能够重复&#xff0c;不仅支持增删查改&#xff0c;还支持交集并集等操作 二.相关命令 1.sadd sadd key members…… 咱们把…

华为HarmonyOS地图服务 9 - 如何在地图上绘制多边形?

场景介绍 本章节将向您介绍如何在地图上绘制多边形。 接口说明 添加多边形功能主要由MapPolygonOptions、addPolygon和MapPolygon提供&#xff0c;更多接口及使用方法请参见接口文档。 接口名 描述 MapPolygonOptions 用于描述MapPolygon属性。 addPolygon(options: mapC…

SOMEIP_ETS_122: SD_Interface_Version

测试目的&#xff1a; 验证DUT能够以正确的格式响应接口版本获取请求。 描述 本测试用例旨在确保DUT能够正确地返回其接口版本信息&#xff0c;这是SOME/IP协议中用于确定服务兼容性的关键信息。 测试拓扑&#xff1a; 具体步骤&#xff1a; TESTER&#xff1a;触发接口版…

高密原型验证系统解决方案(上篇)

0 引言 随着当今 SoC 设计规模的快速膨胀&#xff0c;仅仅靠几 颗当代最先进的 FPGA 已经无法满足原型验证的需求。简单的增加系统的容量&#xff0c;会遇到系统时钟复位同 步&#xff0c;设计分割以及高速接口和先进 Memory控制器 IP 验证等多重困难。此时&#xff0c;一个商用…

Contact Form 7最新5.9.8版错误修复方案

最近有多位用户反应Contact Form 7最新5.9.8版的管理页面有错误如下图所示 具体错误文件的路径为wp-content\plugins\contact-form-7\admin\includes\welcome-panel.php on line 153 找到welcome-panel.php这个文件编辑它&#xff0c;将如下图选中的部分删除 删除以后&#xf…

AUTOSAR入门篇

AUTOSAR简介 AUTomotive Open System ARchitecture 汽车开放系统结构 AUTOSAR背景 随着车载控制系统日益先进和复杂化,每辆汽车投入的软件开发工数(时间及人力)2010年将达到2002年的5-10倍。汽车电子系统设计复杂化造成的可靠性隐患导致汽车因安全隐患被“招回”的现象频繁…

洪涝洪水滑坡灾害数据集 灾害 2300张 带标注 voc yolo

洪涝洪水滑坡灾害数据集 灾害 2300张 带标注 voc yolo 洪涝洪水滑坡灾害数据集 数据集描述 该数据集是一个专门用于检测和识别洪涝、洪水和滑坡等自然灾害的数据集&#xff0c;旨在帮助研究人员和开发者训练和评估基于深度学习的目标检测模型。数据集涵盖了两种常见的自然灾害…

Java—SPI 机制详解

参考文章 Java常用机制 - SPI机制详解 | Java 全栈知识体系包含: Java 基础, Java 部分源码, JVM, Spring, Spring Boot, Spring Cloud, 数据库原理, MySQL, ElasticSearch, MongoDB, Docker, k8s, CI&CD, Linux, DevOps, 分布式, 中间件, 开发工具, Git, IDE, 源码阅读&a…

力扣之183.从不订购的客户

1. 183.从不订购的客户 1.1 题干 Customers 表&#xff1a; -------------------- | Column Name | Type | -------------------- | id | int | | name | varchar | -------------------- 在 SQL 中&#xff0c;id 是该表的主键。 该表的每一行都表示客户的 ID 和名称。 Ord…

有关shell指令练习2

写一个shell脚本&#xff0c;将以下内容放到脚本中 在家目录下创建目录文件&#xff0c;dir dir下创建dir1和dir2 把当前目录下的所有文件拷贝到dir1中&#xff0c; 把当前目录下的所有脚本文件拷贝到dir2中 把dir2打包并压缩为dir2.tar.xz 再把dir2.tar.xz移动到dir1中 …

MATLAB基于传统方法的车道线检测实现

MATLAB基于传统方法的车道线检测实现 本文实现的是基于传统方法的车道线检测&#xff0c;所谓传统方法就是没有涉及到深度学习算法&#xff0c;基于直观的手段和数学知识来实现&#xff0c;后期会实现基于深度学习的车道线检测方法。 实现步骤&#xff1a; Canny边缘检测手动…