Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tobii-gaze-mapping
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shreyasb
tobii-gaze-mapping
Commits
75658821
Commit
75658821
authored
4 years ago
by
shreyasb
Browse files
Options
Downloads
Patches
Plain Diff
PC updates
parent
af9c5512
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Old reference photos/background.jpg
+0
-0
0 additions, 0 deletions
Old reference photos/background.jpg
background.jpg
+0
-0
0 additions, 0 deletions
background.jpg
map_and_send.py
+9
-6
9 additions, 6 deletions
map_and_send.py
tobiiglassesdata.py
+2
-2
2 additions, 2 deletions
tobiiglassesdata.py
with
11 additions
and
8 deletions
Old reference photos/background.jpg
+
0
−
0
View replaced file @
af9c5512
View file @
75658821
63.1 KiB
|
W:
|
H:
569 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
background.jpg
+
0
−
0
View replaced file @
af9c5512
View file @
75658821
569 KiB
|
W:
|
H:
407 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
map_and_send.py
+
9
−
6
View file @
75658821
...
...
@@ -10,7 +10,7 @@ import socket
from
signal
import
SIGINT
,
signal
tobii_ip
=
'
192.168.71.50
'
tobiiglasses
=
TobiiGlassesController
(
tobii_ip
,
video_scene
=
Tru
e
)
tobiiglasses
=
TobiiGlassesController
(
tobii_ip
,
video_scene
=
Fals
e
)
def
main
():
...
...
@@ -35,7 +35,7 @@ def main():
exit
(
1
)
camera_rate
=
30
num_apriltags
=
1
5
num_apriltags
=
1
1
# 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 ###
...
...
This diff is collapsed.
Click to expand it.
tobiiglassesdata.py
+
2
−
2
View file @
75658821
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment