<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Angular_defect</id>
	<title>Angular defect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Angular_defect"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;action=history"/>
	<updated>2026-05-11T03:30:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0-wmf.28</generator>
	<entry>
		<id>https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;diff=293126&amp;oldid=prev</id>
		<title>en&gt;Magioladitis: Removing invisible Unicode character/ Replacing hard spaces  See WP:CHECKWIKI error #16 fix + other fixes, replaced: → using AWB (10331)</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;diff=293126&amp;oldid=prev"/>
		<updated>2014-07-26T17:43:23Z</updated>

		<summary type="html">&lt;p&gt;Removing invisible Unicode character/ Replacing &lt;a href=&quot;/index.php?title=Hard_space&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Hard space (page does not exist)&quot;&gt;hard spaces&lt;/a&gt;  See &lt;a href=&quot;/index.php?title=WP:CHECKWIKI&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:CHECKWIKI (page does not exist)&quot;&gt;WP:CHECKWIKI&lt;/a&gt; error #16 fix + other fixes, replaced: → using &lt;a href=&quot;/index.php?title=Testwiki:AWB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Testwiki:AWB (page does not exist)&quot;&gt;AWB&lt;/a&gt; (10331)&lt;/p&gt;
&lt;a href=&quot;https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;amp;diff=293126&amp;amp;oldid=6132&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>en&gt;Magioladitis</name></author>
	</entry>
	<entry>
		<id>https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;diff=6132&amp;oldid=prev</id>
		<title>en&gt;Entropeter: /* Defect of a vertex */ added link</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Angular_defect&amp;diff=6132&amp;oldid=prev"/>
		<updated>2013-06-03T07:51:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Defect of a vertex: &lt;/span&gt; added link&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:Bilinear interpolation.png|right|thumb|The four red dots show the data points and the green dot is the point at which we want to interpolate.]]&lt;br /&gt;
[[Image:Bilininterp.png|right|thumb|Example of bilinear interpolation on the unit square with the z-values 0, 1, 1 and 0.5 as indicated. Interpolated values in between represented by color.]]&lt;br /&gt;
In [[mathematics]], &amp;#039;&amp;#039;&amp;#039;bilinear interpolation&amp;#039;&amp;#039;&amp;#039; is an extension of [[linear interpolation]] for [[interpolation|interpolating]] functions of two variables (e.g., &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;) on a [[regular grid|regular 2D grid]].&lt;br /&gt;
&lt;br /&gt;
The key idea is to perform linear interpolation first in one direction, and then again in the other direction. Although each step is linear in the sampled values and in the position, the interpolation as a whole is not linear but rather quadratic in the sample location (details below).&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
&lt;br /&gt;
Suppose that we want to find the value of the unknown function &amp;#039;&amp;#039;f&amp;#039;&amp;#039; at the point &amp;#039;&amp;#039;P&amp;#039;&amp;#039; = (&amp;#039;&amp;#039;x&amp;#039;&amp;#039;, &amp;#039;&amp;#039;y&amp;#039;&amp;#039;). It is assumed that we know the value of &amp;#039;&amp;#039;f&amp;#039;&amp;#039; at the four points &amp;#039;&amp;#039;Q&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;11&amp;lt;/sub&amp;gt; = (&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,&amp;amp;nbsp;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;), &amp;#039;&amp;#039;Q&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt; = (&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,&amp;amp;nbsp;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;), &amp;#039;&amp;#039;Q&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;21&amp;lt;/sub&amp;gt; = (&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,&amp;amp;nbsp;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;), and &amp;#039;&amp;#039;Q&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;22&amp;lt;/sub&amp;gt; = (&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,&amp;amp;nbsp;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
We first do linear interpolation in the &amp;#039;&amp;#039;x&amp;#039;&amp;#039;-direction. This yields&lt;br /&gt;
:&amp;lt;math&amp;gt; f(R_1) \approx \frac{x_2-x}{x_2-x_1} f(Q_{11}) + \frac{x-x_1}{x_2-x_1} f(Q_{21})&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;R_1 = (x,y_1)&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt; f(R_2) \approx \frac{x_2-x}{x_2-x_1} f(Q_{12}) + \frac{x-x_1}{x_2-x_1} f(Q_{22})&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;R_2 = (x,y_2). &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We proceed by interpolating in the &amp;#039;&amp;#039;y&amp;#039;&amp;#039;-direction. &lt;br /&gt;
:&amp;lt;math&amp;gt; f(P) \approx \frac{y_2-y}{y_2-y_1} f(R_1) + \frac{y-y_1}{y_2-y_1} f(R_2). &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gives us the desired estimate of &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;, &amp;#039;&amp;#039;y&amp;#039;&amp;#039;).&lt;br /&gt;
:&amp;lt;math&amp;gt; &lt;br /&gt;
\begin{align}&lt;br /&gt;
f(x,y) \approx &amp;amp; \, \frac{f(Q_{11})}{(x_2-x_1)(y_2-y_1)} (x_2-x)(y_2-y) \, + \\&lt;br /&gt;
               &amp;amp; \, \frac{f(Q_{21})}{(x_2-x_1)(y_2-y_1)} (x-x_1)(y_2-y) \, + \\&lt;br /&gt;
               &amp;amp; \, \frac{f(Q_{12})}{(x_2-x_1)(y_2-y_1)} (x_2-x)(y-y_1) \, + \\&lt;br /&gt;
               &amp;amp; \, \frac{f(Q_{22})}{(x_2-x_1)(y_2-y_1)} (x-x_1)(y-y_1) \\&lt;br /&gt;
             = &amp;amp; \, \frac{1}{(x_2-x_1)(y_2-y_1)} \Big(   f(Q_{11})(x_2-x)(y_2-y) \, + \\&lt;br /&gt;
               &amp;amp; \, \qquad \qquad \qquad \qquad \; \;    f(Q_{21})(x-x_1)(y_2-y) \, + \\&lt;br /&gt;
               &amp;amp; \, \qquad \qquad \qquad \qquad \; \;    f(Q_{12})(x_2-x)(y-y_1) \, + \\&lt;br /&gt;
               &amp;amp; \, \qquad \qquad \qquad \qquad \; \;    f(Q_{22})(x-x_1)(y-y_1) \quad \Big)&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we will arrive at the same result if the interpolation is done first along the &amp;#039;&amp;#039;y&amp;#039;&amp;#039;-direction and then along the &amp;#039;&amp;#039;x&amp;#039;&amp;#039;-direction.&lt;br /&gt;
===Unit Square===&lt;br /&gt;
&lt;br /&gt;
If we choose a coordinate system in which the four points where &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is known are (0,&amp;amp;nbsp;0), (0,&amp;amp;nbsp;1),  (1,&amp;amp;nbsp;0), and (1,&amp;amp;nbsp;1), then the interpolation formula simplifies to &lt;br /&gt;
:&amp;lt;math&amp;gt; f(x,y) \approx f(0,0) \, (1-x)(1-y) + f(1,0) \, x(1-y) + f(0,1) \, (1-x)y + f(1,1) xy. &amp;lt;/math&amp;gt;&lt;br /&gt;
Or equivalently, in matrix operations:&lt;br /&gt;
:&amp;lt;math&amp;gt; f(x,y) \approx \begin{bmatrix}&lt;br /&gt;
1-x &amp;amp; x \end{bmatrix} \begin{bmatrix}&lt;br /&gt;
f(0,0) &amp;amp; f(0,1) \\&lt;br /&gt;
f(1,0) &amp;amp; f(1,1) \end{bmatrix} \begin{bmatrix}&lt;br /&gt;
1-y \\&lt;br /&gt;
y \end{bmatrix}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nonlinear===&lt;br /&gt;
&lt;br /&gt;
Contrary to what the name suggests, the bilinear interpolant is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; linear; nor is it the product of two [[linear functions]].&lt;br /&gt;
&lt;br /&gt;
Alternatively, the interpolant can be written as&lt;br /&gt;
:&amp;lt;math&amp;gt; b_1 + b_2 x + b_3 y + b_4 x y \, &amp;lt;/math&amp;gt;&lt;br /&gt;
where &lt;br /&gt;
:&amp;lt;math&amp;gt; b_1 = f(0,0) \,&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt; b_2 = f(1,0)-f(0,0) \,&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt; b_3 = f(0,1)-f(0,0) \,&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt; b_4 = f(0,0)-f(1,0)-f(0,1)+f(1,1). \,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:bilinear_interpolation_visualisation.svg|thumb|right|In this geometric visualisation, the value at the black spot is the sum of the value at each coloured spot multiplied by the area of the rectangle of the same colour, divided by the total area of all four rectangles.]]&lt;br /&gt;
&lt;br /&gt;
In both cases, the number of constants (four) correspond to the number of data points where &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is given. The interpolant is linear along lines [[Parallel (geometry)|parallel]] to either the &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; or the &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; direction, equivalently if &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; is set constant. Along any other straight line, the interpolant is [[Quadratic function|quadratic]].  However, even if the interpolation is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; linear in the position (&amp;#039;&amp;#039;x&amp;#039;&amp;#039; and &amp;#039;&amp;#039;y&amp;#039;&amp;#039;), it &amp;#039;&amp;#039;is&amp;#039;&amp;#039; linear in the amplitude, as it is apparent from the equations above: all the coefficient &amp;#039;&amp;#039;bj, j=1..4&amp;#039;&amp;#039;, are proportional to the value of the function &amp;#039;&amp;#039;f(,)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The result of bilinear interpolation is independent of which axis is interpolated first and which second. If we had first performed the linear interpolation in the &amp;#039;&amp;#039;y&amp;#039;&amp;#039;-direction and then in the &amp;#039;&amp;#039;x&amp;#039;&amp;#039;-direction, the resulting approximation would be the same.&lt;br /&gt;
&lt;br /&gt;
The obvious extension of bilinear interpolation to three dimensions is called [[trilinear interpolation]].&lt;br /&gt;
&lt;br /&gt;
== Application in image processing ==&lt;br /&gt;
In [[computer vision]] and [[image processing]], bilinear interpolation is one of the basic [[resampling]] techniques.&lt;br /&gt;
&lt;br /&gt;
In [[texture mapping]], it is also known as [[bilinear filtering]] or &amp;#039;&amp;#039;bilinear texture mapping&amp;#039;&amp;#039;, and it can be used to produce a reasonably realistic image. An algorithm is used to map a screen pixel location to a corresponding point on the texture map. A weighted average of the attributes (color, alpha, etc.) of the four surrounding texels is computed and applied to the screen pixel. This process is repeated for each pixel forming the object being textured.&amp;lt;ref&amp;gt;[http://www.pcmag.com/encyclopedia_term/0,2542,t=bilinear+interpolation&amp;amp;i=38607,00.asp Bilinear interpolation definition at www.pcmag.com]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When an image needs to be scaled up, each pixel of the original image needs to be moved in a certain direction based on the scale constant. However, when scaling up an image by a non-integral scale factor, there are pixels (i.e., &amp;#039;&amp;#039;holes&amp;#039;&amp;#039;) that are not assigned appropriate pixel values. In this case, those &amp;#039;&amp;#039;holes&amp;#039;&amp;#039; should be assigned appropriate [[RGB]] or [[grayscale]] values so that the output image does not have non-valued pixels.&lt;br /&gt;
&lt;br /&gt;
Bilinear interpolation can be used where perfect image transformation with pixel matching is impossible, so that one can calculate and assign appropriate intensity values to pixels. Unlike other interpolation techniques such as [[nearest neighbor interpolation]] and [[bicubic interpolation]], bilinear interpolation uses only the 4 nearest pixel values which are located in diagonal directions from a given pixel in order to find the appropriate color intensity values of that pixel.&lt;br /&gt;
&lt;br /&gt;
Bilinear interpolation considers the closest 2x2 neighborhood of known pixel values surrounding the unknown pixel&amp;#039;s computed location. It then takes a weighted average of these 4 pixels to arrive at its final, interpolated value. The weight on each of the 4 pixel values is based on the computed pixel&amp;#039;s distance (in 2D space) from each of the known points.&amp;lt;ref&amp;gt;[http://www.cambridgeincolour.com/tutorials/image-interpolation.htm &amp;quot;Digital Image Interpolation&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Bilin3.png|thumb|right|alt=Bilinear interpolation|Example of bilinear interpolation in grayscale values.]]&lt;br /&gt;
&lt;br /&gt;
As seen in the example on the right, the intensity value at the pixel computed to be at row 20.2, column 14.5 can be calculated by first linearly interpolating between the values at column 14 and 15 on each rows 20 and 21, giving&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llll}&lt;br /&gt;
I_{20, 14.5} &amp;amp; = \tfrac{15 - 14.5}{15 - 14} \cdot 91  \, &amp;amp; + \; \tfrac{14.5 - 14}{15 - 14} \cdot 210 \, &amp;amp; = 150.5 \\&lt;br /&gt;
I_{21, 14.5} &amp;amp; = \tfrac{15 - 14.5}{15 - 14} \cdot 162 \, &amp;amp; + \; \tfrac{14.5 - 14}{15 - 14} \cdot 95  \, &amp;amp; = 128.5&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and then interpolating linearly between these values, giving&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;I_{20.2, 14.5} = \tfrac{21 - 20.2}{21 - 20} \cdot 150.5 + \tfrac{20.2 - 20}{21 - 20} \cdot 128.5 = 146.1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This algorithm reduces some of the visual distortion caused by resizing an image to a non-integral zoom factor, as opposed to nearest neighbor interpolation, which will make some pixels appear larger than others in the resized image. Bilinear interpolation tends, however, to produce a greater number of interpolation artifacts (such as [[aliasing]], blurring, and edge halos) than more computationally demanding techniques such as bicubic interpolation.&amp;lt;ref&amp;gt;[http://www.optoiq.com/index/machine-vision-imaging-processing/display/vsd-article-display/308929/articles/vision-systems-design/volume-12/issue-10/departments/wilsons-websites/understanding-image-interpolation-techniques.html &amp;quot;Understanding image-interpolation techniques&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Bicubic interpolation]]&lt;br /&gt;
*[[Trilinear interpolation]]&lt;br /&gt;
*[[Spline interpolation]]&lt;br /&gt;
*[[Lanczos resampling]]&lt;br /&gt;
*[[Stairstep interpolation]]&lt;br /&gt;
*[[Barycentric coordinate system (mathematics)|Barycentric coordinates - for interpolating within a triangle or tetrahedron]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Multivariate interpolation]]&lt;/div&gt;</summary>
		<author><name>en&gt;Entropeter</name></author>
	</entry>
</feed>