LongLinesUnit Class
The LongLinesUnit class represents an intermediate result unit whose type is long lines. Short line segments that are located in the same line are extended and merged to form a long line segment.
Definition
Module: dynamsoft_document_normalizer
class LongLinesUnit(IntermediateResultUnit)
Inheritance: IntermediateResultUnit -> LongLinesUnit
Methods
| Method | Description |
|---|---|
get_count |
Gets the count of LongLine objects in current object. |
get_long_line |
Gets a LongLine object from current object by specifying a index. |
remove_all_long_lines |
Removes all the LongLines in current object. |
remove_long_line |
Removes a LongLine from current object by specifying an index. |
add_long_line |
Adds a LongLine to current object. |
set_long_line |
Sets the LongLine at the specified index. |
get_count
Gets the count of LongLine objects in current object.
def get_count(self) -> int:
Return Value
The count of LongLine objects in current object.
get_long_line
Gets a LongLine object from current object by specifying a index.
def get_long_line(self, index: int) -> LineSegment:
Parameters
index The index of the LongLine object.
Return Value
Returns the LongLine object.
See Also
remove_all_long_lines
Removes all the LongLines in current object.
def remove_all_long_lines(self) -> None:
remove_long_line
Removes a LongLine from current object by specifying an index.
def remove_long_line(self, index: int) -> int:
Parameters
index The index of the LongLine to be removed.
Return Value
Returns 0 if successful, otherwise returns a negative value.
add_long_line
Adds a LongLine to current object.
def add_long_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
line The LongLine to be added.
matrix_to_original_image The matrix to the original image.
Return Value
Returns 0 if successful, otherwise returns a negative value.
See Also
set_long_line
Sets the LongLine at the specified index.
def set_long_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
index The index of the LongLine to be set.
line the LongLine to be set.
matrix_to_original_image The matrix to the original image.
Return Value
Returns 0 if successful, otherwise returns a negative value.