upload log file to qiqiu
This commit is contained in:
10
vision.py
10
vision.py
@@ -217,7 +217,7 @@ def check_image_sharpness(frame, threshold=100.0, save_debug_images=False):
|
||||
|
||||
# 保存原始图像
|
||||
img_orig = image.cv2image(img_cv, False, False)
|
||||
orig_filename = f"{debug_dir}/sharpness_debug_orig_{img_count:04d}.bmp"
|
||||
orig_filename = f"{debug_dir}/sharpness_debug_orig_{img_count:04d}.jpg"
|
||||
img_orig.save(orig_filename)
|
||||
|
||||
# # 保存边缘检测结果(可视化)
|
||||
@@ -294,7 +294,7 @@ def save_calibration_image(frame, laser_pos, photo_dir=None):
|
||||
img_count = 0
|
||||
|
||||
x, y = laser_pos
|
||||
filename = f"{photo_dir}/calibration_{int(x)}_{int(y)}_{img_count:04d}.bmp"
|
||||
filename = f"{photo_dir}/calibration_{int(x)}_{int(y)}_{img_count:04d}.jpg"
|
||||
|
||||
logger = logger_manager.logger
|
||||
if logger:
|
||||
@@ -722,9 +722,9 @@ def _save_shot_image_impl(img_cv, center, radius, method, ellipse_params,
|
||||
# 这里改为:只要 method 有值,就按 method 命名;否则才回退 no_target
|
||||
method_str = (method or "").strip()
|
||||
if method_str:
|
||||
filename = f"{photo_dir}/shot_{shot_id}_{method_str}.bmp"
|
||||
filename = f"{photo_dir}/shot_{shot_id}_{method_str}.jpg"
|
||||
else:
|
||||
filename = f"{photo_dir}/shot_{shot_id}_no_target.bmp"
|
||||
filename = f"{photo_dir}/shot_{shot_id}_no_target.jpg"
|
||||
else:
|
||||
try:
|
||||
all_images = [f for f in os.listdir(photo_dir) if f.endswith(('.bmp', '.jpg', '.jpeg'))]
|
||||
@@ -737,7 +737,7 @@ def _save_shot_image_impl(img_cv, center, radius, method, ellipse_params,
|
||||
else:
|
||||
method_str = method or "unknown"
|
||||
distance_str = str(round((distance_m or 0.0) * 100))
|
||||
filename = f"{photo_dir}/{method_str}_{int(x)}_{int(y)}_{distance_str}_{img_count:04d}.bmp"
|
||||
filename = f"{photo_dir}/{method_str}_{int(x)}_{int(y)}_{distance_str}_{img_count:04d}.jpg"
|
||||
|
||||
logger = logger_manager.logger
|
||||
if logger:
|
||||
|
||||
Reference in New Issue
Block a user