Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comment in supervoxel clustering #1804

Merged
merged 1 commit into from
Jan 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ pcl::SupervoxelClustering<PointT>::computeVoxelData ()
if ( !pcl::isFinite<PointT> (*input_itr))
continue;
//Otherwise look up its leaf container
LeafContainerT* leaf = adjacency_octree_->getLeafContainerAtPoint (*input_itr);
//Get the voxel data object
VoxelData& voxel_data = leaf->getData ();
//Add this normal in (we will normalize at the end)
voxel_data.normal_ += normal_itr->getNormalVector4fMap ();
voxel_data.curvature_ += normal_itr->curvature;
LeafContainerT* leaf = adjacency_octree_->getLeafContainerAtPoint (*input_itr);

//Get the voxel data object
VoxelData& voxel_data = leaf->getData ();
//Add this normal in (we will normalize at the end)
voxel_data.normal_ += normal_itr->getNormalVector4fMap ();
voxel_data.curvature_ += normal_itr->curvature;
}
//Now iterate through the leaves and normalize
for (leaf_itr = adjacency_octree_->begin (); leaf_itr != adjacency_octree_->end (); ++leaf_itr)
Expand Down Expand Up @@ -415,8 +415,8 @@ pcl::SupervoxelClustering<PointT>::selectInitialSupervoxelSeeds (std::vector<int
std::vector<float> sqr_distances;
seed_indices.reserve (seed_indices_orig.size ());
float search_radius = 0.5f*seed_resolution_;
// This is number of voxels which fit in a planar slice through search volume
// Area of planar slice / area of voxel side
// This is 1/20th of the number of voxels which fit in a planar slice through search volume
// Area of planar slice / area of voxel side. (Note: This is smaller than the value mentioned in the original paper)
float min_points = 0.05f * (search_radius)*(search_radius) * 3.1415926536f / (resolution_*resolution_);
for (size_t i = 0; i < seed_indices_orig.size (); ++i)
{
Expand Down