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

Method compute

gpu/features/src/features.cpp:103–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void pcl::gpu::NormalEstimation::compute(Normals& normals)
104{
105 assert(!cloud_.empty());
106 if (radius_ <= 0.0f || max_results_ <= 0) {
107 pcl::gpu::error("radius and/or max_results is invalid. Set them appropriately with setRadiusSearch", __FILE__, __LINE__);
108 return;
109 }
110
111 PointCloud& surface = surface_.empty() ? cloud_ : surface_;
112
113 octree_.setCloud(surface);
114 octree_.build();
115
116 if (indices_.empty() || (!indices_.empty() && indices_.size() == cloud_.size()))
117 {
118 octree_.radiusSearch(cloud_, radius_, max_results_, nn_indices_);
119 computeNormals(surface, nn_indices_, normals);
120 flipNormalTowardsViewpoint(cloud_, vpx_, vpy_, vpz_, normals);
121 }
122 else
123 {
124 octree_.radiusSearch(cloud_, indices_, radius_, max_results_, nn_indices_);
125 computeNormals(surface, nn_indices_, normals);
126 flipNormalTowardsViewpoint(cloud_, indices_, vpx_, vpy_, vpz_, normals);
127 }
128}
129
130
131/////////////////////////////////////////////////////////////////////////

Callers 9

processMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
estimateNormalsMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 12

make_float3Function · 0.85
validateMethod · 0.80
computeFunction · 0.50
compute3DCentroidFunction · 0.50
emptyMethod · 0.45
setCloudMethod · 0.45
buildMethod · 0.45
sizeMethod · 0.45
radiusSearchMethod · 0.45
createMethod · 0.45
ptrMethod · 0.45

Tested by 8

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
estimateNormalsMethod · 0.36
TESTFunction · 0.36
TESTFunction · 0.36