
This class abstracts an asynchronous Beobot camera. More...
#include <Beobot/BeobotCamera.H>


Public Member Functions | |
| BeobotCamera (OptionManager &mgr, const std::string &descrName="Beobot Camera", const std::string &tagName="BeobotCamera") | |
| Constructor. | |
| void | setListener (rutz::shared_ptr< BeobotCameraListener > &listener) |
| Install a callback (listener). | |
| ~BeobotCamera () | |
| Destructor. | |
| void | grab (Image< PixRGB< byte > > &image, int &frame) |
| Get a current view of the world. | |
| void | run () |
| Running thread. | |
Protected Member Functions | |
| void | start2 () |
| get started | |
| void | stop1 () |
| get stopped | |
This class abstracts an asynchronous Beobot camera.
This class continually grabs frames (in a thread) and makes them available to other classes, under the control of a mutex. By default, there is no listener, and users can just asynchronously query the BeobotCamera to get the most recent frame. Alternatively, users may register a BeobotCameraListener which will be called each time a new frame is grabbed.
Definition at line 74 of file BeobotCamera.H.
| BeobotCamera::BeobotCamera | ( | OptionManager & | mgr, | |
| const std::string & | descrName = "Beobot Camera", |
|||
| const std::string & | tagName = "BeobotCamera" | |||
| ) |
Constructor.
Definition at line 57 of file BeobotCamera.C.
References ModelComponent::addSubComponent().
| BeobotCamera::~BeobotCamera | ( | ) |
Destructor.
Definition at line 75 of file BeobotCamera.C.
Get a current view of the world.
This function returns the last grabbed frame and also a frame number
Definition at line 109 of file BeobotCamera.C.
References Image< T >::getArrayPtr(), Image< T >::getDims(), Image< T >::getSize(), image, and Image< T >::resize().
| void BeobotCamera::run | ( | ) |
Running thread.
Do not call directly, this is called by our grabbing thread
Definition at line 98 of file BeobotCamera.C.
References rutz::shared_ptr< T >::get().
| void BeobotCamera::setListener | ( | rutz::shared_ptr< BeobotCameraListener > & | listener | ) |
Install a callback (listener).
This callback will be called eahc time a frame is grabbed.
Definition at line 79 of file BeobotCamera.C.
| void BeobotCamera::start2 | ( | ) | [protected, virtual] |
get started
Reimplemented from ModelComponent.
Definition at line 83 of file BeobotCamera.C.
References Image< T >::resize().
| void BeobotCamera::stop1 | ( | ) | [protected, virtual] |
1.6.3