Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StraightenPanorama.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
26 #ifndef _BASICALGORITHMS_STRAIGHTENPANORAMA_H
27 #define _BASICALGORITHMS_STRAIGHTENPANORAMA_H
28 
29 #include <hugin_shared.h>
31 
32 
33 namespace HuginBase {
34 
35 
37 {
38 
39  public:
41  explicit StraightenPanorama(PanoramaData& panorama)
42  : RotatePanorama(panorama, Matrix3())
43  {};
44 
46  virtual ~StraightenPanorama() {};
47 
48 
49  public:
51  static Matrix3 calcStraighteningRotation(const PanoramaData& panorama);
52 
53  public:
55  virtual bool runAlgorithm()
56  {
57  for(unsigned int i=0;i<o_panorama.getNrOfImages();i++)
58  {
59  const SrcPanoImage & img=o_panorama.getImage(i);
60  //if translation parameters are non-zero, straighten does not work in current form
61  //TODO: fix straighten with non-zero translation parameters
62  if(img.getX()!=0 || img.getY()!=0 || img.getZ()!=0)
63  return true;
64  };
65  o_transformMat = calcStraighteningRotation(o_panorama);
67 
68  return true; // let's hope so.
69  }
70 };
71 
72 
73 }
74 #endif //_H
StraightenPanorama(PanoramaData &panorama)
general : Matrix3 is a class for handling 3x3 Matrix manipulation.
Definition: Matrix3.h:37
virtual bool runAlgorithm()
implementation of the algorithm.
Model for a panorama.
Definition: PanoramaData.h:81
#define IMPEX
Definition: hugin_shared.h:39
virtual bool runAlgorithm()
implementation of the algorithm.
All variables of a source image.
Definition: SrcPanoImage.h:194