How do you feel with a system of linear equations?
(Come te la cavi con i sistemi di equazioni lineari?)
This is the system that needs to be solved:
x' = m11*x + m21*y + m31
y' = m22*y + m12*x + m32
What we need is to find m11,m12,m21,m22:
m11 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
m12 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
m21 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
m22 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
m31 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
m32 = f(x1,y2,x2,y2,x3,y3,x1',y1',x2',y2',x3',y3')
Where x1,x2,x3,y1,y2,y3 are expressed in non-calibrated map reference and
x1',x2',x3',y1',y2',y3' are transformed in WGS84.
(dove x1,x2,x3,y1,y2,y3 sono le coordinate di tre punti della mappa non
calibrata e x1', x2',x3',y1',y2',y3' sono le coordinate dei tre punti
trasformati in WGS84)
Also, this other part should be solved in the same way, to support
rotation:
(E, anche, sarebbe perfetto avere pure questa parte, la correzione per la
rotazione:)
if (is not affine) {
w' = m13*x + m23*y + m33
x' /= w'
y' /= w'
}
So here again i need:
m13 = ?
m23 = ?
m33 = ?
(using more than 3 points, off course)
The current solutions are not working correctly under all circumstances,
so i need to confront and fix them.
(Le soluzioni che ho adesso evidentemente hanno qualche errore, se potessi
confrontarle con quelle ricavate da qualcun'altro sarebbe ottimo!)
Check
http://doc.qt.nokia.com/4.6.2/qtransform.html#basic-matrix-operations under
"basic matrix operations" for full reference.
--
---
Willy Gardiol
wi...@gardiol.org