ipa_CameraSensors::AbstractColorCamera Class Reference

#include <AbstractColorCamera.h>

Inheritance diagram for ipa_CameraSensors::AbstractColorCamera:
Inheritance graph
[legend]

List of all members.

Classes

struct  t_ColorCameraParameters

Public Member Functions

virtual unsigned long Close ()=0
virtual t_cameraType GetCameraType ()
virtual unsigned long GetColorImage (cv::Mat *colorImage, bool getLatestFrame=true)=0
unsigned long GetColorImage (char *colorImageData, bool getLatestFrame=true)
virtual int GetNumberOfImages ()
virtual unsigned long GetProperty (t_cameraProperty *cameraProperty)=0
virtual unsigned long Init (std::string directory, int cameraIndex=0)=0
virtual bool isInitialized ()
virtual bool isOpen ()
virtual unsigned long Open ()=0
virtual unsigned long PrintCameraInformation ()=0
virtual unsigned long SaveParameters (const char *filename)=0
virtual unsigned long SetPathToImages (std::string path)
virtual unsigned long SetProperty (t_cameraProperty *cameraProperty)=0
virtual unsigned long SetPropertyDefaults ()=0
virtual unsigned long TestCamera (const char *filename)
virtual ~AbstractColorCamera ()
 Destructor.

Protected Attributes

unsigned int m_BufferSize
 Number of images, the camera buffers internally.
t_cameraType m_CameraType
 Camera Type.
t_ColorCameraParameters m_ColorCameraParameters
 Storage for xml configuration file data.
bool m_initialized
 True, when the camera has sucessfully been initialized.
bool m_open
 True, when the camera has sucessfully been opend.

Private Member Functions

virtual unsigned long LoadParameters (const char *filename, int cameraIndex)=0
virtual unsigned long SetParameters ()=0

Detailed Description

An interface for common color cameras. All color/mono cameras that are used within the project must derive from this class to guarantee interoperability with the already existing code.

Definition at line 88 of file AbstractColorCamera.h.


Constructor & Destructor Documentation

AbstractColorCamera::~AbstractColorCamera (  )  [virtual]

Destructor.

Definition at line 62 of file AbstractColorCamera.cpp.


Member Function Documentation

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::Close (  )  [pure virtual]

Close camera device.

Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

t_cameraType AbstractColorCamera::GetCameraType (  )  [virtual]

Returns the camera type.

Returns:
The camera type

Definition at line 66 of file AbstractColorCamera.cpp.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::GetColorImage ( cv::Mat *  colorImage,
bool  getLatestFrame = true 
) [pure virtual]

Retrieves an image from the camera. cv::Mat object is initialized on demand.

Parameters:
colorImage The image that has been acquired by the camera.
getLatestFrame If true, the camera acquires a new frame and returns it. Otherwise, the next frame following the last returned frame is returned from the internal camera buffer.
Exceptions:
IPA_Exception Throws an exception, if camera access failed

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

unsigned long ipa_CameraSensors::AbstractColorCamera::GetColorImage ( char *  colorImageData,
bool  getLatestFrame = true 
) [inline]

Retrieves image data from the color camera.

Parameters:
colorImageData An array to be filled with image data
getLatestFrame True, when the latest picture has to be returned. Otherwise, the next picture following the last call to getLatestFrame is returned.
Returns:
Return code

Reimplemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

Definition at line 149 of file AbstractColorCamera.h.

virtual int ipa_CameraSensors::AbstractColorCamera::GetNumberOfImages (  )  [inline, virtual]

Returns the number of images in the directory

Returns:
The number of images in the directory

Reimplemented in ipa_CameraSensors::VirtualColorCam.

Definition at line 199 of file AbstractColorCamera.h.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::GetProperty ( t_cameraProperty *  cameraProperty  )  [pure virtual]

Function to get properties of the camera sensor.

Parameters:
propertyID The ID of the property.
cameraProperty The value of the property.
Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::Init ( std::string  directory,
int  cameraIndex = 0 
) [pure virtual]

Initializes the color camera. Camera specific constants may be set within the configuration file cameraSensorsIni.xml. The function has to set the member variable m_initialized.

Parameters:
directory Path to the configuration file directory.
cameraIndex It is possible to have several cameras of the same type on the system. One may us the camera index to apply different configuration files to each of them
Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual bool ipa_CameraSensors::AbstractColorCamera::isInitialized (  )  [inline, virtual]

Returns true, when Init() has been called on the camera.

Returns:
Camera initialized or not.

Definition at line 128 of file AbstractColorCamera.h.

virtual bool ipa_CameraSensors::AbstractColorCamera::isOpen (  )  [inline, virtual]

Returns true, when Open() has been called on the camera.

Returns:
Camera opened or not.

Definition at line 132 of file AbstractColorCamera.h.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::LoadParameters ( const char *  filename,
int  cameraIndex 
) [private, pure virtual]

Loads all camera specific parameters from the xml configuration file and saves them in t_ColorCameraParameters. This function is internally called by Init to load the parameters from the xml configuration file.

Parameters:
filename The path to the configuration file.
Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::Open (  )  [pure virtual]

Opens the camera device. All camera specific parameters for opening the camera should have been set within the Init function.

Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::PrintCameraInformation (  )  [pure virtual]

Displays camera information on standard output. Information includes available parameters, color and camera formats.

Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SaveParameters ( const char *  filename  )  [pure virtual]

Saves all parameters on hard disk.

Parameters:
filename The filename of the storage.
Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetParameters (  )  [private, pure virtual]

Sets the loaded parameters.

Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetPathToImages ( std::string  path  )  [inline, virtual]

Function specific to virtual camera. Resets the image directory read from the configuration file.

Parameters:
path The camera path
Returns:
Return code

Reimplemented in ipa_CameraSensors::VirtualColorCam.

Definition at line 205 of file AbstractColorCamera.h.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetProperty ( t_cameraProperty *  cameraProperty  )  [pure virtual]

Function to set properties of the camera sensor.

Parameters:
propertyID The ID of the property.
cameraProperty The value of the property.
Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetPropertyDefaults (  )  [pure virtual]

Function to set property defaults of the camera sensor.

Returns:
Return code.

Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

unsigned long AbstractColorCamera::TestCamera ( const char *  filename  )  [virtual]

Unit Test for the camera interface. Tests each of the single interface functions and displays the output on standard out.

Parameters:
filename Path to the camera initialization xml file.
Returns:
Return code.

Reimplemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.

Definition at line 71 of file AbstractColorCamera.cpp.


Member Data Documentation

Number of images, the camera buffers internally.

Definition at line 219 of file AbstractColorCamera.h.

Camera Type.

Definition at line 217 of file AbstractColorCamera.h.

Storage for xml configuration file data.

Definition at line 215 of file AbstractColorCamera.h.

True, when the camera has sucessfully been initialized.

Definition at line 212 of file AbstractColorCamera.h.

True, when the camera has sucessfully been opend.

Definition at line 213 of file AbstractColorCamera.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


cob_camera_sensors
Author(s): Jan Fischer
autogenerated on Fri Jan 11 10:01:13 2013