refine power module

This commit is contained in:
gcw_4spBpAfv
2026-04-28 16:58:51 +08:00
parent fe3e26e21d
commit 4a3b111ce4
7 changed files with 93 additions and 90 deletions

View File

@@ -14,10 +14,6 @@ from maix import image
import config
from logger_manager import logger_manager
# 导入ArUco检测器如果启用
if config.USE_ARUCO:
from aruco_detector import detect_target_with_aruco, aruco_detector
# 存图队列 + worker
_save_queue = queue.Queue(maxsize=16)
_save_worker_started = False
@@ -927,18 +923,9 @@ def detect_target(frame, laser_point=None):
与detect_circle_v3保持相同的返回格式
"""
logger = logger_manager.logger
if config.USE_ARUCO:
# 使用ArUco检测
if logger:
logger.debug("[VISION] 使用ArUco标记检测靶心")
# 延迟导入以避免循环依赖
from aruco_detector import detect_target_with_aruco
return detect_target_with_aruco(frame, laser_point)
else:
# 使用传统黄色靶心检测
if logger:
logger.debug("[VISION] 使用传统黄色靶心检测")
return detect_circle_v3(frame, laser_point)
# 项目当前统一使用黄色靶心检测(圆/椭圆),不再保留 ArUco 路径
if logger:
logger.debug("[VISION] 使用传统黄色靶心检测")
return detect_circle_v3(frame, laser_point)