ALBacklightingDetection API

NAOqi Vision - Overview | API

Namespace : AL

#include <alproxies/albacklightingdetectionproxy.h>

ALMemory Keys list

Methods inherited from ALVisionExtractor

int ALBacklightingDetectionProxy::getActiveCamera()
Returns:Index of the active camera (0: top camera, 1: bottom camera)
int ALBacklightingDetectionProxy::getFrameRate()
Returns:Current extractor framerate in frames per second (range: 1-30 fps)
int ALBacklightingDetectionProxy::getResolution()
Returns:Index of the current resolution (0: QQVGA, 1: QVGA, 2: VGA, 3: 4VGA)
bool ALBacklightingDetectionProxy::isPaused()
Returns:True if the extractor is paused (subscribed but not running).
bool ALBacklightingDetectionProxy::isProcessing()
Returns:True if the extractor is processing images (at least one subscriber).
bool ALBacklightingDetectionProxy::setActiveCamera(const int& cameraId)

Sets the camera from which the processed images will be taken. This does not change the active camera for other modules.

Parameters:
  • cameraId – Index of the desired camera.
Returns:

True if the active camera has been successfully set.

Warning

If you use this function, the active camera of this module will not be linked to the “default” camera of the robot anymore. This means that the function setParam(kCameraSelectID) will not affect the active camera of this module. If you want the module to follow the “default” camera again, you can use the function ALBacklightingDetectionProxy::setActiveCamera(-1).

bool ALBacklightingDetectionProxy::setFrameRate(const int& framerate)

Sets the extractor framerate (the number of processes per second).

Parameters:
  • framerate – Desired framerate: must be between 1 and 30.
Returns:

True if the framerate has been successfully changed.

bool ALBacklightingDetectionProxy::setResolution(const int& resolution)

Sets the resolution of the image to be processed.

Parameters:
  • resolution – Desired resolution. 0: QQVGA, 1: QVGA, 2: VGA, 3: 4VGA.
Returns:

True if the resolution has been successfully changed.

Events

Event: "BacklightingDetected"
callback(std::string eventName, std::string subscriberIdentifier)

Raised when a backlighting situation was just detected (the backlighting value just turned to 2). This event is raised only once for each backlighting situation : as long as the backlighting value equals 2, the event is not raised another time.

Note

This event should be prefixed by BacklightingDetection/ when subscribing to it.

ALMemory Keys

int BacklightingValue

Value of the backlighting measured for each frame (0, 1 or 2, see the explanation in the overview).

Full name in ALMemory: BacklightingDetection/BacklightingValue