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.

DSRecognizedTextLineElement

The DSRecognizedTextLineElement class represents a line of recognized text in an image. It inherits from the DSRegionObjectElement class.

Definition

Assembly: DynamsoftLabelRecognizer.xcframework

  • Objective-C
  • Swift
  1. @interface DSRecognizedTextLineElement: DSRegionObjectElement
    
  2. class RecognizedTextLineElement: RegionObjectElement
    

Inheritance: DSRegionObjectElement -> DSRecognizedTextLineElement

Methods

Methods Description
getText Gets the recognized text.
setText Sets the recognized text.
getConfidence Gets the confidence level of the recognized text.
getCharacterResults Gets all the characters contained by the textline.
getRowNumber Gets the row number of the text line within the image.
getSpecificationName Get the name of the TextLineSpecification object that generated this TextLineResultItem.

getText

Gets the recognized text.

  • Objective-C
  • Swift
  1. -(NSString*)getText;
    
  2. func getText() -> String
    

Return value

Returns the text of the text line.

setText

Sets the recognized text.

  • Objective-C
  • Swift
  1. -(NSInteger)setText:(NSString *)text;
    
  2. func setText(_ text: String) -> Int
    

Parameter

text: The text.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

getConfidence

Gets the confidence level of the recognized text.

  • Objective-C
  • Swift
  1. -(NSInteger)getConfidence;
    
  2. func getConfidence() -> Int
    

Return value

Returns the confidence level of the text line.

getCharacterResults

Gets all the characters contained by the textline in an array of DSCharacterResult.

  • Objective-C
  • Swift
  1. -(NSArray<DSCharacterResult *>*)getCharacterResults;
    
  2. func getCharacterResults() -> [CharacterResult]
    

Return value

Returns all the characters contained by the textline in an array of DSCharacterResult.

getRowNumber

Gets the row number of the text line within the image.

  • Objective-C
  • Swift
  1. -(NSInteger)getRowNumber;
    
  2. func getRowNumber() -> Int
    

Return value

Returns the row number of the text line within the image.

getSpecificationName

Get the name of the TextLineSpecification object that generated this TextLineResultItem.

  • Objective-C
  • Swift
  1. -(NSString *)getSpecificationName;
    
  2. func getSpecificationName() -> String
    

Return value

The name of the TextLineSpecification object that generated this TextLineResultItem.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version (3.2.30)
  • Version 3.x
    • Version 3.0.20
  • Version 2.x
    • Version 2.2.20
    • Version 2.0.0
  • Version 1.x
    • Version 1.2.1
    • Version 1.2.0
    • Version 1.0.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support