This interface defines simplified settings for barcode reading tasks.

interface SimplifiedBarcodeReaderSettings {
    barcodeFormatIds?: bigint;
    barcodeTextRegExPattern?: string;
    deblurModes?: Int32Array | EnumDeblurMode[];
    expectedBarcodesCount?: number;
    grayscaleEnhancementModes?: Int32Array | EnumGrayscaleEnhancementMode[];
    grayscaleTransformationModes?:
        | Int32Array
        | EnumGrayscaleTransformationMode[];
    localizationModes?: Int32Array
    | EnumLocalizationMode[];
    maxThreadsInOneTask?: number;
    minBarcodeTextLength?: number;
    minResultConfidence?: number;
    scaleDownThreshold?: number;
}

Properties

barcodeFormatIds?: bigint

A combined value of enumeration BarcodeFormat to specify the targeting barcode formats.

barcodeTextRegExPattern?: string

Set the RegEx pattern of the barcode text to filter out the unqualified results.

deblurModes?: Int32Array | EnumDeblurMode[]

Set the deblur modes with an array of enumeration DeblurMode. View the reference page of DeblurModes for more detail about deblur modes.

expectedBarcodesCount?: number

Set the expected barcode count. The default value is 0.

  • Set expectedBarcodesCount to 0 if the barcode count is unknown. The library will try to find at least 1 barcode.
  • Set expectedBarcodesCount to 1 to reach the highest speed for processing single barcode.
  • Set expectedBarcodesCount to “n” if there will be “n” barcodes to process from an image.
  • Set expectedBarcodesCount to the highest expected value if there exists multiple barcodes but the exact count is not confirmed.
grayscaleEnhancementModes?: Int32Array | EnumGrayscaleEnhancementMode[]

Set the grayscale enhancement modes with an array of enumeration GrayscaleEnhancementMode. View the reference page of GrayscaleEnhancementModes for more detail about grayscale enhancement modes.

grayscaleTransformationModes?: Int32Array | EnumGrayscaleTransformationMode[]

Set the grayscale transformation modes with an array of enumeration GrayscaleTransformationMode. View the reference page of GrayscaleTransformationModes for more detail about grayscale transformation modes.

localizationModes?: Int32Array | EnumLocalizationMode[]

Set the location modes with an array of enumeration LocalizationMode. View the reference page of LocalizationModes for more detail about location modes.

maxThreadsInOneTask?: number
minBarcodeTextLength?: number

Set the minimum barcode text length to filter out the unqualified results.

minResultConfidence?: number

Set the minimum result confidence to filter out the low confidence results. The default value is 30.

scaleDownThreshold?: number

Set the threshold for scaling down the input image during barcode localization. If the shorter edge size of the image is larger than this threshold, the original may be scaled down to reduce processing time. The default value is 2300.