|
| 1 | +--- |
| 2 | +layout: default-layout |
| 3 | +title: CapturedResultReceiver Class - Dynamsoft Capture Vision Module Python Edition API Reference |
| 4 | +description: Definition of CapturedResultReceiver class in Dynamsoft Capture Vision Module Python Edition. |
| 5 | +keywords: captured result receiver, python |
| 6 | +needAutoGenerateSidebar: true |
| 7 | +needGenerateH3Content: true |
| 8 | +--- |
| 9 | + |
| 10 | +# CapturedResultReceiver |
| 11 | + |
| 12 | +The `CapturedResultReceiver` class is responsible for receiving captured results. It contains several callback functions for different types of results, including original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results. |
| 13 | + |
| 14 | +>Note: Subclasses inheriting from this class must ensure that the parent class constructor (`super().__init__()`) is properly called to guarantee correct initialization. |
| 15 | +
|
| 16 | +## Definition |
| 17 | + |
| 18 | +*Module:* dynamsoft_capture_vision_router |
| 19 | + |
| 20 | +```python |
| 21 | +class CapturedResultReceiver |
| 22 | +``` |
| 23 | + |
| 24 | +## Methods |
| 25 | + |
| 26 | +| Method | Description | |
| 27 | +| ----------------------------------------------------------------- | ---------------------------------------------------- | |
| 28 | +| [`on_captured_result_received`](#on_captured_result_received) | Callback function triggered after processing each image and returns all captured results. | |
| 29 | +| [`on_original_image_result_received`](#on_original_image_result_received) | Callback function triggered when start processing each image and returns the original image result. | |
| 30 | +| [`on_decoded_barcodes_received`](#on_decoded_barcodes_received) | Callback function triggered after processing each image and returns all decoded barcodes results. | |
| 31 | +| [`on_recognized_text_lines_received`](#on_recognized_text_lines_received) | Callback function triggered after processing each image and returns all recognized text lines results. | |
| 32 | +| [`on_detected_quads_received`](#on_detected_quads_received) | Callback function triggered after processing each image and returns all detected quads results. | |
| 33 | +| [`on_normalized_images_received`](#on_normalized_images_received) | Callback function triggered after processing each image and returns all normalized images results. | |
| 34 | +| [`on_parsed_results_received`](#on_parsed_results_received) | Callback function triggered after processing each image and returns all parsed results. | |
| 35 | +| [`get_name`](#get_name) | Gets the name of the captured result receiver. | |
| 36 | +| [`set_name`](#set_name) | Sets the name of the captured result receiver. | |
| 37 | + |
| 38 | +### on_captured_result_received |
| 39 | + |
| 40 | +Callback function triggered after processing each image and returns all captured results. |
| 41 | + |
| 42 | +```python |
| 43 | +def on_captured_result_received(self, result: CapturedResult) -> None: |
| 44 | +``` |
| 45 | + |
| 46 | +**Parameters** |
| 47 | + |
| 48 | +`result` The captured result. |
| 49 | + |
| 50 | +**See Also** |
| 51 | + |
| 52 | +[CapturedResult]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result.html) |
| 53 | + |
| 54 | +### on_original_image_result_received |
| 55 | + |
| 56 | +Callback function triggered when start processing each image and returns the original image result. For the callback to be triggered, it is essential that the parameter `OutputOriginalImage` is set to value `1`. |
| 57 | + |
| 58 | +```python |
| 59 | +def on_original_image_result_received(self, result: OriginalImageResultItem) -> None: |
| 60 | +``` |
| 61 | + |
| 62 | +**Parameters** |
| 63 | + |
| 64 | +`result` The original image result. |
| 65 | + |
| 66 | +**See Also** |
| 67 | + |
| 68 | +[OriginalImageResultItem]({{ site.dcvb_python_api }}core/basic-classes/original-image-result-item.html) |
| 69 | + |
| 70 | +### on_decoded_barcodes_received |
| 71 | + |
| 72 | +Callback function triggered after processing each image and returns all decoded barcodes. For the callback to be triggered, it is essential that the `BarcodeReaderTask` is properly configured. |
| 73 | + |
| 74 | +```python |
| 75 | +def on_decoded_barcodes_received(self, result: "DecodedBarcodesResult") -> None: |
| 76 | +``` |
| 77 | + |
| 78 | +**Parameters** |
| 79 | + |
| 80 | +`result` The decoded barcodes result. |
| 81 | + |
| 82 | +**See Also** |
| 83 | + |
| 84 | +[DecodedBarcodesResult]({{ site.dbr_python_api }}decoded-barcodes-result.html) |
| 85 | + |
| 86 | +### on_recognized_text_lines_received |
| 87 | + |
| 88 | +Callback function triggered after processing each image and returns all recognized text lines. For the callback to be triggered, it is essential that the `LabelRecognizerTask` is properly configured. |
| 89 | + |
| 90 | +```python |
| 91 | +def on_recognized_text_lines_received(self, result: "RecognizedTextLinesResult") -> None: |
| 92 | +``` |
| 93 | + |
| 94 | +**Parameters** |
| 95 | + |
| 96 | +`result` The recognized text lines result. |
| 97 | + |
| 98 | +**See Also** |
| 99 | + |
| 100 | +[RecognizedTextLinesResult]({{ site.dlr_python_api }}recognized-text-lines-result.html) |
| 101 | + |
| 102 | +### on_detected_quads_received |
| 103 | + |
| 104 | +Callback function triggered after processing each image and returns all detected quads. For the callback to be triggered, it is essential that the `DocumentNormalizerTask` is properly configured. |
| 105 | + |
| 106 | +```python |
| 107 | +def on_detected_quads_received(self, result: "DetectedQuadsResult") -> None: |
| 108 | +``` |
| 109 | + |
| 110 | +**Parameters** |
| 111 | + |
| 112 | +`result` The detected quads result. |
| 113 | + |
| 114 | +**See Also** |
| 115 | + |
| 116 | +[DetectedQuadsResult]({{ site.ddn_python_api }}detected-quads-result.html) |
| 117 | + |
| 118 | +### on_normalized_images_received |
| 119 | + |
| 120 | +Callback function triggered after processing each image and returns all normalized images. For the callback to be triggered, it is essential that the `DocumentNormalizerTask` is properly configured. |
| 121 | + |
| 122 | +```python |
| 123 | +def on_normalized_images_received(self, result: "NormalizedImagesResult") -> None: |
| 124 | +``` |
| 125 | + |
| 126 | +**Parameters** |
| 127 | + |
| 128 | +`result` The normalized images result. |
| 129 | + |
| 130 | +**See Also** |
| 131 | + |
| 132 | +[NormalizedImagesResult]({{ site.ddn_python_api }}normalized-images-result.html) |
| 133 | + |
| 134 | +### on_parsed_results_received |
| 135 | + |
| 136 | +Callback function triggered after processing each image and returns all parsed results. For the callback to be triggered, it is essential that the `CodeParserTask` is properly configured. |
| 137 | + |
| 138 | +```python |
| 139 | +def on_parsed_results_received(self, result: "ParsedResult") -> None: |
| 140 | +``` |
| 141 | + |
| 142 | +**Parameters** |
| 143 | + |
| 144 | +`result` The parsed result. |
| 145 | + |
| 146 | +**See Also** |
| 147 | + |
| 148 | +[ParsedResult]({{ site.dcp_python_api }}parsed-result.html) |
| 149 | + |
| 150 | +### get_name |
| 151 | + |
| 152 | +Gets the name of the captured result receiver. |
| 153 | + |
| 154 | +```python |
| 155 | +def get_name(self) -> str: |
| 156 | +``` |
| 157 | + |
| 158 | +**Return Value** |
| 159 | + |
| 160 | +Returns the name of the captured result receiver. |
| 161 | + |
| 162 | +### set_name |
| 163 | + |
| 164 | +Sets the name of the captured result receiver. |
| 165 | + |
| 166 | +```python |
| 167 | +def set_name(self, name: str) -> None: |
| 168 | +``` |
| 169 | + |
| 170 | +**Parameters** |
| 171 | + |
| 172 | +`name` The name of the captured result receiver. |
0 commit comments