Mech-DLK SDK C API 2.0.2
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;
49 float y;
52
56typedef struct Bbox
57{
58 float upperLeftX;
59 float upperLeftY;
62 float confidence;
63 int label;
65
69typedef struct Contour
70{
75
79typedef struct KeyPoints
80{
81 float startX;
82 float startY;
83 float endX;
84 float endY;
86
90typedef struct ResultRestoreInfo
91{
96
101{
102 int label;
106
111{
116
120typedef struct ObjectAndInsResult
121{
126
131{
136
137#ifdef __cplusplus
138}
139#endif
140
141#endif
This struct defines the information on the bounding box.
Definition dl_result.h:57
float lowerRightY
Y-coordinate of the lower-right corner.
Definition dl_result.h:61
float upperLeftY
Y-coordinate of the upper-left corner.
Definition dl_result.h:59
float lowerRightX
X-coordinate of the lower-right corner.
Definition dl_result.h:60
int label
Label of the bounding box.
Definition dl_result.h:63
float confidence
Confidence of the bounding box.
Definition dl_result.h:62
float upperLeftX
X-coordinate of the upper-left corner.
Definition dl_result.h:58
This struct defines the classification result.
Definition dl_result.h:101
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:104
float confidence
Confidence of the corresponding category.
Definition dl_result.h:103
int label
Category label.
Definition dl_result.h:102
This struct defines the information on the mask contour.
Definition dl_result.h:70
int * eachCountourPointNum
The number of points in each contour.
Definition dl_result.h:72
int contourNum
The number of contours.
Definition dl_result.h:71
int * contourPoints
Contour points.
Definition dl_result.h:73
This struct defines the defect segmentation and edge detection result.
Definition dl_result.h:111
Contour maskContour
Contour of the segmentation result.
Definition dl_result.h:112
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:114
MMindImage confidenceMat
Confidence map of the segmentation result.
Definition dl_result.h:113
This struct defines the fast positioning result.
Definition dl_result.h:131
double rotationAngle
Result of the rotation angle.
Definition dl_result.h:133
KeyPoints keyPoints
Result of keypoint detection.
Definition dl_result.h:132
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:134
This struct defines the information on fast positioning keypoints.
Definition dl_result.h:80
float endX
X-coordinate of the end point for fast positioning.
Definition dl_result.h:83
float startX
X-coordinate of the starting point for fast positioning.
Definition dl_result.h:81
float endY
Y-coordinate of the end point for fast positioning.
Definition dl_result.h:84
float startY
Y-coordinate of the starting point for fast positioning.
Definition dl_result.h:82
This struct defines Image.
Definition dl_definition.h:106
This struct defines the object detection and instance segmentation result.
Definition dl_result.h:121
Contour insMaskContour
Contour of the segmentation result.
Definition dl_result.h:123
ResultRestoreInfo restoreInfo
Information required for result restoration.
Definition dl_result.h:124
Bbox bbox
Result of the bounding box.
Definition dl_result.h:122
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
Definition dl_result.h:49
float x
Definition dl_result.h:47
This struct defines the information required to recover the result to the original image.
Definition dl_result.h:91
int imageIndex
Index of the result with respect to the original image.
Definition dl_result.h:92
Position position
Definition dl_result.h:93