add auto binarythres fix expandBBox 和 processROIs
This commit is contained in:
@@ -128,6 +128,15 @@ public:
|
|||||||
// Draw detection results for debug visualization
|
// Draw detection results for debug visualization
|
||||||
void drawResults(cv::Mat& img) noexcept;
|
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:
|
private:
|
||||||
// Traditional vision methods
|
// Traditional vision methods
|
||||||
std::vector<fyt::auto_aim::Light> findLightsInROI(
|
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);
|
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);
|
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::unique_ptr<YoloTensorRT> tensorrt_;
|
||||||
std::vector<YoloObject> yolo_objects_;
|
std::vector<YoloObject> yolo_objects_;
|
||||||
std::vector<fyt::auto_aim::Armor> armors_;
|
std::vector<fyt::auto_aim::Armor> armors_;
|
||||||
|
|||||||
Reference in New Issue
Block a user