Skip to content

Commit

Permalink
Export maximum and no-value values for the depth modes.
Browse files Browse the repository at this point in the history
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
zarvox committed Nov 23, 2011
1 parent 982123c commit 5a37f6c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions include/libfreenect.h
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/registration.c
Expand Up @@ -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
Expand Down

0 comments on commit 5a37f6c

Please sign in to comment.