From 52a17326474668702fcd728dcda690a1241531a6 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Mon, 25 Mar 2019 19:49:37 +0100 Subject: [PATCH] time diff --- cpp/sampleMinMax/sampleMinMax.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp/sampleMinMax/sampleMinMax.cpp b/cpp/sampleMinMax/sampleMinMax.cpp index f637504..9ec4afc 100644 --- a/cpp/sampleMinMax/sampleMinMax.cpp +++ b/cpp/sampleMinMax/sampleMinMax.cpp @@ -54,6 +54,9 @@ class MyListener : public royale::IDepthDataListener static const uint8_t confidence_threshold_=128; + double last_min_=0; + double last_max_=0; + public: /** * This callback is called for each depth frame that is captured. In a mixed-mode use case @@ -117,7 +120,9 @@ public: } } } - std::cout << "min:" << min << " " << "max:" << max << " %good:" << (static_cast(num_values_passing_threshold)/static_cast(num_max_size)*100.0) << std::endl; + std::cout << "min:" << min << "(diff:" << (last_min_-min) << ")" << " " << "max:" << max << "(diff:" << (last_max_-max) << ")" << " %good:" << (static_cast(num_values_passing_threshold)/static_cast(num_max_size)*100.0) << std::endl; + last_min_=min; + last_max_=max; } /** -- 1.7.10.4