00. 目录

文章目录

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

01. 概述

measure_thresh - 沿矩形或环形弧提取具有特定灰度值的点。

02. 签名

measure_thresh(Image : : MeasureHandle, Sigma, Threshold, Select : RowThresh, ColumnThresh, Distance)

03. 描述

measure_thresh提取一维灰度值分布图内的灰度值等于指定的阈值Threshold的点。 将灰度值轮廓投影到与参数MeasureHandle一起传递的度量矩形的长轴上,因此在灰度值轮廓内计算的阈值点对应于确定图像坐标上的矩形长轴。算子结果RowThresh和ColumnThresh返回这些坐标。

如果灰度值轮廓与阈值线相交数次,则参数Select将确定要返回哪些值。 可能的设置是“first”,“last”,“first_last”(第一个和最后一个)或“all”。 对于最后两种情况,Distance中返回计算点之间的距离。

通过平均所有线段的灰度值来创建灰度值轮廓,所述线段由度量矩形定义如下:

1.分段垂直于矩形的长轴,

2.它们有一个到矩形中心的整数距离,

3.线段限定在矩形内。

对于每一个线段,计算与长轴具有整数距离的所有点的灰度值的平均值。 由于测量矩形相对于图像坐标存在平移和旋转,输入图像Image通常在亚像素位置被采样。

由于这涉及可以在多个投影中重复使用的一些计算,所以使用算子gen_measure_rectangle2预先执行一次这些计算。 在这里,测量对象MeasureHandle被生成,并且可以选择不同的插值方案。

原文描述

measure_thresh extracts points for which the gray value within an one-dimensional gray value profile is equal to the specified threshold Threshold. The gray value profile is projected onto the major axis of the measure rectangle which is passed with the parameter MeasureHandle, so the threshold points calculated within the gray value profile correspond to certain image coordinates on the rectangle’s major axis. These coordinates are returned as the operator results in RowThresh and ColumnThresh.

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

If the gray value profile intersects the threshold line for several times, the parameter Select determines which values to return. Possible settings are ‘first’, ‘last’, ‘first_last’ (first and last) or ‘all’. For the last two cases Distance returns the distances between the calculated points.

The gray value profile is created by averaging the gray values along all line segments, which are defined by the measure rectangle as follows:

The segments are perpendicular to the major axis of the rectangle,

they have an integer distance to the center of the rectangle,

the rectangle bounds the segments.

For every line segment, the average of the gray values of all points with an integer distance to the major axis is calculated. Due to translation and rotation of the measure rectangle with respect to the image coordinates the input image Image is in general sampled at subpixel positions.

Since this involves some calculations which can be used repeatedly in several projections, the operator gen_measure_rectangle2 is used to perform these calculations only once in advance. Here, the measure object MeasureHandle is generated and different interpolation schemes can be selected.

执行信息

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

04. 注意

只有边缘是直的并垂直于矩形或弧的长轴,measure_thresh返回的结果才有意义。 因此它不应该用于从曲面对象中提取边缘。 此外用户应确保矩形或弧线尽可能接近垂直于图像中的边缘。 此外,西格玛不能大于约0.5 * Length1(对于Lenth1请参见gen_measure_rectangle2)。

应该记住,为了效率的原因,measure_thresh会忽略Image的ROI域。 如果图像中的特定区域应该从measurement中排除,则应该生成具有适当修改的参数的新measure对象。

05. 参数

Image (input_object)   单通道图像 → object (byte / uint2 / real)
  输入图像。

MeasureHandle (input_control)    measure_id → (integer)
  Measure对象句柄。

Sigma (input_control)    number → (real)
高斯模糊Sigma。

Default value: 1.0
Suggested values: 0.0, 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
Typical range of values: 0.4 ≤ Sigma ≤ 100 (lin)
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: Sigma >= 0.0

Threshold (input_control)    number → (real)
阈值。
Default value: 128.0
Typical range of values: 0 ≤ Threshold ≤ 255 (lin)
Minimum increment: 0.5
Recommended increment: 1

Select (input_control)    string → (string)
要选择的点。
Default value: ‘all’
List of values: ‘all’, ‘first’, ‘first_last’, ‘last’

RowThresh (output_control)    point.y-array → (real)
具有阈值的点的Row坐标。

ColumnThresh (output_control)    point.x-array → (real)
具有阈值的点的Column坐标。

Distance (output_control)    real-array → (real)
连续点之间的距离。

06. 结果

如果参数值正确,则算子measure_thresh返回值2(H_MSG_TRUE)。 否则,会引发异常。

HDevelop例程

程序示例


07. 附录

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

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

  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. HALCON 20.11:学习笔记---一维测量(Measuring)

    HALCON 20.11:学习笔记---一维测量(Measuring) 本章主要提供有关一维测量的信息. 一维测量的概念 通过一维测量可以沿着预定义的线或弧定位从亮到暗或从暗到亮的过渡边缘.这使您可以 ...

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

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

  6. 【机器视觉】 write_measure算子

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

  7. 【机器视觉】 translate_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 translate_measure - 转换一个m ...

  8. 【机器视觉】 set_fuzzy_measure_norm_pair算子

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

  9. 【机器视觉】 set_fuzzy_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 set_fuzzy_measure - 指定一个模 ...

最新文章

  1. python开发要学哪些?
  2. 计算机毕业生求职之路
  3. android 实现定时通知,在Android中创建定时通知(例如,针对事件)
  4. 中高级工程师Java开发!java生成随机数代码包
  5. Oracle Database 11g 数据库普通用户登录时提示 ORA-28002: the password will expire within 5 days
  6. 第八届蓝桥杯第六题最大公共子串
  7. 经典排序算法(十六)--珠排序Bead Sort
  8. withRouter有什么用?干嘛用?为啥要用它啊???一分钟理解!
  9. fortran调用MKL函数库中的gemm的fortran95接口计算矩阵相乘
  10. 中国磷肥市场发展分析与产能需求调研报告2022版
  11. Structs详细用法(一)
  12. maya导入abc动画_完美动力小课堂:abc格式应用--Realflow和Maya互导
  13. javaweb mysql毕业生管理系统_javaweb高校毕业生就业管理系统, springmvc+mysql
  14. Jedis远程连接阿里云 Failed to create socket
  15. 服务器usb驱动安装系统安装失败怎么办,usb驱动安装不成功,详细教您usb驱动安装失败的解决方法...
  16. 把Excel转换成word文档有什么简单的方法
  17. 麻将项目开发--bug mj157
  18. ruby0.49稀里糊涂编译成功了
  19. python二级成绩查询入口官网_python爬虫实战之模拟正方教务系统登录查询成绩
  20. 【计算机网络】频带和频段(图解易懂)

热门文章

  1. 能够提高开发效率的Eclipse实用操作
  2. 检测iOS的APP性能的一些方法
  3. 【Xamarin挖墙脚系列:Xamarin4.0的重大变更】
  4. !!从中位数市盈率看目前市场位置
  5. C/C++变量命名规则,个人习惯总结
  6. SQL 分组统计并返回当前行
  7. arp 不同网段 相同vlan_三层交换机,相同的网段,不同的VLAN ,怎么通信?
  8. celeba数据集_轻松学 Pytorch 使用DCGAN实现数据复制
  9. 7-49 数组乱炖 (10 分)
  10. OpenCV C++ 04 - Change Brightness