66 const unsigned int tiepointsSize =
static_cast<unsigned int>(params.
m_tiePoints.size());
68 double maxError = 0.0;
69 double currentError = 0.0;
71 for(
unsigned int tpIndex = 0; tpIndex < tiepointsSize; ++tpIndex)
75 if( currentError > maxError )
77 maxError = currentError;
88 const unsigned int tiepointsSize =
static_cast<unsigned int>(params.
m_tiePoints.size());
90 double maxError = 0.0;
92 double currentError = 0.0;
94 for(
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex )
98 if( currentError > maxError )
100 maxError = currentError;
108 const std::vector< GTParameters::TiePoint >& tiePoints,
113 const unsigned int tiepointsSize =
static_cast<unsigned int>(tiePoints.size());
115 if( tiepointsSize == 0 )
121 double error2Sum = 0.0;
123 double currentError = 0.0;
125 for(
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex )
129 error2Sum += ( currentError * currentError );
132 return sqrt( error2Sum / static_cast<double>(tiepointsSize) );
137 const std::vector< GTParameters::TiePoint >& tiePoints,
142 const unsigned int tiepointsSize =
static_cast<unsigned int>(tiePoints.size());
144 if( tiepointsSize == 0 )
150 double error2Sum = 0.0;
151 double currentError = 0.0;
153 for(
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex )
158 error2Sum += ( currentError * currentError );
161 return sqrt( error2Sum / static_cast<double>(tiepointsSize) );
171 directMap( params, tiePoint.first, directMappedPoint );
173 double diffX = tiePoint.second.x - directMappedPoint.
x;
174 double diffY = tiePoint.second.y - directMappedPoint.
y;
176 return hypot( diffX, diffY );
185 inverseMap( params, tiePoint.second, inverseMappedPoint );
187 double diffX = tiePoint.first.x - inverseMappedPoint.
x;
188 double diffY = tiePoint.first.y - inverseMappedPoint.
y;
190 return hypot( diffX, diffY );
std::vector< TiePoint > m_tiePoints
Tie points.
An utility struct for representing 2D coordinates.
std::pair< Coord2D, Coord2D > TiePoint
Tie point type definition.
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
2D Geometric transformation parameters.