Mech-DLK SDK C API 2.0.3
C API reference documentation for secondary development with Mech-DLK
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Pages
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;
69 int label;
71
75typedef struct Contour
76{
81
85typedef struct KeyPoints
86{
87 float startX;
88 float startY;
89 float endX;
90 float endY;
92
96typedef struct ResultRestoreInfo
97{
102
107{
108 int label;
112
117{
122
126typedef struct ObjectAndInsResult
127{
132
137{
142
147{
149 char* text;
150 float* confidences;
153
158{
159 double confidence;
163
167typedef struct UnsupSegResult
168{
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif
UnsupLabel
This enum defines unsupervised segmentation label.
Definition dl_definition.h:111
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
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
int label
Label of the bounding box.
Definition dl_result.h:69
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:107
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:110
float confidence
Confidence of the corresponding category.
Definition dl_result.h:109
int label
Category label.
Definition dl_result.h:108
This struct defines the information on the mask contour.
Definition dl_result.h:76
int * eachCountourPointNum
The number of points in each contour.
Definition dl_result.h:78
int contourNum
The number of contours.
Definition dl_result.h:77
int * contourPoints
Contour points.
Definition dl_result.h:79
This struct defines the defect segmentation and edge detection result.
Definition dl_result.h:117
Contour maskContour
Contour of the segmentation result.
Definition dl_result.h:118
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:120
MMindImage confidenceMat
Confidence map of the segmentation result.
Definition dl_result.h:119
This struct defines the fast positioning result.
Definition dl_result.h:137
double rotationAngle
Result of the rotation angle.
Definition dl_result.h:139
KeyPoints keyPoints
Result of keypoint detection.
Definition dl_result.h:138
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:140
This struct defines the information on fast positioning keypoints.
Definition dl_result.h:86
float endX
X-coordinate of the end point for fast positioning.
Definition dl_result.h:89
float startX
X-coordinate of the starting point for fast positioning.
Definition dl_result.h:87
float endY
Y-coordinate of the end point for fast positioning.
Definition dl_result.h:90
float startY
Y-coordinate of the starting point for fast positioning.
Definition dl_result.h:88
This struct defines Image.
Definition dl_definition.h:121
This struct defines the object detection and instance segmentation result.
Definition dl_result.h:127
Contour insMaskContour
Contour of the segmentation result.
Definition dl_result.h:129
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:130
Bbox bbox
Result of the bounding box.
Definition dl_result.h:128
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:97
int imageIndex
Index of the result with respect to the original image.
Definition dl_result.h:98
Position position
Definition dl_result.h:99
This struct defines the text detection result.
Definition dl_result.h:158
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:161
Contour textContour
Contour of text detection result.
Definition dl_result.h:160
double confidence
Confidence of text detection results.
Definition dl_result.h:159
This struct defines the text recognition result.
Definition dl_result.h:147
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:151
int textNum
The number of character recognized.
Definition dl_result.h:148
char * text
Text recognition result.
Definition dl_result.h:149
float * confidences
The confidence of each character recognized.
Definition dl_result.h:150
This struct defines the unsupervised segmentation result.
Definition dl_result.h:168
UnsupLabel label
Label of the segmentation result.
Definition dl_result.h:169
MMindImage confidenceMat
Confidence map of the segmentation result.
Definition dl_result.h:171
Contour maskContour
Contour of the segmentation result.
Definition dl_result.h:170
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:172