xx
This commit is contained in:
parent
eddc403142
commit
b873290801
@ -2,7 +2,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
@ -208,6 +210,19 @@ int DetectMultipleHoles(
|
||||
continue;
|
||||
}
|
||||
|
||||
/*if (debugCallbacks && debugCallbacks->clusterOutputDir) {
|
||||
std::string path = std::string(debugCallbacks->clusterOutputDir)
|
||||
+ "/cluster_" + std::to_string(i) + ".csv";
|
||||
std::ofstream ofs(path);
|
||||
if (ofs.is_open()) {
|
||||
ofs << "row,col,x,y,z\n";
|
||||
for (const auto& bp : clusterPoints) {
|
||||
ofs << bp.row << "," << bp.col << ","
|
||||
<< bp.point.x << "," << bp.point.y << "," << bp.point.z << "\n";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
SHoleResult hole;
|
||||
ret = hole_detection::internal::FitHoleFromExtremePoints(
|
||||
points,
|
||||
|
||||
@ -151,6 +151,13 @@ struct SHoleDetectionDebugCallbacks {
|
||||
* @brief User-provided context pointer, passed to all callbacks
|
||||
*/
|
||||
void* userData;
|
||||
|
||||
/**
|
||||
* @brief If non-null, each cluster's boundary points are saved as a CSV file
|
||||
* in this directory before fitting. Files are named cluster_0.csv, cluster_1.csv, ...
|
||||
* Fields: row,col,x,y,z
|
||||
*/
|
||||
const char* clusterOutputDir;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user