ALMovementDetection API

NAOqi Vision - Overview | API

Namespace : AL

#include <alproxies/almovementdetectionproxy.h>

Events lists

ALMemory Keys list

Methods

bool ALMovementDetectionProxy::setSensitivity(const float& sensitivity)

Sets the value of the optical flow sensitivity for the detection. Please refer to ALMovementDetection for details.

Parameters:
  • sensitivity – Value of the new sensitivity.
Returns:

True if the update succeeded.

void ALMovementDetectionProxy::getSensitivity(const float& sensitivity)
Returns:The current optical flow sensitivity. Please refer to ALMovementDetection for details.

Methods inherited from ALVisionExtractor

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

bool ALMovementDetectionProxy::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 ALMovementDetectionProxy::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: "MovementDetected"
callback(std::string eventName, std::string subscriberIdentifier)

Raised each time a movement is detected.

Note

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

ALMemory Keys

int MovementInfo

Contains the information about the detected movement. Please refer to ALMovementDetection for details.

Full name in ALMemory: MovementDetection/MovementInfo