Mech-DLK SDK C++ API 2.1.0
C++ API reference documentation for secondary development with Mech-DLK
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
MMIndResult.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#pragma once
34
35#include <string>
36#include <vector>
37#include "MMindImage.h"
38
39namespace mmind::dl {
40
45{
46 int x;
47 int y;
48};
49
54{
55 float upperLeftX;
56 float upperLeftY;
59 float confidence;
60 int label;
61};
62
67{
68 size_t contourNum = 0;
69 std::vector<std::vector<MMindPoint>> contourPoints;
70};
71
76{
79};
80
85{
86 std::vector<int> labels;
87 std::vector<float> confidences;
88};
89
94{
95 std::vector<MMindBbox> bboxes;
97};
98
103{
104 std::vector<double> angles;
105 std::vector<MMindPoint> rotationCenterPoints;
106};
107
112{
113 std::vector<float> confidences;
114 std::vector<std::string> texts;
115};
116
121{
122 std::vector<double> confidences;
124};
125
130{
134 enum class Label {
135 OK,
136 NG,
137 UNKNOWN
138 };
139 std::vector<Label> labels;
142};
143
148{
149 std::vector<MMIndClassificationResult> classificationResults;
150 std::vector<MMIndDefectAndEdgeResult> defectAndEdgeResults;
151 std::vector<MMindObjectAndInsResult> objecAndInsResults;
152 std::vector<MMindFastPositioningResult> fastPositioningResults;
153 std::vector<MMindTextRecognitionResult> textRecognitionResults;
154 std::vector<MMindTextDetectionResult> textDetectionResults;
155 std::vector<MMindUnsupSegResult> unsupSegResults;
156};
157
158} // namespace mmind::dl
Definition common.h:34
Defines the classification result.
Definition MMIndResult.h:85
std::vector< float > confidences
Confidence of the corresponding category.
Definition MMIndResult.h:87
std::vector< int > labels
Category label.
Definition MMIndResult.h:86
Defines the defect segmentation and edge detection results.
Definition MMIndResult.h:76
MMindImage confidenceMat
Confidence map of the segmentation result.
Definition MMIndResult.h:78
MMindContour mask
Contour of the segmentation result.
Definition MMIndResult.h:77
Defines the information on the bounding box.
Definition MMIndResult.h:54
float upperLeftY
Y-coordinate of the upper-left corner.
Definition MMIndResult.h:56
int label
Label of the bounding box.
Definition MMIndResult.h:60
float lowerRightY
Y-coordinate of the lower-right corner.
Definition MMIndResult.h:58
float confidence
Confidence of the bounding box.
Definition MMIndResult.h:59
float upperLeftX
X-coordinate of the upper-left corner.
Definition MMIndResult.h:55
float lowerRightX
X-coordinate of the lower-right corner.
Definition MMIndResult.h:57
Defines the information on the mask contour.
Definition MMIndResult.h:67
size_t contourNum
The number of contours.
Definition MMIndResult.h:68
std::vector< std::vector< MMindPoint > > contourPoints
Contour points.
Definition MMIndResult.h:69
Defines the fast positioning result.
Definition MMIndResult.h:103
std::vector< MMindPoint > rotationCenterPoints
Result of the rotation center point.
Definition MMIndResult.h:105
std::vector< double > angles
Result of the rotation angle.
Definition MMIndResult.h:104
Defines the Image.
Definition MMindImage.h:43
Defines the object detection and instance segmentation result.
Definition MMIndResult.h:94
MMindContour insMask
Contour of the segmentation result.
Definition MMIndResult.h:96
std::vector< MMindBbox > bboxes
Result of the bounding box.
Definition MMIndResult.h:95
Defines the information on contour points.
Definition MMIndResult.h:45
int x
The x-coordinate of the contour point.
Definition MMIndResult.h:46
int y
The y-coordinate of the contour point.
Definition MMIndResult.h:47
Defines storing inference results.
Definition MMIndResult.h:148
std::vector< MMindUnsupSegResult > unsupSegResults
List of unsupervised segmentation results.
Definition MMIndResult.h:155
std::vector< MMIndDefectAndEdgeResult > defectAndEdgeResults
List of defect segmentation results.
Definition MMIndResult.h:150
std::vector< MMindFastPositioningResult > fastPositioningResults
List of fast positioning results.
Definition MMIndResult.h:152
std::vector< MMindTextRecognitionResult > textRecognitionResults
List of text recognition results.
Definition MMIndResult.h:153
std::vector< MMindObjectAndInsResult > objecAndInsResults
List of object detection or instance segmentation results.
Definition MMIndResult.h:151
std::vector< MMindTextDetectionResult > textDetectionResults
List of text detection results.
Definition MMIndResult.h:154
std::vector< MMIndClassificationResult > classificationResults
List of classification results.
Definition MMIndResult.h:149
Defines the text detection result.
Definition MMIndResult.h:121
std::vector< double > confidences
Confidences of text detection.
Definition MMIndResult.h:122
MMindContour textContour
Result of text detection.
Definition MMIndResult.h:123
Defines the text recognition result.
Definition MMIndResult.h:112
std::vector< std::string > texts
Result of text recognition.
Definition MMIndResult.h:114
std::vector< float > confidences
Confidences of text recognition.
Definition MMIndResult.h:113
Defines the unsupervised segmentation result.
Definition MMIndResult.h:130
MMindImage confidenceMat
Confidence map of the unsupervised segmentation result.
Definition MMIndResult.h:141
std::vector< Label > labels
Labels of the unsupervised segmentation result.
Definition MMIndResult.h:139
MMindContour mask
Contour of the unsupervised segmentation result.
Definition MMIndResult.h:140
Label
Defines the unsupervised segmentation label.
Definition MMIndResult.h:134
@ UNKNOWN
<There are some defects in the current image.
@ NG
<There are no defects in the current image.