Smoothing images

The image quality suffers if the mapping functions X(x,y) and Y(x,y) of the position (x,y) of a pixel of the output image to the position (X,Y) of the sampled input image pixel are strongly contracting or expanding.

For contracting mappings many pixels of the output image are mapped to the same single pixel of the input image. Without interpolation such a pixel appears magnified in the output image as a large patch of uniform color. You can see an example in “How to generate rosettes“. With cubic interpolation we can remove this defect , see the post “interpolation of pixels“.

For strongly expanding mappings neighboring output pixels are mapped to input pixels that lie far away from each other. If they are further apart than the size of characteristic details of the input image, then we get artifacts in the output image. An example are the nearly random pixels at the center of this spiral image:

This is essentially aliasing. We can improve the image¬†by averaging, see “Smoothing and anti-aliasing“. Using four sampling points for each output pixel gives a much nicer image:

Obviously, interpolation and averaging slows down image generation and should only be used where needed. Often, we need neither of them. And never both. The generating program should analyze the mapping and choose the image improvement.

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

1 Response to Smoothing images

  1. Pingback: Anti-aliasing for improving image quality | Geometry in color

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.