invisible
view src/kinect.h @ 4:1ff5a1a50b41
foo, TODO: fix conversions
author | Eleni Maria Stea <eleni@mutantstargoat.com> |
---|---|
date | Wed, 16 Oct 2013 15:41:08 +0300 |
parents | 80df8030105b |
children | 700127288dc5 |
line source
1 #ifndef KINECT_H_
2 #define KINECT_H_
4 #include <libfreenect.h>
6 /* from specs */
7 #define FREENECT_VIDEO_WIDTH 640
8 #define FREENECT_VIDEO_HEIGHT 480
9 #define FREENECT_DEPTH_WIDTH 640
10 #define FREENECT_DEPTH_HEIGHT 480
12 struct KinectParams {
13 double angle;
15 int video_width;
16 int video_height;
17 int depth_width;
18 int depth_height;
20 freenect_led_options led_color;
21 freenect_video_format video_format;
22 freenect_depth_format depth_format;
23 freenect_resolution video_res;
24 freenect_resolution depth_res;
26 KinectParams()
27 {
28 angle = 10;
30 video_width = FREENECT_VIDEO_WIDTH;
31 video_height = FREENECT_DEPTH_HEIGHT;
32 depth_width = FREENECT_VIDEO_WIDTH;
33 depth_height = FREENECT_DEPTH_HEIGHT;
35 led_color = LED_RED;
36 video_format = FREENECT_VIDEO_RGB;
37 depth_format = FREENECT_DEPTH_11BIT;
38 video_res = FREENECT_RESOLUTION_MEDIUM;
39 depth_res = FREENECT_RESOLUTION_MEDIUM;
40 }
41 };
43 bool init_kinect(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params);
44 bool init_kinect_frames(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params);
46 void stop_kinect_video_frames(freenect_device *kin_dev);
47 void stop_kinect_depth_frames(freenect_device *kin_dev);
48 void stop_kinect_frames(freenect_device *kin_dev);
50 void stop_kinect(freenect_context *kin_ctx, freenect_device *kin_dev);
52 #endif // KINECT_H_