ipa_CameraSensors::AbstractRangeImagingSensor Class Reference

#include <AbstractRangeImagingSensor.h>

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

List of all members.

Classes

struct  t_RangeCameraParameters

Public Member Functions

virtual unsigned long AcquireImages (int widthStepRange, int widthStepGray, int widthStepCartesian, char *rangeImage=NULL, char *grayImage=NULL, char *cartesianImage=NULL, bool getLatestFrame=true, bool undistort=true, ipa_CameraSensors::t_ToFGrayImageType grayImageType=ipa_CameraSensors::INTENSITY_32F1)=0
virtual unsigned long AcquireImages (cv::Mat *rangeImage=0, cv::Mat *intensityImage=0, cv::Mat *cartesianImage=0, bool getLatestFrame=true, bool undistort=true, ipa_CameraSensors::t_ToFGrayImageType grayImageType=ipa_CameraSensors::INTENSITY_32F1)=0
virtual unsigned long Close ()=0
virtual t_CalibrationMethod GetCalibrationMethod ()
virtual t_cameraType GetCameraType ()
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 ()=0
virtual bool isOpen ()=0
virtual unsigned long Open ()=0
virtual unsigned long SaveParameters (const char *filename)=0
virtual unsigned long SetIntrinsics (cv::Mat &intrinsicMatrix, cv::Mat &undistortMapX, cv::Mat &undistortMapY)
virtual unsigned long SetPathToImages (std::string path)
virtual unsigned long SetProperty (t_cameraProperty *cameraProperty)=0
virtual unsigned long SetPropertyDefaults ()=0
virtual ~AbstractRangeImagingSensor ()
 Destructor.

Public Attributes

unsigned int m_ImageCounter
 Holds the index of the image that is extracted during the next call of AcquireImages

Protected Attributes

unsigned int m_BufferSize
 Number of images, the camera buffers internally.
t_CalibrationMethod m_CalibrationMethod
 Calibration method MATLAB, MATLAB_NO_Z or SWISSRANGER.
t_cameraType m_CameraType
 Camera Type.
bool m_initialized
 True, when the camera has sucessfully been initialized.
cv::Mat m_intrinsicMatrix
 Intrinsic parameters [fx 0 cx; 0 fy cy; 0 0 1].
bool m_open
 True, when the camera has sucessfully been opend.
t_RangeCameraParameters m_RangeCameraParameters
 Storage for xml configuration file parmeters.
cv::Mat m_undistortMapX
 The output array of x coordinates for the undistortion map.
cv::Mat m_undistortMapY
 The output array of Y coordinates for the undistortion map.

Private Member Functions

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

Detailed Description

Abstract interface for range imaging sensors.

Definition at line 92 of file AbstractRangeImagingSensor.h.


Constructor & Destructor Documentation

AbstractRangeImagingSensor::~AbstractRangeImagingSensor (  )  [virtual]

Destructor.

Definition at line 62 of file AbstractRangeImagingSensor.cpp.


Member Function Documentation

virtual unsigned long ipa_CameraSensors::AbstractRangeImagingSensor::AcquireImages ( int  widthStepRange,
int  widthStepGray,
int  widthStepCartesian,
char *  rangeImage = NULL,
char *  grayImage = NULL,
char *  cartesianImage = NULL,
bool  getLatestFrame = true,
bool  undistort = true,
ipa_CameraSensors::t_ToFGrayImageType  grayImageType = ipa_CameraSensors::INTENSITY_32F1 
) [pure virtual]

Acquires an image from SwissRanger. This implementation is designated for people that do not use openCV image type.

Parameters:
widthStepRange The stride of a row from the range image.
widthStepGray The stride of a row from the grayscale intensity image.
widthStepCartesian The stride of a row from the cartesian image.
rangeImage character array with depth information.
grayImage character array with intensity (grayscale) information.
cartesianImage character array with cartesian (x,y,z) information in meters.
getLatestFrame Set true to acquire a new image on calling instead of returning the one acquired last time
useCalibratedZ Calibrate z values
grayImageType Either gray image data is filled with amplitude image or intensity image
Returns:
Return code.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

virtual unsigned long ipa_CameraSensors::AbstractRangeImagingSensor::AcquireImages ( cv::Mat *  rangeImage = 0,
cv::Mat *  intensityImage = 0,
cv::Mat *  cartesianImage = 0,
bool  getLatestFrame = true,
bool  undistort = true,
ipa_CameraSensors::t_ToFGrayImageType  grayImageType = ipa_CameraSensors::INTENSITY_32F1 
) [pure virtual]

Acquires an image from SwissRanger camera. Data is read from the camera and put into a corresponding OpenCV cv::Mat data type. The cv::Mat are allocated on demand.

Parameters:
rangeImage OpenCV conform image with depth information.
grayImage OpenCV conform image with grayscale information.
cartesianImage OpenCV conform image with cartesian (x,y,z) information in meters.
getLatestFrame Set true to acquire a new image on calling instead of returning the one acquired last time
useCalibratedZ Calibrate z values
grayImageType Either gray image data is filled with amplitude image or intensity image
Exceptions:
IPA_Exception Throws an exception, if camera access failed

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

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

Close camera device.

Returns:
Return code.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

virtual t_CalibrationMethod ipa_CameraSensors::AbstractRangeImagingSensor::GetCalibrationMethod (  )  [inline, virtual]

Returns the utilized calibration method. Possible methods are MATLAB or SWISSRANGER.

Returns:
The utilized calibration method.

Definition at line 198 of file AbstractRangeImagingSensor.h.

virtual t_cameraType ipa_CameraSensors::AbstractRangeImagingSensor::GetCameraType (  )  [inline, virtual]

Returns the camera type.

Returns:
The camera type

Definition at line 202 of file AbstractRangeImagingSensor.h.

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

Returns the number of images in the directory

Returns:
The number of images in the directory

Reimplemented in ipa_CameraSensors::VirtualRangeCam.

Definition at line 217 of file AbstractRangeImagingSensor.h.

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

Function to set properties of the range imaging sensor.

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

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

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

Initializes Swissranger.

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

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

virtual bool ipa_CameraSensors::AbstractRangeImagingSensor::isInitialized (  )  [pure virtual]

Determines if range imaging camera has successfully been initialized.

Returns:
True if camera is initialized, false otherwise.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

virtual bool ipa_CameraSensors::AbstractRangeImagingSensor::isOpen (  )  [pure virtual]

Determines if range imaging camera camera has successfully been opened.

Returns:
True if camera is open, false otherwise.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

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

Load general SR31 parameters and previously determined calibration parameters.

Parameters:
filename Range imaging sensor parameter path and file name.
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::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

virtual unsigned long ipa_CameraSensors::AbstractRangeImagingSensor::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::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

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

Save camera parameters. Saves the on-line set parameters for the range imaging camera to a file.

Parameters:
filename Configuration file name.
Returns:
Return code.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

unsigned long AbstractRangeImagingSensor::SetIntrinsics ( cv::Mat &  intrinsicMatrix,
cv::Mat &  undistortMapX,
cv::Mat &  undistortMapY 
) [virtual]

Assignes intrinsics to the range sensor. Intrinsics are read from the configuration file by the camera toolbox. Intrinsics are needed to calculat range values based on own calibration.

Parameters:
intrinsicMatrix The intrinsic matrix
undistortMapX undistortMapX The undistortion map for x direction
undistortMapY undistortMapY The undistortion map for y direction
Returns:
return code

Definition at line 66 of file AbstractRangeImagingSensor.cpp.

virtual unsigned long ipa_CameraSensors::AbstractRangeImagingSensor::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::VirtualRangeCam.

Definition at line 223 of file AbstractRangeImagingSensor.h.

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

Function to set properties of the range imaging sensor.

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

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.

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

Function to set property defaults of the range imaging sensor.

Returns:
Return code.

Implemented in ipa_CameraSensors::Swissranger, and ipa_CameraSensors::VirtualRangeCam.


Member Data Documentation

Number of images, the camera buffers internally.

Definition at line 236 of file AbstractRangeImagingSensor.h.

Calibration method MATLAB, MATLAB_NO_Z or SWISSRANGER.

Definition at line 229 of file AbstractRangeImagingSensor.h.

Camera Type.

Definition at line 231 of file AbstractRangeImagingSensor.h.

Holds the index of the image that is extracted during the next call of AcquireImages

Definition at line 223 of file AbstractRangeImagingSensor.h.

True, when the camera has sucessfully been initialized.

Definition at line 233 of file AbstractRangeImagingSensor.h.

Intrinsic parameters [fx 0 cx; 0 fy cy; 0 0 1].

Definition at line 238 of file AbstractRangeImagingSensor.h.

True, when the camera has sucessfully been opend.

Definition at line 234 of file AbstractRangeImagingSensor.h.

Storage for xml configuration file parmeters.

Definition at line 230 of file AbstractRangeImagingSensor.h.

The output array of x coordinates for the undistortion map.

Definition at line 239 of file AbstractRangeImagingSensor.h.

The output array of Y coordinates for the undistortion map.

Definition at line 240 of file AbstractRangeImagingSensor.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