Rotated bounding box structure.
More...
#include <DataStructures.h>
Rotated bounding box structure.
Definition at line 115 of file DataStructures.h.
◆ MRotatedBbox()
| Mmind::Dl::MRotatedBbox::MRotatedBbox |
( |
MPointF | center, |
|
|
float | width, |
|
|
float | height, |
|
|
float | angle, |
|
|
float | confidence, |
|
|
int | labelIndex, |
|
|
String^ | labelName ) |
|
inline |
◆ ToBbox()
| MBbox Mmind::Dl::MRotatedBbox::ToBbox |
( |
| ) |
|
|
inline |
Definition at line 159 of file DataStructures.h.
160 {
162 float minX = Single::MaxValue, minY = Single::MaxValue;
163 float maxX = Single::MinValue, maxY = Single::MinValue;
164
165 for each (auto point in points)
166 {
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);
171 }
172
174 }
List< MPointF > ToBboxPoints()
◆ ToBboxPoints()
| List< MPointF > Mmind::Dl::MRotatedBbox::ToBboxPoints |
( |
| ) |
|
|
inline |
Definition at line 142 of file DataStructures.h.
143 {
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;
149
150
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));
155
156 return points;
157 }
◆ angle
| float Mmind::Dl::MRotatedBbox::angle |
◆ center
| MPointF Mmind::Dl::MRotatedBbox::center |
◆ extraInfo
◆ height
| float Mmind::Dl::MRotatedBbox::height |
◆ width
| float Mmind::Dl::MRotatedBbox::width |
The documentation for this struct was generated from the following file: