pref: laser find center point
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user