00001
00024 #ifndef _PANORAMAMEMENTO_H
00025 #define _PANORAMAMEMENTO_H
00026
00027 #include <hugin_shared.h>
00028
00029 #include <string>
00030 #include <vector>
00031
00032 #include <vigra_ext/Interpolators.h>
00033
00034
00035 namespace HuginBase {
00036
00038 class IMPEX ControlPoint
00039 {
00040
00041 public:
00045 enum OptimizeMode {
00046 X_Y = 0,
00047 X,
00048 Y
00049 };
00050
00051
00052 public:
00054 ControlPoint()
00055 : image1Nr(0), image2Nr(0),
00056 x1(0),y1(0),
00057 x2(0),y2(0),
00058 error(0), mode(X_Y)
00059 { };
00060
00062
00063
00065 ControlPoint(unsigned int img1, double sX, double sY,
00066 unsigned int img2, double dX, double dY,
00067 int mode = X_Y)
00068 : image1Nr(img1), image2Nr(img2),
00069 x1(sX),y1(sY),
00070 x2(dX),y2(dY),
00071 error(0), mode(mode)
00072 { };
00073
00075 bool operator==(const ControlPoint & o) const;
00076
00077
00078 public:
00080 const std::string & getModeName(OptimizeMode mode) const;
00081
00087 const std::string getCPString() const;
00088
00090 void mirror();
00091
00092
00093 public:
00095
00096
00098
00099
00100
00101 public:
00102
00103
00104 unsigned int image1Nr;
00105 unsigned int image2Nr;
00106 double x1,y1;
00107 double x2,y2;
00108 double error;
00109 int mode;
00110
00111 #ifndef SWIG
00112
00113 static std::string modeNames[];
00114 #endif
00115 };
00116
00117
00119 typedef std::vector<ControlPoint> CPVector;
00120
00121 typedef std::pair<unsigned int, ControlPoint> CPoint;
00122 typedef std::vector<CPoint> CPointVector;
00123
00124
00125 }
00126 #endif // _PANORAMAMEMENTO_H