Table of contents

DetectedQuadsUnit Class

The DetectedQuadsUnit class represents an intermediate result unit whose type is detected quads.

Definition

Module: dynamsoft_document_normalizer

class DetectedQuadsUnit(IntermediateResultUnit)

Inheritance: IntermediateResultUnit -> DetectedQuadsUnit

Methods

Method Description
get_count Gets the count of DetectedQuadElement objects in current object.
get_detected_quad Gets a DetectedQuadElement object from current object by specifying a index.
operator[] Gets a DetectedQuadElement object from current object by specifying a index.
remove_all_detected_quads Removes all the detected quads in current object.
remove_detected_quad Removes a detected quad from current object by specifying an index.
add_detected_quad Adds a detected quad to current object.
set_detected_quad Sets the detected quad at the specified index.

get_count

Gets the count of DetectedQuadElement objects in current object.

def get_count(self) -> int:

Return Value

The count of DetectedQuadElement objects in current object.

get_detected_quad

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

def get_detected_quad(self, index: int) -> DetectedQuadElement:

Parameters

index The index of the DetectedQuadElement object.

Return Value

Returns the DetectedQuadElement object got by the specific index.

See Also

DetectedQuadElement

remove_all_detected_quads

Removes all the DetectedQuads in current object.

def remove_all_detected_quads(self) -> None:

remove_detected_quad

Removes a detected quad from current object by specifying an index.

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

Parameters

index The index of the detected quad to be removed.

Return Value

Returns 0 if successful, otherwise returns a negative value.

add_detected_quad

Adds a DetectedQuadElement object to current object.

def add_detected_quad(self, element: DetectedQuadElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:

Parameters

element The detected quad 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

DetectedQuadElement

set_detected_quad

Sets the DetectedQuad at the specified index.

def set_detected_quad(self, index: int, element: DetectedQuadElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:

Parameters

index The index of the detected quad to be set.

element The detected quad 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

DetectedQuadElement

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: