From: Pablo d'A. <da...@us...> - 2005-12-05 08:29:19
|
Update of /cvsroot/hugin/hugin/src/hugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19742 Modified Files: LensPanel.cpp Log Message: bugfix: set a,b,c to 1e-7 instead of 0.0 Panotools will not optimize these parameters if they are exactly 0.0 Index: LensPanel.cpp =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/LensPanel.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- LensPanel.cpp 10 Aug 2005 22:05:45 -0000 1.85 +++ LensPanel.cpp 5 Dec 2005 08:29:09 -0000 1.86 @@ -420,6 +420,7 @@ // not reachable DEBUG_ASSERT(0); } + wxString ctrl_name(wxT("lens_val_")); ctrl_name.append(wxString(varname.c_str(), *wxConvCurrent)); double val; @@ -428,6 +429,11 @@ if (!str2double(text, val)){ return; } + if ((varname == "a" || varname == "b" || varname == "c") && val == 0.0 ){ + // set value to a very small one. PTOptimizer will not optimise a + // distortion parameter whos value is exactly 0 + val = 0.0000001; + } Variable var(varname,val); GlobalCmdHist::getInstance().addCommand( new PT::SetVariableCmd(pano, m_selectedImages, var) |