ALColorBlobDetection API

NAOqi Vision - Overview | API


Namespace : AL

#include <alproxies/alcolorblobdetectionproxy.h>

Methods

void ALColorBlobDetectionProxy::setColor(int r, int g, int b, int colorThres)

Set the color of the blob to find (in RGB space).

Parameters:
  • R – the Red component, from 0 to 255, of the RGB color to find.
  • G – the Green component, from 0 to 255, of the RGB color to find.
  • B – the Blue component, from 0 to 255, of the RGB color to find.
  • colorThres – the threshold of the color match, from 0 to 255.
void ALColorBlobDetectionProxy::setObjectProperties(int minSize, float span, std::string shape)

There are two overloads of this function:

Set some properties of the blob to find.

Parameters:
  • minSize – the minimum size of the blob (in pixels)
  • span – span of the object in meters (e.g. for a ball, the diameter)
  • shape – shape of the object, use “Circle” if the object to find is circular, “Unknown” otherwise
void ALColorBlobDetectionProxy::setObjectProperties(int minSize, float span)

Set some properties of the blob to find. By using this function, the shape of the object is automatically set to “Unknown”.

Parameters:
  • minSize – the minimum size of the blob (in pixels)
  • span – span of the object in meters (e.g. for a ball, the diameter)
AL::ALValue ALColorBlobDetectionProxy::getCircle()

Retrieve the circle surrounding the blob.

Returns:the outer circle of the found blob as a vector of 3 values: x,y,radius
bool ALColorBlobDetectionProxy::getAutoExposure()

Get the status of the auto exposure option of the camera.

Returns:false if deactivated, true if activated.
void ALColorBlobDetectionProxy::setAutoExposure(bool mode)

Set the status of the auto exposure option of the camera.

Parameters:
  • mode – true: on, false: off.

Events

Event: "ALTracker/ColorBlobDetected"
callback(std::string eventName, AL::ALValue value, std::string subscriberIdentifier)

Raised when a color blob is detected.

Parameters:
  • eventName (std::string) – “ALTracker/ColorBlobDetected”
  • value – information related to the blob, with a structure that can be used with function ALTrackerProxy::trackEvent() of the module ALTracker.
  • subscriberIdentifier (std::string) –