ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
ReUseX::vision::common::object Namespace Reference

Classes

struct  Box
 Axis-aligned bounding box defined by (left, top, right, bottom) coordinates. More...
struct  PosePoint
 A single keypoint for pose estimation, with visibility flag. More...
struct  Pose
 A set of keypoints representing a human or object pose. More...
struct  Obb
 Oriented bounding box (OBB) parameterized by center, size, and rotation angle. More...
struct  SegmentMap
 A raw binary segmentation map stored as pinned host memory. More...
struct  Segmentation
 Instance segmentation result backed by an OpenCV mask. More...
struct  Depth
 Depth map result with per-pixel depth values. More...
struct  Track
 Multi-object tracking state for a single tracked instance. More...
struct  DetectionBox
 Universal detection result container that holds a bounding box plus optional enriched data (pose, OBB, segmentation, depth, tracking). More...

Typedefs

using DetectionBoxArray = std::vector<DetectionBox>
 Convenience alias for a collection of DetectionBox results.

Enumerations

enum class  ObjectType {
  UNKNOW = -1 , POSITION = 0 , POSE = 1 , OBB = 2 ,
  SEGMENTATION = 3 , DEPTH_ANYTHING = 4 , DEPTH_PRO = 5 , TRACK = 6 ,
  DETECTION = 7
}
 Enumeration of supported detection object types. More...

Functions

DetectionBox createBox (float left, float top, float right, float bottom, float score, int class_id, const std::string &class_name)
 Create a standard detection box.
DetectionBox createPositionBox (float left, float top, float right, float bottom, float score, int class_id, const std::string &class_name)
 Create a position/region-of-interest box (type POSITION).
DetectionBox createTrackBox (float left, float top, float right, float bottom, float score, int track_id, const std::string &class_name)
 Create a simple tracking box without additional payload.
DetectionBox createTrackBox (float left, float top, float right, float bottom, float score, int track_id, const std::string &class_name, const object::Pose &pose)
 Create a tracking box that also carries pose keypoints.
DetectionBox createTrackBox (float left, float top, float right, float bottom, float score, int track_id, const std::string &class_name, const object::Obb &obb)
 Create a tracking box that also carries an oriented bounding box.
DetectionBox createTrackBox (float left, float top, float right, float bottom, float score, int track_id, const std::string &class_name, const object::Segmentation &seg)
 Create a tracking box that also carries a segmentation mask.
DetectionBox createObbBox (float cx, float cy, float w, float h, float angle, float score, int class_id, const std::string &class_name)
 Create an oriented bounding box detection.
DetectionBox createPoseBox (float left, float top, float right, float bottom, const std::vector< PosePoint > &pose_points, float score, int class_id, const std::string &class_name)
 Create a pose-estimation detection box.
DetectionBox createSegmentationBox (float left, float top, float right, float bottom, const cv::Mat &mask, float score, int class_id, const std::string &class_name)
 Create a segmentation detection box with an associated mask.
DetectionBox createDepthProBox (const cv::Mat &depth, float fog_data)
 Create a depth detection from DepthPro output.
DetectionBox createDepthAnythingBox (const cv::Mat &depth)
 Create a depth detection from DepthAnything output.
cv::Mat segmentMapToMat (const std::shared_ptr< SegmentMap > &map)
 Convert a SegmentMap to an OpenCV Mat (zero-copy header wrapper).

Typedef Documentation

◆ DetectionBoxArray

Convenience alias for a collection of DetectionBox results.

Definition at line 210 of file object.hpp.

Enumeration Type Documentation

◆ ObjectType

Enumeration of supported detection object types.

Identifies the kind of data stored in a DetectionBox.

Enumerator
UNKNOW 

Unknown or unclassified object type.

POSITION 

Simple position/region of interest.

POSE 

Human pose estimation result.

OBB 

Oriented bounding box.

SEGMENTATION 

Instance segmentation mask.

DEPTH_ANYTHING 

Depth map from DepthAnything model.

DEPTH_PRO 

Depth map from DepthPro model.

TRACK 

Multi-object tracking result.

DETECTION 

Standard bounding box detection.

Definition at line 13 of file object.hpp.

Function Documentation

◆ createBox()

DetectionBox ReUseX::vision::common::object::createBox ( float left,
float top,
float right,
float bottom,
float score,
int class_id,
const std::string & class_name )

Create a standard detection box.

Parameters
leftLeft edge of the bounding box.
topTop edge of the bounding box.
rightRight edge of the bounding box.
bottomBottom edge of the bounding box.
scoreConfidence score in [0, 1].
class_idNumeric class index.
class_nameHuman-readable class label.
Returns
A DetectionBox with type DETECTION.

◆ createDepthAnythingBox()

DetectionBox ReUseX::vision::common::object::createDepthAnythingBox ( const cv::Mat & depth)

Create a depth detection from DepthAnything output.

Parameters
depthCV_32F depth map (will be cloned).
Returns
A DetectionBox with type DEPTH_ANYTHING.

◆ createDepthProBox()

DetectionBox ReUseX::vision::common::object::createDepthProBox ( const cv::Mat & depth,
float fog_data )

Create a depth detection from DepthPro output.

Parameters
depthCV_32F depth map (will be cloned).
fog_dataEstimated fog/haze value.
Returns
A DetectionBox with type DEPTH_PRO.

◆ createObbBox()

DetectionBox ReUseX::vision::common::object::createObbBox ( float cx,
float cy,
float w,
float h,
float angle,
float score,
int class_id,
const std::string & class_name )

Create an oriented bounding box detection.

The axis-aligned bounding box is computed automatically from the OBB parameters.

Parameters
cxCenter x.
cyCenter y.
wWidth.
hHeight.
angleRotation angle in degrees.
scoreConfidence score.
class_idClass index.
class_nameClass label.
Returns
A DetectionBox with type OBB.

◆ createPoseBox()

DetectionBox ReUseX::vision::common::object::createPoseBox ( float left,
float top,
float right,
float bottom,
const std::vector< PosePoint > & pose_points,
float score,
int class_id,
const std::string & class_name )

Create a pose-estimation detection box.

Parameters
leftLeft edge.
topTop edge.
rightRight edge.
bottomBottom edge.
pose_pointsOrdered list of pose keypoints.
scoreConfidence score.
class_idClass index.
class_nameClass label.
Returns
A DetectionBox with type POSE.

◆ createPositionBox()

DetectionBox ReUseX::vision::common::object::createPositionBox ( float left,
float top,
float right,
float bottom,
float score,
int class_id,
const std::string & class_name )

Create a position/region-of-interest box (type POSITION).

Parameters
leftLeft edge.
topTop edge.
rightRight edge.
bottomBottom edge.
scoreConfidence score.
class_idClass index.
class_nameClass label.
Returns
A DetectionBox with type POSITION.

◆ createSegmentationBox()

DetectionBox ReUseX::vision::common::object::createSegmentationBox ( float left,
float top,
float right,
float bottom,
const cv::Mat & mask,
float score,
int class_id,
const std::string & class_name )

Create a segmentation detection box with an associated mask.

Parameters
leftLeft edge.
topTop edge.
rightRight edge.
bottomBottom edge.
maskSegmentation mask (will be cloned).
scoreConfidence score.
class_idClass index.
class_nameClass label.
Returns
A DetectionBox with type SEGMENTATION.

◆ createTrackBox() [1/4]

DetectionBox ReUseX::vision::common::object::createTrackBox ( float left,
float top,
float right,
float bottom,
float score,
int track_id,
const std::string & class_name )

Create a simple tracking box without additional payload.

Parameters
leftLeft edge.
topTop edge.
rightRight edge.
bottomBottom edge.
scoreConfidence score.
track_idUnique tracking identifier.
class_nameClass label.
Returns
A DetectionBox with type TRACK.

◆ createTrackBox() [2/4]

DetectionBox ReUseX::vision::common::object::createTrackBox ( float left,
float top,
float right,
float bottom,
float score,
int track_id,
const std::string & class_name,
const object::Obb & obb )

Create a tracking box that also carries an oriented bounding box.

◆ createTrackBox() [3/4]

DetectionBox ReUseX::vision::common::object::createTrackBox ( float left,
float top,
float right,
float bottom,
float score,
int track_id,
const std::string & class_name,
const object::Pose & pose )

Create a tracking box that also carries pose keypoints.

◆ createTrackBox() [4/4]

DetectionBox ReUseX::vision::common::object::createTrackBox ( float left,
float top,
float right,
float bottom,
float score,
int track_id,
const std::string & class_name,
const object::Segmentation & seg )

Create a tracking box that also carries a segmentation mask.

◆ segmentMapToMat()

cv::Mat ReUseX::vision::common::object::segmentMapToMat ( const std::shared_ptr< SegmentMap > & map)

Convert a SegmentMap to an OpenCV Mat (zero-copy header wrapper).

Parameters
mapThe shared SegmentMap to wrap.
Returns
A CV_8UC1 Mat pointing to the SegmentMap's data buffer.