内容填充

This commit is contained in:
2025-11-19 20:21:45 +08:00
parent a52d1118c9
commit ad5ced1cff
58 changed files with 15670 additions and 2 deletions

30
Visualizer.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef VISUALIZER_H
#define VISUALIZER_H
#include <opencv2/opencv.hpp>
#include <vector>
#include <string>
#include "ArmorDetector.h"
class Visualizer {
public:
Visualizer();
~Visualizer();
// Draw light bars on frame
cv::Mat& draw_light_bars(cv::Mat& frame, const std::vector<LightBar>& light_bars, const std::string& target_color);
// Draw armor plate on frame
cv::Mat& draw_armor_plate(cv::Mat& frame, const ArmorPlate& armor_plate);
// Draw offset text
cv::Mat& draw_offset_text(cv::Mat& frame, const cv::Point2f* display_center, const std::string& target_color, bool is_predicted = false);
// Draw crosshair at center
cv::Mat& draw_crosshair(cv::Mat& frame, const cv::Point2f& center, const cv::Scalar& color = cv::Scalar(0, 255, 0), int size = 10);
// Draw ballistic point
cv::Mat& draw_ballistic_point(cv::Mat& frame, const cv::Point2f* ballistic_point);
};
#endif // VISUALIZER_H