2

I came across a couple of equations to transform straight grid lines to a curved grid.

The equations:

$$ x=X(x',y')=\sum_{i=0}^{d}\sum_{j=0}^{d-i} u_{i,j}b_{j}(y')b_{i}(x')$$

$$y=Y(x',y')=\sum_{i=0}^{d}\sum_{j=0}^{d-i} v_{i,j}b_{j}(y')b_{i}(x')$$

where, x', y' -> straight grid line coordinates, x,y -> curved grid coordinates, b(subscript k) are univariate base functions and k=0,..d. u&v are coefficients.

After choosing appropriate forms of the function b, the equations look like:

$$x=X(x',y')=\sum_{i=0}^{d}\sum_{j=0}^{d-i} u_{i,j}y'^{j}x'^{i}$$

My problem is I cannot read these equations. Why are these particular polynomial structures chosen? I could not understand how these forms of b would help in approximating the straight lines to curves in an easier way.

Please provide me with an explanation to the above equations and/or any reference which would help me in understanding this concept. Please ask if any further detail is required.

Ijjz
  • 21
  • These formulas do not describe a general change of coordinates, so without further context, it's unfortunately impossible to give a meaningful answer. Could you please add something about the problem/situation where these formulas arise, and perhaps what is the source? Are these polynomial approximations in a smooth setting, for example? – Andrew D. Hwang Dec 27 '16 at 17:08
  • The $u_{i,j}$ and $v_{i,j}$ just look like coefficients of some polynomial. You say you "came across" these; why not tell us where (book, webpage, etc.) you saw them first? – J. M. ain't a mathematician Dec 27 '16 at 17:09
  • 1
    Sorry for not stating the problem clearly. These equations appear in my course slides, Image Processing for Diagnostic Applications. The curvature of the photocathode in X-Ray machines causes image distortion. In order to calibrate the system we use known patterns of both distorted and the desired output and try to compute the parameters u and v by solving the equation X=Mu, where the distorted image pixels form the vector X, M being the undistorted pixel matrix and u being the parameter vector. This is done for v as well. The image patterns look like a grid with lines and a grid with curves. – Ijjz Dec 27 '16 at 17:53
  • @AndrewD.Hwang . I hope the above explanation would give some insight into the actual problem. – Ijjz Dec 28 '16 at 19:00
  • @J. M. , Any suggestions? – Ijjz Dec 28 '16 at 19:01

1 Answers1

1

Possibly not an answer, but certainly too long for a comment.

If I understand the notation, your "true" image is modeled by the coordinate system $(x', y')$ and the image is captured in the coordinate system $(x, y)$, but the captured image is distorted by the apparatus. The distortion is modeled by a mapping $$ (x, y) = (X(x', y'), Y(x', y')). \tag{*} $$

The practical goal is to "undistort" the measured data/pixels into the "true" image. Mathematically, you want to (approximately) solve for $(x', y')$ as functions of $(x, y)$, namely to (approximately) invert the mapping (*). (Applying the resulting transformation to measured data (approximately) undoes the distortion of the X-ray machine.)

Be that as it may, it's reasonable to assume the functions $(X, Y)$ are smooth (infinitely differentiable). Consequently, they can be approximated to arbitrary accuracy with polynomials, such as Taylor polynomials. That's my best guess of the rationale for assuming \begin{align*} x &= \sum_{i=0}^{d} \sum_{j=0}^{d-i} u_{i,j}(y')^{j} (x')^{i} = \sum_{k=0}^{d} \sum_{j=0}^{k} u_{k-j,j}(x')^{k-j} (y')^{j}, \\ y &= \sum_{i=0}^{d} \sum_{j=0}^{d-i} v_{i,j}(y')^{j} (x')^{i} = \sum_{k=0}^{d} \sum_{j=0}^{k} v_{k-j,j}(x')^{k-j} (y')^{j}. \end{align*} The right-hand expressions are more common mathematical notation, in which the inner sum groups terms of fixed degree $k$.

Here's what this looks like concretely for $d = 3$, with successive lines showing the constant, linear, quadratic, and cubic terms: \begin{align*} x &= u_{0,0} && \sum_{j=0}^{0} u_{0,j} (x')^{0} (y')^{j} && (d = 0) \\ &\quad+ u_{1,0} (x') + u_{0,1} (y') && \sum_{j=0}^{1} u_{1-j,j} (x')^{1-j} (y')^{j} && (d = 1) \\ &\quad+ u_{2,0} (x')^{2} + u_{1,1} (x') (y') + u_{0,2} (y')^{2} && \sum_{j=0}^{2} u_{2-j,j} (x')^{2-j} (y')^{j} && (d = 2) \\ &\quad+ u_{3,0} (x')^{3} + u_{2,1} (x')^{2} (y') + u_{1,2} (x') (y')^{2} + u_{0,3} (y')^{3}. && \sum_{j=0}^{3} u_{3-j,j} (x')^{3-j} (y')^{j} && (d = 3) \end{align*}


In general, the constant term $(u_{0,0}, v_{0,0})$ is "image drift", a constant vector by which the output is shifted.

The linear terms are presumably close to $u_{1,0} \approx v_{0, 1} \approx 1$, $u_{0, 1} \approx v_{1, 0} \approx 0$; that is, $(x, y) \approx (x', y')$ after drift correction.

The higher-order coefficients are presumably of small absolute value (i.e., the distortion is not "highly non-linear").