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
@interface DSRecognizedTextLineElement: DSRegionObjectElement
class RecognizedTextLineElement: RegionObjectElement
Inheritance: DSRegionObjectElement -> DSRecognizedTextLineElement
Methods
Methods | Description |
---|---|
getText |
Returns the recognized text. |
setText |
Sets the recognized text. |
getRawText |
Returns the recognized raw text, excluding any concatenation separators. |
getConfidence |
Returns the confidence level of the recognized text. |
getCharacterResults |
Returns all the characters contained by the textline. |
getRowNumber |
Returns the row number of the text line within the image. |
getSpecificationName |
Returns the name of the TextLineSpecification object that generated this TextLineResultItem . |
getText
Returns the recognized text.
- Objective-C
- Swift
-(NSString*)getText;
func getText() -> String
Return value
Returns the text of the text line.
setText
Sets the recognized text.
- Objective-C
- Swift
-(NSInteger)setText:(NSString *)text;
func setText(_ text: String) -> Int
Parameter
text
: The text.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getRawText
Returns the recognized raw text, excluding any concatenation separators.
- Objective-C
- Swift
-(NSString*)getRawText;
func getRawText() -> String
Return value
The recognized raw text, excluding any concatenation separators.
getConfidence
Returns the confidence level of the recognized text.
- Objective-C
- Swift
-(NSInteger)getConfidence;
func getConfidence() -> Int
Return value
Returns the confidence level of the text line.
getCharacterResults
Returns all the characters contained by the textline in an array of DSCharacterResult
.
- Objective-C
- Swift
-(nullable NSArray<DSCharacterResult *>*)getCharacterResults;
func getCharacterResults() -> [CharacterResult]
Return value
Returns all the characters contained by the textline in an array of DSCharacterResult
.
getRowNumber
Returns the row number of the text line within the image.
- Objective-C
- Swift
-(NSInteger)getRowNumber;
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
-(NSString *)getSpecificationName;
func getSpecificationName() -> String
Return value
The name of the TextLineSpecification
object that generated this TextLineResultItem
.