Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions programming/python/api-reference/candidate-quad-edges-unit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
layout: default-layout
title: CandidateQuadEdgesUnit Class
description: This page shows CandidateQuadEdgesUnit class definition of Dynamsoft Document Normalizer SDK Python Edition.
keywords: get_count, get_candidate_quad_edge, CandidateQuadEdgesUnit, api reference
---

# CandidateQuadEdgesUnit Class

The `CandidateQuadEdgesUnit` class represents an intermediate result unit whose type is candidate quad edges.

## Definition

*Module:* dynamsoft_document_normalizer

```python
class CandidateQuadEdgesUnit(IntermediateResultUnit)
```

*Inheritance:* [IntermediateResultUnit]({{ site.dcv_python_api }}core/intermediate-results/intermediate-result-unit.html) -> CandidateQuadEdgesUnit

## Methods

| Method | Description |
|--------|-------------|
| [`get_count`](#get_count) | Gets the count of `CandidateQuadEdge` objects in current object.|
| [`get_candidate_quad_edge`](#get_candidate_quad_edge) | Gets a `CandidateQuadEdge` object from current object by specifying a index. |
| [`remove_all_candidate_quad_edges`](#remove_all_candidate_quad_edges) | Removes all the candidate quad edges in current object. |
| [`remove_candidate_quad_edge`](#remove_candidate_quad_edge) | Removes a candidate quad edge from current object by specifying an index. |
| [`add_candidate_quad_edge`](#add_candidate_quad_edge) | Adds a candidate quad edge to current object. |
| [`set_candidate_quad_edge`](#set_candidate_quad_edge) | Sets the candidate quad edge at the specified index. |

### get_count

Gets the count of `CandidateQuadEdge` objects in current object.

```python
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.

```python
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*>: The `CandidateQuadEdge` object got by the specific index.

**See Also**

[ErrorCode]({{ site.dcv_enumerations }}core/error-code.html?lang=python)

[Edge]({{ site.dcv_python_api }}core/basic-classes/edge.html)

### remove_all_candidate_quad_edges

Removes all the candidate quad edges in current object.

```python
def remove_all_candidate_quad_edges(self) -> None:
```

### remove_candidate_quad_edge

Removes a candidate quad edge from current object by specifying an index.

```python
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.

```python
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**

[Edge]({{ site.dcv_python_api }}core/basic-classes/edge.html)

### set_candidate_quad_edge

Sets the candidate quad edge at the specified index.

```python
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**

[Edge]({{ site.dcv_python_api }}core/basic-classes/edge.html)
138 changes: 138 additions & 0 deletions programming/python/api-reference/corners-unit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
layout: default-layout
title: CornersUnit Class
description: This page shows CornersUnit class definition of Dynamsoft Document Normalizer SDK Python Edition.
keywords: get_count, get_corner, CornersUnit, api reference
---

# CornersUnit Class

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

## Definition

*Module:* dynamsoft_document_normalizer

```python
class CornersUnit(IntermediateResultUnit)
```

*Inheritance:* [IntermediateResultUnit]({{ site.dcv_python_api }}core/intermediate-results/intermediate-result-unit.html) -> CornersUnit

## Methods

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

### get_count

Gets the count of `Corner` objects in current object.

```python
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.

```python
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**

[ErrorCode]({{ site.dcv_enumerations }}core/error-code.html?lang=python)

[Corner]({{ site.dcv_python_api }}core/basic-classes/corner.html)

### remove_all_corners

Removes all the corners in current object.

```python
def remove_all_corners(self) -> None:
```

### remove_corner

Removes a corner from current object by specifying an index.

```python
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.

```python
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]({{ site.dcv_python_api }}core/basic-classes/corner.html)

### set_corner

Sets the corner at the specified index.

```python
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]({{ site.dcv_python_api }}core/basic-classes/corner.html)

47 changes: 47 additions & 0 deletions programming/python/api-reference/detected-quad-element.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: default-layout
title: DetectedQuadElement Class
description: This page shows DetectedQuadElement class definition of Dynamsoft Document Normalizer SDK Python Edition.
keywords: get_confidence_as_document_boundary, DetectedQuadElement, api reference
---

# DetectedQuadElement Class

The `DetectedQuadElement` class stores an intermediate result whose type is detected quad.

## Definition

*Module:* dynamsoft_document_normalizer

```python
class DetectedQuadElement(RegionObjectElement)
```

*Inheritance:* [RegionObjectElement]({{ site.dcv_python_api }}core/intermediate-results/region-object-element.html) -> DetectedQuadElement

## Methods

| Method | Description |
|--------|-------------|
| [`__init__`](#__init__) | Initializes a new instance of the `DetectedQuadElement` class. |
| [`get_confidence_as_document_boundary`](#get_confidence_as_document_boundary) | Gets the confidence as document boundary of current object. |

### \_\_init\_\_

Initializes a new instance of the `DetectedQuadElement` class.

```python
def __init__(self, *args, **kwargs):
```

### get_confidence_as_document_boundary

Gets the confidence as document boundary of current object.

```python
def get_confidence_as_document_boundary(self) -> int:
```

**Return Value**

The confidence as document boundary of current object.
2 changes: 1 addition & 1 deletion programming/python/api-reference/detected-quads-result.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `DetectedQuadsResult` class stores a captured result whose type is detected
*Module:* dynamsoft_document_normalizer

```python
class DetectedQuadsResult(object)
class DetectedQuadsResult
```

## Methods
Expand Down
Loading