fix: dilation crash

This commit is contained in:
Prohurtz 2023-11-24 18:08:49 -06:00
parent 5329911404
commit 1ecdbdc142

View File

@ -359,6 +359,7 @@ class EllipseBasedPupilDilation:
minp = float(self.maxval) minp = float(self.maxval)
try: try:
if maxp != 0 and not (np.isnan(pupil_area) or np.isnan(maxp)):
eyedilation = (pupil_area - maxp) / ( eyedilation = (pupil_area - maxp) / (
minp - maxp minp - maxp
) # for whatever reason when input and maxp are too close it outputs high ) # for whatever reason when input and maxp are too close it outputs high