Digital photography – prevent aliasing when resampling images

Contributor Icon Contributed by qmchenry Date Icon March 7, 2004  
Tag Icon Tagged: Entertainment

If not careful when reducing the dimensions of a digital image, the resulting image may suffer from aliasing, a type of distortion seen in all types of digital media. A few tips can help prevent aliasing.


Aliasing occurs when breaking a continuous signal into discrete pieces such as when a digital camera assembles an array of individual points or pixels from a scene. Once in a digital format, one must be cautious when altering the size.

There are various techniques that graphic design applications may use to reduce image dimensions, although most involve an average of the original pictures. Imagine a simple image 100 pixels wide and high. If this image is reduced in size by half to 50×50 pixels, each resulting pixel represents 2×2 or 4 pixels of the original image. This reduction is optimal and will yield a true representation of the original image.

If the original 100×100 pixel image is reduced 10% to a 90×90 pixel image, then each resulting pixel is not a simple average of neighboring pixels. Many applications will simply throw away pixels which leads to the uneven, aliased appearance.

The best approach to resizing images is to reduce by an even fraction – 1/2, 1/3, 1/4, etc. Keep in mind the reduction to be perfomed when taking the original images and attempt to size the relevant region of the image appropriately. Crop the image first to a size that is an integer multiple of the final image (400×400 pixels, for example, if the target image size is 100×100 pixels). If any modifications are to be made, perform them on the larger image. When the image is reduced, minor defects may be hidden that would be more apparent if modifcations were made to the smaller image.

Previous recipe | Next recipe |
 
  • Mal
    Your method is not the best way. With going to 50% or 25% or any percentage size reduction you will get stair stepping or jaggies on diagonal lines. Try it on a photo of the telephone wires outside on the poles and you will see what I mean.

    The better way that works beautifully, as long as the resulting image is smaller that the original, is to reduce in Photoshop and change the number of pixels in just one dimension (the other dimension changes automatically). That smaller image will have a slight degree of fuzziness due to the ambiguity regarding which colors should be averaged into which new and fewer photosites/pixels. The cure for that is to apply a small degree of sharpening in Photoshop. The sharpening clears up the ambiguity and makes a decision of what should go where. It is quite effective and the image will be seamless rather than pixilated.

    Understand any time you reduce a digital image you will lose information. But the Photoshop way with a slight degree of sharpening will give results where you could not tell that the image was not shot at the smaller image size.

    Here is how to do it in Photoshop: 1. open your image in Photoshop. 2. click on the image on the taskbar at the top left. 3 you will get a drop down menu and click on the word size. A new window opens and there will be a word labeled width. Change the number of pixels in that box to your new dimension and hit OK. Open the image to full size and if it looks fine leave it alone. If you want it sharper then sharpen it.

    For instance – my camera shoots images that are 4272 in the long axis. I change that to 1024 which fits my entire screen with no overlap.
blog comments powered by Disqus