Skip to content

Commit 6356e1b

Browse files
authored
Merge pull request #5653 from mvieth/octree_growing
Octree: grow in positive direction instead of negative
2 parents 348bf9c + aed1a96 commit 6356e1b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

octree/include/pcl/octree/impl/octree_pointcloud.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,9 @@ pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>
523523

524524
// octree not empty - we add another tree level and thus increase its size by a
525525
// factor of 2*2*2
526-
child_idx = static_cast<unsigned char>(((!bUpperBoundViolationX) << 2) |
527-
((!bUpperBoundViolationY) << 1) |
528-
((!bUpperBoundViolationZ)));
526+
child_idx = static_cast<unsigned char>(((bLowerBoundViolationX) << 2) |
527+
((bLowerBoundViolationY) << 1) |
528+
((bLowerBoundViolationZ)));
529529

530530
BranchNode* newRootBranch;
531531

@@ -538,13 +538,13 @@ pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>
538538

539539
octreeSideLen = static_cast<double>(1 << this->octree_depth_) * resolution_;
540540

541-
if (!bUpperBoundViolationX)
541+
if (bLowerBoundViolationX)
542542
min_x_ -= octreeSideLen;
543543

544-
if (!bUpperBoundViolationY)
544+
if (bLowerBoundViolationY)
545545
min_y_ -= octreeSideLen;
546546

547-
if (!bUpperBoundViolationZ)
547+
if (bLowerBoundViolationZ)
548548
min_z_ -= octreeSideLen;
549549

550550
// configure tree depth of octree

test/features/test_pfh_estimation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ TEST (PCL, GFPFH)
504504
PointCloud<GFPFHSignature16> descriptor;
505505
gfpfh.compute (descriptor);
506506

507-
const float ref_values[] = { 1877, 6375, 5361, 14393, 6674, 2471, 2248, 2753, 3117, 4585, 14388, 32407, 15122, 3061, 3202, 794 };
507+
const float ref_values[] = { 1881, 6378, 5343, 14406, 6726, 2379, 2295, 2724, 3177, 4518, 14283, 32341, 15131, 3195, 3238, 813 };
508508

509509
EXPECT_EQ (descriptor.size (), 1);
510510
for (std::size_t i = 0; i < static_cast<std::size_t>(descriptor[0].descriptorSize ()); ++i)

0 commit comments

Comments
 (0)