Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Finding a grid from intersections
Replies: 6   Last Post: Jan 15, 2013 3:40 PM

 Messages: [ Previous | Next ]
 Roger Stafford Posts: 5,929 Registered: 12/7/04
Re: Finding a grid from intersections
Posted: Jan 13, 2013 9:48 PM

"Chenge Qu" wrote in message <kcvq0u\$8ie\$1@newscl01ah.mathworks.com>...
> I'd like to extract a grid from the (approximate) location of a few intersections (say, ~5 intersections for a 10x10 grid). The grid spacing is known, but the grid itself may be skewed, rotated, or both relative to the intersection coordinates I have. In other words, I want to find how the grid is skewed/rotated relative to my coordinates.
- - - - - - - - - -
If I understand you correctly, you have a grid of points that has undergone an affine transformation from some kind of standard grid with orthogonal lines. If you can establish a correspondence between three nonlinear new intersections and three of the original grid, that is sufficient to uniquely determine the transformation.

Just write the equations:

X = a*x+b*y+c
Y = d*x+e*y+f

The coordinates of the new and old intersections give you six linear equations in the six unknown coefficients which is sufficient to solve them unless they are for colinear points. Use matlab's backslash operator to solve them.

Roger Stafford

Date Subject Author
1/13/13 Roger Stafford
1/13/13 Matt J
1/13/13 Roger Stafford
1/15/13 Matt J