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.

Author:
  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 | aCamera

## 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 Returns: A pointer to the instance

void Camera::getColorFrame | ( | colimage & | aColorImage | ) |

  | This methods takes an image from the color camera Parameters:
  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 Parameters:
  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 Returns: true if successful

bool Camera::release | ( |  | ) | `[protected]`

| Releases the camera after usage. Is automatically called by the destructor Returns: true if successful

## Member Data Documentation

Camera Camera::aCamera`[static, private]`

| The single instance that exists of this class See also: Camera::getCamera()

ServoHandle Camera::cameraServoHandle`[private]`

| Used internally to control the camera servo