Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Export maximum and no-value values for the depth modes.

We get questions about the maximum range of the Kinect; hopefully this will
make it slightly clearer.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
  • Loading branch information...
commit 5a37f6c25c7b4a4513560a71d569d60fa6ef6e81 1 parent 982123c
@zarvox zarvox authored
Showing with 13 additions and 4 deletions.
  1. +9 −0 include/libfreenect.h
  2. +4 −4 src/registration.c
View
9 include/libfreenect.h
@@ -35,6 +35,15 @@ extern "C" {
#define FREENECT_COUNTS_PER_G 819 /**< Ticks per G for accelerometer as set per http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf */
+/// Maximum value that a uint16_t pixel will take on in the buffer of any of the FREENECT_DEPTH_MM or FREENECT_DEPTH_REGISTERED frame callbacks
+#define FREENECT_DEPTH_MM_MAX_VALUE 10000
+/// Value indicating that this pixel has no data, when using FREENECT_DEPTH_MM or FREENECT_DEPTH_REGISTERED depth modes
+#define FREENECT_DEPTH_MM_NO_VALUE 0
+/// Maximum value that a uint16_t pixel will take on in the buffer of any of the FREENECT_DEPTH_11BIT, FREENECT_DEPTH_10BIT, FREENECT_DEPTH_11BIT_PACKED, or FREENECT_DEPTH_10BIT_PACKED frame callbacks
+#define FREENECT_DEPTH_RAW_MAX_VALUE 2048
+/// Value indicating that this pixel has no data, when using FREENECT_DEPTH_11BIT, FREENECT_DEPTH_10BIT, FREENECT_DEPTH_11BIT_PACKED, or FREENECT_DEPTH_10BIT_PACKED
+#define FREENECT_DEPTH_RAW_NO_VALUE 2047
+
/// Flags representing devices to open when freenect_open_device() is called.
/// In particular, this allows libfreenect to grab only a subset of the devices
/// in the Kinect, so you could (for instance) use libfreenect to handle audio
View
8 src/registration.c
@@ -41,10 +41,10 @@
#define DEPTH_SENSOR_X_RES 1280
#define DEPTH_MIRROR_X 0
-#define DEPTH_MAX_METRIC_VALUE 10000
-#define DEPTH_MAX_RAW_VALUE 2048
-#define DEPTH_NO_RAW_VALUE 2047
-#define DEPTH_NO_MM_VALUE 0
+#define DEPTH_MAX_METRIC_VALUE FREENECT_DEPTH_MM_MAX_VALUE
+#define DEPTH_NO_MM_VALUE FREENECT_DEPTH_MM_NO_VALUE
+#define DEPTH_MAX_RAW_VALUE FREENECT_DEPTH_RAW_MAX_VALUE
+#define DEPTH_NO_RAW_VALUE FREENECT_DEPTH_RAW_NO_VALUE
#define DEPTH_X_OFFSET 1
#define DEPTH_Y_OFFSET 1

0 comments on commit 5a37f6c

Please sign in to comment.
Something went wrong with that request. Please try again.