From 5212e3aab240ac2efd1b6254c7fdbd8a0f911e0d Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Wed, 6 Feb 2019 10:07:04 +0100 Subject: [PATCH] Fix 'fade' --- head_pose.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/head_pose.py b/head_pose.py index 0a248a7..e6c3a9b 100644 --- a/head_pose.py +++ b/head_pose.py @@ -570,12 +570,13 @@ while True: diffT = min(1, t - lastRunTime) + lastRunTime = t # animDuration = 1 # factor = animDuration metrics = metrics + newMetrics*diffT newMetrics *= (1-diffT) - print('MAXES', np.max(metrics), np.max(newMetrics), diffT) + print('MAXES', np.max(metrics), np.max(newMetrics), diffT, t - lastRunTime) # smooth impact of first hits by having at least 0.05 normalisedMetrics = metrics / (max(255*7 ,np.max(metrics)))