mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Added bilateral filtering option. CloudViewer: lighting and edge visibility options.
This commit is contained in:
@@ -127,6 +127,9 @@ CloudViewer::CloudViewer(QWidget *parent) :
|
||||
_aSetGridCellCount(0),
|
||||
_aSetGridCellSize(0),
|
||||
_aSetBackgroundColor(0),
|
||||
_aSetRenderingRate(0),
|
||||
_aSetLighting(0),
|
||||
_aSetEdgeVisibility(0),
|
||||
_menu(0),
|
||||
_trajectory(new pcl::PointCloud<pcl::PointXYZ>),
|
||||
_maxTrajectorySize(100),
|
||||
@@ -234,6 +237,12 @@ void CloudViewer::createMenu()
|
||||
_aSetGridCellSize = new QAction("Set cell size...", this);
|
||||
_aSetBackgroundColor = new QAction("Set background color...", this);
|
||||
_aSetRenderingRate = new QAction("Set rendering rate...", this);
|
||||
_aSetLighting = new QAction("Lighting", this);
|
||||
_aSetLighting->setCheckable(true);
|
||||
_aSetLighting->setChecked(false);
|
||||
_aSetEdgeVisibility = new QAction("Show edges", this);
|
||||
_aSetEdgeVisibility->setCheckable(true);
|
||||
_aSetEdgeVisibility->setChecked(false);
|
||||
|
||||
QMenu * cameraMenu = new QMenu("Camera", this);
|
||||
cameraMenu->addAction(_aLockCamera);
|
||||
@@ -270,6 +279,8 @@ void CloudViewer::createMenu()
|
||||
_menu->addMenu(gridMenu);
|
||||
_menu->addAction(_aSetBackgroundColor);
|
||||
_menu->addAction(_aSetRenderingRate);
|
||||
_menu->addAction(_aSetLighting);
|
||||
_menu->addAction(_aSetEdgeVisibility);
|
||||
}
|
||||
|
||||
void CloudViewer::saveSettings(QSettings & settings, const QString & group) const
|
||||
@@ -531,7 +542,8 @@ bool CloudViewer::addCloudMesh(
|
||||
UDEBUG("Adding %s with %d points and %d polygons", id.c_str(), (int)cloud->size(), (int)polygons.size());
|
||||
if(_visualizer->addPolygonMesh<pcl::PointXYZ>(cloud, polygons, id))
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->LightingOff();
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
if(_backfaceCulling)
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->BackfaceCullingOn();
|
||||
@@ -561,7 +573,8 @@ bool CloudViewer::addCloudMesh(
|
||||
UDEBUG("Adding %s with %d points and %d polygons", id.c_str(), (int)cloud->size(), (int)polygons.size());
|
||||
if(_visualizer->addPolygonMesh<pcl::PointXYZRGB>(cloud, polygons, id))
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->LightingOff();
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
if(_backfaceCulling)
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->BackfaceCullingOn();
|
||||
@@ -591,7 +604,8 @@ bool CloudViewer::addCloudMesh(
|
||||
UDEBUG("Adding %s with %d points and %d polygons", id.c_str(), (int)cloud->size(), (int)polygons.size());
|
||||
if(_visualizer->addPolygonMesh<pcl::PointXYZRGBNormal>(cloud, polygons, id))
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->LightingOff();
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
if(_backfaceCulling)
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->BackfaceCullingOn();
|
||||
@@ -620,7 +634,8 @@ bool CloudViewer::addCloudMesh(
|
||||
UDEBUG("Adding %s with %d polygons", id.c_str(), (int)mesh->polygons.size());
|
||||
if(_visualizer->addPolygonMesh(*mesh, id))
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->LightingOff();
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
if(_backfaceCulling)
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->BackfaceCullingOn();
|
||||
@@ -650,7 +665,8 @@ bool CloudViewer::addCloudTextureMesh(
|
||||
UDEBUG("Adding %s", id.c_str());
|
||||
if(this->addTextureMesh(*textureMesh, id))
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->LightingOff();
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
if(_backfaceCulling)
|
||||
{
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->BackfaceCullingOn();
|
||||
@@ -671,7 +687,7 @@ bool CloudViewer::addCloudTextureMesh(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CloudViewer::addOctomap(const OctoMap * octomap, unsigned int treeDepth, bool showEdges, bool lightingOn)
|
||||
bool CloudViewer::addOctomap(const OctoMap * octomap, unsigned int treeDepth)
|
||||
{
|
||||
UDEBUG("");
|
||||
#ifdef RTABMAP_OCTOMAP
|
||||
@@ -751,8 +767,8 @@ bool CloudViewer::addOctomap(const OctoMap * octomap, unsigned int treeDepth, bo
|
||||
octomapActor->SetMapper(mapper);
|
||||
|
||||
octomapActor->GetProperty()->SetRepresentationToSurface();
|
||||
octomapActor->GetProperty()->SetEdgeVisibility(showEdges);
|
||||
octomapActor->GetProperty()->SetLighting(lightingOn);
|
||||
octomapActor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
octomapActor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
|
||||
renderer->AddActor(octomapActor);
|
||||
_octomapActor = octomapActor.GetPointer();
|
||||
@@ -905,7 +921,10 @@ bool CloudViewer::addTextureMesh (
|
||||
int viewport)
|
||||
{
|
||||
#if PCL_VERSION_COMPARE(>=, 1, 7, 2)
|
||||
return _visualizer->addTextureMesh(mesh, id, viewport);
|
||||
if(!_visualizer->addTextureMesh(mesh, id, viewport))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// Copied from PCL 1.8
|
||||
|
||||
@@ -1141,8 +1160,11 @@ bool CloudViewer::addTextureMesh (
|
||||
// Save the viewpoint transformation matrix to the global actor map
|
||||
(*_visualizer->getCloudActorMap())[id].viewpoint_transformation_ = transformation;
|
||||
|
||||
return (true);
|
||||
#endif
|
||||
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
_visualizer->getCloudActorMap()->find(id)->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CloudViewer::addOccupancyGridMap(
|
||||
@@ -1201,7 +1223,6 @@ bool CloudViewer::addOccupancyGridMap(
|
||||
mesh->tex_coordinates.push_back(coordinates);
|
||||
|
||||
this->addTextureMesh(*mesh, "map");
|
||||
_visualizer->getCloudActorMap()->find("map")->second.actor->GetProperty()->LightingOff();
|
||||
setCloudOpacity("map", opacity);
|
||||
|
||||
//removed tmp texture file
|
||||
@@ -1734,6 +1755,28 @@ void CloudViewer::setRenderingRate(double rate)
|
||||
_visualizer->getInteractorStyle()->GetInteractor()->SetDesiredUpdateRate(_renderingRate);
|
||||
}
|
||||
|
||||
void CloudViewer::setLighting(bool on)
|
||||
{
|
||||
_aSetLighting->setChecked(on);
|
||||
pcl::visualization::CloudActorMapPtr cloudActorMap = _visualizer->getCloudActorMap();
|
||||
for(pcl::visualization::CloudActorMap::iterator iter=cloudActorMap->begin(); iter!=cloudActorMap->end(); ++iter)
|
||||
{
|
||||
iter->second.actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
}
|
||||
this->update();
|
||||
}
|
||||
|
||||
void CloudViewer::setEdgeVisibility(bool visible)
|
||||
{
|
||||
_aSetEdgeVisibility->setChecked(visible);
|
||||
pcl::visualization::CloudActorMapPtr cloudActorMap = _visualizer->getCloudActorMap();
|
||||
for(pcl::visualization::CloudActorMap::iterator iter=cloudActorMap->begin(); iter!=cloudActorMap->end(); ++iter)
|
||||
{
|
||||
iter->second.actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
}
|
||||
this->update();
|
||||
}
|
||||
|
||||
void CloudViewer::getCameraPosition(
|
||||
float & x, float & y, float & z,
|
||||
float & focalX, float & focalY, float & focalZ,
|
||||
@@ -2468,6 +2511,14 @@ void CloudViewer::handleAction(QAction * a)
|
||||
this->update();
|
||||
}
|
||||
}
|
||||
else if(a == _aSetLighting)
|
||||
{
|
||||
this->setLighting(_aSetLighting->isChecked());
|
||||
}
|
||||
else if(a == _aSetEdgeVisibility)
|
||||
{
|
||||
this->setEdgeVisibility(_aSetEdgeVisibility->isChecked());
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace rtabmap */
|
||||
|
||||
@@ -3227,7 +3227,7 @@ void DatabaseViewer::updateConstraintView(
|
||||
ui_->label_type->setText(tr("%1 (%2)")
|
||||
.arg(link.type())
|
||||
.arg(link.type()==Link::kNeighbor?"Neighbor":
|
||||
link.type()==Link::kNeighbor?"Merged neighbor":
|
||||
link.type()==Link::kNeighborMerged?"Merged neighbor":
|
||||
link.type()==Link::kGlobalClosure?"Loop closure":
|
||||
link.type()==Link::kLocalSpaceClosure?"Space proximity link":
|
||||
link.type()==Link::kLocalTimeClosure?"Time proximity link":
|
||||
|
||||
@@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/util3d_surface.h"
|
||||
#include "rtabmap/core/util3d_transforms.h"
|
||||
#include "rtabmap/core/util3d.h"
|
||||
#include "rtabmap/core/util2d.h"
|
||||
#include "rtabmap/core/Graph.h"
|
||||
#include "rtabmap/core/GainCompensator.h"
|
||||
#include "rtabmap/core/clams/discrete_depth_distortion_model.h"
|
||||
@@ -83,6 +84,10 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
|
||||
connect(_ui->lineEdit_distortionModel, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged()));
|
||||
connect(_ui->toolButton_distortionModel, SIGNAL(clicked()), this, SLOT(selectDistortionModel()));
|
||||
|
||||
connect(_ui->groupBox_bilateral, SIGNAL(clicked(bool)), this, SIGNAL(configChanged()));
|
||||
connect(_ui->doubleSpinBox_bilateral_sigmaS, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||
connect(_ui->doubleSpinBox_bilateral_sigmaR, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||
|
||||
connect(_ui->groupBox_filtering, SIGNAL(clicked(bool)), this, SIGNAL(configChanged()));
|
||||
connect(_ui->doubleSpinBox_filteringRadius, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||
connect(_ui->spinBox_filteringMinNeighbors, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
|
||||
@@ -181,6 +186,9 @@ void ExportCloudsDialog::saveSettings(QSettings & settings, const QString & grou
|
||||
settings.setValue("regenerate_min_depth", _ui->doubleSpinBox_minDepth->value());
|
||||
settings.setValue("regenerate_distortion_model", _ui->lineEdit_distortionModel->text());
|
||||
|
||||
settings.setValue("bilateral", _ui->groupBox_bilateral->isChecked());
|
||||
settings.setValue("bilateral_sigma_s", _ui->doubleSpinBox_bilateral_sigmaS->value());
|
||||
settings.setValue("bilateral_sigma_r", _ui->doubleSpinBox_bilateral_sigmaR->value());
|
||||
|
||||
settings.setValue("filtering", _ui->groupBox_filtering->isChecked());
|
||||
settings.setValue("filtering_radius", _ui->doubleSpinBox_filteringRadius->value());
|
||||
@@ -246,6 +254,10 @@ void ExportCloudsDialog::loadSettings(QSettings & settings, const QString & grou
|
||||
_ui->doubleSpinBox_minDepth->setValue(settings.value("regenerate_min_depth", _ui->doubleSpinBox_minDepth->value()).toDouble());
|
||||
_ui->lineEdit_distortionModel->setText(settings.value("regenerate_distortion_model", _ui->lineEdit_distortionModel->text()).toString());
|
||||
|
||||
_ui->groupBox_bilateral->setChecked(settings.value("bilateral", _ui->groupBox_bilateral->isChecked()).toBool());
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->setValue(settings.value("bilateral_sigma_s", _ui->doubleSpinBox_bilateral_sigmaS->value()).toDouble());
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->setValue(settings.value("bilateral_sigma_r", _ui->doubleSpinBox_bilateral_sigmaR->value()).toDouble());
|
||||
|
||||
_ui->groupBox_filtering->setChecked(settings.value("filtering", _ui->groupBox_filtering->isChecked()).toBool());
|
||||
_ui->doubleSpinBox_filteringRadius->setValue(settings.value("filtering_radius", _ui->doubleSpinBox_filteringRadius->value()).toDouble());
|
||||
_ui->spinBox_filteringMinNeighbors->setValue(settings.value("filtering_min_neighbors", _ui->spinBox_filteringMinNeighbors->value()).toInt());
|
||||
@@ -309,6 +321,10 @@ void ExportCloudsDialog::restoreDefaults()
|
||||
_ui->doubleSpinBox_minDepth->setValue(0);
|
||||
_ui->lineEdit_distortionModel->setText("");
|
||||
|
||||
_ui->groupBox_bilateral->setChecked(false);
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->setValue(10.0);
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->setValue(0.1);
|
||||
|
||||
_ui->groupBox_filtering->setChecked(false);
|
||||
_ui->doubleSpinBox_filteringRadius->setValue(0.02);
|
||||
_ui->spinBox_filteringMinNeighbors->setValue(2);
|
||||
@@ -1432,6 +1448,15 @@ std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr, pcl::Indic
|
||||
d.setDepthOrRightRaw(depth);
|
||||
}
|
||||
|
||||
// bilateral filtering
|
||||
if(_ui->groupBox_bilateral->isChecked())
|
||||
{
|
||||
depth = util2d::fastBilateralFiltering(depth,
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->value(),
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->value());
|
||||
d.setDepthOrRightRaw(depth);
|
||||
}
|
||||
|
||||
UASSERT(iter->first == d.id());
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudWithoutNormals;
|
||||
cloudWithoutNormals = util3d::cloudRGBFromSensorData(
|
||||
|
||||
@@ -858,6 +858,7 @@ void MainWindow::processCameraInfo(const rtabmap::CameraInfo & info)
|
||||
_ui->statsToolBox->updateStat("Camera/Time total/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeTotal*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time capturing/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeCapture*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time undistort depth/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeUndistortDepth*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time bilateral filtering/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeBilateralFiltering*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time decimation/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeImageDecimation*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time disparity/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeDisparity*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
_ui->statsToolBox->updateStat("Camera/Time mirroring/ms", _preferencesDialog->isTimeUsedInFigures()?info.stamp-_firstStamp:(float)info.id, info.timeMirroring*1000.0f, _preferencesDialog->isCacheSavedInFigures());
|
||||
@@ -4150,6 +4151,12 @@ void MainWindow::startDetection()
|
||||
_preferencesDialog->getSourceScanNormalsK());
|
||||
if(_preferencesDialog->getSourceType() == PreferencesDialog::kSrcRGBD)
|
||||
{
|
||||
if(_preferencesDialog->isBilateralFiltering())
|
||||
{
|
||||
_camera->enableBilateralFiltering(
|
||||
_preferencesDialog->getBilateralSigmaS(),
|
||||
_preferencesDialog->getBilateralSigmaR());
|
||||
}
|
||||
_camera->setDistortionModel(_preferencesDialog->getSourceDistortionModel().toStdString());
|
||||
}
|
||||
|
||||
|
||||
@@ -517,6 +517,9 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->lineEdit_openniOniPath, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->lineEdit_openni2OniPath, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->lineEdit_source_distortionModel, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->groupBox_bilateral, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_bilateral_sigmaS, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_bilateral_sigmaR, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
|
||||
connect(_ui->groupBox_scanFromDepth, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_cameraScanFromDepth_decimation, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
@@ -1349,6 +1352,9 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->lineEdit_cameraRGBDImages_path_depth->setText("");
|
||||
_ui->doubleSpinBox_cameraRGBDImages_scale->setValue(1.0);
|
||||
_ui->lineEdit_source_distortionModel->setText("");
|
||||
_ui->groupBox_bilateral->setChecked(false);
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->setValue(10.0);
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->setValue(0.1);
|
||||
|
||||
_ui->source_comboBox_image_type->setCurrentIndex(kSrcDC1394-kSrcDC1394);
|
||||
_ui->lineEdit_cameraStereoImages_path_left->setText("");
|
||||
@@ -1656,6 +1662,9 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
_ui->comboBox_cameraRGBD->setCurrentIndex(settings.value("driver", _ui->comboBox_cameraRGBD->currentIndex()).toInt());
|
||||
_ui->checkbox_rgbd_colorOnly->setChecked(settings.value("rgbdColorOnly", _ui->checkbox_rgbd_colorOnly->isChecked()).toBool());
|
||||
_ui->lineEdit_source_distortionModel->setText(settings.value("distortion_model", _ui->lineEdit_source_distortionModel->text()).toString());
|
||||
_ui->groupBox_bilateral->setChecked(settings.value("bilateral", _ui->groupBox_bilateral->isChecked()).toBool());
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->setValue(settings.value("bilateral_sigma_s", _ui->doubleSpinBox_bilateral_sigmaS->value()).toDouble());
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->setValue(settings.value("bilateral_sigma_r", _ui->doubleSpinBox_bilateral_sigmaR->value()).toDouble());
|
||||
settings.endGroup(); // rgbd
|
||||
|
||||
settings.beginGroup("stereo");
|
||||
@@ -2087,9 +2096,12 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
settings.setValue("imageDecimation", _ui->spinBox_source_imageDecimation->value());
|
||||
|
||||
settings.beginGroup("rgbd");
|
||||
settings.setValue("driver", _ui->comboBox_cameraRGBD->currentIndex());
|
||||
settings.setValue("rgbdColorOnly", _ui->checkbox_rgbd_colorOnly->isChecked());
|
||||
settings.setValue("distortion_model", _ui->lineEdit_source_distortionModel->text());
|
||||
settings.setValue("driver", _ui->comboBox_cameraRGBD->currentIndex());
|
||||
settings.setValue("rgbdColorOnly", _ui->checkbox_rgbd_colorOnly->isChecked());
|
||||
settings.setValue("distortion_model", _ui->lineEdit_source_distortionModel->text());
|
||||
settings.setValue("bilateral", _ui->groupBox_bilateral->isChecked());
|
||||
settings.setValue("bilateral_sigma_s", _ui->doubleSpinBox_bilateral_sigmaS->value());
|
||||
settings.setValue("bilateral_sigma_r", _ui->doubleSpinBox_bilateral_sigmaR->value());
|
||||
settings.endGroup(); // rgbd
|
||||
|
||||
settings.beginGroup("stereo");
|
||||
@@ -4148,6 +4160,18 @@ QString PreferencesDialog::getSourceDistortionModel() const
|
||||
{
|
||||
return _ui->lineEdit_source_distortionModel->text();
|
||||
}
|
||||
bool PreferencesDialog::isBilateralFiltering() const
|
||||
{
|
||||
return _ui->groupBox_bilateral->isChecked();
|
||||
}
|
||||
double PreferencesDialog::getBilateralSigmaS() const
|
||||
{
|
||||
return _ui->doubleSpinBox_bilateral_sigmaS->value();
|
||||
}
|
||||
double PreferencesDialog::getBilateralSigmaR() const
|
||||
{
|
||||
return _ui->doubleSpinBox_bilateral_sigmaR->value();
|
||||
}
|
||||
int PreferencesDialog::getSourceImageDecimation() const
|
||||
{
|
||||
return _ui->spinBox_source_imageDecimation->value();
|
||||
@@ -4669,10 +4693,18 @@ void PreferencesDialog::testOdometry()
|
||||
_ui->doubleSpinBox_cameraSCanFromDepth_maxDepth->value(),
|
||||
_ui->doubleSpinBox_cameraImages_scanVoxelSize->value(),
|
||||
_ui->spinBox_cameraImages_scanNormalsK->value());
|
||||
if(this->getSourceType() == PreferencesDialog::kSrcRGBD &&
|
||||
!_ui->lineEdit_source_distortionModel->text().isEmpty())
|
||||
if(this->getSourceType() == PreferencesDialog::kSrcRGBD)
|
||||
{
|
||||
cameraThread.setDistortionModel(_ui->lineEdit_source_distortionModel->text().toStdString());
|
||||
if(_ui->groupBox_bilateral->isChecked())
|
||||
{
|
||||
cameraThread.enableBilateralFiltering(
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->value(),
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->value());
|
||||
}
|
||||
if(!_ui->lineEdit_source_distortionModel->text().isEmpty())
|
||||
{
|
||||
cameraThread.setDistortionModel(_ui->lineEdit_source_distortionModel->text().toStdString());
|
||||
}
|
||||
}
|
||||
UEventsManager::createPipe(&cameraThread, &odomThread, "CameraEvent");
|
||||
UEventsManager::createPipe(&odomThread, odomViewer, "OdometryEvent");
|
||||
@@ -4709,10 +4741,18 @@ void PreferencesDialog::testCamera()
|
||||
_ui->doubleSpinBox_cameraSCanFromDepth_maxDepth->value(),
|
||||
_ui->doubleSpinBox_cameraImages_scanVoxelSize->value(),
|
||||
_ui->spinBox_cameraImages_scanNormalsK->value());
|
||||
if(this->getSourceType() == PreferencesDialog::kSrcRGBD &&
|
||||
!_ui->lineEdit_source_distortionModel->text().isEmpty())
|
||||
if(this->getSourceType() == PreferencesDialog::kSrcRGBD)
|
||||
{
|
||||
cameraThread.setDistortionModel(_ui->lineEdit_source_distortionModel->text().toStdString());
|
||||
if(_ui->groupBox_bilateral->isChecked())
|
||||
{
|
||||
cameraThread.enableBilateralFiltering(
|
||||
_ui->doubleSpinBox_bilateral_sigmaS->value(),
|
||||
_ui->doubleSpinBox_bilateral_sigmaR->value());
|
||||
}
|
||||
if(!_ui->lineEdit_source_distortionModel->text().isEmpty())
|
||||
{
|
||||
cameraThread.setDistortionModel(_ui->lineEdit_source_distortionModel->text().toStdString());
|
||||
}
|
||||
}
|
||||
UEventsManager::createPipe(&cameraThread, window, "CameraEvent");
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>773</width>
|
||||
<height>1755</height>
|
||||
<height>1902</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
@@ -254,6 +254,88 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_bilateral">
|
||||
<property name="title">
|
||||
<string>Bilateral Filtering of the Depth Image</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_13" columnstretch="0,1">
|
||||
<item row="1" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_bilateral_sigmaR">
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000100000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.001000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.005000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_194">
|
||||
<property name="text">
|
||||
<string>Standard deviation of the Gaussian for the intensity difference. Set the standard deviation of the Gaussian used to control how much an adjacent pixel is downweighted because of the intensity difference (depth in our case).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_bilateral_sigmaS">
|
||||
<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>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_195">
|
||||
<property name="text">
|
||||
<string>Size of the Gaussian bilateral filter window to use. Set the standard deviation of the Gaussian used by the bilateral filter for the spatial neighborhood/window.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_subtraction">
|
||||
<property name="title">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<y>-427</y>
|
||||
<width>673</width>
|
||||
<height>2520</height>
|
||||
</rect>
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
||||
@@ -2400,7 +2400,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget_src">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_41">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_64">
|
||||
@@ -2551,6 +2551,88 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_bilateral">
|
||||
<property name="title">
|
||||
<string>Bilateral Filtering of the Depth Image</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_78" columnstretch="0,1">
|
||||
<item row="1" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_bilateral_sigmaR">
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000100000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.001000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.005000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_344">
|
||||
<property name="text">
|
||||
<string>Standard deviation of the Gaussian for the intensity difference. Set the standard deviation of the Gaussian used to control how much an adjacent pixel is downweighted because of the intensity difference (depth in our case).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_bilateral_sigmaS">
|
||||
<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>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_345">
|
||||
<property name="text">
|
||||
<string>Size of the Gaussian bilateral filter window to use. Set the standard deviation of the Gaussian used by the bilateral filter for the spatial neighborhood/window.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget_rgbd">
|
||||
<property name="currentIndex">
|
||||
@@ -4637,7 +4719,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>If you want to use ICP registration, the sensor data should have laser scan. Laser scans can be created from the depth images (see option below) or loaded from the source selected. The latter parameters can be used to reduce the point cloud size directly in the capturing thread.</string>
|
||||
<string>If you want to use ICP registration, the sensor data should have laser scan. Laser scans can be created from the depth images (see option below) or loaded from the source selected. These parameters can be used to reduce the point cloud size directly in the capturing thread.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
||||
Reference in New Issue
Block a user