30 destP1, destP2, destP3, destP4);
53 NEWMAT::Matrix m(8,8);
55 m << sourceP1.
x << sourceP1.
y << 1.0 << 0.0 << 0.0 << 0.0 << -sourceP1.
x*destP1.
x << -sourceP1.
y*destP1.
x 56 << sourceP2.
x << sourceP2.
y << 1.0 << 0.0 << 0.0 << 0.0 << -sourceP2.
x*destP2.
x << -sourceP2.
y*destP2.
x 57 << sourceP3.
x << sourceP3.
y << 1.0 << 0.0 << 0.0 << 0.0 << -sourceP3.
x*destP3.
x << -sourceP3.
y*destP3.
x 58 << sourceP4.
x << sourceP4.
y << 1.0 << 0.0 << 0.0 << 0.0 << -sourceP4.
x*destP4.
x << -sourceP4.
y*destP4.
x 59 << 0.0 << 0.0 << 0.0 << sourceP1.
x << sourceP1.
y << 1.0 << -sourceP1.
x*destP1.
y << -sourceP1.
y*destP1.
y 60 << 0.0 << 0.0 << 0.0 << sourceP2.
x << sourceP2.
y << 1.0 << -sourceP2.
x*destP2.
y << -sourceP2.
y*destP2.
y 61 << 0.0 << 0.0 << 0.0 << sourceP3.
x << sourceP3.
y << 1.0 << -sourceP3.
x*destP3.
y << -sourceP3.
y*destP3.
y 62 << 0.0 << 0.0 << 0.0 << sourceP4.
x << sourceP4.
y << 1.0 << -sourceP4.
x*destP4.
y << -sourceP4.
y*destP4.
y;
64 NEWMAT::Matrix
A = m.i();
65 NEWMAT::ColumnVector
b(8);
66 b << destP1.
x << destP2.
x << destP3.
x << destP4.
x << destP1.
y << destP2.
y << destP3.
y << destP4.
y;
67 NEWMAT::ColumnVector
y =
A *
b;
85 numerator =
a*source.
x +
b*source.
y +
c;
86 denominator =
g*source.
x +
h*source.
y + 1;
88 dest.
x = numerator/denominator;
91 numerator =
d*source.
x +
e*source.
y +
f;
92 denominator =
g*source.
x +
h*source.
y + 1;
94 dest.
y = numerator/denominator;
void solveCoefficients(const ossimDpt &sourceP1, const ossimDpt &sourceP2, const ossimDpt &sourceP3, const ossimDpt &sourceP4, const ossimDpt &destP1, const ossimDpt &destP2, const ossimDpt &destP3, const ossimDpt &destP4)
void map(const ossimDpt &source, ossimDpt &dest) const