Skip to content

Commit 5a37f6c

Browse files
committed
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 <[email protected]>
1 parent 982123c commit 5a37f6c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

include/libfreenect.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ extern "C" {
3535

3636
#define FREENECT_COUNTS_PER_G 819 /**< Ticks per G for accelerometer as set per http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf */
3737

38+
/// 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
39+
#define FREENECT_DEPTH_MM_MAX_VALUE 10000
40+
/// Value indicating that this pixel has no data, when using FREENECT_DEPTH_MM or FREENECT_DEPTH_REGISTERED depth modes
41+
#define FREENECT_DEPTH_MM_NO_VALUE 0
42+
/// 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
43+
#define FREENECT_DEPTH_RAW_MAX_VALUE 2048
44+
/// 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
45+
#define FREENECT_DEPTH_RAW_NO_VALUE 2047
46+
3847
/// Flags representing devices to open when freenect_open_device() is called.
3948
/// In particular, this allows libfreenect to grab only a subset of the devices
4049
/// in the Kinect, so you could (for instance) use libfreenect to handle audio

src/registration.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
#define DEPTH_SENSOR_X_RES 1280
4242
#define DEPTH_MIRROR_X 0
4343

44-
#define DEPTH_MAX_METRIC_VALUE 10000
45-
#define DEPTH_MAX_RAW_VALUE 2048
46-
#define DEPTH_NO_RAW_VALUE 2047
47-
#define DEPTH_NO_MM_VALUE 0
44+
#define DEPTH_MAX_METRIC_VALUE FREENECT_DEPTH_MM_MAX_VALUE
45+
#define DEPTH_NO_MM_VALUE FREENECT_DEPTH_MM_NO_VALUE
46+
#define DEPTH_MAX_RAW_VALUE FREENECT_DEPTH_RAW_MAX_VALUE
47+
#define DEPTH_NO_RAW_VALUE FREENECT_DEPTH_RAW_NO_VALUE
4848

4949
#define DEPTH_X_OFFSET 1
5050
#define DEPTH_Y_OFFSET 1

0 commit comments

Comments
 (0)