Namespace containing functions to assist in object detection.
More...
|
struct | Object |
| Represents a single detected object. Combines attributes from TorchObject and TensorflowObject structs. More...
|
|
|
enum class | ObjectDetectionMethod { eUnknown
, eTorch
} |
| Enum class to define the different object detection methods available. More...
|
|
enum class | ObjectDetectionType { eUnknown
, eMallet
, eWaterBottle
} |
| Enum class to define the different object detection types available. More...
|
|
Namespace containing functions to assist in object detection.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-05-05
◆ ObjectDetectionMethod
◆ ObjectDetectionType
◆ FindObjectCenter()
◆ EstimatePoseFromCameraFrame()
void objectdetectutils::EstimatePoseFromCameraFrame |
( |
Object & |
stTag | ) |
|
|
inline |
- Estimate the pose of a tag from a camera frame.
- Parameters
-
stTag | - The tag to estimate the pose of. |
- Note
- In order for this to be accurate, the camera's horizontal field of view (HFOV) and the camera frame size must be known.
- Author
- sam_hajdukiewicz (saman.nosp@m.thah.nosp@m.ajduk.nosp@m.iewi.nosp@m.cz@gm.nosp@m.ail..nosp@m.com) :3
- Date
- 2025-04-04
177 {
178
179 double dDegreesPerPixel = stTag.dHorizontalFOV / stTag.cvImageResolution.
width;
180
181 double dTagErrorX = (stTag.pBoundingBox->x + stTag.pBoundingBox->width / 2) - (stTag.cvImageResolution.
width / 2);
182
183 double dTagAngleX = dTagErrorX * dDegreesPerPixel;
184
185 stTag.dYawAngle = dTagAngleX;
186
187
188 stTag.dStraightLineDistance = (stTag.pBoundingBox->area() / (stTag.cvImageResolution.
width * stTag.cvImageResolution.
height)) * 100.0;
189 }