Faster Recognition and Word Spelling Correction with Dynamsoft Label Recognizer 2.0

Dynamsoft Label Recognizer

Last Updated on 2021-08-29

We have been cultivating a long-time interest in the field of optical character recognition (OCR).

Today, we are excited to announce Dynamsoft Label Recognizer 2.0, which is revolutionary to version 1.0 in its ability to detect and recognize text in images.

Download

DLR v2.0

Highlighted Features

Dynamsoft Label Recognizer 2.0 integrates OpenCV DNN to speed up the recognition process and supports custom dictionary functionality to correct word spelling errors.

Speeding Up Inference with OpenCV DNN Module on CPU

The OpenCV DNN inference is fast on CPU. We use the OpenCV DNN module for loading pre-trained Caffe model to improve the overall performance. DLR 2.0 is 2x faster than DLR 1.0.

Example for Passport MRZ Recognition

Here is a passport image.

Passport MRZ

We use Dynamsoft Label Recognizer to get the OCR results.

Passport MRZ Recognition

The performance comparison between DLR 1.x and DLR 2.x is as follows:

VersionRecognition time
v1.2.10.785367 s
v2.0.00.391825 s

Custom Dictionary for Word Correction

The new custom dictionary functionality allows users to correct typos.

Example for Nutrition Label Recognition

Assume you have a label with some nutrition ingredients, such as “selenium, chitosan”.

The printed words are “seleniun, chitosam” in the image.

nutrition label

We use Dynamsoft Label Recognizer to get the OCR results.

OCR for nutrition label

To correct the typos, we pre-define ” selenium, chitosan” in a dictionary.txt file:

selenium
chitosan

Then use the following code to load the custom dictionary:

DLR_RuntimeSettings *pSettings = new DLR_RuntimeSettings();
dlr.GetRuntimeSettings(pSettings);
memcpy(pSettings->dictionaryPath, "dictionary.txt", 256);
char errorMessage[512];
dlr.UpdateRuntimeSettings(pSettings, errorMessage, 512);
delete pSettings;

Afterwards, we re-run the application. Now you can see the typos have been fixed in output results.

Key Changes

Dynamsoft Label Recognizer v2.0 includes a variety of changes.

Here are the most important changes you should understand for developing your OCR applications.

Header files

Indexv1.xv2.x
1DynamsoftCommon.hDynamsoftCore.h
2DynamsoftLabelRecognition.hDynamsoftLabelRecognizer.h

Library files

Indexv1.xv2.x
1DynamsoftLabelRecognitionx64.dllDynamsoftLabelRecognizerx64.dll
2DynamsoftLabelRecognitionx64.libDynamsoftLabelRecognizerx64.lib
3libDynamsoftLabelRecognition.solibDynamsoftLabelRecognizer.so

APIs

Indexv1.xv2.x
1class CLabelRecognitionclass CLabelRecognizer
2DLR_OKDM_OK
3GetAllDLRResults()GetAllResults()
4struct DLRResultstruct DLR_Result
5FreeDLRResults()FreeResults()
6struct DLRPointstruct DM_Point

Release Notes

https://www.dynamsoft.com/label-recognition/programming/c-cplusplus/release-notes

Online Documentation

https://www.dynamsoft.com/label-recognition/programming/

Sample Code

https://www.dynamsoft.com/label-recognition/code-gallery/

Try Online Demo

https://demo.dynamsoft.com/id-scanning/machine-readable-passport.html

Get a 30-day FREE Trial

https://www.dynamsoft.com/customer/license/trialLicense

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.

Subscribename@email.com