Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin_base/algorithms/basic/StraightenPanorama.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00026 #ifndef _BASICALGORITHMS_STRAIGHTENPANORAMA_H 00027 #define _BASICALGORITHMS_STRAIGHTENPANORAMA_H 00028 00029 #include <hugin_shared.h> 00030 #include <algorithms/basic/RotatePanorama.h> 00031 00032 00033 namespace HuginBase { 00034 00035 00036 class IMPEX StraightenPanorama : public RotatePanorama 00037 { 00038 00039 public: 00041 StraightenPanorama(PanoramaData& panorama) 00042 : RotatePanorama(panorama, Matrix3()) 00043 {}; 00044 00046 virtual ~StraightenPanorama() {}; 00047 00048 00049 public: 00051 static Matrix3 calcStraighteningRotation(const PanoramaData& panorama); 00052 00053 public: 00055 virtual bool runAlgorithm() 00056 { 00057 for(unsigned int i=0;i<o_panorama.getNrOfImages();i++) 00058 { 00059 const SrcPanoImage & img=o_panorama.getImage(i); 00060 //if translation parameters are non-zero, straighten does not work in current form 00061 //TODO: fix straighten with non-zero translation parameters 00062 if(img.getX()!=0 || img.getY()!=0 || img.getZ()!=0) 00063 return true; 00064 }; 00065 o_transformMat = calcStraighteningRotation(o_panorama); 00066 RotatePanorama::runAlgorithm(); 00067 00068 return true; // let's hope so. 00069 } 00070 }; 00071 00072 00073 } 00074 #endif //_H
1.3.9.1