ReUseX  0.0.5
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 {
  unknown = -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 create_box (float left, float top, float right, float bottom, float score, int class_id, const std::string &class_name)
 Create a standard detection box.
DetectionBox create_position_box (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 create_track_box (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 create_track_box (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 create_track_box (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 create_track_box (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 create_obb_box (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 create_pose_box (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 create_segmentation_box (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 create_depth_pro_box (const cv::Mat &depth, float fog_data)
 Create a depth detection from DepthPro output.
DetectionBox create_depth_anything_box (const cv::Mat &depth)
 Create a depth detection from DepthAnything output.
cv::Mat segment_map_to_mat (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 216 of file object.hpp.

Enumeration Type Documentation

◆ ObjectType

Enumeration of supported detection object types.

Identifies the kind of data stored in a DetectionBox.

Enumerator
unknown 

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 18 of file object.hpp.

Function Documentation

◆ create_box()

DetectionBox reusex::vision::common::object::create_box ( 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.

References create_box().

Referenced by create_box().

◆ create_depth_anything_box()

DetectionBox reusex::vision::common::object::create_depth_anything_box ( 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.

References create_depth_anything_box().

Referenced by create_depth_anything_box().

◆ create_depth_pro_box()

DetectionBox reusex::vision::common::object::create_depth_pro_box ( 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.

References create_depth_pro_box().

Referenced by create_depth_pro_box().

◆ create_obb_box()

DetectionBox reusex::vision::common::object::create_obb_box ( 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.

References create_obb_box().

Referenced by create_obb_box().

◆ create_pose_box()

DetectionBox reusex::vision::common::object::create_pose_box ( 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.

References create_pose_box().

Referenced by create_pose_box().

◆ create_position_box()

DetectionBox reusex::vision::common::object::create_position_box ( 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.

References create_position_box().

Referenced by create_position_box().

◆ create_segmentation_box()

DetectionBox reusex::vision::common::object::create_segmentation_box ( 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.

References create_segmentation_box().

Referenced by create_segmentation_box().

◆ create_track_box() [1/4]

DetectionBox reusex::vision::common::object::create_track_box ( 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.

References create_track_box().

Referenced by create_track_box(), create_track_box(), create_track_box(), and create_track_box().

◆ create_track_box() [2/4]

DetectionBox reusex::vision::common::object::create_track_box ( 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.

References create_track_box().

◆ create_track_box() [3/4]

DetectionBox reusex::vision::common::object::create_track_box ( 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.

References create_track_box().

◆ create_track_box() [4/4]

DetectionBox reusex::vision::common::object::create_track_box ( 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.

References create_track_box().

◆ segment_map_to_mat()

cv::Mat reusex::vision::common::object::segment_map_to_mat ( 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.

References segment_map_to_mat().

Referenced by segment_map_to_mat().