# ALGazeAnalysis API¶

Namespace : AL


#include <alproxies/algazeanalysisproxy.h>



## Method list ¶

class ALGazeAnalysisProxy
• As any module, this module inherits methods from ALModule API.
• It also inherits methods from ALExtractor API.
• It also has the following specific methods:

## Methods ¶

float ALGazeAnalysisProxy::getTolerance()

See ALGazeAnalysis for details about the Tolerance value.

Returns: Current value of the Tolerance for gaze analysis.
void ALGazeAnalysisProxy::setTolerance(const float& tolerance)

Sets the value of the Tolerance for gaze analysis. See ALGazeAnalysis for details about the Tolerance value.

Parameters: tolerance – New Tolerance value (between 0 and 1).
bool ALGazeAnalysisProxy::isFaceAnalysisEnabled()

Deprecated since version 1.22: This module has only one mode of operation.

Returns: false.
void ALGazeAnalysisProxy::setFaceAnalysisEnabled(const bool& status)

Deprecated since version 1.22: This module has only one mode of operation.

## Events ¶

Event: "GazeAnalysis/PersonStartsLookingAtRobot"
callback(std::string eventName, int id, std::string subscriberIdentifier)

Raised when someone turns his head towards the robot.

Parameters: eventName (std::string) – “GazeAnalysis/PersonStartsLookingAtRobot” id – ID of the person subscriberIdentifier (std::string) –
Event: "GazeAnalysis/PersonStopsLookingAtRobot"
callback(std::string eventName, int id, std::string subscriberIdentifier)

Raised when someone turns his head away from the robot.

Parameters: eventName (std::string) – “GazeAnalysis/PersonStopsLookingAtRobot” id – ID of the person subscriberIdentifier (std::string) –
Event: "GazeAnalysis/PeopleLookingAtRobot"
callback(std::string eventName, AL::ALValue idList, std::string subscriberIdentifier)

Raised each time the list of people looking at the robot changes.

Parameters: eventName (std::string) – “GazeAnalysis/PeopleLookingAtRobot” idList – list of the IDs of the people looking at the robot. subscriberIdentifier (std::string) –

## ALMemory Keys ¶

AL::ALValue PeoplePerception/Person/<ID>/EyeOpeningDegree

Opening degree of each eye in the form [leftEye, rightEye] where each value is between 0 and 1 (0 means that the eye is open, 1 means that it is closed). Left and right are taken from the person’s point of view, which means that the left eye is seen on the right in the camera image and conversely. <ID> is the ID of the person (see ALPeoplePerception API).

AL::ALValue PeoplePerception/Person/<ID>/GazeDirection

Gaze direction in the form [yaw, pitch] in radians. The gaze direction is computed relative to the plane of the face. <ID> is the ID of the person (see ALPeoplePerception API).