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