Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Camera Class Reference

#include <Camera.h>

List of all members.

Detailed Description

This class provides methods to access the robot camera. The class is designed as a singleton class. This is to ensure that the camera initialization process is only executed once as multiple initializations will result in errors. So at any given time there is at most one instance of the class. The method Camera::getCamera() is used to access that instance.
Jia L. Du

Public Member Functions

bool initialize ()
void getFrame (image &aImage)
void getColorFrame (colimage &aColorImage)

Static Public Member Functions

Camera * getCamera ()

Protected Member Functions

 Camera ()
 ~Camera ()
bool release ()

Private Attributes

ServoHandle cameraServoHandle

Static Private Attributes

Camera cameras [NUMBER_OF_ROBOTS]

Constructor & Destructor Documentation

Camera::Camera   [protected]

Camera::~Camera   [protected]

Member Function Documentation

Camera * Camera::getCamera   [static]

This method is used to get the instance of this singleton class

A pointer to the instance

void Camera::getColorFrame colimage &    aColorImage

This methods takes an image from the color camera

aColorImage A reference to the color image

void Camera::getFrame image &    aImage

This methods takes an image from the color camera and converts it to grayscale

aImage A reference to the image

bool Camera::initialize  

Initializes the camera for usage. Should automatically be called by the constructor. But as the EyeSim simulator is not able to execute RoBIOS library functions in class constructors, we have declared this method as public and need to call this method manually in main

true if successful

bool Camera::release   [protected]

Releases the camera after usage. Is automatically called by the destructor

true if successful

Member Data Documentation

Camera Camera::cameras [static, private]

The single instance that exists of this class

See also:

ServoHandle Camera::cameraServoHandle [private]

Used internally to control the camera servo

Generated on Mon Aug 26 18:34:08 2002 for Cube Clustering by doxygen1.3-rc3