48 vector<float> flippoint;
49 flippoint.push_back(1000000);
50 flippoint.push_back(1000000);
51 flippoint.push_back(1000000);
53 (
"help",
"Produce help message")
54 (
"inputFile", value<vector<string>>(),
"Input file name. Supported formats are ASCII (.pts, .xyz) and .ply")
55 (
"voxelSizes,v",value<vector<float>>(&
m_voxelSizes)->multitoken(),
"Voxelsize of grid used for reconstruction. multitoken option: it is possible to enter more then one voxelsize")
56 (
"bgVoxelSize,bgv",value<float>(&
m_voxelsizeBG)->default_value(10),
"Voxelsize of the bigGrid.")
57 (
"partMethod",value<int>(&
m_partMethod)->default_value(1),
"Option to change the partition-process to a gridbase partition (0 = kd-Tree; 1 = VGrid)")
58 (
"chunkSize",value<int>(&
m_chunkSize)->default_value(20),
"Set the chunksize for the virtual grid. (default: 20)")
59 (
"extrude", value<bool>(&
m_extrude)->default_value(
false),
"Do not extend grid. Can be used to avoid artefacts in dense data sets but. Disabling will possibly create additional holes in sparse data sets.")
60 (
"intersections,i",value<int>(&
m_intersections)->default_value(-1),
"Number of intersections used for reconstruction. If other than -1, voxelsize will calculated automatically.")
61 (
"pcm,p",value<string>(&
m_pcm)->default_value(
"FLANN"),
"Point cloud manager used for point handling and normal estimation. Choose from {STANN, PCL, NABO}.")
62 (
"useRansac",
"Set this flag for RANSAC based normal estimation.")
63 (
"decomposition,d",value<string>(&
m_pcm)->default_value(
"PMC"),
"Defines the type of decomposition that is used for the voxels (Standard Marching Cubes " 64 "(MC), Planar Marching Cubes (PMC), Standard Marching Cubes with sharp feature detection " 65 "(SF) or Tetraeder (MT) decomposition. Choose from {MC, PMC, MT, SF}")(
66 "optimizePlanes,o",
"Shift all triangle vertices of a cluster onto their shared plane")(
68 "Cluster planar regions based on normal threshold, do not shift vertices into regression " 69 "plane.")(
"cleanContours",
71 "Remove noise artifacts from contours. Same values are between 2 and 4")(
74 "Number of iterations for plane optimization")(
75 "fillHoles,f", value<int>(&
m_fillHoles)->default_value(0),
"Maximum size for hole filling")(
76 "removeDanglingArtifacts,rda",
78 "Remove dangling artifacts, i.e. remove the n smallest not connected surfaces")(
79 "planeNormalThreshold,pnt",
81 "(Plane Normal Threshold) Normal threshold for plane optimization. Default 0.85 equals " 82 "about 3 degrees.")(
"smallRegionThreshold",
84 "Threshold for small region removal. If 0 nothing will be deleted.")(
85 "writeClassificationResult,w",
"Write classification results to file 'clusters.clu'")(
86 "exportPointNormals,e",
87 "Exports original point cloud data together with normals into a single file called " 88 "'pointnormals.ply'")(
"saveGrid,g",
89 "Writes the generated grid to a file called 'fastgrid.grid. The " 90 "result can be rendered with qviewer.")(
92 "Save the original points and the estimated normals together with the reconstruction into " 93 "one file ('triangle_mesh.ply')")(
95 value<string>()->default_value(
""),
96 "ASCII file containing scan positions that can be used to flip normals")(
98 value<int>(&
m_kd)->default_value(5),
99 "Number of normals used for distance function evaluation")(
101 value<int>(&
m_ki)->default_value(10),
102 "Number of normals used in the normal interpolation process")(
104 value<int>(&
m_kn)->default_value(10),
105 "Size of k-neighborhood used for normal estimation")(
106 "minPlaneSize,mp", value<int>(&
m_minPlaneSize)->default_value(7),
"Minimum value for plane optimzation")(
108 "Retesselate regions that are in a regression plane. Implies --optimizePlanes.")(
109 "lineFusionThreshold,lft",
111 "(Line Fusion Threshold) Threshold for fusing line segments while tesselating.")(
112 "generateTextures",
"Generate textures during finalization.")(
113 "textureAnalysis",
"Enable texture analysis features for texture matchung.")(
116 "Texel size that determines texture resolution.")(
118 value<string>(&
m_classifier)->default_value(
"PlaneSimpsons"),
119 "Classfier object used to color the mesh.")(
"depth",
120 value<int>(&
m_depth)->default_value(100),
121 "Maximum recursion depth for region growing.")(
122 "recalcNormals,r",
"Always estimate normals, even if given in .ply file.")(
125 "Number of threads")(
"sft",
126 value<float>(&
m_sft)->default_value(0.9),
127 "Sharp feature threshold when using sharp feature decomposition")(
129 value<float>(&
m_sct)->default_value(0.7),
130 "Sharp corner threshold when using sharp feature decomposition")(
132 value<string>(&
m_ecm)->default_value(
"QUADRIC"),
133 "Edge collapse method for mesh reduction. Choose from QUADRIC, QUADRIC_TRI, MELAX, " 136 "Edge collapse count. Number of edges to collapse for mesh reduction.")(
137 "tp", value<string>(&
m_texturePack)->default_value(
""),
"Path to texture pack")(
140 "Coefficents file for texture matching based on statistics")(
143 "Number of colors for texture statistics")(
146 "Number of colors for texture matching based on color information")(
149 "Coherence threshold for texture matching based on color information")(
152 "Threshold for texture matching based on colors")(
155 "Threshold for texture matching based on statistics")(
158 "Threshold for texture matching based on features")(
159 "cro",
"Use texture matching based on cross correlation.")(
162 "Threshold for pattern extraction from textures")(
165 "Minimum number of votes to consider a texture transformation as correct")(
167 value<unsigned int>(&
m_bufferSize)->default_value(30000000),
168 "Minimum number of votes to consider a texture transformation as correct")(
171 "Max. Number of Points in a leaf (used to devide pointcloud)")(
174 "Output Folder Path")(
"useGPU",
"Use GPU for normal estimation")(
175 "flipPoint", value<vector<float>>()->multitoken(),
"Flippoint, used for GPU normal calculation, multitoken option: use it like this: --flipPoint x y z")(
178 "Size of input stream buffer when parsing point cloud files")(
179 "interpolateBoxes",
"Interpolate Boxes in intersection BoundingBox of two Grids")(
181 "the ply file contains normals")
182 (
"bigMesh", value<bool>(&
m_bigMesh)->default_value(
true),
"generate a .ply file of the reconstructed mesh")
183 (
"debugChunks", value<bool>(&
m_debugChunks)->default_value(
false),
"generate .ply file for every chunk")
185 value<float>(&
m_scaling)->default_value(1),
186 "Scaling factor, applied to all input points")(
189 "The volumen of the partitions. Volume = (voxelsize*volumenSize)^3 if not set kd-tree will " 190 "be used")(
"onlyNormals",
"If true, only normals will be generated");
204 cout <<
"Error: You must specify an input file." << endl;
223 dest = (
m_variables[
"voxelSizes"].as<vector<float>>());
297 return (
m_variables[
"inputFile"].as<vector<string>>());
323 return (
m_variables[
"inputFile"].as<vector<string>>()).size() > 0;
328 return (
m_variables[
"outputFolder"].as<vector<string>>())[0];
351 return m_variables[
"smallRegionThreshold"].as<
int>();
388 float* result =
new float[14];
389 std::ifstream in(
m_variables[
"tp"].as<string>().c_str());
392 for (
int i = 0; i < 14; i++)
400 for (
int i = 0; i < 14; i++)
413 dest = (
m_variables[
"flipPoint"].as<vector<float>>());
414 if (dest.size() != 3)
417 dest.push_back(10000000);
418 dest.push_back(10000000);
419 dest.push_back(10000000);
424 dest.push_back(10000000);
425 dest.push_back(10000000);
426 dest.push_back(10000000);
float getLineFusionThreshold() const
Returns the fusion threshold for tesselation.
int m_ki
The number of neighbors for normal interpolation.
bool generateTextures() const
If true, textures will be generated during finalization of mesh.
string getScanPoseFile() const
Returns the name of the given file with scan poses used for normal flipping.
string m_classifier
Name of the classifier object to color the mesh.
float getSharpFeatureThreshold() const
Returns the sharp feature threshold when using sharp feature decomposition.
bool optimizePlanes() const
Returns true if cluster optimization is enabled.
bool getUseCrossCorr() const
static int getNumThreads()
Returns the number of supported threads (or 1 if OpenMP is not supported)
int m_planeIterations
Number of iterations for plane optimzation.
bool m_extrude
extruded flag
int getNumEdgeCollapses() const
Number of edge collapses.
float getPatternThreshold() const
int getNumThreads() const
Returns the number of used threads.
int getDanglingArtifacts() const
Returns the number of dangling artifacts to remove from a created mesh.
float m_featuresThreshold
Threshold for texture matching based on features.
unsigned int m_octreeNodeSize
virtual void setup()
Setup internal data structures.
int m_chunkSize
gridsize for virtual grid
float m_sft
Sharp feature threshold when using sharp feature decomposition.
bool extrude() const
Whether to extend the grid. Enabled by default.
bool saveFaceNormals() const
Returns true if the face normals of the reconstructed mesh should be saved to an extra file ("face_no...
int getPartMethod() const
Retuns flag for partition-method (0 = kd-Tree; 1 = VGrid)
int m_depth
Maximum recursion depth for region growing.
string m_outputFolderPath
int m_minPlaneSize
Threshold for plane optimization.
size_t getVolumenSize() const
unsigned int getBufferSize() const
bool useGPU() const
Returns if the GPU shuold be used for the normal estimation.
int getKn() const
Returns the number of neighbors used for initial normal estimation.
int m_removeDanglingArtifacts
Number of dangling artifacts to remove.
float getVoxelsize() const
Returns the first given voxelsize.
unsigned int m_coherenceThreshold
Coherence threshold for texture matching based on color information.
float m_texelSize
Texel size.
bool printUsage() const
Prints a usage message to stdout.
float m_lineFusionThreshold
Threshold for line fusing when tesselating.
bool doTextureAnalysis() const
True if texture analysis is enabled.
int m_kn
The number of neighbors for normal estimation.
float m_sct
Sharp corner threshold when using sharp feature decomposition.
float m_planeNormalThreshold
Threshold for plane optimization.
int getKi() const
Returns the number of neighbors for normal interpolation.
bool saveNormals() const
Returns true if the interpolated normals should be saved in the putput file.
int m_partMethod
sets partition method to kd-tree or virtual grid
options_description m_descr
The internally used option description.
bool getDebugChunks() const
Returns if the mesh of every chunk additionally should be written as a .ply.
unsigned int m_bufferSize
float getNormalThreshold() const
Returns the normal threshold for plane optimization.
size_t getLineReaderBuffer() const
bool getUseNormals() const
float getScaling() const
Returns the scaling factor.
float m_patternThreshold
Threshold for pattern extraction from textures.
int getDepth() const
Returns the maximum recursion depth for region growing.
unsigned int getNumStatsColors() const
int m_minimumTransformationVotes
Minimum number of vote to consider a texture transformation as "correct".
int m_smallRegionThreshold
Threshold for small regions.
float m_colorThreshold
Threshold for texture matching based on colors.
int getPlaneIterations() const
Returns to number plane optimization iterations.
bool filenameSet() const
Returns true if an output filen name was set.
std::vector< string > getInputFileName() const
Returns the output file name.
float * getStatsCoeffs() const
int getMinPlaneSize() const
Minimum value for plane optimzation.
bool savePointNormals() const
Indicates whether to save the used points together with the interpolated normals. ...
int m_cleanContourIterations
number of cleanContour iterations
vector< float > getFlippoint() const
Returns the flipPoint for GPU normal computation.
unsigned int getCoherenceThreshold() const
int m_numThreads
The number of used threads.
string getOutputFolderPath() const
string m_statsCoeffs
Coefficents file for texture matching based on statistics.
float getColorThreshold() const
bool colorRegions() const
Returns true of region coloring is enabled.
string m_pcm
The used point cloud manager.
float m_voxelsizeBG
The set voxelsize for BigGrid.
int m_kd
The number of neighbors for distance function evaluation.
int getFillHoles() const
Returns the region threshold for hole filling.
size_t m_lineReaderBuffer
float m_statsThreshold
Threshold for texture matching based on statistics.
string getDecomposition() const
Returns the name of the used point cloud handler.
vector< float > m_voxelSizes
The set voxelsizes.
unsigned int m_numStatsColors
Number of colors for texture statistics.
bool saveGrid() const
Returns true if the Marching Cubes grid should be save.
int getSmallRegionThreshold() const
Returns the threshold for the size of small region deletion after plane optimization.
float getStatsThreshold() const
string m_ecm
Edge collapse method.
variables_map m_variables
The internally used variable map.
int getMinimumTransformationVotes() const
bool recalcNormals() const
If true, normals should be calculated even if they are already given in the input file...
float getSharpCornerThreshold() const
Returns the sharp corner threshold when using sharp feature decomposition.
bool clusterPlanes() const
True if region clustering without plane optimization is required.
int getCleanContourIterations() const
Number of iterations for contour cleanup.
string getTexturePack() const
bool m_debugChunks
flag to generate debug meshes for every chunk as a .ply
int m_intersections
The number of intersections used for reconstruction.
int m_numEdgeCollapses
Number of edge collapses.
string getEdgeCollapseMethod() const
Edge collapse method.
bool writeClassificationResult() const
True if region clustering without plane optimization is required.
float getFeatureThreshold() const
unsigned int getNodeSize() const
Only used in kd-tree (partMethod=0). Returns the maximum number of points in a leaf.
bool useRansac() const
If true, RANSAC based normal estimation is used.
bool retesselate() const
Return whether the mesh should be retesselated or not.
int getKd() const
Returns the number of neighbors used for distance function evaluation.
string getClassifier() const
Returns the name of the classifier used to color the mesh.
bool saveOriginalData() const
Returns true if the original points should be stored together with the reconstruction.
float getTexelSize() const
Returns the texel size for texture resolution.
bool m_bigMesh
flag to generate a .ply file for the reconstructed mesh
int getChunkSize() const
Returns the chunksize.
int getIntersections() const
Returns the number of intersections. If the return value is positive it will be used for reconstructi...
int m_fillHoles
Threshold for hole filling.
string getPCM() const
Returns the name of the used point cloud handler.
float getBGVoxelsize() const
Returns the given voxelsize for bigGrid.
unsigned int getNumCCVColors() const
unsigned int m_numCCVColors
Number of colors for texture matching based on color information.
vector< float > getVoxelSizes() const
Returns all voxelsizes as a vector.
string m_texturePack
Path to texture pack.
bool interpolateBoxes() const
Options(int argc, char **argv)
Ctor. Parses the command parameters given to the main function of the program.
bool getBigMesh() const
Returns if the new chunks should be written as a .ply-mesh.