ExportDialog: Added OpenChisel meshing option

This commit is contained in:
matlabbe
2018-03-26 18:06:41 -04:00
parent 7143f693d2
commit d2f7d8a9c4
11 changed files with 1131 additions and 149 deletions

View File

@@ -73,6 +73,12 @@ AboutDialog::AboutDialog(QWidget * parent) :
_ui->label_cputsdf->setText("No");
_ui->label_cputsdf_license->setEnabled(false);
#endif
#ifdef RTABMAP_OPENCHISEL
_ui->label_openchisel->setText("Yes");
#else
_ui->label_openchisel->setText("No");
#endif
_ui->label_freenect->setText(CameraFreenect::available()?"Yes":"No");
_ui->label_freenect_license->setEnabled(CameraFreenect::available());
_ui->label_openni2->setText(CameraOpenNI2::available()?"Yes":"No");

View File

@@ -157,6 +157,17 @@ IF(CPUTSDF_FOUND)
)
ENDIF(CPUTSDF_FOUND)
IF(open_chisel_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${open_chisel_INCLUDE_DIRS}
)
SET(LIBRARIES
${LIBRARIES}
${open_chisel_LIBRARIES}
)
ENDIF(open_chisel_FOUND)
IF(VTK_USE_QVTK)
SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${QVTK_INCLUDE_DIR})
SET(LIBRARIES ${LIBRARIES} ${QVTK_LIBRARY})

View File

@@ -68,6 +68,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cpu_tsdf/marching_cubes_tsdf_octree.h>
#endif
#ifdef RTABMAP_OPENCHISEL
#include "chisel_conversions.h"
#include <open_chisel/ProjectionIntegrator.h>
#include <open_chisel/truncation/QuadraticTruncator.h>
#include <open_chisel/weighting/ConstantWeighter.h>
#endif
namespace rtabmap {
ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
@@ -201,6 +208,21 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
connect(_ui->doubleSpinBox_cputsdf_flattenRadius, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_cputsdf_randomSplit, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_openchisel_mergeVertices, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_openchisel_chunk_size_x, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_openchisel_chunk_size_y, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_openchisel_chunk_size_z, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_truncation_constant, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_truncation_linear, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_truncation_quadratic, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_truncation_scale, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_openchisel_integration_weight, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_openchisel_use_voxel_carving, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_carving_dist_m, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_near_plane_dist, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_openchisel_far_plane_dist, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
_progressDialog = new ProgressDialog(this);
_progressDialog->setVisible(false);
_progressDialog->setAutoClose(true, 2);
@@ -356,6 +378,20 @@ void ExportCloudsDialog::saveSettings(QSettings & settings, const QString & grou
settings.setValue("cputsdf_flattenRadius", _ui->doubleSpinBox_cputsdf_flattenRadius->value());
settings.setValue("cputsdf_randomSplit", _ui->spinBox_cputsdf_randomSplit->value());
settings.setValue("openchisel_merge_vertices", _ui->checkBox_openchisel_mergeVertices->isChecked());
settings.setValue("openchisel_chunk_size_x", _ui->spinBox_openchisel_chunk_size_x->value());
settings.setValue("openchisel_chunk_size_y", _ui->spinBox_openchisel_chunk_size_y->value());
settings.setValue("openchisel_chunk_size_z", _ui->spinBox_openchisel_chunk_size_z->value());
settings.setValue("openchisel_truncation_constant", _ui->doubleSpinBox_openchisel_truncation_constant->value());
settings.setValue("openchisel_truncation_linear", _ui->doubleSpinBox_openchisel_truncation_linear->value());
settings.setValue("openchisel_truncation_quadratic", _ui->doubleSpinBox_openchisel_truncation_quadratic->value());
settings.setValue("openchisel_truncation_scale", _ui->doubleSpinBox_openchisel_truncation_scale->value());
settings.setValue("openchisel_integration_weight", _ui->spinBox_openchisel_integration_weight->value());
settings.setValue("openchisel_use_voxel_carving", _ui->checkBox_openchisel_use_voxel_carving->isChecked());
settings.setValue("openchisel_carving_dist_m", _ui->doubleSpinBox_openchisel_carving_dist_m->value());
settings.setValue("openchisel_near_plane_dist", _ui->doubleSpinBox_openchisel_near_plane_dist->value());
settings.setValue("openchisel_far_plane_dist", _ui->doubleSpinBox_openchisel_far_plane_dist->value());
if(!group.isEmpty())
{
settings.endGroup();
@@ -475,6 +511,20 @@ void ExportCloudsDialog::loadSettings(QSettings & settings, const QString & grou
_ui->doubleSpinBox_cputsdf_flattenRadius->setValue(settings.value("cputsdf_flattenRadius", _ui->doubleSpinBox_cputsdf_flattenRadius->value()).toDouble());
_ui->spinBox_cputsdf_randomSplit->setValue(settings.value("cputsdf_randomSplit", _ui->spinBox_cputsdf_randomSplit->value()).toInt());
_ui->checkBox_openchisel_mergeVertices->setChecked(settings.value("openchisel_merge_vertices", _ui->checkBox_openchisel_mergeVertices->isChecked()).toBool());
_ui->spinBox_openchisel_chunk_size_x->setValue(settings.value("openchisel_chunk_size_x", _ui->spinBox_openchisel_chunk_size_x->value()).toInt());
_ui->spinBox_openchisel_chunk_size_y->setValue(settings.value("openchisel_chunk_size_y", _ui->spinBox_openchisel_chunk_size_y->value()).toInt());
_ui->spinBox_openchisel_chunk_size_z->setValue(settings.value("openchisel_chunk_size_z", _ui->spinBox_openchisel_chunk_size_z->value()).toInt());
_ui->doubleSpinBox_openchisel_truncation_constant->setValue(settings.value("openchisel_truncation_constant", _ui->doubleSpinBox_openchisel_truncation_constant->value()).toDouble());
_ui->doubleSpinBox_openchisel_truncation_linear->setValue(settings.value("openchisel_truncation_linear", _ui->doubleSpinBox_openchisel_truncation_linear->value()).toDouble());
_ui->doubleSpinBox_openchisel_truncation_quadratic->setValue(settings.value("openchisel_truncation_quadratic", _ui->doubleSpinBox_openchisel_truncation_quadratic->value()).toDouble());
_ui->doubleSpinBox_openchisel_truncation_scale->setValue(settings.value("openchisel_truncation_scale", _ui->doubleSpinBox_openchisel_truncation_scale->value()).toDouble());
_ui->spinBox_openchisel_integration_weight->setValue(settings.value("openchisel_integration_weight", _ui->spinBox_openchisel_integration_weight->value()).toInt());
_ui->checkBox_openchisel_use_voxel_carving->setChecked(settings.value("openchisel_use_voxel_carving", _ui->checkBox_openchisel_use_voxel_carving->isChecked()).toBool());
_ui->doubleSpinBox_openchisel_carving_dist_m->setValue(settings.value("openchisel_carving_dist_m", _ui->doubleSpinBox_openchisel_carving_dist_m->value()).toDouble());
_ui->doubleSpinBox_openchisel_near_plane_dist->setValue(settings.value("openchisel_near_plane_dist", _ui->doubleSpinBox_openchisel_near_plane_dist->value()).toDouble());
_ui->doubleSpinBox_openchisel_far_plane_dist->setValue(settings.value("openchisel_far_plane_dist", _ui->doubleSpinBox_openchisel_far_plane_dist->value()).toDouble());
updateReconstructionFlavor();
updateMLSGrpVisibility();
@@ -589,6 +639,21 @@ void ExportCloudsDialog::restoreDefaults()
_ui->doubleSpinBox_cputsdf_flattenRadius->setValue(0.005);
_ui->spinBox_cputsdf_randomSplit->setValue(1);
_ui->checkBox_openchisel_mergeVertices->setChecked(true);
_ui->spinBox_openchisel_chunk_size_x->setValue(16);
_ui->spinBox_openchisel_chunk_size_y->setValue(16);
_ui->spinBox_openchisel_chunk_size_z->setValue(16);
_ui->doubleSpinBox_openchisel_truncation_constant->setValue(0.001504);
_ui->doubleSpinBox_openchisel_truncation_linear->setValue(0.00152);
_ui->doubleSpinBox_openchisel_truncation_quadratic->setValue(0.0019);
_ui->doubleSpinBox_openchisel_truncation_scale->setValue(10.0);
_ui->spinBox_openchisel_integration_weight->setValue(1);
_ui->checkBox_openchisel_use_voxel_carving->setChecked(false);
_ui->doubleSpinBox_openchisel_carving_dist_m->setValue(0.05);
_ui->doubleSpinBox_openchisel_near_plane_dist->setValue(0.05);
_ui->doubleSpinBox_openchisel_far_plane_dist->setValue(1.1);
updateReconstructionFlavor();
updateMLSGrpVisibility();
@@ -621,6 +686,7 @@ void ExportCloudsDialog::updateReconstructionFlavor()
_ui->checkBox_smoothing->setVisible(_ui->comboBox_pipeline->currentIndex() == 1);
_ui->checkBox_smoothing->setEnabled(_ui->comboBox_pipeline->currentIndex() == 1);
_ui->label_smoothing->setVisible(_ui->comboBox_pipeline->currentIndex() == 1);
_ui->comboBox_frame->setEnabled(!_ui->checkBox_assemble->isChecked() && _ui->checkBox_binary->isEnabled());
_ui->comboBox_frame->setVisible(_ui->comboBox_frame->isEnabled());
@@ -643,20 +709,34 @@ void ExportCloudsDialog::updateReconstructionFlavor()
// dense texturing options
if(_ui->checkBox_meshing->isChecked())
{
//GP3
_ui->comboBox_meshingApproach->setItemData(0, _ui->comboBox_pipeline->currentIndex() == 1?1 | 32:0,Qt::UserRole - 1);
//Poisson
_ui->comboBox_meshingApproach->setItemData(1, _ui->comboBox_pipeline->currentIndex() == 1 && _ui->checkBox_assemble->isChecked()?1 | 32:0,Qt::UserRole - 1);
//CPU-TSDF
#ifdef RTABMAP_CPUTSDF
_ui->comboBox_meshingApproach->setItemData(2, _ui->comboBox_pipeline->currentIndex() == 0 && _ui->checkBox_assemble->isChecked()?1 | 32:0,Qt::UserRole - 1);
#else
_ui->comboBox_meshingApproach->setItemData(2, Qt::UserRole - 1);
_ui->comboBox_meshingApproach->setItemData(2, 0, Qt::UserRole - 1);
#endif
// Organized
_ui->comboBox_meshingApproach->setItemData(3, _ui->comboBox_pipeline->currentIndex() == 0?1 | 32:0,Qt::UserRole - 1);
//Open Chisel
#ifdef RTABMAP_OPENCHISEL
_ui->comboBox_meshingApproach->setItemData(4, _ui->checkBox_assemble->isChecked()?1 | 32:0,Qt::UserRole - 1);
#else
_ui->comboBox_meshingApproach->setItemData(4, 0, Qt::UserRole - 1);
#endif
if(_ui->comboBox_pipeline->currentIndex() == 0 && _ui->comboBox_meshingApproach->currentIndex()<2)
{
_ui->comboBox_meshingApproach->setCurrentIndex(3);
}
if(_ui->comboBox_pipeline->currentIndex() == 1 && _ui->comboBox_meshingApproach->currentIndex()>1)
if(_ui->comboBox_pipeline->currentIndex() == 1 && (_ui->comboBox_meshingApproach->currentIndex()==2 || _ui->comboBox_meshingApproach->currentIndex()==3))
{
_ui->comboBox_meshingApproach->setCurrentIndex(1);
}
@@ -678,6 +758,7 @@ void ExportCloudsDialog::updateReconstructionFlavor()
_ui->groupBox_poisson->setVisible(_ui->comboBox_pipeline->currentIndex() == 1 && _ui->comboBox_meshingApproach->currentIndex()==1);
_ui->groupBox_cputsdf->setVisible(_ui->comboBox_pipeline->currentIndex() == 0 && _ui->comboBox_meshingApproach->currentIndex()==2);
_ui->groupBox_organized->setVisible(_ui->comboBox_pipeline->currentIndex() == 0 && _ui->comboBox_meshingApproach->currentIndex()==3);
_ui->groupBox_openchisel->setVisible(_ui->comboBox_meshingApproach->currentIndex()==4);
#ifndef DISABLE_VTK
_ui->doubleSpinBox_meshDecimationFactor->setEnabled(_ui->comboBox_meshingApproach->currentIndex()!=3);
@@ -1157,14 +1238,38 @@ bool ExportCloudsDialog::getExportedClouds(
}
_progressDialog->setMaximumSteps(int(poses.size())*mul+1);
bool loadClouds = true;
#ifdef RTABMAP_OPENCHISEL
if(_ui->comboBox_meshingApproach->currentIndex()==4 && _ui->checkBox_assemble->isChecked())
{
loadClouds = !_ui->checkBox_fromDepth->isChecked();
}
#endif
bool has2dScans = false;
std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr, pcl::IndicesPtr> > clouds = this->getClouds(
poses,
cachedSignatures,
cachedClouds,
cachedScans,
parameters,
has2dScans);
std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr, pcl::IndicesPtr> > clouds;
if(loadClouds)
{
clouds = this->getClouds(
poses,
cachedSignatures,
cachedClouds,
cachedScans,
parameters,
has2dScans);
}
else
{
// just create empty clouds
for(std::map<int, Transform>::const_iterator iter=poses.begin(); iter!=poses.end(); ++iter)
{
clouds.insert(std::make_pair(iter->first,
std::make_pair(
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr(new pcl::PointCloud<pcl::PointXYZRGBNormal>),
pcl::IndicesPtr(new std::vector<int>))));
}
}
std::set<int> validCameras = uKeysSet(clouds);
@@ -1327,7 +1432,7 @@ bool ExportCloudsDialog::getExportedClouds(
pcl::PointCloud<pcl::PointXYZ>::Ptr rawAssembledCloud(new pcl::PointCloud<pcl::PointXYZ>);
std::vector<int> rawCameraIndices;
if(_ui->checkBox_assemble->isChecked() &&
!(_ui->comboBox_pipeline->currentIndex()==0 && _ui->checkBox_meshing->isChecked()))
!((_ui->comboBox_pipeline->currentIndex()==0 || _ui->comboBox_meshingApproach->currentIndex()==4) && _ui->checkBox_meshing->isChecked()))
{
_progressDialog->appendText(tr("Assembling %1 clouds...").arg(clouds.size()));
QApplication::processEvents();
@@ -1516,6 +1621,10 @@ bool ExportCloudsDialog::getExportedClouds(
#ifdef RTABMAP_CPUTSDF
cpu_tsdf::TSDFVolumeOctree::Ptr tsdf;
#endif
#ifdef RTABMAP_OPENCHISEL
chisel::ChiselPtr chiselMap;
chisel::ProjectionIntegrator projectionIntegrator;
#endif
//used for organized texturing below
std::map<int, std::vector<int> > organizedIndices;
@@ -1525,11 +1634,166 @@ bool ExportCloudsDialog::getExportedClouds(
UDEBUG("Meshing=%d", _ui->checkBox_meshing->isChecked()?1:0);
if(_ui->checkBox_meshing->isChecked() && !has2dScans)
{
#ifdef RTABMAP_OPENCHISEL
if(_ui->comboBox_meshingApproach->currentIndex()==4 && _ui->checkBox_assemble->isChecked())
{
_progressDialog->appendText(tr("Creating TSDF volume with OpenChisel... "));
QApplication::processEvents();
uSleep(100);
QApplication::processEvents();
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr mergedClouds(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
std::vector<pcl::Vertices> mergedPolygons;
int cloudsAdded = 1;
for(std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr >::iterator iter=cloudsWithNormals.begin();
iter!= cloudsWithNormals.end();
++iter,++cloudsAdded)
{
std::vector<CameraModel> models;
StereoCameraModel stereoModel;
bool cacheHasCompressedImage = false;
LaserScan scanInfo;
if(cachedSignatures.contains(iter->first))
{
const SensorData & data = cachedSignatures.find(iter->first)->sensorData();
models = data.cameraModels();
cacheHasCompressedImage = !data.imageCompressed().empty();
scanInfo = !data.laserScanRaw().isEmpty()?data.laserScanRaw():data.laserScanCompressed();
}
else if(_dbDriver)
{
_dbDriver->getCalibration(iter->first, models, stereoModel);
_dbDriver->getLaserScanInfo(iter->first, scanInfo);
}
if(chiselMap.get() == 0)
{
UDEBUG("");
int chunkSizeX = _ui->spinBox_openchisel_chunk_size_x->value();
int chunkSizeY = _ui->spinBox_openchisel_chunk_size_y->value();
int chunkSizeZ = _ui->spinBox_openchisel_chunk_size_z->value();
float voxelResolution = _ui->doubleSpinBox_voxelSize_assembled->value();
if(voxelResolution <=0.0f)
{
_progressDialog->appendText(tr("OpenChisel: Voxel size should not be null!"), Qt::darkYellow);
_progressDialog->setAutoClose(false);
break;
}
bool useColor = _ui->checkBox_fromDepth->isChecked();
chiselMap.reset(new chisel::Chisel(Eigen::Vector3i(chunkSizeX, chunkSizeY, chunkSizeZ), voxelResolution, useColor));
double truncationDistConst = _ui->doubleSpinBox_openchisel_truncation_constant->value();
double truncationDistLinear = _ui->doubleSpinBox_openchisel_truncation_linear->value();
double truncationDistQuad = _ui->doubleSpinBox_openchisel_truncation_quadratic->value();
double truncationDistScale = _ui->doubleSpinBox_openchisel_truncation_scale->value();
int weight = _ui->spinBox_openchisel_integration_weight->value();
bool useCarving = _ui->checkBox_openchisel_use_voxel_carving->isChecked();
double carvingDist = _ui->doubleSpinBox_openchisel_carving_dist_m->value();
chisel::Vec4 truncation(truncationDistQuad, truncationDistLinear, truncationDistConst, truncationDistScale);
UDEBUG("If crashing just after this message, make sure PCL and OpenChisel are built both with -march=native or both without -march=native");
projectionIntegrator.SetCentroids(chiselMap->GetChunkManager().GetCentroids());
projectionIntegrator.SetTruncator(chisel::TruncatorPtr(new chisel::QuadraticTruncator(truncation(0), truncation(1), truncation(2), truncation(3))));
projectionIntegrator.SetWeighter(chisel::WeighterPtr(new chisel::ConstantWeighter(weight)));
projectionIntegrator.SetCarvingDist(carvingDist);
projectionIntegrator.SetCarvingEnabled(useCarving);
}
UDEBUG("");
double nearPlaneDist = _ui->doubleSpinBox_openchisel_near_plane_dist->value();
double farPlaneDist = _ui->doubleSpinBox_openchisel_far_plane_dist->value();
if(_ui->checkBox_fromDepth->isChecked())
{
if(models.size() == 1 && !models[0].localTransform().isNull())
{
// get just the depth
cv::Mat rgb;
cv::Mat depth;
if(cacheHasCompressedImage)
{
cachedSignatures.find(iter->first)->sensorData().uncompressDataConst(&rgb, &depth);
}
else if(_dbDriver)
{
SensorData data;
_dbDriver->getNodeData(iter->first, data, true, false, false, false);
data.uncompressDataConst(&rgb, &depth);
}
if(!rgb.empty() && !depth.empty())
{
CameraModel rgbModel = models[0];
CameraModel depthModel = rgbModel;
if(rgb.cols > depth.cols)
{
UASSERT(rgb.cols % depth.cols == 0);
depthModel = depthModel.scaled(double(depth.cols)/double(rgb.cols));
}
if(depth.type() == CV_16UC1)
{
depth = util2d::cvtDepthToFloat(depth);
}
std::shared_ptr<chisel::ColorImage<unsigned char> > colorChisel = colorImageToChisel(rgb);
std::shared_ptr<chisel::DepthImage<float> > depthChisel = depthImageToChisel(depth);
chisel::PinholeCamera cameraColor = cameraModelToChiselCamera(rgbModel);
chisel::PinholeCamera cameraDepth = cameraModelToChiselCamera(depthModel);
cameraColor.SetNearPlane(nearPlaneDist);
cameraColor.SetFarPlane(farPlaneDist);
cameraDepth.SetNearPlane(nearPlaneDist);
cameraDepth.SetFarPlane(farPlaneDist);
chisel::Transform pose_rel_to_first_frame = (poses.at(iter->first)*models[0].localTransform()).toEigen3f();
chiselMap->IntegrateDepthScanColor<float, unsigned char>(projectionIntegrator, depthChisel, pose_rel_to_first_frame, cameraDepth, colorChisel, pose_rel_to_first_frame, cameraColor);
UDEBUG("");
}
else
{
_progressDialog->appendText(tr("OpenChisel: Depth and RGB images not found for %1!").arg(iter->first), Qt::darkYellow);
}
}
else
{
_progressDialog->appendText(tr("OpenChisel: Invalid camera model for cloud %1! Only single RGB-D camera supported.").arg(iter->first), Qt::darkYellow);
_progressDialog->setAutoClose(false);
break;
}
}
else if(!scanInfo.localTransform().isNull())
{
chisel::PointCloudPtr chiselCloud = pointCloudRGBToChisel(*iter->second, scanInfo.localTransform().inverse());
chisel::Transform pose_rel_to_first_frame = (poses.at(iter->first)*scanInfo.localTransform()).toEigen3f();
chiselMap->IntegratePointCloud(projectionIntegrator, *chiselCloud, pose_rel_to_first_frame, farPlaneDist);
UDEBUG("");
}
else
{
_progressDialog->appendText(tr("OpenChisel: not valid scan info for cloud %1!").arg(iter->first), Qt::darkYellow);
_progressDialog->setAutoClose(false);
break;
}
chiselMap->UpdateMeshes();
UDEBUG("");
_progressDialog->appendText(tr("OpenChisel: Integrated cloud %1 (%2/%3) to TSDF volume").arg(iter->first).arg(cloudsAdded).arg(cloudsWithNormals.size()));
_progressDialog->incrementStep();
QApplication::processEvents();
if(_canceled)
{
return false;
}
}
}
else
#endif
if(_ui->comboBox_pipeline->currentIndex() == 0)
{
if(_ui->comboBox_meshingApproach->currentIndex()==2)
{
_progressDialog->appendText(tr("Creating TSDF volume... "));
_progressDialog->appendText(tr("Creating TSDF volume with CPUTSDF... "));
}
else
{
@@ -1542,10 +1806,10 @@ bool ExportCloudsDialog::getExportedClouds(
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr mergedClouds(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
std::vector<pcl::Vertices> mergedPolygons;
int i=0;
int cloudsAdded = 1;
for(std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr >::iterator iter=cloudsWithNormals.begin();
iter!= cloudsWithNormals.end();
++iter)
++iter,++cloudsAdded)
{
if(iter->second->isOrganized())
{
@@ -1613,11 +1877,11 @@ bool ExportCloudsDialog::getExportedClouds(
Eigen::Affine3d pose_rel_to_first_frame = ((poses.begin()->second.inverse() * poses.at(iter->first))*models[0].localTransform()).toEigen3d();
if(!tsdf->integrateCloud(*util3d::transformPointCloud(iter->second, models[0].localTransform().inverse()), pcl::PointCloud<pcl::Normal>(), pose_rel_to_first_frame))
{
_progressDialog->appendText(tr("CPU-TSDF: Failed integrating cloud %1 to TSDF volume").arg(iter->first));
_progressDialog->appendText(tr("CPU-TSDF: Failed integrating cloud %1 (%2/%3) to TSDF volume").arg(iter->first).arg(cloudsAdded).arg(cloudsWithNormals.size()));
}
else
{
_progressDialog->appendText(tr("CPU-TSDF: Integrated cloud %1 to TSDF volume").arg(iter->first));
_progressDialog->appendText(tr("CPU-TSDF: Integrated cloud %1 (%2/%3) to TSDF volume").arg(iter->first).arg(cloudsAdded).arg(cloudsWithNormals.size()));
}
}
}
@@ -1715,7 +1979,7 @@ bool ExportCloudsDialog::getExportedClouds(
QApplication::processEvents();
}
_progressDialog->appendText(tr("Mesh %1 created with %2 polygons (%3/%4).").arg(iter->first).arg(polygons.size()).arg(++i).arg(cloudsWithNormals.size()));
_progressDialog->appendText(tr("Mesh %1 created with %2 polygons (%3/%4).").arg(iter->first).arg(polygons.size()).arg(cloudsAdded).arg(cloudsWithNormals.size()));
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr denseCloud(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
std::vector<pcl::Vertices> densePolygons;
@@ -1757,7 +2021,7 @@ bool ExportCloudsDialog::getExportedClouds(
}
else
{
_progressDialog->appendText(tr("Mesh %1 not created (no valid points) (%2/%3).").arg(iter->first).arg(++i).arg(cloudsWithNormals.size()));
_progressDialog->appendText(tr("Mesh %1 not created (no valid points) (%2/%3).").arg(iter->first).arg(cloudsAdded).arg(cloudsWithNormals.size()));
}
}
else
@@ -1774,7 +2038,7 @@ bool ExportCloudsDialog::getExportedClouds(
}
if(weight>=0) // don't show error for intermediate nodes
{
_progressDialog->appendText(tr("Mesh %1 not created (cloud is not organized). You may want to check cloud regeneration option (%2/%3).").arg(iter->first).arg(++i).arg(cloudsWithNormals.size()));
_progressDialog->appendText(tr("Mesh %1 not created (cloud is not organized). You may want to check cloud regeneration option (%2/%3).").arg(iter->first).arg(cloudsAdded).arg(cloudsWithNormals.size()));
}
}
@@ -1838,10 +2102,10 @@ bool ExportCloudsDialog::getExportedClouds(
uSleep(100);
QApplication::processEvents();
int i=0;
int cloudsAdded=1;
for(std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr>::iterator iter=cloudsWithNormals.begin();
iter!= cloudsWithNormals.end();
++iter)
++iter,++cloudsAdded)
{
pcl::PolygonMesh::Ptr mesh(new pcl::PolygonMesh);
if(_ui->comboBox_meshingApproach->currentIndex() == 0)
@@ -1867,7 +2131,7 @@ bool ExportCloudsDialog::getExportedClouds(
poisson.reconstruct(*mesh);
}
_progressDialog->appendText(tr("Mesh %1 created with %2 polygons (%3/%4).").arg(iter->first).arg(mesh->polygons.size()).arg(++i).arg(clouds.size()));
_progressDialog->appendText(tr("Mesh %1 created with %2 polygons (%3/%4).").arg(iter->first).arg(mesh->polygons.size()).arg(cloudsAdded).arg(clouds.size()));
QApplication::processEvents();
if(mesh->polygons.size()>0)
@@ -1922,7 +2186,7 @@ bool ExportCloudsDialog::getExportedClouds(
mc.setColorByRGB (true);
pcl::PolygonMesh::Ptr mesh (new pcl::PolygonMesh);
mc.reconstruct (*mesh);
_progressDialog->appendText(tr("CPU-TSDF: Creating mesh from TSDF volume...done!"));
_progressDialog->appendText(tr("CPU-TSDF: Creating mesh from TSDF volume...done! %1 polygons").arg(mesh->polygons.size()));
meshes.clear();
if(mesh->polygons.size()>0)
@@ -2002,6 +2266,78 @@ bool ExportCloudsDialog::getExportedClouds(
}
}
#endif
#ifdef RTABMAP_OPENCHISEL
if(chiselMap.get())
{
_progressDialog->appendText(tr("OpenChisel: Creating mesh from TSDF volume..."));
QApplication::processEvents();
uSleep(100);
QApplication::processEvents();
const chisel::MeshMap& meshMap = chiselMap->GetChunkManager().GetAllMeshes();
pcl::PolygonMesh::Ptr mesh = chiselToPolygonMesh(meshMap);
// To debug...
//std::string filePly = _workingDirectory.toStdString()+"/"+"chisel.ply";
//chiselMap->SaveAllMeshesToPLY(filePly);
//UWARN("Saved %s", filePly.c_str());
_progressDialog->appendText(tr("OpenChisel: Creating mesh from TSDF volume...done! %1 polygons").arg(mesh->polygons.size()));
meshes.clear();
if(mesh->polygons.size()>0)
{
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr mergedClouds(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
pcl::fromPCLPointCloud2(mesh->cloud, *mergedClouds);
if(_ui->checkBox_openchisel_mergeVertices->isChecked())
{
_progressDialog->appendText(tr("Filtering assembled mesh for close vertices (points=%1, polygons=%2)...").arg(mergedClouds->size()).arg(mesh->polygons.size()));
QApplication::processEvents();
mesh->polygons = util3d::filterCloseVerticesFromMesh(
mergedClouds,
mesh->polygons,
_ui->doubleSpinBox_voxelSize_assembled->value()/2.0,
M_PI/4,
true);
// filter invalid polygons
unsigned int count = mesh->polygons.size();
mesh->polygons = util3d::filterInvalidPolygons(mesh->polygons);
_progressDialog->appendText(tr("Filtered %1 invalid polygons.").arg(count-mesh->polygons.size()));
QApplication::processEvents();
// filter not used vertices
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr filteredCloud(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
std::vector<pcl::Vertices> filteredPolygons;
count = mergedClouds->size();
util3d::filterNotUsedVerticesFromMesh(*mergedClouds, mesh->polygons, *filteredCloud, filteredPolygons);
mergedClouds = filteredCloud;
pcl::toPCLPointCloud2(*mergedClouds, mesh->cloud);
mesh->polygons = filteredPolygons;
_progressDialog->appendText(tr("Filtered %1 duplicate vertices.").arg(count-mergedClouds->size()));
QApplication::processEvents();
}
TexturingState texturingState(_progressDialog, false);
util3d::denseMeshPostProcessing<pcl::PointXYZRGBNormal>(
mesh,
_ui->doubleSpinBox_meshDecimationFactor->isEnabled()?(float)_ui->doubleSpinBox_meshDecimationFactor->value():0.0f,
_ui->spinBox_meshMaxPolygons->isEnabled()?_ui->spinBox_meshMaxPolygons->value():0,
mergedClouds,
(float)_ui->doubleSpinBox_transferColorRadius->value(),
!(_ui->checkBox_textureMapping->isEnabled() && _ui->checkBox_textureMapping->isChecked()),
_ui->checkBox_cleanMesh->isChecked(),
_ui->spinBox_mesh_minClusterSize->value(),
&texturingState);
meshes.insert(std::make_pair(0, mesh));
}
else
{
_progressDialog->appendText(tr("No polygons created TSDF volume!"), Qt::darkYellow);
_progressDialog->setAutoClose(false);
}
}
#endif
UDEBUG("");
if(_canceled)

View File

@@ -101,6 +101,7 @@ void ProgressDialog::setCancelButtonVisible(bool visible)
void ProgressDialog::appendText(const QString & text, const QColor & color)
{
UDEBUG(text.toStdString().c_str());
_text->setText(text);
QString html = tr("<html><font color=\"#999999\">%1 </font><font color=\"%2\">%3</font></html>").arg(QTime::currentTime().toString("HH:mm:ss")).arg(color.name()).arg(text);
_detailedText->append(html);

View File

@@ -0,0 +1,159 @@
/*
* chisel_conversions.h
*
* Created on: 2018-03-25
* Author: mathieu
*/
#ifndef CHISEL_CONVERSIONS_H_
#define CHISEL_CONVERSIONS_H_
#include <rtabmap/core/CameraModel.h>
#include <open_chisel/Chisel.h>
#include <pcl/PolygonMesh.h>
#include <pcl/common/transforms.h>
namespace rtabmap
{
std::shared_ptr<chisel::ColorImage<unsigned char> > colorImageToChisel(const cv::Mat & image)
{
UASSERT(image.type() == CV_8UC3 || image.type() == CV_8UC4);
std::shared_ptr<chisel::ColorImage<unsigned char> > imageChisel(new chisel::ColorImage<unsigned char>(image.cols, image.rows, image.channels()));
memcpy(imageChisel->GetMutableData(), image.data, image.total()*sizeof(unsigned char)*image.channels());
return imageChisel;
}
std::shared_ptr<chisel::DepthImage<float> > depthImageToChisel(const cv::Mat & image)
{
UASSERT(image.type() == CV_32FC1);
std::shared_ptr<chisel::DepthImage<float> > imageChisel(new chisel::DepthImage<float>(image.cols, image.rows));
memcpy(imageChisel->GetMutableData(), (float*)image.data, image.total()*sizeof(float));
return imageChisel;
}
chisel::PinholeCamera cameraModelToChiselCamera(const CameraModel& camera)
{
chisel::PinholeCamera cameraToReturn;
chisel::Intrinsics intrinsics;
intrinsics.SetFx(camera.fx());
intrinsics.SetFy(camera.fy());
intrinsics.SetCx(camera.cx());
intrinsics.SetCy(camera.cy());
cameraToReturn.SetIntrinsics(intrinsics);
cameraToReturn.SetWidth(camera.imageWidth());
cameraToReturn.SetHeight(camera.imageHeight());
return cameraToReturn;
}
template<typename PointRGBT>
chisel::PointCloudPtr pointCloudRGBToChisel(const typename pcl::PointCloud<PointRGBT>& cloud, const Transform & transform = Transform::getIdentity())
{
chisel::PointCloudPtr chiselCloud(new chisel::PointCloud());
chiselCloud->GetMutablePoints().resize(cloud.size());
chiselCloud->GetMutableColors().resize(cloud.size());
float byteToFloat = 1.0f / 255.0f;
int oi=0;
Eigen::Affine3f transformf = transform.toEigen3f();
for(unsigned int i=0; i<cloud.size(); ++i)
{
const PointRGBT & pt = cloud.at(i);
if(pcl::isFinite(pt))
{
PointRGBT ptt = pcl::transformPoint(pt, transformf);
chisel::Vec3& xyz = chiselCloud->GetMutablePoints().at(oi);
xyz(0) = ptt.x;
xyz(1) = ptt.y;
xyz(2) = ptt.z;
chisel::Vec3& rgb = chiselCloud->GetMutableColors().at(oi);
rgb(0) = ptt.r * byteToFloat;
rgb(1) = ptt.g * byteToFloat;
rgb(2) = ptt.b * byteToFloat;
++oi;
}
}
chiselCloud->GetMutablePoints().resize(oi);
chiselCloud->GetMutableColors().resize(oi);
return chiselCloud;
}
template<typename PointT>
chisel::PointCloudPtr pointCloudToChisel(const typename pcl::PointCloud<PointT>& cloud, const Transform & transform = Transform::getIdentity())
{
chisel::PointCloudPtr chiselCloud(new chisel::PointCloud());
chiselCloud->GetMutablePoints().resize(cloud.size());
int oi=0;
Eigen::Affine3f transformf = transform.toEigen3f();
for(unsigned int i=0; i<cloud.size(); ++i)
{
const PointT & pt = cloud.at(i);
if(pcl::isFinite(pt))
{
PointT ptt = pcl::transformPoint(pt, transformf);
chisel::Vec3& xyz = chiselCloud->GetMutablePoints().at(oi);
xyz(0) = ptt.x;
xyz(1) = ptt.y;
xyz(2) = ptt.z;
++oi;
}
}
chiselCloud->GetMutablePoints().resize(oi);
return chiselCloud;
}
pcl::PolygonMesh::Ptr chiselToPolygonMesh(const chisel::MeshMap& meshMap, unsigned char r=100, unsigned char g=100, unsigned char b=100)
{
pcl::PolygonMesh::Ptr mesh (new pcl::PolygonMesh);
if(meshMap.size())
{
bool hasColor = meshMap.begin()->second->colors.size();
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBNormal>);
size_t v = 0;
for (const std::pair<chisel::ChunkID, chisel::MeshPtr>& it : meshMap)
{
UASSERT((!hasColor || (it.second->vertices.size() == it.second->colors.size())) &&
it.second->vertices.size() == it.second->normals.size());
cloud->resize(cloud->size() + it.second->vertices.size());
mesh->polygons.resize(mesh->polygons.size()+it.second->vertices.size()/3);
for (unsigned int i=0;i<it.second->vertices.size(); ++i)
{
pcl::PointXYZRGBNormal & pt = cloud->at(v);
pt.x = it.second->vertices[i][0];
pt.y = it.second->vertices[i][1];
pt.z = it.second->vertices[i][2];
if(hasColor)
{
pt.r = it.second->colors[i][0] * 255.0f;
pt.g = it.second->colors[i][1] * 255.0f;
pt.b = it.second->colors[i][2] * 255.0f;
}
else
{
pt.r = r;
pt.g = g;
pt.b = b;
}
pt.normal_x = it.second->normals[i][0];
pt.normal_y = it.second->normals[i][1];
pt.normal_z = it.second->normals[i][2];
pcl::Vertices & polygon = mesh->polygons.at(v/3);
polygon.vertices.push_back(v++);
}
}
pcl::toPCLPointCloud2(*cloud, mesh->cloud);
}
return mesh;
}
}
#endif /* CHISEL_CONVERSIONS_H_ */

View File

@@ -2,6 +2,14 @@
<ui version="4.0">
<class>aboutDialog</class>
<widget class="QDialog" name="aboutDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>760</width>
<height>738</height>
</rect>
</property>
<property name="windowTitle">
<string>About RTAB-Map</string>
</property>
@@ -154,9 +162,9 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>544</height>
<y>-181</y>
<width>594</width>
<height>567</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -177,6 +185,19 @@ p, li { white-space: pre-wrap; }
</property>
<item>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,1">
<item row="22" column="1">
<widget class="QLabel" name="label_dvo">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QLabel" name="label_octomap">
<property name="text">
@@ -302,7 +323,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="0">
<item row="20" column="0">
<widget class="QLabel" name="label_25">
<property name="text">
<string>With FOVIS :</string>
@@ -322,6 +343,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="17" column="2">
<widget class="QLabel" name="label_octomap_license">
<property name="text">
<string>BSD</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
@@ -332,20 +363,17 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QLabel" name="label_dvo">
<item row="21" column="2">
<widget class="QLabel" name="label_viso2_license">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<string>GPLv3</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="22" column="0">
<item row="23" column="0">
<widget class="QLabel" name="label_28">
<property name="text">
<string>With ORB SLAM 2 :</string>
@@ -355,7 +383,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="22" column="1">
<item row="23" column="1">
<widget class="QLabel" name="label_orbslam2">
<property name="text">
<string/>
@@ -401,7 +429,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="1">
<item row="20" column="1">
<widget class="QLabel" name="label_fovis">
<property name="text">
<string/>
@@ -414,7 +442,17 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="20" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_77">
<property name="text">
<string>With TORO :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>With Viso2 :</string>
@@ -503,6 +541,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>With stereo dc1394 :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_opencv_version">
<property name="text">
@@ -529,10 +577,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_16">
<item row="8" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>With stereo dc1394 :</string>
<string>With RealSense :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -565,10 +613,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_22">
<item row="1" column="2">
<widget class="QLabel" name="label_opencv_license">
<property name="text">
<string>With RealSense :</string>
<string>BSD</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -588,6 +636,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLabel" name="label_freenect2_license">
<property name="text">
<string>Apache v2 and/or GPLv2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_freenect">
<property name="text">
@@ -601,20 +659,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_opencv_license">
<item row="6" column="2">
<widget class="QLabel" name="label_openni2_license">
<property name="text">
<string>BSD</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLabel" name="label_freenect2_license">
<property name="text">
<string>Apache v2 and/or GPLv2</string>
<string>Apache v2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -631,10 +679,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_openni2_license">
<item row="5" column="2">
<widget class="QLabel" name="label_freenect_license">
<property name="text">
<string>Apache v2</string>
<string>Apache v2 and/or GPLv2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -654,10 +702,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLabel" name="label_freenect_license">
<item row="8" column="2">
<widget class="QLabel" name="label_realsense_license">
<property name="text">
<string>Apache v2 and/or GPLv2</string>
<string>Apache-2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -674,20 +722,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QLabel" name="label_realsense_license">
<item row="20" column="2">
<widget class="QLabel" name="label_fovis_license">
<property name="text">
<string>Apache-2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="2">
<widget class="QLabel" name="label_octomap_license">
<property name="text">
<string>BSD</string>
<string>GPLv2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -704,27 +742,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="2">
<widget class="QLabel" name="label_fovis_license">
<property name="text">
<string>GPLv2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="20" column="2">
<widget class="QLabel" name="label_viso2_license">
<property name="text">
<string>GPLv3</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="21" column="2">
<item row="22" column="2">
<widget class="QLabel" name="label_dvo_license">
<property name="text">
<string>GPLv3</string>
@@ -734,6 +752,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QLabel" name="label_toro_license">
<property name="text">
<string>Creative Commons [Attribution-NonCommercial-ShareAlike]</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLabel" name="label_toro">
<property name="text">
@@ -757,26 +785,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QLabel" name="label_toro_license">
<property name="text">
<string>Creative Commons [Attribution-NonCommercial-ShareAlike]</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_77">
<property name="text">
<string>With TORO :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
@@ -787,20 +795,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="20" column="1">
<widget class="QLabel" name="label_viso2">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="21" column="0">
<item row="22" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>With DVO :</string>
@@ -820,8 +815,8 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_qt_version">
<item row="21" column="1">
<widget class="QLabel" name="label_viso2">
<property name="text">
<string/>
</property>
@@ -853,6 +848,19 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_qt_version">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="15" column="2">
<widget class="QLabel" name="label_cvsba_license">
<property name="text">
@@ -863,20 +871,20 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="22" column="2">
<widget class="QLabel" name="label_orbslam2_license">
<item row="16" column="2">
<widget class="QLabel" name="label_libpointmatcher_license">
<property name="text">
<string>GPLv3</string>
<string>BSD</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="16" column="2">
<widget class="QLabel" name="label_libpointmatcher_license">
<item row="23" column="2">
<widget class="QLabel" name="label_orbslam2_license">
<property name="text">
<string>BSD</string>
<string>GPLv3</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -906,6 +914,29 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>With OpenChisel :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QLabel" name="label_openchisel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>

View File

@@ -23,9 +23,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-2703</y>
<width>773</width>
<height>4137</height>
<y>-3986</y>
<width>778</width>
<height>4680</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
@@ -178,7 +178,7 @@
</widget>
</item>
<item row="11" column="1">
<widget class="QLabel" name="label_binaryFile_10">
<widget class="QLabel" name="label_smoothing">
<property name="text">
<string>Cloud smoothing using Moving Least Squares algorithm (MLS).</string>
</property>
@@ -1325,7 +1325,7 @@ Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
<item row="0" column="1">
<widget class="QLabel" name="label_denseReconstruction">
<property name="text">
<string>Surface reconstruction approach. Poisson is available when clouds are assembled and dense reconstruction flavor is selected. CPU-TSDF is available when clouds are assembled, organized reconstruction flavor is selected and RTAB-Map is built with CPU-TSDF support.</string>
<string>Surface reconstruction approach. Poisson is available when clouds are assembled and dense reconstruction flavor is selected. CPU-TSDF is available when clouds are assembled, organized reconstruction flavor is selected and RTAB-Map is built with CPU-TSDF support. OpenChisel is available when clouds are assembled and RTAB-Map is built with OpenChisel support.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -1403,6 +1403,11 @@ Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
<string>Organized</string>
</property>
</item>
<item>
<property name="text">
<string>Open Chisel (TSDF)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
@@ -2601,6 +2606,400 @@ Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_openchisel">
<property name="title">
<string>OpenChisel Reconstruction</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<widget class="QLabel" name="label_26">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/personalrobotics/OpenChisel&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/personalrobotics/OpenChisel&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Parameters below match those in chisel_ros package. Voxel resolution is taken from the general voxel parameter above, it should not be null. &lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Issue: &lt;/span&gt;If voxel size or chunk size are changed after exporting/viewing one time, the app should be restarted to avoid black meshes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_19" columnstretch="0,1">
<item row="4" column="1">
<widget class="QLabel" name="label_36">
<property name="text">
<string>truncation_constant</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_35">
<property name="text">
<string>chunk_size_z</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_40">
<property name="text">
<string>truncation_linear</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="label_43">
<property name="text">
<string>integration_weight</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QLabel" name="label_46">
<property name="text">
<string>near_plane_dist</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_34">
<property name="text">
<string>chunk_size_y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QSpinBox" name="spinBox_openchisel_chunk_size_y">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="value">
<number>16</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_truncation_constant">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="minimum">
<double>0.000001000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.001504000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QSpinBox" name="spinBox_openchisel_chunk_size_z">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="value">
<number>16</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QSpinBox" name="spinBox_openchisel_chunk_size_x">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="value">
<number>16</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_31">
<property name="text">
<string>chunk_size_x</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_42">
<property name="text">
<string>truncation_scale</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_41">
<property name="text">
<string>truncation_quadratic</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="label_44">
<property name="text">
<string>use_voxel_carving</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="label_45">
<property name="text">
<string>carving_dist_m</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLabel" name="label_47">
<property name="text">
<string>far_plane_dist</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_truncation_linear">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="minimum">
<double>0.000001000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.001504000000000</double>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_truncation_quadratic">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="minimum">
<double>0.000001000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.001504000000000</double>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_truncation_scale">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QSpinBox" name="spinBox_openchisel_integration_weight">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="value">
<number>16</number>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="checkBox_openchisel_use_voxel_carving">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_carving_dist_m">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_near_plane_dist">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_openchisel_far_plane_dist">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_48">
<property name="text">
<string>Simplify generated mesh by merging close vertices together. Required for some post mesh filtering approaches to work properly.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_openchisel_mergeVertices">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">