#include <AbstractColorCamera.h>
Classes | |
struct | t_ColorCameraParameters |
Public Member Functions | |
virtual unsigned long | Close ()=0 |
virtual t_cameraType | GetCameraType () |
unsigned long | GetColorImage (char *colorImageData, bool getLatestFrame=true) |
virtual unsigned long | GetColorImage (cv::Mat *colorImage, bool getLatestFrame=true)=0 |
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. More... | |
Protected Attributes | |
unsigned int | m_BufferSize |
Number of images, the camera buffers internally. More... | |
t_cameraType | m_CameraType |
Camera Type. More... | |
t_ColorCameraParameters | m_ColorCameraParameters |
Storage for xml configuration file data. More... | |
bool | m_initialized |
True, when the camera has sucessfully been initialized. More... | |
bool | m_open |
True, when the camera has sucessfully been opend. More... | |
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 50 of file AbstractColorCamera.h.
|
virtual |
Destructor.
Definition at line 30 of file AbstractColorCamera.cpp.
|
pure virtual |
Close camera device.
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
|
virtual |
Returns the camera type.
Definition at line 34 of file AbstractColorCamera.cpp.
|
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. |
Definition at line 111 of file AbstractColorCamera.h.
|
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.
|
inlinevirtual |
Returns the number of images in the directory
Reimplemented in ipa_CameraSensors::VirtualColorCam.
Definition at line 161 of file AbstractColorCamera.h.
|
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.
|
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.
|
inlinevirtual |
Returns true, when Init()
has been called on the camera.
Definition at line 90 of file AbstractColorCamera.h.
|
inlinevirtual |
Returns true, when Open()
has been called on the camera.
Definition at line 94 of file AbstractColorCamera.h.
|
privatepure 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.
|
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.
|
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.
|
pure virtual |
Saves all parameters on hard disk.
filename | The filename of the storage. |
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
|
privatepure virtual |
Sets the loaded parameters.
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
|
inlinevirtual |
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 167 of file AbstractColorCamera.h.
|
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.
|
pure virtual |
Function to set property defaults of the camera sensor.
Implemented in ipa_CameraSensors::AVTPikeCam, and ipa_CameraSensors::VirtualColorCam.
|
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 39 of file AbstractColorCamera.cpp.
|
protected |
Number of images, the camera buffers internally.
Definition at line 181 of file AbstractColorCamera.h.
|
protected |
Camera Type.
Definition at line 179 of file AbstractColorCamera.h.
|
protected |
Storage for xml configuration file data.
Definition at line 177 of file AbstractColorCamera.h.
|
protected |
True, when the camera has sucessfully been initialized.
Definition at line 174 of file AbstractColorCamera.h.
|
protected |
True, when the camera has sucessfully been opend.
Definition at line 175 of file AbstractColorCamera.h.