Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
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.

iOS 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.

recognizeByBuffer

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

- (NSArray<iDLRResult*>*)recognizeByBuffer:(iDLRImageData*)imageData templateName:(NSString*)templateName error:(NSError**)error

Parameters [in] imageData An object of iDLRImageData 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. [in,out] error Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

Return Value All results recognized successfully.

Code Snippet

  • Objective-C
  • Swift
  1. DynamsoftLabelRecognition *recognizer;
    iDMLTSConnectionParameters* lts = [[iDMLTSConnectionParameters alloc] init];
    lts.organizationID = @"200001";
    lts.sessionPassword = @"******";
    recognizer = [[DynamsoftLabelRecognition alloc] initLicenseFromLTS:lts verificationDelegate:self];
    - (void)LTSLicenseVerificationCallback:(bool)isSuccess error:(NSError * )error
    {
    //TODO add your code for license verification
    }
    iDLRResult *result;
    iDLRImageData *imageData = [[iDLRImageData alloc] init];
    //construct imageData
    NSError __autoreleasing *  error;
    result = [recognizer recognizeByBuffer:imageData templateName:@"" error:&error];
    
  2. let lts = iDMLTSConnectionParameters()
    lts.organizationID = "200001"
    lts.sessionPassword = "******"
    let recognizer = DynamsoftLabelRecognition(licenseFromLTS: lts, verificationDelegate: self)
    let imageData = iDLRImageData.init()
    let error: NSError? = NSError()
    //construct imageData
    let result = recognizer.recognizeByBuffer(imageData:imageData, templateName:"", error:&error)
    

 

recognizeByFile

Recognizes text from a specified image file.

- (NSArray<iDLRResult*>*)recognizeByFile:(NSString*)name templateName:(NSString*)templateName error:(NSError**)error

Parameters name A string defining the file name.
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. [in,out] error Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

Return Value All results recognized successfully.

Code Snippet

  • Objective-C
  • Swift
  1. DynamsoftLabelRecognition *recognizer;
    iDMLTSConnectionParameters* lts = [[iDMLTSConnectionParameters alloc] init];
    lts.organizationID = @"200001";
    lts.sessionPassword = @"******";
    recognizer = [[DynamsoftLabelRecognition alloc] initLicenseFromLTS:lts verificationDelegate:self];
    - (void)LTSLicenseVerificationCallback:(bool)isSuccess error:(NSError * )error
    {
    //TODO add your code for license verification
    }
    iDLRResult *result;
    NSError __autoreleasing *  error;
    result = [recognizer recognizeByFile:@"your file path" templateName:@"" error:&error];
    
  2. let lts = iDMLTSConnectionParameters()
    lts.organizationID = "200001"
    lts.sessionPassword = "******"
    let recognizer = DynamsoftLabelRecognition(licenseFromLTS: lts, verificationDelegate: self)
    let error: NSError? = NSError()
    //construct imageData
    let result = recognizer.recognizeByFile("your file path", templateName:"", error:&error)
    

 

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 2.2.20
  • Version 2.2.11
  • Version 2.2.10
  • Version 2.2.0
  • Version 2.0.0
  • Version 1.2.1
  • Version 1.2
  • Version 1.0
Change +
© 2003–2023 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support