Using Bsplines to Up-sample and
Down-sample Images
James L. Bigler -
Elaine
Cohen
Abstract
Two dimensional images can be thought of as bivariate tensor product surfaces in color space. Instead of x, y, and z for the coefficients of the data, red, green, and blue can be used. This allows us to use algorithms associated with surfaces on 2D images.
Approach
Up-sampling
For up-sampling we simply use the color values as the coefficients in a bivariate spline evaluation. This has the effect of smoothing the image; however, this approach is preferred to simply enlarging the image making the texels visible.
These images were generated in the real time ray tracer written by Steve Parker and Peter Shirley at the University of Utah. Texture coordinates were computed by the ray tracer and then passed to the spline texture which evaluated the texture in color space.
| No interpolation | Linear | Quadradic | Cubic | Quartic |
Down-sampling
Down-sampling is a much more interesting problem. We would like the new smaller image to contain as much of the information contained in the original image as possible. A naive down-sampling where texel are simply removed often produces aliasing. Therefor a different approach must be taken.
One approach is to compute a new surface that has less control points, but is the least squared approximation to the original surface. This approach produces reasonable results; however, the down-sampled images have ringing around regions that have a high change in color.
Original

Down-sampled

Enlarged to original size

Smoothed Original

Down-sampled

Enlarged to original size

There was still ringing, so another approach was tried. Assuming one started out with a surface with coefficients B(i,j) and refined the surface to get the new coefficients P(i,j), P could be least squared fit to the original image T(i,j). Because P could be expressed in terms of B, we could get new the down-sampled surface, B, from the original image T. This produced even better results, and when the original surface was smoothed first the ringing was almost completely removed. (Note: because a matrix called alpha is used in the refinement process this approach is referred to as using the alpha matrix)
Original

Down-sampled

Enlarged to original size

Smoothed Original

Down-sampled

Enlarged to original size

Conclusions
For up-sampling there was better preservation of the image with a second or third degree spline evaluation. Increasing the degree past that did not produce significant changes. It was an impovement on the linear case, which is what OpenGL does.
For down-sampling the best results were achieved by using the alpha matrix with a smoothed image. While a computational analysis was not performed, one may be done in future work.