像素计数器配置(非循环读/写)

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > 视觉功能 > 像素计数器 >

像素计数器配置(非循环读/写)

信息:

本节介绍 MVTec 的 HALCON 22.11 机器视觉软件库中包含的参数。

 

信息:

这些参数可直接在 mapp Vision HMI 应用程序中更改(参见配置视觉功能)。

 

信息:

决定 POWERLINK 帧长度的单个配置参数只能在 AS 软件的配置过程中更改(即循环更改)。因此,这些参数只能在运行时读取,并标识为常量。

参数

类型

取值范围

说明

循环

非循环

常量

NumResultsMax

UCHAR

1 至 255

要搜索的最大结果数

 

R/W1

配置参数

类型

UCHAR

0

'':对于未指定类型的查询

0: "像素计数器模型

 

R

数值

 

-1至255

-1:用于查询所有模型

0: 用于查询模型的默认值/创建新模型

1 至 255:已创建模型的编号。这些值由用户界面处理,也就是说,用户只能看到已经教入的值。

 

R

最小阈值

UCHAR

0 至 255

最小灰度值级别的限制

 

R/W2

阈值最大值

UCHAR

0 至 255

最大灰度值级别的限制

 

R/W2

反相选择

BOOL

0 或 1

反转搜索间隔

 

R

1

配置参数在运行时保持不变,在这种情况下只能 "读取"。

2

配置参数可通过示教程序修改。

常数

最大结果数

运行时不可修改的变量。仅在 AS 软件上下文中需要使用。保留内存块的最大数量。要搜索的 Blob 的最大数量。

类型

像素计数器类型。

数据类型

信息

USINT

0

像素计数器

可根据定义的 "模型 ROI "和灰度值限制(间隔可反转)搜索合适的像素。首次添加新模型时,阈值最小值(ThresholdMin)和阈值最大值(ThresholdMax)会从 "模型 ROI "及其定义的图像区域自动导出。这些值的设置会使 "模型 ROI "中的所有像素都被选中。

数量

该编号由用户界面控制。用户只能看到已教导模型的模型编号。

阈值最小值

搜索像素灰度值范围的下限。

阈值上限

搜索像素灰度值范围的上限。

反向选择

反转搜索区间 [ThresholdMin,ThresholdMax]。这样就可以排除特定的灰度值区间。

例如

InvertSelection = 1 时的 [20, 100] 返回 ROI 中灰度值在 0 到 19 和 101 到 255 之间的所有像素。


Information:

This section describes the included parameters from the HALCON 22.11 machine vision software library from MVTec.

 

Information:

These parameters can be changed directly in the mapp Vision HMI application (see Configuring vision functions).

 

Information:

Individual configuration parameters that determine the length of a POWERLINK frame can only be changed during configuration in Automation Studio (i.e. acyclically). These parameters can therefore only be read at runtime and are identified as constants.

Parameters

Type

Range of values

Description

Cyclic

Acyclic

Constants

NumResultsMax

UCHAR

1 to 255

Maximum number of results to be searched for

 

R/W1

Configuration parameters

Type

UCHAR

0

'': For a query without type specification

0: "Pixel counter model"

 

R

Number

 

-1 to 255

-1: For querying all models

0: For querying default values of models / creating new models

1 to 255: Numbers for created models. These values are handled by the UI, i.e. the user can only see those that have already been taught-in.

 

R

ThresholdMin

UCHAR

0 to 255

Limit for minimum grayscale value level

 

R/W2

ThresholdMax

UCHAR

0 to 255

Limit for maximum grayscale value level

 

R/W2

InvertSelection

BOOL

0 or 1

Inversion of the search interval

 

R

1

The configuration parameter is constant at runtime and in this case only "Read".

2

The configuration parameter can be modified by the teach-in process.

Constants

NumResultsMax

Variable that cannot be modified at runtime. Only necessary in the Automation Studio context. Reserves the maximum number of memory blocks. Maximum number of blobs to be searched for.

Type

Type of pixel counter.

Data type

Values

Information

USINT

0

Pixel counter

Suitable pixels can be searched based on the defined "Model ROI" and grayscale value limits (interval invertible). When adding a new model for the first time, the values for ThresholdMin and ThresholdMax are automatically derived from the "Model ROI" and the image area defined by it. These are set so that all pixels in the "Model ROI" are selected.

Number

This number is controlled by the UI. The user only sees the model number of the already taught-in models.

ThresholdMin

Lower limit of the grayscale value range of the pixel being searched for.

ThresholdMax

Upper limit of the grayscale value range of the pixel being searched for.

InvertSelection

Inverts the search interval [ThresholdMin, ThresholdMax]. This makes it possible to exclude a specific grayscale value interval.

Example:

[20, 100] with InvertSelection = 1 returns all pixels in the ROI that have a grayscale value from 0 to 19 and 101 to 255.