00. 目录

文章目录

  • 00. 目录
  • 01. 概述
  • 02. 签名
  • 03. 描述
  • 04. 注意
  • 05. 参数
  • 06. 结果
  • 07. 附录

01. 概述

set_fuzzy_measure - 指定一个模糊函数。

02. 签名

set_fuzzy_measure( : : MeasureHandle, SetType, Function : )

03. 描述

set_fuzzy_measure指定在函数中传递的模糊函数。 指定的模糊函数使得fuzzy_measure_pos和fuzzy_measure_pairs / fuzzy_measure_pairing能够评估和选择检测到的候选边缘。 为此,不同边缘特征的加权特征可以由一个函数来定义。 这种特定的特征被称为模糊集合。 模糊集没有指定的功能意味着不使用此功能进行最终边缘评估。 将第二个模糊函数设置意味着放弃第一个定义的函数并将其替换为第二个函数。 以前定义的模糊函数可以通过reset_fuzzy_measure完全丢弃。

可以定义由SetType参数选择的五种不同模糊集合类型的函数,一个集合的子类型是互斥的:

'contrast’将使用模糊函数来评估候选边缘的幅度。 在提取边缘对时,通过两边的模糊对比度评分的几何平均来获得模糊评估。

'position’的模糊函数评估由gen_measure_arc或gen_measure_rectangle2生成的每个候选边缘到度量对象的参考点的距离。 参考点位于开始位置,而“position_center”或“position_end”将参考点设置为一维灰度值轮廓的中间或末端。 如果模糊位置评估取决于物体沿着轮廓的位置,‘position_first_edge’/‘position_last_edge’将参考点设置在第一个/最后提取的边缘的位置处。 当提取边缘对时,边缘对的位置被两边的模糊位置分数的几何平均值所引用。

与’position’相似,‘position_pair’计算每个边对与measure对象的参考点之间的距离。 一个边缘对的位置由两个边缘之间的中心点定义。 对象的参考点可以分别由’position_pair_center’,‘position_pair_end’和’position_first_pair’,'position_last_pair’来设置。 与’position’不同的是,该设置仅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。

'size’表示一个模糊设置,该设置为以像素为单位评估一对的两条边的规定距离。 该集合仅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。 通过以相应的模糊值0.0终止函数来指定大小的上限将加快fuzzy_measure_pairs / fuzzy_measure_pairing,因为不需要考虑所有可能的对。

'gray’设置模糊函数来对一对的两个边缘之间的平均投影灰度值进行加权。 该集合仅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。

一个模糊函数被定义为一个分段线性函数,由至少两对值按升序按x值排序。 x值表示边缘特征,并且必须位于设置类型的参数空间内,即,在’contrast’和’gray’特征的情况下,例如在0.0≤x≤255.0的范围内的byte图像。 'size’x必须满足0.0 <= x,而 'position’x可以是任何实数。 模糊函数的y值表示相应特征值的权重,并且必须满足0.0 <= y <= 1.0。 在由最小和最大x值定义的函数间隔之外,间隔边界外的y值仍连续。 这样的模糊函数可以由create_funct_1d_pairs生成。

如果定义了多个集合,则fuzzy_measure_pos / fuzzy_measure_pairs / fuzzy_measure_pairing通过每个集合的权重的几何中间产生整体模糊加权。

原文描述

set_fuzzy_measure specifies a fuzzy function passed in Function. The specified fuzzy functions enable fuzzy_measure_pos and fuzzy_measure_pairs / fuzzy_measure_pairing to evaluate and select the detected edge candidates. For this purpose, weighting characteristics for different edge features can be defined by one function each. Such a specified feature is called fuzzy set. Specifying no function for a fuzzy set means not to use this feature for the final edge evaluation. Setting a second fuzzy function to a set means to discard the first defined function and replace it by the second one. A previously defined fuzzy function can be discarded completely by reset_fuzzy_measure.

For an explanation of the concept of 1D measuring see the introduction of chapter 1D Measuring.

Functions for five different fuzzy set types selected by the SetType parameter can be defined, the sub types of a set being mutual exclusive:

‘contrast’ will use the fuzzy function to evaluate the amplitudes of the edge candidates. When extracting edge pairs, the fuzzy evaluation is obtained by the geometric average of the fuzzy contrast scores of both edges.

The fuzzy function of ‘position’ evaluates the distance of each edge candidate to the reference point of the measure object, generated by gen_measure_arc or gen_measure_rectangle2. The reference point is located at the beginning whereas ‘position_center’ or ‘position_end’ sets the reference point to the middle or the end of the one-dimensional gray value profile instead. If the fuzzy position evaluation depends on the position of the object along the profile, ‘position_first_edge’ / ‘position_last_edge’ sets the referece point at the position of the first/last extracted edge. When extracting edge pairs the position of a pair is referenced by the geometric average of the fuzzy position scores of both edges.

Similar to ‘position’, ‘position_pair’ evaluates the distance of each edge pair to the reference point of the measure object. The position of a pair is defined by the center point between both edges. The object’s reference can be set by ‘position_pair_center’, ‘position_pair_end’ and ‘position_first_pair’, ‘position_last_pair’, respectively. Contrary to ‘position’, this set is only used by fuzzy_measure_pairs/fuzzy_measure_pairing.

‘size’ denotes a fuzzy set that evaluates the normed distance of the two edges of a pair in pixels. This set is only used by fuzzy_measure_pairs/fuzzy_measure_pairing. Specifying an upper bound for the size by terminating the function with a corresponding fuzzy value of 0.0 will speed up fuzzy_measure_pairs / fuzzy_measure_pairing because not all possible pairs need to be considered.

‘gray’ sets a fuzzy function to weight the mean projected gray value between two edges of a pair. This set is only used by fuzzy_measure_pairs / fuzzy_measure_pairing.

A fuzzy function is defined as a piecewise linear function by at least two pairs of values, sorted in an ascending order by their x value. The x values represent the edge feature and must lie within the parameter space of the set type, i.e., in case of ‘contrast’ and ‘gray’ feature and, e.g., byte images within the range 0.0 <= x <= 255.0. In case of ‘size’ x has to satisfy 0.0 <= x whereas in case of ‘position’ x can be any real number. The y values of the fuzzy function represent the weight of the corresponding feature value and have to satisfy the range of 0.0 <= y <= 1.0. Outside of the function’s interval, defined by the smallest and the greatest x value, the y values of the interval borders are continued constantly. Such Fuzzy functions can be generated by create_funct_1d_pairs.

If more than one set is defined, fuzzy_measure_pos / fuzzy_measure_pairs / fuzzy_measure_pairing yield the overall fuzzy weighting by the geometric middle of the weights of each set.

执行信息

●  多线程类型:可重入(与非独占算子并行运行)。
●  多线程范围:全局(可以从任何线程调用)。
●  不并行处理。

该算子修改以下输入参数的状态:

MeasureHandle

如果没有全局同步,此参数的值可能不会在多个线程之间共享。

04. 注意

05. 参数

SetType (input_control)   string → (string)
  模糊集合的选择。: ‘contrast’
  List of values: ‘contrast’, ‘gray’, ‘position’, ‘position_center’, ‘position_end’, ‘position_first_edge’, ‘position_first_pair’, ‘position_last_edge’, ‘position_last_pair’,   ‘position_pair_center’, ‘position_pair_end’, ‘size’

Function (input_control)    function_1d → (real / integer)
  模糊函数。

06. 结果

HDevelop例程

inspect_bottle_label_360_degree.hdev 将一个瓶子的四个图像组合成拼接图像,显示瓶子的展开标签
fuzzy_measure_switch.hdev     用一个模糊度量对象确定一个开关引脚的宽度和距离

程序示例

* how to use a fuzzy function
* ...
gen_measure_rectangle2 (50, 100, 0, 200, 100, 512, 512, 'nearest_neighbor', \MeasureHandle)
* create a generalized fuzzy function to evaluate edge pairs
* * (30% uncertainty).
create_funct_1d_pairs ([0.7,1.0,1.3], [0.0,1.0,0.0], SizeFunction)
* and transform it to expected size of 13.45 pixels
transform_funct_1d (SizeFunction, [1.0,0.0,13.45,0.0], TransformedFunction)
set_fuzzy_measure (MeasureHandle, 'size', TransformedFunction)fuzzy_measure_pairs (Image, MeasureHandle, 1, 30, 0.5, 'all', RowEdgeFirst, \ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, \ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, \ColumnEdgeCenter, FuzzyScore, IntraDistance, \InterDistance)

07. 附录

7.1 机器视觉博客汇总
网址:https://dengjin.blog.csdn.net/article/details/116837497

【机器视觉】 set_fuzzy_measure算子相关推荐

  1. 机器视觉 边缘检测算子

    1.实验目的 利用opencv python实现对下图实现边缘检测算子. 2.实验过程 (1)在python安装opencv库, pip install opencv-python. (2)在pyth ...

  2. 【机器视觉】机器视觉博客汇总

    00. 目录 文章目录 00. 目录 01. 机器视觉概述 02. 机器视觉环境搭建 03. Halcon初级教程 04. Halcon中级教程 05. Halcon高级教程 06. Halcon与Q ...

  3. 拉普拉斯噪声公式_高斯拉普拉斯算子(Laplace of Gaussian)

    高斯拉普拉斯(Laplace of Gaussian) Laplace算子作为一种优秀的边缘检测算子,在边缘检测中得到了广泛的应用.该方法通过对图像 求图像的二阶倒数的零交叉点来实现边缘的检测,公式表 ...

  4. 【机器视觉】 set_fuzzy_measure_norm_pair算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 set_fuzzy_measure_norm_pa ...

  5. 【机器视觉】 reset_fuzzy_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 reset_fuzzy_measure - 重置一 ...

  6. 【机器视觉】 fuzzy_measure_pos算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 fuzzy_measure_pos - 提取垂直于 ...

  7. 【机器视觉】 fuzzy_measure_pairs算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 fuzzy_measure_pairs - 提取垂 ...

  8. 【机器视觉】 fuzzy_measure_pairing算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 fuzzy_measure_pairing - 提 ...

  9. python 视觉技术_python+opencv实现机器视觉基础技术(边缘提取,图像滤波,边缘检测算子,投影,车牌字符分割)...

    机器视觉是人工智能正在快速发展的一个分支.简单说来,机器视觉就是用机器代替人眼来做测量和判断.它是一项综合技术,包括图像处理.机械工程技术.控制.电光源照明.光学成像.传感器.模拟与数字视频技术.计算 ...

最新文章

  1. 绿色噱头VS数据中心的机会
  2. 第十六届全国大学生智能车竞赛组委会第三次扩大会议
  3. free malloc
  4. React实践(一)——webpack4搭建开发环境
  5. Python中的线程间通信
  6. da---tlc5615._CD-DA的完整形式是什么?
  7. C语言/C++常见字符串函数
  8. python医药数据,PostgreSQL+Python实现药品规格数值与单位拆分
  9. 第二十节,使用RNN网络拟合回声信号序列
  10. html怎么置顶导航栏,css怎么实现滚动页面导航栏固定在顶部
  11. 【寒江雪】空间中的点线和面
  12. 新手焊接电路板_手把手教您如何掌握焊接电路板基础知识
  13. lumen框架的理解
  14. IMAP协议定时监听接收邮件(QQ邮箱、网易邮箱都可)
  15. 小观插值逼近的龙格现象
  16. kubernetes【工具】kind【2】集群配置
  17. Android中获取唯一的id
  18. ACM入门题:幼儿园买玩具-Go语言
  19. How to design your talend custom component?
  20. 深度学习框架Keras的安装

热门文章

  1. java13 InputStream,Reader
  2. SQL_Server_2008完全学习之第八章Transact-SQL编程
  3. 西南往事回忆录—工作点滴
  4. VBS 连接数据库 - 样例
  5. Java:数列排序 给定一个长度为n的数列,将这个数列按从小到大的顺序排列。1<=n<=200
  6. php数组第二位,PHP将二位数组按照第二维的某个元素的值进行排序
  7. vuex刷新页面数据丢失怎么解决_你是否真正了解Vuex
  8. win7怎么安装nodejs_怎么解决win7安装软件提示
  9. Linux两个进程交换信息,如何在Linux中的进程之间交换二进制数据
  10. python工作环境_CentOS7下python工作环境管理