mirror of
https://github.com/bendtherules/pytry.git
synced 2026-08-18 22:03:03 +00:00
Shape detection for JU techfest
This commit is contained in:
@@ -7,6 +7,8 @@ c1=time.clock()
|
|||||||
gesture_time=30
|
gesture_time=30
|
||||||
detection_sleep=False
|
detection_sleep=False
|
||||||
blobs=[None]*gesture_time
|
blobs=[None]*gesture_time
|
||||||
|
|
||||||
|
debug=True
|
||||||
#d=s.Display()
|
#d=s.Display()
|
||||||
i1=c.getImage()
|
i1=c.getImage()
|
||||||
img_width_ori=i1.width
|
img_width_ori=i1.width
|
||||||
@@ -49,10 +51,12 @@ while True:
|
|||||||
print(right_step,left_step)
|
print(right_step,left_step)
|
||||||
if right_step>left_step:
|
if right_step>left_step:
|
||||||
print("Left to right")
|
print("Left to right")
|
||||||
press.press_up()
|
if not debug:
|
||||||
|
press.press_up()
|
||||||
else:
|
else:
|
||||||
print("Right to left")
|
print("Right to left")
|
||||||
press.press_down()
|
if not debug:
|
||||||
|
press.press_down()
|
||||||
print(c1)
|
print(c1)
|
||||||
detection_sleep=gesture_time*2
|
detection_sleep=gesture_time*2
|
||||||
else:
|
else:
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user