54 const float phInv = 1.0/ ( M(0,3) * v[0] + M(1,3) * v[1] + M(2,3) * v[2] + M(3,3) );
55 const int px = phInv * ( M(0,0) * v[0] + M(1,0) * v[1] + M(2,0) * v[2] + M(3,0) );
56 const int py = phInv * ( M(0,1) * v[0] + M(1,1) * v[1] + M(2,1) * v[2] + M(3,1) );
66 const Vec &depthCamPos):
67 colorCamMatrix(colorCam.getProjectionMatrix() * colorCam.getCSTransformationMatrix()),
68 depthCamRays(depthCamRays){}
72 colorCamMatrix(colorCam.getProjectionMatrix() * colorCam.getCSTransformationMatrix()),
73 depthCamRays(depthCamera.getResolution()){
76 for(
int i=0;i<rays.
getDim();++i){
77 depthCamRays[i] = rays[i].direction;
85 Vec pW = depthCamPos + depthCamRays(p.x,p.y) * dMM;
86 return map_rgbd(colorCamMatrix,pW);
Vec depthCamPos
depth camera offset
Definition: RGBDMapping.h:50
static utils::Point map_rgbd(const Mat &M, const Vec &v)
internally used utility function
Definition: RGBDMapping.h:53
RGBDMapping()
empty constructor (no initialization)
Definition: RGBDMapping.h:62
undocument this line if you encounter any issues!
Definition: Any.h:37
const Vec & getPosition() const
Definition: Camera.h:439
void detach()
ensures that the contained data is not shared by other instances
Definition: Array2D.h:201
utils::Array2D< ViewRay > getAllViewRays() const
returns a 2D array of all viewrays
#define ICLGeom_API
Definition: CompatMacros.h:179
Camera class.
Definition: Camera.h:132
Utility class for RGBDMapping.
Definition: RGBDMapping.h:46
int getDim() const
returns the matrix dimension (width*height)
Definition: Array2D.h:160
void detach()
detaches the viewrays from other instances
Definition: RGBDMapping.h:97
utils::Array2D< Vec > depthCamRays
depth camera view rays
Definition: RGBDMapping.h:49
Simple 2D-Array class that provides shallow copy per default.
Definition: Array2D.h:61
utils::Point operator()(const utils::Point &p, float dMM) const
applies the mapping
Definition: RGBDMapping.h:90
RGBDMapping(const Camera &colorCam, const utils::Array2D< Vec > &depthCamRays, const Vec &depthCamPos)
create RGBDMapping from given color camera, and depth camera parameters
Definition: RGBDMapping.h:65
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
Definition: FixedVector.h:40
RGBDMapping(const Camera &colorCam, const Camera &depthCamera)
create RGBDMapping from given color camera, and depth camera
Definition: RGBDMapping.h:71
Mat colorCamMatrix
color camera matrix
Definition: RGBDMapping.h:48
utils::Point apply(const utils::Point &p, float dMM) const
applies the mapping
Definition: RGBDMapping.h:84