fix: 靶子检测
This commit is contained in:
@@ -631,7 +631,7 @@ def detect_circle_v3(frame, laser_point=None, img_cv=None):
|
|||||||
min_r = min(rc["radius"], yellow_radius)
|
min_r = min(rc["radius"], yellow_radius)
|
||||||
max_r = max(rc["radius"], yellow_radius)
|
max_r = max(rc["radius"], yellow_radius)
|
||||||
size_ratio = min_r / max_r if max_r > 0 else 0
|
size_ratio = min_r / max_r if max_r > 0 else 0
|
||||||
if dist_centers < max_dist and size_ratio > 0.5:
|
if dist_centers < max_dist and size_ratio > 0.3:
|
||||||
if logger:
|
if logger:
|
||||||
logger.info(f"[target] -> 找到匹配的红圈: 黄心({yellow_center}), "
|
logger.info(f"[target] -> 找到匹配的红圈: 黄心({yellow_center}), "
|
||||||
f"红心({rc['center']}), 距离:{dist_centers:.1f}, "
|
f"红心({rc['center']}), 距离:{dist_centers:.1f}, "
|
||||||
|
|||||||
Reference in New Issue
Block a user