PDA

View Full Version : need help about calibrating scanned maps.



high_flyer
20th July 2006, 17:42
Hi All,

I was wondering if there is anyone here who has experience or links with a good howto about calibrating self scanned maps against a GPS (i.e to show the GPS position read from a GPS receiver on a self scanned map)
I searched google, found some bits of information,but nothing really that explains this in a practical way.
From what I read, it should be enough to be able to mark 3 points on the scanned image, and from it to calculate the pixel/GPS coordinate...
Since I am working on a project (not commercial) with a very tight time schedule, I am looking for libs and code snipets and howtos on the subject.
Oh, if any of you guys also have any experience or good links about how to control a HAM radio antenna rotor that will be cool as well.

Thanks.

jacek
20th July 2006, 19:12
From what I read, it should be enough to be able to mark 3 points on the scanned image, and from it to calculate the pixel/GPS coordinate...
Yes, it should. I'm not a cartographer, but in plain maths it's like this:

You have three points on the map:
.......[x_a1]
A1= [y_a1]
.......[ 1 ]

.......[x_b1]
B1= [y_b1]
.......[ 1 ]

.......[x_c1]
C1= [y_c1]
.......[ 1 ]

three on the scan:
.......[x_a2]
A2= [y_a2]
.......[ 1 ]

.......[x_b2]
B2= [y_b2]
.......[ 1 ]

.......[x_c2]
C2= [y_c2]
.......[ 1 ]

and you want to find a matrix M that transforms A1 to A2, B1 to B2 and C1 to C2. i.e.:
A2 = M * A1
B2 = M * B1
C2 = M * C1

This matrix has such form:
.......[ a, b, c ]
M = [ d, e, f ]
.......[ 0, 0, 1 ]

hence it can express any combination of rotations, scaling and translation.

All you have to do is to solve the equation.

In maxima you can do it like this:

solve( [x_a2 = a * x_a1 + b * y_a1 + c,
y_a2 = d * x_a1 + e * y_a1 + f,
x_b2 = a * x_b1 + b * y_b1 + c,
y_b2 = d * x_b1 + e * y_b1 + f,
x_c2 = a * x_c1 + b * y_c1 + c,
y_c2 = d * x_c1 + e * y_c1 + f],[a,b,c,d,e,f]);

Uwe
21st July 2006, 08:38
Have a look at http://www.terralib.org.

Here you find different types of projections,

Uwe

high_flyer
21st July 2006, 14:51
Thanks both of you, I'll look it up.

high_flyer
26th July 2006, 19:27
If anyone needs this in the future I found this:
http://digitizer.sourceforge.net/