Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

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

Settings Control

Scan Settings

API Name Description
getScanSettings() Returns the current scan settings.
updateScanSettings() Changes scan settings with the object passed in.

Runtime Settings

API Name Description
updateRuntimeSettingsFromString() Updates runtime settings with a template represented by a JSON string.
outputRuntimeSettingsToString() Output the current runtime settings to a JSON string.
updateReferenceRegionFromBarcodeResults() Updates reference region which is defined with source type DLR_LST_BARCODE.

getScanSettings

Returns the current scan settings.

getScanSettings(): Promise<ScanSettings>

Return value

A promise resolving to a ScanSettings object.

Code Snippet

let scanSettings = await recognizer.getScanSettings();
scanSettings.intervalTime = 50;
scanSettings.duplicateForgetTime = 1000;
await recognizer.updateScanSettings(scanSettings);

See also

updateScanSettings

Changes scan settings with the object passed in.

updateScanSettings(settings: ScanSettings): Promise<void>

Parameters

settings : specifies the new scan settings.

Return value

A promise that resolves when the operation succeeds.

Code Snippet

let scanSettings = await recognizer.getScanSettings();
scanSettings.intervalTime = 50;
scanSettings.duplicateForgetTime = 1000;
await recognizer.updateScanSettings(scanSettings);

See also

updateRuntimeSettingsFromString

Updates runtime settings with a template represented by a JSON string.

updateRuntimeSettingsFromString(runtimeSettings: string): Promise<void>

Parameters

runtimeSettings : a JSON string that specifies the runtime settings or one of the built-in runtimeSettings templates. The following are the built-in templates:

Name Description
number For pure number recognition.
numberLetter For number and English letter recognition.
numberUpperCase For number and uppercase English letter recognition.
letter For pure English letter recognition.
passportMRZ For recognition of the machine-readable zones on passports.
visaMRZ For recognition of the machine-readable zones on visas.
MRZ For recognition of the machine-readable zones on passports, visas and IDCards.
VIN For VIN (vehicle identification number) recognition.
VIN_NA For North American VIN (vehicle identification number) recognition.

When recognizing from video input, add the prefix “video-“ for a slightly different template optimized for continuous frame recognition. For example, use video-MRZ to read the MRZ with a camera.

Return value

A promise that resolves when the operation succeeds.

Code Snippet

/* Update settings using one of the preset templates */
await recognizer.updateRuntimeSettingsFromString('VIN');

outputRuntimeSettingsToString

Output the current runtime settings to a JSON string.

outputRuntimeSettingsToString(): Promise<string>;

Return value

A promise resolving to a JSON string that represents the runtime settings.

Code Snippet

let settings = await recognizer.outputRuntimeSettingsToString();
console.log(settings);

updateReferenceRegionFromBarcodeResults

Updates reference region which is defined with source type DLR_LST_BARCODE .

updateReferenceRegionFromBarcodeResults(barcodeResults: BarcodeResultArray): Promise<void>

Parameters

barcodeResults : specifies the barcode results used to localize reference region.

Return value

A promise that resolves when the operation succeeds.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 3.x
    • Version 3.0.30(latest)
  • Version 2.x
    • Version 2.2.31
    • Version 2.2.30
    • Version 2.2.11
    • Version 2.2.10
    • Version 2.2.4
    • Version 2.2.2
    • Version 2.2.1
    • Version 2.2.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support