shaw@etn-rad.UUCP (Howard Shaw) (07/26/88)
Help!! I have a problem which is a special case of a problem which has no doubt been solved before, but it's new to me, and I sure could use a hand, suggestions, pointers, etc. I have a digitized map, or equivalently, a digitized image of a piece of the earth's surface taken from the vertical, far above it. Let's assume that the earth is flat (at sea-level, no hills, not even earth curvature). I wish to (perspectively) transform the image so that it appears as it would from an arbitrary point in space "nearby". I am given the viewing point (Lat, Long, and Alt, relative to the assumed to be known Lat/Long for some points on the original image), and the viewing angles (degrees clockwise from North, and degrees down from the local horizontal). I believe the mapping from the original image space to the new image space is a bilinear fractional transformation: a*x + b*y + c f*x + g*y + h X = ------------- Y = -------------- d*x + e*y + 1 d*x + e*y + 1 Any known easy way to get the coefficients a,b,...? Even if I could only get four (x,y) <-> (X,Y) pairs, I could get the coefficients by curve-fitting. Any help would be greatly appreciated. -HS
jbm@eos.UUCP (Jeffrey Mulligan) (07/27/88)
From article <559@etn-rad.UUCP>, by shaw@etn-rad.UUCP (Howard Shaw): < I believe the mapping from the original image space to the new image < space is a bilinear fractional transformation: < < a*x + b*y + c f*x + g*y + h < X = ------------- Y = -------------- < d*x + e*y + 1 d*x + e*y + 1 < < Any known easy way to get the coefficients a,b,...? Even if I could < only get four (x,y) <-> (X,Y) pairs, I could get the coefficients by < curve-fitting. Any help would be greatly appreciated. -HS If you have four points, the transformation is determined; 8 equations, 8 unknowns. Set up an 8 by 8 matrix which operates on the vector of coefficients, then invert this matrix. I have written program which does this, but it doesn't handle special cases very nicely right now. -- Jeff Mulligan (jbm@aurora.arc.nasa.gov) NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035 (415) 694-6290
shaw@etn-rad.UUCP (Howard Shaw) (07/28/88)
In article <1161@eos.UUCP> jbm@eos.UUCP (Jeffrey Mulligan) writes: >From article <559@etn-rad.UUCP>, by shaw@etn-rad.UUCP (Howard Shaw): > >< I believe the mapping from the original image space to the new image >< space is a bilinear fractional transformation: >< >< a*x + b*y + c f*x + g*y + h >< X = ------------- Y = -------------- >< d*x + e*y + 1 d*x + e*y + 1 >< >< Any known easy way to get the coefficients a,b,...? Even if I could >< only get four (x,y) <-> (X,Y) pairs, I could get the coefficients by >< curve-fitting. Any help would be greatly appreciated. -HS > >If you have four points, the transformation is determined; 8 equations, >8 unknowns. Set up an 8 by 8 matrix which operates on the vector >of coefficients, then invert this matrix. I have written program >which does this, but it doesn't handle special cases very nicely >right now. > >-- > > Jeff Mulligan (jbm@aurora.arc.nasa.gov) > NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035 > (415) 694-6290 Thanks for the help, but let me quote from the original posting: " I am given the viewing point (Lat, Long, and Alt, relative to the assumed to be known Lat/Long for some points on the original image), and the viewing angles (degrees clockwise from North, and degrees down from the local horizontal)." That is, I know how to solve the problem, given four (x,y) <-> (X,Y) pairs. However, what do I do, if given, instead, the viewing point and viewing angles? Sorry if my original posting was unclear. -HS