pref: laser find center point

This commit is contained in:
2026-06-02 10:32:24 +08:00
parent 99614fe321
commit aa16676c74
2 changed files with 73 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
from maix import image, time
from logger_manager import logger_manager
from camera_manager import camera_manager
_USE_CV = False
@@ -132,7 +132,8 @@ def get_stable_laser_point(timeout_ms=15000, stable_count=STABLE_COUNT):
continue
pos_bright = find_brightest_bytes(frame, cx, cy, SEARCH_RADIUS, THRESHOLD, RED_RATIO)
pos = pos_bright
print(f"pos:{pos},stable:{stable}")
if logger_manager.logger:
logger_manager.logger.info(f"pos:{pos},stable:{stable}")
if _USE_CV:
img_cv = image.image2cv(frame, False, False)
pos_ellipse = find_ellipse(img_cv, cx, cy, SEARCH_RADIUS, THRESHOLD, RED_RATIO)