<< 点击显示目录 >> 主页 mappVision帮助助手 > 机器视觉帮助 > mapp Vision > 编程 > mapp Vision 人机界面应用 > 参数化 > 视觉功能的主要区域 - 概述 > 配置视觉功能 |
除了配置视觉应用程序以及配置和调整图像采集之外,视觉功能的配置对图像评估的功能也有重要影响。
•可以对视觉功能的以下方面进行配置:
•执行 ROI
•视觉功能参数
•模型(用于基于模型的视觉功能)
已配置视觉功能的数据以加密格式存储在视觉应用程序中视觉功能节点的子节点 "数据集 "中。因此,只有通过mapp Vision HMI 应用程序编辑这些数据才有意义。
•有关各视觉功能具体参数的其他信息,请参阅相应的寄存器说明:
•关于读码器,请参阅读码器配置(非循环写入)。
•Blob 参见Blob 配置(非循环读/写)。
•匹配,请参阅匹配配置(非循环写入)
•关于 OCR,请参阅OCR配置(非循环写入)
•测量 "请参阅"测量"配置(非循环写入)
•像素计数器,请参阅像素计数器配置(非循环读/写)。
执行 ROI 定义了图像评估所考虑的图像区域(感兴趣区域)。只在该区域内搜索结果。默认情况下,执行 ROI 与整个图像部分相对应。可以通过定义一个缩小的执行 ROI(只涵盖图像的相关部分)来加速图像评估。有关定义执行 ROI 的更多信息,请参阅执行ROI 小节。
除了只能在 AS 中配置视觉应用程序时设置其值的常量外,视觉功能还具有非循环参数,这些参数只能通过人机界面应用程序在 "参数 "下的 "视觉功能 "选项卡中进行编辑。
图视觉功能读码器的参数C2dPolarity设置为"[0] dark_on_light"。这将检测到浅色背景上的深色符号代码。
必须为基于模型的视觉功能创建模型。模型可作为模板,用于在图像处理过程中搜索结果。首先必须根据所需的使用情况对模型进行训练。这一过程也称为 "teach-in"。训练过程决定了对象搜索的结果标准。如果没有经过训练的模型,基于模型的视觉功能将无法返回结果。在基于模型的视觉功能中,还可以创建具有不同结果标准的多个模型并将其传授给用户。
有关定义和管理模型步骤的更多信息,请参阅 "模型"小节。
可通过视觉功能的 "模型参数 "反复影响模型的教入行为。这可以在人机界面应用程序 "编辑模型 "选项卡的 "模型参数 "区域中完成。
图基于模型的视觉功能的模型参数ModelScaleMin 匹配值设置为 "0.85",这样也可以在较小的物体尺度上进行检测。
除模型参数外,某些基于模型的视觉函数还有一些参数,这些参数不会影响示教行为, 但会直接影响视觉函数对模型的搜索行为。这些参数可以在人机界面应用程序中的 "视觉功能 "选项卡的 "参数 "区域进行修改。
图减少基于模型的视觉函数匹配的ShapeSearchGreediness参数,可在执行视觉函数时将安全搜索启发式与搜索速度之间的关系转向前者。
•图标对象
•模型
In addition to configuring the vision application as well as configuring and aligning the image acquisition, the configuration of the vision functions has a significant influence on the functionality of the image evaluation.
•The following aspects of a vision function can be configured:
•The Execution ROI
•Vision function parameters
•Models (for model-based vision functions)
The data of a configured vision function is stored in encrypted format in the vision application in subnode "Dataset" of the vision function node. It therefore only makes sense to edit these via the mapp Vision HMI application.
•For additional information about the specific parameters of individual vision functions, see the respective register description:
•For Code Reader, see Code Reader configuration (acyclic write).
•For Blob, see Blob configuration (acyclic read/write).
•For Matching, see Matching configuration (acyclic write)
•For OCR, see OCR configuration (acyclic write)
•For Measurement, see Measurement configuration (acyclic write)
•For Pixel Counter, see Pixel Counter configuration (acyclic read/write).
The Execution ROI defines the area of the image that is taken into account for image evaluation (region of interest). Results are only searched for in this area. By default, the Execution ROI corresponds to the entire image section. Image evaluation can be accelerated by defining a reduced Execution ROI that only covers relevant parts of the image. For additional information about defining the Execution ROI, see subsection Execution ROI.
In addition to constants whose values can only be set in Automation Studio when configuring the vision application, vision functions also have acyclic parameters that can only be edited via the HMI application in tab "Vision function" under "Parameters".
Fig.: Parameter C2dPolarity of vision function Code reader is set to "[0] dark_on_light". This will detect the dark symbol code on the light background.
Models must be created for model-based vision functions. A model serves as a template that is used to search for results during image processing. The model must first be trained for the desired use case. This process is also called teach-in. The teach-in process determines the result criteria for the object search. Without a trained model, a model-based vision function will not return results. Multiple models with different result criteria can also be created and taught-in in a model-based vision function.
For additional information about the procedure for defining and managing models, see subsection Models.
The teach-in behavior of a model can be influenced iteratively via the "model parameters" of the vision function. This is done in the HMI application in area "Model parameters" of tab "Edit models".
Fig.: Model parameter ModelScaleMin of model-based vision function Matching is set to "0.85" so that detection is also possible on smaller scales of the object.
In addition to model parameters, certain model-based vision functions have parameters that do not influence the teach-in behavior, but have a direct influence on the search behavior of the vision function with respect to a model. These parameters can be modified in the HMI application in area "Parameters" of tab "Vision functions".
Fig.: Parameter ShapeSearchGreediness of model-based vision function Matching is decreased to shift the relationship between safe search heuristics and search speed when executing the vision function towards the former.