[surface] Poisson surface reconstruction bug in Octree< Real >::UpdateWeightContribution
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-vision
Research direction
Locate Octree::NonLinearUpdateWeightContribution in PCL's surface reconstruction code and compare its sample-scaling logic with the supplied PoissonRecon v7.0 implementation. The work is done when the PCL implementation applies the corrected scaling consistently and surface reconstruction behavior is preserved.
Written by the indexing model from the issue text.
Description
In the changelist of the original authors' website, they stated that there was a bug in sample contribution scaling, but it is still kept in PCL.
The fixed version(v7.0):
template< class Real >
int Octree< Real >::UpdateWeightContribution( std::vector< Real >& kernelDensityWeights , TreeOctNode* node , const Point3D<Real>& position , typename TreeOctNode::NeighborKey3& neighborKey , Real weight )
{
typename TreeOctNode::Neighbors3& neighbors = neighborKey.setNeighbors( node );
if( (int)kernelDensityWeights.size()<TreeNodeData::NodeCount ) kernelDensityWeights.resize( TreeNodeData::NodeCount , 0 );
double x , dxdy , dx[DIMENSION][3] , width;
Point3D< Real > center;
Real w;
node->centerAndWidth( center , w );
width = w;
for( int i=0 ; i<DIMENSION ; i++ )
{
x = ( center[i] - position[i] - width ) / width;
dx[i][0] = 1.125 + 1.500*x + 0.500*x*x;
dx[i][1] = -0.25 - 2.*x - x*x;
dx[i][2] = 1. - dx[i][1] - dx[i][0];
}
// Suppose that the samples are uniformly placed along the middle of the three slices.
// Then splatting the points we get coefficients:
// 0.125 / 0.75 / 0.125 across the three slices.
// Sampling at the center slice we get:
// 0.125^2 + 0.75^2 + 0.125^2 = 19/32
const double SAMPLE_SCALE = 1. / ( 0.125 * 0.125 + 0.75 * 0.75 + 0.125 * 0.125 );
weight *= (Real)SAMPLE_SCALE;
for( int i=0 ; i<3 ; i++ ) for( int j=0 ; j<3 ; j++ )
{
dxdy = dx[0][i] * dx[1][j] * weight;
TreeOctNode** _neighbors = neighbors.neighbors[i][j];
for( int k=0 ; k<3 ; k++ ) if( _neighbors[k] ) kernelDensityWeights[ _neighbors[k]->nodeData.nodeIndex ] += Real( dxdy * dx[2][k] );
}
return 0;
}
The PCL version:
template<int Degree>
int Octree<Degree>::NonLinearUpdateWeightContribution( TreeOctNode* node , const Point3D<Real>& position , Real weight )
{
TreeOctNode::Neighbors3& neighbors = neighborKey.setNeighbors( node );
double x,dxdy,dx[DIMENSION][3];
double width;
Point3D<Real> center;
Real w;
node->centerAndWidth( center , w );
width=w;
const double SAMPLE_SCALE = 1. / ( 0.125 * 0.125 + 0.75 * 0.75 + 0.125 * 0.125 );
for( int i=0 ; i<DIMENSION ; i++ )
{
x = ( center[i] - position[i] - width ) / width;
dx[i][0] = 1.125 + 1.500*x + 0.500*x*x;
x = ( center[i] - position[i] ) / width;
dx[i][1] = 0.750 - x*x;
dx[i][2] = 1. - dx[i][1] - dx[i][0];
// Note that we are splatting along a co-dimension one manifold, so uniform point samples
// do not generate a unit sample weight.
dx[i][0] *= SAMPLE_SCALE;
}
for( int i=0 ; i<3 ; i++ ) for( int j=0 ; j<3 ; j++ )
{
dxdy = dx[0][i] * dx[1][j] * weight;
for( int k=0 ; k<3 ; k++ ) if( neighbors.neighbors[i][j][k] )
neighbors.neighbors[i][j][k]->nodeData.centerWeightContribution += Real( dxdy * dx[2][k] );
}
return 0;
}
- Dominant language
- C++
- Stars
- 11.2k
- Forks
- 4.7k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PointCloudLibrary/pcl
-
kind: bug status: triage
Difficulty 1/5 Under an hour Newbie friendliness 82/100
PointCloudLibrary/pcl#6536 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
PointCloudLibrary/pcl#6509 · 1 comment ·
Maintainers usually reply within 3 days
-
kind: bug status: triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PointCloudLibrary/pcl#6537 ·
Maintainers usually reply within 3 days
-
[cmake] QHULL/FLANN dll missing when linking single modulePossibly taken @SIDDARTHAREDDY8 claimed this 5 days ago. Openkind: bug module: cmake
Difficulty 3/5 Half a day Newbie friendliness 50/100
PointCloudLibrary/pcl#6522 · 1 comment ·
Maintainers usually reply within 3 days
-
kind: bug status: triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
PointCloudLibrary/pcl#6395 ·
Maintainers usually reply within 3 days
All issues in PointCloudLibrary/pcl
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nextcloud/passman-android#214 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
feature wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/WSL#42306 · 3 comments ·
Maintainers usually reply within 1 day
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64May be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 87/100
esphome/esphome#22892 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day