31 FreenectDepthModeMap::const_iterator matched_mode_iter = supported_video_modes.find(requested_mode);
32 if (matched_mode_iter == supported_video_modes.end())
41 catch (std::runtime_error e)
43 LogError(
"Format " +
to_string(format) +
" and resolution " +
to_string(resolution) +
" combination not supported by libfreenect");
46 LogError(
"Could not enable image registration format; falling back to format defined in getSupportedVideoModes()");
87 for (
int y = 0; y < frame->
height; y++)
89 for (
int x = 0; x < frame->
width; x++)
100 for (
int y = 0; y < frame->
height; y++)
102 for (
int x = 0; x < frame->
width; x++)
OniImageRegistrationMode image_registration_mode
static void LogError(std::string error)
static const OniSensorType sensor_type
std::map< OniVideoMode, std::pair< freenect_depth_format, freenect_resolution > > FreenectDepthModeMap
static FreenectDepthModeMap getSupportedVideoModes()
void populateFrame(void *data, OniFrame *frame) const
Freenect::FreenectDevice * device
OniStatus setVideoMode(OniVideoMode requested_mode)
static freenect_frame_mode supported_video_modes[video_mode_count]
static OniVideoMode makeOniVideoMode(OniPixelFormat pixel_format, int resolution_x, int resolution_y, int frames_per_second)
DepthStream(Freenect::FreenectDevice *pDevice)
static std::string to_string(const T &n)
void setDepthFormat(freenect_depth_format requested_format, freenect_resolution requested_resolution=FREENECT_RESOLUTION_MEDIUM)