7using namespace System::Collections::Generic;
102 property float Width {
float get() {
return endX -
startX; } }
103 property float Height {
float get() {
return endY -
startY; } }
104 property float Area {
float get() {
return Width * Height; } }
144 auto points = gcnew List<MPointF>();
145 float cos = (float)Math::Cos(
angle);
146 float sin = (float)Math::Sin(
angle);
147 float halfWidth =
width / 2;
148 float halfHeight =
height / 2;
151 points->Add(
MPointF(
center.x + halfWidth * cos - halfHeight * sin,
center.y + halfWidth * sin + halfHeight * cos));
152 points->Add(
MPointF(
center.x - halfWidth * cos - halfHeight * sin,
center.y - halfWidth * sin + halfHeight * cos));
153 points->Add(
MPointF(
center.x - halfWidth * cos + halfHeight * sin,
center.y - halfWidth * sin - halfHeight * cos));
154 points->Add(
MPointF(
center.x + halfWidth * cos + halfHeight * sin,
center.y + halfWidth * sin - halfHeight * cos));
162 float minX = Single::MaxValue, minY = Single::MaxValue;
163 float maxX = Single::MinValue, maxY = Single::MinValue;
165 for each (
auto point
in points)
167 minX = Math::Min(minX, point.x);
168 minY = Math::Min(minY, point.y);
169 maxX = Math::Max(maxX, point.x);
170 maxY = Math::Max(maxY, point.y);
219 return !(left == right);
234 bboxes = gcnew List<MRotatedBbox>();
List< MContour > contours
List< MRotatedBbox > bboxes
PrecisionType
Float precision types.
MBbox(float startX, float startY, float endX, float endY, float confidence, int labelIndex, String^ labelName)
Blob measurement values computed from a contour.
double minCircumscribedRectWidth
double minCircumscribedRectHeight
double maxInscribedRectHeight
double circumscribedRadius
double maxInscribedRectWidth
array< array< MPoint >^> innerContourPoints
array< MPoint > outerContourPoints
Point with float coordinates.
static MPointF operator+(MPointF p1, MPointF p2)
MPointF(float x, float y)
static MPoint operator+(MPoint p1, MPoint p2)
List< MPointF > ToBboxPoints()
MRotatedBbox(MPointF center, float width, float height, float angle, float confidence, int labelIndex, String^ labelName)
ModelEfficiencyParam(int batchSize, PrecisionType precisionType)
static bool operator!=(ModelEfficiencyParam left, ModelEfficiencyParam right)
static bool operator==(ModelEfficiencyParam left, ModelEfficiencyParam right)
PrecisionType precisionType