From c8c7b628c7136cd3626d5bfdff5c5bbcd2abd9b4 Mon Sep 17 00:00:00 2001 From: Philipp Rouast Date: Thu, 14 Nov 2024 13:13:36 +1100 Subject: [PATCH] Improve text readability --- examples/live.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/live.py b/examples/live.py index 5b014f0..36d4ce8 100644 --- a/examples/live.py +++ b/examples/live.py @@ -53,10 +53,10 @@ def draw_fps(frame, fps, text, draw_area_bl_x, draw_area_bl_y): def draw_vital(frame, sig, text, sig_name, fps, color, draw_area_bl_x, draw_area_bl_y): if sig_name in sig: - f_range = (CALC_HR_MIN/SECONDS_PER_MINUTE, CALC_HR_MAX/SECONDS_PER_MINUTE) if 'heart' in sig_name else (CALC_RR_MIN/SECONDS_PER_MINUTE, CALC_RR_MAX/SECONDS_PER_MINUTE) + f_range = (CALC_HR_MIN/SECONDS_PER_MINUTE, CALC_HR_MAX/SECONDS_PER_MINUTE) if 'ppg' in sig_name else (CALC_RR_MIN/SECONDS_PER_MINUTE, CALC_RR_MAX/SECONDS_PER_MINUTE) val = estimate_freq(x=sig[sig_name], f_s=fps, f_res=0.1/SECONDS_PER_MINUTE, f_range=f_range, method='periodogram') * SECONDS_PER_MINUTE cv2.putText(frame, text='{}: {:.1f}'.format(text, val), org=(draw_area_bl_x, draw_area_bl_y), - fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=0.6, color=color, thickness=1) + fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=0.6, color=color, thickness=2) class VitalLensRunnable: def __init__(self, method, api_key):