| 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 |
The DetectedQuadsUnit class represents an intermediate result unit whose type is detected quads.
Module: ddn
class DetectedQuadsUnit(IntermediateResultUnit)Inheritance: [IntermediateResultUnit]({{ site.dcvb_python_api }}core/intermediate-results/intermediate-result-unit.html) -> DetectedQuadsUnit
| 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. |
Gets the count of DetectedQuadElement objects in current object.
def get_count(self) -> int:Return Value
The count of DetectedQuadElement objects in current object.
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)
Removes all the DetectedQuads in current object.
def remove_all_detected_quads(self) -> None: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.
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)
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)