Skip to content
Snippets Groups Projects
Commit 75658821 authored by shreyasb's avatar shreyasb
Browse files

PC updates

parent af9c5512
Branches
No related tags found
No related merge requests found
Old reference photos/background.jpg

63.1 KiB | W: | H:

Old reference photos/background.jpg

569 KiB | W: | H:

Old reference photos/background.jpg
Old reference photos/background.jpg
Old reference photos/background.jpg
Old reference photos/background.jpg
  • 2-up
  • Swipe
  • Onion skin
background.jpg

569 KiB | W: | H:

background.jpg

407 KiB | W: | H:

background.jpg
background.jpg
background.jpg
background.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -10,7 +10,7 @@ import socket
from signal import SIGINT, signal
tobii_ip = '192.168.71.50'
tobiiglasses = TobiiGlassesController(tobii_ip, video_scene=True)
tobiiglasses = TobiiGlassesController(tobii_ip, video_scene=False)
def main():
......@@ -35,7 +35,7 @@ def main():
exit(1)
camera_rate = 30
num_apriltags = 15
num_apriltags = 11 # Number of apriltags in the background image
test_time = 60
cap = cv2.VideoCapture(0)
......@@ -180,6 +180,9 @@ def main():
gaze_mapped[1] = gaze_mapped[1] / 1080*360
H = get_hom(result, fix)
gaze3[0] = -gaze3[0]
gaze3[1] = -gaze3[1]
if H is not None:
gaze_mapped = np.dot(H, gaze_mapped)
gaze_mapped = gaze_mapped/gaze_mapped[2]
......@@ -201,10 +204,10 @@ def main():
gaze_screen = 1
elif gaze_mapped[0] > s2_min_x and gaze_mapped[1] > s2_min_y and gaze_mapped[0] < s2_max_x and gaze_mapped[1] < s2_max_y: # and gaze_mapped[1] > 180:
# LOOKING AT SCREEN2 ######
print("Looking at screen 2", end='\r')
gaze_screen = 2
# elif gaze_mapped[0] > s2_min_x and gaze_mapped[1] > s2_min_y and gaze_mapped[0] < s2_max_x and gaze_mapped[1] < s2_max_y: # and gaze_mapped[1] > 180:
# # LOOKING AT SCREEN2 ######
# print("Looking at screen 2", end='\r')
# gaze_screen = 2
elif gaze_mapped[0] > s3_min_x and gaze_mapped[1] > s3_min_y and gaze_mapped[0] < s3_max_x and gaze_mapped[1] < s3_max_y:
# LOOKING AT SCREEN 3 ###
......
......@@ -23,8 +23,8 @@ def main():
elapsed = 0
while elapsed < 2:
data = tobiiglasses.get_data()
if 'gp3' in data.keys():
data = data['gp3']
if 'left_eye' in data.keys():
data = data['left_eye']
print(data)
time.sleep(0.01)
elapsed = time.time() - start
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment