yolo roi binary fix

This commit is contained in:
cyy_mac
2026-03-26 03:04:29 +08:00
parent 43b5a01a0a
commit bda0306ce0

View File

@@ -414,6 +414,11 @@ std::vector<fyt::auto_aim::Armor> ArmorYoloDetectorNode::detectArmors(
// Convert ROS img to cv::Mat
auto img = cv_bridge::toCvShare(img_msg, "bgr8")->image;
// Enable debug on detector if needed (before detect() so binary img gets stored)
if (debug_ && debug_result_img_) {
detector_->enable_debug = true;
}
// Run detection: YOLO for ROI + traditional vision for refinement
auto armors = detector_->detect(img);