Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bilinear interpolation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Weighted mean === [[File:Bilinear interpolation visualisation.svg|thumb|upright|A geometric visualisation of bilinear interpolation. The product of the value at the desired point (black) and the entire area is equal to the sum of the products of the value at each corner and the partial area diagonally opposite the corner (corresponding colours).]] The solution can also be written as a [[Weighted Mean|weighted mean]] of the ''f''(''Q''): :<math>f(x, y) \approx w_{11} f(Q_{11}) + w_{12} f(Q_{12}) + w_{21} f(Q_{21}) + w_{22} f(Q_{22}),</math> where the weights sum to 1 and satisfy the transposed linear system :<math> \begin{bmatrix} 1 & 1 & 1 & 1 \\ x_1 & x_1 & x_2 & x_2 \\ y_1 & y_2 & y_1 & y_2 \\ x_1y_1 & x_1y_2 & x_2y_1 & x_2y_2 \end{bmatrix} \begin{bmatrix} w_{11} \\ w_{12} \\ w_{21} \\ w_{22} \end{bmatrix} = \begin{bmatrix} 1 \\ x \\ y \\ xy \end{bmatrix}, </math> yielding the result :<math>\begin{align} \begin{bmatrix} w_{11}\\w_{21}\\w_{12}\\w_{22} \end{bmatrix} = \frac{1}{(x_2-x_1)(y_2-y_1)}\begin{bmatrix} x_2y_2 & -y_2 & -x_2 & 1 \\ -x_2y_1 & y_1 & x_2 & -1 \\ -x_1y_2 & y_2 & x_1 & -1 \\ x_1y_1 & -y_1 & -x_1 & 1 \end{bmatrix}\begin{bmatrix} 1\\x\\y\\xy \end{bmatrix}, \end{align}</math> which simplifies to :<math>\begin{align} w_{11} &= \frac{(x_2 - x )(y_2 - y )}{(x_2 - x_1)(y_2 - y_1)}, \\ w_{12} &= \frac{(x_2 - x )(y - y_1)}{(x_2 - x_1)(y_2 - y_1)}, \\ w_{21} &= \frac{(x - x_1)(y_2 - y )}{(x_2 - x_1)(y_2 - y_1)}, \\ w_{22} &= \frac{(x - x_1)(y - y_1)}{(x_2 - x_1)(y_2 - y_1)}, \end{align}</math> in agreement with the result obtained by repeated linear interpolation. The set of weights can also be interpreted as a set of [[generalized barycentric coordinates]] for a rectangle.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)