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

Function compute

tools/bilateral_upsampling.cpp:87–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void
88compute (const pcl::PCLPointCloud2::ConstPtr &input, pcl::PCLPointCloud2 &output,
89 int window_size, double sigma_color, double sigma_depth)
90{
91 PointCloud<PointXYZRGBA>::Ptr cloud (new pcl::PointCloud<PointXYZRGBA> ());
92 fromPCLPointCloud2 (*input, *cloud);
93
94 PointCloud<PointXYZRGBA>::Ptr cloud_upsampled (new PointCloud<PointXYZRGBA> ());
95
96 BilateralUpsampling<PointXYZRGBA, PointXYZRGBA> bu;
97 bu.setInputCloud (cloud);
98 bu.setWindowSize (window_size);
99 bu.setSigmaColor (sigma_color);
100 bu.setSigmaDepth (sigma_depth);
101
102 // TODO need to fix this somehow
103 bu.setProjectionMatrix (bu.KinectSXGAProjectionMatrix);
104
105
106 TicToc tt;
107 tt.tic ();
108 bu.process (*cloud_upsampled);
109 print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms : "); print_value ("%d", cloud_upsampled->width * cloud_upsampled->height); print_info (" points]\n");
110
111 toPCLPointCloud2 (*cloud_upsampled, output);
112}
113
114void
115saveCloud (const std::string &filename, const pcl::PCLPointCloud2 &output)

Callers 1

mainFunction · 0.70

Calls 11

fromPCLPointCloud2Function · 0.85
print_valueFunction · 0.85
toPCLPointCloud2Function · 0.85
setSigmaColorMethod · 0.80
setSigmaDepthMethod · 0.80
ticMethod · 0.80
tocMethod · 0.80
setInputCloudMethod · 0.45
setWindowSizeMethod · 0.45
setProjectionMatrixMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected