Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::ToFProcessingCommon Class Reference

Helper class providing functions which are useful for multiple usage. More...

#include <mitkToFProcessingCommon.h>

Public Types

typedef double ToFScalarType
 
typedef itk::Point< ToFScalarType, 2 > ToFPoint2D
 
typedef itk::Point< ToFScalarType, 3 > ToFPoint3D
 
typedef itk::Vector< ToFScalarType, 2 > ToFVector2D
 
typedef itk::Vector< ToFScalarType, 3 > ToFVector3D
 

Static Public Member Functions

static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (itk::Index< 3 > index, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength[2], ToFScalarType principalPoint[2])
 Convenience method to convert index based distances to cartesian coordinates using array as input. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFScalarType interPixelDistanceX, ToFScalarType interPixelDistanceY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (itk::Index< 3 > index, ToFScalarType distance, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFScalarType interPixelDistance[2], ToFScalarType principalPoint[2])
 Convenience method to convert index based distances to cartesian coordinates using array as input. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFScalarType cartesianPoint[3], ToFScalarType focalLength[2], ToFScalarType principalPoint[2], bool calculateDistance=true)
 Convenience method to convert cartesian coordinates to index based distances using arrays. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFPoint3D cartesianPoint, ToFPoint2D focalLength, ToFPoint2D principalPoint, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLength, ToFScalarType interPixelDistanceX, ToFScalarType interPixelDistanceY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFScalarType cartesianPoint[3], ToFScalarType focalLength, ToFScalarType interPixelDistance[2], ToFScalarType principalPoint[2], bool calculateDistance=true)
 Convenience method to convert cartesian coordinates to index based distances using arrays. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFPoint3D cartesianPoint, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFProcessingCommon::ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud. More...
 
static ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength[2], ToFScalarType principalPoint[2])
 
static ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 
static ToFPoint3D KinectIndexToCartesianCoordinates (itk::Index< 3 > index, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 
static ToFPoint3D CartesianToKinectIndexCoordinates (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates. More...
 
static ToFProcessingCommon::ToFPoint3D CartesianToKinectIndexCoordinates (ToFPoint3D cartesianPoint, ToFPoint2D focalLength, ToFPoint2D principalPoint, bool calculateDistance=true)
 
static ToFProcessingCommon::ToFPoint3D ContinuousKinectIndexToCartesianCoordinates (mitk::Point2D continuousIndex, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 ContinuousKinectIndexToCartesianCoordinates This method is escpially meant for reconstructing a Kinect point with continuous index coordinates (i.e. not exactly a pixel position, but a point interpolated between two pixels). The only difference to KinectIndexToCartesianCoordinates() is that ContinuousKinectIndexToCartesianCoordinates does not cast to unsigned int for the index. More...
 
static ToFScalarType CalculateViewAngle (mitk::CameraIntrinsics::Pointer intrinsics, unsigned int dimX)
 Calculates the horizontal view angle of the camera with the given intrinsics. More...
 

Detailed Description

Helper class providing functions which are useful for multiple usage.

Currently the following methods are provided:

The coordinate conversion follows the model of a common pinhole camera where the origin of the camera coordinate system (world coordinates) is at the pinhole

The definition of the image plane and its coordinate systems (pixel and mm) is depicted in the following image

Definition at line 38 of file mitkToFProcessingCommon.h.

Member Typedef Documentation

◆ ToFPoint2D

Definition at line 42 of file mitkToFProcessingCommon.h.

◆ ToFPoint3D

Definition at line 43 of file mitkToFProcessingCommon.h.

◆ ToFScalarType

Definition at line 41 of file mitkToFProcessingCommon.h.

◆ ToFVector2D

Definition at line 44 of file mitkToFProcessingCommon.h.

◆ ToFVector3D

Definition at line 45 of file mitkToFProcessingCommon.h.

Member Function Documentation

◆ CalculateViewAngle()

static ToFScalarType mitk::ToFProcessingCommon::CalculateViewAngle ( mitk::CameraIntrinsics::Pointer  intrinsics,
unsigned int  dimX 
)
static

Calculates the horizontal view angle of the camera with the given intrinsics.

Parameters
intrinsicsintrinsic parameters of the camera
dimXdimension of the image in horizontal direction

angle = atan(principalPoint[0]/focalLength[0]) + atan((dimX-principalPoint[0]/focalLength[0]))

◆ CartesianToIndexCoordinates() [1/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFPoint3D  cartesianPoint,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 204 of file mitkToFProcessingCommon.h.

◆ CartesianToIndexCoordinates() [2/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFScalarType  cartesianPoint[3],
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2],
bool  calculateDistance = true 
)
inlinestatic

Convenience method to convert cartesian coordinates to index based distances using arrays.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 190 of file mitkToFProcessingCommon.h.

◆ CartesianToIndexCoordinates() [3/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointXx coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointYy coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointZz coordinate of point (of a surface or point set) to convert in 3D coordinates
focalLengthXfocal length of optical system in pixel units in x-direction (mostly obtained from camera calibration)
focalLengthYfocal length of optical system in pixel units in y-direction (mostly obtained from camera calibration)
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

◆ CartesianToIndexCoordinatesWithInterpixdist() [1/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFPoint3D  cartesianPoint,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 254 of file mitkToFProcessingCommon.h.

◆ CartesianToIndexCoordinatesWithInterpixdist() [2/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFScalarType  cartesianPoint[3],
ToFScalarType  focalLength,
ToFScalarType  interPixelDistance[2],
ToFScalarType  principalPoint[2],
bool  calculateDistance = true 
)
inlinestatic

Convenience method to convert cartesian coordinates to index based distances using arrays.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 238 of file mitkToFProcessingCommon.h.

◆ CartesianToIndexCoordinatesWithInterpixdist() [3/3]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistanceX,
ToFScalarType  interPixelDistanceY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointXx coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointYy coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointZz coordinate of point (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistanceXdistance in x direction between adjacent pixels in mm
interPixelDistanceYdistance in y direction between adjacent pixels in mm
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

◆ CartesianToKinectIndexCoordinates() [1/2]

static ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::CartesianToKinectIndexCoordinates ( ToFPoint3D  cartesianPoint,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

Definition at line 308 of file mitkToFProcessingCommon.h.

◆ CartesianToKinectIndexCoordinates() [2/2]

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToKinectIndexCoordinates ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates.

Parameters
cartesianPointXx value of the cartesian point.
cartesianPointYy value of the cartesian point.
cartesianPointZz value of the cartesian point.
focalLengthXx value of the focal length (from calibration).
focalLengthYy value of the focal length (from calibration).
principalPointXx value of the principal point (from calibration).
principalPointYy value of the principal point (from calibration).
calculateDistanceDo you want to compute also the distance of the distance image? For Kinect, this value is always the same in cartesian and index coordinates.
Returns
A ToFPoint3D containing the pixel indices (i,j) in [0] and [1] and (optionally) the distance value in 2.

◆ ContinuousKinectIndexToCartesianCoordinates()

static ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::ContinuousKinectIndexToCartesianCoordinates ( mitk::Point2D  continuousIndex,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

ContinuousKinectIndexToCartesianCoordinates This method is escpially meant for reconstructing a Kinect point with continuous index coordinates (i.e. not exactly a pixel position, but a point interpolated between two pixels). The only difference to KinectIndexToCartesianCoordinates() is that ContinuousKinectIndexToCartesianCoordinates does not cast to unsigned int for the index.

Parameters
continuousIndexThe continuous coordinates (e.g. 0.5; 0.5).
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXx value of the focal length (from calibration).
focalLengthYy value of the focal length (from calibration)
principalPointXx value of the principal point (from calibration).
principalPointYy value of the principal point (from calibration).
Returns
a ToFPoint3D. The point in world coordinates (mm).

◆ IndexToCartesianCoordinates() [1/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
indexindex coordinates
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 84 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinates() [2/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 70 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinates() [3/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

Convenience method to convert index based distances to cartesian coordinates using array as input.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 98 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinates() [4/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthXfocal length of optical system in pixel units in x-direction (mostly obtained from camera calibration)
focalLengthYfocal length of optical system in pixel units in y-direction (mostly obtained from camera calibration)
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

◆ IndexToCartesianCoordinatesWithInterpixdist() [1/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
indexindex coordinates
distancedistance value at given index in mm
focalLengthfocal length of optical system (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 144 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinatesWithInterpixdist() [2/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 130 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinatesWithInterpixdist() [3/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistance[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

Convenience method to convert index based distances to cartesian coordinates using array as input.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 159 of file mitkToFProcessingCommon.h.

◆ IndexToCartesianCoordinatesWithInterpixdist() [4/4]

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistanceX,
ToFScalarType  interPixelDistanceY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistanceXdistance in x direction between adjacent pixels in mm
interPixelDistanceYdistance in y direction between adjacent pixels in mm
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

◆ KinectIndexToCartesianCoordinates() [1/4]

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Definition at line 286 of file mitkToFProcessingCommon.h.

◆ KinectIndexToCartesianCoordinates() [2/4]

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Definition at line 280 of file mitkToFProcessingCommon.h.

◆ KinectIndexToCartesianCoordinates() [3/4]

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

Definition at line 274 of file mitkToFProcessingCommon.h.

◆ KinectIndexToCartesianCoordinates() [4/4]

static ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud.

Parameters
iPixel index i.
jPixel index j.
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXFocallength from calibration.
focalLengthYFocallength from calibration.
principalPointXPrincipal point from calibration.
principalPointYPrincipal point from calibration.
Returns
a ToFPoint3D. The point in world coordinates (mm).

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