Dynamsoft Barcode Reader 6.3.0 - API Reference
Public Attributes | List of all members
Dynamsoft.Barcode.PublicRuntimeSettings Struct Reference

This struct used for storing current runtime settings. More...

Public Attributes

int mTimeout
 The timeout threshold. More...
int mPDFRasterDPI
 The PDF raster DPI. More...
TextFilterMode mTextFilterMode
 The text filter mode. More...
RegionPredetectionMode mRegionPredetectionMode
 The region predetection mode. More...
string mLocalizationAlgorithmPriority
 The localization algorithm priority. More...
int mBarcodeFormatIds
 List of identifiers for the barcode formats. More...
int mMaxAlgorithmThreadCount
 Number of maximum algorithm threads. More...
int mTextureDetectionSensitivity
 The texture detection sensitivity. More...
int mDeblurLevel
 The deblur level. More...
int mAntiDamageLevel
 The anti damage level. More...
int mMaxDimOfFullImageAsBarcodeZone
 The maximum dimension of full image as barcode zone. More...
int mMaxBarcodesCount
 Number of maximum barcodes. More...
BarcodeInvertMode mBarcodeInvertMode
 The barcode invert mode. More...
int mScaleDownThreshold
 The scale down threshold. More...
int mGrayEqualizationSensitivity
 The gray equalization sensitivity. More...
int mEnableFillBinaryVacancy
 The enable fill binary vacancy. More...
ColourImageConvertMode mColourImageConvertMode
 The colour image convert mode. More...
string mReserved
 Reserved memory for struct. More...
int mExpectedBarcodesCount
 Number of expected barcodes. More...
int mBinarizationBlockSize
 Size of the binarization block. More...

Detailed Description

This struct used for storing current runtime settings.

The value of public parameters in runtime settings need to be set according to a specified rules if there are conflicts between different templates. The rules will been shown below:

Parameters Assignment Rules:
  • Set as maximal value: mTimeout, mPDFRasterDPI, mMaxAlgorithmThreadCount, mDeblurLevel, mAntiDamageLevel, mMaxDimOfFullImageAsBarcodeZone, mMaxBarcodesCount, mScaleDownThreshold, mExpectedBarcodesCount.
  • Set as union (merged or sum): mBarcodeFormatIds.
  • Based on ConflictMode (ignore or overwrite): mTextFilterMode, mRegionPredetectionMode, mLocalizationAlgorithmPriority, mTextureDetectionSensitivity, mBarcodeInvertMode, mGrayEqualizationSensitivity, mEnableFillBinaryVacancy, mColourImageConvertMode, mBinarizationBlockSize.
More information about public parameters and template file can be found in file DBR_Developer's_Guide.pdf.

Member Data Documentation

◆ mAntiDamageLevel

int Dynamsoft.Barcode.PublicRuntimeSettings.mAntiDamageLevel

The anti damage level.

It stores the degree of anti-damage of the barcode, which decides how many localization algorithms will be used for locating barcode area.

Value range:
Default Value:
  • 0 ≤ N ≤ 3: one localization algorithm will be used.
  • 4 ≤ N ≤ 5: two localization algorithm will be used.
  • 6 ≤ N ≤ 7: three localization algorithm will be used.
  • 8 ≤ N ≤ 9: four(i.e. all) localization algorithm will be used.
To ensure the best decode efficiency, the value of AntiDamageLevel is suggested to be set to 9 if the ExpectedBarcodesCount is set to 0 or 1; otherwise, the value of AntiDamageLevel is suggested to be set to 7.
See also

◆ mBarcodeFormatIds

int Dynamsoft.Barcode.PublicRuntimeSettings.mBarcodeFormatIds

List of identifiers for the barcode formats.

It stores the information of which types of barcode need to be read. Notice that one barcode reader can support more than one barcode format, i.e. the barcode format can be combined like BarcodeFormat.CODE_39 | BarcodeFormat.CODE_128, then the value will be set as 3 (= 1+2).

See also

◆ mBarcodeInvertMode

BarcodeInvertMode Dynamsoft.Barcode.PublicRuntimeSettings.mBarcodeInvertMode

The barcode invert mode.

It stores the barcode invert mode which decides whether to invert colour before binarization. This mode is designed to fit the scenarios which light barcode located at dark background, for example, a white QR in a black paper.

Value range:
BIM_DarkOnLight, BIM_LightOnDark
Default value:
See also

◆ mBinarizationBlockSize

int Dynamsoft.Barcode.PublicRuntimeSettings.mBinarizationBlockSize

Size of the binarization block.

It stores the block size for the process of binarization. Block size means the size of a pixel neighborhood that is used to calculate a threshold value for the pixel.

Value range:
  • 0: the block size used for binarization will be set to a value which is calculated automatically.
  • N:
    - 1 ≤ N ≤ 3: the block size used for binarization will be set to 3.
    - N > 3: the block size used for binarization will be set to N.

◆ mColourImageConvertMode

ColourImageConvertMode Dynamsoft.Barcode.PublicRuntimeSettings.mColourImageConvertMode

The colour image convert mode.

It stores the information whether to convert colour images to grayscale before processing.

Value range:
CICM_Auto, CICM_Grayscale
Default value:
See also

◆ mDeblurLevel

int Dynamsoft.Barcode.PublicRuntimeSettings.mDeblurLevel

The deblur level.

It stores the degree of blurriness of the barcode. The higher value you set, the much more effort the library will take to decode images, but it may also slow down the recognition process.

Value range:
Default value:

◆ mEnableFillBinaryVacancy

int Dynamsoft.Barcode.PublicRuntimeSettings.mEnableFillBinaryVacancy

The enable fill binary vacancy.

For barcodes with a large module size there might be a vacant area in the position detection pattern after binarization which may result in a decoding failure. Setting this to true will fill in the vacant area with black and may help to decode it successfully.

Value range:
0,1 (0 - disable, 1 - enable)
Default value:

◆ mExpectedBarcodesCount

int Dynamsoft.Barcode.PublicRuntimeSettings.mExpectedBarcodesCount

Number of expected barcodes.

It stores the expected number of barcodes to read for each image (or each region of the image if you specified barcode regions).

Value range:
Default value:
  • 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 less than n) barcode, it will try different algorithms till n barcodes are found or all algorithms are used.
The value of ExpectedBarcodesCount must be less than or equal to the value of MaxBarcodesCount. Also, to ensure the best decode efficiency, the value of AntiDamageLevel is suggested to be set to 9 if the ExpectedBarcodesCount is set to 0 or 1; otherwise, the value of AntiDamageLevel is suggested to be set to 7.
See also
mMaxBarcodesCount mAntiDamageLevel

◆ mGrayEqualizationSensitivity

int Dynamsoft.Barcode.PublicRuntimeSettings.mGrayEqualizationSensitivity

The gray equalization sensitivity.

It stores the sensitivity used for gray equalization. The higher the value, the more likely gray equalization will be activated. Effective for images with low comparison between black and white colour. May cause adverse effect on images with high level of black and white colour comparison.

Value range:
Default value:
If the value is set to 0, gray equalization will be disabled compulsively; if the value is set to 9, gray equalization will be activated compulsively otherwise.

◆ mLocalizationAlgorithmPriority

string Dynamsoft.Barcode.PublicRuntimeSettings.mLocalizationAlgorithmPriority

The localization algorithm priority.

It stores the priority of localization algorithms, which decides the order of using following four localization algorithms.

Default values:
Optional localization algorithms:
"ConnetectedBlock", "Statistics", "Lines", "FullImageAsBarcodeZone"
  • Default value: The library will automatically use optimized localization priority, i.e. ConnetectedBlock -> Statistics -> Lines -> FullImageAsBarcodeZone, which is also the recommended order.
  • ConnectedBlock: Localizes barcodes by searching connected blocks. This algorithm usually gives best result and it is recommended to set ConnectedBlock to the highest priority.
  • Lines: Localizes barcodes by searching for groups of lines. This is optimized for 1D and PDF417 barcodes.
  • Statistics: Localizes barcodes by groups of contiguous black-white regions. This is optimized for QRCode and DataMatrix.
  • FullImageAsBarcodeZone: Disables localization. In this mode, it will directly localize barcodes on the full image without localization. If there is nothing other than the barcode in the image, it is recommended to use this mode.

◆ mMaxAlgorithmThreadCount

int Dynamsoft.Barcode.PublicRuntimeSettings.mMaxAlgorithmThreadCount

Number of maximum algorithm threads.

It stores how many image processing algorithm threads will be used to decode barcodes. By default, the library concurrently runs four different threads for decoding barcodes in order to keep a balance between speed and quality. For some devices (e.g. Raspberry Pi) that is only using one core, you can set it to 1 for best speed.

Value range:
Default value:

◆ mMaxBarcodesCount

int Dynamsoft.Barcode.PublicRuntimeSettings.mMaxBarcodesCount

Number of maximum barcodes.

It stores the maximum number of barcodes to read, which limits the number of barcodes returned by library.

Value range:
Default value:

◆ mMaxDimOfFullImageAsBarcodeZone

int Dynamsoft.Barcode.PublicRuntimeSettings.mMaxDimOfFullImageAsBarcodeZone

The maximum dimension of full image as barcode zone.

Sets the maximum image dimension (in pixels) to localize barcode on the full image. If the image dimension is smaller than the given value, the library will localize barcode on the full image. Otherwise, "FullImageAsBarcodeZone" mode will not be enabled.

Value range:
Default value:
See also

◆ mPDFRasterDPI

int Dynamsoft.Barcode.PublicRuntimeSettings.mPDFRasterDPI

The PDF raster DPI.

It stores the output image resolution. When you are trying to decode a PDF file using DecodeFile method, the library will convert the pdf file to image(s) first, then perform barcode recognition.

Value range:
Default value:

◆ mRegionPredetectionMode

RegionPredetectionMode Dynamsoft.Barcode.PublicRuntimeSettings.mRegionPredetectionMode

The region predetection mode.

It stores the region pre-detection mode for barcodes search, which decides whether to pre-detect barcode region before accurate localization. If you want to pre-detect barcode regions, it is better to set the mColourImageConvertMode to "CICM_Auto" as the color features need to be used in region detection.

Value range:
RPM_Disable, RPM_Enable
Default value:
See also
RegionPredetectionMode mColourImageConvertMode

◆ mReserved

string Dynamsoft.Barcode.PublicRuntimeSettings.mReserved

Reserved memory for struct.

The length of this array indicates the size of the memory reserved for this struct.

◆ mScaleDownThreshold

int Dynamsoft.Barcode.PublicRuntimeSettings.mScaleDownThreshold

The scale down threshold.

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

Value range:
Default value:

◆ mTextFilterMode

TextFilterMode Dynamsoft.Barcode.PublicRuntimeSettings.mTextFilterMode

The text filter mode.

It stores the text filter mode for barcodes search, which decides whether to filter text before barcode localization.

Value range:
TFM_Disable, TFM_Enable
Default value:
See also

◆ mTextureDetectionSensitivity

int Dynamsoft.Barcode.PublicRuntimeSettings.mTextureDetectionSensitivity

The texture detection sensitivity.

It stores the value of sensitivity for texture detection. The higher value you set, the more efforts it will take to detect texture.

Value range:
Default value:
If the value is set to 0, texture detection will be disabled compulsively; if the value is set to 9, texture detection will be activated compulsively otherwise.

◆ mTimeout

int Dynamsoft.Barcode.PublicRuntimeSettings.mTimeout

The timeout threshold.

It stores the maximum amount of time (in milliseconds) it should spend 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.

Value range:
Default value: