Version 9.01

Reverted density estimation
This commit is contained in:
mkazhdan
2016-11-01 00:55:04 -04:00
parent e12fe56c44
commit 8f00795814
7 changed files with 79 additions and 68 deletions
+5 -5
View File
@@ -398,6 +398,7 @@ XForm4x4< Real > GetPointXForm( OrientedPointStream< Real >& stream , Real scale
template< class Real , int Degree , BoundaryType BType , class Vertex >
int _Execute( int argc , char* argv[] )
{
typedef typename Octree< Real >::template DensityEstimator< WEIGHT_DEGREE > DensityEstimator;
typedef typename Octree< Real >::template InterpolationInfo< true > InterpolationInfo;
typedef OrientedPointStream< Real > PointStream;
typedef OrientedPointStreamWithData< Real , Point3D< Real > > PointStreamWithData;
@@ -431,7 +432,7 @@ int _Execute( int argc , char* argv[] )
}
else xForm = XForm4x4< Real >::Identity();
DumpOutput2( comments , "Running SSD Reconstruction (Version 9.0)\n" );
DumpOutput2( comments , "Running SSD Reconstruction (Version 9.01)\n" );
char str[1024];
for( int i=0 ; i<paramNum ; i++ )
if( params[i]->set )
@@ -468,7 +469,7 @@ int _Execute( int argc , char* argv[] )
Real pointWeightSum;
std::vector< typename Octree< Real >::PointSample >* samples = new std::vector< typename Octree< Real >::PointSample >();
std::vector< ProjectiveData< Point3D< Real > , Real > >* sampleData = NULL;
SparseNodeData< Real , WEIGHT_DEGREE >* density = NULL;
DensityEstimator* density = NULL;
SparseNodeData< Point3D< Real > , NORMAL_DEGREE >* normalInfo = NULL;
Real targetValue = (Real)0.;
@@ -524,8 +525,7 @@ int _Execute( int argc , char* argv[] )
// Get the kernel density estimator
{
profiler.start();
density = new SparseNodeData< Real , WEIGHT_DEGREE >();
*density = tree.template setDensityEstimator< WEIGHT_DEGREE >( *samples , kernelDepth , SamplesPerNode.value );
density = tree.template setDensityEstimator< WEIGHT_DEGREE >( *samples , kernelDepth , SamplesPerNode.value );
profiler.dumpOutput2( comments , "# Got kernel density:" );
}
@@ -630,7 +630,7 @@ int _Execute( int argc , char* argv[] )
if( sampleData )
{
colorData = new SparseNodeData< ProjectiveData< Point3D< Real > , Real > , DATA_DEGREE >();
*colorData = tree.template setDataField< DATA_DEGREE , false >( *samples , *sampleData , (SparseNodeData< Real , WEIGHT_DEGREE >*)NULL );
*colorData = tree.template setDataField< DATA_DEGREE , false >( *samples , *sampleData , (DensityEstimator*)NULL );
delete sampleData , sampleData = NULL;
for( const OctNode< TreeNodeData >* n = tree.tree().nextNode() ; n ; n=tree.tree().nextNode( n ) )
{