Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PanoCommand.cpp
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
6 /*
7 * This is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public
18 * License along with this software. If not, see
19 * <http://www.gnu.org/licenses/>.
20 *
21 */
22 
23 #include "PanoCommand.h"
24 #include <fstream>
26 
33 #include <panodata/ParseExp.h>
34 
35 namespace PanoCommand
36 {
38  {
39  for (std::vector<PanoCommand*>::iterator it = commands.begin(); it != commands.end(); ++it)
40  {
41  delete *it;
42  }
43  }
44 
46  {
47  bool result = true;
48  for (std::vector<PanoCommand*>::iterator it = commands.begin(); it != commands.end(); ++it)
49  {
50  result &= (**it).processPanorama(pano);
51  }
53  return result;
54  };
55 
57  {
58  pano.reset();
59  return true;
60  }
61 
63  {
64  std::vector<HuginBase::SrcPanoImage>::const_iterator it;
65  for (it = imgs.begin(); it != imgs.end(); ++it)
66  {
67  pano.addImage(*it);
68  }
69  return true;
70  }
71 
73  {
74  pano.removeImage(imgNr);
75  return true;
76  }
77 
79  {
80  for (HuginBase::UIntSet::reverse_iterator it = imgNrs.rbegin();
81  it != imgNrs.rend(); ++it)
82  {
83  pano.removeImage(*it);
84  }
85  return true;
86  }
87 
89  {
90  pano.updateVariables(vars);
92  return true;
93  }
94 
96  {
97  HuginBase::CPVector::const_iterator it;
98  unsigned int i = 0;
99  for (it = cps.begin(); it != cps.end(); ++it, i++)
100  {
101  pano.changeControlPoint(i, *it);
102  }
103  if (updateCPError)
104  {
106  };
107 
108  return true;
109  }
110 
112  {
113  pano.updateVariables(vars);
115  return true;
116  }
117 
119  {
120  pano.updateVariables(m_imgs, vars);
122  pano.markAsOptimized();
123  return true;
124  }
125 
127  {
128  pano.updateVariables(imgNr, vars);
130  return true;
131  }
132 
134  {
135  HuginBase::UIntSet::iterator it;
136  HuginBase::VariableMapVector::const_iterator v_it = vars.begin();
137  for (it = change.begin(); it != change.end(); ++it)
138  {
139  pano.updateVariables(*it, *v_it);
140  ++v_it;
141  }
143  return true;
144  }
145 
147  {
148  if (!m_expression.empty())
149  {
152  return true;
153  }
154  else
155  {
156  return false;
157  };
158  }
159 
161  {
163  return true;
164  }
165 
166 
168  {
170  return true;
171  }
172 
174  {
176  return true;
177  }
178 
180  {
181  HuginBase::UIntSet::iterator it;
182  for (it = images.begin(); it != images.end(); ++it)
183  {
184  pano.updateVariable(*it, var);
185  }
187 
188  return true;
189  }
190 
192  {
194  // adjust canvas size
195  HuginBase::CalculateFitPanorama fitPano(pano);
196  fitPano.run();
198  opts.setHFOV(fitPano.getResultHorizontalFOV());
200  pano.setOptions(opts);
202 
203  return true;
204  }
205 
207  {
209 
211  if (opts.getHFOV()<360)
212  {
213  // center non 360 deg panos
215  };
216  // adjust canvas size
217  HuginBase::CalculateFitPanorama fitPano(pano);
218  fitPano.run();
219  opts.setHFOV(fitPano.getResultHorizontalFOV());
221  pano.setOptions(opts);
223 
224  return true;
225  }
226 
228  {
229  HuginBase::UIntSet imgs;
230  imgs.insert(point.image1Nr);
231  imgs.insert(point.image2Nr);
232  HuginBase::Panorama copyPano = pano.duplicate();
233  HuginBase::CPVector cpVector;
234  // copy only the given cp to the duplicated pano
235  cpVector.push_back(point);
236  copyPano.setCtrlPoints(cpVector);
237  // create subpano with only images for the single cp
238  HuginBase::Panorama subPano = copyPano.getSubset(imgs);
239  // finally calc cp error
241  point.error = subPano.getCtrlPoint(0).error;
242  }
243 
245  {
247  {
248  // if the first image number is bigger than the second, mirror the point
249  point.mirror();
250  };
251  // calculate cp error only for newly added control point
253  pano.addCtrlPoint(point);
254  return true;
255  }
256 
258  {
259  HuginBase::UIntSet imgs;
260  for (HuginBase::CPVector::iterator it = cps.begin(); it != cps.end(); ++it)
261  {
262  if ((*it).image1Nr > (*it).image2Nr)
263  {
264  (*it).mirror();
265  };
266  imgs.insert(it->image1Nr);
267  imgs.insert(it->image2Nr);
268  }
269  // calculate cp error only for newly added control point
270  // create subpano with only images for the new cp
271  HuginBase::Panorama copyPano = pano.duplicate();
272  copyPano.setCtrlPoints(cps);
273  HuginBase::Panorama subPano = copyPano.getSubset(imgs);
274  // finally calc cp error
276  for (auto it = cps.begin(); it != cps.end(); ++it)
277  {
278  it->error = subPano.getCtrlPoint(it - cps.begin()).error;
279  pano.addCtrlPoint(*it);
280  };
281  return true;
282  }
283 
285  {
286  pano.removeCtrlPoint(pointNr);
287  return true;
288  }
289 
291  {
292  for (HuginBase::UIntSet::reverse_iterator it = m_points.rbegin(); it != m_points.rend(); ++it)
293  {
294  pano.removeCtrlPoint(*it);
295  }
296  return true;
297  }
298 
300  {
301  // calculate cp error only for the changed control point
303  // finally change the point
305  return true;
306  }
307 
309  {
310  HuginBase::UIntSet::iterator it;
311  for (unsigned int i = 0; i < pano.getNrOfImages(); i++)
312  {
313  if (set_contains(m_active, i))
314  {
315  pano.activateImage(i, true);
316  }
317  else
318  {
319  pano.activateImage(i, false);
320  };
321  }
322  return true;
323  }
324 
326  {
327  pano.swapImages(m_i1, m_i2);
328  return true;
329  }
330 
332  {
333  pano.moveImage(m_i1, m_i2);
334  return true;
335  }
336 
338  {
339  pano.mergePanorama(newPano);
341  return true;
342  }
343 
345  {
346  pano.setSrcImage(imgNr, img);
348  return true;
349  }
350 
352  {
353  int i = 0;
354  for (HuginBase::UIntSet::iterator it = imgNrs.begin(); it != imgNrs.end(); ++it)
355  {
356  pano.setSrcImage(*it, imgs[i]);
357  i++;
358  }
360  return true;
361  }
362 
364  {
365  pano.setOptions(options);
367  return true;
368  }
369 
370  LoadPTProjectCmd::LoadPTProjectCmd(HuginBase::Panorama & p, const std::string & filename, const std::string & prefix)
371  : PanoCommand(p), filename(filename), prefix(prefix)
372  {
373  m_clearDirty = true;
374  }
375 
377  {
378  if (!pano.ReadPTOFile(filename))
379  {
380  return false;
381  }
382  return true;
383  }
384 
386  {
387  HuginBase::RotatePanorama(pano, y, p, r).run();
389  return true;
390  }
391 
393  {
394  HuginBase::TranslatePanorama(pano, X, Y, Z).run();
396  return true;
397  }
398 
400  {
403  return true;
404  }
405 
407  {
408  //search all image with the same lens, otherwise the crop factor is updated via links,
409  //but not the hfov if the image is not the given HuginBase::UIntSet
410  HuginBase::UIntSet allImgWithSameLens;
411  HuginBase::UIntSet testedLens;
412  HuginBase::StandardImageVariableGroups variable_groups(pano);
413  HuginBase::ImageVariableGroup & lenses = variable_groups.getLenses();
414  for (HuginBase::UIntSet::const_iterator it = imgNrs.begin(); it != imgNrs.end(); ++it)
415  {
416  allImgWithSameLens.insert(*it);
417  unsigned int lensNr = lenses.getPartNumber(*it);
418  if (set_contains(testedLens, lensNr))
419  {
420  continue;
421  };
422  testedLens.insert(lensNr);
423  for (unsigned int i = 0; i<pano.getNrOfImages(); i++)
424  {
425  if (lenses.getPartNumber(i) == lensNr)
426  {
427  allImgWithSameLens.insert(i);
428  };
429  };
430  };
431  pano.UpdateCropFactor(allImgWithSameLens, m_cropFactor);
433  return true;
434  }
435 
437  {
438  // it might change as we are setting them
439  std::size_t new_new_part_number = new_part_number;
441  for (HuginBase::UIntSet::iterator it = image_numbers.begin(); it != image_numbers.end(); ++it)
442  {
443  group.switchParts(*it, new_new_part_number);
444  // update the lens number if it changes.
445  new_new_part_number = group.getPartNumber(*it);
446  }
447  return true;
448  }
449 
451  {
453  if (new_linked_state)
454  {
455  for (HuginBase::UIntSet::iterator imageIt = image_numbers.begin(); imageIt != image_numbers.end(); ++imageIt)
456  {
457  // link the variables
458  for (std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>::iterator variableIt = changeVariables.begin();
459  variableIt != changeVariables.end(); ++variableIt)
460  {
461  group.linkVariableImage(*variableIt, *imageIt);
462  }
463  }
464  }
465  else
466  {
467  for (HuginBase::UIntSet::iterator imageIt = image_numbers.begin(); imageIt != image_numbers.end(); ++imageIt)
468  {
469  // unlink the variable
470  for (std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>::iterator variableIt = changeVariables.begin();
471  variableIt != changeVariables.end(); ++variableIt)
472  {
473  group.unlinkVariableImage(*variableIt, *imageIt);
474  group.updatePartNumbers();
475  }
476  }
477  }
478  return true;
479  }
480 
482  {
483  HuginBase::StandardImageVariableGroups variable_groups(pano);
484  HuginBase::ImageVariableGroup & lenses = variable_groups.getLenses();
485  std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>::iterator it;
486  for (it = variables.begin(); it != variables.end(); ++it)
487  {
488  lenses.linkVariablePart(*it, lens_number);
489  }
490  return true;
491  }
492 
494 #define image_variable( name, type, default_value )\
495  bool ChangeImage##name##Cmd::processPanorama(HuginBase::Panorama& pano)\
496  {\
497  for (HuginBase::UIntSet::iterator it = image_numbers.begin(); it != image_numbers.end(); it++)\
498  {\
499  HuginBase::SrcPanoImage img = pano.getSrcImage(*it);\
500  img.set##name(value);\
501  pano.setSrcImage(*it, img);\
502  }\
503  return true;\
504  };
506 #undef image_variable
507 
509  {
510  // unlink all the variables in the first image.
511  DEBUG_ASSERT(!image_numbers.empty());
512  unsigned int image_index = *image_numbers.begin();
513  for (std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>::iterator it = vars.begin(); it != vars.end(); ++it)
514  {
515  switch (*it)
516  {
517 #define image_variable( name, type, default_value )\
518  case HuginBase::ImageVariableGroup::IVE_##name:\
519  pano.unlinkImageVariable##name(image_index);\
520  break;
522 #undef image_variable
523  }
524  }
525  // now the first image should have a new part in the group.
526  // we want to switch the rest of the images to the new part.
527  HuginBase::ImageVariableGroup group(vars, pano);
528  for (HuginBase::UIntSet::iterator it = ++image_numbers.begin(); it != image_numbers.end(); ++it)
529  {
530  std::size_t part_number = group.getPartNumber(image_index);
531  group.switchParts(*it, part_number);
532  }
533  return true;
534  }
535 
537  {
539  return true;
540  }
541 
543  {
545  return true;
546  }
547 
549  {
552  pano.setOptions(opts);
553  return true;
554  }
555 
557  {
558  const size_t nrImages = pano.getNrOfImages();
559  if (nrImages>0)
560  {
561  const HuginBase::SrcPanoImage& img = pano.getImage(0);
562  const double hfov = img.getHFOV();
563  size_t imgsPerRow;
564  //distribute all images
565  //for rectilinear images calculate number of rows
566  if (img.getProjection() == HuginBase::SrcPanoImage::RECTILINEAR)
567  {
568  imgsPerRow = std::max(3, int(360 / (0.8*hfov)));
569  imgsPerRow = std::min(imgsPerRow, nrImages);
570  }
571  else
572  {
573  //all other images do in one row to prevent cluttered images with fisheye images and the like
574  imgsPerRow = nrImages;
575  };
576  double offset = 0.75*hfov;
577  if ((imgsPerRow - 1.0)*offset>360)
578  {
579  offset = 360 / (imgsPerRow - 1.0);
580  };
581  double yaw = -(imgsPerRow - 1.0) / 2.0*offset;
582  double pitch = 0;
583  if (imgsPerRow<nrImages)
584  {
585  pitch = (-(std::ceil(double(nrImages) / double(imgsPerRow)) - 1.0) / 2.0*offset);
586  };
588  size_t counter = 0;
589  for (size_t i = 0; i<nrImages; i++)
590  {
591  HuginBase::VariableMap::iterator it = varsVec[i].find("y");
592  if (it != varsVec[i].end())
593  {
594  it->second.setValue(yaw);
595  };
596  it = varsVec[i].find("p");
597  if (it != varsVec[i].end())
598  {
599  it->second.setValue(pitch);
600  };
601  yaw += offset;
602  counter++;
603  if (counter == imgsPerRow)
604  {
605  counter = 0;
606  pitch += offset;
607  yaw = -(imgsPerRow - 1.0) / 2.0*offset;
608  };
609  };
610  pano.updateVariables(varsVec);
611  };
612  return true;
613  }
614 
615 } // namespace PanoCommand
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Base class for all panorama commands.
Definition: Command.h:38
HuginBase::CPVector cps
Definition: PanoCommand.h:288
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:95
void linkVariableImage(ImageVariableEnum variable, unsigned int imageNr)
link one of the variables across a part containing a given image
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::PanoramaOptions options
Definition: PanoCommand.h:425
HuginBase::UIntSet image_numbers
Definition: PanoCommand.h:514
HuginBase::VariableMapVector vars
Definition: PanoCommand.h:155
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
Definition: PanoCommand.h:564
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void setHeight(unsigned int h)
set panorama height
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:45
unsigned int getPartNumber(unsigned int imageNr) const
Get a part number from an image number.
int roundi(T x)
Definition: hugin_math.h:73
void moveImage(size_t img1, size_t img2)
moves images.
Definition: Panorama.cpp:1424
static double calcMeanExposure(const PanoramaData &pano)
HuginBase::SrcPanoImage img
Definition: PanoCommand.h:396
HuginBase::UIntSet images
Definition: PanoCommand.h:245
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void updateCtrlPointErrors(const CPVector &controlPoints)
update control points distances.
Definition: Panorama.cpp:160
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::VariableMapVector vars
Definition: PanoCommand.h:111
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::OptimizeVector m_optvec
Definition: PanoCommand.h:210
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual void updateWhiteBalance(double redFactor, double blueFactor)
update the global white balace of the panorama by multiplying the red and blue factor of each image w...
Definition: Panorama.cpp:2090
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void setPhotometricOptimizerSwitch(const int newSwitch)
sets the photometric optimizer master switch
Definition: Panorama.cpp:311
HuginBase::VariableMapVector vars
Definition: PanoCommand.h:184
HuginBase::UIntSet m_active
Definition: PanoCommand.h:341
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::Variable var
Definition: PanoCommand.h:246
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void swapImages(unsigned int img1, unsigned int img2)
swap images.
Definition: Panorama.cpp:1380
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:78
bool set_contains(const _Container &c, const typename _Container::key_type &key)
Definition: stl_utils.h:74
HuginBase::UIntSet imgNrs
Definition: PanoCommand.h:99
#define DEBUG_ASSERT(cond)
Definition: utils.h:80
std::vector< PanoCommand * > commands
Definition: PanoCommand.h:51
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::MaskPolygonVector m_mask
Definition: PanoCommand.h:622
virtual void run()
runs the algorithm.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:62
Panorama getSubset(const UIntSet &imgs) const
get a subset of the panorama
const std::string & filename
Definition: PanoCommand.h:440
void setOptimizerSwitch(const int newSwitch)
set optimizer master switch
Definition: Panorama.cpp:303
represents a control point
Definition: ControlPoint.h:38
virtual void updateVariables(const VariableMapVector &vars)
Set the variables.
Definition: Panorama.cpp:171
void setOptimizeVector(const OptimizeVector &optvec)
set optimize setting
Definition: Panorama.cpp:297
void linkVariablePart(ImageVariableEnum variable, unsigned int partNr)
link one of the variables across a given part
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void UpdateSingleCtrlPointError(const HuginBase::Panorama &pano, HuginBase::ControlPoint &point)
Panorama duplicate() const
duplicate the panorama
Definition: Panorama.cpp:1653
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
std::set< unsigned int > UIntSet
Definition: PanoramaData.h:51
IMPEX void PanoParseExpression(HuginBase::Panorama &pano, const std::string &expression, std::ostream &statusStream=std::cout, std::ostream &errorStream=std::cerr)
parses the given expression and apply the changes to the Panorama
virtual void UpdateCropFactor(UIntSet imgs, double newCropFactor)
updates the crop factor, try to keep focal length constant
Definition: Panorama.cpp:254
std::vector< VariableMap > VariableMapVector
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void calcCtrlPointErrors(PanoramaData &pano)
Update the Ctrl Point errors without optimizing.
Model for a panorama.
Definition: Panorama.h:152
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
unsigned int addCtrlPoint(const ControlPoint &point)
add a new control point.
Definition: Panorama.cpp:381
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > changeVariables
Definition: PanoCommand.h:547
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars
Definition: PanoCommand.h:608
VariableMapVector getVariables() const
get variables of this panorama
Definition: Panorama.cpp:118
std::size_t getNrOfImages() const
number of images.
Definition: Panorama.h:205
void setCtrlPoints(const CPVector &points)
set all control points (Ippei: Is this supposed to be &#39;add&#39; method?)
Definition: Panorama.cpp:449
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:56
const ControlPoint & getCtrlPoint(std::size_t nr) const
get a control point, counting starts with 0
Definition: Panorama.h:312
void changeControlPoint(unsigned int pNr, const ControlPoint &point)
change a control Point.
Definition: Panorama.cpp:434
bool ReadPTOFile(const std::string &filename, const std::string &prefix="")
read pto file from the given filename into Panorama object it does some checks on the file and issues...
Definition: Panorama.cpp:2023
virtual double getResultHeight()
Definition: FitPanorama.h:75
ImageVariableGroup & getLenses()
Get the ImageVariableGroup representing the group of lens variables.
void activateImage(unsigned int imgNr, bool active=true)
mark an image as active or inactive.
Definition: Panorama.cpp:1575
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:88
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Definition: PanoCommand.cpp:72
LoadPTProjectCmd(HuginBase::Panorama &p, const std::string &filename, const std::string &prefix="")
void removeImage(unsigned int nr)
creates an image, from filename, and a Lens, if needed
Definition: Panorama.cpp:329
HuginBase::Panorama newPano
Definition: PanoCommand.h:382
HuginBase::UIntSet image_numbers
Definition: PanoCommand.h:605
unsigned int addImage(const SrcPanoImage &img)
the the number for a specific image
Definition: Panorama.cpp:319
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
Utility calls into PanoTools using CPP interface.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::CPVector cps
Definition: PanoCommand.h:124
Same as above, but use a non const panorama.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void setHFOV(double h, bool keepView=true)
set the horizontal field of view.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void unlinkVariableImage(ImageVariableEnum variable, unsigned int imageNr)
unlink one the variables across the part containing a given image.
const PanoramaOptions & getOptions() const
returns the options for this panorama
Definition: Panorama.h:481
virtual double getResultHorizontalFOV()
Definition: FitPanorama.h:68
void markAsOptimized(bool optimized=true)
Definition: Panorama.h:618
void updatePartNumbers()
Update the part numbers, call this when the panorama changes.
static T max(T x, T y)
Definition: svm.cpp:65
HuginBase::ControlPoint point
Definition: PanoCommand.h:275
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
void removeCtrlPoint(unsigned int pNr)
remove a control point.
Definition: Panorama.cpp:391
std::vector< ControlPoint > CPVector
Definition: ControlPoint.h:99
HuginBase::VariableMapVector vars
Definition: PanoCommand.h:138
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
HuginBase::ControlPoint point
Definition: PanoCommand.h:330
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
Definition: Panorama.h:211
std::vector< HuginBase::SrcPanoImage > imgs
Definition: PanoCommand.h:411
void setOptions(const PanoramaOptions &opt)
set new output settings This is not used directly for optimizing/stiching, but it can be feed into ru...
Definition: Panorama.cpp:1531
void setSrcImage(unsigned int nr, const SrcPanoImage &img)
set input image parameters
void updateMasksForImage(unsigned int imgNr, MaskPolygonVector newMasks)
set complete mask list for image with number
Definition: Panorama.cpp:882
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > groupVariables
Definition: PanoCommand.h:549
All variables of a source image.
Definition: SrcPanoImage.h:194
Panorama image options.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual void updateVariable(unsigned int imgNr, const Variable &var)
update a single variable
void switchParts(unsigned int ImageNr, unsigned int partNr)
switch a given image to a different part number.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
This file specifies what image variables SrcPanoImg should have.
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
static T min(T x, T y)
Definition: svm.cpp:62
void reset()
clear the internal state.
Definition: Panorama.cpp:69
function to parse expressions from strings
void mirror()
swap (image1Nr,x1,y1) with (image2Nr,x2,y2)
std::vector< HuginBase::SrcPanoImage > imgs
Definition: PanoCommand.h:70
void mergePanorama(const Panorama &newPano)
merges the panorama with the given pano
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
Definition: PanoCommand.h:518
virtual bool processPanorama(HuginBase::Panorama &pano)
Called by execute().
virtual void UpdateFocalLength(UIntSet imgs, double newFocalLength)
updates the focal length by changing hfov
Definition: Panorama.cpp:227