24#ifndef _FIREVISION_CAMS_KINECT_H_
25#define _FIREVISION_CAMS_KINECT_H_
29#include <libfreenect.hpp>
33class CameraArgumentParser;
41 void RGBCallback(freenect_pixel *rgb, uint32_t timestamp);
48 unsigned char *m_rgb_buffer;
49 uint16_t * m_depth_buffer;
51 uint32_t m_rgb_timestamp;
52 uint32_t m_depth_timestamp;
72 virtual unsigned char *
buffer();
87 Freenect::Freenect<FvFreenectDevice> *m_freenect_ctx;
93 unsigned int m_image_num;
95 unsigned char *m_buffer;
96 unsigned char *m_false_color_depth_buffer;
98 uint16_t m_gamma[2048];
Camera interface for image aquiring devices in FireVision.
Implementation of the FreenectDevice interface of the driver.
FvFreenectDevice(freenect_context *ctx, int index)
Constructor.
~FvFreenectDevice()
Destructor.
void RGBCallback(freenect_pixel *rgb, uint32_t timestamp)
Callback function for the freenect driver.
unsigned char * rgb_buffer()
Access the RGB buffer.
uint16_t * depth_buffer()
Access the depth buffer.
void DepthCallback(void *depth, uint32_t timestamp)
Callback function for the freenect driver.
Access the Microsoft Kinect camera using the freenect driver.
virtual unsigned int pixel_height()
Height of image in pixels.
KinectCamera(const CameraArgumentParser *cap=NULL)
Constructor.
static const unsigned int FALSE_COLOR_DEPTH_IMAGE
False color depth image.
virtual void set_image_number(unsigned int n)
Set image number to retrieve.
virtual void print_info()
Print out camera information.
virtual void start()
Start image transfer from the camera.
static const unsigned int RGB_IMAGE
Color image.
virtual void capture()
Capture an image.
virtual colorspace_t colorspace()
Colorspace of returned image.
~KinectCamera()
Destructor.
virtual void close()
Close camera.
virtual unsigned int pixel_width()
Width of image in pixels.
virtual bool ready()
Camera is ready for taking pictures.
virtual unsigned int buffer_size()
Size of buffer.
virtual void open()
Open the camera.
virtual void flush()
Flush image queue.
virtual void stop()
Stop image transfer from the camera.
virtual unsigned char * buffer()
Get access to current image buffer.
virtual void dispose_buffer()
Dispose current buffer.