| 
														
															@@ -9,7 +9,7 @@ import cv2 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 cv2.namedWindow('View', cv2.WINDOW_NORMAL) 
														 | 
														
														 | 
														
															 cv2.namedWindow('View', cv2.WINDOW_NORMAL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 DEFAULT_MONITOR = 3 
														 | 
														
														 | 
														
															 DEFAULT_MONITOR = 3 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-DEBUG = False 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+DEBUG = True 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 scheduler = sched.scheduler(time, sleep) 
														 | 
														
														 | 
														
															 scheduler = sched.scheduler(time, sleep) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 dilation_kernel = np.array([[0,0,0], [1, 1, 1], [0,0,0]]).astype('uint8') 
														 | 
														
														 | 
														
															 dilation_kernel = np.array([[0,0,0], [1, 1, 1], [0,0,0]]).astype('uint8') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -126,8 +126,7 @@ if __name__ == '__main__': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     coef = 1 
														 | 
														
														 | 
														
															     coef = 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     trigger_second = (int(dino_pos[0].mean()), int(dino_max_x + int(coef*10)*pw)) 
														 | 
														
														 | 
														
															     trigger_second = (int(dino_pos[0].mean()), int(dino_max_x + int(coef*10)*pw)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    trigger_feather = (dino_max_y, int(dino_max_x + int(coef*10)*pw)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    trigger_first = (int(dino_pos[0].mean()), int(75*pw)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    trigger_feather = (dino_max_y, int(dino_max_x + int(coef*12)*pw)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     jumping = False 
														 | 
														
														 | 
														
															     jumping = False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     taking = False 
														 | 
														
														 | 
														
															     taking = False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     laing = False 
														 | 
														
														 | 
														
															     laing = False 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -147,7 +146,7 @@ if __name__ == '__main__': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             gui.keyDown('space') 
														 | 
														
														 | 
														
															             gui.keyDown('space') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             jumping = True 
														 | 
														
														 | 
														
															             jumping = True 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        elif jumping and binScreen[trigger_second[0], trigger_second[1]] == 0 and binScreen[trigger_feather[0], trigger_feather[1]] == 0: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        elif jumping and binScreen[trigger_second[0], trigger_second[1]+(int(coef-1)*pw)] == 0 and binScreen[trigger_feather[0], trigger_feather[1]+(int(coef-1)*pw)] == 0: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             print('taking') 
														 | 
														
														 | 
														
															             print('taking') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             gui.keyUp('space') 
														 | 
														
														 | 
														
															             gui.keyUp('space') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             gui.keyDown('down') 
														 | 
														
														 | 
														
															             gui.keyDown('down') 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -159,19 +158,17 @@ if __name__ == '__main__': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             gui.keyUp('down') 
														 | 
														
														 | 
														
															             gui.keyUp('down') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             taking = False 
														 | 
														
														 | 
														
															             taking = False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if time() - start > 8: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if time() - start > 15: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             print(time() - start) 
														 | 
														
														 | 
														
															             print(time() - start) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             coef += 0.1 
														 | 
														
														 | 
														
															             coef += 0.1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             trigger_second = (trigger_second[0], trigger_second[1]+pw) 
														 | 
														
														 | 
														
															             trigger_second = (trigger_second[0], trigger_second[1]+pw) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             trigger_feather = (trigger_feather[0], trigger_feather[1]+pw) 
														 | 
														
														 | 
														
															             trigger_feather = (trigger_feather[0], trigger_feather[1]+pw) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            # trigger_first = (trigger_first[0], trigger_first[0]+int(pw)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             start = time() 
														 | 
														
														 | 
														
															             start = time() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if DEBUG:  
														 | 
														
														 | 
														
															         if DEBUG:  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             rgbScreen = binary_to_RGB(binScreen) 
														 | 
														
														 | 
														
															             rgbScreen = binary_to_RGB(binScreen) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cv2.circle(rgbScreen, trigger_feather[::-1], radius=2, color=(255, 0, 0), thickness=2) 
														 | 
														
														 | 
														
															             cv2.circle(rgbScreen, trigger_feather[::-1], radius=2, color=(255, 0, 0), thickness=2) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cv2.circle(rgbScreen, trigger_second[::-1], radius=2, color=(0, 255, 0), thickness=2) 
														 | 
														
														 | 
														
															             cv2.circle(rgbScreen, trigger_second[::-1], radius=2, color=(0, 255, 0), thickness=2) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            cv2.circle(rgbScreen, trigger_first[::-1], radius=2, color=(0, 0, 255), thickness=2) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cv2.imshow('View', rgbScreen) 
														 | 
														
														 | 
														
															             cv2.imshow('View', rgbScreen) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															          
														 | 
														
														 | 
														
															          
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |