mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
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:
commit
151c38bf00
@ -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])
|
||||
|
||||
@ -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])
|
||||
|
||||
@ -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")
|
||||
Loading…
Reference in New Issue
Block a user