MENU
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

PublicRuntimeSetting

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

class PublicRuntimeSetting

Attributes

Attribute Type
accompanying_text_recognition_modes list[ EnumAccompanyingTextRecognitionMode ]
barcode_format_ids int
barcode_format_ids_2 int
barcode_colour_modes list[ EnumBarcodeColourMode ]
barcode_complement_modes list[ EnumBarcodeComplementMode ]
binarization_modes list[ EnumBinarizationMode ]
colour_clustering_modes list[ EnumColourClusteringMode ]
colour_conversion_modes list[ EnumColourConversionMode ]
deblur_level int
deblur_modes list[ EnumDeblurMode ]
deformation_resisting_modes list[ EnumDeformationResistingMode ]
dpm_code_reading_modes list[ EnumDPMCodeReadingMode ]
expected_barcodes_count int
grayscale_transformation_modes list[ EnumGrayscaleTransformationMode ]
image_preprocessing_modes list[ EnumImagePreprocessingMode ]
intermediate_result_saving_mode EnumIntermediateResultSavingMode
intermediate_result_types int
localization_modes list[ EnumLocalizationMode ]
max_algorithm_thread_count int
min_barcode_text_length int
min_result_confidence int
pdf_raster_dpi int
pdf_reading_mode EnumPDFReadingMode
region_bottom int
region_left int
region_measured_by_percentage int
region_predetection_modes list[ EnumRegionPredetectionMode ]
region_right int
region_top int
result_coordinate_type EnumResultCoordinateType
return_barcode_zone_clarity int
scale_down_threshold int
scale_up_modes list[ EnumScaleUpMode ]
terminate_phase EnumTerminatePhase
texture_detection_modes list[ EnumTextureDetectionMode ]
text_assisted_correction_mode list[ EnumTextResultOrderMode ]
text_filter_modes list[ EnumTextFilterMode ]
text_result_order_modes list[ TextResultOrderMode ]
timeout int

accompanying_text_recognition_modes

Sets the mode and priority to recognize accompanying text.

PublicRuntimeSetting.accompanying_text_recognition_modes
  • Value range
    Each list item can be any one of the AccompanyingTextRecognitionMode Enumeration items.

  • Default value
    [EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP, EnumAccompanyingTextRecognitionMode.ATRM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

barcode_format_ids

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

PublicRuntimeSetting.barcode_format_ids
  • Value range
    A combined value of BarcodeFormat Enumeration items

  • Default value
    EnumBarcodeFormat.BF_ALL

  • Remarks
    If the barcode type(s) are certain, specifying the barcode type(s) to be read will speed up the recognition process.

barcode_format_ids_2

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

PublicRuntimeSetting.barcode_format_ids_2
  • Value range
    A combined value of BarcodeFormat_2 Enumeration items

  • Default value
    EnumBarcodeFormat_2.BF2_NULL

  • Remarks
    If the barcode type(s) are certain, specifying the barcode type(s) to be read will speed up the recognition process.

barcode_colour_modes

Sets the mode and priority for the barcode colour mode used to process the barcode zone.

PublicRuntimeSetting.barcode_colour_modes
  • Value range
    Each list item can be any one of the BarcodeColourMode Enumeration items.

  • Default value
    [EnumBarcodeColourMode.BICM_DARK_ON_LIGHT, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP, EnumBarcodeColourMode.BICM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

barcode_complement_modes

Sets the mode and priority to complement the missing parts in the barcode.

PublicRuntimeSetting.barcode_complement_modes
  • Value range
    Each list item can be any one of the BarcodeComplementMode Enumeration items.

  • Default value
    [EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP, EnumBarcodeComplementMode.BCM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

binarization_modes

Sets the mode and priority for binarization.

PublicRuntimeSetting.binarization_modes
  • Value range
    Each list 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]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

colour_clustering_modes

Sets the mode and priority for colour categorization. Not supported yet.

PublicRuntimeSetting.colour_clustering_modes
  • Value range
    Each list item can be any one of the ColourClusteringMode Enumeration items.

  • Default value
    [EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP, EnumColourClusteringMode.CCM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

colour_conversion_modes

Sets the mode and priority for converting a colour image to a grayscale image.

PublicRuntimeSetting.colour_conversion_modes
  • Value range
    Each list item can be any one of the ColourConversionMode Enumeration items.

  • Default value
    [EnumColourConversionMode.CICM_GENERAL, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

deblur_level

Sets the degree of blurriness of the barcode.

PublicRuntimeSettings.deblur_level
  • Value range
    [0, 9]

  • Default value
    9

  • Remarks
    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.

deblur_modes

Sets the mode and priority for deblurring.

PublicRuntimeSetting.deblur_modes
  • Value range
    Each list item can be any one of the EnumDeblurMode Enumeration items.

  • Default value
    [EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP, EnumDeblurMode.DM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

deformation_resisting_modes

Sets the mode and priority for deformation resisting.

PublicRuntimeSetting.deformation_resisting_modes
  • Value range
    Each list item can be any one of the DeformationResistingMode Enumeration items.

  • Default value
    [EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

dpm_code_reading_modes

Sets the mode and priority for DPM code reading.

PublicRuntimeSetting.dpm_code_reading_modes
  • Value range
    Each list item can be any one of the DPMCodeReadingMode Enumeration items.

  • Default value
    [EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP, EnumDeformationResistingMode.DRM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

expected_barcodes_count

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

PublicRuntimeSettings.expected_barcodes_count
  • Value range
    [0, 0x7fffffff]

  • Default value
    0

  • Remarks

    • 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.

grayscale_transformation_modes

Sets the mode and priority for the grayscale image conversion.

PublicRuntimeSetting.grayscale_transformation_modes
  • Value range
    Each list item can be any one of the GrayscaleTransformationMode Enumeration items.

  • Default value
    [EnumGrayscaleTransformationMode.GTM_ORIGINAL, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

intermediate_result_saving_mode

Sets the mode for saving intermediate result.

PublicRuntimeSetting.intermediate_result_saving_mode

intermediate_result_types

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

PublicRuntimeSettings.intermediate_result_types
  • Value range
    A combined value of IntermediateResultType Enumeration items

  • Default value
    0

localization_modes

Sets the mode and priority for localization algorithms.

PublicRuntimeSetting.localization_modes
  • Value range
    Each list 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]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.

max_algorithm_thread_count

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

PublicRuntimeSetting.max_algorithm_thread_count
  • Value range
    [1, 4]

  • Default value
    4

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

min_barcode_text_length

Sets the range of barcode text length for barcodes search.

PublicRuntimeSetting.min_barcode_text_length
  • Value range
    [0, 0x7fffffff]

  • Default value
    0

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

min_result_confidence

The minimum confidence of the result.

PublicRuntimeSetting.min_result_confidence
  • Value range
    [0, 100]

  • Default value
    0

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

pdf_raster_dpi

Sets the output image resolution.

PublicRuntimeSetting.pdf_raster_dpi
  • Value range
    [100, 600]

  • Default value
    300

  • Remarks
    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.

pdf_reading_mode

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

PublicRuntimeSetting.pdf_reading_mode
  • Value range
    Any one of the PDFReadingMode Enumeration items.

  • Default value
    PDFRM_AUTO

region_bottom

The bottom-most coordinate or percentage of the region.

PublicRuntimeSetting.region_bottom
  • Value range
    • if region_measured_by_percentage = 0, [0,0x7fffffff]
    • if region_measured_by_percentage = 1, [0,100]
  • Default value
    0

region_left

The left-most coordinate or percentage of the region.

PublicRuntimeSetting.region_left
  • Value range
    • if region_measured_by_percentage = 0, [0,0x7fffffff]
    • if region_measured_by_percentage = 1, [0,100]
  • Default value
    0

region_measured_by_percentage

Sets whether or not to use percentage to measure the region size.

PublicRuntimeSetting.region_measured_by_percentage
  • Value range
    [0,1]

  • Default value
    0

  • Remarks When it’s set to 1, the values of Top, Left, Right, Bottom indicate percentage (from 0 to 100); Otherwise, they indicate coordinates. 0: not by percentage; 1: by percentage.

region_predetection_modes

Sets the region pre-detection mode for barcodes search.

PublicRuntimeSetting.region_predetection_modes
  • Value range
    Each list item can be any one of the RegionPredetectionMode Enumeration items.

  • Default value
    [EnumRegionPredetectionMode.RPM_GENERAL, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP]

  • Remarks
    The list index represents the priority of the item. The smaller index is, the higher priority is.If the image is large and the barcode on the image is very small, it is recommended to enable region predetection to speed up the localization process and recognition accuracy.

region_right

The right-most coordinate or percentage of the region.

PublicRuntimeSetting.region_right
  • Value range
    • if region_measured_by_percentage = 0, [0,0x7fffffff]
    • if region_measured_by_percentage = 1, [0,100]
  • Default value
    0

region_top

The top-most coordinate or percentage of the region.

PublicRuntimeSetting.region_top
  • Value range
    • if region_measured_by_percentage = 0, [0,0x7fffffff]
    • if region_measured_by_percentage = 1, [0,100]
  • Default value
    0

result_coordinate_type

Specifies the format for the coordinates returned.

PublicRuntimeSetting.result_coordinate_type
  • Value range
    Any one of the ResultCoordinateType Enumeration items

  • Default value
    EnumResultCoordinateType.RCT_PIXEL

return_barcode_zone_clarity

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

PublicRuntimeSetting.return_barcode_zone_clarity
  • Value range
    [0, 1]

  • Default value
    0

scale_down_threshold

Sets the threshold for the image shrinking.

PublicRuntimeSetting.scale_down_threshold
  • Value range
    [512, 0x7fffffff]

  • Default value
    2300

  • Remarks
    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.

scale_up_modes

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

PublicRuntimeSetting.scale_up_modes
  • 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]

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

terminate_phase

Sets the phase to stop the barcode reading algorithm.

PublicRuntimeSetting.terminate_phase
  • Value range
    A combined value of TerminatePhase Enumeration items

  • Default value
    EnumTerminatePhase.TP_BARCODE_RECOGNIZED

texture_detection_modes

Sets the mode and priority for texture detection.

PublicRuntimeSetting.texture_detection_modes
  • Value range
    Each array item can be any one of the TextureDetectionMode Enumeration items.

  • Default value
    [EnumTextureDetectionMode.TDM_GENERAL_WIDTH_CONCENTRATION, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP]

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

text_assisted_correction_mode

Sets the mode of text assisted correction for barcode decoding. Not supported yet.

PublicRuntimeSetting.text_assisted_correction_mode
  • Value range
    Any one of the TextAssistedCorrectionMode Enumeration items.

  • Default value
    EnumTextAssistedCorrectionMode.TACM_VERIFYING

text_filter_modes

Sets the mode and priority for text filter.

PublicRuntimeSetting.text_filter_modes
  • Value range
    Each array item can be any one of the TextFilterMode Enumeration items.

  • Default value
    [EnumTextFilterMode.TFM_GENERAL_CONTOUR, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP, EnumTextFilterMode.TFM_SKIP]

  • Remarks
    The array index represents the priority of the item. The smaller the index, the higher the priority. If the image contains a lot of text, you can enable text filter to speed up the localization process.

text_result_order_modes

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

PublicRuntimeSetting.text_result_order_modes
  • 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]

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

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.

PublicRuntimeSetting.timeout
  • Value range
    [0, 0x7fffffff]

  • Default value
    10000

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

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

latest version

  • Latest Version
  • version 7.6
  • version 7.5
Change +
© 2003–2020 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support