Thanks for downloading Dynamsoft Label Recognizer Package!
Your download will start shortly. If your download does not begin, click here to retry.
C API Reference - Recognizing
Method | Description |
---|---|
DLR_RecognizeByBuffer |
Recognizes text from memory buffer containing image pixels in defined format. |
DLR_RecognizeByFile |
Recognizes text from a specified image file. |
DLR_RecognizeByBuffer
Recognizes text from the memory buffer containing image pixels in defined format.
DLR_API int DLR_RecognizeByBuffer(void* recognizer, const DLRImageData* imageData, const char* templateName)
Parameters
[in] recognizer
Handle of the label recognition instance.
[in] imageData
A struct of DLRImageData
that represents an image.
[in] templateName
The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used.
Return Value
Returns error code (returns 0 if the function operates successfully).
You can call DLR_GetErrorString
to get detailed error message.
Code Snippet
void* recognizer = DLR_CreateInstance();
DLR_InitLicense(recognizer, "t0260NwAAAHV***************");
//Generate imageData from somewhere else
int errorCode = DLR_RecognizeByBuffer(recognizer, imageData, "");
DLR_DestroyInstance(recognizer);
DLR_RecognizeByFile
Recognizes text from a specified image file.
DLR_API int DLR_RecognizeByFile (void* recognizer, const char* fileName, const char* templateName)
Parameters
[in] recognizer
Handle of the label recognition instance.
[in] fileName
A string defining the file name.
[in] templateName
The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used.
Return Value
Returns error code (returns 0 if the function operates successfully).
You can call DLR_GetErrorString
to get detailed error message.
Code Snippet
void* recognizer = DLR_CreateInstance();
DLR_InitLicense(recognizer, "t0260NwAAAHV***************");
int errorCode = DLR_RecognizeByFile(recognizer, "C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
DLR_DestroyInstance(recognizer);