$search
#include <AbstractColorCamera.h>
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 |
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 73 of file AbstractColorCamera.h.
AbstractColorCamera::~AbstractColorCamera | ( | ) | [virtual] |
Destructor.
Definition at line 66 of file AbstractColorCamera.cpp.
virtual unsigned long ipa_CameraSensors::AbstractColorCamera::Close | ( | ) | [pure virtual] |
Close camera device.
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
t_cameraType AbstractColorCamera::GetCameraType | ( | ) | [virtual] |
Returns the camera type.
Definition at line 70 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.
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. |
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.
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. |
Reimplemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
Definition at line 134 of file AbstractColorCamera.h.
virtual int ipa_CameraSensors::AbstractColorCamera::GetNumberOfImages | ( | ) | [inline, virtual] |
Returns the number of images in the directory
Reimplemented in ipa_CameraSensors::VirtualColorCam.
Definition at line 184 of file AbstractColorCamera.h.
virtual unsigned long ipa_CameraSensors::AbstractColorCamera::GetProperty | ( | t_cameraProperty * | cameraProperty | ) | [pure virtual] |
Function to get properties of the camera sensor.
propertyID | The ID of the property. | |
cameraProperty | The value of the property. |
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
.
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 |
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.
Definition at line 113 of file AbstractColorCamera.h.
virtual bool ipa_CameraSensors::AbstractColorCamera::isOpen | ( | ) | [inline, virtual] |
Returns true, when Open()
has been called on the camera.
Definition at line 117 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.
filename | The path to the configuration file. |
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.
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.
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.
filename | The filename of the storage. |
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetParameters | ( | ) | [private, pure virtual] |
Sets the loaded parameters.
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.
path | The camera path |
Reimplemented in ipa_CameraSensors::VirtualColorCam.
Definition at line 190 of file AbstractColorCamera.h.
virtual unsigned long ipa_CameraSensors::AbstractColorCamera::SetProperty | ( | t_cameraProperty * | cameraProperty | ) | [pure virtual] |
Function to set properties of the camera sensor.
propertyID | The ID of the property. | |
cameraProperty | The value of the property. |
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.
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.
filename | Path to the camera initialization xml file. |
Reimplemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
Definition at line 75 of file AbstractColorCamera.cpp.
unsigned int ipa_CameraSensors::AbstractColorCamera::m_BufferSize [protected] |
Number of images, the camera buffers internally.
Definition at line 204 of file AbstractColorCamera.h.
t_cameraType ipa_CameraSensors::AbstractColorCamera::m_CameraType [protected] |
Camera Type.
Definition at line 202 of file AbstractColorCamera.h.
Storage for xml configuration file data.
Definition at line 200 of file AbstractColorCamera.h.
bool ipa_CameraSensors::AbstractColorCamera::m_initialized [protected] |
True, when the camera has sucessfully been initialized.
Definition at line 197 of file AbstractColorCamera.h.
bool ipa_CameraSensors::AbstractColorCamera::m_open [protected] |
True, when the camera has sucessfully been opend.
Definition at line 198 of file AbstractColorCamera.h.