tracker-native: mirror camera at source (preview + feed + skeleton consistent)

This commit is contained in:
kinect-bot committed 2026-11-26 00:10:25 -05:00
1 parent 1ff8ecf2d1
commit 1540a5aec7
2 files changed
+14 -1

No files matched your search

+2 -1
View File
@@ -23,7 +23,8 @@ MappingConfig make_mapping_config(const PipelineConfig& c) {
m.depth_height = static_cast<int>(c.depth_height);
m.z0_meters = 2.5f;
m.depth_gain = 1.0f;
m.mirror = true;
m.mirror = false; // the camera frame is mirrored at the source (win_main), so
// landmarks are already mirror-space; don't flip again here.
return m;
}
+12
View File
@@ -148,6 +148,18 @@ void WorkerLoop(std::wstring symlink, int req_w, int req_h) {
if (!camera.read_frame(bgra, w, h)) {
continue;
}
// Mirror horizontally at the source so the preview and the published
// depth/color/skeleton all read like a mirror (the mapper's own mirror is
// off; everything downstream sees mirror-space pixels).
for (int y = 0; y < h; ++y) {
uint32_t* row = reinterpret_cast<uint32_t*>(bgra.data()) +
static_cast<size_t>(y) * w;
for (int xl = 0, xr = w - 1; xl < xr; ++xl, --xr) {
const uint32_t t = row[xl];
row[xl] = row[xr];
row[xr] = t;
}
}
rgb.resize(static_cast<size_t>(w) * h * 3);
for (size_t i = 0; i < static_cast<size_t>(w) * h; ++i) {
rgb[i * 3 + 0] = bgra[i * 4 + 2];