Export: Disabled exposure fusion when built with Opencv < 3

This commit is contained in:
matlabbe
2017-03-31 18:53:46 -04:00
parent accbe5a423
commit d68eeada0e
2 changed files with 15 additions and 6 deletions

View File

@@ -184,6 +184,12 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
_ui->label_meshDecimation->setEnabled(false); _ui->label_meshDecimation->setEnabled(false);
_ui->label_meshMaxPolygons->setEnabled(false); _ui->label_meshMaxPolygons->setEnabled(false);
#endif #endif
#if CV_MAJOR_VERSION < 3
_ui->checkBox_exposureFusion->setEnabled(false);
_ui->checkBox_exposureFusion->setChecked(false);
_ui->label_exposureFusion->setEnabled(false);
#endif
} }
ExportCloudsDialog::~ExportCloudsDialog() ExportCloudsDialog::~ExportCloudsDialog()
@@ -378,7 +384,10 @@ void ExportCloudsDialog::loadSettings(QSettings & settings, const QString & grou
_ui->doubleSpinBox_cameraFilterAngle->setValue(settings.value("mesh_textureCameraFilteringAngle", _ui->doubleSpinBox_cameraFilterAngle->value()).toDouble()); _ui->doubleSpinBox_cameraFilterAngle->setValue(settings.value("mesh_textureCameraFilteringAngle", _ui->doubleSpinBox_cameraFilterAngle->value()).toDouble());
_ui->spinBox_textureBrightnessContrastRatioLow->setValue(settings.value("mesh_textureBrightnessConstrastRatioLow", _ui->spinBox_textureBrightnessContrastRatioLow->value()).toDouble()); _ui->spinBox_textureBrightnessContrastRatioLow->setValue(settings.value("mesh_textureBrightnessConstrastRatioLow", _ui->spinBox_textureBrightnessContrastRatioLow->value()).toDouble());
_ui->spinBox_textureBrightnessContrastRatioHigh->setValue(settings.value("mesh_textureBrightnessConstrastRatioHigh", _ui->spinBox_textureBrightnessContrastRatioHigh->value()).toDouble()); _ui->spinBox_textureBrightnessContrastRatioHigh->setValue(settings.value("mesh_textureBrightnessConstrastRatioHigh", _ui->spinBox_textureBrightnessContrastRatioHigh->value()).toDouble());
_ui->checkBox_exposureFusion->setChecked(settings.value("mesh_textureExposureFusion", _ui->checkBox_exposureFusion->isChecked()).toBool()); if(_ui->checkBox_exposureFusion->isEnabled())
{
_ui->checkBox_exposureFusion->setChecked(settings.value("mesh_textureExposureFusion", _ui->checkBox_exposureFusion->isChecked()).toBool());
}
_ui->doubleSpinBox_mesh_angleTolerance->setValue(settings.value("mesh_angle_tolerance", _ui->doubleSpinBox_mesh_angleTolerance->value()).toDouble()); _ui->doubleSpinBox_mesh_angleTolerance->setValue(settings.value("mesh_angle_tolerance", _ui->doubleSpinBox_mesh_angleTolerance->value()).toDouble());
_ui->checkBox_mesh_quad->setChecked(settings.value("mesh_quad", _ui->checkBox_mesh_quad->isChecked()).toBool()); _ui->checkBox_mesh_quad->setChecked(settings.value("mesh_quad", _ui->checkBox_mesh_quad->isChecked()).toBool());
@@ -2781,7 +2790,7 @@ cv::Mat ExportCloudsDialog::mergeTextures(pcl::TextureMesh & mesh, const QMap<in
} }
if(_ui->spinBox_textureBrightnessContrastRatioLow->value() > 0 || _ui->spinBox_textureBrightnessContrastRatioHigh->value() > 0) if(_ui->spinBox_textureBrightnessContrastRatioLow->value() > 0 || _ui->spinBox_textureBrightnessContrastRatioHigh->value() > 0)
{ {
if(_ui->checkBox_exposureFusion->isChecked()) if(_ui->checkBox_exposureFusion->isEnabled() && _ui->checkBox_exposureFusion->isChecked())
{ {
std::vector<cv::Mat> images; std::vector<cv::Mat> images;
images.push_back(globalTexture); images.push_back(globalTexture);

View File

@@ -23,9 +23,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-1293</y> <y>-1929</y>
<width>777</width> <width>773</width>
<height>2373</height> <height>3342</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_13"> <layout class="QVBoxLayout" name="verticalLayout_13">
@@ -1572,7 +1572,7 @@ Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="7" column="1">
<widget class="QLabel" name="label_meshingTextureSize_7"> <widget class="QLabel" name="label_exposureFusion">
<property name="text"> <property name="text">
<string>Exposure fusion. Only used when textures are merged and brightness/contrast balance ratios are used (merging original texture + 1 for each ratios).</string> <string>Exposure fusion. Only used when textures are merged and brightness/contrast balance ratios are used (merging original texture + 1 for each ratios).</string>
</property> </property>