ALVisionRecognition API

NAOqi Vision - Overview | API | Tutorial


Namespace : AL

#include <alproxies/alvisionrecognitionproxy.h>

Method list

class ALVisionRecognitionProxy

Event list

Methods

bool ALVisionRecognitionProxy::changeDatabase(const std::string& databasePath, const std::string& databaseName)

By default the database is composed of several files with the same name “database” and different extensions. It is located on the robot in “/home/nao/naoqi/share/naoqi/vision/visionrecognition/current/” folder (1.10 SDK and below) or “/home/nao/.local/share/naoqi/vision/visionrecognition/current/” folder (1.12 SDK and higher). This method allows to choose another database by providing its name and folder (Teaching NAO to recognize objects).

Parameters:
  • databasePath – Absolute path of the database on the robot, or “” to set default path.
  • databaseName – Name of the database (without extension), or “” to set default database name.
Returns:

true if success.

std::string ALVisionRecognitionProxy::getParam(const std::string& paramName)

Get vision recognition parameters. Available parameters are:

  • “db_path”: database path on the robot
  • “db_name”: database name
Parameters:
  • paramName – Name of the parameter to get.
Returns:

Value of the parameter as a string.

void ALVisionRecognitionProxy::setParam(const std::string& paramName, const AL::ALValue& paramValue)

Deprecated since version 1.22: “resolution” can now be set with ALVisionExtractor::setResolution(); “scoreThreshold” is not used anymore.

Events

Event: "PictureDetected"
callback(std::string eventName, AL::ALValue value, std::string subscriberIdentifier)

Raised when a visual pattern previously learned is recognized.

Parameters:
  • eventName (std::string) – “PictureDetected”
  • value – Informations related to the detected picture. Please refer to ALVisionRecognition for details.
  • subscriberIdentifier (std::string) –