Skip to content

Latest commit

 

History

History
133 lines (80 loc) · 3.4 KB

File metadata and controls

133 lines (80 loc) · 3.4 KB
layout default-layout
title DetectedQuadsUnit Class
description This page shows DetectedQuadsUnit class definition of Dynamsoft Document Normalizer SDK Python Edition.
keywords get_count, get_detected_quad, DetectedQuadsUnit, api reference

DetectedQuadsUnit Class

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

Definition

Module: ddn

class DetectedQuadsUnit(IntermediateResultUnit)

Inheritance: [IntermediateResultUnit]({{ site.dcvb_python_api }}core/intermediate-results/intermediate-result-unit.html) -> 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.
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]({{ site.ddn_python_api }}detected-quad-element.html)

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]({{ site.ddn_python_api }}detected-quad-element.html)

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]({{ site.ddn_python_api }}detected-quad-element.html)