NAOqi Vision - Overview | API
ALDarknessDetection enables to check whether or not the robot is in a dark environment.
A darkness value is computed for each frame returned by the camera. This value is stored in the ALMemory. When the robot detects for the first time that that the environment around it is dark (i.e the darkness value is greater than a threshold) an event is raised.
This function first computes a value between 0 and 100 corresponding to the lighting conditions of the environment around the robot:
This value is then compared to a darkness threshold:
The darkness threshold value can be accessed with the function ALDarknessDetectionProxy::getDarknessThreshold(). It has a default value of 60 but it can be changed with the function ALDarknessDetectionProxy::setDarknessThreshold().
The camera AutoExposition parameter (and the AutoGain parameter, if it exists) of the camera must be activated for this module to work properly.