其他分享
首页 > 其他分享> > 【机器视觉】 translate_measure算子

【机器视觉】 translate_measure算子

作者:互联网

00. 目录

文章目录

01. 概述

translate_measure - 转换一个measure对象。

02. 签名

translate_measure( : : MeasureHandle, Row, Column : )

03. 描述

translate_measure将MeasureHandle代表的measure对象的参考点转换为点(Row,Column)。 如果measure对象和转换的measure对象完全位于图像内,则measure对象以有效的方式移动到新的参考点。 否则,使用gen_measure_rectangle2或gen_measure_arc重新生成measure对象,使用创建measure对象时指定的参数和新参照点。

原文描述

translate_measure translates the reference point of the measure object given by MeasureHandle to the point (Row,Column). If the measure object and the translated measure object lie completely within the image, the measure object is shifted to the new reference point in an efficient manner. Otherwise, the measure object is generated anew with gen_measure_rectangle2 or gen_measure_arc using the parameters that were specified when the measure object was created and the new reference point.

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

执行信息

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

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

MeasureHandle

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

04. 注意

05. 参数

MeasureHandle (input_control, state is modified)   measure_id → (integer)
  Measure对象句柄。

Row (input_control)    point.y → (real / integer)
  新参考点的Row坐标。
  Default value: 50.0
  Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
  Typical range of values: 0.0 ≤ Row ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0

Column (input_control)    point.x → (real / integer)
  新参考点的Column坐标。
  Default value: 100.0
  Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
  Typical range of values: 0.0 ≤ Column ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0

06. 结果

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

HDevelop例程

measure_ic_leads.hdev    测量IC的引线
measure_fill_level.hdev    检查细颈瓶的液位高度
align_measurements.hdev 使用基于形状的匹配以便为测量工具调整ROI来检查单个剃刀刀片。

程序示例


07. 附录

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

标签:object,point,Column,measure,算子,translate,Row
来源: https://blog.csdn.net/dengjin20104042056/article/details/118526153