5 #include "davidSDK/david.h"
44 for (
size_t i=0; i < cameraNames.size(); ++i)
46 if (cameraNames[i].find(
"DAVID-CAM") != std::string::npos)
56 printf(
"\nPress ESC to stop, or any other key to start new measurement\n");
65 std::cout <<
"New scan consists of " << num <<
" 3D points\n";
79 const double MAX_DIST = 2.0;
80 std::vector<float> distances;
89 const float DIST_GOOD = 1.0f;
90 const float MAX_ALLOWED_RATIO = 0.05f;
93 for (
float dist : distances)
95 if (fabs(dist)>DIST_GOOD)
100 float badRatio = (float)numBad / distances.size();
101 std::cout << badRatio*100 <<
" percent of vertices are 'bad'\n";
105 if (badRatio <= MAX_ALLOWED_RATIO)
107 std::cout <<
"==> PART IS GOOD :-)\n";
113 std::cout <<
"==> PART IS BAD :-(\n";