mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added some parameters for mesh reconstruction
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1315 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -247,7 +247,17 @@ Transform RTABMAP_EXP icp2D(
|
||||
double & fitnessScore);
|
||||
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr RTABMAP_EXP computeNormals(
|
||||
const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud);
|
||||
const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud,
|
||||
int normalKSearch = 20);
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_EXP computeNormals(
|
||||
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
|
||||
int normalKSearch = 20);
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_EXP computeNormalsSmoothed(
|
||||
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
|
||||
float smoothingSearchRadius = 0.025,
|
||||
bool smoothingPolynomialFit = true);
|
||||
|
||||
int RTABMAP_EXP getCorrespondencesCount(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
|
||||
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
|
||||
@@ -343,7 +353,15 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_EXP get3DFASTKpts(
|
||||
bool fastNonmaxSuppression=true,
|
||||
float maxDepth = 5.0f);
|
||||
|
||||
pcl::PolygonMesh::Ptr RTABMAP_EXP createMesh(const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud, float maxEdgeLength = 0.025, bool smoothing = true);
|
||||
pcl::PolygonMesh::Ptr RTABMAP_EXP createMesh(
|
||||
const pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr & cloudWithNormals,
|
||||
float gp3SearchRadius = 0.025,
|
||||
float gp3Mu = 2.5,
|
||||
int gp3MaximumNearestNeighbors = 100,
|
||||
float gp3MaximumSurfaceAngle = M_PI/4,
|
||||
float gp3MinimumAngle = M_PI/18,
|
||||
float gp3MaximumAngle = 2*M_PI/3,
|
||||
float gp3NormalConsistency = false);
|
||||
|
||||
void RTABMAP_EXP optimizeTOROGraph(
|
||||
const std::map<int, Transform> & poses,
|
||||
|
||||
@@ -1247,7 +1247,9 @@ Transform icp2D(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
|
||||
return transformFromEigen4f(icp.getFinalTransformation());
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr computeNormals(const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud)
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr computeNormals(
|
||||
const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud,
|
||||
int normalKSearch)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals(new pcl::PointCloud<pcl::PointNormal>);
|
||||
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
|
||||
@@ -1258,7 +1260,7 @@ pcl::PointCloud<pcl::PointNormal>::Ptr computeNormals(const pcl::PointCloud<pcl:
|
||||
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
|
||||
n.setInputCloud (cloud);
|
||||
n.setSearchMethod (tree);
|
||||
n.setKSearch (20);
|
||||
n.setKSearch (normalKSearch);
|
||||
n.compute (*normals);
|
||||
//* normals should not contain the point normals + surface curvatures
|
||||
|
||||
@@ -1269,6 +1271,56 @@ pcl::PointCloud<pcl::PointNormal>::Ptr computeNormals(const pcl::PointCloud<pcl:
|
||||
return cloud_with_normals;
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr computeNormals(
|
||||
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
|
||||
int normalKSearch)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloud_with_normals(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
|
||||
pcl::search::KdTree<pcl::PointXYZRGB>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZRGB>);
|
||||
tree->setInputCloud (cloud);
|
||||
|
||||
// Normal estimation*
|
||||
pcl::NormalEstimationOMP<pcl::PointXYZRGB, pcl::Normal> n;
|
||||
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
|
||||
n.setInputCloud (cloud);
|
||||
n.setSearchMethod (tree);
|
||||
n.setKSearch (normalKSearch);
|
||||
n.compute (*normals);
|
||||
//* normals should not contain the point normals + surface curvatures
|
||||
|
||||
// Concatenate the XYZ and normal fields*
|
||||
pcl::concatenateFields (*cloud, *normals, *cloud_with_normals);
|
||||
//* cloud_with_normals = cloud + normals*/
|
||||
|
||||
return cloud_with_normals;
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr computeNormalsSmoothed(
|
||||
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
|
||||
float smoothingSearchRadius,
|
||||
bool smoothingPolynomialFit)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloud_with_normals(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
|
||||
pcl::search::KdTree<pcl::PointXYZRGB>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZRGB>);
|
||||
tree->setInputCloud (cloud);
|
||||
|
||||
// Init object (second point type is for the normals, even if unused)
|
||||
pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGBNormal> mls;
|
||||
|
||||
mls.setComputeNormals (true);
|
||||
|
||||
// Set parameters
|
||||
mls.setInputCloud (cloud);
|
||||
mls.setPolynomialFit (smoothingPolynomialFit);
|
||||
mls.setSearchMethod (tree);
|
||||
mls.setSearchRadius (smoothingSearchRadius);
|
||||
|
||||
// Reconstruct
|
||||
mls.process (*cloud_with_normals);
|
||||
|
||||
return cloud_with_normals;
|
||||
}
|
||||
|
||||
// a kdtree is constructed with cloud_target, then nearest neighbor
|
||||
// is computed for each cloud_source points.
|
||||
int getCorrespondencesCount(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
|
||||
@@ -1442,67 +1494,39 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr get3DFASTKpts(
|
||||
return points;
|
||||
}
|
||||
|
||||
pcl::PolygonMesh::Ptr createMesh(const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud, float maxEdgeLength, bool smoothing)
|
||||
pcl::PolygonMesh::Ptr createMesh(
|
||||
const pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr & cloudWithNormals,
|
||||
float gp3SearchRadius,
|
||||
float gp3Mu,
|
||||
int gp3MaximumNearestNeighbors,
|
||||
float gp3MaximumSurfaceAngle,
|
||||
float gp3MinimumAngle,
|
||||
float gp3MaximumAngle,
|
||||
float gp3NormalConsistency)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloud_with_normals(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
|
||||
pcl::search::KdTree<pcl::PointXYZRGB>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZRGB>);
|
||||
tree->setInputCloud (cloud);
|
||||
|
||||
if(smoothing)
|
||||
{
|
||||
// Init object (second point type is for the normals, even if unused)
|
||||
pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGBNormal> mls;
|
||||
|
||||
mls.setComputeNormals (true);
|
||||
|
||||
// Set parameters
|
||||
mls.setInputCloud (cloud);
|
||||
mls.setPolynomialFit (true);
|
||||
mls.setSearchMethod (tree);
|
||||
mls.setSearchRadius (maxEdgeLength);
|
||||
|
||||
// Reconstruct
|
||||
mls.process (*cloud_with_normals);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Normal estimation*
|
||||
pcl::NormalEstimationOMP<pcl::PointXYZRGB, pcl::Normal> n;
|
||||
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
|
||||
n.setInputCloud (cloud);
|
||||
n.setSearchMethod (tree);
|
||||
n.setKSearch (20);
|
||||
n.compute (*normals);
|
||||
//* normals should not contain the point normals + surface curvatures
|
||||
|
||||
// Concatenate the XYZ and normal fields*
|
||||
pcl::concatenateFields (*cloud, *normals, *cloud_with_normals);
|
||||
//* cloud_with_normals = cloud + normals*/
|
||||
}
|
||||
|
||||
cloud_with_normals = removeNaNNormalsFromPointCloud(cloud_with_normals);
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloudWithNormalsNoNaN = removeNaNNormalsFromPointCloud(cloudWithNormals);
|
||||
|
||||
// Create search tree*
|
||||
pcl::search::KdTree<pcl::PointXYZRGBNormal>::Ptr tree2 (new pcl::search::KdTree<pcl::PointXYZRGBNormal>);
|
||||
tree2->setInputCloud (cloud_with_normals);
|
||||
tree2->setInputCloud (cloudWithNormalsNoNaN);
|
||||
|
||||
// Initialize objects
|
||||
pcl::GreedyProjectionTriangulation<pcl::PointXYZRGBNormal> gp3;
|
||||
pcl::PolygonMesh::Ptr mesh(new pcl::PolygonMesh);
|
||||
|
||||
// Set the maximum distance between connected points (maximum edge length)
|
||||
gp3.setSearchRadius (maxEdgeLength);
|
||||
gp3.setSearchRadius (gp3SearchRadius);
|
||||
|
||||
// Set typical values for the parameters
|
||||
gp3.setMu (2.5);
|
||||
gp3.setMaximumNearestNeighbors (100);
|
||||
gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees
|
||||
gp3.setMinimumAngle(M_PI/18); // 10 degrees
|
||||
gp3.setMaximumAngle(2*M_PI/3); // 120 degrees
|
||||
gp3.setNormalConsistency(false);
|
||||
gp3.setMu (gp3Mu);
|
||||
gp3.setMaximumNearestNeighbors (gp3MaximumNearestNeighbors);
|
||||
gp3.setMaximumSurfaceAngle(gp3MaximumSurfaceAngle); // 45 degrees
|
||||
gp3.setMinimumAngle(gp3MinimumAngle); // 10 degrees
|
||||
gp3.setMaximumAngle(gp3MaximumAngle); // 120 degrees
|
||||
gp3.setNormalConsistency(gp3NormalConsistency);
|
||||
|
||||
// Get result
|
||||
gp3.setInputCloud (cloud_with_normals);
|
||||
gp3.setInputCloud (cloudWithNormalsNoNaN);
|
||||
gp3.setSearchMethod (tree2);
|
||||
gp3.reconstruct (*mesh);
|
||||
|
||||
|
||||
@@ -119,12 +119,17 @@ public:
|
||||
double getCloudVoxelSize(int index) const; // 0=map, 1=odom, 2=save
|
||||
int getCloudDecimation(int index) const; // 0=map, 1=odom, 2=save
|
||||
double getCloudMaxDepth(int index) const; // 0=map, 1=odom, 2=save
|
||||
double getCloudOpacity(int index) const; // 0=map, 1=odom, 2=save
|
||||
int getCloudPointSize(int index) const; // 0=map, 1=odom, 2=save
|
||||
double getCloudOpacity(int index) const; // 0=map, 1=odom
|
||||
int getCloudPointSize(int index) const; // 0=map, 1=odom
|
||||
|
||||
bool isScansShown(int index) const; // 0=map, 1=odom, 2=save
|
||||
double getScanOpacity(int index) const; // 0=map, 1=odom, 2=save
|
||||
int getScanPointSize(int index) const; // 0=map, 1=odom, 2=save
|
||||
double getScanOpacity(int index) const; // 0=map, 1=odom
|
||||
int getScanPointSize(int index) const; // 0=map, 1=odom
|
||||
|
||||
int getMeshNormalKSearch(int index) const; // 0=map, 1=save
|
||||
double getMeshGP3Radius(int index) const; // 0=map, 1=save
|
||||
bool getMeshSmoothing(int index) const; // 0=map, 1=save
|
||||
double getMeshSmoothingRadius(int index) const; // 0=map, 1=save
|
||||
|
||||
bool isCloudFiltering() const;
|
||||
double getCloudFilteringRadius() const;
|
||||
@@ -282,6 +287,10 @@ private:
|
||||
QVector<QDoubleSpinBox*> _3dRenderingOpacityScan;
|
||||
QVector<QSpinBox*> _3dRenderingPtSizeScan;
|
||||
QVector<QCheckBox*> _3dRenderingMeshing;
|
||||
QVector<QSpinBox*> _3dRenderingNormalKSearch;
|
||||
QVector<QDoubleSpinBox*> _3dRenderingGP3Radius;
|
||||
QVector<QCheckBox*> _3dRenderingSmoothing;
|
||||
QVector<QDoubleSpinBox*> _3dRenderingSmoothingRadius;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(PreferencesDialog::PANEL_FLAGS)
|
||||
|
||||
@@ -1094,7 +1094,16 @@ void MainWindow::updateMapCloud(const std::map<int, Transform> & posesIn, const
|
||||
pcl::PolygonMesh::Ptr mesh(new pcl::PolygonMesh);
|
||||
if(cloud->size())
|
||||
{
|
||||
mesh = util3d::createMesh(cloud, _preferencesDialog->getCloudVoxelSize(0)==0?0.025:_preferencesDialog->getCloudVoxelSize(0)*4);
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloudWithNormals;
|
||||
if(_preferencesDialog->getMeshSmoothing(0))
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormalsSmoothed(cloud, (float)_preferencesDialog->getMeshSmoothingRadius(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormals(cloud, _preferencesDialog->getMeshNormalKSearch(0));
|
||||
}
|
||||
mesh = util3d::createMesh(cloudWithNormals, _preferencesDialog->getMeshGP3Radius(0));
|
||||
}
|
||||
|
||||
if(mesh->polygons.size())
|
||||
@@ -2926,7 +2935,17 @@ void MainWindow::saveMeshes()
|
||||
if(button == QMessageBox::No)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = this->createAssembledCloud();
|
||||
meshes.insert(std::make_pair(0, util3d::createMesh(cloud)));
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloudWithNormals;
|
||||
if(_preferencesDialog->getMeshSmoothing(1))
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormalsSmoothed(cloud, (float)_preferencesDialog->getMeshSmoothingRadius(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormals(cloud, _preferencesDialog->getMeshNormalKSearch(1));
|
||||
}
|
||||
pcl::PolygonMesh::Ptr mesh = util3d::createMesh(cloudWithNormals, _preferencesDialog->getMeshGP3Radius(1));
|
||||
meshes.insert(std::make_pair(0, mesh));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3019,7 +3038,19 @@ void MainWindow::viewMeshes()
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = this->createAssembledCloud();
|
||||
_initProgressDialog->appendText(tr("Meshing the assembled cloud (%1 points)...").arg(cloud->size()));
|
||||
_initProgressDialog->incrementStep();
|
||||
meshes.insert(std::make_pair(0, util3d::createMesh(cloud, _preferencesDialog->getCloudVoxelSize(2)*4.0f)));
|
||||
QApplication::processEvents();
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloudWithNormals;
|
||||
if(_preferencesDialog->getMeshSmoothing(1))
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormalsSmoothed(cloud, (float)_preferencesDialog->getMeshSmoothingRadius(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormals(cloud, _preferencesDialog->getMeshNormalKSearch(1));
|
||||
}
|
||||
pcl::PolygonMesh::Ptr mesh = util3d::createMesh(cloudWithNormals, _preferencesDialog->getMeshGP3Radius(1));
|
||||
meshes.insert(std::make_pair(0, mesh));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3052,6 +3083,7 @@ void MainWindow::viewMeshes()
|
||||
pcl::fromPCLPointCloud2(iter->second->cloud, *cloud);
|
||||
viewer->addCloudMesh(uFormat("mesh%d",iter->first), cloud, iter->second->polygons, iter->first>0?_currentPosesMap.at(iter->first):Transform::getIdentity());
|
||||
_initProgressDialog->appendText(tr("Viewing the mesh %1 (%2 polygons)... done.").arg(iter->first).arg(iter->second->polygons.size()));
|
||||
QApplication::processEvents();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3518,7 +3550,16 @@ std::map<int, pcl::PolygonMesh::Ptr> MainWindow::createMeshes()
|
||||
pcl::PolygonMesh::Ptr mesh(new pcl::PolygonMesh);
|
||||
if(cloud->size())
|
||||
{
|
||||
mesh = util3d::createMesh(cloud, _preferencesDialog->getCloudVoxelSize(2)==0?0.025:_preferencesDialog->getCloudVoxelSize(2)*4);
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloudWithNormals;
|
||||
if(_preferencesDialog->getMeshSmoothing(1))
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormalsSmoothed(cloud, (float)_preferencesDialog->getMeshSmoothingRadius(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
cloudWithNormals = util3d::computeNormals(cloud, _preferencesDialog->getMeshNormalKSearch(1));
|
||||
}
|
||||
mesh = util3d::createMesh(cloudWithNormals, _preferencesDialog->getMeshGP3Radius(1));
|
||||
}
|
||||
|
||||
if(mesh->polygons.size())
|
||||
|
||||
@@ -146,6 +146,22 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_3dRenderingMeshing.resize(1);
|
||||
_3dRenderingMeshing[0] = _ui->checkBox_meshing;
|
||||
|
||||
_3dRenderingNormalKSearch.resize(2);
|
||||
_3dRenderingNormalKSearch[0] = _ui->spinBox_normalKSearch;
|
||||
_3dRenderingNormalKSearch[1] = _ui->spinBox_normalKSearch_save;
|
||||
|
||||
_3dRenderingGP3Radius.resize(2);
|
||||
_3dRenderingGP3Radius[0] = _ui->doubleSpinBox_gp3Radius;
|
||||
_3dRenderingGP3Radius[1] = _ui->doubleSpinBox_gp3Radius_save;
|
||||
|
||||
_3dRenderingSmoothing.resize(2);
|
||||
_3dRenderingSmoothing[0] = _ui->checkBox_mls;
|
||||
_3dRenderingSmoothing[1] = _ui->checkBox_mls_save;
|
||||
|
||||
_3dRenderingSmoothingRadius.resize(2);
|
||||
_3dRenderingSmoothingRadius[0] = _ui->doubleSpinBox_mlsRadius;
|
||||
_3dRenderingSmoothingRadius[1] = _ui->doubleSpinBox_mlsRadius_save;
|
||||
|
||||
for(int i=0; i<3; ++i)
|
||||
{
|
||||
connect(_3dRenderingShowClouds[i], SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
@@ -160,6 +176,11 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_3dRenderingPtSize[i], SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
connect(_3dRenderingOpacityScan[i], SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
connect(_3dRenderingPtSizeScan[i], SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
|
||||
connect(_3dRenderingNormalKSearch[i], SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
connect(_3dRenderingGP3Radius[i], SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
connect(_3dRenderingSmoothing[i], SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
connect(_3dRenderingSmoothingRadius[i], SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||
}
|
||||
|
||||
if(i<1)
|
||||
@@ -701,6 +722,11 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_3dRenderingPtSize[i]->setValue(i==0?1:2);
|
||||
_3dRenderingOpacityScan[i]->setValue(1.0);
|
||||
_3dRenderingPtSizeScan[i]->setValue(1);
|
||||
|
||||
_3dRenderingNormalKSearch[i]->setValue(20);
|
||||
_3dRenderingGP3Radius[i]->setValue(0.04);
|
||||
_3dRenderingSmoothing[i]->setChecked(true);
|
||||
_3dRenderingSmoothingRadius[i]->setValue(0.04);
|
||||
}
|
||||
|
||||
if(i<1)
|
||||
@@ -915,6 +941,11 @@ void PreferencesDialog::readGuiSettings(const QString & filePath)
|
||||
_3dRenderingPtSize[i]->setValue(settings.value(tr("ptSize%1").arg(i), _3dRenderingPtSize[i]->value()).toInt());
|
||||
_3dRenderingOpacityScan[i]->setValue(settings.value(tr("opacityScan%1").arg(i), _3dRenderingOpacityScan[i]->value()).toDouble());
|
||||
_3dRenderingPtSizeScan[i]->setValue(settings.value(tr("ptSizeScan%1").arg(i), _3dRenderingPtSizeScan[i]->value()).toInt());
|
||||
|
||||
_3dRenderingNormalKSearch[i]->setValue(settings.value(tr("meshNormalKSearch%1").arg(i), _3dRenderingNormalKSearch[i]->value()).toInt());
|
||||
_3dRenderingGP3Radius[i]->setValue(settings.value(tr("meshGP3Radius%1").arg(i), _3dRenderingGP3Radius[i]->value()).toDouble());
|
||||
_3dRenderingSmoothing[i]->setChecked(settings.value(tr("meshSmoothing%1").arg(i), _3dRenderingSmoothing[i]->isChecked()).toBool());
|
||||
_3dRenderingSmoothingRadius[i]->setValue(settings.value(tr("meshSmoothingRadius%1").arg(i), _3dRenderingSmoothingRadius[i]->value()).toDouble());
|
||||
}
|
||||
|
||||
if(i<1)
|
||||
@@ -1120,6 +1151,11 @@ void PreferencesDialog::writeGuiSettings(const QString & filePath)
|
||||
settings.setValue(tr("ptSize%1").arg(i), _3dRenderingPtSize[i]->value());
|
||||
settings.setValue(tr("opacityScan%1").arg(i), _3dRenderingOpacityScan[i]->value());
|
||||
settings.setValue(tr("ptSizeScan%1").arg(i), _3dRenderingPtSizeScan[i]->value());
|
||||
|
||||
settings.setValue(tr("meshNormalKSearch%1").arg(i), _3dRenderingNormalKSearch[i]->value());
|
||||
settings.setValue(tr("meshGP3Radius%1").arg(i), _3dRenderingGP3Radius[i]->value());
|
||||
settings.setValue(tr("meshSmoothing%1").arg(i), _3dRenderingSmoothing[i]->isChecked());
|
||||
settings.setValue(tr("meshSmoothingRadius%1").arg(i), _3dRenderingSmoothingRadius[i]->value());
|
||||
}
|
||||
|
||||
if(i<1)
|
||||
@@ -2346,6 +2382,26 @@ int PreferencesDialog::getScanPointSize(int index) const
|
||||
UASSERT(index >= 0 && index <= 1);
|
||||
return _3dRenderingPtSizeScan[index]->value();
|
||||
}
|
||||
int PreferencesDialog::getMeshNormalKSearch(int index) const
|
||||
{
|
||||
UASSERT(index >= 0 && index <= 1);
|
||||
return _3dRenderingNormalKSearch[index]->value();
|
||||
}
|
||||
double PreferencesDialog::getMeshGP3Radius(int index) const
|
||||
{
|
||||
UASSERT(index >= 0 && index <= 1);
|
||||
return _3dRenderingGP3Radius[index]->value();
|
||||
}
|
||||
bool PreferencesDialog::getMeshSmoothing(int index) const
|
||||
{
|
||||
UASSERT(index >= 0 && index <= 1);
|
||||
return _3dRenderingSmoothing[index]->isChecked();
|
||||
}
|
||||
double PreferencesDialog::getMeshSmoothingRadius(int index) const
|
||||
{
|
||||
UASSERT(index >= 0 && index <= 1);
|
||||
return _3dRenderingSmoothingRadius[index]->value();
|
||||
}
|
||||
bool PreferencesDialog::isCloudFiltering() const
|
||||
{
|
||||
return _ui->groupBox_poseFiltering->isChecked();
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1009</width>
|
||||
<height>612</height>
|
||||
<width>892</width>
|
||||
<height>494</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -63,9 +63,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-271</y>
|
||||
<width>711</width>
|
||||
<height>795</height>
|
||||
<y>-215</y>
|
||||
<width>707</width>
|
||||
<height>853</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -320,6 +320,16 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,1">
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="label_108">
|
||||
<property name="text">
|
||||
<string>3D cloud decimation (1-2-4-8-...).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_154">
|
||||
<property name="text">
|
||||
@@ -506,16 +516,6 @@ High-res view</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="label_108">
|
||||
<property name="text">
|
||||
<string>3D cloud decimation (1-2-4-8-...).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_maxDepth">
|
||||
<property name="suffix">
|
||||
@@ -720,6 +720,13 @@ High-res view</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_meshing">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_opacity_odom_scan">
|
||||
<property name="suffix">
|
||||
@@ -779,13 +786,166 @@ High-res view</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_meshing">
|
||||
<item row="12" column="3">
|
||||
<widget class="QLabel" name="label_168">
|
||||
<property name="text">
|
||||
<string>Meshing</string>
|
||||
<string>Sphere radius that is to be used for determining the k-nearest neighbors used for triangulating (GP3). Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="3">
|
||||
<widget class="QLabel" name="label_85">
|
||||
<property name="text">
|
||||
<string>Mesh smoothing using Moving Least Squares algorithm (MLS).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_gp3Radius">
|
||||
<property name="suffix">
|
||||
<string> m</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.040000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_gp3Radius_save">
|
||||
<property name="suffix">
|
||||
<string> m</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.040000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_mlsRadius">
|
||||
<property name="suffix">
|
||||
<string> m</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.040000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QLabel" name="label_169">
|
||||
<property name="text">
|
||||
<string>Online meshing using Greedy Projection Triangulation (GP3).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="3">
|
||||
<widget class="QLabel" name="label_87">
|
||||
<property name="text">
|
||||
<string>MLS search radius: Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting. Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_mls">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<widget class="QLabel" name="label_71">
|
||||
<property name="text">
|
||||
<string>Set the number of k nearest neighbors to use for the normal estimation to create the mesh. Not used when mesh smoothing below is used.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_normalKSearch">
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QSpinBox" name="spinBox_normalKSearch_save">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_mls_save">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="2">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_mlsRadius_save">
|
||||
<property name="suffix">
|
||||
<string> m</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.040000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -818,6 +978,9 @@ High-res view</string>
|
||||
<layout class="QFormLayout" name="formLayout_22">
|
||||
<item row="0" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_cloudFilterRadius">
|
||||
<property name="suffix">
|
||||
<string> m</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
@@ -829,19 +992,22 @@ High-res view</string>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_37">
|
||||
<property name="text">
|
||||
<string>Radius (m)</string>
|
||||
<string>Radius</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="text">
|
||||
<string>Angle (degrees)</string>
|
||||
<string>Angle</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_cloudFilterAngle">
|
||||
<property name="suffix">
|
||||
<string> degrees</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user