35 typedef std::map< OniVideoMode, std::pair<freenect_depth_format, freenect_resolution> >
FreenectDepthModeMap;
51 std::transform(supported_modes.begin(), supported_modes.end(), modes,
ExtractKey());
61 image_registration_mode = mode;
99 if (*pDataSize !=
sizeof(
float))
101 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_HORIZONTAL_FOV");
107 if (*pDataSize !=
sizeof(
float))
109 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_VERTICAL_FOV");
115 if (*pDataSize !=
sizeof(
int))
117 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_MAX_VALUE");
134 if (*pDataSize !=
sizeof(
unsigned long long))
136 LogError(
"Unexpected size for XN_STREAM_PROPERTY_GAIN");
139 *(
static_cast<unsigned long long*
>(data)) =
GAIN_VAL;
142 if (*pDataSize !=
sizeof(
unsigned long long))
144 LogError(
"Unexpected size for XN_STREAM_PROPERTY_CONST_SHIFT");
150 if (*pDataSize !=
sizeof(
unsigned long long))
152 LogError(
"Unexpected size for XN_STREAM_PROPERTY_MAX_SHIFT");
158 if (*pDataSize !=
sizeof(
unsigned long long))
160 LogError(
"Unexpected size for XN_STREAM_PROPERTY_PARAM_COEFF");
166 if (*pDataSize !=
sizeof(
unsigned long long))
168 LogError(
"Unexpected size for XN_STREAM_PROPERTY_SHIFT_SCALE");
174 if (*pDataSize !=
sizeof(
unsigned long long))
176 LogError(
"Unexpected size for XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE");
182 if (*pDataSize !=
sizeof(
double))
184 LogError(
"Unexpected size for XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE");
190 if (*pDataSize !=
sizeof(
double))
192 LogError(
"Unexpected size for XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE");
198 *pDataSize =
sizeof(
S2D);
200 memcpy(data,
S2D, *pDataSize);
203 *pDataSize =
sizeof(
D2S);
205 memcpy(data,
D2S, *pDataSize);
OniImageRegistrationMode image_registration_mode
static void LogError(std::string error)
static const OniSensorType sensor_type
OniImageRegistrationMode getImageRegistrationMode() const
OniBool isPropertySupported(int propertyId)
std::map< OniVideoMode, std::pair< freenect_depth_format, freenect_resolution > > FreenectDepthModeMap
OniStatus getProperty(int propertyId, void *data, int *pDataSize)
static const int MAX_VALUE
static const float DIAGONAL_FOV
static const unsigned long long PARAM_COEFF_VAL
static FreenectDepthModeMap getSupportedVideoModes()
OniStatus setImageRegistrationMode(OniImageRegistrationMode mode)
void populateFrame(void *data, OniFrame *frame) const
static const unsigned long long GAIN_VAL
static const unsigned long long CONST_SHIFT_VAL
static const float VERTICAL_FOV
OniBool isPropertySupported(int propertyId)
static const unsigned long long SHIFT_SCALE_VAL
static const float HORIZONTAL_FOV
OniStatus setVideoMode(OniVideoMode requested_mode)
static OniSensorInfo getSensorInfo()
OniBool isImageRegistrationModeSupported(OniImageRegistrationMode mode)
DepthStream(Freenect::FreenectDevice *pDevice)
static const double EMITTER_DCMOS_DISTANCE_VAL
const unsigned short D2S[]
static const double ZERO_PLANE_PIXEL_SIZE_VAL
static const unsigned long long ZERO_PLANE_DISTANCE_VAL
virtual OniStatus getProperty(int propertyId, void *data, int *pDataSize)
static const unsigned long long MAX_SHIFT_VAL