MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / compute

Function compute

tools/morph.cpp:91–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void
92compute (ConstCloudPtr &input, Cloud &output, float resolution, const std::string& method)
93{
94 // Estimate
95 TicToc tt;
96 tt.tic ();
97
98 print_highlight (stderr, "Computing ");
99
100 if (method == "dilate")
101 {
102 applyMorphologicalOperator<PointType> (input, resolution, MORPH_DILATE, output);
103 }
104 else if (method == "erode")
105 {
106 applyMorphologicalOperator<PointType> (input, resolution, MORPH_ERODE, output);
107 }
108 else if (method == "open")
109 {
110 applyMorphologicalOperator<PointType> (input, resolution, MORPH_OPEN, output);
111 }
112 else if (method == "close")
113 {
114 applyMorphologicalOperator<PointType> (input, resolution, MORPH_CLOSE, output);
115 }
116 else
117 {
118 PCL_ERROR ("%s is not a valid morphological operator! Quitting!\n", method.c_str ());
119 return;
120 }
121
122 print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms : "); print_value ("%d", output.width * output.height); print_info (" points]\n");
123}
124
125void
126saveCloud (const std::string &filename, const Cloud &output)

Callers 8

batchProcessFunction · 0.70
mainFunction · 0.70
addPlotDataMethod · 0.50
PolynomialSolverMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50

Calls 3

print_valueFunction · 0.85
ticMethod · 0.80
tocMethod · 0.80

Tested by

no test coverage detected