Documentation
Table of contents

RawTextLine

The RawTextLine class represents a text line in an image. It can be in one of the following states:

  • TLS_LOCALIZED: Localized but recognition not performed.
  • TLS_RECOGNITION_FAILED: Recognition failed.
  • TLS_RECOGNIZED_SUCCESSFULLY: Successfully recognized.

Definition

Namespace: com.dynamsoft.dlr

Assembly: DynamsoftLabelRecognizer.aar

class RawTextLine

Methods

Methods Description
getText Returns the recognized text.
setText Sets the recognized text.
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.
setRowNumber Sets the row number of the text line within the image.
getSpecificationName Get the name of the TextLineSpecification object that generated this TextLineResultItem.
setSpecificationName Sets the name of the TextLineSpecification object that generated this TextLineResultItem.
getLocation Returns the location of the text line.
setLocation Sets the location of the text line.

getText

Returns the recognized text.

String getText();

Return value

Returns the text of the text line.

setText

Returns the recognized text.

void setText(string text);

Parameter

text: The text.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

getConfidence

Returns the confidence level of the recognized text.

int getConfidence();

Return value

Returns the confidence level of the text line.

getCharacterResults

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

CharacterResult[] getCharacterResults();

Return value

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

getRowNumber

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

int getRowNumber();

Return value

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

setRowNumber

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

int setRowNumber(int rowNumber);

Parameter

rowNumber: The row number of the text line within the image.

Return value

Returns 0 if success, otherwise an error code.

getSpecificationName

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

String getSpecificationName();

Return value

The name of the TextLineSpecification object that generated this TextLineResultItem.

setSpecificationName

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

int setSpecificationName(String specificationName);

Parameter

specificationName: The name of the TextLineSpecification object that generated this TextLineResultItem.

Return value

Returns 0 if success, otherwise an error code.

getLocation

Returns a Quadrilateral object which represents the location of the text line.

Quadrilateral getLocation();

Return value

A Quadrilateral object which represents the location of the text line.

setLocation

Set the location of the text line.

int setLocation(Quadrilateral location);

Parameter

location: The location of the text line.

Return value

Returns 0 if success, otherwise an error code.

getStatus

Returns the status of the text line.

RawTextLineStatus getStatus();

Return value

The status of the text line.

Is this page helpful?

YesYes NoNo

In this article: