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.

CornersUnit Class

The CornersUnit class represents an intermediate result unit whose type is corners.

Definition

Module: dynamsoft_document_normalizer

class CornersUnit(IntermediateResultUnit)

Inheritance: IntermediateResultUnit -> CornersUnit

Methods

Method Description
get_count Gets the count of Corner objects in current object.
get_corner Gets a Corner object from current object by specifying a index.
remove_all_corners Removes all the corners in current object.
remove_corner Removes a corner from current object by specifying an index.
add_corner Adds a corner to current object.
set_corner Sets the corner at the specified index.

get_count

Gets the count of Corner objects in current object.

def get_count(self) -> int:

Return Value

The count of Corner objects in current object.

get_corner

Gets a Corner object from current object by specifying a index.

def get_corner(self, index: int) -> Tuple[int, Corner]:

Parameters

index The index of the Corner object.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • corner <Corner>: The Corner object got by the specific index.

See Also

EnumErrorCode

Corner

remove_all_corners

Removes all the corners in current object.

def remove_all_corners(self) -> None:

remove_corner

Removes a corner from current object by specifying an index.

def remove_corner(self, index: int) -> int:

Parameters

index The index of the corner to be removed.

Return Value

Returns 0 if successful, otherwise returns a negative value.

add_corner

Adds a corner to current object.

def add_corner(self, corner: Corner, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:

Parameters

corner The corner 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

Corner

set_corner

Sets the corner at the specified index.

def set_corner(self, index: int, corner: Corner, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:

Parameters

index The index of the corner to be set.

corner The corner 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

Corner

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: