测量 - 示教和后续测量

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 用例 >

测量 - 示教和后续测量

本节介绍为标准应用配置视觉功能测量的基本方法。

要求

定义 NumSearchMax。

Teach-in

视觉功能 "测量 "提供不同的测量操作,可同时或单独测量圆/分割圆、圆心和圆边。类型可用于决定不同的模式。

根据应用需要,可以示教任意数量的模型。

设置 "模型 ROI "的位置和大小。

选择模型类型: "边缘 "或 "圆形模型"。

信息:

测量没有执行 ROI,因为执行 ROI 是由绘制的 "模型 ROI "定义的。因此,在教学过程中,必须考虑到所选区域的大小和位置,以便日后确定要测量的边和圆的位置。

边缘模型

选择检测模式(DetectionMode)。

DetectionMode = 0:可变模式(搜索模型的位置更灵活)

DetectionMode = 1:有限模式(搜索模型的位置有限,但更精确)

设置正确的搜索角度。

配置模型参数 "边缘对比度"、"过渡"、"选择"、"西格玛 "和 "完整性"。

检测模式 = 1 时,可以设置参数 "模型": 对于因对比度梯度而不形成连续边缘的边缘,使用 "完整性"。(在 DetectionMode = 0 时,灰度值之间的微小差异也可能导致找不到边缘)。

信息:

在选择合适的搜索角时,必须考虑 DetectionMode(检测模式)。DetectionMode = 0 时,检测边缘的误差为 +/-45°;DetectionMode = 1 时,误差仅为几度。检测边缘所需的最小长度为 5 像素。

重要的是,要检测的边缘必须完全位于 "模型 ROI "内。

圆形模型

圆模型只能使用 DetectionMode = 1。

设置模型参数: 过渡"、"选择"、"完整性"。

需要注意的是,模型参数 "过渡 "和 "选择 "与从内到外的圆检测有关。

信息:

也可以通过圆模型 ModelType 只教入圆的一部分。结果是一个以 "模型 ROI "中的部分圆为中心点的完整圆。

执行

边缘模型: 搜索和教入都使用相同的程序。除此数据外,还可以为搜索配置边缘方向公差和长度公差。

配置模型参数 "OrientationTolerance(方向公差)"和 "EdgeLengthTolerance(边长公差)"。

圆模型: 搜索和示教过程相同。示教过程中的边缘角度范围是相关的;示教过程中也指定了圆的位置。位置的变化微乎其微;半径的变化是可能的(半径来自示教,公差可调)。

配置模型参数 "OrientationTolerance(方向公差)"和 "EdgeLengthTolerance(边长公差)"。

搜索优化

配置适合应用的模型参数。

优化 "模型投资回报率"(在教学过程中已考虑到这一点)

加速搜索

优化 "模型 ROI"(在教学过程中已经考虑到)

在选择 ModelReference 和 ModelTarget 时,必须考虑到根据所使用的检测模式可以缩短处理时间。使用相同检测模式的模型测量任务比使用不同检测模式的任务处理时间要短。

举例说明:

测量 ModelReference(EdgeModel;DetectionMode = 0)到 ModelTarget(CircleModel;DetectionMode = 1)所需的处理时间可能比用 DetectionMode = 1 测量 EdgeModel 所需的处理时间长。

本节主题

圆心点与圆轮廓同步

圆模型教学过程中完整性的影响

测量 - 操作


This section describes the basic approach to configuring vision function Measurement for standard applications.

Requirements

Define NumSearchMax.

Teach-in

Vision function Measurement offers different measuring operations to measure circles / divided circles, circle centers and edges together or individually. Type can be used to decide between the different modes.

It is possible to teach-in any number of models depending on what is required for the application.

Set the position and size of the "Model ROI".

Select ModelType: "Edge" or "Circle model".

Information:

Measurement does not have an Execution ROI since this is defined by the drawn "Model ROIs". It is therefore already important during the teach-in process to take into account the selected area in terms of size and position where the edges and circles to be measured can be located later on.

Edge model

Select DetectionMode.

DetectionMode = 0: Variable mode (more flexible in the position of the model to be searched for)

DetectionMode = 1: Limited mode (limited in the position of the model to be searched for, but more accurate)

Set the correct SearchAngle.

Configure model parameters "EdgeContrast", "Transition", "Select", "Sigma" and "Completeness".

With DetectionMode = 1, it is possible to set parameter "Model": Use "Completeness" for edges that do not form a continuous edge due to the contrast gradient. (A small difference between the grayscale values can result in an edge not being found with DetectionMode = 0.)

Information:

It is important to take DetectionMode into account when choosing the appropriate SearchAngle. DetectionMode = 0 allows a tolerance of +/-45° to the detected edge; with DetectionMode = 1, this tolerance is only a few degrees. The minimum length of an edge needed for detection is 5 pixels.

It is important that the edge to be detected is completely within the "Model ROI".

Circle model

Only DetectionMode = 1 is possible for a circle model.

Set the model parameters: Transition, Select, Completeness.

It is important to note that model parameters "Transition" and "Select" pertain to circle detection from inside to outside.

Information:

It is also possible to teach-in only a part of a circle via circle model ModelType. The result is a complete circle with a center point based on the partial circle in the "Model ROI".

Execute

Edge model: The same procedure is used for both the search and the teach-in. The tolerance of the orientation of the edge and the tolerance of the length can be configured for the search in addition to this data.

Configure model parameters "OrientationTolerance" and "EdgeLengthTolerance".

Circle model: The same procedure is used for both the search and the teach-in. The angle range of the edge from the teach-in process is relevant; the position of the circle is also specified from the teach-in process. Variation of the position is only marginally possible; variation of the radius is possible (radius from teach-in, tolerance adjustable).

Configure model parameters "OrientationTolerance" and "EdgeLengthTolerance".

Search optimization

Configure the model parameters suitable for the application.

Optimize the "Model ROI" (already to be taken into account during the teach-in process)

Accelerating the search

Optimize the "Model ROI" (already to be taken into account during the teach-in process)

When choosing ModelReference and ModelTarget, it must be taken into account that the processing time can be reduced depending on the DetectionMode used. Measurement tasks of models with the same DetectionMode result in a shorter processing time than tasks with a different one.

Example:

Measurement of ModelReference (EdgeModel; DetectionMode = 0) to ModelTarget (CircleModel; DetectionMode = 1) can result in a longer processing time than if EdgeModel is also taught-in with DetectionMode = 1.

Topics in this section:

Synchronizing the center point of the circle and circle contour

Influence of Completeness during teach-in of a circular model

Measurement - Operation