×
MENU
Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognition Package!

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

C++ API Reference - Recognizing

Method Description
RecognizeByBuffer Recognizes text from memory buffer containing image pixels in defined format.
RecognizeByFile Recognizes text from a specified image file.
RecognizeBasedOnDBRResultsByBuffer Recognizes text from memory buffer containing image pixels in defined format according to barcode results from DBR SDK.
RecognizeBasedOnDBRResultsByFile Recognizes text from a specified image file according to barcode results from DBR SDK.

RecognizeByBuffer

Recognizes text from the memory buffer containing image pixels in defined format.

int dynamsoft::dlr::CLabelRecognition::RecognizeByBuffer(const DLRImageData* imageData, const char* templateName)

Parameters

[in] imageData A struct of DLRImageData that represents an image.
[in] templateName The template name.

Return value

Returns error code (returns 0 if the function operates successfully).
You can call GetErrorString to get detailed error message.

Code Snippet

CLabelRecognition* recognizer = new CLabelRecognition();
recognizer->InitLicense("t0260NwAAAHV***************");
//Generate imageData from somewhere else
int errorCode = recognizer->RecognizeByBuffer(imageData, "");
delete recognizer;

 

RecognizeByFile

Recognizes text from a specified image file.

int dynamsoft::dlr::CLabelRecognition::RecognizeByFile (const char* fileName, const char* templateName)	

Parameters

[in] fileName A string defining the file name.
[in] templateName The template name.

Return value

Returns error code (returns 0 if the function operates successfully).
You can call GetErrorString to get detailed error message.

Code Snippet

CLabelRecognition* recognizer = new CLabelRecognition();
recognizer->InitLicense("t0260NwAAAHV***************");
int errorCode = recognizer->RecognizeByFile("C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
delete recognizer;

 

RecognizeBasedOnDBRResultsByBuffer

Recognizes text from memory buffer containing image pixels in defined format according to barcode results from DBR SDK.

int dynamsoft::dlr::CLabelRecognition::RecognizeBasedOnDBRResultsByBuffer(const DLRImageData* imageData, TextResultArray* DBRTextResultArray)

Parameters

[in] imageData A struct of DLRImageData that represents an image.
[in] DBRTextResultArray Barcode Text result array returned by Dynamsoft Barcode Reader SDK.

Return value

Returns error code (returns 0 if the function operates successfully).
You can call GetErrorString to get detailed error message.

 

RecognizeBasedOnDBRResultsByFile

Recognizes text from a specified image file according to barcode results from DBR SDK.

int dynamsoft::dlr::CLabelRecognition::RecognizeBasedOnDBRResultsByFile (const char* fileName, TextResultArray* DBRTextResultArray)	

Parameters

[in] fileName A string defining the file name.
[in] DBRTextResultArray Barcode Text result array returned by Dynamsoft Barcode Reader SDK.

Return value

Returns error code (returns 0 if the function operates successfully).
You can call GetErrorString to get detailed error message.

 

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    Change +
    © 2003–2020 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support