0.19.6: Added auto brightness/contrast and texture format options to multiband approach. rtabmap-export moved from examples to tools directory.

This commit is contained in:
matlabbe
2019-11-03 14:10:02 -05:00
parent 5d789f75a9
commit 179f17d267
17 changed files with 337 additions and 190 deletions

View File

@@ -653,7 +653,7 @@ void ExportCloudsDialog::restoreDefaults()
_ui->doubleSpinBox_cameraFilterVelRad->setValue(0);
_ui->doubleSpinBox_laplacianVariance->setValue(0);
_ui->spinBox_textureBrightnessContrastRatioLow->setValue(0);
_ui->spinBox_textureBrightnessContrastRatioHigh->setValue(0);
_ui->spinBox_textureBrightnessContrastRatioHigh->setValue(5);
_ui->checkBox_exposureFusion->setChecked(false);
_ui->checkBox_blending->setChecked(true);
_ui->comboBox_blendingDecimation->setCurrentIndex(0);
@@ -3840,10 +3840,15 @@ void ExportCloudsDialog::saveTextureMeshes(
cv::Mat globalTextures;
bool texturesMerged = _ui->comboBox_meshingTextureSize->isEnabled() && _ui->comboBox_meshingTextureSize->currentIndex() > 0;
if(texturesMerged && mesh->tex_materials.size()>1)
{
{
_progressDialog->appendText(tr("Merging textures..."));
QApplication::processEvents();
uSleep(100);
QApplication::processEvents();
std::map<int, std::map<int, cv::Vec4d> > gains;
std::map<int, std::map<int, cv::Mat> > blendingGains;
std::pair<float, float> contrastValues(0,0);
globalTextures = util3d::mergeTextures(
*mesh,
images,
@@ -3851,7 +3856,7 @@ void ExportCloudsDialog::saveTextureMeshes(
0,
_dbDriver,
textureSize,
_ui->spinBox_mesh_maxTextures->value(),
_ui->checkBox_multiband->isEnabled() && _ui->checkBox_multiband->isChecked()?1:_ui->spinBox_mesh_maxTextures->value(),
textureVertexToPixels,
_ui->checkBox_gainCompensation->isChecked(),
_ui->doubleSpinBox_gainBeta->value(),
@@ -3864,17 +3869,25 @@ void ExportCloudsDialog::saveTextureMeshes(
0,
0,
&gains,
&blendingGains);
&blendingGains,
&contrastValues);
_progressDialog->appendText(tr("Merging textures... done."));
QApplication::processEvents();
uSleep(100);
QApplication::processEvents();
if(_ui->checkBox_multiband->isEnabled() && _ui->checkBox_multiband->isChecked() && mesh->tex_polygons.size() == 1)
{
pcl::PolygonMesh multibandMesh;
multibandMesh.cloud = mesh->cloud;
multibandMesh.polygons = mesh->tex_polygons[0];
_progressDialog->appendText(tr("Multiband texturing... (this may take a couple of minutes!)"));
QApplication::processEvents();
uSleep(100);
QApplication::processEvents();
success = util3d::multiBandTexturing(
path.toStdString(),
multibandMesh,
mesh->cloud,
mesh->tex_polygons[0],
poses,
textureVertexToPixels,
images,
@@ -3882,8 +3895,10 @@ void ExportCloudsDialog::saveTextureMeshes(
0,
_dbDriver,
textureSize,
_ui->comboBox_meshingTextureFormat->currentText().toStdString(),
gains,
blendingGains);
blendingGains,
contrastValues);
if(success)
{
_progressDialog->incrementStep();

View File

@@ -4741,6 +4741,13 @@ void MainWindow::openDatabase(const QString & path, const ParametersMap & overri
different = false;
}
}
else if(Parameters::getType(iter->first).compare("bool") == 0)
{
if(uStr2Bool(iter->second) == uStr2Bool(jter->second))
{
different = false;
}
}
if(different)
{
differentParameters.insert(*iter);

View File

@@ -63,7 +63,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-1371</y>
<y>0</y>
<width>680</width>
<height>3083</height>
</rect>
@@ -95,7 +95,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>5</number>
<number>21</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
@@ -16606,7 +16606,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
<item row="1" column="0">
<widget class="QSpinBox" name="loopClosure_bowMinInliers">
<property name="minimum">
<number>1</number>
<number>6</number>
</property>
<property name="maximum">
<number>1000</number>