像素计数器数据(循环读取)

<< 点击显示目录 >>

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

像素计数器数据(循环读取)

信息:

本节指定的参数是硬件模块 I/O 映射的一部分,可通过 AS 软件访问。

参数

类型

数值范围

说明

循环

非循环

图像处理错误

UINT

0 至 65535

错误类别寄存器

R

 

图像处理激活

BOOL

0 或 1

图像处理执行状态

R

 

结果数

USINT

0 至 255

找到的结果数

R

 

函数处理时间

UINT

0 至 65535

视觉函数的处理时间(微秒

R

 

模型编号(n)

USINT

0 至 255

找到的结果的型号

R

 

像素数(n)

UDINT

0 至 4294967295

模型中配置对应的像素数

R

 

最小灰度(n)

USINT

0 至 255

结果中的最低灰度值

R

 

最大灰度值(n)

USINT

0 至 255

结果中的最高灰度值

R

 

平均灰度值(n)

UINT

0 至 2550

结果灰度值的算术平均值

R

 

灰度偏差(n)

UINT

0 至 2550

结果灰度值的标准偏差

R

 

灰度中值(n)

USINT

0 至 255

结果灰度值的中值

R

 

模型面积(n)

UDINT

0 至 4294967295

模型的大小(面积),以像素为单位

R

 

连接组件数(n)

UINT

0 至 65535

结果中不连续区域的数量

R

 

位置 X(n)

DINT

-2622400 至 2622400

图像中的 X 位置(中心点),增量为 1/100 像素

R

 

位置 Y(n)

数字

-2622400 至 2622400

图像中的 Y 位置(中心点),增量为 1/100 像素

R

 

图像处理错误

错误类别寄存器。

数据类型

信息

UINT

0x0001

vision_os_error:保留,当前未设置

0x0002

VISION_OS_xxx:保留,当前未设置

0x0004

vision_runtime_error:VisionServiceManager 发生异常。

0x0008

VISION_LIBRARY_ERROR:Vision 函数返回的 ErrorID < 10000。

0x0010

VISION_FUNCTION_ERROR:Vision 函数正在返回 ErrorID > 10000。

0x0020

VISION_FILE_ERROR:保存当前图像出错

0x0040

INVALID_VISION_FUNCTION:视觉函数出现异常

0x0080 至 0x8000

当前未使用

信息:

带有错误 ID 的错误信息将在 AS 软件日志记录器 "Vision "下输出。

图像处理激活

状态位指示当前是否正在执行图像处理。

数据类型

信息

BOOL

0

图像处理未激活

1

图像处理中

结果数

找到的结果数。该值相当于计数器变量 n 的最大值。

数据类型

信息

USINT

0 至 255

找到的结果数

信息:

通常情况下,每个型号有一个结果。但是,如果 NumSearchMax 小于模型数,则会按升序对模型名称进行排序,并使用前 X 个模型(X= NumSearchMax 的值)进行评估。

函数处理时间

该参数指定视觉功能的处理时间,因此与处理器忙于图像处理的时间相对应。

数据类型

信息

UINT

0 至 65535

处理时间为 1 ms 至 65.5 s 的值,以 1 ms 为单位。

型号(n)

找到的结果的型号。根据参数NumResults 的计算值,该参数(指数为 01、02 等)会出现 n 次。参数 ModelNumber 在 I/O 映射中引入了一个新的参数块,并带有相应的索引 (n)。

数据类型

信息

USINT

0 至 255

结果的型号

像素数(n)

模型中与配置相对应的像素数。位于 "模型 ROI "范围内且符合灰度值配置范围标准的所有像素都会被计算到每个模型中。

数据类型

信息

UDINT

0 至 4294967295

与模型中的配置相对应的像素数。

数值为 0 时,其他结果的灰度值没有意义。

最小灰度值(n)

结果中的最低灰度值。

数据类型

信息

USINT

0 至 255

结果中的最低灰度值

最大灰度值(n)

结果中的最高灰度值。

数据类型

信息

USINT

0 至 255

结果中的最高灰度值

平均灰度值(n)

结果中所有像素灰度值的算术平均值。

数据类型

信息

UINT

0 至 2550

结果灰度值的算术平均值。

灰度偏差(n)

结果灰度值的标准偏差。

数据类型

信息

UINT

0 至 2550

结果灰度值的标准偏差。

灰度中值(n)

结果中所有像素灰度值的中值。

数据类型

信息

USINT

0 至 255

结果灰度值的中值。

模型面积(n)

以像素为单位的模型大小(区域),即 "模型 ROI "的像素数。如果结果中计算了 ROI 中的所有像素,则该值与 NumPixels 相同。

数据类型

信息

UDINT

0 至 4294967295

模型的大小(面积),单位为像素。

连接组件数(n)

结果中不连续区域的数量。

根据图像内容的不同,结果中的像素可能与 8 个相连的像素邻域不连续,因此可能被视为结果中的独立区域。

数据类型

信息

UINT

0 至 65535

结果中不连续区域的数量。

位置 X(n)

图像中(找到的对象)的 X 位置。左上角 = 0

数据类型

信息

数据

-2622400 至 2622400

以 1/100 像素为增量的 X 位置。因此可以选择 -26224.00 至 26223.99 像素的位置。

2622400 = 超出范围

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。

位置 Y(n)

图像中(被搜索对象)的 Y 位置。左上角 = 0

数据类型

信息

数据

-2622400 至 2622400

以 1/100 像素为增量的 Y 位置。因此可以选择 -26224.00 至 26223.99 像素的位置。

2622400 = 超出范围

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。


Information:

The parameters specified in this section are part of the I/O mapping of the hardware module that can be accessed via Automation Studio.

Parameters

Type

Range of values

Description

Cyclic

Acyclic

ImageProcessingError

UINT

0 to 65535

Register of error classes

R

 

ImageProcessingActive

BOOL

0 or 1

Status of image processing execution

R

 

NumResults

USINT

0 to 255

Number of results found

R

 

FunctionProcessingTime

UINT

0 to 65535

Processing time of the vision function in microseconds

R

 

ModelNumber(n)

USINT

0 to 255

Model number of the result found

R

 

NumPixels(n)

UDINT

0 to 4294967295

Number of pixels that correspond to the configuration in the model

R

 

MinGray(n)

USINT

0 to 255

Lowest grayscale value in the result

R

 

MaxGray(n)

USINT

0 to 255

Highest grayscale value in the result

R

 

MeanGray(n)

UINT

0 to 2550

Arithmetic mean value of the grayscale values of the result

R

 

DeviationGray(n)

UINT

0 to 2550

Standard deviation of the grayscale values of the result

R

 

MedianGray(n)

USINT

0 to 255

Median of the grayscale values of the result

R

 

ModelArea(n)

UDINT

0 to 4294967295

Size (area) of the model in pixels

R

 

NumConnectedComponents(n)

UINT

0 to 65535

Number of non-contiguous areas of the result

R

 

PositionX(n)

DINT

-2622400 to 2622400

X-position (center point) in the image in increments of 1/100 pixel

R

 

PositionY(n)

DINT

-2622400 to 2622400

Y-position (center point) in the image in increments of 1/100 pixel

R

 

ImageProcessingError

Register of error classes.

Data type

Values

Information

UINT

0x0001

VISION_OS_ERROR: Reserved, currently not set

0x0002

VISION_OS_xxx: Reserved, currently not set

0x0004

VISION_RUNTIME_ERROR: An exception has occurred in VisionServiceManager.

0x0008

VISION_LIBRARY_ERROR: The vision function is returning an ErrorID < 10000.

0x0010

VISION_FUNCTION_ERROR: The vision function is returning an ErrorID > 10000.

0x0020

VISION_FILE_ERROR: Error saving the current image

0x0040

INVALID_VISION_FUNCTION: Exception by the vision function

0x0080 to 0x8000

Currently not in use

Information:

Error messages with an error ID are output in the Automation Studio Logger under "Vision".

ImageProcessingActive

The status bit indicates whether image processing is currently being performed or not.

Data type

Values

Information

BOOL

0

Image processing inactive

1

Image processing in progress

NumResults

Number of results found. The value then corresponds to the maximum value of counter variable n.

Data type

Values

Information

USINT

0 to 255

Number of results found

Information:

Normally, there is one result per model. If NumSearchMax is less than the number of models, however, the model names are sorted in ascending order and the first X models (X= value of NumSearchMax) are used for evaluation.

FunctionProcessingTime

This parameter specifies the processing time for the vision function, and thus corresponds to the time in which the processor is busy for image processing.

Data type

Values

Information

UINT

0 to 65535

Value for a processing time of 1 ms to 65.5 s in 1 ms steps.

ModelNumber(n)

Model number of the result found. Depending on the calculated value of parameter NumResults , this parameter (with indices 01, 02, etc.) occurs n times. Parameter ModelNumber introduces a new block of parameters in the I/O mapping with the corresponding index (n).

Data type

Values

Information

USINT

0 to 255

Model number of the result

NumPixels(n)

Number of pixels that correspond to the configuration in the model. All pixels that are located within the "Model ROI" and also meet the criteria of the configured range of grayscale values are counted per model.

Data type

Values

Information

UDINT

0 to 4294967295

Number of pixels that correspond to the configuration in the model.

With a value of 0, the grayscale values of the other results have no significance.

MinGray(n)

Lowest grayscale value in the result.

Data type

Values

Information

USINT

0 to 255

Lowest grayscale value in the result

MaxGray(n)

Highest grayscale value in the result.

Data type

Values

Information

USINT

0 to 255

Highest grayscale value in the result

MeanGray(n)

Arithmetic mean value of the grayscale values of all the pixels in the result.

Data type

Values

Information

UINT

0 to 2550

Arithmetic mean value of the grayscale values of the result.

DeviationGray(n)

Standard deviation of the grayscale values of the result.

Data type

Values

Information

UINT

0 to 2550

Standard deviation of the grayscale values of the result.

MedianGray(n)

Median of the grayscale values of all pixels of the result.

Data type

Values

Information

USINT

0 to 255

Median of the grayscale values of the result.

ModelArea(n)

Size (area) of the model in pixels, i.e. the number of pixels of the "Model ROI". If all pixels in the ROI are counted for the result, the value is the same as for NumPixels.

Data type

Values

Information

UDINT

0 to 4294967295

Size (area) of the model in pixels.

NumConnectedComponents(n)

Number of non-contiguous areas of the result.

Depending on the image content, the pixels of the result may not be contiguous with regard to 8-connected pixel neighbors and may thus be considered as separate areas of a result.

Data type

Values

Information

UINT

0 to 65535

Number of non-contiguous areas of the result.

PositionX(n)

X-position (of the found object) in the image. Top left = 0

Data type

Values

Information

DINT

-2622400 to 2622400

X position in increments of 1/100 pixel. A position from -26224.00 to 26223.99 pixels can therefore be selected.

2622400 = Out of range

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

PositionY(n)

Y-position (of the found object) in the image. Top left = 0

Data type

Values

Information

DINT

-2622400 to 2622400

Y position in increments of 1/100 pixel. A position from -26224.00 to 26223.99 pixels can therefore be selected.

2622400 = Out of range

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.