Shape detection for JU techfest

This commit is contained in:
bendtherules
2014-02-06 14:53:29 +05:30
parent d03fb2386f
commit b1505330bd
8 changed files with 6 additions and 2 deletions
+6 -2
View File
@@ -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:
View File
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