From faad764f24fc6b0e52270c5a4517bba19a67e59f Mon Sep 17 00:00:00 2001 From: Enrique Fernandez Date: Tue, 5 Mar 2019 18:35:12 +0100 Subject: [PATCH] Convert depth to meters --- src/sc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sc.cpp b/src/sc.cpp index c7a0e04..a1c4e42 100644 --- a/src/sc.cpp +++ b/src/sc.cpp @@ -238,7 +238,7 @@ struct SessionDelegate : ST::CaptureSessionDelegate { for(int x = 0; x < depthFrame.width(); x++) { std::size_t pixelOffset = (y * depthFrame.width()) + x; - img.at(y, x) = buf[pixelOffset]; + img.at(y, x) = buf[pixelOffset] * 0.001f; } }