Dev Center
Swift
Objective-C
Table of contents

SimplifiedBarcodeReaderSettings

The SimplifiedBarcodeReaderSettings struct contains settings for barcode decoding. It is a sub-parameter of SimplifiedCaptureVisionSettings

Definition

Assembly: DynamsoftBarcodeReader.aar

Namespace: com.dynamsoft.dbr

class SimplifiedBarcodeReaderSettings

Attributes

Attributes Type Description
barcodeFormatIds long Input a combined value of EnumBarcodeFormat to specify the targeting barcode formats.
expectedBarcodesCount int Set the expected barcode count. You can set it to 0 if the barcode count is unknown.
localizationModes EnumLocalizationMode[] Set the localization modes with an array of EnumLocalizationMode.
deblurModes EnumDeblurMode[] Set the deblur modes with an array of EnumDeblurMode.
minResultConfidence int Set the minimum barcode result confidence to filter out the low confidence results.
minBarcodeTextLength int Set the minimum barcode result text length.
barcodeTextRegExPattern String Set a RegEx pattern for the barcode text.
maxThreadsInOneTask int Set the max available threads for one task.
grayscaleTransformationModes GrayscaleTransformationMode[] Set the grayscale transformation mode with an array of EnumGrayscaleTransformationMode. It controls whether to decode inverted barcodes.
grayscaleEnhancementModes GrayscaleEnhancementMode[] Set the grayscale enhancement mode with an array of EnumGrayscaleEnhancementModes.
scaleDownThreshold int Set the threshold for image shrinking.

barcodeFormatIds

Input a combined value of EnumBarcodeFormat to specify the targeted barcode formats.

long barcodeFormatIds;

expectedBarcodesCount

Set the expected barcode count. You can set it to 0 if the barcode count is unknown.

int expectedBarcodesCount;

Remarks

  • 0: detects at least one barcode.
  • N ( N > 0 ): detects N barcodes.
  • Dynamsoft Barcode Reader works in a loop trying different parameters to reach the number of expected barcodes specified by this parameter. If ExpectedBarcodesCount is 0, the loop stops after at least one barcode is found in an iteration. If ExpectedBarcodesCount is N, the loop stops once N barcodes are detected.

localizationModes

Determines how to localize barcodes. The array consists of one or more modes, with each EnumLocalizationMode representing a different localization process.

EnumLocalizationMode[] localizationModes;

Remarks

Some of the localization modes are specially optimized for certain barcode formats. For example, statistic marks for DPM barcodes and statistic postal code for postal code. If you want to further improve the read rate of certain barcodes, you can read the parameter reference of LocalizationModes for more information.

deblurModes

Sets the priority for which deblurring algorithms the library will employ when dealing with blurry images. This array consists of EnumDeblurMode items.

EnumDeblurMode[] deblurModes;

minResultConfidence

Set the minimum barcode result confidence to filter out low confidence results.

int minResultConfidence;

Remarks

The default minresultConfidence value is 30.

minBarcodeTextLength

Sets the minimum text length of the barcode results that the library will share. Any results that do not meet this text length will be discarded by the library.

int minBarcodeTextLength;

barcodeTextRegExPattern

Set a RegEx pattern for the barcode text. Any barcode results that don’t follow this RegEx pattern will be discarded by the library.

String barcodeTextRegExPattern;

maxThreadsInOneTask

Set the maximum available threads for a single task.

int maxThreadsInOneTask;

grayscaleTransformationModes

Sets which grayscale transformation mode(s) the library will employ when reading barcodes. This parameter controls the library’s ability to read inverted barcodes. The array consists of GrayscaleTransformationMode items.

EnumGrayscaleTransformationMode[] grayscaleTransformationModes;

Remarks

To learn more about reading inverted barcodes, please view this article on how to read inverted barcodes

grayscaleEnhancementModes

Sets which grayscale enhancement mode(s) the library will use when reading barcodes. The array consists of GrayscaleEnhancementModes.

EnumGrayscaleEnhancementMode[] grayscaleEnhancementModes;

Remarks

This parameter can be quite powerful if used properly. To learn more about this parameter and how it can be used, please see this page on how to preprocess images.

scaleDownThreshold

Set the threshold for image shrinking when dealing with large images to help with the memory overhead. If both the width and height are larger then the threshold, the image is shrinked by half.

int scaleDownThreshold;

Remarks

If you would like to learn more on how this parameter works, please see this page on how to read barcodes from large images.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version (10.2.10)
    • Version 10.x
      • Version 10.0.21
      • Version 10.0.20
    • Version 9.x
      • Version 9.6.20
      • Version 9.6.11
      • Version 9.6.10
      • Version 9.6.0
      • Version 9.4.0
      • Version 9.2.13
      • Version 9.2.11
      • Version 9.2.10
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
    • Version 8.x
      • Version 8.9.3
      • Version 8.9.1
      • Version 8.9.0
      • Version 8.8.0
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
    • Version 7.x
      • Version 7.6.0
      • Version 7.5.0
    Change +