Merge pull request #135 from Fracas42/v2.0-fix-one-euro-filter-return-none

fix: one euro filter return none
This commit is contained in:
Prohurtz 2025-04-02 13:33:34 -05:00 committed by GitHub
commit 151c38bf00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 10 deletions

View File

@ -126,11 +126,6 @@ class EllipseBasedPupilDilation:
self.eye_id = eye_id
self.maxinten = 0
self.tri_filter = []
# try:
# min_cutoff = float(self.settings.gui_min_cutoff) # 0.0004
# beta = float(self.settings.gui_speed_coefficient) # 0.9
# except:
print("\033[93m[WARN] OneEuroFilter values must be a legal number.\033[0m")
min_cutoff = 0.00001
beta = 0.05
noisy_point = np.array([1, 1])

View File

@ -147,11 +147,6 @@ class IntensityBasedOpeness:
self.eye_id = eye_id
self.maxinten = 0
self.tri_filter = []
# try:
# min_cutoff = float(self.settings.gui_min_cutoff) # 0.0004
# beta = float(self.settings.gui_speed_coefficient) # 0.9
# except:
print("\033[93m[WARN] OneEuroFilter values must be a legal number.\033[0m")
min_cutoff = 0.0004
beta = 0.9
noisy_point = np.array([1, 1])

View File

@ -52,5 +52,8 @@ class OneEuroFilter:
self.t_prev = t
return x_hat
else:
self.x_prev = x
return x
except:
print("\033[91m[ERROR] One Euro Filter Error. Is your system clock running properly?\033[0m")