ALVisionToolbox API

NAOqi Vision - Overview | API


Warning

This module is deprecated.

This module is being deprecated and most of its functionalities were moved to several new modules: ALBacklightingDetection, ALDarknessDetection, ALPhotoCapture and ALVideoRecorder.

Use these new modules since ALVisionToolbox will not be maintained in the future.

Namespace : AL

#include <alproxies/alvisiontoolboxproxy.h>

Methods

int ALVisionToolboxProxy::backlighting()

Indicates if NAO’s active camera is in backlighting conditions.

Returns:
  • 0: no backlight
  • 1: possible backlight
  • 2: backlight identified

Deprecated since version 1.14: use module ALBacklightingDetection instead.

void ALVisionToolboxProxy::halfPress()

Optional : prepares camera for shooting (like the auto-focus on standard and digital cameras)

Deprecated since version 1.14: this functionality has been removed from the new API.

int ALVisionToolboxProxy::isItDark()

Tell if NAO’s is in a dark environment.

Returns:
  • [0;4] outdoor
  • [5;100] indoor bright
  • [101;127] indoor artificial light
  • [128;210] indoor weak lights
  • [211;255] dark place

Deprecated since version 1.14: use module ALDarknessDetection instead.

bool ALVisionToolboxProxy::isVideoRecording()
Returns:

Deprecated since version 1.14: use ALVideoRecorderProxy::isRecording() instead.

void ALVisionToolboxProxy::setWhiteBalance(const int& camera)

Set white balance by using NAO’s white hands as reference. A call to this method makes NAO move his arm.

Parameters:
  • camera

    Camera we want to set white balance to :

    • [0] top
    • [1] bottom
    • [2] both

Deprecated since version 1.14: this functionality has been removed from the new API.

void ALVisionToolboxProxy::startVideoRecord(const std::string& videoName)

Start recording a video. The .avi video is stored on the robot in the “/home/nao/recordings/cameras/” folder. The record should be stopped by calling ALVisionToolboxProxy::stopVideoRecord(). Resolution: 320*240, MJPG format, frame rate ~10-15 fps.

Note

Only one record at a time can be made.

param videoName:
 Name of the video file to be recorded

Deprecated since version 1.14: use ALVideoRecorderProxy::startRecording() instead.

void ALVisionToolboxProxy::startVideoRecord_adv(const std::string& videoName, const float& framerate, const std::string& format, const int& resIndex, const int& numFrames)

Start recording a video, with advanced options. Please note that only one record at a time can be made.

Parameters:
  • videoName – Name of the video file to be recorded.
  • framerate – Record frame rate [0.1-50.0]. Warning: MJPG format requires framerate greater than 2.0.
  • format
    • ARV (raw YUV422 format)
    • IYUV (raw avi)
    • MJPG (compressed avi)
  • resIndex – Resolution { 0 = kQQVGA, 1 = kQVGA, 2 = kVGA, 3 = k4VGA }
  • numFrames – Number of frames to record. If equals to -1, it records until stopVideoRecord() is called.

Deprecated since version 1.14: use ALVideoRecorderProxy::startRecording() instead.

void ALVisionToolboxProxy::stopTPR(const std::string& pathAndNameRoot, const std::string& imageRecordFormat)

Stop an instance of ALVisionToolboxProxy::takePictureRegularly().

Parameters:
  • pathAndNameRoot – path and name root of the file we want to stop recording
  • imageRecordFormat – formats of the file we want to stop recording

Deprecated since version 1.14: this functionality has been removed from the new API.

AL::ALValue ALVisionToolboxProxy::stopVideoRecord()

Stop a video record that was launched with ALVisionToolboxProxy::startVideoRecord() or ALVisionToolboxProxy::startVideoRecord_adv(). The function returns the number of frames that were recorded, as well as the video absolute path.

Returns:Array of two elements [numRecordedFrames, recordAbsolutePath]

Deprecated since version 1.14: use ALVideoRecorderProxy::stopRecording() instead.

void ALVisionToolboxProxy::takePicture()

Shoot 3 successives pictures and place them in the “/home/nao/recordings/cameras/” folder.

Note

The call to this method can be shortened by calling ALVisionToolboxProxy::halfPress() before.

Deprecated since version 1.14: use ALPhotoCaptureProxy::takePicture() instead.

void ALVisionToolboxProxy::takePictureRegularly(const float& secondsBetweenTwoShots, const std::string& pathAndNameRoot, const bool& overwriteImage, const std::string& imageRecordFormat, const int& resolution)

Shoot regularly a picture to follow NAO’s evolution in his environment. Up to 8 instances for this blocking function can be launched, as long as pathAndNameRoot and/or imageRecordFormat parameters are different between two instances.

Parameters:
  • secondsBetweenTwoShots – Time in seconds between two pictures
  • pathAndNameRoot – path and the root of the name for the picture
  • overwriteImage
    • if True, one image will be regularly overwritten,
    • if False, new images will be regularly created (each being appended by a timestamp)
  • imageRecordFormat – jpeg, bmp, png
  • resolution – image resolution { 0 = kQQVGA, 1 = kQVGA, 2 = kVGA, 3 = k4VGA }

Deprecated since version 1.14: use ALPhotoCaptureProxy::takePictures() instead.