| |
- AOI
- AOI_Stat
class AOI |
| |
Methods defined here:
- __init__(self, aid, polyin, polyout=[], timeseq=[])
- Inits AOI class
Args:
aid: AOI id
polyin: the polygon defining the boundaries of the AOI in form of a list of (x,y) tuples
polyout: optional polygon inside the boundaries of the AOI that is not part of
the AOI in form of a list of (x,y) tuples
timeseq: the time sequence of the format [(start1, end1), (start2, end2), ...] that
specifies the intervals when this AOI is active
Yields:
an AOI object
- is_active(self, start, end)
- Determines if an AOI is active during the whole given time interval
Args:
start: time interval start
end: time interval end
Returns:
true if the AOI is always active within the given time interval
- is_active_partition(self, start, end)
- Determines if an AOI is partially active during a given time interval
If the AOI is active at any sub-interval of the given time interval returns true
if such sub-interval exists it also returns its start and end that AOI is active otherwise returns False, []
Args:
start: time interval start
end: time interval start
Returns:
A boolean for whether the AOI is active or not
ovelap_part: The subset of the time interval [sub_start,sub_end] that AOI is active or
[] if it is active during the whole interval or not active at all.
- set_coordinates(self, polyin, polyout=[])
- Sets the coordiantes of the AOI
Args:
polyin: the polygon defining the bounderies of the AOI in form of a list of (x,y) tuples
polyout: optional polygon inside the bounderies of the AOI that is not part of the AOI
in form of a list of (x,y) tuples
|
class AOI_Stat |
|
Methods of AOI_Stat calculate and store all features related to the given AOI object |
|
Methods defined here:
- __init__(self, aoi, seg_fixation_data, starttime, endtime, active_aois)
- Inits AOI_Stat class
Args:
aoi: the aoi object for which the statistics are calculated
seg_fixation_data:
starttime:
endtime:
active_aois:list of the AOI objects that will be used for calculating the transitions between this AOI and other AOIs
Yields:
an AOI_Stat object
- get_features(self, featurelist=None)
- Returns the list of names and values of features for this AOI_Stat object
Args:
featurelist: optional list of features. If equal to None the full set of all features will be returned
Returns:
featnames: a list of feature names sorted alphabetically
featvals: a corresponding list of feature values
e.g.
featnames = ['fixationrate', 'length', 'meanabspathangles']
featvals = [0.00268522882294', '1529851', '1.60354714212']
- print_(self)
- Prints the list of features and their values for this AOI_Stat object
| |