DOC PREVIEW
CMU CS 15463 - Antialiasing and Related Issues

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Antialiasingand Related IssuesOUTLINE: AntialiasingPrefiltering, Supersampling, Stochastic Sampling Rastering and Reconstruction Gamma CorrectionAntialiasing MethodsTo reduce aliasing, either:1. fix the signal by prefiltering:Reduce the signal’s bandwidth by low pass filtering before sampling.Highest quality method, but often impractical.2. fix the samples by supersampling:Use more samples to raise the Nyquist frequency.Simple and widely used.3. fix the samples by stochastic sampling:Sample randomly, not uniformly.Relatively simple, usually used in combination with supersampling.In practice, we rarely eliminate aliasing entirely, we merely reduce it to tolerable levels.Filtering TerminologyFor a linear, shift-invariant filter,A filter can be described in the spatial domain by its impulse response† h(x), its response to a delta function input, as a function of position. Abbrev: IR. δ(x) → FILTER → h(x)† a.k.a. point spread function in image processingAnd it can be described in the frequency domain by its frequency response H(ω), its response to a sinusoid input as a function of frequency. Abbrev: FR.sin(ωx) → FILTER → Η(ω)sin(ωx)Η(ω) is the gain of the filter at frequency ω.The FR is the Fourier transform of the IR: h(x)↔Η(ω).Note the terminology distinction. For a signal: signal↔spectrum,but for a filter: impulse response↔frequency response.FILTERinputsignaloutputsignalLow Pass (Blurring) FiltersThe ideal low pass filter has gain 1 at frequencies below the cutoff, and gain 0 above the cutoff ωc.Its IR is a sinc, its FR is a box:(ωc/π)sinc((ωc/π)x) ↔ box(ω/2ωc)In practice, you typically don’t want the ideal low pass filter, since it has infinite support (width), and it causes ripples in output. Instead, we use finite impulse response filters that attenuate, but do not stop high frequencies. The choice of filter is usually governed by a speed/quality tradeoff.ω|H(ω)|cutoff freq.FR of a typical low pass filterωH(ω)ωcFR of an ideal low pass filterA low pass filter passes (preserves) low frequencies while stopping (eliminating) high frequencies.00Method 1: PrefilteringThe idea: Antialias by low pass filtering the signal, bandlimiting it to the Nyquist frequency before sampling.An approximation to an ideal low pass filter (sinc) is typically used.Example: antialiasing polygons with box filtering:find the fraction of the pixel covered by each polygon,compute weighted average of colors.Prefiltering is easy and widely used when the signal is discrete, as when resampling.It’s harder when the signal is continuous. Prefiltering is difficult in 3-D rendering when visibility is not known exactly. It is more practical for simple signals, e.g. signals given by a closed form expression or 2-D text and graphics (lines, polygons, fonts). ABCMethod 2: SupersamplingThe idea: Antialias by increasing the sampling frequency.Example: render at k times the resolution. Then, if your display supports the higher resolution (e.g. film) then use it, otherwise (e.g. video) downsample by factor of k to the display resolution.Practical constraints:Sampling at k times the resolution, in 2-D, will typically cost k2 times more in time and perhaps in memory as well.To eliminate the memory problem, you can usually downsample on the fly.Theoretical problems:How do you know how much to supersample? i.e. how do you pick k?If one value of k works everywhere, then do uniform supersampling.If not, use adaptive supersampling: take several samples within pixel; if their variance is low, return their average, otherwise subdivide pixel and recurse, like a quadtree.Method 3: Stochastic SamplingInstead of sampling on a uniform grid, sample at random points.Several ways to do this:1. jittering: choose a point at random, uniformly within the domain (interval, pixel area, or frame time). Easy.2. Poisson disk sampling: pick a point, keep if its nearest neighbor is >r units away, discard if not. Repeat until full. Harder, better.Stochastic sampling is typically used in combination with supersampling. Common: 16 samples per pixel.Stochastic sampling reduces aliasing, but increases noise; it’s not a panacea.uniform,1 sample per pixeluniform,9 samples per pixeljittered,1 sample per pixeljittered,9 samples per pixelpixel pixelResamplingResampling: sampling a discrete signal at a different sampling rate.Example: “zooming” a picture from nx by ny pixels to snx by sny pixelss=1: no changes>1: called upsampling or interpolationcan lead to blocky appearance if point sampling is used, since pixels are magnifiedThis artifact is rastering, which is related to aliasing, but different.cure is better reconstruction of contin. signal.Easy.s<1: called downsampling or decimationcan lead to moire patterns and jaggiesThis artifact is aliasing,cure is sampling at a higher frequency, or low pass filtering before sampling.Harder.Rastering and ReconstructionWhen upsampling (interpolating), we want to reconstruct the original continuous signal from a discrete signal. rastering results when a poorreconstruction filter,such as a box filter, is used.box filter → pixel replication, blocky appearancetriangle filter → linear interpolation, better appearance.In 2-D, use of a triangle filter is called bilinear interpolation.More expensive cubic filters are sometimes used, but bilinear interpolation is often sufficient. See Mitchell & Netravali, SIGGRAPH 88 for details on good cubic, support 4 reconstruction filters.xinput pixelsinterpolated pixelsBrightness of light on CRT has units of radiance (a.k.a. “intensity”).The gamma γ ∈ [2,3], typically.Correcting for this nonlinearity is gamma correction.color value [0,255]c video(NTSC) ∝ cMost Displays have Nonlinear Intensitymempixel value [0,255]vcolormapD/A CRTradiance L∝cγFRAME BUFFERcLvc?eyePrinting is nonlinear:darkness of 2 black dots less than twice the darkness of 1 black dotCathode ray tubes are nonlinear:color 128 is darker than the average of colors 0 and 255Video cameras compensate by generating c ∝L1/γ“gamma corrected video”When filtering, we want to work in units of radiance L (not L1/γ)because eye’s lens does linear filtering of light, and radiance is the natural unit for measuring lightGamma correction is critical in order to do good antialiasing!To determine the gamma of your monitor:display adjust gamma until left & right this: sides appear equally brightOn SGI, “gamma x” sets colormap: c[v] =


View Full Document

CMU CS 15463 - Antialiasing and Related Issues

Documents in this Course
Lecture

Lecture

36 pages

Lecture

Lecture

31 pages

Wrap Up

Wrap Up

5 pages

morphing

morphing

16 pages

stereo

stereo

57 pages

mosaic

mosaic

32 pages

faces

faces

33 pages

MatTrans

MatTrans

21 pages

matting

matting

27 pages

matting

matting

27 pages

wrap up

wrap up

10 pages

Lecture

Lecture

27 pages

Lecture

Lecture

40 pages

15RANSAC

15RANSAC

54 pages

lecture

lecture

48 pages

Lecture

Lecture

42 pages

Lecture

Lecture

11 pages

Lecture

Lecture

52 pages

Lecture

Lecture

39 pages

stereo

stereo

57 pages

Lecture

Lecture

75 pages

texture

texture

50 pages

Lectures

Lectures

52 pages

Load more
Download Antialiasing and Related Issues
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Antialiasing and Related Issues and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Antialiasing and Related Issues 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?