34 #ifndef DEPTH_IMAGE_PROC_DEPTH_TRAITS
35 #define DEPTH_IMAGE_PROC_DEPTH_TRAITS
53 static inline bool valid(uint16_t depth) {
return depth != 0; }
54 static inline float toMeters(uint16_t depth) {
return depth * 0.001f; }
55 static inline uint16_t
fromMeters(
float depth) {
return (depth * 1000.0f) + 0.5f; }
61 static inline bool valid(
float depth) {
return std::isfinite(depth); }
62 static inline float toMeters(
float depth) {
return depth; }
63 static inline float fromMeters(
float depth) {
return depth; }
static float toMeters(float depth)
static float fromMeters(float depth)
static bool valid(float depth)
static uint16_t fromMeters(float depth)
static bool valid(uint16_t depth)
static float toMeters(uint16_t depth)