eleni@0: #ifndef KINECT_H_ eleni@0: #define KINECT_H_ eleni@0: eleni@0: #include eleni@0: eleni@2: /* from specs */ eleni@2: #define FREENECT_VIDEO_WIDTH 640 eleni@2: #define FREENECT_VIDEO_HEIGHT 480 eleni@2: #define FREENECT_DEPTH_WIDTH 640 eleni@2: #define FREENECT_DEPTH_HEIGHT 480 eleni@0: eleni@0: struct KinectParams { eleni@0: double angle; eleni@2: eleni@2: int video_width; eleni@2: int video_height; eleni@2: int depth_width; eleni@2: int depth_height; eleni@2: eleni@0: freenect_led_options led_color; eleni@0: freenect_video_format video_format; eleni@0: freenect_depth_format depth_format; eleni@0: freenect_resolution video_res; eleni@0: freenect_resolution depth_res; eleni@0: eleni@0: KinectParams() eleni@0: { eleni@0: angle = 10; eleni@2: eleni@2: video_width = FREENECT_VIDEO_WIDTH; eleni@2: video_height = FREENECT_DEPTH_HEIGHT; eleni@2: depth_width = FREENECT_VIDEO_WIDTH; eleni@2: depth_height = FREENECT_DEPTH_HEIGHT; eleni@2: eleni@0: led_color = LED_RED; eleni@0: video_format = FREENECT_VIDEO_RGB; eleni@0: depth_format = FREENECT_DEPTH_11BIT; eleni@0: video_res = FREENECT_RESOLUTION_MEDIUM; eleni@0: depth_res = FREENECT_RESOLUTION_MEDIUM; eleni@0: } eleni@0: }; eleni@0: eleni@0: bool init_kinect(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params); eleni@2: bool init_kinect_frames(freenect_context **kin_ctx, freenect_device **kin_dev, KinectParams *kin_params); eleni@2: eleni@2: void stop_kinect_video_frames(freenect_device *kin_dev); eleni@2: void stop_kinect_depth_frames(freenect_device *kin_dev); eleni@2: void stop_kinect_frames(freenect_device *kin_dev); eleni@2: eleni@0: void stop_kinect(freenect_context *kin_ctx, freenect_device *kin_dev); eleni@0: eleni@0: #endif // KINECT_H_