ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
osd.hpp
Go to the documentation of this file.
1#pragma once
3#include <opencv2/opencv.hpp>
4#include <string>
5#include <tuple>
6#include <unordered_map>
7#include <vector>
8
9namespace ReUseX::vision::osd {
10
18 const cv::Scalar &color, int thickness);
19
25void drawPositionRectGeometry(cv::Mat &img,
27 const cv::Scalar &color, int thickness);
28
34void drawPoseSkeleton(cv::Mat &img, const common::object::DetectionBox &box,
35 int thickness);
36
41void drawObbBox(cv::Mat &img, const common::object::DetectionBox &box,
42 int thickness);
43
47void drawSegmentationMask(cv::Mat &img,
49
54void drawTrackTrace(cv::Mat &img, const common::object::DetectionBox &box,
55 int font_size);
56
62 int thickness);
63
67void drawDepth(cv::Mat &img, const common::object::DetectionBox &box);
68
74void drawPolygon(cv::Mat &img,
75 const std::vector<std::tuple<float, float>> &points,
76 const cv::Scalar &color, int thickness);
77
82void make_labled_image(cv::Mat &img,
84
92void osd(cv::Mat &img, const common::object::DetectionBoxArray &boxes,
93 bool osd_rect = true, double font_scale_ratio = 0.04);
94
100void osd(
101 cv::Mat &img,
102 const std::unordered_map<std::string, std::vector<std::tuple<float, float>>>
103 &points,
104 const cv::Scalar &color = cv::Scalar(0, 255, 0),
105 double font_scale_ratio = 0.04);
106
113void osd(cv::Mat &img, const std::string &fence_name,
114 const std::vector<std::tuple<float, float>> &points,
115 const cv::Scalar &color = cv::Scalar(0, 255, 0),
116 double font_scale_ratio = 0.04);
117
124void osd(cv::Mat &img, const std::tuple<float, float> &position,
125 const std::string &text,
126 const cv::Scalar &color = cv::Scalar(0, 255, 0), int font_size = 40);
127
128} // namespace ReUseX::vision::osd
std::vector< DetectionBox > DetectionBoxArray
Convenience alias for a collection of DetectionBox results.
Definition object.hpp:210
void drawBaseInfoGeometry(cv::Mat &img, const common::object::DetectionBox &box, const cv::Scalar &color, int thickness)
Draw the base detection rectangle and label background for a single box.
void drawTrackHistoryPose(cv::Mat &img, const common::object::DetectionBox &box, int thickness)
Draw historical pose keypoints from previous frames.
void drawDepth(cv::Mat &img, const common::object::DetectionBox &box)
Overlay a depth map as a colour-mapped image blended with the input.
void make_labled_image(cv::Mat &img, const common::object::DetectionBoxArray &boxes)
Minimal OSD that paints each segmentation mask with its class_id color (no text labels).
void drawTrackTrace(cv::Mat &img, const common::object::DetectionBox &box, int font_size)
Draw the tracking trajectory trace for a tracked object.
void osd(cv::Mat &img, const common::object::DetectionBoxArray &boxes, bool osd_rect=true, double font_scale_ratio=0.04)
Full on-screen display: draws bounding boxes, masks, poses, OBBs, tracks, and text labels with automa...
void drawPoseSkeleton(cv::Mat &img, const common::object::DetectionBox &box, int thickness)
Draw pose skeleton connections between keypoints.
void drawPositionRectGeometry(cv::Mat &img, const common::object::DetectionBox &box, const cv::Scalar &color, int thickness)
Draw a dashed or solid rectangle indicating a position ROI.
void drawObbBox(cv::Mat &img, const common::object::DetectionBox &box, int thickness)
Draw an oriented bounding box as a rotated rectangle.
void drawPolygon(cv::Mat &img, const std::vector< std::tuple< float, float > > &points, const cv::Scalar &color, int thickness)
Draw a polygon from a list of (x, y) vertices.
void drawSegmentationMask(cv::Mat &img, const common::object::DetectionBox &box)
Overlay a semi-transparent segmentation mask onto the image.
Universal detection result container that holds a bounding box plus optional enriched data (pose,...
Definition object.hpp:188