From: <tm...@us...> - 2009-12-30 09:56:08
|
Revision: 4842 http://hugin.svn.sourceforge.net/hugin/?rev=4842&view=rev Author: tmodes Date: 2009-12-30 09:55:59 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Added stack aware cp detector setting Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2009-12-30 09:55:59 UTC (rev 4842) @@ -110,16 +110,9 @@ } -CPVector AutoCtrlPointCreator::automatch(CPDetectorSetting &setting, - Panorama & pano, - const UIntSet & imgs, - int nFeatures, - wxWindow *parent) +bool CanStartProg(wxString progName,wxWindow* parent) { - CPVector cps; - int t = setting.GetType(); - //check, if the cp generator exists - wxFileName prog(setting.GetProg()); + wxFileName prog(progName); bool canStart=false; if(prog.IsAbsolute()) { @@ -129,7 +122,7 @@ { wxPathList pathlist; pathlist.AddEnvList(wxT("PATH")); - wxString path = pathlist.FindAbsoluteValidPath(setting.GetProg()); + wxString path = pathlist.FindAbsoluteValidPath(progName); if(path.IsEmpty()) canStart=false; else @@ -139,27 +132,57 @@ }; }; if(!canStart) - { wxMessageBox(wxString::Format( - _("Could not find \"%s\" in path.\nMaybe you have not installed it properly or given a wrong path in the settings."),setting.GetProg().c_str()), + _("Could not find \"%s\" in path.\nMaybe you have not installed it properly or given a wrong path in the settings."),progName.c_str()), _("Error"),wxOK | wxICON_INFORMATION,parent); + return canStart; +}; + +CPVector AutoCtrlPointCreator::automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, + int nFeatures, wxWindow *parent) +{ + int return_value; + return automatch(setting,pano,imgs,nFeatures,return_value,parent); +}; + +CPVector AutoCtrlPointCreator::automatch(CPDetectorSetting &setting, + Panorama & pano, + const UIntSet & imgs, + int nFeatures, + int & ret_value, + wxWindow *parent) +{ + CPVector cps; + CPDetectorType t = setting.GetType(); + //check, if the cp generator exists + if(!CanStartProg(setting.GetProg(),parent)) return cps; - }; + if(t==CPDetector_AutoPanoSiftStack) + if(!setting.GetProgStack().IsEmpty()) + if(!CanStartProg(setting.GetProgStack(),parent)) + return cps; switch (t) { - case 0: + case CPDetector_AutoPano: { // autopano@kolor AutoPanoKolor matcher; - cps = matcher.automatch(setting, pano, imgs, nFeatures, parent); + cps = matcher.automatch(setting, pano, imgs, nFeatures, ret_value, parent); break; } - case 1: + case CPDetector_AutoPanoSift: { // autopano-sift AutoPanoSift matcher; - cps = matcher.automatch(setting, pano, imgs, nFeatures, parent); + cps = matcher.automatch(setting, pano, imgs, nFeatures, ret_value, parent); break; } + case CPDetector_AutoPanoSiftStack: + { + // autopano-sift with stacks + AutoPanoSiftStack matcher; + cps = matcher.automatch(setting, pano, imgs, nFeatures, ret_value, parent); + break; + } default: DEBUG_ERROR("Invalid autopano type"); } @@ -167,7 +190,7 @@ } CPVector AutoPanoSift::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs, - int nFeatures, wxWindow *parent) + int nFeatures, int & ret_value, wxWindow *parent) { CPVector cps; if (imgs.size() == 0) { @@ -281,16 +304,18 @@ return cps; } - int ret = 0; + ret_value = 0; // use MyExternalCmdExecDialog - ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, parent, _("finding control points")); + ret_value = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, parent, _("finding control points")); - if (ret == -1) { + if (ret_value == HUGIN_EXIT_CODE_CANCELLED) { + return cps; + } else if (ret_value == -1) { wxMessageBox( wxString::Format(_("Could not execute command: %s"),cmd.c_str()), _("wxExecute Error"), wxOK | wxICON_ERROR, parent); return cps; - } else if (ret > 0) { - wxMessageBox(wxString::Format(_("Command: %s\nfailed with error code: %d"),cmd.c_str(),ret), + } else if (ret_value > 0) { + wxMessageBox(wxString::Format(_("Command: %s\nfailed with error code: %d"),cmd.c_str(),ret_value), _("wxExecute Error"), wxOK | wxICON_ERROR, parent); return cps; } @@ -327,7 +352,7 @@ CPVector AutoPanoKolor::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs, - int nFeatures, wxWindow *parent) + int nFeatures, int & ret_value, wxWindow *parent) { CPVector cps; wxString autopanoExe = setting.GetProg(); @@ -385,18 +410,18 @@ return cps; } - int ret = 0; + ret_value = 0; // use MyExternalCmdExecDialog - ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, parent, _("finding control points")); + ret_value = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, parent, _("finding control points")); - if (ret == HUGIN_EXIT_CODE_CANCELLED) { + if (ret_value == HUGIN_EXIT_CODE_CANCELLED) { return cps; - } else if (ret == -1) { + } else if (ret_value == -1) { wxMessageBox( wxString::Format(_("Could not execute command: %s"),cmd.c_str()), _("wxExecute Error"), wxOK | wxICON_ERROR, parent); return cps; - } else if (ret > 0) { - wxMessageBox(wxString::Format(_("Command: %s\nfailed with error code: %d"),cmd.c_str(),ret), + } else if (ret_value > 0) { + wxMessageBox(wxString::Format(_("Command: %s\nfailed with error code: %d"),cmd.c_str(),ret_value), _("wxExecute Error"), wxOK | wxICON_ERROR, parent); return cps; } @@ -417,4 +442,100 @@ return cps; } +struct img_ev +{ + unsigned int img_nr; + double ev; +}; +struct stack_img +{ + unsigned int layer_nr; + std::vector<img_ev> images; +}; +bool sort_img_ev (img_ev i1, img_ev i2) { return (i1.ev<i2.ev); }; +CPVector AutoPanoSiftStack::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs, + int nFeatures, int & ret_value, wxWindow *parent) +{ + CPVector cps; + if (imgs.size() == 0) { + return cps; + }; + std::vector<stack_img> stack_images; + HuginBase::StandardImageVariableGroups* variable_groups = new HuginBase::StandardImageVariableGroups(pano); + for(UIntSet::const_iterator it = imgs.begin(); it != imgs.end(); it++) + { + unsigned int stack_nr=variable_groups->getStacks().getPartNumber(*it); + //check, if this stack is already in list + bool found=false; + unsigned int index=0; + for(index=0;index<stack_images.size();index++) + { + found=(stack_images[index].layer_nr==stack_nr); + if(found) + break; + }; + if(!found) + { + //new stack + stack_images.resize(stack_images.size()+1); + index=stack_images.size()-1; + //add new stack + stack_images[index].layer_nr=stack_nr; + }; + //add new image + unsigned int new_image_index=stack_images[index].images.size(); + stack_images[index].images.resize(new_image_index+1); + stack_images[index].images[new_image_index].img_nr=*it; + stack_images[index].images[new_image_index].ev=pano.getImage(*it).getExposure(); + }; + delete variable_groups; + //get image with median exposure for search with cp generator + UIntSet images_layer; + for(unsigned int i=0;i<stack_images.size();i++) + { + std::sort(stack_images[i].images.begin(),stack_images[i].images.end(),sort_img_ev); + unsigned int median=stack_images[i].images.size() / 2; + images_layer.insert(stack_images[i].images[median].img_nr); + }; + //generate cp for median exposure + ret_value=0; + if(images_layer.size()>1) + { + AutoPanoSift matcher; + cps=matcher.automatch(setting, pano, images_layer, nFeatures, ret_value, parent); + if(ret_value!=0) + return cps; + }; + //now work on all stacks + if(!setting.GetProgStack().IsEmpty()) + { + CPDetectorSetting stack_setting; + stack_setting.SetType(CPDetector_AutoPanoSift); + stack_setting.SetProg(setting.GetProgStack()); + stack_setting.SetArgs(setting.GetArgsStack()); + + for(unsigned int i=0;i<stack_images.size();i++) + { + UIntSet images_stack; + images_stack.clear(); + for(unsigned int j=0;j<stack_images[i].images.size();j++) + images_stack.insert(stack_images[i].images[j].img_nr); + if(images_stack.size()>1) + { + AutoPanoSift matcher; + CPVector new_cps=matcher.automatch(stack_setting, pano, images_stack, nFeatures, ret_value, parent); + if(new_cps.size()>0) + { + unsigned int old_size=cps.size(); + cps.resize(old_size+new_cps.size()); + for(unsigned int k=0;k<new_cps.size();k++) + cps[old_size+k]=new_cps[k]; + }; + if(ret_value!=0) + return cps; + }; + }; + } + return cps; +}; Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h 2009-12-30 09:55:59 UTC (rev 4842) @@ -48,6 +48,8 @@ * on the matcher selected */ virtual CPVector automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, + int nFeatures, int & ret_value, wxWindow *parent=NULL); + virtual CPVector automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, int nFeatures, wxWindow *parent=NULL); protected: @@ -72,7 +74,7 @@ virtual ~AutoPanoSift() {} ; virtual CPVector automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, - int nFeatures, wxWindow *parent=NULL); + int nFeatures, int & ret_value, wxWindow *parent=NULL); private: @@ -93,13 +95,33 @@ virtual ~AutoPanoKolor() {} ; virtual CPVector automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, - int nFeatures, wxWindow *parent=NULL); + int nFeatures, int & ret_value, wxWindow *parent=NULL); private: }; +/** A matcher that uses Sebastians Nowozin's excellent sift matcher and considers stacks */ +class AutoPanoSiftStack : public AutoCtrlPointCreator +{ +public: + /** ctor. + */ + AutoPanoSiftStack() {}; + /** dtor. + */ + virtual ~AutoPanoSiftStack() {} ; + + virtual CPVector automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs, + int nFeatures, int & ret_value, wxWindow *parent=NULL); + +private: + + +}; + + #endif // _AUTOCTRLPOINTCREATOR_H Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp 2009-12-30 09:55:59 UTC (rev 4842) @@ -144,16 +144,36 @@ desc=default_cpdetectors[new_type].desc; prog=default_cpdetectors[new_type].prog; args=default_cpdetectors[new_type].args; + if(type==CPDetector_AutoPanoSiftStack) + { + prog_stack=default_cpdetectors[new_type].prog_stack; + args_stack=default_cpdetectors[new_type].args_stack; + } + else + { + prog_stack=wxEmptyString; + args_stack=wxEmptyString; + }; }; }; }; void CPDetectorSetting::Read(wxConfigBase *config, wxString path) { - type=config->Read(path+wxT("/Type"),default_cpdetectors[0].type); + type=(CPDetectorType)config->Read(path+wxT("/Type"),default_cpdetectors[0].type); desc=config->Read(path+wxT("/Description"),default_cpdetectors[0].desc); prog=config->Read(path+wxT("/Program"),default_cpdetectors[0].prog); args=config->Read(path+wxT("/Arguments"),default_cpdetectors[0].args); + if(type==CPDetector_AutoPanoSiftStack) + { + prog_stack=config->Read(path+wxT("/ProgramStack"),default_cpdetectors[0].prog_stack); + args_stack=config->Read(path+wxT("/ArgumentsStack"),default_cpdetectors[0].args_stack); + } + else + { + prog_stack=wxEmptyString; + args_stack=wxEmptyString; + }; }; void CPDetectorSetting::Write(wxConfigBase *config, wxString path) @@ -162,6 +182,11 @@ config->Write(path+wxT("/Description"),desc); config->Write(path+wxT("/Program"),prog); config->Write(path+wxT("/Arguments"),args); + if(type==CPDetector_AutoPanoSiftStack) + { + config->Write(path+wxT("/ProgramStack"),prog_stack); + config->Write(path+wxT("/ArgumentsStack"),args_stack); + }; }; // dialog for showing settings of one autopano setting @@ -169,6 +194,8 @@ BEGIN_EVENT_TABLE(CPDetectorDialog,wxDialog) EVT_BUTTON(wxID_OK, CPDetectorDialog::OnOk) EVT_BUTTON(XRCID("prefs_cpdetector_program_select"),CPDetectorDialog::OnSelectPath) + EVT_BUTTON(XRCID("prefs_cpdetector_program_stack_select"),CPDetectorDialog::OnSelectPathStack) + EVT_CHOICE(XRCID("prefs_cpdetector_type"),CPDetectorDialog::OnTypeChange) END_EVENT_TABLE() CPDetectorDialog::CPDetectorDialog(wxWindow* parent) @@ -187,8 +214,11 @@ m_edit_desc = XRCCTRL(*this, "prefs_cpdetector_desc", wxTextCtrl); m_edit_prog = XRCCTRL(*this, "prefs_cpdetector_program", wxTextCtrl); m_edit_args = XRCCTRL(*this, "prefs_cpdetector_args", wxTextCtrl); + m_edit_prog_stack = XRCCTRL(*this, "prefs_cpdetector_program_stack", wxTextCtrl); + m_edit_args_stack = XRCCTRL(*this, "prefs_cpdetector_args_stack", wxTextCtrl); m_cpdetector_type = XRCCTRL(*this, "prefs_cpdetector_type", wxChoice); m_cpdetector_type->SetSelection(1); + ChangeType(); }; CPDetectorDialog::~CPDetectorDialog() @@ -210,6 +240,9 @@ valid=valid && (m_edit_desc->GetValue().Trim().Len()>0); valid=valid && (m_edit_prog->GetValue().Trim().Len()>0); valid=valid && (m_edit_args->GetValue().Trim().Len()>0); + if(m_cpdetector_type->GetSelection()==CPDetector_AutoPanoSiftStack) + if(m_edit_prog_stack->GetValue().Trim().Len()>0) + valid=valid && (m_edit_args_stack->GetValue().Trim().Len()>0); if(valid) this->EndModal(wxOK); else @@ -222,7 +255,13 @@ m_edit_desc->SetValue(cpdet_config->settings[index].GetCPDetectorDesc()); m_edit_prog->SetValue(cpdet_config->settings[index].GetProg()); m_edit_args->SetValue(cpdet_config->settings[index].GetArgs()); + if(cpdet_config->settings[index].GetType()==CPDetector_AutoPanoSiftStack) + { + m_edit_prog_stack->SetValue(cpdet_config->settings[index].GetProgStack()); + m_edit_args_stack->SetValue(cpdet_config->settings[index].GetArgsStack()); + }; m_cpdetector_type->SetSelection(cpdet_config->settings[index].GetType()); + ChangeType(); }; void CPDetectorDialog::UpdateSettings(CPDetectorConfig* cpdet_config,int index) @@ -230,16 +269,34 @@ cpdet_config->settings[index].SetCPDetectorDesc(m_edit_desc->GetValue().Trim()); cpdet_config->settings[index].SetProg(m_edit_prog->GetValue().Trim()); cpdet_config->settings[index].SetArgs(m_edit_args->GetValue().Trim()); - cpdet_config->settings[index].SetType(m_cpdetector_type->GetSelection()); + cpdet_config->settings[index].SetType((CPDetectorType)m_cpdetector_type->GetSelection()); + if(cpdet_config->settings[index].GetType()==CPDetector_AutoPanoSiftStack) + { + cpdet_config->settings[index].SetProgStack(m_edit_prog_stack->GetValue().Trim()); + cpdet_config->settings[index].SetArgsStack(m_edit_args_stack->GetValue().Trim()); + }; }; +void CPDetectorDialog::OnTypeChange(wxCommandEvent &e) +{ + ChangeType(); +}; + +void CPDetectorDialog::ChangeType() +{ + wxPanel* panel=XRCCTRL(*this,"panel_stack",wxPanel); + panel->Show(m_cpdetector_type->GetSelection()==CPDetector_AutoPanoSiftStack); + panel->Enable(m_cpdetector_type->GetSelection()==CPDetector_AutoPanoSiftStack); + Layout(); +}; + void CPDetectorDialog::OnSelectPath(wxCommandEvent &e) { wxFileName executable(m_edit_prog->GetValue()); #ifdef MAC_SELF_CONTAINED_BUNDLE wxString autopanoPath = MacGetPathToUserAppSupportAutoPanoFolder(); #endif - wxFileDialog dlg(this,_("Select Autopano program"), + wxFileDialog dlg(this,_("Select control point detector program"), #ifdef MAC_SELF_CONTAINED_BUNDLE autopanoPath, #else @@ -255,3 +312,26 @@ if (dlg.ShowModal() == wxID_OK) m_edit_prog->SetValue(dlg.GetPath()); }; + +void CPDetectorDialog::OnSelectPathStack(wxCommandEvent &e) +{ + wxFileName executable(m_edit_prog_stack->GetValue()); +#ifdef MAC_SELF_CONTAINED_BUNDLE + wxString autopanoPath = MacGetPathToUserAppSupportAutoPanoFolder(); +#endif + wxFileDialog dlg(this,_("Select control point detector program"), +#ifdef MAC_SELF_CONTAINED_BUNDLE + autopanoPath, +#else + executable.GetPath(), +#endif + executable.GetFullName(), +#ifdef __WXMSW__ + _("Executables (*.exe,*.vbs,*.cmd, *.bat)|*.exe;*.vbs;*.cmd;*.bat"), +#else + wxT(""), +#endif + wxOPEN, wxDefaultPosition); + if (dlg.ShowModal() == wxID_OK) + m_edit_prog_stack->SetValue(dlg.GetPath()); +}; Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h =================================================================== --- hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h 2009-12-30 09:55:59 UTC (rev 4842) @@ -34,6 +34,13 @@ #include <wx/dynarray.h> +enum CPDetectorType +{ + CPDetector_AutoPano=0, + CPDetector_AutoPanoSift=1, + CPDetector_AutoPanoSiftStack=2 +}; + /** class, which stores all settings of one cp detector */ class CPDetectorSetting { @@ -60,12 +67,20 @@ /** sets arguments of this setting */ void SetArgs(wxString new_args) { args=new_args; }; /** return type of this setting */ - const int GetType() {return type; }; + const CPDetectorType GetType() {return type; }; /** sets type of this setting */ - void SetType(int new_type) { type=new_type;}; + void SetType(CPDetectorType new_type) { type=new_type;}; + /** return program name, which works on stacks */ + const wxString GetProgStack() {return prog_stack; }; + /** sets program for detecting cp in stacks */ + void SetProgStack(wxString new_prog) { prog_stack=new_prog; }; + /** return arguments of program for detection of cp in stacks */ + const wxString GetArgsStack() {return args_stack; }; + /** sets arguments of program for detection of cp in stacks */ + void SetArgsStack(wxString new_args) { args_stack=new_args; }; private: - int type; - wxString desc,prog,args; + CPDetectorType type; + wxString desc, prog, args, prog_stack, args_stack; }; WX_DECLARE_OBJARRAY(CPDetectorSetting,ArraySettings); @@ -126,10 +141,15 @@ void OnOk(wxCommandEvent & e); /** select program with file open dialog */ void OnSelectPath(wxCommandEvent &e); + /** select program for stack with file open dialog */ + void OnSelectPathStack(wxCommandEvent &e); + /** update dialog, when other cp detector type is changed */ + void OnTypeChange(wxCommandEvent &e); private: - wxTextCtrl *m_edit_desc, *m_edit_prog, *m_edit_args; + wxTextCtrl *m_edit_desc, *m_edit_prog, *m_edit_args, *m_edit_prog_stack, *m_edit_args_stack; wxChoice *m_cpdetector_type; + void ChangeType(); DECLARE_EVENT_TABLE(); }; Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h =================================================================== --- hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h 2009-12-30 09:55:59 UTC (rev 4842) @@ -34,34 +34,42 @@ /** struct to save the default setting of one CP detector */ struct cpdetector_default { + /** cp detector type */ + CPDetectorType type; /** name, which is shown in GUI */ wxString desc; /** program name */ wxString prog; /** arguments of the detector */ wxString args; - /** type: 0 - autopano von Alexandre Jenny, 1 - autopano-sift-c, panomatic, match-n-shift,... */ - int type; + /** program name of cp detector for stacks */ + wxString prog_stack; + /** arguments of cp detector for stacks */ + wxString args_stack; }; /** this array saves all default settings */ const struct cpdetector_default default_cpdetectors[]= { -/* use following order: {description, program name, arguments, type, custom } +/* use following order: {type, description, program name, arguments, program name stack, arguments stack} attention: this array have to contain at least one item */ #if defined WIN32 - {wxT("Autopano-SIFT-C"),wxT("autopano-sift-c.exe"),wxT("--maxmatches %p --projection %f,%v %o %i"),1l}, - {wxT("Autopano"),wxT("autopano.exe"),wxT("/allinone /path:%d /keys:%p /project:oto /name:%o /size:1024 /f %i"),0l}, - {wxT("Panomatic"),wxT("panomatic.exe"),wxT("-o %o %i"),1l}, - {wxT("Align image stack"),wxT("align_image_stack.exe"),wxT("-f %v -p %o %i"),1l}, - {wxT("Match-n-shift"),wxT("match-n-shift.exe"),wxT("-b -a -f %f -v %v -c -p %p -o %o %i"),1l} + {CPDetector_AutoPanoSift, wxT("Autopano-SIFT-C"), + wxT("autopano-sift-c.exe"),wxT("--maxmatches %p --projection %f,%v %o %i"), + wxT(""), wxT("")}, + {CPDetector_AutoPano, wxT("Autopano"), + wxT("autopano.exe"),wxT("/allinone /path:%d /keys:%p /project:oto /name:%o /size:1024 /f %i"), + wxT(""), wxT("")}, + {CPDetector_AutoPanoSift, wxT("Panomatic"),wxT("panomatic.exe"),wxT("-o %o %i"),wxT(""), wxT("")}, + {CPDetector_AutoPanoSift, wxT("Align image stack"),wxT("align_image_stack.exe"),wxT("-f %v -p %o %i"),wxT(""),wxT("")}, + {CPDetector_AutoPanoSift, wxT("Match-n-shift"),wxT("match-n-shift.exe"),wxT("-b -a -f %f -v %v -c -p %p -o %o %i"),wxT(""),wxT("")} #else #if !defined MAC_SELF_CONTAINED_BUNDLE // Since medio 2008 the MacOSX bundle comes without default CPgenerators due to patent restrictions. - {wxT("Autopano-SIFT-C"),wxT("autopano-noop.sh"),wxT("--maxmatches %p --projection %f,%v %o %i"),1l}, - {wxT("Panomatic"),wxT("panomatic"),wxT("-o %o %i"),1l}, - {wxT("Match-n-shift"),wxT("match-n-shift"),wxT("-b -a -f %f -v %v -c -p %p -o %o %i"),1l}, - {wxT("Align image stack"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),1l} + {CPDetector_AutoPanoSift,wxT("Autopano-SIFT-C"),wxT("autopano-noop.sh"),wxT("--maxmatches %p --projection %f,%v %o %i"),wxT(""),wxT("")}, + {CPDetector_AutoPanoSift,wxT("Panomatic"),wxT("panomatic"),wxT("-o %o %i"),wxT(""),wxT("")}, + {CPDetector_AutoPanoSift,wxT("Match-n-shift"),wxT("match-n-shift"),wxT("-b -a -f %f -v %v -c -p %p -o %o %i"),wxT(""),wxT("")}, + {CPDetector_AutoPanoSift,wxT("Align image stack"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),wxT(""),wxT("")} #endif #endif }; Modified: hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc 2009-12-28 22:36:02 UTC (rev 4841) +++ hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc 2009-12-30 09:55:59 UTC (rev 4842) @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <resource> <object class="wxDialog" name="cpdetector_dialog"> - <title>Parameters for Control Point Detectors</title> - <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxRESIZE_BORDER|wxRESIZE_BOX|wxTAB_TRAVERSAL</style> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> @@ -25,6 +23,24 @@ </object> <object class="sizeritem"> <object class="wxStaticText"> + <label>Type:</label> + </object> + <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxChoice" name="prefs_cpdetector_type"> + <content> + <item>Autopano (by A. Jenny)</item> + <item>Autopano-SIFT</item> + <item>Autopano-SIFT, stack aware</item> + </content> + </object> + <flag>wxALL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> <label>Program:</label> </object> <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> @@ -58,27 +74,70 @@ </object> <object class="sizeritem"> <object class="wxTextCtrl" name="prefs_cpdetector_args"/> - <option>2</option> <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> <border>5</border> </object> <growablecols>1</growablecols> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Type:</label> + </object> + <flag>wxEXPAND</flag> + </object> + <object class="sizeritem"> + <object class="wxPanel" name="panel_stack"> + <object class="wxStaticBoxSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Leave empty, when no control point detector should run on stacks.</label> + </object> + <flag>wxALL|wxEXPAND</flag> + <border>5</border> </object> - <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>5</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="prefs_cpdetector_type"> - <content> - <item>Autopano (by A. Jenny)</item> - <item>Autopano-SIFT</item> - </content> + <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Program:</label> + </object> + <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxHORIZONTAL</orient> + <object class="sizeritem"> + <object class="wxTextCtrl" name="prefs_cpdetector_program_stack"/> + <option>1</option> + <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxButton" name="prefs_cpdetector_program_stack_select"> + <label>Choose...</label> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + </object> + <flag>wxEXPAND</flag> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Arguments:</label> + </object> + <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="prefs_cpdetector_args_stack"/> + <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> + <border>5</border> + </object> + <cols>2</cols> + <growablecols>1</growablecols> + </object> + <flag>wxEXPAND</flag> </object> - <flag>wxALL</flag> - <border>5</border> + <label>Control Point Detector for stacks</label> + <orient>wxVERTICAL</orient> </object> </object> <flag>wxEXPAND</flag> @@ -94,7 +153,7 @@ %namefile -- file that contains image filenames %s -- input panotools script</label> </object> - <flag>wxALL|wxEXPAND</flag> + <flag>wxALL|wxEXPAND|wxADJUST_MINSIZE</flag> <border>5</border> </object> <label>Detector</label> @@ -130,5 +189,7 @@ <border>5</border> </object> </object> + <title>Parameters for Control Point Detectors</title> + <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxRESIZE_BORDER|wxTAB_TRAVERSAL</style> </object> </resource> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |