# Interpolation algorithms in computer graphics

I'm looking for an image-processing algorithm that uses interpolation (polynomial, spline, doesn't matter). I have to implement such algorithm to process a bitmap for my labs. It can't be image resizing, it must be something else. Could you give me some proposals? I've tried on wikipedia and google, but it's hard to filter algorithms that make use of interpolation

PS. Sorry for the tags, I can't create new ones and couldn't find existing ones that would be suitable for my question.

## migrated from graphicdesign.stackexchange.comMar 24 '12 at 17:44

This question came from our site for Graphic Design professionals, students, and enthusiasts.

• This may actually be a more suitable question for mathematics, stackoverflow, or even gamedev. Interpolation is something a graphic designer is not typically going to work with on a top level (or even know to what it refers) – horatio Mar 21 '12 at 14:03
• What do you want the image-processing algorithm to achieve? There are any number of algorithms that will process bitmaps, but unless you tell us what you want the algorithm to do, answers to your question would be at best a shot in the dark. – Dilip Sarwate Mar 24 '12 at 20:37
• What do you mean when you say "It can't be image resizing"? Image resizing is always done with interpolation. Do you mean simply scaling the pixels? – Phonon Mar 26 '12 at 21:59

Some ideas:

• rotate the image in 2D
• compute the Radon transform. This is used in tomography applications.
• Other 2D effects, like swirling or adding ripples
• Map the 2D image onto the surface a 3D shape, such as a sphere
• Simulate the effect of a lens, or refraction by some other transparent 3D object in front of your bitmap
• Simulate gravitational lensing by a black hole

2D image rotation is what comes to mind first as the simplest application of 2D interpolation after rescaling. The obvious approach is to simply apply the well-known coordinate transformation; an alternative trick is to decompose the rotation into a sequence of three sheers so that only 1D interpolation is needed.

The 3D examples are more involved, since they will probably require implementation of raytracing.

• Thanks for the answer. This lab i had is long gone, but it appeared that we had a misunderstanding with the professor. She meant "interpolation algorithm" as an algorithm for resizing images (sic!), and we thought, that she meant something like polynomial interpolation used as a backend for some different graphics algorithm. And sorry i didn't visit this site and left no answer, i just forgot afterwards. Once again thank you and sorry for a silly question. – Wojtek Apr 25 '12 at 20:07