Skip to content Skip to navigation

Connexions

You are here: Home » Content » Geometric Transformation of Images using Spline-Interpolation

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

This feature requires Javascript to be enabled.

Geometric Transformation of Images using Spline-Interpolation

Module by: Sujesh Sreedharan

Summary: To perform geometric transforms on discrete images such as a rotation or zooming we need to first fit the discrete data to a continuous function. This can be done using splines. B-splines can be used to interpolate and form the continuos image from the discrete samples.

Here we illustrate the use of splines in two-dimensions for transforming discrete images. When we apply a transformation (such as rotation or zooming) it becomes necessary to know the image intensity at a location in between the sample points. This is an interpolation problem and splines come in handy.

Spline Tensor Product Basis

We extend the 1D B-spline basis to 2D using tensor products φnxy φ x y n defined as

φnx-ky-l=βnx-kβny-l φ x k y l n β x k n β y l n (1)
Using these bases we can interpolate a discrete image fkl f k l and come up with a continuous function fxy f x y over 2 2 .
fxy=klcklβnx-kβny-l f x y k k l l c k l β x k n β y l n (2)
The coefficients ckl c k l are obtained by fitting the discrete image to the 2D spline basis.

Image Transformation

Let xy=Guv x y G u v be the transformation (rotation, scaling) of the domain, where uv u v describe the transformed plane and xy x y the original image plane. Then our problem is to find the samples of the transformed image gmn g m n from the samples of original image fkl f k l . Here is how we go about it:

  • Calculate ckl c k l from the pixel values fkl f k l
  • For each mn m n on transformed image find corresponding source location xy x y
  • Compute fxy f x y using the spline model, now gmn=fxy g m n f x y

Example 1

In Figure 1 we look at the rotation of an image by certain angle and compare the fits using φnmn φ m n n n=0 n 0 (nearest neighbour), n=1 n 1 (bilinear), n=3 n 3 (bicubic).

Figure 1: Illustration of how the jagged edges appear in nearest neighbour interpolation and they progressively smooth out in higher order spline-interpolation. Bicubic spline interpolation is highly popular as cubic splines appear smooth to the human eye.
Figure 1 (thello.png)

Comments, questions, feedback, criticisms?

Send feedback