Classes | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions
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 (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.

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 52 of file AbstractRangeImagingSensor.h.


Constructor & Destructor Documentation

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.

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

Returns:
The utilized calibration method.

Definition at line 158 of file AbstractRangeImagingSensor.h.

Returns the camera type.

Returns:
The camera type

Definition at line 162 of file AbstractRangeImagingSensor.h.

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.

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.

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

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 196 of file AbstractRangeImagingSensor.h.

Calibration method MATLAB, MATLAB_NO_Z or SWISSRANGER.

Definition at line 189 of file AbstractRangeImagingSensor.h.

Camera Type.

Definition at line 191 of file AbstractRangeImagingSensor.h.

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

Definition at line 185 of file AbstractRangeImagingSensor.h.

True, when the camera has sucessfully been initialized.

Definition at line 193 of file AbstractRangeImagingSensor.h.

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

Definition at line 198 of file AbstractRangeImagingSensor.h.

True, when the camera has sucessfully been opend.

Definition at line 194 of file AbstractRangeImagingSensor.h.

Storage for xml configuration file parmeters.

Definition at line 190 of file AbstractRangeImagingSensor.h.

The output array of x coordinates for the undistortion map.

Definition at line 199 of file AbstractRangeImagingSensor.h.

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 Sat Jun 8 2019 21:02:02