text stringlengths 7 677 |
|---|
Sampling |
Area-Coverage Real-world sensors get a signal based on the area fraction of the sensor βcoveredβ by objects Coverage:Signal:A ray tracer only gets a sample of the geometry (using a ray-geometry intersection point)A scanline renderer projects the entire triangle onto the image plane Testing pixel centers against triangl... |
Missing Information Eyes/cameras don't collect all of the information either The staggered spatial layout of real-world sensors means that large regions lack information for certain wavelengths (layered approaches can help to circumvent this) layered approaches can help to circumvent this: |
Aliasing Testing only the pixel center (with ray-tracing or scanline rasterization) leads to jagged edges This causes aliasing artifacts (an alias/imposter takes the place of the correct feature)A jagged line appears instead of the correct straight line Anti-aliasing strategies aim to reduce aliasing artifacts (caused ... |
Aliasing: Shaders & Textures Aliased normal vectors can cause erroneous sparkling highlights (top left)Aliasing can occur when texture mapping objects too (top right) |
Temporal Aliasing A spinning wheel can appear to spin backwards, when the motion is insufficiently sampled in time (βwagon wheelβ effect) |
Sampling Rate Artifacts can be reduced by increasing the number of samples (per unit area)This can be accomplished by increasing the number of pixels in the image; but:It takes longer to render the scene (because there are more pixels colors to determine)Displaying higher-resolution images requires additional storage/c... |
4 samples per period |
samples |
reconstruction |
2 samples per period |
samples |
reconstruction |
1 sample per period |
samples |
reconstruction Appears to be a different function |
2/3 sample per period |
samples |
reconstruction Appears to be a different function |
Aliasing These two cosine waves appear identical to the sample points |
Sampling Rate Sampling at too low a rate results in aliasing, where two different signals become indistinguishable (or aliased)Nyquist-Shannon Sampling Theorem If π(π‘) contains no frequencies higher than π hertz, it can be completely determined by samples spaced 1/(2π) seconds apart That is, a minimum of 2 samples ... |
Anti-Aliasing The Nyquist frequency is defined as half the sampling frequency If the function being sampled has no frequencies above the Nyquist frequency, then no aliasing occurs Real world frequencies above the Nyquist frequency appear as aliases to the sampler Before sampling, remove frequencies higher than the Nyqu... |
Fourier Transform Transform between the spatial domain ππ₯ and the frequency domain πΉπFrequency Domain: πΉπ=β«!""ππ₯π!#$%&'ππ₯Spatial Domain: ππ₯=β«!""πΉππ#$%&'πππ!"=cosπ+πsinπcosπ= $!"%$#!"& sinπ= $!"'$#!"&! |
Constant Function |
Low Frequency Cosine |
High Frequency Cosine |
Narrow Gaussian Narrow Wide |
Wider Gaussian Wider Narrower |
sum of two different cosine functions |
samples |
reconstruction Aliasing! |
Fourier transform |
identify Nyquist frequency bounds |
remove the high frequencies |
inverse Fourier transform |
samples |
reconstruction No Aliasing! |
Anti-Aliasing Sampling causes higher frequencies to masquerade as lower frequencies After sampling, can no longer untangle the mixed high/low frequencies Remove the high frequencies before sampling (in order to avoid aliasing)Part of the signal is lost But, that part of the signal was not representable by the sampling ... |
Blurring vs. Anti-Aliasing blurring jaggies after samplingremoving high frequencies before sampling |
Images Images have discrete values (and are not continuous functions)Use a discrete version of the Fourier transform The Fast Fourier Transform (FFT) computes the discrete Fourier transform (and its inverse) in ππ log π complexity (where π is the number of samples)Images are 2D (not 1D)A 2D discrete Fourier transfo... |
Constant Function |
sin2π/32π₯ |
sin2π/16π₯ |
sin2π/16π¦ |
sin2π/32π₯ βsin2π/16π¦ |
An obvious star! |
lowest frequencies |
intermediate frequencies |
(larger) intermediate frequencies |
highest frequencies (edges) |
Convolution Let π and π be functions in the spatial domain (e. g. images), and πΉπ and πΉπ be transformations of π and π into the frequency domain In our prior examples: π was the image (to the left), πΉπ was the frequency domain version of the image (to the right)Removing higher frequencies of πΉπ is equivale... |
Convolution Integral Convolution can be achieved without the Fourier Transform:πβππ‘=3!""ππππ‘-πππ=3!""ππ‘-πππππA narrower π makes the integral more efficient to compute A narrower πΉπ better removes high frequencies But, they can't both be narrow Recall: the narrower Gaussian had wider frequencies, and... |
Box Filter Let π have nonzero values in an Nx N block of pixels (surrounding the origin), and be zero elsewhere The discrete convolution (integral) is computed via:overlay the filter π on the image, multiply the corresponding entries, and sum the results The final result is (typically) defined at the center of the fi... |
Filters Most (but not all) High Frequencies πΉππ |
Wider Box FilterπΉππ more expensive convolution integralremoves more of the high frequencies |
Super-Sampling Collect extra information/samples (in each pixel), and average the result (e. g. with a box filter)E. g. render a 100 by 100 image with 4 by 4 super-sampling (equivalent to rendering a 400 by 400 image)This properly represents (without aliasing) frequencies up to 4 times higher (than the original image c... |
Super-Sampling Point Sampling4 by 4 Super-Sampling Exact Area Coverage |
Super-Sampling Jaggies Anti-Aliased |
README.md exists but content is empty.
- Downloads last month
- 7