Documentation
Table of contents

This documentation is deprecated. It applies only to legacy version 2.x of Capture Vision and must not be used for new development.

Please refer to the latest documentation and Migration Guide, which supersede this content.

RawTextLine

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

  • RTLS_LOCALIZED: Localized but recognition not performed.
  • RTLS_RECOGNITION_FAILED: Recognition failed.
  • RTLS_RECOGNITION_SUCCEEDED: Successfully recognized.

Definition

Module: dynamsoft_label_recognizer

class RawTextLine

Methods

Method Description
__init__ Initializes a new instance of the RawTextLine class.
get_text Gets the recognized text.
get_confidence Gets the confidence level of the recognized text.
get_character_results_count Gets the number of individual character recognition results in the line.
get_character_result Gets the character recognition result at the specified index.
get_location Gets the location of the text line.
get_row_number Gets the row number of the text line within the image.
get_specification_name Gets the name of the text line specification that generated this element.
get_status Gets the status of the text line.
set_text Sets the recognized text.
set_location Sets the location of the text line.
set_row_number Sets the row number of the text line within the image.
set_specification_name Sets the name of the text line specification that generated this element.
clone Clones the RawTextLine object.

__init__

Initializes a new instance of the RawTextLine class.

def __init__(self, *args, **kwargs):

get_text

Gets the recognized text.

def get_text(self) -> str:

Return value

Returns the recognized text.

get_confidence

Gets the confidence level of the recognized text.

def get_confidence(self) -> int:

Return value

Returns an integer value representing the confidence level of the recognized text.

get_character_results_count

Gets the number of individual character recognition results in the line.

def get_character_results_count(self) -> int:

Return value

Returns an integer value representing the number of individual character recognition results.

get_character_result

Gets the character recognition result at the specified index.

def get_character_result(self, index: int) -> CharacterResult:

Parameters

index The index of the character recognition result to retrieve.

Return value

Returns the character recognition result.

See Also

CharacterResult

get_location

Gets the location of the text line.

def get_location(self) -> Quadrilateral:

Return value

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

See Also

Quadrilateral

get_row_number

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

def get_row_number(self) -> int:

Return value

Returns an integer value representing the row number of the text line within the image.

get_specification_name

Gets the name of the text line specification that generated this element.

def get_specification_name(self) -> str:

Return value

Returns the name of the text line specification.

get_status

Gets the status of the text line.

def get_status(self) -> int:

Return value

Returns the status of the text line. This is one of the values of the EnumRawTextLineStatus enumeration.

See also

EnumRawTextLineStatus

set_text

Sets the recognized text.

def set_text(self, text: str) -> None:

Parameters

text The text to be set.

set_location

Sets the location of the text line.

def set_location(self, location: Quadrilateral) -> int:

Parameters

location The location of the text line.

Return value

Returns 0 if successful; otherwise returns an error code.

See Also

Quadrilateral

set_row_number

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

def set_row_number(self, row_number: int) -> int:

Parameters

row_number The row number of the text line within the image.

Return value

Returns 0 if successful; otherwise returns an error code.

set_specification_name

Sets the name of the text line specification that generated this element.

def set_specification_name(self, specification_name: str) -> int:

Parameters

specification_name The name of the text line specification.

Return value

Returns 0 if successful; otherwise returns an error code.

clone

Clones the RawTextLine object.

def clone(self) -> "RawTextLine":

Return value

Returns the cloned RawTextLine object.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: