读码器配置(非循环写入)

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > 视觉功能 > 读码器 >

读码器配置(非循环写入)

信息:

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

 

信息:

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

 

信息:

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

参数

类型

数值范围

说明

循环

非循环

常量

最大字符串大小

UCHAR

1 至 254

代码的最大长度[字符串 +1]

默认值:254

 

R/W1

NumResultsMax

UCHAR

1 至 255

可存储代码的最大数量。

默认值:1

 

R/W1

配置参数

C2dContrastMin

UCHAR

1 至 100

最小对比度

默认值 = 10

 

R/W2

C2d 极性

BOOL

0 或 1

0 = 灯亮时为暗(默认值)

1 = 亮时为暗

 

R/W2

C2dSmall 模块稳健性

BOOL

0 或 1

0 = "低"(默认)

1= "高

 

R/W2

C2dStrictModel

BOOL

0 或 1

0 = "不严格

1 = "严格"(默认)

 

R/W

C2dModuleSizeMin

UCHAR

1 至 100

最小尺寸或宽度

默认值:3

 

R/W2

C2dModuleSizeMax

UCHAR

2 至 100

最大尺寸或宽度

默认值:20

 

R/W2

C2dModuleGapMin

UCHAR

0 至 2

0 = 无(默认值)

1 = 小

2 = 大

 

R/W2

C2dModuleGapMax

UCHAR

0 至 2

0 = 无

1 = 小

2 = 大(默认)

 

R/W2

C2dStrictQuietZone

BOOL

0 或 1

0 = "不严格"(默认)

1 = "严格

该值在参数优化期间不会更改!

 

R/W

EccSymbolSearch

BOOL

0 或 1

0 = 默认

1 = 初级

激活搜索,通常在特别简单的情况下搜索速度更快。

 

R/W

符号形状

UCHAR

0 至 2

0 = "矩形"(默认值)

1 = "正方形

2 = "任意

 

R/W2

EccFinderPatternTolerance 容差

UCHAR

0 至 2

0 = 低(默认值)

1 = 高

2 = 任意

 

R/W2

EccSymbolColsMin

UCHAR

10 至 144

10 = 默认值

 

R/W2

EccSymbolColsMax

UCHAR

10 至 144

144 = 默认值

 

R/W2

符号行最小值

UCHAR

8 至 144

8 = 默认值

 

R/W2

EccSymbolRowsMax

UCHAR

8 至 144

144 = 默认值

 

R/W2

EccSlantMax

UCHAR

0 至 30

单位 °

10° = 默认值

 

R/W2

对比度公差

UCHAR

0 至 2

0 = 低(默认值)

1 = 高

2 = 任意

 

R/W2

EccModuleGrid

UCHAR

0 至 2

0 = 固定(默认)

1 = 可变

2 = 任意

 

R/W2

EccCandidateSelection

BOOL

0 或 1

0 = 默认

1 = 广泛

 

R/W

PdfModuleAspectMin

UCHAR

5 至 200

10 = 默认值

单位 0.1

 

R/W2

PdfModuleAspectMax

UCHAR

5 至 200

40 = 默认值

100 = 增强

单位 0.1

 

R/W2

PdfSymbolColsMin

UCHAR

1 至 30

1 = 默认值

 

R/W2

PdfSymbolColsMax

UCHAR

1 至 30

20 = 默认值

 

R/W2

PdfSymbolRowsMin

UCHAR

3 至 90

5 = 默认值

 

R/W2

PdfSymbolRowsMax

UCHAR

3 至 90

45 = 默认值

 

R/W2

AztecFormat

UCHAR

1 至 7

1 = 紧凑型

2 = 全范围(默认)

4 = 符文

任意组合

例如 3 = 紧凑型和/全范围(默认值)

该值在参数优化期间不会更改!

 

R/W

阿兹台克附加级别

UCHAR

0 至 2

0(默认值)

1

2

 

R/W2

AztecFinderPatternTolerance(阿兹特克查找模式容差

BOOL

0 或 1

0 = 低(默认)

1 = 高

 

R/W2

阿兹台克符号尺寸最小值

UCHAR

11 至 151

默认值:11

 

R/W2

阿兹台克符号最大值

UCHAR

11 至 151

默认值:151

 

R/W2

QrPositionPatternMin

UCHAR

2 或 3

2 = 2 个模式(默认)

3 = 3 个模式

该值在参数优化期间不会更改!

 

R/W

QrVersionMin

UCHAR

1 至 4/14/40

1 = 默认值

 

R/W2

QrVersionMax

UCHAR

1 至 4/14/14

4/14/40 = 默认值

取决于 QR 类型

 

R/W2

C1dElementSizeMin

UCHAR

6 至 255

0.6 至 25.5 像素。以 1/10 像素为单位

例如:条形码默认值:2.0

 

R/W2

C1dElementSizeMax

UCHAR

1 至 255 像素

1 至 255 像素

例如:条形码默认值:8

 

R/W2

C1dElementSize 变量

BOOL

0 或 1

0 = 无失真补偿

1 = 对 GS1 代码进行失真补偿

默认值:0

该值在参数优化期间不会更改!

 

R/W

C1dBarcodeHeightMin

CHAR

-1 至 127

条码的最小高度(像素

默认值:-1

该值在参数优化期间不会更改!

 

R/W

C1dBarcodeWidthMin

CHAR

-1至127

条码的最小宽度(像素

默认值:-1

 

R/W2

C1dNumScanlines

UCHAR

0 至 255

最小扫描线数,默认值:0

该值在参数优化期间不会更改!

 

R/W

C1dMinIdenticalScanlines

UCHAR

0 至 255

最小扫描线数,默认值:2

该值在参数优化期间不会更改!

 

R/W

C1dMajorityVoting

BOOL

0 或 1

0 = 无多数表决

1 = 激活多数表决

默认值:0

该值在参数优化期间不会更改!

 

R/W

C1d 方向

INT16

-17999 至 18000

-179.99°至 +180

以 1/100 度为增量

 

R/W2

C1dOrientationTol

UCHAR

0 至 90

0° 至 90° 公差

 

R/W2

C1dQuietZone

CHAR

-1至5

默认值 0 = 假

-1=容忍

该值在参数优化期间不会更改!

 

R/W

C1dStartStopTolerance 容差

BOOL

0 或 1

0 = 宽容匹配标准

1 = 严格匹配标准

默认值:0

该值在参数优化期间不会更改!

 

R/W

C1dMinCodeLength

UCHAR

0 至 255

最小代码长度

默认值 = 0

2/5 交错/工业 = 3

该值在参数优化期间不会改变!

 

R/W

C1dMergeScanlines

BOOL

0 或 1

0 = 默认值

1 = 尝试合并扫描线

该值在参数优化期间不会更改!

 

R/W

C1dMeasThresh

UCHAR

5 至 20

相对阈值 1

默认值:5

步进 0.01

 

R/W2

C1dMeasThreshAbs

UCHAR

0 至 255

0.0 = 禁用

相对阈值 2

默认值:5.0

步进 0.1

 

R/W2

C1dCheckChar

UCHAR

0 至 2

0 ="无"(默认值)

1 = "存在

2 = "保留

该值在参数优化期间不会更改!

 

R/W

C1dCompositeCode

BOOL

0 或 1

0 ="无"(默认)

1 = "CC-A/B

该值在参数优化期间不会更改!

 

R/W

C1dUpceEncodation

BOOL

0 或 1

0 = "ucc-12"(默认值)

1 = "零抑制"(默认值

该值在参数优化期间不会更改!

 

R/W

C1dContrastMin

UCHAR

0 至 100

最小对比度

默认值 = 0

该值在参数优化期间不会更改!

 

R/W

1

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

2

只有启用参数优化或使用预定义参数集时,该配置参数才会被 "读取"。

信息:

最小值和最大值范围可能因代码类型 (SymbolType) 而异。如果参数的取值范围过大或过小,图像处理功能中的值将被限制在相应的最大值或最小值内,而不会发出进一步警告或错误信息。

通过示教确定的参数将始终处于最小值和最大值范围内。

 

3常数

 

MaxStringSize

运行时不能修改的变量。其值与代码的最大长度相对应。最大内存长度为代码最大长度 + 1(由于存在空结束符)。

 

NumResultsMax

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

信息:

MaxStringSize 和 NumResultsMax 的乘积必须小于 1490,以免超过 POWERLINK 框架的最大长度。

 

C2dContrastMin

该参数不适用于 ECC 200。

对于条形码,该值相当于条形码元素前景和背景之间的最小对比度。

对于二维条形码,该值不能仅根据前景和背景灰度值之间的差异来确定。它更多地与模块边缘的增加以及图像的清晰度相对应。

高值通常会缩短运算器的运行时间,但需要注意的是,搜索算法会拒绝所有超出阈值的候选码。

 

C2dPolarity

该参数仅对二维码有效!

描述图像中符号的极性,因此决定图像中的符号是在浅色背景下显示为深色,还是在深色背景下显示为浅色。

 

C2dSmallModulesRobustness

该参数仅适用于二维码!

针对极小模块的数据码的解码鲁棒性。

如果将该参数设置为 1(高鲁棒性),则能解码模块非常小的数据码的概率会增加。在这种情况下,最小模块大小也应相应调整,即 C2dModuleSizeMin 应设置为假定的最小模块大小。

如果将该参数设置为 1,则内部内存需求会大幅增加。因此,C2dSmallModulesRobustness 通常应设置为 "低"。

 

C2dStrictModel

该参数仅对二维码有效!

控制检测符号大小与模型默认值不符的符号时的行为:1 ="严格"(丢弃相应符号)或 0 ="不严格"(如果符号可以读取,则返回结果)。

 

C2dModuleSizeMin

该参数仅适用于二维码!

最小尺寸,或对于 PDF417,图像中模块的最小宽度(像素)。为获得最佳读取率,模块的尺寸至少应为 3 像素。

 

C2dModuleSizeMax

该参数仅适用于二维码!

最大尺寸,或对于 PDF417,图像中模块的最大宽度(像素)。

 

C2dModuleGapMin

该参数适用于二维码,但不适用于 PDF417!

用于指定代码模块之间在符号列和符号行方向上的最小间隙的参数。有三个级别可供选择,用于指定相邻前景模块之间是否直接毗连,或者它们之间是否可以有间隙。

数据类型

信息

USINT

0

否(默认):

如果前台模块已占满可用空间且彼此直接毗连,则选择此值。

1

小:

如果间隙很小(小于模块面积的 10%),请选择此值。

2

大:

如果间隙较大,请选择此值。

信息:

小 "和 "大 "这两个设置在前景模块毗连但未完全填满可用空间且显得较薄时(例如由于所获图像的光照)也很有用。

 

C2dModuleGapMax

该参数对二维码有效,但对 PDF417 无效!

用于指定代码模块之间在符号列和符号行方向上最大间隙的参数。有三个级别可供选择,用于指定相邻前景模块之间是否直接毗连,或者它们之间是否可以有间隙。

数据类型

信息

USINT

0

否:

如果前台模块已占满可用空间且彼此直接毗连,则选择此值。

1

小:

如果间隙很小(小于模块面积的 10%),请选择此值。

2

大(默认):

如果间隙较大,请选择此值。

信息:

小 "和 "大 "这两个设置在前景模块毗连但未完全填满可用空间且显得较薄时(例如由于所获图像的光照)也很有用。

 

C2dStrictQuietZone

该参数对二维码有效,但对 Aztec 码无效!

控制检测静区缺失或有严重缺陷的符号时的行为:1 ="严格"(丢弃静区缺失或有缺陷的符号)或 0 ="不严格"(如果符号可以读取,则返回结果)。

 

EccSymbolSearch

该参数仅适用于 ECC 200。

该参数可激活一种搜索方式,用于特别简单的情况,通常速度更快。进行优化时,内部忽略该参数。

设置 EccSymbolSearch 时,将禁用以下参数:C2dModuleGapMin、C2dModuleGapMax、EccFinderPatternTolerance、EccContrastTolerance、EccCandidateSelection。

 

EccSymbolShape

该参数仅适用于 ECC 200。

有关符号形状(矩形和/或正方形)的可能限制。

信息:

设置符号形状可能会改变之前的符号大小限制。

EccSymbolShape 使用 EccSymbolColsMin 和 EccSymbolRowsMin 的最小值,以及 EccSymbolColsMax 和 EccSymbolRowsMax 的最大值。此外,下表中的限制也适用:

符号形状

"任意"

矩形

"正方形

符号列最小值

≥10

≥18

≥10

符号列最大值

≤144

≤48

≤144

符号行最小值

≥8

≥8

≥10

最大符号行数

≤144

≤16

≤144

此外,如果 EccSymbolColsMin 大于 EccSymbolRowsMax,则 EccSymbolShape 设为 0(矩形)。

如果 EccFinderPatternTolerance 设置为 "低",两种符号形状将使用相同的搜索算法。不过,如果 EccFinderPatternTolerance 设置为 "高 "或 "任意",则在选择 "矩形 "或 "正方形 "时,EccSymbolShape 的值可显著加快符号搜索速度。

 

EccFinderPatternTolerance

该参数仅适用于 ECC 200。

搜索对有缺陷或部分缺失的查找模式的容忍度。根据该参数的不同,将采用不同的搜索算法。

如果 0 ="低",则假定寻的图样基本存在,几乎没有任何干扰。如果 1 ="高",则寻的图案可能有缺陷或部分缺失,但不影响识别。

但需要注意的是,对于 "高 "变量,应尽可能限制符号搜索的参数,否则会增加计算时间。

还应注意的是,两种算法的鲁棒性略有不同。根据 EccFinderPatternTolerance 的不同,即使对具有完整查找模式的符号也会产生不同的结果。例如,如果选择 "高",则只能找到具有固定网格的符号,从而降低了对透视扭曲的稳健性。因此,这两种算法都可以在 2 ="任意 "的情况下执行。

 

EccSymbolColsMin

该参数仅适用于 ECC 200。

模块中符号列的最小数目。

设置 EccSymbolColsMin 会导致 EccSymbolShape 设置为 2(任意)。如果符号大小只能有一种符号形状,EccSymbolShape 将相应设为 0(矩形)或 1(正方形)。

 

EccSymbolColsMax

该参数仅适用于 ECC 200。

模块中符号列的最大数量。

设置 EccSymbolColsMax 会导致 EccSymbolShape 设为 2(任意)。如果符号大小只能有一种符号形状,EccSymbolShape 将相应设为 0(矩形)或 1(正方形)。

 

EccSymbolRowsMin

该参数仅适用于 ECC 200。

模块中最小符号行数。

设置 EccSymbolRowsMin 会导致 EccSymbolShape 设为 2(任意)。如果符号大小只能有一种符号形状,EccSymbolShape 将相应设为 0(矩形)或 1(正方形)。

 

EccSymbolRowsMax

该参数仅适用于 ECC 200。

模块中的最大符号行数。

设置 EccSymbolRowsMax 会导致 EccSymbolShape 设为 2(任意)。如果符号大小只能有一种符号形状,EccSymbolShape 将相应设为 0(矩形)或 1(正方形)。

 

EccSlantMax

该参数仅适用于 ECC 200。

L 形寻像器图案中的角度与(理想)直角的最大偏差

角度(度)。该规格与打印符号或获取图像时可能发生的透视变形相对应。

 

EccContrastTolerance

该参数仅适用于 ECC 200。

 

EccModuleGrid

该参数仅适用于 ECC 200。

 

EccCandidateSelection

该参数仅适用于 ECC 200。

该参数决定用于在图像中查找符号的候选区域的选择。

数据类型

信息

BOOL

0

默认值:只使用几个候选区域。

1

广泛:如果设置该值,生成的候选区域数量会增加,找到代码的概率和计算时间也会随之增加。

 

PdfModuleAspectMin

该参数仅适用于 PDF417。

图像中模块的最小纵横比(高宽比)

 

PdfModuleAspectMax

该参数仅适用于 PDF417。

图像中模块的最大纵横比(高宽比)

 

PdfSymbolColsMin

该参数仅适用于 PDF 417。

以编码字(每个编码字 17 个模块)表示的最小符号数据列数,即不包括开始/停止模式的编码字和行标指示器的两个编码字。

 

PdfSymbolColsMax

该参数仅适用于 PDF 417。

符号数据列的最大编码字数,即不包括开始/停止模式的两个编码字和行指示符的两个编码字。

 

PdfSymbolRowsMin

此参数仅适用于 PDF 417。

模块中最小符号行数。

 

PdfSymbolRowsMax

此参数仅适用于 PDF 417。

模块中符号行的最大数量。

 

AztecFormat

Th该参数仅适用于阿兹台克代码。

阿兹台克码的格式:第 0 位 = 1(紧凑型)、第 1 位 = 1(全范围型)、第 2 位 = 1(符文型)以及它们的任意组合(例如,第 0 位和第 1 位 = 1(3 = 紧凑型和全范围型))。

 

AztecAdditionalLevels

该参数仅适用于 Aztec 码。

为了提高阿兹台克代码阅读器的鲁棒性,除了根据最小和最大模块大小得出的层级外,还可以指定要检查的金字塔层级数。这将增加搜索的运行时间,尤其是在找不到代码的情况下。

 

AztecFinderPatternTolerance

该参数仅适用于 Aztec 代码。

搜索对有缺陷或部分缺失的查找模式的容忍度。根据该参数的不同,将采用不同的搜索算法。

如果 0 ="低",则假定可以提取出所有的寻道图形环。

如果 1 ="高",则假定至少可以提取一个定位环。

 

AztecSymbolSizeMin

该参数仅适用于 Aztec 代码。

模块中可读取的最小符号大小。

 

AztecSymbolSizeMax

该参数仅适用于 Aztec 代码。

模块中可读取的最大符号大小。

 

QrPositionPatternMin

此参数仅适用于 QR 码。

生成候选符号时必须在图像中清晰可见的位置检测图案数量。

 

QrVersionMin

该参数仅适用于 QR 码和微型 QR 码。

该参数描述了可读取的最小符号版本。

符号版本与符号大小直接对应。根据 SymbolType 中配置的 QR 变体,会产生不同的数值范围和最大数据量。

对于 Micro QR 代码,数值范围在 n = 1 和 n = 4 之间。

代码中的模块数由 9 + n x 2 计算得出。

对于较早的 QR 码 1 型,数值范围可在 1 和 14 之间。

代码中的模块数由 17 + n x 4(21 x 21 至 73 x 73)计算得出。

对于较新的 QR 码 2 型,数值范围可在 1 和 40 之间。

代码中的模块数由 17 + n x 4(21 x 21 至 177 x 177)计算得出。

如果配置的值大于相应符号类型可能的最大值,则会限制在最大值范围内。

 

QrVersionMax

该参数仅适用于 QR 码和微型 QR 码。

该参数用于描述可读取的最大符号版本。

符号版本与符号大小直接对应。根据 SymbolType 中配置的 QR 变体,会产生不同的数值范围和最大数据量。

对于 Micro QR 代码,数值范围在 n = 1 和 n = 4 之间。

代码中的模块数由 9 + n x 2 计算得出。

对于较早的 QR 码 1 型,数值范围可在 1 和 14 之间。

代码中的模块数由 17 + n x 4(21 x 21 至 73 x 73)计算得出。

对于较新的 QR 码 2 型,数值范围可在 1 和 40 之间。

代码中的模块数由 17 + n x 4(21 x 21 至 177 x 177)计算得出。

如果配置的值大于相应符号类型可能的最大值,则会限制在最大值范围内。

 

C1dElementSizeMin

该参数仅对一维条码有效!

基本元素的最小尺寸(根据条形码类型,也称为 "模块 "或 "窄条"),即特定条形码类型中最窄的条和空格的最小厚度。对于低分辨率条形码,该值应减至 1.5,必要时甚至减至 1.2。对于超大条形码,该值可相应增加,从而缩短运行时间。

 

C1dElementSizeMax

该参数仅对一维条码有效!

基本元素(根据条形码类型,也称为 "模块 "或 "窄条")的最大尺寸,即特定条形码类型中最窄的条和空格的最大厚度。它应足够大,以便找到完整符号的候选区域。但也不能太大,以至于两个相邻的条形码合并为一个候选区域。

 

C1dElementSizeVariable

该参数仅适用于一维代码!

用于解码以下类型的参数。

有限 GS1 数据条

扩展的 GS1 数据条

堆叠扩展的 GS1 数据条

对于所有其他类型,该参数不起作用:

在某些条形码采集中,最小元素的宽度在整个条形码区域内都是不同的。这些变化是由条形码打印表面的透视投影或变形(如瓶子上的桶变形)引起的。

默认情况下,条形码阅读器无法补偿此类变形。如果将 C1dElementSizeVariable 设为 "True",则会在解码过程中尽可能在本地补偿此类变形。

 

C1dBarcodeHeightMin

该参数仅对一维条码有效!

条形码的最小高度。默认设置-1 意味着条形码高度将根据其他设置在内部自动选择。对于高度小于 16 像素的扁平条形码,最好手动设置高度,以便条形码可以被定位和读取。最小高度为 8 像素。如果输入的值低于 8,则内部配置为 8 像素。对于非常高的条形码,例如 70 像素或更高,手动设置相应高度可能会导致读取过程加速。

 

C1dBarcodeWidthMin

该参数仅对一维条码有效!

图像中条形码的最小宽度。条形码的宽度取决于多个因素,如相机的分辨率、条形码与相机之间的距离、条形码类型或编码字符数。如果这些属性在应用中几乎保持不变,则应设置该参数,以提高条形码阅读器的速度和稳定性。

默认值-1 表示条形码阅读器根据搜索到的条形码类型和参数 C1dElementSizeMin 估计出一个合适的最小值。

 

C1dNumScanlines

该参数仅适用于一维代码!

可使用的最大扫描行数。如果该参数设置为 0,扫描线数将根据内部规则确定(所有单行条形码为 10,GS1 DataBar Stacked 或 GS1 DataBar Stacked Omnidirectional 为 20,GS1 DataBar Expanded Stacked 为 55)。

该参数可用于在三种情况下提高速度。

1.图像中有大量假候选条码。虽然条码本身通常在扫描一次或两次后即可解码(堆叠条码除外,见下文),但默认值为 10 条扫描线的假候选条码会被扫描,这不必要地延长了运行时间。因此,可以通过减少扫描线的数量来提高速度。一般来说,质量较高的图像所需的扫描线要少于质量较低的图像。对于普通图像,2 到 5 条扫描线就足够了。

2.使用堆叠条形码,如 GS1 DataBar Stacked、GS1 DataBar Stacked Omnidirectional 或 GS1 DataBar Expanded Stacked:与单行条形码(如 Code 128、EAN 13 或 GS1 DataBar Limited)不同,单行条形码在成功解码后扫描结束,而这里对所有扫描线进行分级。由于扫描过程是读码过程中最耗时的阶段之一,因此调整参数 C1dNumScanlines 可以大大提高速度。GS1 DataBar Expanded Stacked(GS1 数据条扩展堆叠)符号通常最多可由 11 行组成,默认值为 55 条扫描线,这样每行可通过 5 条扫描线读取。如果预期只有少量行的符号,则可将参数减少到每行 2 至 5 条扫描线。

C1dMinIdenticalScanlines

该参数仅适用于一维条码!

条形码解码参数。

该参数可用于降低条形码被错误读取或在不代表条形码的地方被发现的可能性。该参数定义了为接受符号解码而必须返回相同结果的最小扫描线数。

如果将 C1dMinIdenticalScanlines 设置为值 1,则在禁用参数 majority_voting 的情况下,只要成功解码一条扫描线,条形码就会被解码。

同样,对于堆叠条形码,每个条形码行有一个成功解码的扫描线就足够了。该参数可设置为 2 或更高,以防止无意中发现条形码。如果图像质量差或图像区域有噪声,导致扫描线找到不正确的条形边缘,这个参数就特别有用。在同时出现不同条形码类型符号的图像中,该参数还可以减少错误找到的条形码数量。

对于大多数条形码类型,该参数的默认值可以是 1。只有 "2/5 工业 "和 "2/5 交错 "条形码类型应使用默认值 2,因为这些条形码类型的条形码很容易在文本和其他干扰图案中被错误识别。

如果使用合并扫描线(见参数 C1dMergeScanlines),该参数表示必须在多少扫描线上才能成功检测到边缘。

如果该参数大于参数 C1dNumScanlines 后使用的扫描线数,则将使用 C1dNumScanlines 的扫描线数代替 C1dMinIdenticalScanlines。

 

C1dMajorityVoting

该参数仅适用于一维条码!

条码解码参数。

该参数用于控制每扫描线选择不同解码结果时的行为。如果该参数设置为 "False"(假),则一旦找到最少数量的相同解码扫描线,就会返回成功的解码结果。

如果该参数设置为 "真",则会对所有扫描线进行多数票表决。返回的最终结果将是被最多扫描线解码的结果。请注意,设置为 "True "会导致运行时间略有增加,因为几乎所有扫描线都必须进行评估,而不是只评估最小相同的扫描线。

为提高对错误解码的稳健性,应将此参数设置为 "True"。此参数仅支持非堆叠条码类型。

 

C1dOrientation

该参数仅对一维条码有效!

预期条形码方向角。

如果条形码在处理过的图像中只出现特定方向的条形码,则可相应减少数值范围,以便更早地识别出不正确的候选条形码,从而缩短操作员的执行时间。如果处理过的图像中包含大量背景纹理和方向不正确的候选条码,那么这种策略就尤为有利。

这里不考虑实际的读取方向,因此只关注数值范围 [-90.0 到 90.0] 内的角度。唯一的例外是 Pharmacode 类型的条形码,这种条形码没有唯一的读取方向,因此通常会返回两个解码结果。在 [-180.0 至 180.0] 的取值范围内,可以选择一个特殊的读取方向,因此也可以选择一个单一的结果。

方向以 1/100 度的增量指定。对于 -179.99° 至 +180.00° 的角度范围,可使用的数值范围为 -17999 至 18000。超出此范围的值将被解释为 +180° 。

 

C1dOrientationTol

该参数仅对一维代码有效!

通过调整参数 C1dOrientation 和 C1dOrientationTol,可以定义 [C1dOrientation - C1dOrientationTol, C1dOrientation + C1dOrientationTol] 的取值范围。图像处理功能只处理条形图平均方向角在上述数值范围内的候选区域。

 

C1dQuietZone

该参数仅对一维条码有效!

控制条码符号静区的验证。如果启用,如果在静区中发现意外条码,扫描线将被丢弃。

如果 "C1dQuietZone = True",静区的宽度必须至少与相应条码标准中规定的宽度相同。这些值(以 X 为单位,其中 X 表示 "模块宽度",即条形码条形序列中最窄条形的宽度)可从下表中提取:

条形码类型

左 QZ

右 QZ

条形码类型

左 QZ

右 QZ

2/5 Industrial

10

10

UPC-A

9

9

2/5 Interleaved

10

10

UPC-A 附加 2

9

5

Codabar

10

10

UPC-A 附加 5

9

5

Code 39

10

10

UPC-E

9

7

Code 93

10

10

UPC-E 附加 2

9

5

Code 128

10

10

UPC-E 附加 5

9

5

MSI

10

10

GS1-128

10

10

Pharmacode

5

5

GS1 DataBar Omnidir

1

1

EAN-8

7

7

截断式 GS1 DataBar

1

1

EAN-8 Add-On 2

7

5

堆叠式 GS1 DataBar

1

1

EAN-8 Add-On 5

7

5

GS1 DataBar Stacked Omnidir

1

1

EAN-13

11

7

有限的 GS1 数据条

1

1

EAN-13 Add-On 2

11

5

扩展的 GS1 数据条

1

1

EAN-13 Add-On 5

11

5

堆叠的 GS1 DataBar Expanded

1

1

如果 C1dQuietZone 设置为整数(≥1),则必须保持至少 "QuietZone × X "的静区。

如果 "C1dQuietZone = -1 = Tolerant",安静区域内允许的边缘数量有限,但每四个模块宽度内的边缘数量不得超过一个。这样做的目的是避免只识别条形码的一部分,但仍能读取简单违反静区的条形码。

如果 "C1dQuietZone = 0 = False",则验证被禁用。

静区验证对于在 "自动 "模式下读取条形码尤为重要。它可以防止在较长和/或较复杂的条形码的条形序列中发现简单的条形码。通常情况下,2 到 4 之间的值可以达到最佳效果,因为不正确的条形码会被抑制,而文本、标签边缘等小的干扰仍然可以容忍。

 

C1dStartStopTolerance

该参数仅对一维代码有效!

开始或停止模式匹配标准的容差。目前仅适用于 Code 128 和 GS1-128。

在搜索扫描线中的起始或终止图案时,需要使用容差("高")或严格("低")匹配标准。容忍标准可提高总体读取率,尤其是在对比度较差的图像中。但是,这种设置可能会导致在噪声图像或带有其他条形码类型符号的图像中出现无效解码。严格标准可提高对错误解码的稳健性,但也会降低总体读取率。值得注意的是,目前只有 Code 128 和 GS1-128 采用了两种不同的标准。

 

C1dMinCodeLength

该参数仅适用于一维代码!

最小解码字符数。如果发现长度更短的条形码,结果将被丢弃。在预先知道最小解码字符数的应用中,该参数有助于避免错误解码。

请注意,对于大多数条形码类型,该参数的默认值为 0。只有条码类型 "2/5 工业 "和 "2/5 交错 "的默认值为 3。这样做的原因是,这些条形码类型很容易在长度为 2 个字符的文本和其他干扰图案中被错误识别。

 

C1dMergeScanlines

该参数仅对一维条码有效!

如果无法成功解码足够的扫描线(参见 C1dMinIdenticalScanlines),例如由于条码被部分隐藏或损坏,则会尝试合并现有的扫描线。然后尝试对合并后的扫描线进行解码。这个额外的解码步骤只针对非堆叠的条形码类型,可以禁用以提高速度。

 

C1dMeasThresh

该参数仅适用于一维代码!

在扫描线内,使用阈值查找边缘。C1dMeasThresh 决定了如何根据扫描线上灰度值的动态范围计算阈值。如果条形码中存在干扰或噪声较大,则 C1dMeasThresh 应设置为较大值。

 

C1dMeasThreshAbs

该参数仅对一维代码有效!

该参数用于防止错误的边缘检测。如果扫描线落入动态范围太小的图像区域(例如灰度值接近 255 的主要白色区域),则边缘检测的阈值会计算得过小。这通常会导致检测到大量错误边缘。如果根据参数 C1dMeasThresh 计算出的阈值小于参数 C1dMeasThreshAbs 的值,则将后者作为阈值。C1dMeasThreshAbs 默认设置为 5.0。如果要处理噪点水平较高的图像,增加参数值可能会有帮助。但如果处理的是对比度较低的无噪点图像,该参数可能会干扰正确边缘的检测。在这种情况下,建议降低参数值,甚至禁用该参数。

 

C1dMeasParamEstimation

该参数仅对一维代码有效!

如果参数设置为 0,扫描线上的灰度值将根据参数 C1dElementSizeMin 的值进行平滑处理。如果参数设置为 1,则会使用另一种方法来估计每个候选区域的元素大小。这个估计值将用于进一步的解码过程。这对于元素非常小(< 1.5 像素)的条形码尤其有利,但会增加运行时间

 

C1dCheckChar

该参数仅对一维条码有效!

使用该参数可解释带有可选校验字符的条形码。例如,这包括 Code 39、Codabar、2/5 Industrial 和 2/5 Interleaved。默认值 0 ="缺失 "表示不存在校验字符。在这种情况下,不执行校验,所有字符都作为数据返回。

如果该参数设置为 1 ="存在",则预期会出现校验字符,并用于检查条形码的正确性。如果校验和不正确,相应的条形码不会作为结果返回。

校验字符本身将从有效载荷数据中删除。如果不希望这样,可设置参数值 2 = "保留",以保留校验字符。

带有强制校验字符的条形码类型的行为始终与将该参数设置为 1 ="存在 "相同。例如,这包括 Code 128、EAN-8、EAN-13 和 UPC-A。

 

C1dCompositeCode

该参数仅对一维条码有效!

二维 GS1 复合码组件可附加到大多数与 GS1 兼容的条形码上。如果 C1dCompositeCode 设置为 "CC-A/B",复合码组件将被本地化和解码。复合码组件紧跟在代码后的分隔符"|"之后。

默认情况下,C1dCompositeCode 设置为 "无",因此条形码旁边的复合码组件将被忽略。如果 C1dCompositeCode 设置为 "CC-A/B",但搜索的条形码类型中没有复合组件,则只返回条形码的结果,且字符串在"|"分隔符后为空结尾。

目前,只有 GS1 DataBar 系列中的条形码才支持 GS1 复合码。

C1dUpceEncodation

该参数仅对一维条码有效!

UPC-E 条形码可以多种输出格式返回。默认情况下,C1dUpceEncodation 设置为 "ucc-12",解码字符串将以 UCC-12 格式返回(由 12 位数字组成)。如果 C1dUpceEncodation 设置为 "Zero-suppressed(零抑制)",结果将以零抑制格式返回(即在指定位置有抑制的零)。这种格式包括一个前导零、六个编码数字和一个隐式编码校验字符。这与 ISO/IEC 15420 要求的格式一致。

 

C1dContrastMin

该参数仅适用于一维条码!

条码元素前景和背景之间的最小对比度。如果将此参数设置为 5 以上,视觉功能将优化候选条码搜索,使对比度范围高于 C1dContrastMin 值。所有对比度低于阈值 C1dContrastMin 的候选条码都会被丢弃。因此,高 C1dContrastMin 值通常会缩短视觉函数的运行时间。值得注意的是,对比度低于阈值 C1dContrastMin 的条形码不会被发现。出于效率考虑,计算出的候选条码对比度只是一个近似值。如果条形码的对比度接近所选的阈值 C1dContrastMin,则应使用较低的阈值。


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

MaxStringSize

UCHAR

1 to 254

Maximum length of a code [string +1]

Default value: 254

 

R/W1

NumResultsMax

UCHAR

1 to 255

Maximum number of codes that can be stored.

Default value: 1

 

R/W1

Configuration parameters

C2dContrastMin

UCHAR

1 to 100

Minimum contrast

Default value = 10

 

R/W2

C2dPolarity

BOOL

0 or 1

0 = dark_on_light (default)

1 = light_on_dark

 

R/W2

C2dSmallModulesRobustness

BOOL

0 or 1

0 = "Low" (default)

1= "High"

 

R/W2

C2dStrictModel

BOOL

0 or 1

0 = "Not strict"

1 = "Strict" (default)

 

R/W

C2dModuleSizeMin

UCHAR

1 to 100

Minimum size or width

Default value: 3

 

R/W2

C2dModuleSizeMax

UCHAR

2 to 100

Maximum size or width

Default value: 20

 

R/W2

C2dModuleGapMin

UCHAR

0 to 2

0 = No (default)

1 = Small

2 = Big

 

R/W2

C2dModuleGapMax

UCHAR

0 to 2

0 = No

1 = Small

2 = Big (default)

 

R/W2

C2dStrictQuietZone

BOOL

0 or 1

0 = "Not strict" (default)

1 = "Strict"

This value is not changed during parameter optimization!

 

R/W

EccSymbolSearch

BOOL

0 or 1

0 = Default

1 = Rudimentary

Makes a search active that is usually faster for particularly simple cases.

 

R/W

EccSymbolShape

UCHAR

0 to 2

0 = "Rectangle" (default)

1 = "Square"

2 = "Any"

 

R/W2

EccFinderPatternTolerance

UCHAR

0 to 2

0 = Low (default)

1 = High

2 = Any

 

R/W2

EccSymbolColsMin

UCHAR

10 to 144

10 = Default value

 

R/W2

EccSymbolColsMax

UCHAR

10 to 144

144 = Default value

 

R/W2

EccSymbolRowsMin

UCHAR

8 to 144

8 = Default value

 

R/W2

EccSymbolRowsMax

UCHAR

8 to 144

144 = Default value

 

R/W2

EccSlantMax

UCHAR

0 to 30

In °

10° = Default value

 

R/W2

EccContrastTolerance

UCHAR

0 to 2

0 = Low (default)

1 = High

2 = Any

 

R/W2

EccModuleGrid

UCHAR

0 to 2

0 = Fixed (default)

1 = Variable

2 = Any

 

R/W2

EccCandidateSelection

BOOL

0 or 1

0 = Default

1 = Extensive

 

R/W

PdfModuleAspectMin

UCHAR

5 to 200

10 = Default

Unit 0.1

 

R/W2

PdfModuleAspectMax

UCHAR

5 to 200

40 = Default

100 = Enhanced

Unit 0.1

 

R/W2

PdfSymbolColsMin

UCHAR

1 to 30

1 = Default value

 

R/W2

PdfSymbolColsMax

UCHAR

1 to 30

20 = Default value

 

R/W2

PdfSymbolRowsMin

UCHAR

3 to 90

5 = Default value

 

R/W2

PdfSymbolRowsMax

UCHAR

3 to 90

45 = Default value

 

R/W2

AztecFormat

UCHAR

1 to 7

1 = Compact

2 = full_range (default)

4 = Rune

And any combination

e.g. 3 = Compact and / Full_range (default)

This value is not changed during parameter optimization!

 

R/W

AztecAdditionalLevels

UCHAR

0 to 2

0 (default)

1

2

 

R/W2

AztecFinderPatternTolerance

BOOL

0 or 1

0 = Low (default)

1 = High

 

R/W2

AztecSymbolSizeMin

UCHAR

11 to 151

Default value: 11

 

R/W2

AztecSymbolSizeMax

UCHAR

11 to 151

Default value: 151

 

R/W2

QrPositionPatternMin

UCHAR

2 or 3

2 = 2 patterns (default)

3 = 3 patterns

This value is not changed during parameter optimization!

 

R/W

QrVersionMin

UCHAR

1 to 4/14/40

1 = Default

 

R/W2

QrVersionMax

UCHAR

1 to 4/14/14

4/14/40 = Default

Depends on the QR type

 

R/W2

C1dElementSizeMin

UCHAR

6 to 255

0.6 to 25.5 pixels. In 1/10 pixel steps

E.g. default value: 2.0 for barcode

 

R/W2

C1dElementSizeMax

UCHAR

1 to 255

1 to 255 pixels

E.g. default value: 8 for barcode

 

R/W2

C1dElementSizeVariable

BOOL

0 or 1

0 = No distortion compensation

1 = Distortion compensation for GS1 codes

Default value: 0

This value is not changed during parameter optimization!

 

R/W

C1dBarcodeHeightMin

CHAR

-1 to 127

Minimum height of the barcode in pixels

Default value: -1

This value is not changed during parameter optimization!

 

R/W

C1dBarcodeWidthMin

CHAR

-1 to 127

Minimum width of the barcode in pixels

Default value: -1

 

R/W2

C1dNumScanlines

UCHAR

0 to 255

Minimum number of scan lines, default value: 0

This value is not changed during parameter optimization!

 

R/W

C1dMinIdenticalScanlines

UCHAR

0 to 255

Minimum number of scan lines, default value: 2

This value is not changed during parameter optimization!

 

R/W

C1dMajorityVoting

BOOL

0 or 1

0 = Majority voting inactive

1 = Majority voting active

Default value: 0

This value is not changed during parameter optimization!

 

R/W

C1dOrientation

INT16

-17999 to 18000

-179.99° to +180°

In increments of 1/100 degree

 

R/W2

C1dOrientationTol

UCHAR

0 to 90

0° to 90° tolerance

 

R/W2

C1dQuietZone

CHAR

-1 to 5

Default value 0 = False

-1= Tolerant

This value is not changed during parameter optimization!

 

R/W

C1dStartStopTolerance

BOOL

0 or 1

0 = Tolerant matching criterion

1 = Strict matching criterion

Default value: 0

This value is not changed during parameter optimization!

 

R/W

C1dMinCodeLength

UCHAR

0 to 255

Minimum code length

Default value = 0

2/5 Interleaved/Industrial = 3

This value is not changed during parameter optimization!

 

R/W

C1dMergeScanlines

BOOL

0 or 1

0 = Default

1 = Attempt to merge scan lines

This value is not changed during parameter optimization!

 

R/W

C1dMeasThresh

UCHAR

5 to 20

Relative threshold value 1

Default value: 5

Step 0.01

 

R/W2

C1dMeasThreshAbs

UCHAR

0 to 255

0.0 = Disabled

Relative threshold value 2

Default value: 5.0

Step 0.1

 

R/W2

C1dCheckChar

UCHAR

0 to 2

0 = "Absent" (default)

1 = "Present"

2 = "Preserved"

This value is not changed during parameter optimization!

 

R/W

C1dCompositeCode

BOOL

0 or 1

0 = "None" (default)

1 = "CC-A/B"

This value is not changed during parameter optimization!

 

R/W

C1dUpceEncodation

BOOL

0 or 1

0 = "ucc-12" (default)

1 = "Zero-suppressed"

This value is not changed during parameter optimization!

 

R/W

C1dContrastMin

UCHAR

0 to 100

Minimum contrast

Default value = 0

This value is not changed during parameter optimization!

 

R/W

1

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

2

This configuration parameter is only "Read" if parameter optimization is enabled or predefined parameter sets are used.

Information:

The minimum and maximum range of values can vary depending on the code type (SymbolType). If the range of values of the parameter is overshot or undershot, the value in the image processing function is limited to the respective maximum or minimum value without further warning or error message.

A parameter identified by teaching will always be within the minimum and maximum range of values.

 

3Constants

 

MaxStringSize

Variable that cannot be modified at runtime. The value corresponds to the maximum size of the code. The maximum memory length is the maximum size of the code + 1 (due to the null terminator).

 

NumResultsMax

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

Information:

The product of MaxStringSize and NumResultsMax must be less than 1490 to not exceed the maximum length of a POWERLINK frame.

 

C2dContrastMin

This parameter does not apply to ECC 200.

For barcodes, the value corresponds to the minimum contrast between the foreground and background of the barcode elements.

With a 2D code, this value cannot be determined solely from the difference between the grayscale values of the foreground and background. It corresponds more to the increase in module edges and thus to the sharpness of the image.

High values usually result in improved runtime of the operator, but it is important to note that the search algorithm rejects all candidates that lie outside the threshold value.

 

C2dPolarity

This parameter is only valid for 2D codes!

Describes the polarity of the symbol in the image and thus determines whether the symbol in the image appears dark against a light background or light against a dark background.

 

C2dSmallModulesRobustness

This parameter is only valid for 2D codes!

Robustness of decoding against data codes with very small module size.

If the parameter is set to 1 (high robustness), the probability increases that data codes with very small modules can be decoded. In this case, the minimum module size should also be adjusted accordingly, i.e. C2dModuleSizeMin should be set to the assumed minimum module size.

If the parameter is set to 1, the internal memory requirements can increase significantly. Consequently, C2dSmallModulesRobustness should normally be set to "Low".

 

C2dStrictModel

This parameter is only valid for 2D codes!

Controls the behavior when detecting symbols that do not match the model defaults in terms of symbol size: 1 = "Strict" (corresponding symbols are discarded) or 0 = "Not strict" (symbols are returned as the result if they can be read).

 

C2dModuleSizeMin

This parameter is only valid for 2D codes!

Minimum size or, for PDF417, the minimum width of the modules in the image in pixels. For an optimal read rate, modules should have a size of at least 3 pixels.

 

C2dModuleSizeMax

This parameter is only valid for 2D codes!

Maximum size or, for PDF417, the maximum width of the modules in the image in pixels.

 

C2dModuleGapMin

This parameter is valid for 2D codes, but not for PDF417!

Parameters for specifying the minimum gap between code modules in the direction of symbol columns and symbol lines. Three levels are available to specify whether neighboring foreground modules are directly contiguous to each other or whether there can be a gap between them.

Data type

Values

Information

USINT

0

No (default):

Select this value if the foreground modules fill up their available space and are directly contiguous to one another.

1

Small:

Select this value if there is a very small gap (< 10% of the module area).

2

Big:

Select this value if there is a larger gap.

Information:

The two settings "Small" and "Big" can also be useful when the foreground modules are contiguous but do not fully fill their available space and appear thinner (e.g. due to the illumination of the acquired image).

 

C2dModuleGapMax

This parameter is valid for 2D codes, but not for PDF417!

Parameters to specify the maximum gap between code modules in the direction of symbol columns and symbol lines. Three levels are available to specify whether neighboring foreground modules are directly contiguous to each other or whether there can be a gap between them.

Data type

Values

Information

USINT

0

No:

Select this value if the foreground modules fill up their available space and are directly contiguous to one another.

1

Small:

Select this value if there is a very small gap (< 10% of the module area).

2

Big (default):

Select this value if there is a larger gap.

Information:

The two settings "Small" and "Big" can also be useful when the foreground modules are contiguous but do not fully fill their available space and appear thinner (e.g. due to the illumination of the acquired image).

 

C2dStrictQuietZone

This parameter is valid for 2D codes, but not for Aztec!

Controls the behavior when detecting symbols whose quiet zone is missing or has severe defects: 1 = "Strict" (symbols with a missing or defective quiet zone are discarded) or 0 = "Not strict" (symbols are returned as the result if they can be read).

 

EccSymbolSearch

This parameter only applies to ECC 200.

The parameter activates a search to be used for particularly simple cases that is generally faster. When optimization is performed, the parameter is ignored internally.

The following parameters are disabled when setting EccSymbolSearch: C2dModuleGapMin, C2dModuleGapMax, EccFinderPatternTolerance, EccContrastTolerance, EccCandidateSelection.

 

EccSymbolShape

This parameter only applies to ECC 200.

Possible limitations regarding the shape of the symbol (rectangle and/or square).

Information:

Setting the symbol shape may change the symbol size limitations made previously.

The minimum values of EccSymbolColsMin and EccSymbolRowsMin and the maximum values of EccSymbolColsMax and EccSymbolRowsMax are used for EccSymbolShape. In addition, the restrictions in the following table apply:

EccSymbolShape

"Any"

"Rectangle"

"Square"

SymbolColsMin

≥10

≥18

≥10

SymbolColsMax

≤144

≤48

≤144

SymbolRowsMin

≥8

≥8

≥10

SymbolRowsMax

≤144

≤16

≤144

In addition, EccSymbolShape is set to 0 (rectangle) if EccSymbolColsMin is greater than EccSymbolRowsMax.

If EccFinderPatternTolerance is set to "Low", the same search algorithm is used for both symbol shapes. If EccFinderPatternTolerance is set to "High" or "Any", however, the value of EccSymbolShape can significantly speed up the symbol search if "Rectangle" or "Square" is selected.

 

EccFinderPatternTolerance

This parameter only applies to ECC 200.

Tolerance of the search with respect to a defective or partially missing finder pattern. Depending on this parameter, different algorithms are used for the search.

If 0 = "Low", it is assumed that the finder pattern is largely present and shows hardly any disturbances. If 1 = "High", the finder pattern may be defective or partially missing without affecting recognition.

It is important to note, however, that the parameters for the symbol search should be limited as much as possible for the "High" variant; otherwise, an increased calculation time should be expected.

It should also be noted that both algorithms differ slightly in their robustness. This can result in different results even for symbols with intact finder patterns depending on EccFinderPatternTolerance. If "High" is selected, for example, only symbols with a fixed grid are able to be found, reducing robustness to perspective distortions. Both algorithms can therefore be executed with 2 = "Any".

 

EccSymbolColsMin

This parameter only applies to ECC 200.

Minimum number of symbol columns in the modules.

Setting EccSymbolColsMin causes EccSymbolShape to be set to 2 (any). If only one symbol shape is possible for the size of the symbol, EccSymbolShape is set to 0 (rectangle) or 1 (square) accordingly.

 

EccSymbolColsMax

This parameter only applies to ECC 200.

Maximum number of symbol columns in the modules.

Setting EccSymbolColsMax causes EccSymbolShape to be set to 2 (any). If only one symbol shape is possible for the size of the symbol, EccSymbolShape is set to 0 (rectangle) or 1 (square) accordingly.

 

EccSymbolRowsMin

This parameter only applies to ECC 200.

Minimum number of symbol lines in the modules.

Setting EccSymbolRowsMin causes EccSymbolShape to be set to 2 (any). If only one symbol shape is possible for the size of the symbol, EccSymbolShape is set to 0 (rectangle) or 1 (square) accordingly.

 

EccSymbolRowsMax

This parameter only applies to ECC 200.

Maximum number of symbol lines in the modules.

Setting EccSymbolRowsMax causes EccSymbolShape to be set to 2 (any). If only one symbol shape is possible for the size of the symbol, EccSymbolShape is set to 0 (rectangle) or 1 (square) accordingly.

 

EccSlantMax

This parameter only applies to ECC 200.

Maximum deviation of the angle in the L-shaped finder pattern from the (ideal) right angle

Angle in degrees. This specification corresponds to perspective distortions that can occur when the symbol is printed or during the image acquisition.

 

EccContrastTolerance

This parameter only applies to ECC 200.

 

EccModuleGrid

This parameter only applies to ECC 200.

 

EccCandidateSelection

This parameter only applies to ECC 200.

Parameter determines the selection of candidate regions that will be used to find symbols in the image.

Data type

Values

Information

BOOL

0

Default: Only a few candidate regions are used.

1

Extensive: If this value is set, the number of generated candidate regions increases and with it, the probability of finding a code as well as the computing time.

 

PdfModuleAspectMin

This parameter only applies to PDF417.

Minimum aspect ratio of the modules in the image (height to width)

 

PdfModuleAspectMax

This parameter only applies to PDF417.

Maximum aspect ratio of the modules in the image (height to width)

 

PdfSymbolColsMin

This parameter only applies to PDF 417.

Minimum number of data columns of the symbol in codewords (17 modules each), i.e. excluding the codewords of the start/stop patterns and the two codewords of the row indicators.

 

PdfSymbolColsMax

This parameter only applies to PDF 417.

Maximum number of data columns of the symbol in codewords, i.e. excluding the two codewords of the start/stop pattern and the two codewords of the row indicators.

 

PdfSymbolRowsMin

This parameter only applies to PDF 417.

Minimum number of symbol lines in the modules.

 

PdfSymbolRowsMax

This parameter only applies to PDF 417.

Maximum number of symbol lines in the modules.

 

AztecFormat

This parameter only applies to Aztec code.

Format of the Aztec code: Bit 0 = 1 (compact), bit 1 = 1 (full_range), bit 2 = 1 (rune) and any combination of these (e.g. bit 0 and bit 1 = 1 (3 = compact and full_range).

 

AztecAdditionalLevels

This parameter only applies to Aztec code.

In order to increase the robustness of the Aztec code reader, the number of pyramid levels to be examined in addition to the levels derived from the minimum and maximum module size can be specified. This increases the runtime of the search, especially if no code is found.

 

AztecFinderPatternTolerance

This parameter only applies to Aztec code.

Tolerance of the search with respect to a defective or partially missing finder pattern. Depending on this parameter, different algorithms are used for the search.

If 0 = "Low", it is assumed that all rings of the finder pattern can be extracted.

For 1 = "High", it is assumed that at least one of the rings of the finder pattern can be extracted.

 

AztecSymbolSizeMin

This parameter only applies to Aztec code.

Smallest symbol size to be read in the modules.

 

AztecSymbolSizeMax

This parameter only applies to Aztec code.

Largest symbol size to be read in the modules.

 

QrPositionPatternMin

This parameter only applies to QR code.

Number of position detection patterns that must be clearly visible in the image for a symbol candidate to be generated.

 

QrVersionMin

This parameter only applies to QR and Micro QR codes.

This parameter describes the smallest symbol version to be read.

The symbol version corresponds directly to the symbol size. Different ranges of values and the maximum amount of data result depending on the configured QR variant in SymbolType.

With the Micro QR code, the range of values can be between n = 1 and n = 4.

The number of modules in the code is calculated from 9 + n x 2.

With the older QR Code Model 1, the range of values can be between 1 and 14.

The number of modules in the code is calculated from 17 + n x 4 (21 x 21 to 73 x 73)

With the newer QR Code Model 2, the range of values can be between 1 and 40.

The number of modules in the code is calculated from 17 + n x 4 (21 x 21 to 177 x 177)

If a value is configured greater than the possible maximum value of the respective SymbolType, it is limited to the maximum value.

 

QrVersionMax

This parameter only applies to QR and Micro QR codes.

This parameter describes the largest symbol version to be read.

The symbol version corresponds directly to the symbol size. Different ranges of values and the maximum amount of data result depending on the configured QR variant in SymbolType.

With the Micro QR code, the range of values can be between n = 1 and n = 4.

The number of modules in the code is calculated from 9 + n x 2.

With the older QR Code Model 1, the range of values can be between 1 and 14.

The number of modules in the code is calculated from 17 + n x 4 (21 x 21 to 73 x 73)

With the newer QR Code Model 2, the range of values can be between 1 and 40.

The number of modules in the code is calculated from 17 + n x 4 (21 x 21 to 177 x 177)

If a value is configured greater than the possible maximum value of the respective SymbolType, it is limited to the maximum value.

 

C1dElementSizeMin

This parameter is only valid for 1D codes!

The minimum size of a base element (also called "module" or "narrow bar" depending on the barcode type), i.e. the minimum thickness of the narrowest bars and spaces of the specific barcode type. For low-resolution barcodes, the value should be reduced to 1.5, or even to 1.2 if necessary. For very large barcodes, the value can be increased accordingly, which results in shorter runtimes.

 

C1dElementSizeMax

This parameter is only valid for 1D codes!

The maximum size of a base element (also called "module" or "narrow bar" depending on the barcode type), i.e. the maximum thickness of the narrowest bars and spaces of the specific barcode type. It should be large enough to find the candidate region for the complete symbol. However, it is not permitted to be so large that two adjacent barcodes merge into a single candidate.

 

C1dElementSizeVariable

This parameter is only valid for 1D codes!

Parameter for decoding the following types.

GS1 DataBar Limited

GS1 DataBar Expanded

GS1 DataBar Expanded Stacked

For all other types, this parameter has no effect:

In some barcode acquisitions, the width of the smallest element varies across the area of the barcode. These changes are caused by perspective projection or deformation of the surface on which the barcode is printed (e.g. barrel distortion on a bottle).

By default, the barcode reader cannot compensate for such distortions. If C1dElementSizeVariable is set to "True", an attempt is made to compensate for such deformations locally during decoding as far as possible.

 

C1dBarcodeHeightMin

This parameter is only valid for 1D codes!

The minimum height of the barcode. The default setting of -1 means that the height of the barcode is automatically selected internally according to the other setting. For very flat barcodes with a height of less than 16 pixels, it makes sense to set the height manually so that the barcode can be located and read. The minimum height is 8 pixels. If values below 8 are entered, the configuration is internally configured to 8 pixels. With very high barcodes, e.g. with 70 pixels or more, manually setting to the corresponding height can result in acceleration during reading.

 

C1dBarcodeWidthMin

This parameter is only valid for 1D codes!

The minimum width of the barcode in the image. The width of a barcode depends on several factors, such as the camera's resolution, distance between barcode and camera, barcode type or number of encoded characters. If these properties remain virtually unchanged in an application, this parameter should be set in order to increase the speed and robustness of the barcode reader.

The default value of -1 means that the barcode reader estimates a suitable minimum value based on the barcode types searched for and parameter C1dElementSizeMin.

 

C1dNumScanlines

This parameter is only valid for 1D codes!

The maximum number of scan lines that can be used. If this parameter is set to 0, the number of scan lines is determined according to an internal rule (10 for all single-line barcodes, 20 for GS1 DataBar Stacked or GS1 DataBar Stacked Omnidirectional and 55 for GS1 DataBar Expanded Stacked).

This parameter can be used to increase the speed in three cases.

1. There are a lot of fake candidates in the image. While the barcode itself can normally be decoded after one or two scans (except stacked barcodes, see below), a fake candidate with the default value of 10 scan lines is scanned, which unnecessarily lengthens runtime. Consequently, the speed can be increased by a reduced number of scan lines. In general, higher quality images require fewer scan lines than lower quality images. For an average image, a value between 2 and 5 should be sufficient.

2. Use of stacked barcodes such as GS1 DataBar Stacked, GS1 DataBar Stacked Omnidirectional or GS1 DataBar Expanded Stacked: Unlike single-line barcodes (e.g. Code 128, EAN 13 or GS1 DataBar Limited), where scanning ends after successful decoding of the code, all scan lines are graded here. Since the scanning process is one of the most time-consuming phases of reading the code, adjusting parameter C1dNumScanlines can result in great speed advantages. With a GS1 DataBar Expanded Stacked symbol, which can normally consist of up to 11 lines, 55 scan lines are used as the default value so that each line is read robustly by 5 scan lines each. If only symbols with a small number of lines are expected, the parameter can be reduced to 2 to 5 scan lines per expected line.

C1dMinIdenticalScanlines

This parameter is only valid for 1D codes!

Parameter for barcode decoding.

This parameter can be used to reduce the likelihood of barcodes being read incorrectly or being found in places that do not represent barcodes. This parameter defines the minimum number of scan lines that must return identical results in order to accept the decoding of a symbol.

If C1dMinIdenticalScanlines is set to value 1, the barcode is decoded as soon as a scan line has been successfully decoded if parameter majority_voting is disabled.

Similarly, one successfully decoded scan line per barcode line is sufficient for stacked barcodes. This parameter can be set to 2 or higher to prevent barcodes from being found unintentionally. This can be particularly helpful if poor image quality or noisy image regions result in a scan line finding incorrect bar edges. This parameter can also reduce the number of incorrectly found barcodes in images in which symbols of different barcode types appear simultaneously.

The default value for this parameter can be 1 for most barcode types. Only for barcode types "2/5 Industrial" and "2/5 Interleaved" should default value 2 be used since with these barcode types, codes are easily misidentified in text and other interfering patterns.

If merged scan lines (see parameter C1dMergeScanlines) are used, the parameter expresses in how many scan lines an edge must be successfully detected.

If this parameter is greater than the number of lines used after parameter C1dNumScanlines, the number of lines according to C1dNumScanlines is used instead of C1dMinIdenticalScanlines.

 

C1dMajorityVoting

This parameter is only valid for 1D codes!

Parameter for barcode decoding.

This parameter controls the behavior when selecting different decoding results per scan line. If the parameter is set to "False", a successful decoding result is returned as soon as a minimum number of identically decoded scan lines has been found.

If this parameter is set to "True", a majority vote is carried out including all scan lines. The returned end result will then be the one that was decoded by the most scan lines. Note that setting "True" results in slightly increased runtimes since almost all scan lines must be evaluated instead of only the minimally identical scan lines.

To increase robustness against incorrect decoding, this parameter should be set to "True". This parameter is only supported for barcode types that are not stacked.

 

C1dOrientation

This parameter is only valid for 1D codes!

Expected barcode orientation angle.

If the barcodes only appear in the processed images with a certain orientation, the range of values can be reduced accordingly so that incorrect candidates are recognized earlier and thus the execution time of the operator is shortened. This strategy is particularly advantageous if the processed images contain a lot of background texture with incorrectly oriented candidates.

The actual reading direction is not taken into account here, and therefore only angles in the range of values [-90.0 to 90.0] are of interest. The only exception are barcodes of type Pharmacode, which do not have a unique reading direction and therefore usually return two decoded results. With a range of values of [-180.0 to 180.0], a special reading direction and thus also a single result can be selected.

The orientation is specified in increments of 1/100 degrees. For the angle range of -179.99° to +180.00°, this results in a usable range of values of -17999 to 18000. Values outside this range of values are interpreted as +180°.

 

C1dOrientationTol

This parameter is only valid for 1D codes!

A range of values [C1dOrientation - C1dOrientationTol, C1dOrientation + C1dOrientationTol] can be defined by adjusting parameters C1dOrientation and C1dOrientationTol. The image processing function only processes candidate regions whose bars have an average orientation angle that lies within the above range of values.

 

C1dQuietZone

This parameter is only valid for 1D codes!

Controls the verification of the quiet zones of a barcode symbol. If this is enabled, scan lines are discarded if unexpected bars are found in the quiet zones.

If "C1dQuietZone = True", the quiet zone must be at least as wide as specified in the corresponding barcode standard. These values (in X units, where X denotes a "module width", i.e. the width of the narrowest bar from the bar sequence of the barcode) can be taken from the following table:

Barcode type

Left QZ

Right QZ

Barcode type

Left QZ

Right QZ

2/5 Industrial

10

10

UPC-A

9

9

2/5 Interleaved

10

10

UPC-A Add-On 2

9

5

Codabar

10

10

UPC-A Add-On 5

9

5

Code 39

10

10

UPC-E

9

7

Code 93

10

10

UPC-E Add-On 2

9

5

Code 128

10

10

UPC-E Add-On 5

9

5

MSI

10

10

GS1-128

10

10

Pharmacode

5

5

GS1 DataBar Omnidir

1

1

EAN-8

7

7

GS1 DataBar Truncated

1

1

EAN-8 Add-On 2

7

5

GS1 DataBar Stacked

1

1

EAN-8 Add-On 5

7

5

GS1 DataBar Stacked Omnidir

1

1

EAN-13

11

7

GS1 DataBar Limited

1

1

EAN-13 Add-On 2

11

5

GS1 DataBar Expanded

1

1

EAN-13 Add-On 5

11

5

GS1 DataBar Expanded Stacked

1

1

If C1dQuietZone is set to an integer (≥1), then a quiet zone of at least "QuietZone × X" must be maintained.

If "C1dQuietZone = -1 = Tolerant", a limited number of edges are allowed in the quiet zone, but not more than one per four module widths. The goal is to avoid recognizing only a part of a barcode but still be able to read codes with a simple violation of the quiet zone.

If "C1dQuietZone = 0 = False", verification is disabled.

Verification of the quiet zone is particularly important for reading barcodes in mode "Auto". It prevents simple barcodes from being found within a bar sequence of a longer and/or more complex barcode. Usually values between 2 and 4 provide optimal results since incorrect barcodes are suppressed while small disturbances such as text, label edges, etc. are still tolerated.

 

C1dStartStopTolerance

This parameter is only valid for 1D codes!

Tolerance of the matching criterion for the start or stop pattern. Currently only implemented for Code 128 and GS1-128.

Requires a tolerant ("High") or strict ("low") matching criterion when searching for start or stop patterns in a scan line. A tolerant criterion increases the general read rate, especially in images with poor contrast. However, this setting can result in invalid decoding in noisy images or images with symbols of other barcode types. A strict criterion increases robustness against incorrect decoding but can also reduce the general read rate. It is important to note that two different criteria are currently only implemented for Code 128 and GS1-128.

 

C1dMinCodeLength

This parameter is only valid for 1D codes!

Minimum number of decoded characters. If a barcode with a shorter length is found, the result is discarded. This parameter is useful to avoid incorrect decoding in applications where the minimum number of characters to decode is known in advance.

Note that the default value for this parameter is 0 for most barcode types. Only for barcode types "2/5 Industrial" and "2/5 Interleaved" is the default value 3. The reason for this is that these barcode types are easily misidentified in text and other interfering patterns with a length of 2 characters.

 

C1dMergeScanlines

This parameter is only valid for 1D codes!

If not enough scan lines (see C1dMinIdenticalScanlines) can be successfully decoded, for example because the barcode is partially hidden or damaged, an attempt is made to merge the existing scan lines. Then an attempt is made to decode the merged scan lines. This additional decoding step is only performed for barcode types that are not stacked and can be disabled for improved speed.

 

C1dMeasThresh

This parameter is only valid for 1D codes!

Within a scan line, edges are found using a threshold value. C1dMeasThresh determines how this threshold value is calculated relative to the dynamic range of the grayscale values along the scan line. If there is interference in the barcode or if the noise is high, C1dMeasThresh should be set to larger values.

 

C1dMeasThreshAbs

This parameter is only valid for 1D codes!

This parameter is used to prevent incorrect edge detection. If a scan line falls into an image region with too small a dynamic range (e.g. a predominantly white region with gray values close to 255), the threshold value for edge detection is calculated inappropriately small. This often results in the detection of large quantities of false edges. If the threshold value based on parameter C1dMeasThresh becomes less than the value of parameter C1dMeasThreshAbs, the latter value is taken as the threshold value. C1dMeasThreshAbs is set to 5.0 by default. If images with higher noise levels are handled, increasing the parameter value may be useful. If noiseless images with low contrast are handled, however, this parameter could interfere with the detection of correct edges. In such cases, it is recommended to reduce the parameter value or even disable the parameter.

 

C1dMeasParamEstimation

This parameter is only valid for 1D codes!

If the parameter is set to value 0, the grayscale values along a scan line are smoothed based on the value of parameter C1dElementSizeMin. If the parameter is set to value 1, an alternative approach is used that estimates the size of the elements for each of the candidate regions. This estimated value is then used in the further decoding process. This is particularly advantageous for barcodes with very small elements (< 1.5 pixels) but results in increased runtime.

 

C1dCheckChar

This parameter is only valid for 1D codes!

Barcodes with an optional check character are interpreted using this parameter. This includes Code 39, Codabar, 2/5 Industrial and 2/5 Interleaved, for example. The default value 0 = "Absent" specifies that no check character is present. In this case, no check is performed and all characters are returned as data.

If this parameter is set to 1 = "Present", a check character is expected and used to check the correctness of the barcode. If the checksum is incorrect, the corresponding barcode is not returned as the result.

The check character itself is removed from the payload data. If this is not desired, parameter value 2 = "Preserved" can be set to retain the check character despite the check.

Barcode types with a mandatory check character always behave as if this parameter were set to 1 = "Present". This includes Code 128, EAN-8, EAN-13 and UPC-A, for example.

 

C1dCompositeCode

This parameter is only valid for 1D codes!

A 2D GS1 composite code component can be attached to most GS1-compatible barcodes. If C1dCompositeCode is set to "CC-A/B", the composite component is localized and decoded. The composite code component follows delimiter "|" immediately after the code.

By default, C1dCompositeCode is set to "None", and the composite component next to the barcode is therefore ignored. If C1dCompositeCode is set to "CC-A/B" but the barcode of the type searched has no composite component, only the result of the barcode is returned and the string is null-terminated after the "|" delimiter.

Currently, GS1 composite codes are only supported with a barcode in the GS1 DataBar family.

C1dUpceEncodation

This parameter is only valid for 1D codes!

UPC-E barcodes can be returned in various output formats. By default, C1dUpceEncodation is set to "ucc-12", and the decoded string is returned in UCC-12 format (consisting of 12 digits). If C1dUpceEncodation is set to "Zero-suppressed", the result is returned in zero-suppressed format (i.e. with suppressed zeros at defined positions). This format consists of a leading zero, six encoded digits and an implicitly encoded check character. This corresponds to the format required by ISO/IEC 15420.

 

C1dContrastMin

This parameter is only valid for 1D codes!

Minimal contrast between the foreground and background of the barcode elements. If this parameter is set to values above 5, the vision function optimizes the candidate search to the contrast range above the C1dContrastMin value. All candidates with a contrast below threshold C1dContrastMin are then discarded. High C1dContrastMin values therefore usually result in improved runtime of the vision function. It is important to note that barcodes with a lower contrast than threshold value C1dContrastMin are not found. For efficiency reasons, the calculated contrast of a code candidate is only an approximation. A lower threshold value should be used if a barcode is discarded and has a contrast close to the selected threshold value C1dContrastMin.