#include <stdint.h>
#include <sys/time.h>
Go to the source code of this file.
|
#define | FREENECT_COUNTS_PER_G 819 |
|
#define | FREENECT_DEPTH_MM_MAX_VALUE 10000 |
| 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. More...
|
|
#define | FREENECT_DEPTH_MM_NO_VALUE 0 |
| Value indicating that this pixel has no data, when using FREENECT_DEPTH_MM or FREENECT_DEPTH_REGISTERED depth modes. More...
|
|
#define | FREENECT_DEPTH_RAW_MAX_VALUE 2048 |
| 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. More...
|
|
#define | FREENECT_DEPTH_RAW_NO_VALUE 2047 |
| 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. More...
|
|
#define | FREENECTAPI |
| If Win32, export all functions for DLL usage. More...
|
|
|
typedef struct _freenect_context | freenect_context |
|
typedef struct _freenect_device | freenect_device |
|
typedef void | freenect_usb_context |
|
typedef void(* | freenect_log_cb) (freenect_context *dev, freenect_loglevel level, const char *msg) |
| Typedef for logging callback functions. More...
|
|
typedef void(* | freenect_depth_cb) (freenect_device *dev, void *depth, uint32_t timestamp) |
| Typedef for depth image received event callbacks. More...
|
|
typedef void(* | freenect_video_cb) (freenect_device *dev, void *video, uint32_t timestamp) |
| Typedef for video image received event callbacks. More...
|
|
typedef void(* | freenect_chunk_cb) (void *buffer, void *pkt_data, int pkt_num, int datalen, void *user_data) |
| Typedef for stream chunk processing callbacks. More...
|
|
|
enum | freenect_device_flags { FREENECT_DEVICE_MOTOR = 0x01
, FREENECT_DEVICE_CAMERA = 0x02
, FREENECT_DEVICE_AUDIO = 0x04
} |
|
enum | freenect_resolution { FREENECT_RESOLUTION_LOW = 0
, FREENECT_RESOLUTION_MEDIUM = 1
, FREENECT_RESOLUTION_HIGH = 2
, FREENECT_RESOLUTION_DUMMY = 2147483647
} |
|
enum | freenect_video_format {
FREENECT_VIDEO_RGB = 0
, FREENECT_VIDEO_BAYER = 1
, FREENECT_VIDEO_IR_8BIT = 2
, FREENECT_VIDEO_IR_10BIT = 3
,
FREENECT_VIDEO_IR_10BIT_PACKED = 4
, FREENECT_VIDEO_YUV_RGB = 5
, FREENECT_VIDEO_YUV_RAW = 6
, FREENECT_VIDEO_DUMMY = 2147483647
} |
|
enum | freenect_depth_format {
FREENECT_DEPTH_11BIT = 0
, FREENECT_DEPTH_10BIT = 1
, FREENECT_DEPTH_11BIT_PACKED = 2
, FREENECT_DEPTH_10BIT_PACKED = 3
,
FREENECT_DEPTH_REGISTERED = 4
, FREENECT_DEPTH_MM = 5
, FREENECT_DEPTH_DUMMY = 2147483647
} |
|
enum | freenect_flag {
FREENECT_AUTO_EXPOSURE = 1 << 14
, FREENECT_AUTO_WHITE_BALANCE = 1 << 1
, FREENECT_RAW_COLOR = 1 << 4
, FREENECT_MIRROR_DEPTH = 1 << 16
,
FREENECT_MIRROR_VIDEO = 1 << 17
, FREENECT_NEAR_MODE = 1 << 18
} |
| Enumeration of flags to toggle features with freenect_set_flag() More...
|
|
enum | freenect_flag_value { FREENECT_OFF = 0
, FREENECT_ON = 1
} |
| Possible values for setting each freenect_flag More...
|
|
enum | freenect_led_options {
LED_OFF = 0
, LED_GREEN = 1
, LED_RED = 2
, LED_YELLOW = 3
,
LED_BLINK_GREEN = 4
, LED_BLINK_RED_YELLOW = 6
} |
|
enum | freenect_tilt_status_code { TILT_STATUS_STOPPED = 0x00
, TILT_STATUS_LIMIT = 0x01
, TILT_STATUS_MOVING = 0x04
} |
| Enumeration of tilt motor status. More...
|
|
enum | freenect_loglevel {
FREENECT_LOG_FATAL = 0
, FREENECT_LOG_ERROR
, FREENECT_LOG_WARNING
, FREENECT_LOG_NOTICE
,
FREENECT_LOG_INFO
, FREENECT_LOG_DEBUG
, FREENECT_LOG_SPEW
, FREENECT_LOG_FLOOD
} |
| Enumeration of message logging levels. More...
|
|
|
FREENECTAPI int | freenect_init (freenect_context **ctx, freenect_usb_context *usb_ctx) |
|
FREENECTAPI int | freenect_shutdown (freenect_context *ctx) |
|
FREENECTAPI void | freenect_set_log_level (freenect_context *ctx, freenect_loglevel level) |
|
FREENECTAPI void | freenect_set_log_callback (freenect_context *ctx, freenect_log_cb cb) |
|
FREENECTAPI int | freenect_process_events (freenect_context *ctx) |
|
FREENECTAPI int | freenect_process_events_timeout (freenect_context *ctx, struct timeval *timeout) |
|
FREENECTAPI int | freenect_num_devices (freenect_context *ctx) |
|
FREENECTAPI int | freenect_list_device_attributes (freenect_context *ctx, struct freenect_device_attributes **attribute_list) |
|
FREENECTAPI void | freenect_free_device_attributes (struct freenect_device_attributes *attribute_list) |
|
FREENECTAPI int | freenect_supported_subdevices (void) |
|
FREENECTAPI void | freenect_select_subdevices (freenect_context *ctx, freenect_device_flags subdevs) |
|
FREENECTAPI freenect_device_flags | freenect_enabled_subdevices (freenect_context *ctx) |
|
FREENECTAPI int | freenect_open_device (freenect_context *ctx, freenect_device **dev, int index) |
|
FREENECTAPI int | freenect_open_device_by_camera_serial (freenect_context *ctx, freenect_device **dev, const char *camera_serial) |
|
FREENECTAPI int | freenect_close_device (freenect_device *dev) |
|
FREENECTAPI void | freenect_set_user (freenect_device *dev, void *user) |
|
FREENECTAPI void * | freenect_get_user (freenect_device *dev) |
|
FREENECTAPI void | freenect_set_depth_callback (freenect_device *dev, freenect_depth_cb cb) |
|
FREENECTAPI void | freenect_set_video_callback (freenect_device *dev, freenect_video_cb cb) |
|
FREENECTAPI void | freenect_set_depth_chunk_callback (freenect_device *dev, freenect_chunk_cb cb) |
|
FREENECTAPI void | freenect_set_video_chunk_callback (freenect_device *dev, freenect_chunk_cb cb) |
|
FREENECTAPI int | freenect_set_depth_buffer (freenect_device *dev, void *buf) |
|
FREENECTAPI int | freenect_set_video_buffer (freenect_device *dev, void *buf) |
|
FREENECTAPI int | freenect_start_depth (freenect_device *dev) |
|
FREENECTAPI int | freenect_start_video (freenect_device *dev) |
|
FREENECTAPI int | freenect_stop_depth (freenect_device *dev) |
|
FREENECTAPI int | freenect_stop_video (freenect_device *dev) |
|
FREENECTAPI int | freenect_update_tilt_state (freenect_device *dev) |
|
FREENECTAPI freenect_raw_tilt_state * | freenect_get_tilt_state (freenect_device *dev) |
|
FREENECTAPI double | freenect_get_tilt_degs (freenect_raw_tilt_state *state) |
|
FREENECTAPI int | freenect_set_tilt_degs (freenect_device *dev, double angle) |
|
FREENECTAPI freenect_tilt_status_code | freenect_get_tilt_status (freenect_raw_tilt_state *state) |
|
FREENECTAPI int | freenect_set_led (freenect_device *dev, freenect_led_options option) |
|
FREENECTAPI void | freenect_get_mks_accel (freenect_raw_tilt_state *state, double *x, double *y, double *z) |
|
FREENECTAPI int | freenect_get_video_mode_count () |
|
FREENECTAPI freenect_frame_mode | freenect_get_video_mode (int mode_num) |
|
FREENECTAPI freenect_frame_mode | freenect_get_current_video_mode (freenect_device *dev) |
|
FREENECTAPI freenect_frame_mode | freenect_find_video_mode (freenect_resolution res, freenect_video_format fmt) |
|
FREENECTAPI int | freenect_set_video_mode (freenect_device *dev, freenect_frame_mode mode) |
|
FREENECTAPI int | freenect_get_depth_mode_count () |
|
FREENECTAPI freenect_frame_mode | freenect_get_depth_mode (int mode_num) |
|
FREENECTAPI freenect_frame_mode | freenect_get_current_depth_mode (freenect_device *dev) |
|
FREENECTAPI freenect_frame_mode | freenect_find_depth_mode (freenect_resolution res, freenect_depth_format fmt) |
|
FREENECTAPI int | freenect_set_depth_mode (freenect_device *dev, const freenect_frame_mode mode) |
|
FREENECTAPI int | freenect_set_flag (freenect_device *dev, freenect_flag flag, freenect_flag_value value) |
|
FREENECTAPI int | freenect_get_ir_brightness (freenect_device *dev) |
|
FREENECTAPI int | freenect_set_ir_brightness (freenect_device *dev, uint16_t brightness) |
|
FREENECTAPI void | freenect_set_fw_address_nui (freenect_context *ctx, unsigned char *fw_ptr, unsigned int num_bytes) |
|
FREENECTAPI void | freenect_set_fw_address_k4w (freenect_context *ctx, unsigned char *fw_ptr, unsigned int num_bytes) |
|
◆ FREENECT_COUNTS_PER_G
#define FREENECT_COUNTS_PER_G 819 |
◆ FREENECT_DEPTH_MM_MAX_VALUE
#define FREENECT_DEPTH_MM_MAX_VALUE 10000 |
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.
◆ FREENECT_DEPTH_MM_NO_VALUE
#define FREENECT_DEPTH_MM_NO_VALUE 0 |
Value indicating that this pixel has no data, when using FREENECT_DEPTH_MM or FREENECT_DEPTH_REGISTERED depth modes.
◆ FREENECT_DEPTH_RAW_MAX_VALUE
#define FREENECT_DEPTH_RAW_MAX_VALUE 2048 |
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.
◆ FREENECT_DEPTH_RAW_NO_VALUE
#define FREENECT_DEPTH_RAW_NO_VALUE 2047 |
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.
◆ FREENECTAPI
If Win32, export all functions for DLL usage.
DLLExport information for windows, set to nothing on other platforms
◆ freenect_chunk_cb
typedef void(* freenect_chunk_cb) (void *buffer, void *pkt_data, int pkt_num, int datalen, void *user_data) |
Typedef for stream chunk processing callbacks.
◆ freenect_context
Holds information about the usb context.
◆ freenect_depth_cb
typedef void(* freenect_depth_cb) (freenect_device *dev, void *depth, uint32_t timestamp) |
Typedef for depth image received event callbacks.
◆ freenect_device
Holds device information.
◆ freenect_log_cb
Typedef for logging callback functions.
◆ freenect_usb_context
◆ freenect_video_cb
typedef void(* freenect_video_cb) (freenect_device *dev, void *video, uint32_t timestamp) |
Typedef for video image received event callbacks.
◆ freenect_depth_format
Enumeration of depth frame states See http://openkinect.org/wiki/Protocol_Documentation#RGB_Camera for more information.
Enumerator |
---|
FREENECT_DEPTH_11BIT | 11 bit depth information in one uint16_t/pixel
|
FREENECT_DEPTH_10BIT | 10 bit depth information in one uint16_t/pixel
|
FREENECT_DEPTH_11BIT_PACKED | 11 bit packed depth information
|
FREENECT_DEPTH_10BIT_PACKED | 10 bit packed depth information
|
FREENECT_DEPTH_REGISTERED | processed depth data in mm, aligned to 640x480 RGB
|
FREENECT_DEPTH_MM | depth to each pixel in mm, but left unaligned to RGB image
|
FREENECT_DEPTH_DUMMY | Dummy value to force enum to be 32 bits wide
|
◆ freenect_device_flags
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 and motor support while letting OpenNI have access to the cameras. If a device is not supported on a particular platform, its flag will be ignored.
Enumerator |
---|
FREENECT_DEVICE_MOTOR | |
FREENECT_DEVICE_CAMERA | |
FREENECT_DEVICE_AUDIO | |
◆ freenect_flag
Enumeration of flags to toggle features with freenect_set_flag()
Enumerator |
---|
FREENECT_AUTO_EXPOSURE | |
FREENECT_AUTO_WHITE_BALANCE | |
FREENECT_RAW_COLOR | |
FREENECT_MIRROR_DEPTH | |
FREENECT_MIRROR_VIDEO | |
FREENECT_NEAR_MODE | |
◆ freenect_flag_value
Possible values for setting each freenect_flag
Enumerator |
---|
FREENECT_OFF | |
FREENECT_ON | |
◆ freenect_led_options
Enumeration of LED states See http://openkinect.org/wiki/Protocol_Documentation#Setting_LED for more information.
Enumerator |
---|
LED_OFF | Turn LED off
|
LED_GREEN | Turn LED to Green
|
LED_RED | Turn LED to Red
|
LED_YELLOW | Turn LED to Yellow
|
LED_BLINK_GREEN | Make LED blink Green
|
LED_BLINK_RED_YELLOW | Make LED blink Red/Yellow
|
◆ freenect_loglevel
Enumeration of message logging levels.
Enumerator |
---|
FREENECT_LOG_FATAL | Log for crashing/non-recoverable errors
|
FREENECT_LOG_ERROR | Log for major errors
|
FREENECT_LOG_WARNING | Log for warning messages
|
FREENECT_LOG_NOTICE | Log for important messages
|
FREENECT_LOG_INFO | Log for normal messages
|
FREENECT_LOG_DEBUG | Log for useful development messages
|
FREENECT_LOG_SPEW | Log for slightly less useful messages
|
FREENECT_LOG_FLOOD | Log EVERYTHING. May slow performance.
|
◆ freenect_resolution
Enumeration of available resolutions. Not all available resolutions are actually supported for all video formats. Frame modes may not perfectly match resolutions. For instance, FREENECT_RESOLUTION_MEDIUM is 640x488 for the IR camera.
Enumerator |
---|
FREENECT_RESOLUTION_LOW | QVGA - 320x240
|
FREENECT_RESOLUTION_MEDIUM | VGA - 640x480
|
FREENECT_RESOLUTION_HIGH | SXGA - 1280x1024
|
FREENECT_RESOLUTION_DUMMY | Dummy value to force enum to be 32 bits wide
|
◆ freenect_tilt_status_code
Enumeration of tilt motor status.
Enumerator |
---|
TILT_STATUS_STOPPED | Tilt motor is stopped
|
TILT_STATUS_LIMIT | Tilt motor has reached movement limit
|
TILT_STATUS_MOVING | Tilt motor is currently moving to new position
|
◆ freenect_video_format
Enumeration of video frame information states. See http://openkinect.org/wiki/Protocol_Documentation#RGB_Camera for more information.
Enumerator |
---|
FREENECT_VIDEO_RGB | Decompressed RGB mode (demosaicing done by libfreenect)
|
FREENECT_VIDEO_BAYER | Bayer compressed mode (raw information from camera)
|
FREENECT_VIDEO_IR_8BIT | 8-bit IR mode
|
FREENECT_VIDEO_IR_10BIT | 10-bit IR mode
|
FREENECT_VIDEO_IR_10BIT_PACKED | 10-bit packed IR mode
|
FREENECT_VIDEO_YUV_RGB | YUV RGB mode
|
FREENECT_VIDEO_YUV_RAW | YUV Raw mode
|
FREENECT_VIDEO_DUMMY | Dummy value to force enum to be 32 bits wide
|
◆ freenect_close_device()
Closes a device that is currently open
- Parameters
-
- Returns
- 0 on success
◆ freenect_enabled_subdevices()
Returns the devices that are enabled after calls to freenect_open_device() On newer kinects the motor and audio are automatically disabled for now
- Parameters
-
ctx | Context to set future subdevice selection for |
- Returns
- Flags representing the subdevices that were actually opened (see freenect_device_flags)
◆ freenect_find_depth_mode()
Convenience function to return a mode descriptor matching the specified resolution and depth camera pixel format, if one exists.
- Parameters
-
res | Resolution desired |
fmt | Pixel format desired |
- Returns
- A freenect_frame_mode that matches the arguments specified, if such a valid mode exists; otherwise, an invalid freenect_frame_mode.
◆ freenect_find_video_mode()
Convenience function to return a mode descriptor matching the specified resolution and video camera pixel format, if one exists.
- Parameters
-
res | Resolution desired |
fmt | Pixel format desired |
- Returns
- A freenect_frame_mode that matches the arguments specified, if such a valid mode exists; otherwise, an invalid freenect_frame_mode.
◆ freenect_free_device_attributes()
◆ freenect_get_current_depth_mode()
Get the frame descriptor of the current depth mode for the specified freenect device.
- Parameters
-
dev | Which device to return the currently-set depth mode for |
- Returns
- A freenect_frame_mode describing the current depth mode of the specified device
◆ freenect_get_current_video_mode()
Get the frame descriptor of the current video mode for the specified freenect device.
- Parameters
-
dev | Which device to return the currently-set video mode for |
- Returns
- A freenect_frame_mode describing the current video mode of the specified device
◆ freenect_get_depth_mode()
Get the frame descriptor of the nth supported depth mode for the depth camera.
- Parameters
-
mode_num | Which of the supported modes to return information about |
- Returns
- A freenect_frame_mode describing the nth depth mode
◆ freenect_get_depth_mode_count()
Get the number of depth camera modes supported by the driver. This includes both RGB and IR modes.
- Returns
- Number of depth modes supported by the driver
◆ freenect_get_ir_brightness()
Returns the brightness of the IR sensor.
- Parameters
-
dev | Device to get IR brightness |
- Returns
- IR brightness value in the range 1 - 50, < 0 if error
◆ freenect_get_mks_accel()
Get the axis-based gravity adjusted accelerometer state, as laid out via the accelerometer data sheet, which is available at
http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf
- Parameters
-
state | State to extract accelerometer data from |
x | Stores X-axis accelerometer state |
y | Stores Y-axis accelerometer state |
z | Stores Z-axis accelerometer state |
◆ freenect_get_tilt_degs()
Return the tilt state, in degrees with respect to the horizon
- Parameters
-
state | The tilt state struct from a device |
- Returns
- Current degree of tilt of the device
◆ freenect_get_tilt_state()
Retrieve the tilt state from a device
- Parameters
-
dev | Device to retrieve tilt state from |
- Returns
- The tilt state struct of the device
◆ freenect_get_tilt_status()
Return the movement state of the tilt motor (moving, stopped, etc...)
- Parameters
-
state | Raw state struct to get the tilt status code from |
- Returns
- Status code of the tilt device. See freenect_tilt_status_code enum for more info.
◆ freenect_get_user()
Retrieve the pointer to user data from the device struct
- Parameters
-
dev | Device from which to get user data |
- Returns
- Pointer to user data
◆ freenect_get_video_mode()
Get the frame descriptor of the nth supported video mode for the video camera.
- Parameters
-
mode_num | Which of the supported modes to return information about |
- Returns
- A freenect_frame_mode describing the nth video mode
◆ freenect_get_video_mode_count()
Get the number of video camera modes supported by the driver. This includes both RGB and IR modes.
- Returns
- Number of video modes supported by the driver
◆ freenect_init()
Initialize a freenect context and do any setup required for platform specific USB libraries.
- Parameters
-
ctx | Address of pointer to freenect context struct to allocate and initialize |
usb_ctx | USB context to initialize. Can be NULL if not using multiple contexts. |
- Returns
- 0 on success, < 0 on error
◆ freenect_list_device_attributes()
Scans for kinect devices and produces a linked list of their attributes (namely, serial numbers), returning the number of devices.
- Parameters
-
ctx | Context to scan for kinect devices with |
attribute_list | Pointer to where this function will store the resultant linked list |
- Returns
- Number of devices connected, < 0 on error
◆ freenect_num_devices()
Return the number of kinect devices currently connected to the system
- Parameters
-
ctx | Context to access device count through |
- Returns
- Number of devices connected, < 0 on error
◆ freenect_open_device()
Opens a kinect device via a context. Index specifies the index of the device on the current state of the bus. Bus resets may cause indexes to shift.
- Parameters
-
ctx | Context to open device through |
dev | Device structure to assign opened device to |
index | Index of the device on the bus |
- Returns
- 0 on success, < 0 on error
◆ freenect_open_device_by_camera_serial()
Opens a kinect device (via a context) associated with a particular camera subdevice serial number. This function will fail if no device with a matching serial number is found.
- Parameters
-
ctx | Context to open device through |
dev | Device structure to assign opened device to |
camera_serial | Null-terminated ASCII string containing the serial number of the camera subdevice in the device to open |
- Returns
- 0 on success, < 0 on error
◆ freenect_process_events()
Calls the platform specific usb event processor
- Parameters
-
ctx | context to process events for |
- Returns
- 0 on success, other values on error, platform/library dependant
◆ freenect_process_events_timeout()
Calls the platform specific usb event processor until either an event occurs or the timeout parameter time has passed. If a zero timeval is passed, this function will handle any already-pending events, then return immediately.
- Parameters
-
ctx | Context to process events for |
timeout | Pointer to a timeval containing the maximum amount of time to block waiting for events, or zero for nonblocking mode |
- Returns
- 0 on success, other values on error, platform/library dependant
◆ freenect_select_subdevices()
Set which subdevices any subsequent calls to freenect_open_device() should open. This will not affect devices which have already been opened. The default behavior, should you choose not to call this function at all, is to open all supported subdevices - motor, cameras, and audio, if supported on the platform.
- Parameters
-
ctx | Context to set future subdevice selection for |
subdevs | Flags representing the subdevices to select |
◆ freenect_set_depth_buffer()
Set the buffer to store depth information to. Size of buffer is dependant on depth format. See FREENECT_DEPTH_*_SIZE defines for more information.
- Parameters
-
dev | Device to set depth buffer for. |
buf | Buffer to store depth information to. |
- Returns
- 0 on success, < 0 on error
◆ freenect_set_depth_callback()
Set callback for depth information received event
- Parameters
-
dev | Device to set callback for |
cb | Function pointer for processing depth information |
◆ freenect_set_depth_chunk_callback()
Set callback for depth chunk processing
- Parameters
-
dev | Device to set callback for |
cb | Function pointer for processing depth chunk |
◆ freenect_set_depth_mode()
Sets the current depth mode for the specified device. The mode cannot be changed while streaming is active.
- Parameters
-
dev | Device for which to set the depth mode |
mode | Frame mode to set |
- Returns
- 0 on success, < 0 if error
◆ freenect_set_flag()
Enables or disables the specified flag.
- Parameters
-
flag | Feature to set |
value | FREENECT_OFF or FREENECT_ON |
- Returns
- 0 on success, < 0 if error
◆ freenect_set_fw_address_k4w()
Allows the user to specify a pointer to the audio firmware in memory for the K4W Kinect
- Parameters
-
ctx | Context to open device through |
fw_ptr | Pointer to audio firmware loaded in memory |
num_bytes | The size of the firmware in bytes |
◆ freenect_set_fw_address_nui()
Allows the user to specify a pointer to the audio firmware in memory for the Xbox 360 Kinect
- Parameters
-
ctx | Context to open device through |
fw_ptr | Pointer to audio firmware loaded in memory |
num_bytes | The size of the firmware in bytes |
◆ freenect_set_ir_brightness()
Sets the brightness of the IR sensor. Note that this does not change the intensity of the IR projector.
- Parameters
-
dev | Device to set IR brightness |
brighness | Brightness value in range 1 - 50 |
- Returns
- 0 on success, < 0 if error
◆ freenect_set_led()
Set the state of the LED. Uses blocking control message call to update device.
- Parameters
-
dev | Device to set the LED state |
option | LED state to set on device. See freenect_led_options enum. |
- Returns
- 0 on success, < 0 on error
◆ freenect_set_log_callback()
Callback for log messages (i.e. for rerouting to a file instead of stdout)
- Parameters
-
ctx | context to set log callback for |
cb | callback function pointer |
◆ freenect_set_log_level()
Set the log level for the specified freenect context
- Parameters
-
ctx | context to set log level for |
level | log level to use (see freenect_loglevel enum) |
◆ freenect_set_tilt_degs()
Set the tilt state of the device, in degrees with respect to the horizon. Uses blocking control message call to update device. Function return does not reflect state of device, device may still be moving to new position after the function returns. Use freenect_get_tilt_status() to find current movement state.
- Parameters
-
dev | Device to set tilt state |
angle | Angle the device should tilt to |
- Returns
- 0 on success, < 0 on error.
◆ freenect_set_user()
Set the device user data, for passing generic information into callbacks
- Parameters
-
dev | Device to attach user data to |
user | User data to attach |
◆ freenect_set_video_buffer()
Set the buffer to store depth information to. Size of buffer is dependant on video format. See FREENECT_VIDEO_*_SIZE defines for more information.
- Parameters
-
dev | Device to set video buffer for. |
buf | Buffer to store video information to. |
- Returns
- 0 on success, < 0 on error
◆ freenect_set_video_callback()
Set callback for video information received event
- Parameters
-
dev | Device to set callback for |
cb | Function pointer for processing video information |
◆ freenect_set_video_chunk_callback()
Set callback for video chunk processing
- Parameters
-
dev | Device to set callback for |
cb | Function pointer for processing video chunk |
◆ freenect_set_video_mode()
Sets the current video mode for the specified device. If the freenect_frame_mode specified is not one provided by the driver e.g. from freenect_get_video_mode() or freenect_find_video_mode() then behavior is undefined. The current video mode cannot be changed while streaming is active.
- Parameters
-
dev | Device for which to set the video mode |
mode | Frame mode to set |
- Returns
- 0 on success, < 0 if error
◆ freenect_shutdown()
Closes the device if it is open, and frees the context
- Parameters
-
ctx | freenect context to close/free |
- Returns
- 0 on success
◆ freenect_start_depth()
Start the depth information stream for a device.
- Parameters
-
dev | Device to start depth information stream for. |
- Returns
- 0 on success, < 0 on error
◆ freenect_start_video()
Start the video information stream for a device.
- Parameters
-
dev | Device to start video information stream for. |
- Returns
- 0 on success, < 0 on error
◆ freenect_stop_depth()
Stop the depth information stream for a device
- Parameters
-
dev | Device to stop depth information stream on. |
- Returns
- 0 on success, < 0 on error
◆ freenect_stop_video()
Stop the video information stream for a device
- Parameters
-
dev | Device to stop video information stream on. |
- Returns
- 0 on success, < 0 on error
◆ freenect_supported_subdevices()
Answer which subdevices this library supports. This is most useful for wrappers trying to determine whether the underlying library was built with audio support or not, so the wrapper can avoid calling functions that do not exist.
- Returns
- Flags representing the subdevices that the library supports opening (see freenect_device_flags)
◆ freenect_update_tilt_state()
Updates the accelerometer state using a blocking control message call.
- Parameters
-
dev | Device to get accelerometer data from |
- Returns
- 0 on success, < 0 on error. Accelerometer data stored to device struct.