add auto binarythres fix expandBBox 和 processROIs
This commit is contained in:
@@ -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<fyt::auto_aim::Armor> processROIs(
|
||||
const cv::Mat& input,
|
||||
const cv::Mat& gray_img,
|
||||
const std::vector<cv::Rect>& rois);
|
||||
|
||||
private:
|
||||
// Traditional vision methods
|
||||
std::vector<fyt::auto_aim::Light> findLightsInROI(
|
||||
@@ -139,15 +148,6 @@ private:
|
||||
std::vector<fyt::auto_aim::Armor> matchLightsInROI(const std::vector<fyt::auto_aim::Light>& 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<fyt::auto_aim::Armor> processROIs(
|
||||
const cv::Mat& input,
|
||||
const cv::Mat& gray_img,
|
||||
const std::vector<cv::Rect>& rois);
|
||||
|
||||
std::unique_ptr<YoloTensorRT> tensorrt_;
|
||||
std::vector<YoloObject> yolo_objects_;
|
||||
std::vector<fyt::auto_aim::Armor> armors_;
|
||||
|
||||
Reference in New Issue
Block a user