|
| 1 | +--- |
| 2 | +layout: default-layout |
| 3 | +title: class CCapturedResult - Dynamsoft Capture Vision C++ Edition API Reference |
| 4 | +description: This page shows the C++ edition of the class CCapturedResult in Dynamsoft Capture Vision Router Module. |
| 5 | +keywords: captured result, c++ |
| 6 | +needAutoGenerateSidebar: true |
| 7 | +--- |
| 8 | + |
| 9 | +# CCapturedResult |
| 10 | + |
| 11 | +The CCapturedResult class represents the result of a capture operation on an image. Internally, CaptureResult stores an array that contains multiple items, each of which may be a barcode, text line, detected quad, normalized image, raw image, parsed item, etc. |
| 12 | + |
| 13 | +## Definition |
| 14 | + |
| 15 | +*Namespace:* dynamsoft::cvr |
| 16 | + |
| 17 | +*Assembly:* DynamsoftCaptureVisionRouter |
| 18 | + |
| 19 | +```cpp |
| 20 | +class CCapturedResult |
| 21 | +``` |
| 22 | +
|
| 23 | +## Methods Summary |
| 24 | +
|
| 25 | +| Method | Description | |
| 26 | +|----------------------|-------------| |
| 27 | +| [`GetOriginalImageHashId`](#getoriginalimagehashid) | Gets the hash ID of the original image.| |
| 28 | +| [`GetOriginalImageTag`](#getoriginalimagetag) | Gets the tag of the original image.| |
| 29 | +| [`GetItemsCount`](#getitemscount) | Gets the number of items in the captured result.| |
| 30 | +| [`GetItem`](#getitem) | Gets a specific item in the captured result.| |
| 31 | +| [`HasItem`](#hasitem) | Check if the item is present in the array.| |
| 32 | +| [`RemoveItem`](#removeitem) | Remove a specific item from the array in the captured result.| |
| 33 | +| [`GetRotationTransformMatrix`](#getrotationtransformmatrix) | Get the rotation transformation matrix of the original image relative to the rotated image.| |
| 34 | +| [`GetErrorCode`](#geterrorcode) | Gets the error code of the capture operation.| |
| 35 | +| [`GetErrorString`](#geterrorstring) | Gets the error message of the capture operation.| |
| 36 | +| [`operator[]`](#operator) | Gets a pointer to the [`CCapturedResultItem`]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) object at the specified index. | |
| 37 | +| [`Retain`](#retain) | Increases the reference count of the `CCapturedResult` object.| |
| 38 | +| [`Release`](#release) | Decreases the reference count of the `CCapturedResult` object.| |
| 39 | +| [`GetDecodedBarcodesResult`](#getdecodedbarcodesresult) | Gets the decoded barcode items from the `CCapturedResult`.| |
| 40 | +| [`GetRecognizedTextLinesResult`](#getrecognizedtextlinesresult) | Gets the recognized text line items from the `CCapturedResult`.| |
| 41 | +| [`GetDetectedQuadsResult`](#getdetectedquadsresult) | Gets the detected quads items from the `CCapturedResult`.| |
| 42 | +| [`GetNormalizedImagesResult`](#getnormalizedimagesresult) | Gets the normalized images items from the `CCapturedResult`.| |
| 43 | +| [`GetParsedResult`](#getparsedresult) | Gets the parsed result items from the `CCapturedResult`.| |
| 44 | +| [`AddItem`](#additem) | Add a specific item to the array in the `CCapturedResult`.| |
| 45 | +
|
| 46 | +
|
| 47 | +### GetOriginalImageHashId |
| 48 | +
|
| 49 | +Gets the hash ID of the original image. |
| 50 | +
|
| 51 | +```cpp |
| 52 | +const char* GetOriginalImageHashId() const |
| 53 | +``` |
| 54 | + |
| 55 | +**Return value** |
| 56 | + |
| 57 | +Returns the hash ID of the original image as a null-terminated string. You are not required to release the memory pointed to by the returned pointer. |
| 58 | + |
| 59 | +### GetOriginalImageTag |
| 60 | + |
| 61 | +Gets the tag of the original image. |
| 62 | + |
| 63 | +```cpp |
| 64 | +const CImageTag* GetOriginalImageTag() const |
| 65 | +``` |
| 66 | + |
| 67 | +**Return value** |
| 68 | + |
| 69 | +Returns a pointer to the `CImageTag` object containing the tag of the original image. You are not required to release the memory pointed to by the returned pointer. |
| 70 | + |
| 71 | +**See Also** |
| 72 | + |
| 73 | +[CImageTag]({{ site.dcvb_cpp_api }}core/basic-structures/image-tag.html) |
| 74 | + |
| 75 | +### GetItemsCount |
| 76 | + |
| 77 | +Gets the number of items in the captured result. |
| 78 | + |
| 79 | +```cpp |
| 80 | +int GetItemsCount() const |
| 81 | +``` |
| 82 | + |
| 83 | +**Return value** |
| 84 | + |
| 85 | +Returns the number of items in the captured result. |
| 86 | + |
| 87 | +### GetItem |
| 88 | + |
| 89 | +Gets a specific item in the captured result. |
| 90 | + |
| 91 | +```cpp |
| 92 | +const CCapturedResultItem* GetItem(int index) const |
| 93 | +``` |
| 94 | +
|
| 95 | +**Parameters** |
| 96 | +
|
| 97 | +`[in] index` The index of the item to retrieve. |
| 98 | +
|
| 99 | +**Return value** |
| 100 | +
|
| 101 | +Returns a pointer to the [`CCapturedResultItem`]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) object at the specified index. |
| 102 | +
|
| 103 | +**See Also** |
| 104 | +
|
| 105 | +[CCapturedResultItem]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) |
| 106 | +
|
| 107 | +### HasItem |
| 108 | +
|
| 109 | +Check if the item is present in the array. |
| 110 | +
|
| 111 | +```cpp |
| 112 | +bool HasItem(const CCapturedResultItem* item) const |
| 113 | +``` |
| 114 | + |
| 115 | +**Parameters** |
| 116 | + |
| 117 | +`[in] item` The specific item to check. |
| 118 | + |
| 119 | +**Return value** |
| 120 | + |
| 121 | +Returns a bool value indicating whether the item is present in the array or not. |
| 122 | + |
| 123 | +**See Also** |
| 124 | + |
| 125 | +[CCapturedResultItem]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) |
| 126 | + |
| 127 | +### RemoveItem |
| 128 | + |
| 129 | +Remove a specific item from the array in the captured result. |
| 130 | + |
| 131 | +```cpp |
| 132 | +int RemoveItem(const CCapturedResultItem* item) |
| 133 | +``` |
| 134 | +
|
| 135 | +**Parameters** |
| 136 | +
|
| 137 | +`[in] item` The specific item to remove. |
| 138 | +
|
| 139 | +**Return value** |
| 140 | +
|
| 141 | +Return value indicating whether the deletion was successful or not. |
| 142 | +
|
| 143 | +**See Also** |
| 144 | +
|
| 145 | +[CCapturedResultItem]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) |
| 146 | +
|
| 147 | +### GetRotationTransformMatrix |
| 148 | +
|
| 149 | +Get the rotation transformation matrix of the original image relative to the rotated image. |
| 150 | +
|
| 151 | +```cpp |
| 152 | +void GetRotationTransformMatrix(double matrix[9]) const; |
| 153 | +``` |
| 154 | + |
| 155 | +**Parameters** |
| 156 | + |
| 157 | +`[out] matrix` A double array which represents the rotation transform matrix. |
| 158 | + |
| 159 | +### GetErrorCode |
| 160 | + |
| 161 | +Gets the error code of the capture operation. |
| 162 | + |
| 163 | +```cpp |
| 164 | +int GetErrorCode() const |
| 165 | +``` |
| 166 | + |
| 167 | +**Return value** |
| 168 | + |
| 169 | +Returns the error code of the capture operation. |
| 170 | + |
| 171 | +**See Also** |
| 172 | + |
| 173 | +[ErrorCode]({{ site.dcvb_cpp_api }}core/enum-error-code.html?src=cpp&&lang=cpp) |
| 174 | + |
| 175 | +### GetErrorString |
| 176 | + |
| 177 | +Gets the error message of the capture operation. |
| 178 | + |
| 179 | +```cpp |
| 180 | +const char* GetErrorString() const |
| 181 | +``` |
| 182 | + |
| 183 | +**Return value** |
| 184 | + |
| 185 | +Returns the error message of the capture operation as a null-terminated string. You are not required to release the memory pointed to by the returned pointer. |
| 186 | + |
| 187 | +### operator[] |
| 188 | + |
| 189 | +Gets a pointer to the [`CCapturedResultItem`]({{ site.dcvb_cpp_api }}core/basic-structures/captured-result-item.html) object at the specified index. |
| 190 | + |
| 191 | +```cpp |
| 192 | +virtual const CCapturedResultItem* operator[](int index) const = 0; |
| 193 | +``` |
| 194 | + |
| 195 | +**Parameters** |
| 196 | + |
| 197 | +`[in] index` The index of the item to retrieve. |
| 198 | + |
| 199 | +**Return value** |
| 200 | + |
| 201 | +Returns a pointer to the CCapturedResultItem object at the specified index. |
| 202 | + |
| 203 | +### Retain |
| 204 | + |
| 205 | +Increases the reference count of the `CCapturedResult` object. |
| 206 | + |
| 207 | +```cpp |
| 208 | +virtual CCapturedResult* Retain() = 0; |
| 209 | +``` |
| 210 | + |
| 211 | +**Return value** |
| 212 | + |
| 213 | +Return an object of `CCapturedResult`. |
| 214 | + |
| 215 | +### Release |
| 216 | + |
| 217 | +Decreases the reference count of the `CCapturedResult` object. |
| 218 | + |
| 219 | +```cpp |
| 220 | +virtual void Release() = 0; |
| 221 | +``` |
| 222 | + |
| 223 | +### GetDecodedBarcodesResult |
| 224 | + |
| 225 | +Gets the decoded barcode items from the `CCapturedResult`. |
| 226 | + |
| 227 | +```cpp |
| 228 | +dbr::CDecodedBarcodesResult* GetDecodedBarcodesResult() const |
| 229 | +``` |
| 230 | + |
| 231 | +**Return value** |
| 232 | + |
| 233 | +Returns a pointer to the CDecodedBarcodesResult object containing the decoded barcode items. |
| 234 | + |
| 235 | +**Remarks** |
| 236 | + |
| 237 | +Do not forget to release the memory pointed to by the returned pointer. |
| 238 | + |
| 239 | +### GetRecognizedTextLinesResult |
| 240 | + |
| 241 | +Gets the recognized text line items from the `CCapturedResult`. |
| 242 | + |
| 243 | +```cpp |
| 244 | +dlr::CRecognizedTextLinesResult* GetRecognizedTextLinesResult() const |
| 245 | +``` |
| 246 | + |
| 247 | +**Return value** |
| 248 | + |
| 249 | +Returns a pointer to the CRecognizedTextLinesResult object containing the recognized text line items. |
| 250 | + |
| 251 | +**Remarks** |
| 252 | + |
| 253 | +Do not forget to release the memory pointed to by the returned pointer. |
| 254 | + |
| 255 | +### GetDetectedQuadsResult |
| 256 | + |
| 257 | +Gets the detected quads items from the `CCapturedResult`. |
| 258 | + |
| 259 | +```cpp |
| 260 | +ddn::CDetectedQuadsResult* GetDetectedQuadsResult() const |
| 261 | +``` |
| 262 | + |
| 263 | +**Return value** |
| 264 | + |
| 265 | +Returns a pointer to the CDetectedQuadsResult object containing the detected quads items. |
| 266 | + |
| 267 | +**Remarks** |
| 268 | + |
| 269 | +Do not forget to release the memory pointed to by the returned pointer. |
| 270 | + |
| 271 | +### GetNormalizedImagesResult |
| 272 | + |
| 273 | +Gets the normalized images items from the `CCapturedResult`. |
| 274 | + |
| 275 | +```cpp |
| 276 | +ddn::CNormalizedImagesResult* GetNormalizedImagesResult() const |
| 277 | +``` |
| 278 | + |
| 279 | +**Return value** |
| 280 | + |
| 281 | +Returns a pointer to the CNormalizedImagesResult object containing the normalized images items. |
| 282 | + |
| 283 | +**Remarks** |
| 284 | + |
| 285 | +Do not forget to release the memory pointed to by the returned pointer. |
| 286 | + |
| 287 | +### GetParsedResult |
| 288 | + |
| 289 | +Gets the parsed result items from the `CCapturedResult`. |
| 290 | + |
| 291 | +```cpp |
| 292 | +dpr::CParsedResult* GetParsedResult() const |
| 293 | +``` |
| 294 | + |
| 295 | +**Return value** |
| 296 | + |
| 297 | +Returns a pointer to the CParsedResult object containing the parsed result items. |
| 298 | + |
| 299 | +**Remarks** |
| 300 | + |
| 301 | +Do not forget to release the memory pointed to by the returned pointer. |
| 302 | + |
| 303 | +### AddItem |
| 304 | + |
| 305 | +Add a specific item to the array in the captured result. |
| 306 | + |
| 307 | +```cpp |
| 308 | +int AddItem(const CCapturedResultItem* item) |
| 309 | +``` |
| 310 | +
|
| 311 | +**Parameters** |
| 312 | +
|
| 313 | +`[in] item` The specific item to add. |
| 314 | +
|
| 315 | +**Return value** |
| 316 | +
|
| 317 | +Returns value indicating whether the addition was successful or not. |
0 commit comments