Documentation
Table of contents

LabelRecognizerModule Class

The LabelRecognizerModule Class is defined in the namespace Dynamsoft.DLR.

API Name Description
static getVersion() Returns the version of the LabelRecognizer module.
static loadRecognitionData() Loads a specific data file containing recognition information.
static onDataLoadProgressChanged An event that repeatedly fires during the loading of a recognition data file (.data).

getVersion

Returns the version of the LabelRecognizer module.

static getVersion(): string;

Code snippet

const version = Dynamsoft.DLR.LabelRecognizerModule.getVersion();
console.log(version);

loadRecognitionData

Loads a specific data file containing recognition information to aid in identifying text composed of predetermined characters. This file typically comprises a Convolutional Neural Networks (CNN) model.

static loadRecognitionData(dataName: string, dataPath?: string): Promise<void>;

Parameters

  • dataName: specifies the name of the recognition data. Available values are “MRZ”, “VIN”, “Letter”, “Number”, “NumberLetter”, “UpperCase”, “NumberUppercase”.
  • dataPath: specifies the path to find the data file. If not specified, the default path points to the package “dynamsoft-label-recognizer-data” which has the same root path as the package “dynamsoft-label-recognizer”.

Code snippet

await Dynamsoft.DLR.LabelRecognizerModule.loadRecognitionData("NumberLetter");

onDataLoadProgressChanged

An event that repeatedly fires during the loading of a recognition data file (.data).

static onDataLoadProgressChanged: (filePath: string, tag: "starting" | "in progress" | "completed", progress: { loaded: number, total: number }) => {};

Properties

  • filePath: Returns the path of the recognition data file.
  • tag: Indicates the ongoing status of the file download. Available values are “starting”, “in progress”, “completed”.
  • progress: Shows the numerical progress of the download.

Code snippet

Dynamsoft.DLR.LabelRecognizerModule.onDataLoadProgressChanged = (filePath, tag, progress) => {
    console.log("The loading of the file " + filePath + " is " + tag +" ( " + progress.loaded + "/" + progress.total+ ").");
}
await Dynamsoft.DLR.LabelRecognizerModule.loadRecognitionData("NumberLetter");

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(3.2.30)
    • Version 3.x
      • Version 3.0.30
    • 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
    • Documentation Homepage
    Change +