interpolation of pixels

If you look at my earlier post “Nautilus” you see that it is difficult to get good results for strongly distorted images. They have regions where the input image is strongly magnified and one input pixel could cover many pixels of the output image.

The output image is strongly pixelized if we do not interpolate and use for its pixels simply the color of the input pixel that lies closest to the transformed coordinates. Here is an example:


Blowing up less than 1000 pixels to about 25000 pixels results in large blocks if we do not interpolate.

This is poor and we get a marked improvement with linear interpolation:


Linear interpolation destroys the pixel blocks but new artefacts appear.

But traces of the pixels stay. We still see some lines at the boundaries of the interpolation segments. With cubic interpolation we can remove these artifacts:


Cubic interpolation with the Catmull-Rom kernel.

Now the pixels have really disappeared and we get a blurred image as expected from the strong magnification. All artefacts seem to have disappeared. The Mitchell-Netravalli kernel gives a slightly smoother image:


Cubic interpolation with the Mitchell-Netravalli kernel.

Note that the images here are strongly exaggerated and in practice you would have only small parts of a high resolution print that are magnified like that. But to get high quality we should use cubic interpolation.

This entry was posted in Extra, programming and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.