From: <hug...@li...> - 2012-05-13 15:43:29
|
branch: gui_overhaul details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/e74c075baed1 changeset: 5794:e74c075baed1 user: tmodes date: Sun May 13 17:44:40 2012 +0200 description: Added option to keep exposure fused stacks diffstat: src/hugin1/hugin/PanoPanel.cpp | 12 +- src/hugin1/hugin/xrc/pano_panel.xrc | 45 +++++--- src/hugin_base/algorithms/panorama_makefile/PanoramaMakefilelibExport.cpp | 51 ++++++--- src/hugin_base/panodata/Panorama.cpp | 3 + src/hugin_base/panodata/PanoramaOptions.h | 2 + 5 files changed, 76 insertions(+), 37 deletions(-) diffs (348 lines): diff -r ba1b0a73f139 -r e74c075baed1 src/hugin1/hugin/PanoPanel.cpp --- a/src/hugin1/hugin/PanoPanel.cpp Sun May 13 11:34:54 2012 +0200 +++ b/src/hugin1/hugin/PanoPanel.cpp Sun May 13 17:44:40 2012 +0200 @@ -82,6 +82,7 @@ EVT_CHECKBOX ( XRCID("pano_cb_ldr_output_exposure_layers"), PanoPanel::OnOutputFilesChanged) EVT_CHECKBOX ( XRCID("pano_cb_ldr_output_exposure_blended"), PanoPanel::OnOutputFilesChanged) EVT_CHECKBOX ( XRCID("pano_cb_ldr_output_exposure_layers_fused"), PanoPanel::OnOutputFilesChanged) + EVT_CHECKBOX ( XRCID("pano_cb_ldr_output_stacks"), PanoPanel::OnOutputFilesChanged) EVT_CHECKBOX ( XRCID("pano_cb_ldr_output_exposure_remapped"), PanoPanel::OnOutputFilesChanged) EVT_CHECKBOX ( XRCID("pano_cb_hdr_output_blended"), PanoPanel::OnOutputFilesChanged) EVT_CHECKBOX ( XRCID("pano_cb_hdr_output_stacks"), PanoPanel::OnOutputFilesChanged) @@ -309,7 +310,7 @@ // Determine if there are stacks in the pano. UIntSet activeImages = pano.getActiveImages(); UIntSet images = getImagesinROI(pano,activeImages); - vector<UIntSet> hdrStacks = HuginBase::getHDRStacks(pano, images); + vector<UIntSet> hdrStacks = HuginBase::getHDRStacks(pano, images, pano.getOptions()); DEBUG_DEBUG(hdrStacks.size() << ": HDR stacks detected"); const bool hasStacks = (hdrStacks.size() != activeImages.size()); @@ -398,7 +399,9 @@ XRCCTRL(*this, "pano_cb_hdr_output_layers", wxCheckBox)->Show(opt.outputHDRLayers || m_guiLevel>GUI_BEGINNER); //stacks - XRCCTRL(*this, "pano_text_stacks", wxStaticText)->Show(opt.outputHDRStacks || m_guiLevel>GUI_BEGINNER); + XRCCTRL(*this, "pano_text_stacks", wxStaticText)->Show(opt.outputHDRStacks || opt.outputLDRStacks || m_guiLevel>GUI_BEGINNER); + XRCCTRL(*this, "pano_cb_ldr_output_stacks", wxCheckBox)->SetValue(opt.outputLDRStacks); + XRCCTRL(*this, "pano_cb_ldr_output_stacks", wxCheckBox)->Show(opt.outputLDRStacks || m_guiLevel>GUI_BEGINNER); XRCCTRL(*this, "pano_cb_hdr_output_stacks", wxCheckBox)->SetValue(opt.outputHDRStacks); XRCCTRL(*this, "pano_cb_hdr_output_stacks", wxCheckBox)->Show(opt.outputHDRStacks || m_guiLevel>GUI_BEGINNER); @@ -413,6 +416,7 @@ opt.outputLDRExposureBlended || opt.outputLDRExposureLayersFused || opt.outputLDRExposureRemapped || + opt.outputLDRStacks || opt.outputHDRBlended || opt.outputHDRStacks || opt.outputHDRLayers); @@ -467,7 +471,7 @@ XRCCTRL(*this, "pano_text_blender", wxStaticText)->Enable(blenderEnabled); XRCCTRL(*this, "pano_text_blender", wxStaticText)->Show(m_guiLevel>GUI_BEGINNER); - bool fusionEnabled = (opt.outputLDRExposureBlended || opt.outputLDRExposureLayersFused) && m_guiLevel>GUI_BEGINNER; + bool fusionEnabled = (opt.outputLDRExposureBlended || opt.outputLDRExposureLayersFused || opt.outputLDRStacks) && m_guiLevel>GUI_BEGINNER; m_FusionChoice->Enable(fusionEnabled); m_FusionChoice->Show(m_guiLevel>GUI_BEGINNER); XRCCTRL(*this, "pano_button_fusion_opts", wxButton)->Enable(fusionEnabled); @@ -1388,6 +1392,8 @@ opts.outputLDRExposureLayersFused = e.IsChecked(); } else if (id == XRCID("pano_cb_ldr_output_exposure_remapped") ) { opts.outputLDRExposureRemapped = e.IsChecked(); + } else if (id == XRCID("pano_cb_ldr_output_stacks") ) { + opts.outputLDRStacks = e.IsChecked(); } else if (id == XRCID("pano_cb_hdr_output_blended") ) { opts.outputHDRBlended = e.IsChecked(); } else if (id == XRCID("pano_cb_hdr_output_stacks") ) { diff -r ba1b0a73f139 -r e74c075baed1 src/hugin1/hugin/xrc/pano_panel.xrc --- a/src/hugin1/hugin/xrc/pano_panel.xrc Sun May 13 11:34:54 2012 +0200 +++ b/src/hugin1/hugin/xrc/pano_panel.xrc Sun May 13 17:44:40 2012 +0200 @@ -665,9 +665,9 @@ <cellspan>1,1</cellspan> </object> <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_hdr_output_stacks"> - <label>High dynamic range merged stacks</label> - <tooltip>Output remapped, high dynamic range merged stacks from highly overlapping images</tooltip> + <object class="wxCheckBox" name="pano_cb_ldr_output_stacks"> + <label>Exposure fused stacks</label> + <tooltip>Output exposure fused stacks from highly overlapping images</tooltip> </object> <flag platform="unix|mac">wxEXPAND|wxTOP</flag> <flag platform="win">wxTOP</flag> @@ -676,6 +676,15 @@ <cellspan>1,5</cellspan> </object> <object class="sizeritem"> + <object class="wxCheckBox" name="pano_cb_hdr_output_stacks"> + <label>High dynamic range merged stacks</label> + <tooltip>Output remapped, high dynamic range merged stacks from highly overlapping images</tooltip> + </object> + <flag platform="unix|mac">wxEXPAND</flag> + <cellpos>15,1</cellpos> + <cellspan>1,5</cellspan> + </object> + <object class="sizeritem"> <object class="wxStaticText" name="pano_text_layers"> <label>Layers:</label> <font> @@ -687,7 +696,7 @@ </object> <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL|wxTOP|wxBOTTOM</flag> <border>6</border> - <cellpos>15,0</cellpos> + <cellpos>16,0</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -698,7 +707,7 @@ <flag platform="unix|mac">wxEXPAND|wxTOP|wxBOTTOM</flag> <flag platform="win">wxTOP</flag> <border>6</border> - <cellpos>15,1</cellpos> + <cellpos>16,1</cellpos> <cellspan>1,5</cellspan> </object> <!-- Processing section --> @@ -713,7 +722,7 @@ </font> </object> <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>16,0</cellpos> + <cellpos>17,0</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -721,7 +730,7 @@ <label>Remapper:</label> </object> <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>16,1</cellpos> + <cellpos>17,1</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -732,7 +741,7 @@ <selection>0</selection> </object> <flag>wxEXPAND</flag> - <cellpos>16,2</cellpos> + <cellpos>17,2</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -740,7 +749,7 @@ <label>Options</label> </object> <flag>wxEXPAND</flag> - <cellpos>16,3</cellpos> + <cellpos>17,3</cellpos> <cellspan>1,1</cellspan> </object> @@ -749,7 +758,7 @@ <label>Image fusion:</label> </object> <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>17,1</cellpos> + <cellpos>18,1</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -760,7 +769,7 @@ <selection>0</selection> </object> <flag>wxEXPAND</flag> - <cellpos>17,2</cellpos> + <cellpos>18,2</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -768,7 +777,7 @@ <label>Options</label> </object> <flag>wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>17,3</cellpos> + <cellpos>18,3</cellpos> <cellspan>1,1</cellspan> </object> @@ -777,7 +786,7 @@ <label>HDR merger:</label> </object> <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>18,1</cellpos> + <cellpos>19,1</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -788,7 +797,7 @@ <selection>0</selection> </object> <flag>wxEXPAND</flag> - <cellpos>18,2</cellpos> + <cellpos>19,2</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -796,7 +805,7 @@ <label>Options</label> </object> <flag>wxEXPAND</flag> - <cellpos>18,3</cellpos> + <cellpos>19,3</cellpos> <cellspan>1,1</cellspan> </object> @@ -805,7 +814,7 @@ <label>Blender:</label> </object> <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>19,1</cellpos> + <cellpos>20,1</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -816,7 +825,7 @@ <selection>0</selection> </object> <flag>wxEXPAND</flag> - <cellpos>19,2</cellpos> + <cellpos>20,2</cellpos> <cellspan>1,1</cellspan> </object> <object class="sizeritem"> @@ -824,7 +833,7 @@ <label>Options</label> </object> <flag>wxEXPAND</flag> - <cellpos>19,3</cellpos> + <cellpos>20,3</cellpos> <cellspan>1,1</cellspan> </object> <vgap>4</vgap> diff -r ba1b0a73f139 -r e74c075baed1 src/hugin_base/algorithms/panorama_makefile/PanoramaMakefilelibExport.cpp --- a/src/hugin_base/algorithms/panorama_makefile/PanoramaMakefilelibExport.cpp Sun May 13 11:34:54 2012 +0200 +++ b/src/hugin_base/algorithms/panorama_makefile/PanoramaMakefilelibExport.cpp Sun May 13 17:44:40 2012 +0200 @@ -482,31 +482,48 @@ } } - if(opts.outputLDRExposureBlended) + if(opts.outputLDRExposureLayersFused) { - allprereqs.push_back(vldrstackedblended); - append(outputFiles, vldrstackedblended->getValues()); - newVarDef(vdoldrstackedblended, "DO_LDR_STACKED_BLENDED", 1); - cleanprereqs.push_back(vldrstacksshell); + allprereqs.push_back(vldrexposurelayersfused); + append(outputFiles, vldrexposurelayersfused->getValues()); + newVarDef(vdoldrexposurelayersfused, "DO_LDR_EXPOSURE_LAYERS_FUSED", 1); + if(!opts.outputLDRExposureLayers) + { + cleanprereqs.push_back(vldrexposurelayersshell); + append(outputFiles, exposureimgs); + if(!opts.outputLDRExposureRemapped) + { + cleanprereqs.push_back(vldrexposurelayersremappedshell); + append(outputFiles, vldrexposurelayersremapped->getValues()); + } + } + } + + if(opts.outputLDRStacks) + { + allprereqs.push_back(vldrstacks); append(outputFiles, stackedldrimgs); - if(!opts.outputLDRExposureRemapped && !opts.outputLDRExposureLayers) + if(!opts.outputLDRExposureRemapped) { cleanprereqs.push_back(vldrexposurelayersremappedshell); append(outputFiles, vldrexposurelayersremapped->getValues()); } } - if(opts.outputLDRExposureLayersFused) + if(opts.outputLDRExposureBlended) { - allprereqs.push_back(vldrexposurelayersfused); - append(outputFiles, vldrexposurelayersfused->getValues()); - newVarDef(vdoldrexposurelayersfused, "DO_LDR_EXPOSURE_LAYERS_FUSED", 1); - append(outputFiles, exposureimgs); - if(!opts.outputLDRExposureRemapped && !opts.outputLDRExposureLayers) + allprereqs.push_back(vldrstackedblended); + append(outputFiles, vldrstackedblended->getValues()); + newVarDef(vdoldrstackedblended, "DO_LDR_STACKED_BLENDED", 1); + if(!opts.outputLDRStacks) { - cleanprereqs.push_back(vldrexposurelayersremappedshell); - append(outputFiles, vldrexposurelayersremapped->getValues()); - cleanprereqs.push_back(vldrexposurelayersshell); + cleanprereqs.push_back(vldrstacksshell); + append(outputFiles, stackedldrimgs); + if(!opts.outputLDRExposureRemapped) + { + cleanprereqs.push_back(vldrexposurelayersremappedshell); + append(outputFiles, vldrexposurelayersremapped->getValues()); + } } } @@ -688,7 +705,7 @@ if(opts.outputLDRLayers) echoInfo(*info,"* Remapped images"); }; - if(opts.outputLDRExposureBlended || opts.outputLDRExposureLayersFused || opts.outputLDRExposureLayers || opts.outputLDRExposureRemapped) + if(opts.outputLDRExposureBlended || opts.outputLDRExposureLayersFused || opts.outputLDRExposureLayers || opts.outputLDRExposureRemapped || opts.outputLDRStacks) { echoInfo(*info,"Exposure fusion"); if(opts.outputLDRExposureBlended) @@ -697,6 +714,8 @@ echoInfo(*info,"* Blended and fused panorama"); if(opts.outputLDRExposureLayers) echoInfo(*info,"* Blended exposure layers"); + if(opts.outputLDRStacks) + echoInfo(*info,"* Remapped fused stacks"); if(opts.outputLDRExposureRemapped) echoInfo(*info,"* Remapped images"); }; diff -r ba1b0a73f139 -r e74c075baed1 src/hugin_base/panodata/Panorama.cpp --- a/src/hugin_base/panodata/Panorama.cpp Sun May 13 11:34:54 2012 +0200 +++ b/src/hugin_base/panodata/Panorama.cpp Sun May 13 17:44:40 2012 +0200 @@ -830,6 +830,7 @@ o << "#hugin_outputLDRExposureRemapped " << (output.outputLDRExposureRemapped ? "true" : "false") << endl; o << "#hugin_outputLDRExposureLayers " << (output.outputLDRExposureLayers ? "true" : "false") << endl; o << "#hugin_outputLDRExposureBlended " << (output.outputLDRExposureBlended ? "true" : "false") << endl; + o << "#hugin_outputLDRStacks " << (output.outputLDRStacks ? "true" : "false") << endl; o << "#hugin_outputLDRExposureLayersFused " << (output.outputLDRExposureLayersFused ? "true" : "false") << endl; o << "#hugin_outputHDRBlended " << (output.outputHDRBlended ? "true" : "false") << endl; o << "#hugin_outputHDRLayers " << (output.outputHDRLayers ? "true" : "false") << endl; @@ -2652,6 +2653,8 @@ options.outputLDRExposureBlended = (value == "true"); } else if (var == "#hugin_outputLDRExposureLayersFused") { options.outputLDRExposureLayersFused = (value == "true"); + } else if (var == "#hugin_outputLDRStacks") { + options.outputLDRStacks = (value == "true"); } else if (var == "#hugin_outputHDRBlended") { options.outputHDRBlended = (value == "true"); } else if (var == "#hugin_outputHDRLayers") { diff -r ba1b0a73f139 -r e74c075baed1 src/hugin_base/panodata/PanoramaOptions.h --- a/src/hugin_base/panodata/PanoramaOptions.h Sun May 13 11:34:54 2012 +0200 +++ b/src/hugin_base/panodata/PanoramaOptions.h Sun May 13 17:44:40 2012 +0200 @@ -221,6 +221,7 @@ outputLDRExposureRemapped = false; outputLDRExposureLayers = false; outputLDRExposureLayersFused = false; + outputLDRStacks = false; outputLDRExposureBlended = false; outputHDRBlended = false; outputHDRLayers = false; @@ -385,6 +386,7 @@ bool outputLDRExposureRemapped;///< save remapped layers (no exposure adjustment) bool outputLDRExposureLayers; ///< save blended exposure layers, do not perform fusion (no exposure adjustment) bool outputLDRExposureLayersFused; ///< save blended exposure layers which are then fused (no exposure adjustment) + bool outputLDRStacks; /// < save exposure fused stacks (no exposure adjustment) bool outputLDRExposureBlended; ///< save blended exposure layers created from fused image stacks (no exposure adjustment) bool outputHDRBlended; ///< save blended panorama (HDR) bool outputHDRLayers; ///< save remapped layers (HDR) |