Mech-DLK SDK (C++) 3.0.0
Mech-DLK SDK (C++) Reference Documentation
 
Loading...
Searching...
No Matches
MContour.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <string>
5#include "common/macro.h"
6
7namespace mmind {
8namespace dl {
9
10struct MPoint
11{
12 int x;
13 int y;
14
15 constexpr MPoint() : x(0), y(0) {}
16
17 constexpr MPoint(int x, int y) : x(x), y(y) {}
18
19 MPoint& operator+=(const MPoint& other) noexcept
20 {
21 x += other.x;
22 y += other.y;
23 return *this;
24 }
25};
26
27inline MPoint operator+(const MPoint& p1, const MPoint& p2) { return {p1.x + p2.x, p1.y + p2.y}; }
28
30{
31 double area{0.0};
32 double overallArea{0.0};
33 double width{0.0};
34 double height{0.0};
35 double aspectRatio{0.0};
36 double angle{0.0};
37 double circularity{0.0};
38 double centerX{0.0};
39 double centerY{0.0};
40 double inscribedRadius{0.0};
44 double centroidX{0.0};
45 double centroidY{0.0};
46 double topLeftX{0.0};
47 double topLeftY{0.0};
48 double bottomRightX{0.0};
49 double bottomRightY{0.0};
52};
53
65{
66 std::vector<MPoint> outerContourPoints;
67 std::vector<std::vector<MPoint>> innerContourPoints;
68
69 int imageWidth{0};
71
73
74 struct ExtraInfo
75 {
76 float confidence{};
78 std::string labelName{};
79 } extraInfo;
80};
81
82} // namespace dl
83
84} // namespace mmind
#define MMIND_DL_SDK_CC_API
Definition macro.h:21
constexpr MPointF operator+(const MPointF &p1, const MPointF &p2)
Definition MBbox.h:27
Definition MBbox.h:7
double minCircumscribedRectHeight
Definition MContour.h:51
double circumscribedRadius
Definition MContour.h:41
double maxInscribedRectWidth
Definition MContour.h:42
double minCircumscribedRectWidth
Definition MContour.h:50
double maxInscribedRectHeight
Definition MContour.h:43
Represents a contour with hierarchical structure and associated blob features.
Definition MContour.h:65
MBlobValue blobValue
Definition MContour.h:72
std::vector< std::vector< MPoint > > innerContourPoints
Definition MContour.h:67
std::vector< MPoint > outerContourPoints
Definition MContour.h:66
constexpr MPoint(int x, int y)
Definition MContour.h:17
MPoint & operator+=(const MPoint &other) noexcept
Definition MContour.h:19
constexpr MPoint()
Definition MContour.h:15