29 #include <hugin_config.h>
42 #define _STLP_VERBOSE_AUTO_LINK
58 namespace HuginBase {
namespace PTools {
61 const char * userScript)
64 unsigned int retval = 0;
66 if (userScript == 0) {
67 std::ostringstream scriptbuf;
71 script = strdup(scriptbuf.str().c_str());
73 script =
const_cast<char *
>(userScript);
79 if (ParseScript( script, &ainf ) == 0)
81 if( CheckParams( &ainf ) == 0 )
85 SetGlobalPtr( &ainf );
87 opt.numVars = ainf.numParam;
88 opt.numData = ainf.numPts;
89 opt.SetVarsToX = SetLMParams;
90 opt.SetXToVars = SetAlignParams;
94 RunLMOptimizer( &opt );
95 ainf.data = opt.message;
97 #ifdef DEBUG_WRITE_OPTIM_OUTPUT
99 StringtoFullPath(&path, DEBUG_WRITE_OPTIM_OUTPUT_FILE );
101 ainf.data = opt.message;
102 WriteResults( script, &path, &ainf, distSquared, 0);
107 std::cerr <<
"Bad params" << std::endl;
110 DisposeAlignInfo( &ainf );
112 std::cerr <<
"Bad params" << std::endl;
virtual const OptimizeVector & getOptimizeVector() const =0
return the optimize settings stored inside panorama
virtual void printPanoramaScript(std::ostream &o, const OptimizeVector &optvars, const PanoramaOptions &options, const UIntSet &imgs, bool forPTOptimizer, const std::string &stripPrefix="") const =0
create an optimizer script
std::set< unsigned int > UIntSet
virtual void updateCtrlPointErrors(const CPVector &controlPoints)=0
update control points distances.
virtual const PanoramaOptions & getOptions() const =0
returns the options for this panorama
void fill_set(_Container &c, typename _Container::key_type begin, typename _Container::key_type end)
virtual std::size_t getNrOfImages() const =0
number of images.
virtual void updateVariables(const VariableMapVector &vars)=0
Set the variables.