mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix: dilation crash
This commit is contained in:
parent
5329911404
commit
1ecdbdc142
@ -359,9 +359,10 @@ class EllipseBasedPupilDilation:
|
||||
minp = float(self.maxval)
|
||||
|
||||
try:
|
||||
eyedilation = (pupil_area - maxp) / (
|
||||
minp - maxp
|
||||
) # for whatever reason when input and maxp are too close it outputs high
|
||||
if maxp != 0 and not (np.isnan(pupil_area) or np.isnan(maxp)):
|
||||
eyedilation = (pupil_area - maxp) / (
|
||||
minp - maxp
|
||||
) # for whatever reason when input and maxp are too close it outputs high
|
||||
except:
|
||||
eyedilation = 0.5
|
||||
eyedilation = 1 - eyedilation
|
||||
|
||||
Loading…
Reference in New Issue
Block a user