ALColorBlobDetection API¶
NAOqi Vision - Overview | API
Namespace : AL
#include <alproxies/alcolorblobdetectionproxy.h>
Method list¶
-
class
ALColorBlobDetectionProxy
¶
- As any module, this module inherits methods from ALModule API.
- It also inherits methods from ALExtractor API.
Event list¶
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:
- ALColorBlobDetectionProxy::setObjectProperties
- ALColorBlobDetectionProxy::setObjectProperties without the shape argument.
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 in relative coordinates in the image (i.e. between 0 and 1). For example in VGA (640x480), for a circle of 50 pixels in radius and a center located at (123, 71), this function would return [123/640, 71/480, 50/640].
Events¶
-
Event:callback(std::string eventName, AL::ALValue value, std::string subscriberIdentifier)¶
"ALTracker/ColorBlobDetected"
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) –