Esempio n. 1
1
    d = [ [0] * x for i in range(y) ]

    for eyetrack in eyetrackList:
        ex = eyetrack["AbsoluteX"]
        ey = eyetrack["AbsoluteY"]
        print("X:",ex,"Y:",ey)
        d[ey][ex] += 1
        print("New total:", d[ey][ex])
        
    return d

def refineTimeframe(eyetrackList, timeframe=(0, 60000)):
    rtn = []
    for et in eyetrackList:
        time = et["Time"]
        if time >= timeframe[0] and time <= timeframe[1]:
            rtn.append(et)
    return rtn

#print(type(eyetrackList[1]))
#print "Total Eyetrack Events:", len(eyetrackList) 
#refinedList = refineTimeframe(eyetrackList, (3000,4000))
#print "Events w/in seconds 3 and 4:", len(refinedList) 
#makeDataMap(refinedList)
#print(makeDataMap(eyetrackList))
#pprint(makeDataMap(eyetrackList))


#Task2.run(sessions,eventList,eyetrackList)
Task4.run(sessions,eventList,eyetrackList)
Esempio n. 2
0
# Central points of gaze mean the "clusters" of gaze. If this doesn't make sense, please
# ask for clarification or skip it.
########################################

# ...

########################################################################################
# 3b) Create a separate movie showing this.
########################################

########################################################################################
# 4) Figure out how to overlay the pictures on top of the actual video. The video can
# be found here: http://g3.eyetrackshop.com/content/CT13C39DD417BLYWHILLT-SJJ
########################################

Task4.run(sessions, eventList, eyetrackList)

########################################################################################
# 5) Output a quality report in a test file, listing the % of sessions which are:
#     Complete - attribute session.last_state = "7.COMPLETE"
#     Usable - attribute eyetrack.quality = "GOOD"
#     Group eyetrack.quality failure reasons and output % of each
########################################

########################################################################################
# 6) For each frame, add 4 'area of interest' rectangles which are the 4 quadrants of
# the image. On each eye tracking frame, output a % noting in the middle of the frame in text
# which says what percent of people who have data during that time period were looking
# within the area of interest.
########################################