Friday, June 17, 2011

2D Interpolation

To obtain the position of the Sun from an image we only have its pixel coordinates to work with and those of other points in the image. The grid coordinates of the corners of a 1 inch square which contains the Sun are known and their pixel coordinates are easily obtained. For a small section of the image we can use a simpler equation since the curvature of the lines can be ignored. This is analogous to using the method used in projective drawings. The situation is as follows. We want to find the coordinates, (λ,μ), of the point, x.


The values of λ or μ change by one unit as move from the end of one side to the other. We can draw a line through the point from one side to the other where λ has the same value and similarly for μ. The pixel coordinates corners can be represented by a set of column vectors, x_k, and the ends of horizontal line through x are ξ_1 and ξ_2. Any point on the line between these endpoints can be represented by a linear function of λ. Likewise for any point on the vertical line through x as a function of μ.


Both equations result in the same function of x in terms of λ and μ since the vector difference for the λμ term is the same in each case. This equation can be solved by a simple predictor-corrector method for λ and μ. The last term is a small correction so by ignoring it we can obtain a first estimate for λ and μ. Replacing λ and μ by λ + Δλ and μ + Δμ respectively we get the corrections which satisfies the original equations.


The terms of the matrix above those of the two column vectors indicated and so consists of four separate terms. The use of vectors was intended to simplify the notation. Adding the corrections to the estimates gives improved estimates of the grid coordinates of the point. Only one iteration was used to convert the pixel coordinates to the grid coordinates.

No comments:

Post a Comment