Image Zooming
Zooming an image is an important task used in many applications, including the World Wide Web, digital video, DVDs, and scientific imaging. When zooming, pixels are inserted into the image in order to expand the size of the image, and the major task is the interpolation of the new pixels form the surrounding original pixels. Weighted medians have been applied to similar problems requiring interpolation, such as interlace to progressive video conversion for television systems. The advantage of using the weighted median in interpolation over traditional linear methods is better edge preservation and less of a "blocky" look to edges.
To introduce the idea of interpolation, suppose that a small matrix must be zoomed by a factor of 2, and the median of the closest two (or four) original pixels is used to interpolate each new pixel:
Zooming commonly required a change in the image dimensions by a noninter factor, such as a 50 % zoom where the dimensions must be 1.5 times the original. Also, a change in the length-to-width ratio might be needed if the horizontal and vertical zoom factors are different. The simplest way to accomplish zooming of arbitrary scale is to double the size of the original as many times as needed to obtain an image larger than the target size in all dimensions, interpolating new pixels on each expansion. Then the desired image can be attained by subsampling the large image, or taking pixels at regular intervals from the larger image in order to obtain an image with the correct length and width. The subsampling of images and the possible filtering needed are topics well known in traditional image processing; thus we will focus on the problem of doubling the size of an image.
A digital image is represented by an array of values, each value defining the color of a pixel of the image. Whether the color is constrained to be a shade of gray, in which case only one value is needed to define the brightness of each pixel, or whether three values are needed to define the red, green, and blue components of each pixel does not affect the definition of the technique of weighted median.
To double the size of an image, first an empty array is constructed with twice the number of rows and columns as the original [Figure (5.31a)], and the original pixels are placed into alternating rows and columns [the "00" pixels in Figure.].
To interpolated the remaining pixels, the method known as polyphase interpolation is used. |