Revision: 4907
http://hugin.svn.sourceforge.net/hugin/?rev=4907&view=rev
Author: tmodes
Date: 2010-01-18 06:37:32 +0000 (Mon, 18 Jan 2010)
Log Message:
-----------
Extended cp detectors to allow also 2 step detectors (e.g. generatekeys + autopano)
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 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2010-01-18 06:37:32 UTC (rev 4907)
@@ -122,6 +122,16 @@
}
#endif
+wxString GetProgPath(wxString progName)
+{
+#if defined MAC_SELF_CONTAINED_BUNDLE
+ wxString bundled=GetBundledProg(progName);
+ if(!bundled.IsEmpty())
+ return bundled;
+#endif
+ return progName;
+};
+
bool CanStartProg(wxString progName,wxWindow* parent)
{
#if defined MAC_SELF_CONTAINED_BUNDLE
@@ -170,9 +180,12 @@
{
CPVector cps;
CPDetectorType t = setting.GetType();
- //check, if the cp generator exists
+ //check, if the cp generators exists
if(!CanStartProg(setting.GetProg(),parent))
return cps;
+ if(setting.IsTwoStepDetector())
+ if(!CanStartProg(setting.GetProgMatcher(),parent))
+ return cps;
if(t==CPDetector_AutoPanoSiftStack || t==CPDetector_AutoPanoSiftMultiRowStack)
if(!setting.GetProgStack().IsEmpty())
if(!CanStartProg(setting.GetProgStack(),parent))
@@ -226,6 +239,23 @@
return cps;
}
+void RemoveKeyfiles(vector<wxString> &keyFiles)
+{
+ if(keyFiles.size()>0)
+ {
+ for(unsigned int i=0;i<keyFiles.size();i++)
+ {
+ if(wxFileExists(keyFiles[i]))
+ {
+ if(!wxRemoveFile(keyFiles[i]))
+ {
+ DEBUG_DEBUG("could not remove temporary file: " << keyFiles[i].c_str());
+ };
+ };
+ };
+ };
+};
+
CPVector AutoPanoSift::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs,
int nFeatures, int & ret_value, wxWindow *parent)
{
@@ -234,20 +264,21 @@
return cps;
}
// create suitable command line..
-#if defined MAC_SELF_CONTAINED_BUNDLE
- wxString autopanoExe = GetBundledProg(setting.GetProg());
- if(autopanoExe.IsEmpty())
- autopanoExe = setting.GetProg();
-#else
- wxString autopanoExe = setting.GetProg();
-#endif
+ wxString autopanoExe = GetProgPath(setting.GetProg());
+ if(setting.IsTwoStepDetector())
+ {
+ std::vector<wxString> keyFiles(pano.getNrOfImages());
+ cps=automatch(setting, pano, imgs, nFeatures, keyFiles, ret_value, parent);
+ RemoveKeyfiles(keyFiles);
+ return cps;
+ };
wxString autopanoArgs = setting.GetArgs();
#ifdef __WXMSW__
// remember cwd.
wxString cwd = wxGetCwd();
wxString apDir = wxPathOnly(autopanoExe);
- if (apDir.Length() > 0) {
+ if (apDir.Len() > 0) {
wxSetWorkingDirectory(apDir);
}
#endif
@@ -393,7 +424,186 @@
return cps;
}
+CPVector AutoPanoSift::automatch(CPDetectorSetting &setting, PT::Panorama & pano, const PT::UIntSet & imgs,
+ int nFeatures, vector<wxString> &keyFiles, int & ret_value, wxWindow *parent)
+{
+ CPVector cps;
+ if (imgs.size() == 0)
+ {
+ return cps;
+ }
+ DEBUG_ASSERT(keyFiles.size()==pano.getNrOfImages());
+ // create suitable command line..
+ wxString generateKeysExe=GetProgPath(setting.GetProg());
+ wxString matcherExe = GetProgPath(setting.GetProgMatcher());
+ wxString generateKeysArgs=setting.GetArgs();
+ wxString matcherArgs = setting.GetArgsMatcher();
+
+#ifdef __WXMSW__
+ // remember cwd.
+ wxString cwd = wxGetCwd();
+ wxString apDir = wxPathOnly(generateKeysExe);
+ if (apDir.Len() > 0)
+ {
+ wxSetWorkingDirectory(apDir);
+ }
+#endif
+ wxString tempDir= wxConfigBase::Get()->Read(wxT("tempDir"),wxT(""));
+ if(!tempDir.IsEmpty())
+ if(tempDir.Last()!=wxFileName::GetPathSeparator())
+ tempDir.Append(wxFileName::GetPathSeparator());
+ //check arguments
+ if(generateKeysArgs.Find(wxT("%i"))==wxNOT_FOUND || generateKeysArgs.Find(wxT("%k"))==wxNOT_FOUND)
+ {
+ wxMessageBox(_("Please use %i to specify the input files and %k to specify the keypoint file for generate keys step"),
+ _("Error in control point detector command"), wxOK | wxICON_ERROR,parent);
+ return cps;
+ };
+ if(matcherArgs.Find(wxT("%k"))==wxNOT_FOUND || matcherArgs.Find(wxT("%o"))==wxNOT_FOUND)
+ {
+ wxMessageBox(_("Please use %k to specify the keypoint files and %o to specify the output project file for the matching step"),
+ _("Error in control point detector command"), wxOK | wxICON_ERROR,parent);
+ return cps;
+ };
+
+ ret_value=0;
+ for(UIntSet::const_iterator img=imgs.begin();img!=imgs.end();img++)
+ {
+ if(keyFiles[*img].IsEmpty())
+ {
+ //no key files exists, so generate it
+ wxString keyfile=wxFileName::CreateTempFileName(tempDir+wxT("apk_"));
+ keyFiles[*img]=keyfile;
+ wxString cmd=generateKeysArgs;
+ wxString tmp;
+ tmp.Printf(wxT("%d"), nFeatures);
+ cmd.Replace(wxT("%p"), tmp);
+
+ SrcPanoImage srcImg = pano.getSrcImage(*img);
+ tmp.Printf(wxT("%f"), srcImg.getHFOV());
+ cmd.Replace(wxT("%v"), tmp);
+
+ tmp.Printf(wxT("%d"), (int) srcImg.getProjection());
+ cmd.Replace(wxT("%f"), tmp);
+
+ cmd.Replace(wxT("%i"),wxQuoteFilename(wxString(srcImg.getFilename().c_str(), HUGIN_CONV_FILENAME)));
+ cmd.Replace(wxT("%k"),wxQuoteFilename(keyfile));
+ // use MyExternalCmdExecDialog
+ ret_value = MyExecuteCommandOnDialog(generateKeysExe, cmd, parent, _("generating key file"));
+ cmd=generateKeysExe+wxT(" ")+cmd;
+ 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_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;
+ };
+ };
+ };
+
+ // TODO: create a secure temporary filename here
+ wxString ptofile = wxFileName::CreateTempFileName(wxT("ap_res"));
+ matcherArgs.Replace(wxT("%o"), ptofile);
+ wxString tmp;
+ tmp.Printf(wxT("%d"), nFeatures);
+ matcherArgs.Replace(wxT("%p"), tmp);
+
+ SrcPanoImage firstImg = pano.getSrcImage(*imgs.begin());
+ tmp.Printf(wxT("%f"), firstImg.getHFOV());
+ matcherArgs.Replace(wxT("%v"), tmp);
+
+ tmp.Printf(wxT("%d"), (int) firstImg.getProjection());
+ matcherArgs.Replace(wxT("%f"), tmp);
+
+ // build a list of all image files, and a corrosponding connection map.
+ // local img nr -> global (panorama) img number
+ std::map<int,int> imgMapping;
+
+ wxString imgFiles;
+ int imgNr=0;
+ for(UIntSet::const_iterator it = imgs.begin(); it != imgs.end(); it++)
+ {
+ imgMapping[imgNr] = *it;
+ imgFiles.append(wxT(" ")).append(wxQuoteFilename(keyFiles[*it]));
+ imgNr++;
+ };
+ matcherArgs.Replace(wxT("%k"), wxString (imgFiles.c_str(), HUGIN_CONV_FILENAME));
+
+#ifdef __WXMSW__
+ if (matcherArgs.size() > 32000) {
+ wxMessageBox(_("Command line for control point detector too long.\nThis is a windows limitation\nPlease select less images, or place the images in a folder with\na shorter pathname"),
+ _("Too many images selected"),
+ wxCANCEL | wxICON_ERROR, parent );
+ return cps;
+ }
+ apDir = wxPathOnly(matcherExe);
+ if (apDir.Len() > 0) {
+ wxSetWorkingDirectory(apDir);
+ }
+#endif
+
+ wxString cmd = matcherExe + wxT(" ") + matcherArgs;
+ DEBUG_DEBUG("Executing: " << matcherExe.mb_str(wxConvLocal) << " " << matcherArgs.mb_str(wxConvLocal));
+
+ wxArrayString arguments = wxCmdLineParser::ConvertStringToArgs(matcherArgs);
+ if (arguments.GetCount() > 127) {
+ DEBUG_ERROR("Too many arguments for call to wxExecute()");
+ wxMessageBox(wxString::Format(_("Too many arguments (images). Try using a cp generator setting which supports the %%s parameter in preferences.\n\n Could not execute command: %s"), matcherExe.c_str()), _("wxExecute Error"), wxOK | wxICON_ERROR, parent);
+ return cps;
+ }
+
+ // use MyExternalCmdExecDialog
+ ret_value = MyExecuteCommandOnDialog(matcherExe, matcherArgs, parent, _("finding control points"));
+
+ 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_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;
+ };
+
+ if (! wxFileExists(ptofile.c_str()))
+ {
+ wxMessageBox(wxString::Format(_("Could not open %s for reading\nThis is an indicator that the control point detector call failed,\nor wrong command line parameters have been used.\n\nExecuted command: %s"),ptofile.c_str(),cmd.c_str()),
+ _("Control point detector failure"), wxOK | wxICON_ERROR, parent );
+ return cps;
+ }
+
+ // read and update control points
+ cps = readUpdatedControlPoints((const char *)ptofile.mb_str(HUGIN_CONV_FILENAME), pano);
+
+#ifdef __WXMSW__
+ // set old cwd.
+ wxSetWorkingDirectory(cwd);
+#endif
+
+ if (!wxRemoveFile(ptofile)) {
+ DEBUG_DEBUG("could not remove temporary file: " << ptofile.c_str());
+ }
+
+ return cps;
+};
+
CPVector AutoPanoKolor::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs,
int nFeatures, int & ret_value, wxWindow *parent)
{
@@ -609,6 +819,7 @@
{
return cps;
};
+ std::vector<wxString> keyFiles(pano.getNrOfImages());
//generate cp for every consecutive image pair
unsigned int counter=0;
for(UIntSet::const_iterator it = imgs.begin(); it != imgs.end(); )
@@ -624,11 +835,17 @@
AutoPanoSift matcher;
CPVector new_cps;
new_cps.clear();
- new_cps=matcher.automatch(setting, pano, ImagePair, nFeatures, ret_value, parent);
+ if(setting.IsTwoStepDetector())
+ new_cps=matcher.automatch(setting, pano, ImagePair, nFeatures, keyFiles, ret_value, parent);
+ else
+ new_cps=matcher.automatch(setting, pano, ImagePair, nFeatures, ret_value, parent);
if(new_cps.size()>0)
AddControlPointsWithCheck(cps,new_cps);
if(ret_value!=0)
+ {
+ RemoveKeyfiles(keyFiles);
return cps;
+ };
};
// now connect all image groups
// generate temporary panorama to add all found cps
@@ -653,11 +870,17 @@
};
AutoPanoSift matcher;
CPVector new_cps;
- new_cps=matcher.automatch(setting, optPano, ImagesGroups, nFeatures, ret_value, parent);
+ if(setting.IsTwoStepDetector())
+ new_cps=matcher.automatch(setting, optPano, ImagesGroups, nFeatures, keyFiles, ret_value, parent);
+ else
+ new_cps=matcher.automatch(setting, optPano, ImagesGroups, nFeatures, ret_value, parent);
if(new_cps.size()>0)
AddControlPointsWithCheck(cps,new_cps,&optPano);
if(ret_value!=0)
+ {
+ RemoveKeyfiles(keyFiles);
return cps;
+ };
createCPGraph(optPano,graph);
n=findCPComponents(graph, comps);
};
@@ -708,12 +931,21 @@
CPDetectorSetting newSetting;
newSetting.SetProg(setting.GetProg());
newSetting.SetArgs(setting.GetArgs());
+ if(setting.IsTwoStepDetector())
+ {
+ newSetting.SetProgMatcher(setting.GetProgMatcher());
+ newSetting.SetArgsMatcher(setting.GetArgsMatcher());
+ };
newSetting.SetOption(true);
CPVector new_cps;
- new_cps=matcher.automatch(newSetting, optPano, imgs, nFeatures, ret_value, parent);
+ if(setting.IsTwoStepDetector())
+ new_cps=matcher.automatch(newSetting, optPano, imgs, nFeatures, keyFiles, ret_value, parent);
+ else
+ new_cps=matcher.automatch(newSetting, optPano, imgs, nFeatures, ret_value, parent);
if(new_cps.size()>0)
AddControlPointsWithCheck(cps,new_cps);
};
+ RemoveKeyfiles(keyFiles);
return cps;
};
@@ -808,9 +1040,18 @@
CPVector AutoPanoSiftPreAlign::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs,
int nFeatures, int & ret_value, wxWindow *parent)
{
+ std::vector<wxString> keyFiles(pano.getNrOfImages());
+ return automatch(setting, pano, imgs, nFeatures, keyFiles, ret_value, parent);
+};
+
+CPVector AutoPanoSiftPreAlign::automatch(CPDetectorSetting &setting, Panorama & pano, const UIntSet & imgs,
+ int nFeatures, std::vector<wxString> &keyFiles, int & ret_value, wxWindow *parent)
+{
CPVector cps;
if (imgs.size()<2)
return cps;
+ DEBUG_ASSERT(keyFiles.size()==pano.getNrOfImages());
+
vector<UIntSet> usedImages;
usedImages.resize(pano.getNrOfImages());
if(setting.GetOption())
@@ -857,11 +1098,19 @@
for(UIntSet::const_iterator img_it2=images.begin();img_it2!=images.end();img_it2++)
usedImages[*img_it].insert(*img_it2);
AutoPanoSift matcher;
- CPVector new_cps=matcher.automatch(setting, pano, images, nFeatures, ret_value, parent);
+ CPVector new_cps;
+ if(setting.IsTwoStepDetector())
+ new_cps=matcher.automatch(setting, pano, images, nFeatures, keyFiles, ret_value, parent);
+ else
+ new_cps=matcher.automatch(setting, pano, images, nFeatures, ret_value, parent);
if(new_cps.size()>0)
AddControlPointsWithCheck(cps,new_cps);
if(ret_value!=0)
+ {
+ RemoveKeyfiles(keyFiles);
return cps;
+ };
};
+ RemoveKeyfiles(keyFiles);
return cps;
};
Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h
===================================================================
--- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.h 2010-01-18 06:37:32 UTC (rev 4907)
@@ -75,6 +75,8 @@
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, std::vector<wxString> &keyFiles, int & ret_value, wxWindow *parent=NULL);
private:
@@ -180,6 +182,8 @@
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, std::vector<wxString> &keyFiles, int & ret_value, wxWindow *parent=NULL);
private:
Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig.cpp 2010-01-18 06:37:32 UTC (rev 4907)
@@ -144,6 +144,8 @@
desc=default_cpdetectors[new_type].desc;
prog=default_cpdetectors[new_type].prog;
args=default_cpdetectors[new_type].args;
+ prog_matcher=default_cpdetectors[new_type].prog_matcher;
+ args_matcher=default_cpdetectors[new_type].args_matcher;
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
{
prog_stack=default_cpdetectors[new_type].prog_stack;
@@ -156,15 +158,42 @@
};
option=default_cpdetectors[new_type].option;
};
+ }
+ else
+ {
+ type=CPDetector_AutoPanoSift;
+ desc=wxEmptyString;
+ prog=wxEmptyString;
+ args=wxEmptyString;
+ prog_matcher=wxEmptyString;
+ args_matcher=wxEmptyString;
+ prog_stack=wxEmptyString;
+ args_stack=wxEmptyString;
+ option=true;
};
+ CheckValues();
};
+void CPDetectorSetting::CheckValues()
+{
+ if(type==CPDetector_AutoPano)
+ {
+ if(!prog_matcher.IsEmpty())
+ {
+ prog_matcher=wxEmptyString;
+ args_matcher=wxEmptyString;
+ };
+ };
+};
+
void CPDetectorSetting::Read(wxConfigBase *config, wxString path)
{
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);
+ prog_matcher=config->Read(path+wxT("/ProgramMatcher"),default_cpdetectors[0].prog_matcher);
+ args_matcher=config->Read(path+wxT("/ArgumentsMatcher"),default_cpdetectors[0].args_matcher);
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
{
prog_stack=config->Read(path+wxT("/ProgramStack"),default_cpdetectors[0].prog_stack);
@@ -176,6 +205,7 @@
args_stack=wxEmptyString;
};
option=config->Read(path+wxT("/Option"),default_cpdetectors[0].option);
+ CheckValues();
};
void CPDetectorSetting::Write(wxConfigBase *config, wxString path)
@@ -184,6 +214,8 @@
config->Write(path+wxT("/Description"),desc);
config->Write(path+wxT("/Program"),prog);
config->Write(path+wxT("/Arguments"),args);
+ config->Write(path+wxT("/ProgramMatcher"),prog_matcher);
+ config->Write(path+wxT("/ArgumentsMatcher"),args_matcher);
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
{
config->Write(path+wxT("/ProgramStack"),prog_stack);
@@ -197,8 +229,11 @@
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_descriptor_select"),CPDetectorDialog::OnSelectPathDescriptor)
+ EVT_BUTTON(XRCID("prefs_cpdetector_program_matcher_select"),CPDetectorDialog::OnSelectPathMatcher)
EVT_BUTTON(XRCID("prefs_cpdetector_program_stack_select"),CPDetectorDialog::OnSelectPathStack)
EVT_CHOICE(XRCID("prefs_cpdetector_type"),CPDetectorDialog::OnTypeChange)
+ EVT_CHOICEBOOK_PAGE_CHANGING(XRCID("choicebook_steps"),CPDetectorDialog::OnStepChanging)
END_EVENT_TABLE()
CPDetectorDialog::CPDetectorDialog(wxWindow* parent)
@@ -217,10 +252,15 @@
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_descriptor = XRCCTRL(*this, "prefs_cpdetector_program_descriptor", wxTextCtrl);
+ m_edit_args_descriptor = XRCCTRL(*this, "prefs_cpdetector_args_descriptor", wxTextCtrl);
+ m_edit_prog_matcher = XRCCTRL(*this, "prefs_cpdetector_program_matcher", wxTextCtrl);
+ m_edit_args_matcher = XRCCTRL(*this, "prefs_cpdetector_args_matcher", wxTextCtrl);
m_edit_prog_stack = XRCCTRL(*this, "prefs_cpdetector_program_stack", wxTextCtrl);
m_edit_args_stack = XRCCTRL(*this, "prefs_cpdetector_args_stack", wxTextCtrl);
m_check_option = XRCCTRL(*this, "prefs_cpdetector_option", wxCheckBox);
m_cpdetector_type = XRCCTRL(*this, "prefs_cpdetector_type", wxChoice);
+ m_choice_step = XRCCTRL(*this, "choicebook_steps", wxChoicebook);
m_cpdetector_type->SetSelection(1);
ChangeType();
};
@@ -242,8 +282,20 @@
#endif
bool valid=true;
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_choice_step->GetSelection()==0)
+ {
+ //detector with one step
+ valid=valid && (m_edit_prog->GetValue().Trim().Len()>0);
+ valid=valid && (m_edit_args->GetValue().Trim().Len()>0);
+ }
+ else
+ {
+ //detector with two steps
+ valid=valid && (m_edit_prog_descriptor->GetValue().Trim().Len()>0);
+ valid=valid && (m_edit_prog_matcher->GetValue().Trim().Len()>0);
+ valid=valid && (m_edit_args_descriptor->GetValue().Trim().Len()>0);
+ valid=valid && (m_edit_args_matcher->GetValue().Trim().Len()>0);
+ };
int type=m_cpdetector_type->GetSelection();
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
if(m_edit_prog_stack->GetValue().Trim().Len()>0)
@@ -258,8 +310,21 @@
void CPDetectorDialog::UpdateFields(CPDetectorConfig* cpdet_config,int index)
{
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());
+ //program names and arguments
+ if(cpdet_config->settings[index].IsTwoStepDetector())
+ {
+ m_choice_step->SetSelection(1);
+ m_edit_prog_descriptor->SetValue(cpdet_config->settings[index].GetProg());
+ m_edit_prog_matcher->SetValue(cpdet_config->settings[index].GetProgMatcher());
+ m_edit_args_descriptor->SetValue(cpdet_config->settings[index].GetArgs());
+ m_edit_args_matcher->SetValue(cpdet_config->settings[index].GetArgsMatcher());
+ }
+ else
+ {
+ m_choice_step->SetSelection(0);
+ m_edit_prog->SetValue(cpdet_config->settings[index].GetProg());
+ m_edit_args->SetValue(cpdet_config->settings[index].GetArgs());
+ };
int type=cpdet_config->settings[index].GetType();
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
{
@@ -274,9 +339,19 @@
void CPDetectorDialog::UpdateSettings(CPDetectorConfig* cpdet_config,int index)
{
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((CPDetectorType)m_cpdetector_type->GetSelection());
+ if(m_choice_step->GetSelection()==0)
+ {
+ cpdet_config->settings[index].SetProg(m_edit_prog->GetValue().Trim());
+ cpdet_config->settings[index].SetArgs(m_edit_args->GetValue().Trim());
+ }
+ else
+ {
+ cpdet_config->settings[index].SetProg(m_edit_prog_descriptor->GetValue().Trim());
+ cpdet_config->settings[index].SetArgs(m_edit_args_descriptor->GetValue().Trim());
+ cpdet_config->settings[index].SetProgMatcher(m_edit_prog_matcher->GetValue().Trim());
+ cpdet_config->settings[index].SetArgsMatcher(m_edit_args_matcher->GetValue().Trim());
+ };
CPDetectorType type=cpdet_config->settings[index].GetType();
if(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack)
{
@@ -294,70 +369,102 @@
void CPDetectorDialog::ChangeType()
{
int type=m_cpdetector_type->GetSelection();
- wxPanel* panel=XRCCTRL(*this,"panel_stack",wxPanel);
+ if(type==CPDetector_AutoPano)
+ {
+ m_choice_step->SetSelection(0);
+ twoStepAllowed=false;
+ }
+ else
+ twoStepAllowed=true;
bool isActive=(type==CPDetector_AutoPanoSiftStack || type==CPDetector_AutoPanoSiftMultiRowStack);
- panel->Show(isActive);
- panel->Enable(isActive);
- panel=XRCCTRL(*this,"panel_option",wxPanel);
- isActive=(type==CPDetector_AutoPanoSiftMultiRow || type==CPDetector_AutoPanoSiftMultiRowStack
- || type==CPDetector_AutoPanoSiftPreAlign);
- panel->Show(isActive);
- panel->Enable(isActive);
+ XRCCTRL(*this,"panel_stack",wxPanel)->Enable(isActive);
switch(type)
{
case CPDetector_AutoPanoSiftMultiRow:
case CPDetector_AutoPanoSiftMultiRowStack:
m_check_option->SetLabel(_("Try to connect all overlapping images."));
+ m_check_option->Enable(true);
+ m_check_option->Show(true);
+ XRCCTRL(*this, "prefs_cpdetector_no_option",wxStaticText)->Show(false);
break;
case CPDetector_AutoPanoSiftPreAlign:
m_check_option->SetLabel(_("Only work on image pairs without control points."));
+ m_check_option->Enable(true);
+ m_check_option->Show(true);
+ XRCCTRL(*this, "prefs_cpdetector_no_option",wxStaticText)->Show(false);
break;
+ default:
+ XRCCTRL(*this, "prefs_cpdetector_no_option",wxStaticText)->Show(true);
+ m_check_option->Enable(false);
+ m_check_option->Show(false);
+ break;
};
+ m_check_option->GetParent()->Layout();
Layout();
};
-void CPDetectorDialog::OnSelectPath(wxCommandEvent &e)
+
+bool CPDetectorDialog::ShowFileDialog(wxString & prog)
{
- wxFileName executable(m_edit_prog->GetValue());
+ wxFileName executable(prog);
#ifdef MAC_SELF_CONTAINED_BUNDLE
- wxString autopanoPath = MacGetPathToUserAppSupportAutoPanoFolder();
+ wxString autopanoPath = MacGetPathToUserAppSupportAutoPanoFolder();
#endif
wxFileDialog dlg(this,_("Select control point detector program"),
#ifdef MAC_SELF_CONTAINED_BUNDLE
- autopanoPath,
-#else
- executable.GetPath(),
+ autopanoPath,
+#else
+ executable.GetPath(),
#endif
- executable.GetFullName(),
+ executable.GetFullName(),
#ifdef __WXMSW__
- _("Executables (*.exe,*.vbs,*.cmd, *.bat)|*.exe;*.vbs;*.cmd;*.bat"),
+ _("Executables (*.exe,*.vbs,*.cmd, *.bat)|*.exe;*.vbs;*.cmd;*.bat"),
#else
- wxT(""),
+ wxT(""),
#endif
- wxOPEN, wxDefaultPosition);
+ wxOPEN, wxDefaultPosition);
if (dlg.ShowModal() == wxID_OK)
- m_edit_prog->SetValue(dlg.GetPath());
+ {
+ prog=dlg.GetPath();
+ return true;
+ }
+ else
+ return false;
};
+void CPDetectorDialog::OnSelectPath(wxCommandEvent &e)
+{
+ wxString prog=m_edit_prog->GetValue();
+ if (ShowFileDialog(prog))
+ m_edit_prog->SetValue(prog);
+};
+
+void CPDetectorDialog::OnSelectPathDescriptor(wxCommandEvent &e)
+{
+ wxString prog=m_edit_prog_descriptor->GetValue();
+ if (ShowFileDialog(prog))
+ m_edit_prog_descriptor->SetValue(prog);
+};
+
+void CPDetectorDialog::OnSelectPathMatcher(wxCommandEvent &e)
+{
+ wxString prog=m_edit_prog_matcher->GetValue();
+ if (ShowFileDialog(prog))
+ m_edit_prog_matcher->SetValue(prog);
+};
+
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());
+ wxString prog=m_edit_prog_stack->GetValue();
+ if (ShowFileDialog(prog))
+ m_edit_prog_stack->SetValue(prog);
};
+
+void CPDetectorDialog::OnStepChanging(wxChoicebookEvent &e)
+{
+ if(!twoStepAllowed && e.GetOldSelection()==0)
+ {
+ wxBell();
+ e.Veto();
+ };
+};
Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h
===================================================================
--- hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig.h 2010-01-18 06:37:32 UTC (rev 4907)
@@ -33,6 +33,7 @@
#include "panoinc_WX.h"
#include <wx/dynarray.h>
+#include <wx/choicebk.h>
enum CPDetectorType
{
@@ -61,18 +62,26 @@
const wxString GetCPDetectorDesc() {return desc; };
/** sets description of this setting */
void SetCPDetectorDesc(wxString new_desc) { desc=new_desc; };
- /** return program of this setting (program name) */
+ /** return type of this setting */
+ const CPDetectorType GetType() {return type; };
+ /** sets type of this setting */
+ void SetType(CPDetectorType new_type) { type=new_type;};
+ /** return program for one step detector or feature descriptor */
const wxString GetProg() {return prog; };
- /** sets program of this setting */
+ /** sets program for one step detector or feature descriptor */
void SetProg(wxString new_prog) { prog=new_prog; };
- /** return arguments of this setting */
+ /** return arguments of one step detector or feature descriptor */
const wxString GetArgs() {return args; };
- /** sets arguments of this setting */
+ /** sets arguments of one step detector or feature descriptor */
void SetArgs(wxString new_args) { args=new_args; };
- /** return type of this setting */
- const CPDetectorType GetType() {return type; };
- /** sets type of this setting */
- void SetType(CPDetectorType new_type) { type=new_type;};
+ /** return program for feature matcher */
+ const wxString GetProgMatcher() {return prog_matcher; };
+ /** sets program for feature matcher */
+ void SetProgMatcher(wxString new_prog) { prog_matcher=new_prog; };
+ /** return arguments for feature matcher */
+ const wxString GetArgsMatcher() {return args_matcher; };
+ /** sets arguments for feature matcher */
+ void SetArgsMatcher(wxString new_args) { args_matcher=new_args; };
/** return program name, which works on stacks */
const wxString GetProgStack() {return prog_stack; };
/** sets program for detecting cp in stacks */
@@ -85,11 +94,16 @@
const bool GetOption() { return option; }
/** set options, used in multi-row cp and prealigned detectors */
void SetOption(bool new_option) { option=new_option; };
+ /** returns true, if setting is suitable for two step detector otherwise false */
+ const bool IsTwoStepDetector() { return !prog_matcher.IsEmpty(); };
private:
+ void CheckValues();
CPDetectorType type;
wxString desc;
wxString prog;
wxString args;
+ wxString prog_matcher;
+ wxString args_matcher;
wxString prog_stack;
wxString args_stack;
bool option;
@@ -153,18 +167,32 @@
void OnOk(wxCommandEvent & e);
/** select program with file open dialog */
void OnSelectPath(wxCommandEvent &e);
+ /** select program for feature descriptor with file open dialog */
+ void OnSelectPathDescriptor(wxCommandEvent &e);
+ /** select program for feature matcher with file open dialog */
+ void OnSelectPathMatcher(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);
+ /** block selection of two step detector for autopano setting */
+ void OnStepChanging(wxChoicebookEvent &e);
+ /** shows file dialog */
+ bool ShowFileDialog(wxString & prog);
private:
wxTextCtrl *m_edit_desc;
wxTextCtrl *m_edit_prog;
wxTextCtrl *m_edit_args;
+ wxTextCtrl *m_edit_prog_descriptor;
+ wxTextCtrl *m_edit_args_descriptor;
+ wxTextCtrl *m_edit_prog_matcher;
+ wxTextCtrl *m_edit_args_matcher;
wxTextCtrl *m_edit_prog_stack;
wxTextCtrl *m_edit_args_stack;
wxCheckBox *m_check_option;
wxChoice *m_cpdetector_type;
+ wxChoicebook * m_choice_step;
+ bool twoStepAllowed;
void ChangeType();
DECLARE_EVENT_TABLE();
Modified: hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h
===================================================================
--- hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/CPDetectorConfig_default.h 2010-01-18 06:37:32 UTC (rev 4907)
@@ -38,10 +38,14 @@
CPDetectorType type;
/** name, which is shown in GUI */
wxString desc;
- /** program name */
+ /** program name for detector or descriptor*/
wxString prog;
- /** arguments of the detector */
+ /** arguments of the detector or descriptor*/
wxString args;
+ /** program name for matcher */
+ wxString prog_matcher;
+ /** arguments of matcher */
+ wxString args_matcher;
/** program name of cp detector for stacks */
wxString prog_stack;
/** arguments of cp detector for stacks */
@@ -53,29 +57,30 @@
/** this array saves all default settings */
const struct cpdetector_default default_cpdetectors[]=
{
-/* use following order: {type, description, program name, arguments, program name stack, arguments stack, option}
+/* use following order: {type, description, program for detector or descriptor, arguments for detector or descriptor,
+ program for matcher, arguments for matcher, program name stack, arguments stack, option}
attention: this array have to contain at least one item */
#if defined WIN32
{CPDetector_AutoPanoSift, wxT("Autopano-SIFT-C"),
wxT("autopano-sift-c.exe"),wxT("--maxmatches %p --projection %f,%v %o %i"),
- wxT(""), wxT(""), true},
+ wxT(""), wxT(""), wxT(""), wxT(""), true},
{CPDetector_AutoPano, wxT("Autopano"),
wxT("autopano.exe"),wxT("/allinone /path:%d /keys:%p /project:oto /name:%o /size:1024 /f %i"),
- wxT(""), wxT(""), true},
- {CPDetector_AutoPanoSift, wxT("Panomatic"),wxT("panomatic.exe"),wxT("-o %o %i"),wxT(""), wxT(""), true},
- {CPDetector_AutoPanoSift, wxT("Align image stack"),wxT("align_image_stack.exe"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), true},
- {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(""), true}
+ wxT(""), wxT(""), wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift, wxT("Panomatic"),wxT("panomatic.exe"),wxT("-o %o %i"),wxT(""), wxT(""), wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift, wxT("Align image stack"),wxT("align_image_stack.exe"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true},
+ {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(""), wxT(""), wxT(""), true}
#else
#if !defined MAC_SELF_CONTAINED_BUNDLE
// Since medio 2008 the MacOSX bundle is built without patent/license restricted CP detectors.
- {CPDetector_AutoPanoSift,wxT("Autopano-SIFT-C"),wxT("autopano-noop.sh"),wxT("--maxmatches %p --projection %f,%v %o %i"),wxT(""),wxT(""), true},
- {CPDetector_AutoPanoSift,wxT("Panomatic"),wxT("panomatic"),wxT("-o %o %i"),wxT(""),wxT(""), true},
- {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(""),true},
- {CPDetector_AutoPanoSift,wxT("Align image stack"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), true},
- {CPDetector_AutoPanoSift,wxT("Align_image_stack FullFrameFisheye"),wxT("align_image_stack"),wxT("-f %v -p -e %o %i"),wxT(""),wxT(""), true}
+ {CPDetector_AutoPanoSift,wxT("Autopano-SIFT-C"),wxT("autopano-noop.sh"),wxT("--maxmatches %p --projection %f,%v %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift,wxT("Panomatic"),wxT("panomatic"),wxT("-o %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true},
+ {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(""),wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift,wxT("Align image stack"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift,wxT("Align_image_stack FullFrameFisheye"),wxT("align_image_stack"),wxT("-f %v -p -e %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true}
#else
- {CPDetector_AutoPanoSift,wxT("Align_image_stack linear"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), true},
- {CPDetector_AutoPanoSift,wxT("Align_image_stack FullFrameFisheye"),wxT("align_image_stack"),wxT("-f %v -p -e %o %i"),wxT(""),wxT(""), true}
+ {CPDetector_AutoPanoSift,wxT("Align_image_stack linear"),wxT("align_image_stack"),wxT("-f %v -p %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true},
+ {CPDetector_AutoPanoSift,wxT("Align_image_stack FullFrameFisheye"),wxT("align_image_stack"),wxT("-f %v -p -e %o %i"),wxT(""),wxT(""), wxT(""), wxT(""), true}
#endif
#endif
};
Modified: hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc
===================================================================
--- hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc 2010-01-17 22:23:48 UTC (rev 4906)
+++ hugin/trunk/src/hugin1/hugin/xrc/cpdetector_dialog.xrc 2010-01-18 06:37:32 UTC (rev 4907)
@@ -4,183 +4,310 @@
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
- <object class="wxStaticBoxSizer">
+ <object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
- <object class="wxFlexGridSizer">
- <cols>2</cols>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
<object class="sizeritem">
- <object class="wxStaticText">
- <label>Description:</label>
- </object>
- <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
- <border>5</border>
- </object>
- <object class="sizeritem">
- <object class="wxTextCtrl" name="prefs_cpdetector_desc"/>
- <flag>wxALL|wxEXPAND</flag>
- <border>5</border>
- </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>All images at once</item>
- <item>Panorama with stacks</item>
- <item>Multi-row panorama</item>
- <item>Multi-row panorama with stacks</item>
- <item>Prealigned panorama</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>
- <border>5</border>
- </object>
- <object class="sizeritem">
- <object class="wxBoxSizer">
- <orient>wxHORIZONTAL</orient>
+ <object class="wxFlexGridSizer">
+ <cols>2</cols>
<object class="sizeritem">
- <object class="wxTextCtrl" name="prefs_cpdetector_program"/>
- <option>1</option>
- <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <object class="wxStaticText">
+ <label>Description:</label>
+ </object>
+ <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
<border>5</border>
</object>
<object class="sizeritem">
- <object class="wxButton" name="prefs_cpdetector_program_select">
- <label>Choose...</label>
+ <object class="wxTextCtrl" name="prefs_cpdetector_desc"/>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxStaticText">
+ <label>Type:</label>
</object>
- <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag>
+ <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>All images at once</item>
+ <item>Panorama with stacks</item>
+ <item>Multi-row panorama</item>
+ <item>Multi-row panorama with stacks</item>
+ <item>Prealigned panorama</item>
+ </content>
+ </object>
+ <flag>wxALL</flag>
+ <border>5</border>
+ </object>
+ <growablecols>1</growablecols>
</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"/>
- <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
- <border>5</border>
- </object>
- <growablecols>1</growablecols>
- </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>
- <object class="sizeritem">
- <object class="wxFlexGridSizer">
- <object class="sizeritem">
- <object class="wxStaticText">
- <label>Program:</label>
+ <object class="wxNotebook" name="notebook_detector">
+ <object class="notebookpage">
+ <label>Detector</label>
+ <object class="wxPanel" name="panel_detector">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <object class="wxChoicebook" name="choicebook_steps">
+ <object class="choicebookpage">
+ <label>One step detector</label>
+ <object class="wxPanel">
+ <object class="wxFlexGridSizer">
+ <cols>2</cols>
+ <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"/>
+ <option>1</option>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="prefs_cpdetector_program_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"/>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <growablecols>1</growablecols>
+ </object>
+ </object>
+ </object>
+ <object class="choicebookpage">
+ <label>Two step detector</label>
+ <object class="wxPanel">
+ <object class="wxFlexGridSizer">
+ <cols>2</cols>
+ <object class="sizeritem">
+ <object class="wxStaticText">
+ <label>Feature descriptor:</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_descriptor"/>
+ <option>1</option>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="prefs_cpdetector_program_descriptor_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_descriptor"/>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <growablecols>1</growablecols>
+ <object class="sizeritem">
+ <object class="wxStaticText">
+ <label>Feature matcher:</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_matcher"/>
+ <option>1</option>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="prefs_cpdetector_program_matcher_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_matcher"/>
+ <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>5</border>
+ </object>
</object>
- <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
- <border>5</border>
</object>
- <object class="sizeritem">
+ </object>
+ <object class="notebookpage">
+ <label>Detector for stacks</label>
+ <object class="wxPanel" name="panel_stack">
<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>
+ <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>
<object class="sizeritem">
- <object class="wxButton" name="prefs_cpdetector_program_stack_select">
- <label>Choose...</label>
+ <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>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag>
- <border>5</border>
+ <flag>wxEXPAND</flag>
</object>
+ <orient>wxVERTICAL</orient>
</object>
- <flag>wxEXPAND</flag>
</object>
- <object class="sizeritem">
- <object class="wxStaticText">
- <label>Arguments:</label>
+ </object>
+ <object class="notebookpage">
+ <label>Advanced option</label>
+ <object class="wxPanel" name="panel_option">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <object class="wxCheckBox" name="prefs_cpdetector_option">
+ <label></label>
+ <checked>1</checked>
+ </object>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>10</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="prefs_cpdetector_no_option">
+ <label>This setting has no advanced options.</label>
+ </object>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>10</border>
+ </object>
</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>
+ <style></style>
</object>
- <label>Control Point Detector for stacks</label>
- <orient>wxVERTICAL</orient>
+ <flag>wxALL|wxEXPAND</flag>
+ <border>5</border>
</object>
- </object>
- <flag>wxEXPAND</flag>
- </object>
- <object class="sizeritem">
- <object class="wxPanel" name="panel_option">
- <object class="wxStaticBoxSizer">
- <label>Advanced option</label>
- <orient>wxVERTICAL</orient>
- <object class="sizeritem">
- <object class="wxCheckBox" name="prefs_cpdetector_option">
- <label></label>
- <checked>1</checked>
- </object>
- <flag>wxALL|wxEXPAND</flag>
- <border>5</border>
- </object>
- </object>
- </object>
- <flag>wxEXPAND</flag>
- </object>
- <object class="sizeritem">
- <object class="wxStaticText">
- <label>following patterns will be substituted before running:
+ <object class="sizeritem">
+ <object class="wxStaticText">
+ <label>following patterns will be substituted before running:
%o -- output project (0.oto will be appended when using Autopano)
%p -- number of control points between each pair
%v -- HFOV of first image
%f -- projection of first image (0-4, as in panotools)
%i -- image files
%namefile -- file that contains image filenames
-%s -- input panotools script</label>
+%s -- input panotools script
+%k -- intermediate key file(s)</label>
+ </object>
+ <flag>wxALL|wxEXPAND|wxADJUST_MINSIZE</flag>
+ <border>5</border>
+ </object>
</object>
- <flag>wxALL|wxEXPAND|wxADJUST_MINSIZE</flag>
+ <option>1</option>
+ <flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
- <label>Detector</label>
</object>
<option>1</option>
- <flag>wxALL|wxEXPAND</flag>
- <border>5</border>
+ <flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
@@ -205,7 +332,8 @@
<border>5</border>
</object>
</object>
- <flag>wxTOP|wxALL|wxEXPAND</flag>
+ <option>0</option>
+ <flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
</object>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|