Source

kinect-viewer / utility.h

Diff from to

utility.h

 	return cross_product(a, b);
 }
 
-// Converts depth image coordinates to color image coordinates
-// using |xform|, given the linearized depth image reading |z|.
-static inline void apply_projective_transform(const projective_transform_t *xform, float z, int *x, int *y) {
-  static const float farScaleZ = 10.F;
-  
-  // Center the coordinates around the origin.
-  vec2f_t centered = { *x - 320, *y - 240 };
-
-  // Shift the origin.
-  vec2f_t displaced = {
-    centered.x + xform->offset.x,// / zRat,
-    centered.y + xform->offset.y,// / zRat,
-  };
-  float shiftedZ = z + xform->offset.z;
-
-  // Correct the field of view
-  vec2f_t scale = {
-    (shiftedZ / farScaleZ) * xform->scale.x,
-    (shiftedZ / farScaleZ) * xform->scale.y,
-  };
-  vec2f_t scaled = {
-    displaced.x * scale.x,
-    displaced.y * scale.y,
-  };
-  
-  *x = ((int) scaled.x) + 320;
-  *y = ((int) scaled.y) + 240;
-}
-
 #endif __utility_h__
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.