深度 OCR 数据(循环读取)

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > 视觉功能 > 深度 OCR >

深度 OCR 数据(循环读取)

信息:

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

参数

类型

数值范围

说明

循环

非循环

图像处理错误/ImageProcessingError

UINT

0 至 65535

错误类别寄存器

R

 

图像处理激活/ImageProcessingActive

BOOL

0 或 1

图像处理执行状态

R

 

图像定时/ImageNettime

DINT

-2,147,483,648 至 2,147,483,647

以 1 μs 为单位的净时间

R

 

结果数/NumResults

USINT

0 至 255

找到的字数

R

 

函数处理时间/FunctionProcessingTime

UINT

0 至 65535

视觉功能的处理时间(微秒

R

 

OCRData(n)

OCTET

读取字符(字符串)

分类结果的元组,例如 ['1', 'Test', '3.12.2023']

R

 

最小置信度(n)/MinConfidenceLevel(n)

UINT

0 至 100

在找到的单词/ROI 中置信度值最小的字符的最小等级(阈值)。

R

 

丢弃字符数(n)/NumberDiscardedCharacters(n)

USINT

0 至 255

ROI 中被丢弃的字符数。

R

 

置信度(n)/ConfidenceLevel(n)

OCTEC(SINT)

OCTET [MaxStringSize] 0 至 100

单词中所有已接受字符的等级(ConfidenceLevel)。

R

 

位置 X(n)/PositionX(n)

DINT

-2622400 至 2622400

图像中(找到的字符串)的 X 位置,增量为 1/100 像素

R

 

位置 Y(n)/PositionY(n)

数字

-2622400 至 2622400

图像中(找到的字符串)的 Y 位置,增量为 1/100 像素

R

 

方向(n)/Orientation(n)

INT

-17999 至 18000

-179.99°到+180°,增量为 1/100 度

R

 

图像处理错误/ImageProcessingError

错误类别寄存器。

数据类型

信息

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 "下输出。

图像处理激活/ImageProcessingActive

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

数据类型

信息

BOOL

0

图像处理未激活

1

图像处理中

图像净时间/ImageNettime

指定图像采集的净时间(多路采集 > 1 时为第一幅图像的净时间),图像处理结果在此时间内有效。

时间戳也会成为图像文件的名称。

数据类型

信息

数据

-2,147,483,648 至 2,147,483,647

NetTime 时间戳,从 1 µs 到 4294 s,增量为 1 µs(绝对 NetTime)。

结果数/NumResults

找到的字符串数量。

数据类型

信息

USINT

0 至 255

找到的字符串(字)数。

功能处理时间/FunctionProcessingTime

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

数据类型

信息

UINT

0 至 65535

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

OCRData(n)

以数组 OCTET 的形式返回找到的结果。为找到的每个字符行创建一个字符串。

由于所有结果(无论内容如何)都以 NULL 结尾,因此必须考虑到结束符 0。

排除字符:λ、Ω、£。

信息:

使用此视觉函数读入的数据将进行 UTF-8 校验。对于无效字符,将输出"......"。因此,在 mapp Vision HMI 应用程序中可以立即看到输入数据中出现的无效字符。

数据类型

信息

OCTET

OCTET [MaxString-Size+1] (最大字符串大小+1

以数组 OCTET 的形式返回查找结果的内容。

最大内存长度为代码的最大长度 + 1(由于存在空结束符)。

信息:

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

最小置信度(n)/MinConfidenceLevel(n)

在找到的单词/ROI 中置信度值最小的字符的最低等级(阈值)。

数据类型

信息

UINT

0 至 100

待搜索字词或 ROI 中置信度值最小的字符的最小等级(阈值)。以百分比为单位。

信息:

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

丢弃字符数(n)/NumberDiscardedCharacters(n)

ROI 中未被接受(丢弃)的字符数。由参数MinConfidenceLevel 决定。

数据类型

信息

USINT

0 至 255

ROI 中丢弃的字符数。

信息:

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

置信度(n)/ConfidenceLevel(n)

单词中所有被接受字符的等级(ConfidenceLevel)。

不输出也不考虑丢弃的字符。

数据类型

信息

OCTEC(SINT)

OCTET [MaxStringSize] 0 至 100

USINT 数组,数字 = MaxStringSize,在整个单词或 ROI 中找到的每个字符的置信度。

该数组的大小由常数 MaxStringSize 决定。

信息

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

位置 X(n)/PositionX(n)

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

数据类型

信息

数据

-2622400 至 2622400

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

2622400 = 超出范围

信息:

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

位置 Y(n)/PositionY(n)

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

数据类型

信息

数据

-2622400 至 2622400

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

2622400 = 超出范围

信息:

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

方向(n)/Orientation(n)

以 1/100 度为增量指定方向。

对于 -17999 至 18000 的数值范围,可使用的角度范围为 -179.99° 至 +180.00°。小于 -17999 和大于 18000 的值被解释为 +180 度。

数据类型

数值

信息

INT

-17999至18000

以 1/100 度为增量的方向。

信息:

根据参数 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

 

ImageNettime

DINT

-2,147,483,648 to 2,147,483,647

NetTime in 1 μs steps

R

 

NumResults

USINT

0 to 255

Number of words found

R

 

FunctionProcessingTime

UINT

0 to 65535

Processing time of the vision function in microseconds

R

 

OCRData(n)

OCTET

Read characters (string)

A tuple of classification results, e.g. ['1', 'Test', '3.12.2023']

R

 

MinConfidenceLevel(n)

UINT

0 to 100

Minimum grade (threshold value) of the character with the smallest confidence value in the word/ROI found.

R

 

NumberDiscardedCharacters(n)

USINT

0 to 255

Number of discarded characters in the ROI.

R

 

ConfidenceLevel(n)

OCTEC(SINT)

OCTET [MaxStringSize] 0 to 100

The grade (ConfidenceLevel) of all accepted characters in a word.

R

 

PositionX(n)

DINT

-2622400 to 2622400

X-position (of the found string) in the image in increments of 1/100 pixel

R

 

PositionY(n)

DINT

-2622400 to 2622400

Y-position (of the found string) in the image in increments of 1/100 pixel

R

 

Orientation(n)

INT

-17999 to 18000

-179.99° to +180° in increments of 1/100 degree

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

ImageNettime

Specifies the NetTime of the image acquisition (with MultiCapture > 1 that of the first image) for which the results of the image processing are valid.

The timestamp also becomes the name of the image file.

Data type

Values

Information

DINT

-2,147,483,648 to 2,147,483,647

NetTime timestamp from 1 µs to 4294 s in increments of 1 µs (absolute NetTime).

NumResults

Number of character strings found.

Data type

Values

Information

USINT

0 to 255

Number of strings (words) found.

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.

OCRData(n)

Returns the found results as array OCTET. A string is created for each character line found.

Since all results, regardless of content, are NULL-terminated, the terminating 0 must be taken into account.

Excluded characters: λ, Ω, £.

Information:

Data that is read in with this vision function is subjected to UTF-8 validation. � is output for invalid characters. It is therefore immediately visible in the mapp Vision HMI application where invalid characters occur in the input data.

Data type

Values

Information

OCTET

OCTET [MaxString-Size+1]

Returns the content of the found result as array OCTET.

The maximum memory length is the maximum size of the code + 1 (due to the null terminator).

Information:

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

MinConfidenceLevel(n)

Minimum grade (threshold value) of the character with the smallest confidence value in the word/ROI found.

Data type

Values

Information

UINT

0 to 100

Minimum grade (threshold value) of the character with the smallest confidence value in the word to be searched for or in the ROI. In percentage steps.

Information:

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

NumberDiscardedCharacters(n)

Number of unaccepted (discarded) characters in the ROI. Determined by the parameter input MinConfidenceLevel.

Data type

Values

Information

USINT

0 to 255

Number of discarded characters in the ROI.

Information:

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

ConfidenceLevel(n)

The grade (ConfidenceLevel) of all accepted characters in a word.

Discarded characters are not output or taken into account.

Data type

Values

Information

OCTEC(SINT)

OCTET [MaxStringSize] 0 to 100

USINT array with number = MaxStringSize, ConfidenceLevel for each character found in the entire word or ROI.

The size of this array is determined by the constant MaxStringSize.

Information:

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

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.

Orientation(n)

The orientation is specified in increments of 1/100 degrees.

For the range of values -17999 to 18000, this results in a usable range of angles from -179.99° to +180.00°. Values less than -17999 and greater than 18000 are interpreted as +180 degrees.

Data type

Values

Information

INT

-17999 to 18000

Orientation in increments of 1/100 degrees.

Information:

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

 

Information:

Orientation is constant for all words in the image.