mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
part of re imp circle crop, settings placement change
This commit is contained in:
parent
478b2e198f
commit
f42d64bf02
@ -32,7 +32,6 @@ class CameraWidget:
|
|||||||
self.gui_stop_calibration = f"-STOPCALIBRATION{widget_id}-"
|
self.gui_stop_calibration = f"-STOPCALIBRATION{widget_id}-"
|
||||||
self.gui_recenter_eyes = f"-RECENTEREYES{widget_id}-"
|
self.gui_recenter_eyes = f"-RECENTEREYES{widget_id}-"
|
||||||
self.gui_mode_readout = f"-APPMODE{widget_id}-"
|
self.gui_mode_readout = f"-APPMODE{widget_id}-"
|
||||||
self.gui_circular_crop = f"-CIRCLECROP{widget_id}-"
|
|
||||||
self.gui_roi_message = f"-ROIMESSAGE{widget_id}-"
|
self.gui_roi_message = f"-ROIMESSAGE{widget_id}-"
|
||||||
|
|
||||||
self.osc_queue = osc_queue
|
self.osc_queue = osc_queue
|
||||||
|
|||||||
@ -18,8 +18,6 @@ class EyeTrackCameraConfig(BaseModel):
|
|||||||
roi_window_h: int = 0
|
roi_window_h: int = 0
|
||||||
focal_length: int = 30
|
focal_length: int = 30
|
||||||
capture_source: Union[int, str, None] = None
|
capture_source: Union[int, str, None] = None
|
||||||
gui_circular_crop: bool = False
|
|
||||||
|
|
||||||
calib_XMAX: int = None
|
calib_XMAX: int = None
|
||||||
calib_XMIN: int = None
|
calib_XMIN: int = None
|
||||||
calib_YMAX: int = None
|
calib_YMAX: int = None
|
||||||
@ -63,6 +61,8 @@ class EyeTrackSettingsConfig(BaseModel):
|
|||||||
gui_update_check: bool = False
|
gui_update_check: bool = False
|
||||||
gui_ROSC: bool = False
|
gui_ROSC: bool = False
|
||||||
gui_vrc_native: bool = True
|
gui_vrc_native: bool = True
|
||||||
|
gui_circular_crop_right: bool = False
|
||||||
|
gui_circular_crop_left: bool = False
|
||||||
|
|
||||||
|
|
||||||
class EyeTrackConfig(BaseModel):
|
class EyeTrackConfig(BaseModel):
|
||||||
|
|||||||
@ -263,7 +263,6 @@ class EyeProcessor:
|
|||||||
self.output_images_and_update(self.thresh, EyeInfo(self.current_algo, self.out_x, self.out_y, 0, self.eyeopen))
|
self.output_images_and_update(self.thresh, EyeInfo(self.current_algo, self.out_x, self.out_y, 0, self.eyeopen))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def BLINKM(self):
|
def BLINKM(self):
|
||||||
self.eyeopen = BLINK(self)
|
self.eyeopen = BLINK(self)
|
||||||
|
|
||||||
@ -276,7 +275,7 @@ class EyeProcessor:
|
|||||||
self.current_algorithm = EyeInfoOrigin.DADDY
|
self.current_algorithm = EyeInfoOrigin.DADDY
|
||||||
|
|
||||||
def HSRACM(self):
|
def HSRACM(self):
|
||||||
# todo: added process to initialise er_hsrac when resolution changes
|
# todo: add process to initialise er_hsrac when resolution changes
|
||||||
self.rawx, self.rawy, self.thresh, self.current_image_gray, self.bd_blink = self.er_hsrac.run(self.current_image_gray)
|
self.rawx, self.rawy, self.thresh, self.current_image_gray, self.bd_blink = self.er_hsrac.run(self.current_image_gray)
|
||||||
if self.prev_x is None:
|
if self.prev_x is None:
|
||||||
self.prev_x = self.rawx
|
self.prev_x = self.rawx
|
||||||
@ -285,7 +284,7 @@ class EyeProcessor:
|
|||||||
self.current_algorithm = EyeInfoOrigin.HSRAC
|
self.current_algorithm = EyeInfoOrigin.HSRAC
|
||||||
|
|
||||||
def HSFM(self):
|
def HSFM(self):
|
||||||
# todo: added process to initialise er_hsf when resolution changes
|
# todo: add process to initialise er_hsf when resolution changes
|
||||||
self.rawx, self.rawy, self.thresh = self.er_hsf.run(self.current_image_gray)
|
self.rawx, self.rawy, self.thresh = self.er_hsf.run(self.current_image_gray)
|
||||||
self.out_x, self.out_y = cal.cal_osc(self, self.rawx, self.rawy)
|
self.out_x, self.out_y = cal.cal_osc(self, self.rawx, self.rawy)
|
||||||
self.current_algorithm = EyeInfoOrigin.HSF
|
self.current_algorithm = EyeInfoOrigin.HSF
|
||||||
|
|||||||
@ -39,7 +39,8 @@ class SettingsWidget:
|
|||||||
self.gui_thresh_add = f"-THRESHADD{widget_id}-"
|
self.gui_thresh_add = f"-THRESHADD{widget_id}-"
|
||||||
self.gui_ROSC = f"-ROSC{widget_id}-"
|
self.gui_ROSC = f"-ROSC{widget_id}-"
|
||||||
self.gui_vrc_native = f"-VRCNATIVE{widget_id}-"
|
self.gui_vrc_native = f"-VRCNATIVE{widget_id}-"
|
||||||
|
gui_circular_crop_left = f"-CIRCLECROPLEFT{widget_id}-"
|
||||||
|
gui_circular_crop_right = f"-CIRCLECROPRIGHT{widget_id}-"
|
||||||
self.gui_update_check = f"-UPDATECHECK{widget_id}-"
|
self.gui_update_check = f"-UPDATECHECK{widget_id}-"
|
||||||
self.gui_threshold_slider = f"-BLOBTHRESHOLD{widget_id}-"
|
self.gui_threshold_slider = f"-BLOBTHRESHOLD{widget_id}-"
|
||||||
self.main_config = main_config
|
self.main_config = main_config
|
||||||
@ -121,8 +122,8 @@ class SettingsWidget:
|
|||||||
tooltip = "Select the priority of eyetracking algorithims.",
|
tooltip = "Select the priority of eyetracking algorithims.",
|
||||||
),
|
),
|
||||||
sg.Text("HSRAC", background_color='#424042'),
|
sg.Text("HSRAC", background_color='#424042'),
|
||||||
],
|
# ],
|
||||||
[
|
# [
|
||||||
sg.Checkbox(
|
sg.Checkbox(
|
||||||
"",
|
"",
|
||||||
default=self.config.gui_HSF,
|
default=self.config.gui_HSF,
|
||||||
@ -158,8 +159,8 @@ class SettingsWidget:
|
|||||||
tooltip = "Select the priority of eyetracking algorithims.",
|
tooltip = "Select the priority of eyetracking algorithims.",
|
||||||
),
|
),
|
||||||
sg.Text("DADDY", background_color='#424042'),
|
sg.Text("DADDY", background_color='#424042'),
|
||||||
],
|
# ],
|
||||||
[
|
# [
|
||||||
sg.Checkbox(
|
sg.Checkbox(
|
||||||
"",
|
"",
|
||||||
default=self.config.gui_RANSAC3D,
|
default=self.config.gui_RANSAC3D,
|
||||||
@ -204,8 +205,20 @@ class SettingsWidget:
|
|||||||
key=self.gui_IBO,
|
key=self.gui_IBO,
|
||||||
background_color='#424042',
|
background_color='#424042',
|
||||||
),
|
),
|
||||||
# ],
|
sg.Checkbox(
|
||||||
# [
|
"Bianary Blink Algo",
|
||||||
|
default=self.config.gui_BLINK,
|
||||||
|
key=self.gui_BLINK,
|
||||||
|
background_color='#424042',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
sg.Checkbox(
|
||||||
|
"Left Eye Circile crop",
|
||||||
|
default=self.config.gui_IBO,
|
||||||
|
key=self.gui_IBO,
|
||||||
|
background_color='#424042',
|
||||||
|
),
|
||||||
sg.Checkbox(
|
sg.Checkbox(
|
||||||
"Bianary Blink Algo",
|
"Bianary Blink Algo",
|
||||||
default=self.config.gui_BLINK,
|
default=self.config.gui_BLINK,
|
||||||
@ -241,8 +254,8 @@ class SettingsWidget:
|
|||||||
background_color='#424042',
|
background_color='#424042',
|
||||||
tooltip = "Adjusts the ammount of threshold to add to RANSAC. Usefull for fine tuning your setup.",
|
tooltip = "Adjusts the ammount of threshold to add to RANSAC. Usefull for fine tuning your setup.",
|
||||||
),
|
),
|
||||||
],
|
# ],
|
||||||
[
|
# [
|
||||||
sg.Text("Blob Threshold", background_color='#424042'), #TODO make this for right and left eyes? I dont know how vital that is..
|
sg.Text("Blob Threshold", background_color='#424042'), #TODO make this for right and left eyes? I dont know how vital that is..
|
||||||
sg.Slider(
|
sg.Slider(
|
||||||
range=(0, 110),
|
range=(0, 110),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user