AOI matchers

ArGaze provides ready-to-use AOI matching algorithms.

The JSON samples have to be included inside ArLayer configuration aoi_matcher entry to select an algorithm.

"aoi_matcher": {
    JSON sample
}

Read more about AOIMatcher base class in code reference.

Note

The members indicated as property are what returns the matcher.

Deviation circle coverage

Bases: GazeFeatures.AOIMatcher

Matching algorithm based on fixation's deviation circle coverage over AOI.

coverage_threshold: float property writable

Minimal coverage ratio to consider a fixation over an AOI (1 means that whole fixation's deviation circle have to be over the AOI).

draw(image, aoi_scene, draw_matched_fixation=None, draw_matched_region=None, draw_looked_aoi=None, update_looked_aoi=False, looked_aoi_name_color=None, looked_aoi_name_offset=(0, 0))

Draw matching into image.

Parameters:
  • image (numpy.array) –

    where to draw

  • aoi_scene (AOIFeatures.AOIScene) –

    to refresh looked aoi if required

  • draw_matched_fixation (dict, default: None ) –

    Fixation.draw parameters (which depends on the loaded gaze movement identifier module, if None, no fixation is drawn)

  • draw_matched_region (dict, default: None ) –

    AOIFeatures.AOI.draw parameters (if None, no matched region is drawn)

  • draw_looked_aoi (dict, default: None ) –

    AOIFeatures.AOI.draw parameters (if None, no looked aoi is drawn)

  • update_looked_aoi (bool, default: False ) –
  • looked_aoi_name_color (tuple, default: None ) –

    color of text (if None, no looked aoi name is drawn)

  • looked_aoi_name_offset (tuple, default: (0, 0) ) –

    offset of text from the upper left aoi bounding box corner

looked_aoi()

Get most likely looked aoi for current fixation (e.g. the aoi with the highest coverage mean value)

looked_aoi_name()

Get most likely looked aoi name for current fixation (e.g. the aoi with the highest coverage mean value)

looked_probabilities()

Get probabilities to be looked by current fixation for each aoi.

Note

aoi where fixation deviation circle never passed the coverage threshold will be missing.

match(gaze_movement, aoi_scene)

Returns AOI with the maximal fixation's deviation circle coverage if above coverage threshold.

JSON sample

"argaze.GazeAnalysis.DeviationCircleCoverage.AOIMatcher": {
    "coverage_threshold": 0.5
}

Focus point inside

Bases: GazeFeatures.AOIMatcher

Matching algorithm based on fixation's focus point.

draw(image, aoi_scene, draw_matched_fixation=None, draw_looked_aoi=None, looked_aoi_name_color=None, looked_aoi_name_offset=(0, 0))

Draw matching into image.

Parameters:
  • image (numpy.array) –

    where to draw

  • aoi_scene (AOIFeatures.AOIScene) –

    to refresh looked aoi if required

  • draw_matched_fixation (dict, default: None ) –

    Fixation.draw parameters (which depends on the loaded gaze movement identifier module, if None, no fixation is drawn)

  • draw_looked_aoi (dict, default: None ) –

    AOIFeatures.AOI.draw parameters (if None, no looked aoi is drawn)

  • looked_aoi_name_color (tuple, default: None ) –

    color of text (if None, no looked aoi name is drawn)

  • looked_aoi_name_offset (tuple, default: (0, 0) ) –

    offset of text from the upper left aoi bounding box corner

looked_aoi()

Get most likely looked aoi for current fixation.

looked_aoi_name()

Get most likely looked aoi name for current fixation.

match(gaze_movement, aoi_scene)

Returns AOI containing fixation focus point.

JSON sample

"argaze.GazeAnalysis.FocusPointInside.AOIMatcher": {}