EE368 Final Project
Edge-Adaptive Image Interpolation Techniques
Yu-Che (Eddie) Cheng
Department of Electrical Engineering
Stanford University
chengye@stanford.edu
1. I
NTRODUCTIONImage interpolation estimates the missing pixel values among samples of pixels. This is useful in many applications, such as changing image resolution for display or printing, reducing image size for storage, and reconstructing color images from digital sensors sampled by color filter array.
Classical linear interpolation techniques such as nearest neighbor, bilinear, or bicubic interpolation are simple and hence popular, but they all produce images with various artifacts, especially around edges on the image. Nearest neighbor interpolation produces block artifacts and jagged edges, while bilinear and bicubic interpolations usually blur edges. The results can be improved if we use edge-adaptive interpolation techniques. Since the blurring is due to averaging across edge in linear interpolation, edge-adaptive techniques try to interpolate along edges, not across them. Therefore, they usually produce images with sharper edges.
The structure of the report is as follows. In the next section, I'll present several new and interesting edge-adaptive image interpolation techniques. Their results will be shown and compared in the section 3. Applications of these edge-adaptive interpolation techniques in color filter array (CFA) image recovery will be considered in the section 4. Again, the results will be shown and compared. The report will conclude with the summary of my findings.
¡@
2. I
NTERPOLATION TECHNIQUESSome edge-adaptive interpolation techniques try to explicitly detect the edges on the original image first to generate an edge map and then use it to assist interpolation later. The process is depicted in figure 1. Example of these technique are [Allebach '96] and [Dube '00]. This class of methods involve multiple steps and are usually complicated and computational costly. Another class of edge-adaptive techniques attempts to have edge information built into the algorithms. These techniques do not require explicit detection of edges. Example of these are [Cok '87], [Kimmel '99], [Li '00], and [Muresan '01].

Figure 1. Framework for edge-directed interpolation algorithm
¡@
2.1 [Dube '00]
The method first catches the local characteristics of the image by performing block classification and then applying different filters based on the analysis (refer to figure 1). The steps of the algorithm are as follows:
1. Divide the image in 4 x 4 sliding (overlapping) blocks. Figure 2. shows such a block. A-P are the pixels of the original image, x, y, z are the pixels needed to be interpolated in current block and pixels r and s are previous interpolated pixels.
¡@

Figure 2. Interpolation in 4x4 block
2. Classification and analysis of the block:¡@
3. Interpolation of blocks:
Define the following three filters:
For Smooth block:
For Edge block:
For Texture block:
Same as smooth block but using Cubic2.
¡@
2.2 [Cok '87]
This is a very simple technique adapted from the paper [Cok '87]. The original algorithm is described in the context of color image reconstruction from Bayer CFA. Here I use it as a general image interpolation technique. Given that we want to estimate the pixel at x from its neighboring pixels A, B, C, and D (see figure 3), the idea is just to check for horizontal and vertical edges by computer the difference of the pixel values in the horizontal and vertical direction. If one is significant larger than the other, we assume there is an edge in the direction that has large difference and use the pixels from the other direction to do the bilinear interpolation. If both differences are small, we use all neighboring pixels to do bilinear interpolation. The algorithm is shown below:
¡@
deltaH = |B-D|, deltaV = |A-C|¡@
If (deltaH < Threshold) & (deltaV > Threshold)
x = (B + D) / 2
Else if (deltaH > Threshold) & (deltaV < Threshold)
x = (A + C) / 2
Else
x = (A + B + C + D) / 4

Obviously there is problem with the algorithm that only detects the edges in the vertical and horizontal directions. Improvements on this method are made in several papers such as [Chang '99] where diagonal directions are also considered. However, problem still remains for any arbitrary oriented edges.
¡@
2.3 [Kimmel '99]
In this technique, we calculate the likelihood that each pixel belongs to an edge based on the directional derivatives. The interpolation is such that more weights are given to the pixels lined along the edge than the pixels across it. This is an extension of [Cok '99]. Instead of using bilinear interpolation, we use weighted interpolation.

If we are to interpolate the missing pixel depicted in figure 4, with E as a directional edge measure, we'll do the following:
P(m,n) = Sum(i,j) in neighborhoodP(m+i,n+j)E(m+i,n+j) / Sum(i,j) in neighborhoodE(m+i,n+j)
Where
E(m+i,n+j) = (sqrt(1 + D(P(m,n))2 + D(P(m+i,n+j))2))-1The directional gradients in the x, y, x-diagonal, and y-diagonal directions are defined as follows:
Dx(P(m,n)) = (P(m,n-1)¡VP(m,n+1)) / 2
Dy(P(m,n)) = (P(m-1,n)¡VP(m+1,n)) / 2
Dxd(P(m,n)) = (P(m-1,n+1)¡VP(m+1,n-1)) / 2.83
Dyd(P(m,n)) = (P(m-1,n-1)¡VP(m+1,n+1)) / 2.83
¡@
2.4 [Li '00]
This technique estimates local covariance characteristics and uses them to derive the optimal linear MMSE prediction for the weighted interpolation. It has been shown that covariance-based adaptation is very effective on tuning a predictor to match an arbitrarily oriented edge. However, the estimation of covariance structure at high resolution requires the complete knowledge of high-resolution image while we only have access to its low-resolution version. The key to overcome the above difficulty is to recognize the resolution-invariant property of edge orientation. That is, the low-resolution image contains (approximately) the same edge information as the high-resolution image, hence we can replace the covariance structure at high resolution with its low-resolution counterparts.
Again, we use weighted interpolation.
P(m,n) = Sum(i,j) neighborhoodP(m+i,n+j)E(m+i,n+j)
The weights E(m+i,n+j) are derived from a least square problem formulation. It assume that within a fixed small region, E(m+i,n+j) is constant for each (i,j). Using the know pixel values, we can set up a linear system of equations based on the above assumption to find E(m+i,n+j) via a mean square error solution. Suppose we want to find the weights for each neighboring pixel in figure 4, our linear system of equation would be as follows:

An extension to this technique based on the concept of optimal recovery is described in [Muresan '01].
¡@
3. R
ESULTSThe interpolated images of a lighthouse test image from various interpolation techniques are show below. As shown from the results, classical linear interpolation techniques like nearest neighbor produces blocking artifacts near the edges and bilinear interpolation blurs edges. The edge-adaptive interpolation techniques produce images that are both smoother in uniform areas and sharper around the edges. It can also be seen from the results that techniques like [Li '00] and [Murasan '01] can adapt to arbitrarily oriented edges better than the other two edge-adaptive techniques. To emphasis this point and also shown the color interpolated images, two flower images interpolated by bilinear and [Li '00] techniques are shown. The images contain many different orientations of edges and the result of [Li '00] shows that it perform much better than bilinear technique in producing sharp edges.
¡@
(a) Nearest Neighbor (b) Bilinear (c) [Dube '00]
¡@
(d) [Kimmel '99] (e) [Li '00] (f) [Muresan '01]
¡@
(a) Bilinear (b) [Li '00]
¡@
4. C
OLOR IMAGE RECOVERY FROM COLOR FILTER ARRAY
Due to hardware limitation, consumer digital cameras usually use only one image sensor. To capture all colors of an image, Color Filter Array (CFA) is required, which lay on top of image sensor so that each pixel only captures one color of light. Figure 5 shows the popular Bayer pattern CFA used in most of the digital cameras today. From the pattern, we can see that the image in each color channel, red, green, or blue, has less resolution than the sensor resolution. Therefore, to reconstruct the full color image of the sensor, we need to do interpolation on each color component. Classical bilinear interpolation is popular for this application because of its simplicity. However, it can produce zipped-like artifacts near the edges on the images (shown below). Again, edge-adaptive interpolation can be used to reduce this kind of artifacts. The result of applying [Li '00] to recover color image from CFA is shown below. The test image is a portion of a sailboat. Note that the technique is applied to different color plane seperately. There are some methods that exploits the correlation between different color planes and can potentially obtain better results. [Chen '99] and [Ramanath] provide very thorough surveys of the different techniques used in the area of CFA image recovery.
¡@
¡@
Bilinear [Li '00]
¡@
5. C
ONCLUSIONThis report surveys some of the new edge-adaptive image interpolation techniques. These techniques are try to interpolate along edges, not across them, to reduce the blurring of edges, as can be seen from the classical bilinear image interpolation. The results show much sharper edges when these techniques are applied. This characteristic makes edge-adaptive techniques good candidates for color image recovery from CFA because traditional bilinear interpolation usually produces zipped-like artifacts when used in this application. The result shows those artifacts are significantly reduced when edge-adaptive interpolation is used.
¡@
6. R
EFERENCES[Muresan '00] D. D. Muresan and T. W. Parks, ¡§New Edge Directed Interpolation,¡¨
IEEE 2000 Western New York Image[Li '00] X. Li and M. T. Orchard, ¡§New Edge Directed Interpolation,¡¨
IEEE International Conference on Image Processing, Vancouver, Sept. 2000[Dube '00] S. Dube and L. Hong, ¡§An Adaptive Algorithm for Image Resolution Enhancement,¡¨
Signals, Systems and Computers, 2000, Vol. 2, pp. 1731-1734[Kimmel '99] R. Kimmel, ¡§Demosaicing: Image Reconstruction from Color CCD Samples,¡¨
IEEE Transactions on Image Processing, Vol. 8, No. 9, Sept. 1999, pp. 1221-1228[Allebach '96] J. Allebach and P. W. Wong ¡§Edge-directed Interpolation,¡¨
IEEE Proceedings of ICIP, 1996, pp. 707-710[Cok '87] ¡§Signal processing method and apparatus for producing interpolated chrominance values in a sampled color image signal,¡¨
U.S. Patent 4,642,678 (1987)[Muresan '01] D. D. Muresan and T. W. Parks, ¡§Adaptive, Optimal-Recovery Image Interpolation¡¨, IEEE ICASSP 2001 (Utah).
[Chang '99] E. Chang, et.al., "Color Filter Array Recovery Using a Threshold-based Variable Number of Gradients," Proceedings of SPIE, January, 1999
[Chen '99]
http://ise.stanford.edu/class/psych221/99/tingchen/[Ramanath]
http://hobie.cacc.ncsu.edu/Projects/ColorFilterArray/demosaicking_paper.html¡@
¡@
¡@