working opencv
[201903hackathon.git] / cpp / sampleMinMax / sampleMinMax.cpp
index 9ec4afc..90ef6d5 100644 (file)
@@ -101,10 +101,10 @@ public:
         std::vector<std::string> asciiFrame;
         double min=9999999999.0, max=-99999999999999.0;
         uint32_t num_values_passing_threshold=0;
-        uint32_t num_max_size=data->height*data->width;
-        for (auto y = 0u; y < data->height; y++)
+        uint32_t num_max_size=data->height/3*data->width/3;
+        for (auto y = data->height/3; y < data->height/3*2; y++)
         {
-            for (auto x = 0u; x < data->width; x++)
+            for (auto x = data->width/3; x < data->width/3*2; x++)
             {
                 auto point = data->points[y*data->width+x];
                 if (point.depthConfidence < confidence_threshold_)