Digital Image Processing

Project 2: Antialiasing & Analysis

Click here for the source code and my working SGI executable.
Click here for the informational "report" I turned in with my assignment.

The second project in the image processing class was to write a program to antialias (via a fourier filter and subsampling) an image. The idea was to analyze the results, both in the fourier and the spacial domain.

Some of my images, both original and antialiased are below, as well as their power spectra. Note that on the power spectra, they are scaled so they show up in a 255 color image. Also, each one is scaled differently so they are a bit difficult to compare quantitatively.

Test Images


Original image

Power spectrum of the original
A 2D box function turns out to be a 2D sinc function in the Fourier domain, and this image shows that's what the FFT code I used gives.

Image of Zion National Park

This image really clearly shows the benefits of antialiasing, as well as the differences between filters. To see the original image, click on the subsampled one. Note that the original image looks a lot nicer and much less aliased than the subsampled image. That's what I'd like to get back to, just on a smaller scale.


Original image subsampled (405x270)


Power spectrum of the original image

I have five main filters in my program:

  1. Convolution by a 2D box function
  2. Convolution by a 2D triangle pulse
  3. Convolution by a 2D Gaussian function
  4. A low pass filter
  5. Multiplication (in the Fourier domain) by a circular sinc function
All of the filters are implemented in the Fourier domain (a FFT, followed by an application of the filter, followed by an inverse FFT). Below are the power spectra of the image after having the filters applied to them:


Of the original


Of the image filtered by sinc(s)*sinc(t)

Of the image filtered by sinc2(s)*sinc2(t)


Of the image filtered by a gaussian

Of the image filtered by a strict lowpass filter


Of the image filtered by a sinc(sqrt(s2+t2))

And below are the filtered & subsampled images resulting for each of the above filters.


Subsampled original


Image filtered by sinc(s)*sinc(t)

Image filtered by sinc2(s)*sinc2(t)


Image filtered by a gaussian

Image filtered by a strict lowpass filter


Image filtered by a sinc(sqrt(s2+t2))


Image of a Nebula

The following image is an image from the Hubble Space Telescope. It isn't particularly aliased when supbsampled, but I ran my program on it to see the results anyways. Also, I separated the red, green, and blue channels seperately when computing the fourier transforms. The reason the image doesn't appear to aliased is that there are very few high frequencies in the image, as can be seen in the image's power spectrum. Using any of the 5 filters in my program doesn't really cut out many frequencies.


Original, subsampled image


Image filtered with a gaussian

Original image's power spectra (combined rgb)


Red filtered power spectrum

Green filtered power spectrum


Blue filtered power spectrum


Image of a Stick Face

This is an image I created to use on my morphing project. It's pretty boring, but at it has an interesting power spectrum :-)


Original image subsampled


Power spectrum of the original image

Below are the power spectra of the image under the various filters:


Of the original


Of the image filtered by sinc(s)*sinc(t)

Of the image filtered by sinc2(s)*sinc2(t)


Of the image filtered by a gaussian

Of the image filtered by a strict lowpass filter


Of the image filtered by a sinc(sqrt(s2+t2))

And below are the actual filtered images:


Subsampled original


Image filtered by sinc(s)*sinc(t)

Image filtered by sinc2(s)*sinc2(t)


Image filtered by a gaussian

Image filtered by a strict lowpass filter


Image filtered by a sinc(sqrt(s2+t2))


Image of a Galaxy

This is an image I found from the Hubble Space Telescope. The original has been saved as a very low quality JPEG, causing the aliasing to be very bad.


Original image

Below are the power spectra of the image under the various filters:


Of the original


Of the image filtered by sinc(s)*sinc(t)

Of the image filtered by sinc2(s)*sinc2(t)


Of the image filtered by a gaussian

Of the image filtered by a strict lowpass filter


Of the image filtered by a sinc(sqrt(s2+t2))

And below are the actual filtered images:


Subsampled original


Image filtered by sinc(s)*sinc(t)

Image filtered by sinc2(s)*sinc2(t)


Image filtered by a gaussian

Image filtered by a strict lowpass filter


Image filtered by a sinc(sqrt(s2+t2))


Last Modified: Sunday, November 12, 2000

Chris Wyman (wyman@cs.utah.edu)