Threshold

This commit is contained in:
Prohurtz 2021-12-27 14:31:18 -08:00 committed by GitHub
parent 668f96dda8
commit 1c3835216f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()