Skip to content

Commit c38a321

Browse files
committed
Merge pull request #158 from floe/registration
add info about intrinsic structure by @sh0
2 parents 66d0e37 + 8d97556 commit c38a321

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

examples/protonect/include/libfreenect2/protocol/response.h

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,35 @@ LIBFREENECT2_PACK(struct RgbCameraParamsResponse
161161
// unknown, always seen as 1 so far
162162
uint8_t table_id;
163163

164-
// this block contains at least some color camera intrinsic params
165-
float intrinsics[25];
164+
// color -> depth mapping parameters
165+
float color_f;
166+
float color_cx;
167+
float color_cy;
168+
169+
float shift_d;
170+
float shift_m;
171+
172+
float mx_x3y0; // xxx
173+
float mx_x0y3; // yyy
174+
float mx_x2y1; // xxy
175+
float mx_x1y2; // yyx
176+
float mx_x2y0; // xx
177+
float mx_x0y2; // yy
178+
float mx_x1y1; // xy
179+
float mx_x1y0; // x
180+
float mx_x0y1; // y
181+
float mx_x0y0; // 1
182+
183+
float my_x3y0; // xxx
184+
float my_x0y3; // yyy
185+
float my_x2y1; // xxy
186+
float my_x1y2; // yyx
187+
float my_x2y0; // xx
188+
float my_x0y2; // yy
189+
float my_x1y1; // xy
190+
float my_x1y0; // x
191+
float my_x0y1; // y
192+
float my_x0y0; // 1
166193

167194
// perhaps related to xtable/ztable in the deconvolution code.
168195
// data seems to be arranged into two tables of 28*23, which

examples/protonect/src/libfreenect2.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,10 @@ void Freenect2DeviceImpl::start()
475475
command_tx_.execute(ReadRgbCameraParametersCommand(nextCommandSeq()), result);
476476
RgbCameraParamsResponse *rgb_p = reinterpret_cast<RgbCameraParamsResponse *>(result.data);
477477

478-
rgb_camera_params_.fx = rgb_p->intrinsics[0];
479-
rgb_camera_params_.fy = rgb_p->intrinsics[0];
480-
rgb_camera_params_.cx = rgb_p->intrinsics[1];
481-
rgb_camera_params_.cy = rgb_p->intrinsics[2];
478+
rgb_camera_params_.fx = rgb_p->color_f;
479+
rgb_camera_params_.fy = rgb_p->color_f;
480+
rgb_camera_params_.cx = rgb_p->color_cx;
481+
rgb_camera_params_.cy = rgb_p->color_cy;
482482

483483
command_tx_.execute(ReadStatus0x090000Command(nextCommandSeq()), result);
484484
std::cout << "[Freenect2DeviceImpl] ReadStatus0x090000 response" << std::endl;

0 commit comments

Comments
 (0)