<< 点击显示目录 >> 主页 mappVision帮助助手 > 机器视觉帮助 > mapp Vision > 编程 > mapp Vision 人机界面应用 > 参数化 > 视觉功能的主要区域 - 概述 > 配置视觉功能 > 模型 > 定义模型 |
要在模型列表中添加新模型,需要在人机界面应用程序的模型视图中选择所需的模型 类型并点击下拉菜单 "添加模型"。选定模型类型的新模型将以 ID "0*"添加到模型列表中。ID "0 "表示该模型尚未教入,因为它只是在教入过程中被分配了一个唯一的 ID(不等于零)。
只有在教入过程成功后,模型的创建才算完成,之后才能创建其他模型。如果一个模型无法进行 "教入",也可以通过删除来中止模型的创建。
已经创建的模型也可以在以后进行编辑。
添加模型后,图像区域会出现与视觉功能和模型类型相对应的标准配置工具。图像上方的 "ROI 工具 "选项卡提供了其他可用的绘图工具和操作。这些工具用于定义图形模型的基础,以便在摄像机上搜索合适的模型。
定义模型的工具有多种类型。具体使用哪种工具取决于视觉功能可以使用哪些信息作为模型的基础。只有对模型有意义的 ROI 工具才会被激活。例如,视觉功能 "Blob "使用单个像素作为输入,视觉功能 "Measurement "使用对齐矩形作为 "边缘模型 1",而视觉功能 "Matching "的模型可以使用任何形状的区域,甚至是非连续区域作为基础。
为了将任意形状的表面定义为模型基础,可以使用矩形 ROI 绘图工具等加法和减法几何图形,也可以使用自由绘图工具(加法)或橡皮擦工具(减法)按像素自由绘制或擦除。使用减法工具时,必须遵守ROI 工具的应用顺序。
信息:
在 5.14 及更高版本中,使用十字光标指针配置 Blob 模型是可选项;也可以直接输入所需的模型参数。
因此,"Blob "新增了单像素十字光标工具,可通过 "Marker(标记)"按钮进行操作:
注:现在,根据配置的模型参数找到的所有 Blob 都会与示教响应一起返回。在此之前,只有通过定位单像素工具作为示教基础的 Blob 才会返回并显示在示教响应中。
如果已经以图形方式定义了所需的模型基础,则可以开始教入过程。点击以下按钮即可开始创建模型:
图形模型基础和模型参数将传输到摄像机,摄像机将尝试根据这些数据创建模型。如果创建成功,模型列表条目将以不等于零的 ID 最终确定。此外,创建的模型将以图形方式显示在图像中。
如果生成的教入模型不符合要求或需要,可以调整图形模型基础("模型 ROI")或修改某些模型参数,然后再次教入模型。要编辑 "模型 ROI",必须打开编辑模式。
在示教过程中,可能会出现模型基础或模型参数不合适的情况。在这种情况下,"模型类型 "栏会显示相应的错误信息。为了纠正错误,可以使用修改后的模型基础或调整后的模型参数重新执行示教过程。
信息:
模型投资回报率 "的编辑模式会在教学过程成功后自动退出。要进一步修改 "模型 ROI",必须再次打开编辑模式。
如果模型参数的默认值不应使用,则可在人机界面应用程序中进行调整。值得注意的是,有些参数会影响摄像机在示教过程中的模型搜索行为。这些参数要么是模型的一部分,要么会影响搜索该模型结果时的行为。
所有模型参数都可以在 mapp Vision 人机界面应用程序中编辑。参数应用于所有类型的模型参数,与通过以下按钮进行示教的方式相同:
信息:
匹配的模型参数:原则上,名称以 "模型 "开头的模型参数会影响示教时在摄像机上搜索模型的方式。以 "Search(搜索)"开头的模型参数会影响运行时查找/评估该模型结果的方式。
信息:
必须注意的是,模型参数可能是内部关联的,设置一个参数值也可能会改变其他参数。因此,如果有必要,用户必须调整并再次输入各个模型参数的值。
要编辑现有模型,必须先选择该模型。要选择模型,必须单击模型。要主动取消选择模型,必须再次单击模型。
选定模型后,即可编辑模型参数。
一旦所选模型发生变化,用于应用模型参数更改和示教的按钮将立即激活。
要编辑 "模型 ROI",还必须打开编辑模式。
信息:
退出编辑模式后,任何更改都将应用,包括对模型参数的更改。退出编辑模式与点击应用/示教按钮相同。
取消选择模型可终止模型编辑。取消选择模型后,任何更改都将被丢弃。
点击以下按钮可删除选中的模型:
删除时,用户无需进一步查询或确认,且删除后无法立即恢复模型。如果模型已保存到控制器中,则可以通过加载视觉应用程序将其恢复;否则,必须重新创建。
To add a new model to the model list, the desired model type is selected and clicked in drop-down menu "Add model" in the model view of the HMI application. A new model of the selected model type is then added to the model list with ID "0*". ID "0" means that the model has not yet been taught-in since it is only assigned a unique ID (not equal to zero) during teach-in.
Creation of a model is only complete after a successful teach-in process and additional models can only be created afterwards. If a model cannot be taught-in, creation of the model can alternatively be aborted by deleting it.
Models that have already been created can also be edited later.
When a model is added, a standard configuration tool corresponding to the vision function and model type appears in the image area. Additional usable drawing tools and actions are provided in tab "ROI tools" above the image. These tools are used to define the graphical model basis, which is used to search for a suitable model on the camera.
There are different types of tools for defining models. The specific tools available depends on which information a vision function can use as the basis for a model. Only ROI tools that make sense for the model are active. For example, vision function "Blob" uses a single pixel as an input, vision function "Measurement" uses an aligned rectangle for "edge model 1" and models of vision function Matching can use areas of any shape and even non-contiguous areas as a basis.
In order to define arbitrary shaped surfaces as a model base, there are additive and subtractive geometric shapes like the Rectangle ROI drawing tool as well as the possibility of drawing or erasing freely on a pixel-by-pixel basis with the Freehand drawing tool (additive) or Eraser tool (subtractive). When using subtractive tools, the Order of application for ROI tools must be observed.
Information:
In 5.14 and later, using the cross-hair pointer to configure blob models is optional; the desired model parameters can also be entered directly.
The single-pixel cross-hair pointer tool is therefore new for "Blob" and can be operated via the "Marker" button:
Note: All blobs that are found with the configured model parameters are now returned with the teach-in response. Until now, only the blob that was used as the teach-in basis by positioning the single-pixel tool was returned and displayed in the teach-in response.
If the desired model basis has been graphically defined, the teach-in process can be started. Creation of the model is initiated by clicking on the following button:
The graphic model basis and the model parameters are transferred to the camera, which tries to create a model based on this data. If successful, the model list entry is finalized with an ID not equal to zero. In addition, the model created is graphically displayed in the image.
If the resulting taught-in model does not meet the requirements or needs, the graphical model basis (the "Model ROI") can be adjusted or certain model parameters can be modified and the model can be taught-in again. To edit the "Model ROI", edit mode must be opened.
During the teach-in process, it is possible that the model basis or a model parameter is unsuitable. In this case, a corresponding error message is displayed in column "Model type". In order to correct the error, a new teach-in process with a modified model basis or adjusted model parameters can be helpful.
Information:
Edit mode is automatically exited for the "Model ROI" after a successful teach-in process. To make further changes to the "Model ROI", edit mode must be opened again.
If the default value of a model parameter should not be used, it can be adjusted in the HMI application. It is important to note that there are parameters that affect the model search behavior of the camera during teach-in. These parameters are either part of the model or affect the behavior when searching for results for that model.
All model parameters can be edited in the mapp Vision HMI application. The parameters are applied for all types of model parameters in the same way as teaching-in via the following button:
Information:
Model parameters of Matching: In principle, model parameters whose names begin with "Model" have an influence on how the model is searched for on the camera during teach-in. The model parameters that start with "Search" affect how results are found/evaluated for this model at runtime.
Information:
It is important to note that model parameters may be internally linked and that setting a parameter value may also change other parameters. The values of individual model parameters must therefore be adjusted and taught-in again by the user if necessary.
To edit an existing model, it must first be selected. To select a model, it must be clicked. To actively deselect a model, it must be clicked again.
After the model has been selected, the model parameters can be edited.
The button for applying model parameter changes and teach-in becomes active as soon as a change has been made to the selected model.
To edit the "Model ROI", edit mode must also be opened.
Information:
When exiting edit mode, any changes that have been made are applied, including changes to the model parameters. Exiting edit mode is the same as clicking on the apply/teach-in button.
Model editing can be aborted by deselecting the model. When the model is deselected, any changes are discarded.
Selected models are deleted by clicking on the following button:
Deleting takes place without a further query or confirmation by the user, and the model cannot be restored immediately afterwards. If it has already been saved to the controller, it can be restored from there by loading the vision application; otherwise, it must be recreated.