Link Copied
This is the fastest and least accurate interpolation mode. The pixel value in the destination image is set to the value of the source image pixel closest to the point
(x_{S},y_{S}):D(x_{D},y_{D}) = S(round(x_{S}), round(y_{S})).
The linear interpolation is slower but more accurate than the nearest neighbor interpolation. On the other hand, it is faster but less accurate than cubic interpolation. The linear interpolation algorithm uses source image intensities at the four pixels (x_{S0}, y_{S0}), (x_{S1}, y_{S0}), (x_{S0}, y_{S1}), (x_{S1}, y_{S1}) that are closest to (x_{S}, y_{S}) in the source image:
x_{S0} = int(x_{S}), x_{S1} = x_{S0} + 1, y_{S0} = int(y_{S}), y_{S1} = y_{S0} + 1.
First, the intensity values are interpolated along the xaxis to produce two intermediate results I_{0} and I_{1} (see FigureLinear Interpolation):
I_{0} = S(x_{S}, y_{S0}) = S(x_{S0}, y_{S0})*(x_{S1}  x_{S}) + S(x_{S1}, y_{S0})*(x_{S}  x_{S0})
I_{1} = S(x_{S}, y_{S1}) = S(x_{S0}, y_{S1})*(x_{S1}  x_{S}) + S(x_{S1}, y_{S1})*(x_{S}  x_{S0}).
Then, the soughtfor intensity D(x_{D}, y_{D}) is computed by interpolating the intermediate values I_{0} and I_{1} along the yaxis:
D(x_{D}, y_{D}) = I_{0}*(y_{S1}  y_{S}) + I_{1}*(y_{S}  y_{S0}).
To use the linear interpolation, set the parameter interpolation to IPPI_INTER_LINEAR. For images with 8bit unsigned color channels, the functions ippiWarpAffine, ippiRotate, and ippiShear compute the coordinates (x_{S}, y_{S}) with the accuracy 2^{16} = 1/65536. For images with 16bit unsigned color channels, these functions compute the coordinates with floatingpoint precision.
Partition of interpolation interval [a, b] , where
 {x_{i}}_{i=1,...,n}, where a = x_{1} < x_{2}<... <x_{n} = b 
Vectorvalued function of dimension p being fit  (x) = (_{1}(x),..., _{p}(x)) 
Piecewise polynomial (PP) function of order k+1  (x) P_{i} (x), if x [ x_{i}, x_{i+1}), i = 1,..., n1 where

Function p agrees with function g at the points {x_{i}}_{i=1,...,n} .  For every point in sequence {x_{i}}_{i=1,...,n} that occurs m times, the equality p^{(i1)}() = g^{(i1)}() holds for all i = 1,...,m, where p^{(i)}(t) is the derivative of the ith order. 
The kth divided difference of function g at points x_{i},..., x_{i + k}. This difference is the leading coefficient of the polynomial of order k+1 that agrees with g at x_{i},..., x_{i + k}.  [ x_{i},..., x_{i + k}] g In particular,

A korder derivative of interpolant (x) at interpolation site . 
For more complete information about compiler optimizations, see our Optimization Notice.