CSCE 441 Lecture 38

From Notes
Jump to navigation Jump to search

« previous | Friday, April 25, 2014 | next »


Missed Class on account of severe allergies

Antialiasing

aliasing: Strange artifacts, false patterns (solely a function of sampling pattern)

Examples:

Antialiasing makes images seem "smoother" or "more natural"

Aliasing comes from the Nyquist Limit: In order to prevent aliasing, signals must be sampled at least twice (or more) the maximum frequency:

Effect of aliasing due to low sampling rate of sinusoidal waves

Easy example of this is the car commercials where the wheels spin backwards: camera frame rate is slower

If this is an artistic effect, this could be OK, but in computer science, we want to remove aliasing when "downsampling" an image


In computer graphics, aliasing arises when rasterizing polygons and mapping textures:

  • We can sample pixel coordinates at the center, perform some level of averaging, or whatever.
  • To remove sampling, we need to filter out high frequencies (higher than our sampling rate)

Multisampling: sample multiple times per pixel and take average. There are several sampling patterns available:

In our case, downsampling is downscaling.

To remove high frequencies

  • take fourier transform of samples
  • run low-pass filter to set high frequencies to zero
  • take inverse fourier transform to get smoother sample points

Ideally, our filter looks like a box, but its inverse fourier transform (the sinc function) would give us negative values and infinite support.


Box Filter
Fourier Transform of Box filter: Sinc function

We're looking for a function whose Inverse Fourier Transform gives all positive values and is band-limited.

  • Box Filter: low frequencies would be blurred, but the high frequencies would be aliased.
  • Tent Filter: Better approximation
  • Lanczos 3 Filter: Almost perfect approximation of box function that we want to apply.

Mipmapping

Precompile image at multiple resolutions, and pick best match for each resolution.

Ideally, we go up by powers of 2

Linearly interpolate between scales


Anisotropic Filtering

Apply transformation to sample, and use multiple smaller samples to approximate the transformed sample's shape.

Analytc Aliasing

Use probability density function to "estimate" the blurring probability of an image.