Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
LocalizationModes
is a parameter to control how to localize barcodes. It consisits of one or more modes, each mode represents a way to implement the localization.
Localizes barcodes by searching for connected blocks. This algorithm usually gives best result and it is recommended to set ConnectedBlocks to the highest priority. This mode has the following arguments for further customizing.
Localizes barcodes by groups of contiguous black-white regions. This is optimized for QRCode and DataMatrix. This mode has the following arguments for further customizing.
Localizes barcodes by searching for groups of lines. This is optimized for 1D and PDF417 barcodes. This mode has the following arguments for further customizing.
Localizes barcodes quickly. This mode is recommended in interactive scenario. This mode has the following arguments for further customizing.
Localizes barcodes by groups of marks.This is optimized for DPM codes. This mode has the following arguments for further customizing.
Localizes barcodes by groups of connected blocks and lines.This is optimized for postal codes. This mode has the following arguments for further customizing.
Localizes barcodes from the centre of the image. This mode has the following arguments for further customizing.
Localizes 1D barcodes in a fast mode. This mode is designed for reading 1D barcodes in a very fast mode. This mode has the following arguments for further customizing.
PublicRuntimeSettings
MemberLocalizationModes
can be set dynamically during runtime as a member of PublicRuntimeSettings
struct, it is an array with 8 LocalizationMode
Enumeration items.
Code Snippet in C++
//...other codes
PublicRuntimeSettings* pSettings = new PublicRuntimeSettings;
int errorCode = reader->GetRuntimeSettings(pSettings);
pSettings->localizationModes[0] = LM_SCAN_DIRECTLY;
pSettings->localizationModes[1] = LM_CONNECTED_BLOCKS;
reader->UpdateRuntimeSettings(pSettings);
reader->SetModeArgument("LocalizationModes", 0, "ScanStride", "5");
delete pSettings;
//...other codes
Remarks
GetModeArgument
and SetModeArgument
need to be called for getting and setting Arguments
.
See Also
PublicRuntimeSettings:
JavaScript | C | C++ | .NET | Python | Java | Java-Android | Objective-C & SwiftLocalizationMode
EnumerationGetModeArgument:
JavaScript | C | C++ | .NET | Python | Java | Java-Android | Objective-C & SwiftSetModeArgument:
JavaScript | C | C++ | .NET | Python | Java | Java-Android | Objective-C & SwiftLocalizationModes
as a JSON parameter is a JSON Object array. Each JSON object is defined as below.
Key Name | Key Value | Description |
---|---|---|
Mode | Any one in Candidate Mode List as string | (Required) Specifies a mode for deformation resisting. |
ScanStride | A number from value range of ScanStride | (Optional) Sets the Argument ScanStride. |
ScanDirection | A number from value range of ScanDirection | (Optional) Sets the Argument ScanDirection. |
LibraryFileName | A string from value range of LibraryFileName | (Optional) Sets the Argument LibraryFileName. |
LibraryParameters | A string from value range of LibraryFileName | (Optional) Sets the Argument LibraryFileName. |
JSON Parameter Example
{
"LocalizationModes": [
{
"Mode": "LM_SCAN_DIRECTLY",
"ScanStride": 5
},
{
"Mode": "LM_CONNECTED_BLOCKS"
}
]
}
The SDK will loop the setting modes one by one until find as many barcodes as ExpectedBarcodesCount
specified or timeout. The more modes you set, the more time the process may take. Setting an appropriate mode first in order or setting only necessary modes may speed up the process.
Setting more modes along with different arguments may improve the Read Rate.
LocalizationModes
has no influence on the Accuracy.
Sets the stride in pixels between scans when searching for barcodes.
Value Type | Value Range | Default Value | Valid For |
---|---|---|---|
int | [0, 0x7fffffff] | 0 | LM_SCAN_DIRECTLY LM_ONED_FAST_SCAN |
Remarks
Performance Adaptability
A smaller value may improve the Read Rate but slow down the Speed.
Sets the scan direction when searching barcode.
Value Type | Value Range | Default Value | Valid For |
---|---|---|---|
int | [0, 2] | 0 | LM_SCAN_DIRECTLY LM_ONED_FAST_SCAN |
Remarks
Sets the file name of the library to load dynamically.
Value Type | Value Range | Default Value | Valid For |
---|---|---|---|
string | A string value representing file name. | ”” | All modes |
Remarks
The library must be in the same place with Dynamsoft Barcode Reader Library.
Sets the parameters passed to the library to load dynamically.
Value Type | Value Range | Default Value | Valid For |
---|---|---|---|
string | A string value representing parameters. | ”” | All modes |
latest version