# Image Magnification Based on Bicubic Approximation with Edge as Constraint
## 2 Basic Idea and Description of the Method  
For a given image \(P\), composed of \(n\times n\) pixels \(P_{i,j},i,j=1,2,3\cdots,n\) (shown by black dots in Figure 1), it is obtained by sampling from an original scene [17; 18] according to the image generation principle. These pixels \(P_{i,j},i,j=1,2,3\cdots,n\) can be regarded as the points \((x,y,P)\) in a 3D coordinate system with coordinates \((i,j,P_{i,j})\). For the convenience of the following description, the points \((i,j,P_{i,j})\), \(i,j=1,2,3\cdots,n\) are regarded as being sampled from a surface \(P(x,y)\); then, the sampling formula \(P_{s}(x,y)\) of \(P(x,y)\) can be written as follows:  
\[P_{s}(x,y)=\frac{1}{4h^{2}}\int_{x-h}^{x+h}\int_{y-h}^{y+h}P(x,y)dydx. \tag{1}\]  
where \(2h\) is the side length of the sampling square area. Without loss of generality, the side length of the sampling square region of a given pixel \(P_{i,j}\) can be taken as 1, so h = 0.5. Then, there is  
\[P_{i,j}=P_{s}(i,j)=\int_{i-0.5}^{i+0.5}\int_{j-0.5}^{j+0.5}P(x,y)dydx. \tag{2}\]  
The essence of image magnification is that more points on the surface \(P(x,y)\) are obtained. If the surface \(P(x,y)\) can be reconstructed, the image magnification becomes a problem of calculating the point on the surface \(P(x,y)\). Because of the complexity of the scene and sampling mechanism, it is impossible to reconstruct \(P(x,y)\) accurately. Therefore, only an approximating surface representing \(P(x,y)\) can be constructed. That is, the approximating surface is inevitably subject to errors or noise. Because the original scene is usually complex, the corresponding surface \(P(x,y)\) is complex. Construction of a whole polynomial surface to fit \(P(x,y)\) will not only produce large errors but also generate a large amount of calculation. According to approximation theory, if any given complex function is piecewise continuous and differentiable, it can be approximated with arbitrary precision by piecewise surfaces. Therefore, we construct a sampling patch in a small neighborhood of each pixel, and all patches are weighted to form a whole approximation surface \(F(x,y)\). \(F(x,y)\) approximates the sampling surface \(P_{s}(x,y)\) of \(P(x,y)\). Because polynomials has a good mathematical basis, is simple, and is easy to calculate, the polynomial function is widely used in numerical fitting. This paper uses polynomial surfaces to construct surface patches. Based on the above discussion, the process of image magnification in this paper can be described as the following three parts:  
(a) For each pixel \(P_{i,j},i,j=1,2,3\cdots,n\), its coordinate in 3D coordinate system is \((i,j,P_{i,j})\). In order to simplify the complexity of the problem and to reduce the amount of calculation, the approximate surface patch corresponding to \(P_{i,j}\) is constructed with a quadratic polynomial patch on the small area where the pixel \(P_{i,j}\) is located. Another reason for constructing approximate patches using quadratic polynomials is that, although biquadratic polynomials can be constructed uniquely from \(P_{i,j}\) and the 8 adjacent points, our computation results show that the biquadratic polynomials surface interpolating 9 pixels are often difficult to have the shape represented by the 9 data points. The approximate quadratic polynomial surface patch \(P_{i,j}(x,y)\) of the original scene corresponding to \(P_{i,j}\) can be written as follows:  
\[P_{ij}(x,y)=a_{0}u^{2}+a_{1}uv+a_{2}v^{2}+a_{3}u+a_{4}v+a_{5}. \tag{3}\]  
where \(u=x-i,v=y-j\). \(a_{0},a_{1},a_{2},a_{3},a_{4}\), and \(a_{5}\) are the undetermined coefficients. (b) Note that the sampling surface patch of \(P_{i,j}(x,y)\) on the square area with side length \(2h\) is approximated by a quadratic polynomial patch \(f_{i,j}(x,y),i,j=1,2,3\cdots,n\). The whole sampling  
Figure 1: A \(3\times 3\) neighborhood of pixels. surface \(F(x,y)\) is generated by the weighted average of \(f_{i,j}(x,y)\).