Classes | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
ipa_CameraSensors::AbstractRangeImagingSensor Class Referenceabstract

#include <AbstractRangeImagingSensor.h>

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

Classes

struct  t_RangeCameraParameters
 

Public Member Functions

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 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 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. More...
 

Public Attributes

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

Protected Attributes

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

Private Member Functions

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

Detailed Description

Abstract interface for range imaging sensors.

Definition at line 52 of file AbstractRangeImagingSensor.h.

Constructor & Destructor Documentation

AbstractRangeImagingSensor::~AbstractRangeImagingSensor ( )
virtual

Destructor.

Definition at line 30 of file AbstractRangeImagingSensor.cpp.

Member Function Documentation

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
rangeImageOpenCV conform image with depth information.
grayImageOpenCV conform image with grayscale information.
cartesianImageOpenCV conform image with cartesian (x,y,z) information in meters.
getLatestFrameSet true to acquire a new image on calling instead of returning the one acquired last time
useCalibratedZCalibrate z values
grayImageTypeEither gray image data is filled with amplitude image or intensity image
Exceptions
IPA_ExceptionThrows an exception, if camera access failed

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

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
widthStepRangeThe stride of a row from the range image.
widthStepGrayThe stride of a row from the grayscale intensity image.
widthStepCartesianThe stride of a row from the cartesian image.
rangeImagecharacter array with depth information.
grayImagecharacter array with intensity (grayscale) information.
cartesianImagecharacter array with cartesian (x,y,z) information in meters.
getLatestFrameSet true to acquire a new image on calling instead of returning the one acquired last time
useCalibratedZCalibrate z values
grayImageTypeEither 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::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 ( )
inlinevirtual

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

Returns
The utilized calibration method.

Definition at line 158 of file AbstractRangeImagingSensor.h.

virtual t_cameraType ipa_CameraSensors::AbstractRangeImagingSensor::GetCameraType ( )
inlinevirtual

Returns the camera type.

Returns
The camera type

Definition at line 162 of file AbstractRangeImagingSensor.h.

virtual int ipa_CameraSensors::AbstractRangeImagingSensor::GetNumberOfImages ( )
inlinevirtual

Returns the number of images in the directory

Returns
The number of images in the directory

Reimplemented in ipa_CameraSensors::VirtualRangeCam.

Definition at line 177 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
propertyIDThe ID of the property.
cameraPropertyThe 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
directoryPath to the directory of the range imaging sensor parameter file.
cameraIndexIt 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 
)
privatepure virtual

Load general SR31 parameters and previously determined calibration parameters.

Parameters
filenameRange imaging sensor parameter path and file name.
cameraIndexIt 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
filenameConfiguration 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
intrinsicMatrixThe intrinsic matrix
undistortMapXundistortMapX The undistortion map for x direction
undistortMapYundistortMapY The undistortion map for y direction
Returns
return code

Definition at line 34 of file AbstractRangeImagingSensor.cpp.

unsigned long AbstractRangeImagingSensor::SetPathToImages ( std::string  path)
virtual

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

Parameters
pathThe camera path
Returns
Return code

Reimplemented in ipa_CameraSensors::VirtualRangeCam.

Definition at line 44 of file AbstractRangeImagingSensor.cpp.

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

Function to set properties of the range imaging sensor.

Parameters
propertyIDThe ID of the property.
cameraPropertyThe 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

unsigned int ipa_CameraSensors::AbstractRangeImagingSensor::m_BufferSize
protected

Number of images, the camera buffers internally.

Definition at line 196 of file AbstractRangeImagingSensor.h.

t_CalibrationMethod ipa_CameraSensors::AbstractRangeImagingSensor::m_CalibrationMethod
protected

Calibration method MATLAB, MATLAB_NO_Z or SWISSRANGER.

Definition at line 189 of file AbstractRangeImagingSensor.h.

t_cameraType ipa_CameraSensors::AbstractRangeImagingSensor::m_CameraType
protected

Camera Type.

Definition at line 191 of file AbstractRangeImagingSensor.h.

unsigned int ipa_CameraSensors::AbstractRangeImagingSensor::m_ImageCounter

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

Definition at line 185 of file AbstractRangeImagingSensor.h.

bool ipa_CameraSensors::AbstractRangeImagingSensor::m_initialized
protected

True, when the camera has sucessfully been initialized.

Definition at line 193 of file AbstractRangeImagingSensor.h.

cv::Mat ipa_CameraSensors::AbstractRangeImagingSensor::m_intrinsicMatrix
protected

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

Definition at line 198 of file AbstractRangeImagingSensor.h.

bool ipa_CameraSensors::AbstractRangeImagingSensor::m_open
protected

True, when the camera has sucessfully been opend.

Definition at line 194 of file AbstractRangeImagingSensor.h.

t_RangeCameraParameters ipa_CameraSensors::AbstractRangeImagingSensor::m_RangeCameraParameters
protected

Storage for xml configuration file parmeters.

Definition at line 190 of file AbstractRangeImagingSensor.h.

cv::Mat ipa_CameraSensors::AbstractRangeImagingSensor::m_undistortMapX
protected

The output array of x coordinates for the undistortion map.

Definition at line 199 of file AbstractRangeImagingSensor.h.

cv::Mat ipa_CameraSensors::AbstractRangeImagingSensor::m_undistortMapY
protected

The output array of Y coordinates for the undistortion map.

Definition at line 200 of file AbstractRangeImagingSensor.h.


The documentation for this class was generated from the following files:


cob_camera_sensors
Author(s): Jan Fischer , Richard Bormann
autogenerated on Thu Mar 19 2020 03:23:05