CandidateQuadEdgesUnit Class
The CandidateQuadEdgesUnit
class represents an intermediate result unit whose type is candidate quad edges.
Definition
Module: dynamsoft_document_normalizer
class CandidateQuadEdgesUnit(IntermediateResultUnit)
Inheritance: IntermediateResultUnit -> CandidateQuadEdgesUnit
Methods
Method | Description |
---|---|
get_count |
Gets the count of CandidateQuadEdge objects in current object. |
get_candidate_quad_edge |
Gets a CandidateQuadEdge object from current object by specifying a index. |
remove_all_candidate_quad_edges |
Removes all the candidate quad edges in current object. |
remove_candidate_quad_edge |
Removes a candidate quad edge from current object by specifying an index. |
add_candidate_quad_edge |
Adds a candidate quad edge to current object. |
set_candidate_quad_edge |
Sets the candidate quad edge at the specified index. |
get_count
Gets the count of CandidateQuadEdge
objects in current object.
def get_count(self) -> int:
Return Value
The count of CandidateQuadEdge
objects in current object.
get_candidate_quad_edge
Gets a CandidateQuadEdge
object from current object by specifying a index.
def get_candidate_quad_edge(self, index: int) -> Tuple[int, Edge]:
Parameters
index
The index of the CandidateQuadEdge
object.
Return Value
Returns a tuple containing following elements:
error_code
<int>: The error code indicating the status of the operation.edge
<Edge>: TheCandidateQuadEdge
object got by the specific index.
See Also
remove_all_candidate_quad_edges
Removes all the candidate quad edges in current object.
def remove_all_candidate_quad_edges(self) -> None:
remove_candidate_quad_edge
Removes a candidate quad edge from current object by specifying an index.
def remove_candidate_quad_edge(self, index: int) -> int:
Parameters
index
The index of the candidate quad edge to be removed.
Return Value
Returns 0 if successful, otherwise returns a negative value.
add_candidate_quad_edge
Adds a candidate quad edge to current object.
def add_candidate_quad_edge(self, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
edge
The candidate quad edge 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_candidate_quad_edge
Sets the candidate quad edge at the specified index.
def set_candidate_quad_edge(self, index: int, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
index
The index of the candidate quad edge to be set.
edge
The candidate quad edge 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