ALVisionExtractor is a generic vision extractor.
More...
#include <alvision/alvisionextractor.h>
List of all members.
Public Member Functions |
| ALVisionExtractor (boost::shared_ptr< ALBroker > pBroker, const std::string &pName, int resolution=kQVGA, int colorspace=kBGRColorSpace, int framerate=30) |
| Create a generic vision extractor.
|
bool | setColorSpace (const int &colorSpace) |
| Sets processed image colorspace on the fly.
|
bool | setFrameRate (const int &framerate) |
| Sets extractor framerate on the fly.
|
bool | setResolution (const int &resolution) |
| Sets processed image resolution on the fly.
|
bool | setActiveCamera (const int &cameraId) |
| Sets the camera from which the image is taken.
|
int | getColorSpace () |
int | getFrameRate () |
int | getResolution () |
int | getActiveCamera () |
bool | isPaused () |
bool | isProcessing () |
QI_API_DEPRECATED void | setParameter (const std::string ¶mName, const ALValue ¶mValue) |
| Set parameter value for resolution and pause.
|
virtual void | start ()=0 |
| Method which will be called before each subscription to the extractor.
|
virtual void | process (ALImage *img)=0 |
| Method which will be called each time the extractor gets an image.
|
void | pause (const bool &paused) |
| Pause the extractor, without calling the stop method.
|
virtual void | stop ()=0 |
| Method which will be called when the module is unsubscribed.
|
Additional Inherited Members |
Detailed Description
ALVisionExtractor is a generic vision extractor.
ALVisionExtractor is an extractor dedicated to vision processing. It retrieves images from one of NAO's cameras, and gives them as input to a callback method process(). This method will be called each time an image is retrieved.
The parameters concerning the image retrieval (resolution, colorspace, camera and framerate) can be set either at the construction (which is recommended) if you do not have to change them, or on the fly using dedicated method.
Definition at line 36 of file alvisionextractor.h.
Constructor & Destructor Documentation
AL::ALVisionExtractor::ALVisionExtractor |
( |
boost::shared_ptr< ALBroker > |
pBroker, |
|
|
const std::string & |
pName, |
|
|
int |
resolution = kQVGA , |
|
|
int |
colorspace = kBGRColorSpace , |
|
|
int |
framerate = 30 |
|
) |
| |
Create a generic vision extractor.
- Parameters:
-
resolution | Resolution of the images the extractor will process at module startup. Default value is 1 (QVGA resolution). |
colorspace | Colorspace of the images the extractor will process at module startup. Default value is BGR colorspace. |
framerate | Framerate of the images the extractor will process at module startup. Default value is 30. |
Member Function Documentation
void AL::ALVisionExtractor::pause |
( |
const bool & |
paused | ) |
|
Pause the extractor, without calling the stop method.
- Parameters:
-
paused | true if the extractor must be paused, false else. |
virtual void AL::ALVisionExtractor::process |
( |
ALImage * |
img | ) |
|
|
pure virtual |
Method which will be called each time the extractor gets an image.
- Parameters:
-
img | Pointer to the image class, which is retrieved according to the extractor parameters (colorspace, framerate, resolution, camera). |
bool AL::ALVisionExtractor::setActiveCamera |
( |
const int & |
cameraId | ) |
|
Sets the camera from which the image is taken.
- Parameters:
-
resolution | Desired camera ID. |
- Returns:
- True if the camera has been successfully set.
bool AL::ALVisionExtractor::setColorSpace |
( |
const int & |
colorSpace | ) |
|
Sets processed image colorspace on the fly.
- Parameters:
-
colorspace | Desired colorspace. |
- Returns:
- True if the colorspace has been successfully set.
bool AL::ALVisionExtractor::setFrameRate |
( |
const int & |
framerate | ) |
|
Sets extractor framerate on the fly.
- Parameters:
-
framerate | Desired extractor framerate. |
- Returns:
- True if the framerate has been successfully set.
QI_API_DEPRECATED void AL::ALVisionExtractor::setParameter |
( |
const std::string & |
paramName, |
|
|
const ALValue & |
paramValue |
|
) |
| |
Set parameter value for resolution and pause.
- Parameters:
-
paramName | Name of the parameter to set ("resolution" or "pause") |
paramValue | ALValue array of the value to be set. |
- Deprecated:
- Use setResolution or pause instead.
bool AL::ALVisionExtractor::setResolution |
( |
const int & |
resolution | ) |
|
Sets processed image resolution on the fly.
- Parameters:
-
resolution | Desired resolution. |
- Returns:
- True if the resolution has been successfully set.
The documentation for this class was generated from the following file: