mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
Threshold
This commit is contained in:
parent
668f96dda8
commit
1c3835216f
24
guikiv.py
24
guikiv.py
@ -61,14 +61,9 @@ class WidgetContainer(GridLayout):
|
||||
|
||||
self.add_widget(Label(text ='Search Size Y R'))
|
||||
self.add_widget(self.Y)
|
||||
|
||||
|
||||
|
||||
self.YV = Label(text ='1')
|
||||
self.add_widget(self.YV)
|
||||
|
||||
|
||||
|
||||
self.Y.bind(value = self.on_value1)
|
||||
###############################################
|
||||
|
||||
@ -91,6 +86,18 @@ class WidgetContainer(GridLayout):
|
||||
self.add_widget(self.ylValue)
|
||||
self.ylc.bind(value = self.on_value3)
|
||||
|
||||
|
||||
###############################
|
||||
|
||||
self.deth = Slider(min = 0, max = 40,
|
||||
value_track = True,
|
||||
value_track_color =[1, 1, 1, 1])
|
||||
self.add_widget(Label(text ='Detection thresh default (18)'))
|
||||
self.add_widget(self.deth)
|
||||
self.dethv= Label(text ='1')
|
||||
self.add_widget(self.dethv)
|
||||
self.deth.bind(value = self.on_value4)
|
||||
|
||||
#####################################################
|
||||
|
||||
def on_value(self, instance, brightness):
|
||||
@ -117,6 +124,11 @@ class WidgetContainer(GridLayout):
|
||||
fyl.write(self.ylValue.text)
|
||||
fyl.close
|
||||
|
||||
def on_value4(self, instance, brightness,):
|
||||
self.dethv.text = "% d"% brightness
|
||||
fyl= open("thresh.txt","w+")
|
||||
fyl.write(self.dethv.text)
|
||||
fyl.close
|
||||
|
||||
class Eyetrack(App):
|
||||
def build(self):
|
||||
@ -129,4 +141,4 @@ class Eyetrack(App):
|
||||
root = Eyetrack()
|
||||
|
||||
|
||||
root.run()
|
||||
root.run()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user