46 : Freenect::FreenectDevice(_ctx, _index),
50 m_colorImage = std::vector<uint8_t>(freenect_find_video_mode(FREENECT_RESOLUTION_MEDIUM, FREENECT_VIDEO_RGB).bytes,0 );
57 uint8_t* rgb =
static_cast<uint8_t*
>(data);
58 std::copy(rgb, rgb+getVideoBufferSize(),
m_colorImage.begin());
90 short* depth =
static_cast<short*
>(data);
91 for(
unsigned int i = 0 ; i < 640*480 ; i++) {
void getDepthImage(std::vector< short > &img)
Returns the currently present point cloud data.
virtual void VideoCallback(void *data, uint32_t timestamp)
boost::mutex m_depthMutex
Mutex for save depth buffer access.
static Timestamp timestamp
A global time stamp object for program runtime measurement.
virtual void DepthCallback(void *data, uint32_t timestamp)
std::vector< uint8_t > m_colorImage
The raw color image.
KinectGrabber(freenect_context *_ctx, int _index)
boost::mutex m_colorMutex
Mutex for save color buffer access.
std::vector< short > m_depthImage
The raw depth image.
void getColorImage(std::vector< uint8_t > &img)