mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix: tune LEAP filter
This commit is contained in:
parent
d685ad18ea
commit
d7c9b3b70b
@ -75,11 +75,11 @@ class EyeTrackSettingsConfig(BaseModel):
|
||||
osc_right_eye_x_address: str = "/avatar/parameters/RightEyeX"
|
||||
osc_eyes_y_address: str = "/avatar/parameters/EyesY"
|
||||
osc_invert_eye_close: bool = False
|
||||
gui_RANSACBLINK: bool = True
|
||||
gui_RANSACBLINK: bool = False
|
||||
gui_legacy_ransac: bool = False
|
||||
gui_legacy_ransac_thresh_right: int = 80
|
||||
gui_legacy_ransac_thresh_left: int = 80
|
||||
gui_LEAP_lid: bool = False
|
||||
gui_LEAP_lid: bool = True
|
||||
gui_osc_vrcft_v1: bool = False
|
||||
gui_osc_vrcft_v2: bool = False
|
||||
gui_vrc_native: bool = True
|
||||
|
||||
@ -358,9 +358,12 @@ class EllipseBasedPupilDilation:
|
||||
maxp = float(self.data[int_y, int_x])
|
||||
minp = float(self.maxval)
|
||||
|
||||
eyedilation = (pupil_area - maxp) / (
|
||||
minp - maxp
|
||||
) # for whatever reason when input and maxp are too close it outputs high
|
||||
try:
|
||||
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
|
||||
|
||||
if outputSamples > 0:
|
||||
|
||||
@ -118,8 +118,8 @@ class LEAP_C(object):
|
||||
process.nice(psutil.BELOW_NORMAL_PRIORITY_CLASS) # Windows
|
||||
process.nice()
|
||||
# See https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getpriorityclass#return-value for values
|
||||
min_cutoff = 0.9
|
||||
beta = 5.0
|
||||
min_cutoff = 0.1
|
||||
beta = 10.0
|
||||
# print(np.random.rand(22, 2))
|
||||
# noisy_point = np.array([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])
|
||||
self.one_euro_filter = OneEuroFilter(
|
||||
|
||||
@ -235,7 +235,6 @@ def RANSAC3D(self, hsrac_en):
|
||||
ransac_xy_offset,
|
||||
) = get_center_noclamp((self.rawx, self.rawy), self.radius)
|
||||
|
||||
print(self.current_image_gray_clean.size, ransac_lower_x, ransac_upper_y)
|
||||
frame = safe_crop(
|
||||
self.current_image_gray_clean,
|
||||
int(ransac_lower_x),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user