A class that extends Freenect::FreenectDevice by defining the VideoCallback
and DepthCallback
functions so we can be getting updates with the latest RGB and Depth frames.
More...
#include <freenect_rgbd.hpp>
|
| Kinect (freenect_context *ctx, int idx) |
|
void | VideoCallback (void *rgb, uint32_t timestamp) |
| Delivers the latest RGB frame. More...
|
|
void | DepthCallback (void *depth, uint32_t timestamp) |
| Delivers the latest Depth frame. More...
|
|
void | setBuffers (cl::CommandQueue &queue, cl::Buffer &rgb, cl::Buffer &depth) |
| Sets the host buffers for the RGB and Depth frames. More...
|
|
bool | deliverFrames (cl::CommandQueue &queue, cl::Buffer &rgb, cl::Buffer &depth) |
| Transfers the RGB and Depth frames to the specified OpenCL buffers. More...
|
|
A class that extends Freenect::FreenectDevice by defining the VideoCallback
and DepthCallback
functions so we can be getting updates with the latest RGB and Depth frames.
Kinect::Kinect |
( |
freenect_context * |
ctx, |
|
|
int |
idx |
|
) |
| |
- Note
- The creation of the device is done through the Freenect class.
- Parameters
-
[in] | ctx | context to open device through (handled by the library). |
[in] | idx | index of the device on the bus. |
bool Kinect::deliverFrames |
( |
cl::CommandQueue & |
queue, |
|
|
cl::Buffer & |
rgb, |
|
|
cl::Buffer & |
depth |
|
) |
| |
Transfers the RGB and Depth frames to the specified OpenCL buffers.
- Note
- Transfers the frames from the staging buffers to the provided device buffers.
- Parameters
-
[in] | queue | command queue that will handle the frame transfers. |
[out] | rgb | OpenCL buffer to which to transfer the RGB frame. |
[out] | depth | OpenCL buffer to which to transfer the Depth frame. |
- Returns
- A flag to indicate whether new frames were present and got transfered.
void Kinect::DepthCallback |
( |
void * |
depth, |
|
|
uint32_t |
timestamp |
|
) |
| |
Delivers the latest Depth frame.
- Note
- Do not call directly, it's only used by the library.
- Parameters
-
[in] | depth | an array holding the depth frame. |
[in] | timestamp | a time stamp. |
void Kinect::setBuffers |
( |
cl::CommandQueue & |
queue, |
|
|
cl::Buffer & |
hBufferRGB, |
|
|
cl::Buffer & |
hBufferD |
|
) |
| |
Sets the host buffers for the RGB and Depth frames.
It maps the buffers and works with the returned pointers.
- Parameters
-
[in] | queue | command queue associated with the buffers. |
[in] | hBufferRGB | OpenCL buffer for the RGB frame. |
[in] | hBufferD | OpenCL buffer for the Depth frame. |
void Kinect::VideoCallback |
( |
void * |
rgb, |
|
|
uint32_t |
timestamp |
|
) |
| |
Delivers the latest RGB frame.
- Note
- Do not call directly, it's only used by the library.
- Parameters
-
[in] | rgb | an array holding the rgb frame. |
[in] | timestamp | a time stamp. |
The documentation for this class was generated from the following files: