Hugin trunk 0.1
Loading...
Searching...
No Matches
ControlPoint.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _CONTROLPOINT_H
25#define _CONTROLPOINT_H
26
27#include <hugin_shared.h>
28
29#include <string>
30#include <vector>
31
33
34
35namespace HuginBase {
36
39{
40
41public:
46 X_Y = 0,
47 X,
48 Y
49 };
50
51
52public:
55 : image1Nr(0), image2Nr(0),
56 x1(0),y1(0),
57 x2(0),y2(0),
58 error(0), mode(X_Y)
59 { };
60
62 ControlPoint(unsigned int img1, double sX, double sY,
63 unsigned int img2, double dX, double dY,
64 int mode = X_Y)
65 : image1Nr(img1), image2Nr(img2),
66 x1(sX),y1(sY),
67 x2(dX),y2(dY),
68 error(0), mode(mode)
69 { };
70
72 bool operator==(const ControlPoint & o) const;
73
74
75public:
76
82 const std::string getCPString() const;
83
85 void mirror();
86
87public:
88 // TODO: accessors
89
90 unsigned int image1Nr;
91 unsigned int image2Nr;
92 double x1,y1;
93 double x2,y2;
94 double error;
95 int mode;
96};
97
99typedef std::vector<ControlPoint> CPVector;
100// pair of global control point number and corrosponding control point
101typedef std::pair<typename CPVector::size_type, ControlPoint> CPoint;
102typedef std::vector<CPoint> CPointVector;
103
104} // namespace
105#endif // _CONTROLPOINT_H
image1Nr
image2Nr
The pano tools interpolators ported to vigra.
represents a control point
ControlPoint(unsigned int img1, double sX, double sY, unsigned int img2, double dX, double dY, int mode=X_Y)
OptimizeMode
minimize x,y or both.
@ X
evaluate x, points are on a vertical line
#define IMPEX
double Y
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
Definition wxcms.cpp:39
std::vector< ControlPoint > CPVector
std::vector< CPoint > CPointVector
std::pair< typename CPVector::size_type, ControlPoint > CPoint
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41