Dev Center
Table of contents

PublicRuntimeSettings

Defines a struct to configure the barcode reading runtime settings. These settings control the barcode recognition process such as which barcode types to decode.

public struct PublicRuntimeSettings

Attributes

Attribute Type
TerminatePhase EnumTerminatePhase
Timeout int
MaxAlgorithmThreadCount int
ExpectedBarcodesCount int
BarcodeFormatIds int
BarcodeFormatIds_2 int
PDFRasterDPI int
ScaleDownThreshold int
BinarizationModes EnumBinarizationMode[ ]
LocalizationModes EnumLocalizationMode[ ]
FurtherModes FurtherModes
DeblurLevel int
IntermediateResultTypes int
IntermediateResultSavingMode EnumIntermediateResultSavingMode
ResultCoordinateType EnumResultCoordinateType
TextResultOrderModes EnumTextResultOrderMode[ ]
ReturnBarcodeZoneClarity int
Region RegionDefinition
MinBarcodeTextLength int
MinResultConfidence int
ScaleUpModes EnumScaleUpMode[ ]
PDFReadingMode EnumPDFReadingMode

TerminatePhase

Sets the phase to stop the barcode reading algorithm.

EnumTerminatePhase Dynamsoft.Barcode.PublicRuntimeSettings.TerminatePhase
  • Value range
    Any one of the TerminatePhase Enumeration items

  • Default value
    TP_BARCODE_RECOGNIZED

  • Remark
    When the recognition result is not desired, you can set this parameter can be set to skip certain processing stages.

Timeout

Sets the maximum amount of time (in milliseconds) that should be spent searching for a barcode per page. It does not include the time taken to load/decode an image (TIFF, PNG, etc.) from disk into memory.

int Dynamsoft.Barcode.PublicRuntimeSettings.Timeout
  • Value range
    [0, 0x7fffffff]

  • Default value
    10000

  • Remark
    If you want to stop reading barcodes after a certain period of time, you can use this parameter to set a timeout.

MaxAlgorithmThreadCount

Sets the number of threads the image processing algorithm will use to decode barcodes.

int Dynamsoft.Barcode.PublicRuntimeSettings.MaxAlgorithmThreadCount
  • Value range
    [1, 4]

  • Default value
    4

  • Remark
    To keep a balance between speed and quality, the library concurrently runs four different threads for barcode decoding by default.

ExpectedBarcodesCount

Sets the number of barcodes expected to be detected for each image.

int Dynamsoft.Barcode.PublicRuntimeSettings.ExpectedBarcodesCount
  • Value range
    [0, 0x7fffffff]

  • Default value
    0

  • Remark
    0: means Unknown and it will find at least one barcode. 1: try to find one barcode. If one barcode is found, the library will stop the localization process and perform barcode decoding. n: try to find n barcodes. If the library only finds m (m<n) barcode, it will try different algorithms till n barcodes are found or all algorithms are tried.

BarcodeFormatIds

Sets the formats of the barcode in BarcodeFormat group 1 to be read. Barcode formats in BarcodeFormat group 1 can be combined.

int Dynamsoft.Barcode.PublicRuntimeSettings.BarcodeFormatIds

BarcodeFormatIds_2

Sets the formats of the barcode in BarcodeFormat group 2 to be read. Barcode formats in BarcodeFormat group 2 can be combined.

int Dynamsoft.Barcode.PublicRuntimeSettings.BarcodeFormatIds_2

PDFRasterDPI

Sets the output image resolution.

EnumPDFReadingMode Dynamsoft.Barcode.PublicRuntimeSettings.PDFReadingMode
  • Value range
    [100, 600]

  • Default value
    300

  • Remark
    When decoding barcodes from a PDF file using the DecodeFile method, the library will convert the PDF file to image(s) first, then perform barcode recognition.

ScaleDownThreshold

Sets the threshold for the image shrinking.

int Dynamsoft.Barcode.PublicRuntimeSettings.ScaleDownThreshold
  • Value range
    [512, 0x7fffffff]

  • Default value
    2300

  • Remark
    If the shorter edge size is larger than the given threshold value, the library will calculate the required height and width of the barcode image and shrink the image to that size before localization. Otherwise, the library will perform barcode localization on the original image.

BinarizationModes

Sets the mode and priority for binarization.

EnumBinarizationMode[] Dynamsoft.Barcode.PublicRuntimeSettings.BinarizationModes
  • Value range
    Each array item can be any one of the BinarizationMode Enumeration items.

  • Default value
    [EnumBinarizationMode.BM_LOCAL_BLOCK, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP]

  • Remark
    The array index represents the priority of the item. The smaller index is, the higher priority is.

LocalizationModes

Sets the mode and priority for localization algorithms.

EnumLocalizationMode[] Dynamsoft.Barcode.PublicRuntimeSettings.LocalizationModes
  • Value range
    Each array item can be any one of the LocalizationMode Enumeration items.

  • Default value
    [EnumLocalizationMode.LM_CONNECTED_BLOCKS, EnumLocalizationMode.LM_SCAN_DIRECTLY, EnumLocalizationMode.LM_STATISTICS, EnumLocalizationMode.LM_LINES, EnumLocalizationMode.LM_SKIP, EnumLocalizationMode.LM_SKIP, EnumLocalizationMode.LM_SKIP, EnumLocalizationMode.LM_SKIP]

  • Remark
    The array index represents the priority of the item. The smaller index is, the higher priority is.

FurtherModes

Sets further modes.

FurtherModes Dynamsoft.Barcode.PublicRuntimeSettings.FurtherModes

DeblurLevel

Sets the degree of blurriness of the barcode.

int Dynamsoft.Barcode.PublicRuntimeSettings.DeblurLevel
  • Value range
    [0, 9]

  • Default value
    9

  • Remark
    If you have a blurry image, you can set this property to a larger value. The higher the value set, the more effort the library will spend to decode images, but it may also slow down the recognition process.

IntermediateResultTypes

Sets which types of intermediate result to be kept for further reference. Intermediate result types can be combined.

int Dynamsoft.Barcode.PublicRuntimeSettings.IntermediateResultTypes

IntermediateResultSavingMode

Sets the mode for saving intermediate result.

EnumIntermediateResultSavingMode Dynamsoft.Barcode.PublicRuntimeSettings.IntermediateResultSavingMode

ResultCoordinateType

Specifies the format for the coordinates returned.

EnumResultCoordinateType Dynamsoft.Barcode.PublicRuntimeSettings.ResultCoordinateType
  • Value range
    Any one of the ResultCoordinateType Enumeration items

  • Default value
    EnumResultCoordinateType.RCT_PIXEL

TextResultOrderModes

Sets the mode and priority for the order of the text results returned.

EnumTextResultOrderMode[] Dynamsoft.Barcode.PublicRuntimeSettings.TextResultOrderModes
  • Value range
    Each array item can be any one of the TextResultOrderMode Enumeration items.

  • Default value
    [EnumTextResultOrderMode.TROM_CONFIDENCE, EnumTextResultOrderMode.TROM_POSITION, EnumTextResultOrderMode.TROM_FORMAT, EnumTextResultOrderMode.TROM_SKIP, EnumTextResultOrderMode.TROM_SKIP, EnumTextResultOrderMode.TROM_SKIP, EnumTextResultOrderMode.TROM_SKIP, EnumTextResultOrderMode.TROM_SKIP]

  • Remark
    The array index represents the priority of the item. The smaller the index, the higher the priority.

ReturnBarcodeZoneClarity

Sets whether or not to return the clarity of the barcode zone.

int Dynamsoft.Barcode.PublicRuntimeSettings.ReturnBarcodeZoneClarity
  • Value range
    [0,1]

  • Default value
    0

  • Remark
    0: Do not return the clarity of the barcode zone; 1: Return the clarity of the barcode zone.

Region

Sets the region definition including regionTop, regionLeft, regionRight, regionBottom, and regionMeasuredByPercentage.

RegionDefinition Dynamsoft.Barcode.PublicRuntimeSettings.Region

MinBarcodeTextLength

Sets the range of barcode text length for barcodes search.

int Dynamsoft.Barcode.PublicRuntimeSettings.MinBarcodeTextLength
  • Value range
    [0, 0x7fffffff]

  • Default value
    0

  • Remark
    0: means no limitation on the barcode text length.

MinResultConfidence

The minimum confidence of the result.

int Dynamsoft.Barcode.PublicRuntimeSettings.MinResultConfidence
  • Value range
    [0, 100]

  • Default value
    0

  • Remark
    0: means no limitation on the result confidence.

ScaleUpModes

Sets the mode and priority to control the sampling methods of scale-up for linear barcode with small module sizes.

EnumScaleUpMode[] Dynamsoft.Barcode.PublicRuntimeSettings.ScaleUpModes
  • Value range
    Each array item can be any one of the ScaleUpMode Enumeration items.

  • Default value
    [EnumScaleUpMode.SUM_AUTO, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP, EnumScaleUpMode.SUM_SKIP]

  • Remark
    The array index represents the priority of the item. The smaller the index, the higher the priority.

PDFReadingMode

Sets the way to detect barcodes from a PDF file when using the DecodeFile method.

EnumPDFReadingMode Dynamsoft.Barcode.PublicRuntimeSettings.PDFReadingMode
  • Value range
    Any one of the PDFReadingMode Enumeration items.

  • Default value
    EnumPDFReadingMode.PDFRM_AUTO

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

version 7.6.0

  • Latest version
  • Version 10.x
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • 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 +