-
Notifications
You must be signed in to change notification settings - Fork 0
/
reading.py
52 lines (38 loc) · 1.23 KB
/
reading.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from win32api import GetSystemMetrics
import numpy as np
from tkinter import *
from PIL import Image, ImageTk
# This doesn't really do anything anymore
def main(imagePath):
'''
libtime.expstart()
# create keyboard object
kb = keyboard.Keyboard()
# display and screen object
disp = display.Display(dispsize = [GetSystemMetrics(0), GetSystemMetrics(1)])
scr = screen.Screen(dispsize = [GetSystemMetrics(0), GetSystemMetrics(1)])
# Wait to initilaze eye tracker until plugged in
# create eyelink object
#eyetracker = EyeTracker(disp, trackertype='dummy')
# eyelink calibration
#eyetracker.calibrate()
scr.draw_image(imagePath)
if not kb.get_key()[0] == None:
scr.clear()
disp.close()
eyetracker.close()
libtime.expend()
# start timing
#libtime.expstart()
'''
master = Tk()
master.geometry('1536x864')
canvas = Canvas(master)
readImage = Image.open(imagePath)
photoImage = ImageTk.PhotoImage(readImage)
label = Label(canvas, image=photoImage)
label.image=photoImage
label.pack()
#imagesprite = canvas.create_image(GetSystemMetrics(0),GetSystemMetrics(1),image=photoImage)
mainloop()
main('images/oregontrail_reading_1.jpg')