| 81 | } |
| 82 | |
| 83 | static void fill_rect(cv::Mat& img, cv::Rect r, cv::Scalar color, double alpha) |
| 84 | { |
| 85 | const cv::Rect clip = r & cv::Rect(0, 0, img.cols, img.rows); |
| 86 | if (clip.width <= 0 || clip.height <= 0) return; |
| 87 | cv::Mat roi = img(clip); |
| 88 | cv::Mat block(roi.size(), roi.type(), color); |
| 89 | cv::addWeighted(block, alpha, roi, 1.0 - alpha, 0.0, roi); |
| 90 | } |
| 91 | |
| 92 | struct OverlayLayout { |
| 93 | int hud_y = 0; |
no test coverage detected