TcVnParamsWalshBarcodeDetection

Parameters for bar code detection based on the Walsh transform.

Syntax

Definition:

TYPE TcVnParamsWalshBarcodeDetection :
STRUCT
    nMaxBarDistance             : UDINT;
    fMinAspectRatio             : REAL;
    fMaxAspectRatio             : REAL;
    nIntensityDifference        : UDINT;
    nMinArea                    : DINT;
    nChannelIndex               : DINT;
    nWalshFilterNum             : UDINT;
    fOutlierReductionFactor     : REAL;
    fBarConnectionFactor        : REAL;
    fRegionFilterFactor         : REAL;
    fPostProcessingResizeFactor : REAL;
    eInterpolationType          : ETcVnInterpolationType;
END_STRUCT
END_TYPE

Parameters

Name

Type

Default

Description

nMaxBarDistance

UDINT

8

Maximum distance between two consecutive dark or bright bars in pixels

fMinAspectRatio

REAL

1.0

Minimum aspect ratio (width / height) of valid code regions

fMaxAspectRatio

REAL

5.0

Maximum aspect ratio (width / height) of valid code regions

nIntensityDifference

UDINT

100

Approximate mean difference of dark and bright code pixels

nMinArea

DINT

-1

Expected minimum code area in pixels (-1: use an automatic guess based on nMaxBarDistance)

nChannelIndex

DINT

-1

Choose the index of a specific color channel (e.g., 0 = red, 1 = green, 2 = blue) or automatic graylevel conversion (-1). Using automatic graylevel conversion, 3-channel images and 4-channel images are considered as RGB and RGBA images, respectively, and converted to graylevel images before processing. For images with another number of channels the first one (index 0) is selected.

nWalshFilterNum

UDINT

5

Number of Walsh filters to be used (higher values may result in improved results but require more time to compute)

fOutlierReductionFactor

REAL

1.0

Factor to control outlier reduction (Higher values reduce the number of outlier pixels but may disturb the barcodes to be localized.)

fBarConnectionFactor

REAL

1.0

Factor to control bar linking (Higher values reduce the number of outlier pixels but may disturb the barcodes to be localized.)

fRegionFilterFactor

REAL

1.0

Factor to control the rejection of small regions and region parts (Higher values reduce the number of found code regions, adjust their shape and increase the computation time.)

fPostProcessingResizeFactor

REAL

0.5

Factor to control resizing before post-processiong (Smaller values reduce the required computation time but may deteriorate the results.)

eInterpolationType

ETcVnInterpolationType

TCVN_IT_BILINEAR

Image rotation interpolation type (TCVN_IT_BILINEAR recommended for most cases)