diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp index 4fca9e6..ba12f7b 100644 --- a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp @@ -128,6 +128,15 @@ public: // Draw detection results for debug visualization void drawResults(cv::Mat& img) noexcept; + // Expand YOLO bbox to ROI (needed by calibration) + cv::Rect expandBBox(const cv::Rect& bbox, const cv::Size& img_size, int pixel_expand); + + // Process ROIs to detect armors (needed by calibration) + std::vector processROIs( + const cv::Mat& input, + const cv::Mat& gray_img, + const std::vector& rois); + private: // Traditional vision methods std::vector findLightsInROI( @@ -139,15 +148,6 @@ private: std::vector matchLightsInROI(const std::vector& lights); void correctCorners(fyt::auto_aim::Armor& armor, const cv::Mat& gray_img); - // Expand YOLO bbox to ROI - cv::Rect expandBBox(const cv::Rect& bbox, const cv::Size& img_size, int pixel_expand); - - // Process ROIs to detect armors (common logic for all modes) - std::vector processROIs( - const cv::Mat& input, - const cv::Mat& gray_img, - const std::vector& rois); - std::unique_ptr tensorrt_; std::vector yolo_objects_; std::vector armors_;