invisible
diff 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 |
line diff
1.1 --- a/src/kinect.h Sat Oct 05 19:02:40 2013 +0300 1.2 +++ b/src/kinect.h Wed Oct 09 22:56:42 2013 +0300 1.3 @@ -3,10 +3,20 @@ 1.4 1.5 #include <libfreenect.h> 1.6 1.7 -#define FREENECT_ANGLE 30 1.8 +/* from specs */ 1.9 +#define FREENECT_VIDEO_WIDTH 640 1.10 +#define FREENECT_VIDEO_HEIGHT 480 1.11 +#define FREENECT_DEPTH_WIDTH 640 1.12 +#define FREENECT_DEPTH_HEIGHT 480 1.13 1.14 struct KinectParams { 1.15 double angle; 1.16 + 1.17 + int video_width; 1.18 + int video_height; 1.19 + int depth_width; 1.20 + int depth_height; 1.21 + 1.22 freenect_led_options led_color; 1.23 freenect_video_format video_format; 1.24 freenect_depth_format depth_format; 1.25 @@ -16,6 +26,12 @@ 1.26 KinectParams() 1.27 { 1.28 angle = 10; 1.29 + 1.30 + video_width = FREENECT_VIDEO_WIDTH; 1.31 + video_height = FREENECT_DEPTH_HEIGHT; 1.32 + depth_width = FREENECT_VIDEO_WIDTH; 1.33 + depth_height = FREENECT_DEPTH_HEIGHT; 1.34 + 1.35 led_color = LED_RED; 1.36 video_format = FREENECT_VIDEO_RGB; 1.37 depth_format = FREENECT_DEPTH_11BIT; 1.38 @@ -25,6 +41,12 @@ 1.39 }; 1.40 1.41 bool init_kinect(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params); 1.42 +bool init_kinect_frames(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params); 1.43 + 1.44 +void stop_kinect_video_frames(freenect_device *kin_dev); 1.45 +void stop_kinect_depth_frames(freenect_device *kin_dev); 1.46 +void stop_kinect_frames(freenect_device *kin_dev); 1.47 + 1.48 void stop_kinect(freenect_context *kin_ctx, freenect_device *kin_dev); 1.49 1.50 #endif // KINECT_H_