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

Defines a struct to configure the barcode reading runtime settings.
These settings are used to control the barcode recognition process such as which barcode types are to be decoded. More...

Public Attributes

EnumTerminatePhase TerminatePhase
 Sets the phase where the algorithm stops. More...
 
int 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. More...
 
int MaxAlgorithmThreadCount
 Sets the number of threads the image processing algorithm will use to decode barcodes. More...
 
int ExpectedBarcodesCount
 Sets the number of barcodes expected to be detected for each image More...
 
int BarcodeFormatIds
 Sets the formats of the barcode to be read. Barcode formats can be combined. More...
 
int PDFRasterDPI
 Sets the output image resolution. More...
 
int ScaleDownThreshold
 Sets the threshold for the image shrinking. More...
 
EnumBinarizationMode [] BinarizationModes
 Sets the mode and priority for binarization. More...
 
EnumLocalizationMode [] LocalizationModes
 Sets the mode and priority for localization algorithms. More...
 
FurtherModes FurtherModes
 Sets the further modes. More...
 
int DeblurLevel
 Sets the degree of blurriness of the barcode. More...
 
int IntermediateResultTypes
 Sets which types of intermediate result to be kept for further reference. Intermediate result types can be combined. More...
 
EnumIntermediateResultSavingMode IntermediateResultSavingMode
 Sets the intermediate result saving mode. More...
 
EnumResultCoordinateType ResultCoordinateType
 Specifies the format for the coordinates returned. More...
 
EnumTextResultOrderMode [] TextResultOrderModes
 Sets the mode and priority for the order of the text results returned. More...
 
RegionDefinition Region
 Sets the region definition including the regionTop, regionLeft, regionRight, regionBottom and regionMeasuredByPercentage. More...
 
int MinBarcodeTextLength
 Sets the range of barcode text length for barcodes search. More...
 
int MinResultConfidence
 The minimum confidence of the result. More...
 
string Reserved
 Reserved memory for struct. The length of this array indicates the size of the memory reserved for this struct. More...
 

Detailed Description

Defines a struct to configure the barcode reading runtime settings.
These settings are used to control the barcode recognition process such as which barcode types are to be decoded.

Member Data Documentation

◆ BarcodeFormatIds

int Dynamsoft.Barcode.PublicRuntimeSettings.BarcodeFormatIds

Sets the formats of the barcode to be read. Barcode formats can be combined.

Value range:
A combined value of BarcodeFormat Enumeration items
Default value:
BF_ALL
Remarks:
If you already know the barcode type(s) before performing barcode reading, specifying the barcode type(s) to be read will speed up the recognition process.
See also
Dynamsoft.Barcode.EnumBarcodeFormat

◆ BinarizationModes

EnumBinarizationMode [] Dynamsoft.Barcode.PublicRuntimeSettings.BinarizationModes

Sets the mode and priority for binarization.

Value range:
Each array item can be any one of the BinarizationMode Enumeration items.
Default value:
[BM_LOCAL_BLOCK,BM_SKIP,BM_SKIP,BM_SKIP,BM_SKIP,BM_SKIP,BM_SKIP,BM_SKIP]
Remarks:
The array index represents the priority of the item. The smaller index is, the higher priority is.
See also
Dynamsoft.Barcode.EnumBinarizationMode

◆ DeblurLevel

int Dynamsoft.Barcode.PublicRuntimeSettings.DeblurLevel

Sets the degree of blurriness of the barcode.

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 value set, the more effort the library will spend to decode images, but it may also slow down the recognition process.

◆ ExpectedBarcodesCount

int Dynamsoft.Barcode.PublicRuntimeSettings.ExpectedBarcodesCount

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

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 used."

◆ FurtherModes

FurtherModes Dynamsoft.Barcode.PublicRuntimeSettings.FurtherModes

Sets the further modes.

◆ IntermediateResultSavingMode

EnumIntermediateResultSavingMode Dynamsoft.Barcode.PublicRuntimeSettings.IntermediateResultSavingMode

Sets the intermediate result saving mode.

Value range:
A value of IntermediateResultSavingMode Enumeration items
Default value:
IRSM_MEMORY
See also
Dynamsoft.Barcode.EnumIntermediateResultSavingMode

◆ IntermediateResultTypes

int Dynamsoft.Barcode.PublicRuntimeSettings.IntermediateResultTypes

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

Value range:
A combined value of IntermediateResultType Enumeration items
Default value:
0
Remarks:
If you have a blurry image, you can set this property to a larger value. The higher value set, the more effort the library will spend to decode images, but it may also slow down the recognition process.
See also
Dynamsoft.Barcode.EnumIntermediateResultType

◆ LocalizationModes

EnumLocalizationMode [] Dynamsoft.Barcode.PublicRuntimeSettings.LocalizationModes

Sets the mode and priority for localization algorithms.

Value range:
Each array item can be any one of the LocalizationMode Enumeration items.
Default value:
[LM_CONNECTED_BLOCKS,LM_SCAN_DIRECTLY,LM_STATISTICS,LM_LINES,LM_SKIP,LM_SKIP,LM_SKIP,LM_SKIP]
Remarks:
The array index represents the priority of the item. The smaller index is, the higher priority is.
See also
Dynamsoft.Barcode.EnumLocalizationMode

◆ MaxAlgorithmThreadCount

int Dynamsoft.Barcode.PublicRuntimeSettings.MaxAlgorithmThreadCount

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

Value range:
[1, 4]
Default value:
4
Remarks:
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 only use one core, you can set it to 1 for best speed. If you create BarcodeReader.

◆ MinBarcodeTextLength

int Dynamsoft.Barcode.PublicRuntimeSettings.MinBarcodeTextLength

Sets the range of barcode text length for barcodes search.

Value range:
[0, 0x7fffffff]
Default value:
0
Remarks:
0: means no limitation on the barcode text length.

◆ MinResultConfidence

int Dynamsoft.Barcode.PublicRuntimeSettings.MinResultConfidence

The minimum confidence of the result.

Value range:
[0, 100]
Default value:
0
Remarks:
0: means no limitation on the barcode text length.

◆ PDFRasterDPI

int Dynamsoft.Barcode.PublicRuntimeSettings.PDFRasterDPI

Sets the output image resolution.

Value range:
[100, 600]
Default value:
300
Remarks:
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.

◆ Region

RegionDefinition Dynamsoft.Barcode.PublicRuntimeSettings.Region

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

◆ Reserved

string Dynamsoft.Barcode.PublicRuntimeSettings.Reserved

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

◆ ResultCoordinateType

EnumResultCoordinateType Dynamsoft.Barcode.PublicRuntimeSettings.ResultCoordinateType

Specifies the format for the coordinates returned.

Value range:
Any one of the ResultCoordinateType Enumeration items
Default value:
RCT_PIXEL
See also
Dynamsoft.Barcode.EnumResultCoordinateType

◆ ScaleDownThreshold

int Dynamsoft.Barcode.PublicRuntimeSettings.ScaleDownThreshold

Sets the threshold for the image shrinking.

Value range:
[512, 0x7fffffff]
Default value:
2300
Remarks:
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.

◆ TerminatePhase

EnumTerminatePhase Dynamsoft.Barcode.PublicRuntimeSettings.TerminatePhase

Sets the phase where the algorithm stops.

Value range:
Any one of the TerminatePhase Enumeration items
Default value:
TP_BARCODE_RECOGNIZED
Remarks:
When the recognition result is not desired, this parameter can be set to skip certain processing stages.
See also
Dynamsoft.Barcode.EnumTerminatePhase

◆ TextResultOrderModes

EnumTextResultOrderMode [] Dynamsoft.Barcode.PublicRuntimeSettings.TextResultOrderModes

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

Value range:
Each array item can be any one of the TextResultOrderMode Enumeration items
Default value:
[TROM_CONFIDENCE,TROM_POSITION,TROM_FORMAT,TROM_SKIP,TROM_SKIP,TROM_SKIP,TROM_SKIP,TROM_SKIP]
See also
Dynamsoft.Barcode.EnumTextResultOrderMode

◆ Timeout

int Dynamsoft.Barcode.PublicRuntimeSettings.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.

Value range:
[0, 0x7fffffff]
Default value:
10000
Remarks:
If you want to stop reading barcodes after a specified amount of time, you can use this parameter to set a timeout.