diff --git a/programming/python/api-reference/candidate-quad-edges-unit.md b/programming/python/api-reference/candidate-quad-edges-unit.md new file mode 100644 index 0000000..3e63de0 --- /dev/null +++ b/programming/python/api-reference/candidate-quad-edges-unit.md @@ -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) diff --git a/programming/python/api-reference/corners-unit.md b/programming/python/api-reference/corners-unit.md new file mode 100644 index 0000000..91f4ffd --- /dev/null +++ b/programming/python/api-reference/corners-unit.md @@ -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) + diff --git a/programming/python/api-reference/detected-quad-element.md b/programming/python/api-reference/detected-quad-element.md new file mode 100644 index 0000000..5481dee --- /dev/null +++ b/programming/python/api-reference/detected-quad-element.md @@ -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. diff --git a/programming/python/api-reference/detected-quads-result.md b/programming/python/api-reference/detected-quads-result.md index 94c9f3a..59fd2fa 100644 --- a/programming/python/api-reference/detected-quads-result.md +++ b/programming/python/api-reference/detected-quads-result.md @@ -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 diff --git a/programming/python/api-reference/detected-quads-unit.md b/programming/python/api-reference/detected-quads-unit.md new file mode 100644 index 0000000..ca01413 --- /dev/null +++ b/programming/python/api-reference/detected-quads-unit.md @@ -0,0 +1,134 @@ +--- +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:* dynamsoft_document_normalizer + +```python +class DetectedQuadsUnit(IntermediateResultUnit) +``` + +*Inheritance:* [IntermediateResultUnit]({{ site.dcv_python_api }}core/intermediate-results/intermediate-result-unit.html) -> DetectedQuadsUnit + +## Methods + +| Method | Description | +|--------|-------------| +| [`get_count`](#get_count) | Gets the count of `DetectedQuadElement` objects in current object.| +| [`get_detected_quad`](#get_detected_quad) | Gets a `DetectedQuadElement` object from current object by specifying a index. | +| [`operator[]`](#operator) | Gets a `DetectedQuadElement` object from current object by specifying a index.| +| [`remove_all_detected_quads`](#remove_all_detected_quads) | Removes all the detected quads in current object. | +| [`remove_detected_quad`](#remove_detected_quad) | Removes a detected quad from current object by specifying an index. | +| [`add_detected_quad`](#add_detected_quad) | Adds a detected quad to current object. | +| [`set_detected_quad`](#set_detected_quad) | Sets the detected quad at the specified index. | + +### get_count + +Gets the count of `DetectedQuadElement` objects in current object. + +```python +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. + +```python +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. + +```python +def remove_all_detected_quads(self) -> None: +``` + +### remove_detected_quad + +Removes a detected quad from current object by specifying an index. + +```python +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. + +```python +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. + +```python +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) diff --git a/programming/python/api-reference/document-normalizer-module.md b/programming/python/api-reference/document-normalizer-module.md index 5fef768..44eb467 100644 --- a/programming/python/api-reference/document-normalizer-module.md +++ b/programming/python/api-reference/document-normalizer-module.md @@ -16,7 +16,7 @@ The `DocumentNormalizerModule` class defines general functions in the document n *Module:* dynamsoft_document_normalizer ```python -class DocumentNormalizerModule(object) +class DocumentNormalizerModule ``` ## Methods diff --git a/programming/python/api-reference/long-lines-unit.md b/programming/python/api-reference/long-lines-unit.md new file mode 100644 index 0000000..5892bea --- /dev/null +++ b/programming/python/api-reference/long-lines-unit.md @@ -0,0 +1,129 @@ +--- +layout: default-layout +title: LongLinesUnit Class +description: This page shows LongLinesUnit class definition of Dynamsoft Document Normalizer SDK Python Edition. +keywords: get_count, get_long_line, LongLinesUnit, api reference +--- + +# LongLinesUnit Class + +The `LongLinesUnit` class represents an intermediate result unit whose type is long lines. Short line segments that are located in the same line are extended and merged to form a long line segment. + +## Definition + +*Module:* dynamsoft_document_normalizer + +```python +class LongLinesUnit(IntermediateResultUnit) +``` + +*Inheritance:* [IntermediateResultUnit]({{ site.dcv_python_api }}core/intermediate-results/intermediate-result-unit.html) -> LongLinesUnit + +## Methods + +| Method | Description | +|--------|-------------| +| [`get_count`](#get_count) | Gets the count of `LongLine` objects in current object.| +| [`get_long_line`](#get_long_line) | Gets a `LongLine` object from current object by specifying a index. | +| [`remove_all_long_lines`](#remove_all_long_lines) | Removes all the `LongLines` in current object. | +| [`remove_long_line`](#remove_long_line) | Removes a `LongLine` from current object by specifying an index. | +| [`add_long_line`](#add_long_line) | Adds a `LongLine` to current object. | +| [`set_long_line`](#set_long_line) | Sets the `LongLine` at the specified index. | + +### get_count + +Gets the count of `LongLine` objects in current object. + +```python +def get_count(self) -> int: +``` + +**Return Value** + +The count of `LongLine` objects in current object. + +### get_long_line + +Gets a `LongLine` object from current object by specifying a index. + +```python +def get_long_line(self, index: int) -> LineSegment: +``` + +**Parameters** + +`index` The index of the `LongLine` object. + +**Return Value** + +Returns the `LongLine` object. + +**See Also** + +* [LineSegment]({{ site.dcv_python_api }}core/basic-classes/line-segment.html) + +### remove_all_long_lines + +Removes all the `LongLines` in current object. + +```python +def remove_all_long_lines(self) -> None: +``` + +### remove_long_line + +Removes a `LongLine` from current object by specifying an index. + +```python +def remove_long_line(self, index: int) -> int: +``` + +**Parameters** + +`index` The index of the `LongLine` to be removed. + +**Return Value** + +Returns 0 if successful, otherwise returns a negative value. + +### add_long_line + +Adds a `LongLine` to current object. + +```python +def add_long_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: +``` + +**Parameters** + +`line` The `LongLine` 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** + +* [LineSegment]({{ site.dcv_python_api }}core/basic-classes/line-segment.html) + +### set_long_line + +Sets the `LongLine` at the specified index. + +```python +def set_long_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: +``` + +**Parameters** + +`index` The index of the `LongLine` to be set. + +`line` the `LongLine` to be set. + +`matrix_to_original_image` The matrix to the original image. + +**Return Value** + +Returns 0 if successful, otherwise returns a negative value. diff --git a/programming/python/api-reference/normalized-image-element.md b/programming/python/api-reference/normalized-image-element.md new file mode 100644 index 0000000..c86d71c --- /dev/null +++ b/programming/python/api-reference/normalized-image-element.md @@ -0,0 +1,50 @@ +--- +layout: default-layout +title: NormalizedImageElement Class +description: This page shows NormalizedImageElement class definition of Dynamsoft Document Normalizer SDK Python Edition. +keywords: get_image_data, GetReferencedElement, NormalizedImageElement, api reference +--- + +# NormalizedImageElement Class + +The `NormalizedImageElement` class stores an intermediate result whose type is normalized image. + +## Definition + +*Module:* dynamsoft_document_normalizer + +```python +class NormalizedImageElement(RegionObjectElement) +``` + +*Inheritance:* [RegionObjectElement]({{ site.dcv_python_api }}core/intermediate-results/region-object-element.html) -> NormalizedImageElement +## Methods + +| Method | Description | +|--------|-------------| +| [`__init__`](#__init__) | Initializes a new instance of the `NormalizedImageElement` class. | +| [`get_image_data`](#get_image_data) | Gets the ImageData of current object. | + +### \_\_init\_\_ + +Initializes a new instance of the `NormalizedImageElement` class. + +```python +def __init__(self, *args, **kwargs): +``` + +### get_image_data + +Gets the image data of current object. + +```python +def get_image_data(self) -> ImageData: +``` + +**Return Value** + +The image data. + +**See Also** + +* [ImageData]({{ site.dcv_python_api }}core/basic-classes/image-data.html) diff --git a/programming/python/api-reference/normalized-image-unit.md b/programming/python/api-reference/normalized-image-unit.md new file mode 100644 index 0000000..ed8b1f0 --- /dev/null +++ b/programming/python/api-reference/normalized-image-unit.md @@ -0,0 +1,92 @@ +--- +layout: default-layout +title: NormalizedImagesUnit Class +description: This page shows NormalizedImagesUnit class definition of Dynamsoft Document Normalizer SDK Python Edition. +keywords: get_normalized_image, NormalizedImagesUnit, api reference +--- + +# NormalizedImagesUnit Class + +The `NormalizedImagesUnit` class represents an intermediate result unit whose type is normalized images. + +## Definition + +*Module:* dynamsoft_document_normalizer + +```python +class NormalizedImagesUnit(IntermediateResultUnit) +``` + +*Inheritance:* [IntermediateResultUnit]({{ site.dcv_python_api }}core/intermediate-results/intermediate-result-unit.html) -> NormalizedImagesUnit + +## Methods + +| Method | Description | +|--------|-------------| +| [`get_count`](#get_count) | Gets the count of `NormalizedImageElement` objects in current object. | +| [`get_normalized_image`](#get_normalized_image) | Gets a `NormalizedImageElement` object from current object. | +| [`operator[]`](#operator) | Gets a `NormalizedImageElement` object from current object by specifying a index. | +| [`remove_all_normalized_images`](#remove_all_normalized_images) | Removes all the normalized images in current object. | +| [`set_normalized_image`](#set_normalized_image) | Sets the normalized image. | + +### get_count + +Gets the count of `NormalizedImageElement` objects in current object. + +```python +def get_count(self) -> int: +``` + +**Return Value** + +The count of `NormalizedImageElement` objects in current object. + +### get_normalized_image + +Gets a `NormalizedImageElement` object from current object. + +```python +def get_normalized_image(self, index: int) -> NormalizedImageElement: +``` + +**Parameters** + +`index` The index of the `NormalizedImageElement` object. + +**Return Value** + +Returns the `NormalizedImageElement` object. + +**See Also** + +[NormalizedImageElement]({{ site.ddn_python_api }}normalized-image-element.html) + +### remove_all_normalized_images + +Removes all the normalized images in current object. + +```python +def remove_all_normalized_images(self) -> None: +``` + +### set_normalized_image + +Sets the normalized image. + +```python +def set_normalized_image(self, element: NormalizedImageElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: +``` + +**Parameters** + +`element` The normalized image to be set. + +`matrix_to_original_image` The matrix to original image. + +**Return value** + +Returns 0 if successful, otherwise returns a negative value. + +**See Also** + +[NormalizedImageElement]({{ site.ddn_python_api }}normalized-image-element.html) diff --git a/programming/python/api-reference/normalized-images-result.md b/programming/python/api-reference/normalized-images-result.md index 03a2b5c..94deb80 100644 --- a/programming/python/api-reference/normalized-images-result.md +++ b/programming/python/api-reference/normalized-images-result.md @@ -14,7 +14,7 @@ The NormalizedImagesResult class stores a collection of captured result items wh *Module:* dynamsoft_document_normalizer ```python -class NormalizedImagesResult(object) +class NormalizedImagesResult ``` ## Methods diff --git a/programming/python/api-reference/simplified-document-normalizer-settings.md b/programming/python/api-reference/simplified-document-normalizer-settings.md index d7b483b..e116550 100644 --- a/programming/python/api-reference/simplified-document-normalizer-settings.md +++ b/programming/python/api-reference/simplified-document-normalizer-settings.md @@ -12,7 +12,7 @@ needGenerateH3Content: true The `SimplifiedDocumentNormalizerSettings` class contains settings for document normalization. It is a sub-parameter of `SimplifiedCaptureVisionSettings` ```python -class SimplifiedDocumentNormalizerSettings(object) +class SimplifiedDocumentNormalizerSettings ``` ## Properties Summary diff --git a/programming/python/user-guide/getting-started.md b/programming/python/user-guide/getting-started.md index 96f57af..41f796e 100644 --- a/programming/python/user-guide/getting-started.md +++ b/programming/python/user-guide/getting-started.md @@ -196,7 +196,7 @@ fetcher.set_directory("[THE DIRECTORY THAT HOLDS THE IMAGES]") Create a class `MyCapturedResultReceiver` to implement the `CapturedResultReceiver` class, and get the barocde results in `on_normalized_images_received` callback function. ```python -class MyCapturedResultReceiver : CapturedResultReceiver +class MyCapturedResultReceiver(CapturedResultReceiver) { public override void on_normalized_images_received(NormalizedImagesResult result) { @@ -239,7 +239,7 @@ class MyCapturedResultReceiver : CapturedResultReceiver Create a class `MyImageSourceStateListener` to implement the `ImageSourceStateListener` class, and call stop_capturing in `on_image_source_state_received` callback function when the state is `ISS_EXHAUSTED`. ```python -class MyImageSourceStateListener : ImageSourceStateListener +class MyImageSourceStateListener(ImageSourceStateListener) { private CaptureVisionRouter? cvr = null public MyImageSourceStateListener(CaptureVisionRouter cvr)