Mech-DLK SDK C API 2.1.1
C API reference documentation for secondary development with Mech-DLK
Loading...
Searching...
No Matches
dl_result.h
Go to the documentation of this file.
1/*******************************************************************************
2 *BSD 3-Clause License
3 *
4 *Copyright (c) 2016-2023, Mech-Mind Robotics
5 *All rights reserved.
6 *
7 *Redistribution and use in source and binary forms, with or without
8 *modification, are permitted provided that the following conditions are met:
9 *
10 *1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 *2. Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 *
17 *3. Neither the name of the copyright holder nor the names of its
18 * contributors may be used to endorse or promote products derived from
19 * this software without specific prior written permission.
20 *
21 *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 *DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 *DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 *SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 *CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 *OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 *OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ******************************************************************************/
32
33#ifndef DL_RESULT
34#define DL_RESULT
35#include "dl_definition.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
45typedef struct Position
46{
47 float x;
48 float y;
50
54typedef struct Point
55{
56 int x;
57 int y;
62typedef struct Bbox
63{
64 float upperLeftX;
65 float upperLeftY;
68 float confidence;
70 char* labelName;
72
76typedef struct Contour
77{
82
86typedef struct
87{
88 char** strings;
89 int count;
92
96typedef struct ContourWithLabel
97{
103
107typedef struct ResultRestoreInfo
108{
113
118{
120 char* labelName;
124
129{
133
137typedef struct ObjectAndInsResult
138{
143
148{
153
158{
160 char* text;
161 float* confidences;
164
169{
170 double confidence;
174
178typedef struct UnsupSegResult
179{
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif
UnsupLabel
This enum defines unsupervised segmentation label.
Definition dl_definition.h:113
This struct defines the information on the bounding box.
Definition dl_result.h:63
float lowerRightY
Y-coordinate of the lower-right corner.
Definition dl_result.h:67
int labelIndex
Label index of the bounding box.
Definition dl_result.h:69
float upperLeftY
Y-coordinate of the upper-left corner.
Definition dl_result.h:65
float lowerRightX
X-coordinate of the lower-right corner.
Definition dl_result.h:66
char * labelName
Label name of the bounding box.
Definition dl_result.h:70
float confidence
Confidence of the bounding box.
Definition dl_result.h:68
float upperLeftX
X-coordinate of the upper-left corner.
Definition dl_result.h:64
This struct defines the classification result.
Definition dl_result.h:118
char * labelName
Category label name.
Definition dl_result.h:120
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:122
int labelIndex
Category label index.
Definition dl_result.h:119
float confidence
Confidence of the corresponding category.
Definition dl_result.h:121
This struct defines the information on the mask contour.
Definition dl_result.h:77
int * eachCountourPointNum
The number of points in each contour.
Definition dl_result.h:79
int contourNum
The number of contours.
Definition dl_result.h:78
int * contourPoints
Contour points.
Definition dl_result.h:80
This struct defines the information on the mask contour and the label names of the mask contours.
Definition dl_result.h:97
int * eachCountourPointNum
The number of points in each contour.
Definition dl_result.h:99
StringArray labelNames
The label names of contours.
Definition dl_result.h:101
int contourNum
The number of contours.
Definition dl_result.h:98
int * contourPoints
Contour points.
Definition dl_result.h:100
This struct defines the defect segmentation and edge detection result.
Definition dl_result.h:129
ContourWithLabel maskContour
Contour of the segmentation result.
Definition dl_result.h:130
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:131
This struct defines the fast positioning result.
Definition dl_result.h:148
double rotationAngle
Result of the rotation angle.
Definition dl_result.h:150
Point rotationCenterPoint
Result of the rotation center point.
Definition dl_result.h:149
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:151
This struct defines Image.
Definition dl_definition.h:123
This struct defines the object detection and instance segmentation result.
Definition dl_result.h:138
Contour insMaskContour
Contour of the segmentation result.
Definition dl_result.h:140
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:141
Bbox bbox
Result of the bounding box.
Definition dl_result.h:139
This struct defines the information on contour points.
Definition dl_result.h:55
int y
The y-coordinate of the contour point.
Definition dl_result.h:57
int x
The x-coordinate of the contour point.
Definition dl_result.h:56
This struct defines that the position of the result is relative to the upper-left corner of the origi...
Definition dl_result.h:46
float y
The y-coordinate of the result is relative to the upper-left corner of the original image.
Definition dl_result.h:48
float x
The x-coordinate of the result is relative to the upper-left corner of the original image.
Definition dl_result.h:47
This struct defines the information required to recover the result to the original image.
Definition dl_result.h:108
int imageIndex
Index of the result with respect to the original image.
Definition dl_result.h:109
Position position
Definition dl_result.h:110
This struct defines the data format for storing multiple strings.
Definition dl_result.h:87
int count
The current number of array.
Definition dl_result.h:89
char ** strings
The dynamic string array.
Definition dl_result.h:88
int capacity
The capacity of array.
Definition dl_result.h:90
This struct defines the text detection result.
Definition dl_result.h:169
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:172
Contour textContour
Contour of text detection result.
Definition dl_result.h:171
double confidence
Confidence of text detection results.
Definition dl_result.h:170
This struct defines the text recognition result.
Definition dl_result.h:158
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:162
int textNum
The number of character recognized.
Definition dl_result.h:159
char * text
Text recognition result.
Definition dl_result.h:160
float * confidences
The confidence of each character recognized.
Definition dl_result.h:161
This struct defines the unsupervised segmentation result.
Definition dl_result.h:179
UnsupLabel label
Label of the segmentation result.
Definition dl_result.h:180
MMindImage confidenceMat
Confidence map of the segmentation result.
Definition dl_result.h:182
Contour maskContour
Contour of the segmentation result.
Definition dl_result.h:181
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:183