43 #include <cuda_runtime.h>
49 template<
typename Po
int>
50 __device__ __forceinline__
float sqnorm(
const Point& p1,
const Point& p2)
52 float dx = (p1.x - p2.x);
53 float dy = (p1.y - p2.y);
54 float dz = (p1.z - p2.z);
55 return dx * dx + dy * dy + dz * dz;
58 __device__ __forceinline__ float3
computePoint(
unsigned short depth,
int x,
int y,
const Intr& intr)
60 float z = depth * 0.001f;
63 result.x = z * (x - intr.
cx) / intr.
fx;
64 result.y = z * (y - intr.
cy) / intr.
fy;
70 __device__ __forceinline__
bool
73 return isfinite(p.x) && isfinite(p.y) && isfinite(p.z);
__device__ __forceinline__ float3 computePoint(unsigned short depth, int x, int y, const Intr &intr)
__device__ __forceinline__ float sqnorm(const Point &p1, const Point &p2)
__device__ __forceinline__ bool isFinite(const float3 &p)
Camera intrinsics structure.