1 / 32

CS32310 Presentation

CS32310 Presentation. Aliasing Artifacts and Anti-Aliasing Techniques (slightly modified – H Holstein) Rick Grundy. Aliasing Artefacts and Anti-Aliasing Techniques. What is Aliasing? Effects of Aliasing Avoiding Aliasing Anti-Aliasing Techniques Unweighted Filtering Weighted Filtering

Télécharger la présentation

CS32310 Presentation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS32310 Presentation Aliasing Artifacts and Anti-Aliasing Techniques (slightly modified – H Holstein) Rick Grundy

  2. Aliasing Artefacts and Anti-Aliasing Techniques • What is Aliasing? • Effects of Aliasing • Avoiding Aliasing • Anti-Aliasing Techniques • Unweighted Filtering • Weighted Filtering • Supersampling

  3. Sampled signal Input signal Sampling Rate What is Aliasing? • False frequencies created by poor sampling of an input signal.

  4. Sinusoid signal sampling. • If a sinusoid signal is measured at regular intervals, the sample may suggest a lower frequency signal. A sinusoid frequency should be sampled at at least half the frequency (times per second) to avoid the sampled signal being interpreted as a sinusoid signal of lower frequency. • In the above case, original signal (red) could not be reconstructed from the sampled signal (blue squares), because we do not know how much of the signal component to take. Ref: Max Veitch Smaldon

  5. Effects of Aliasing • Artefacts are created by this poor sampling. • Manifested as an audible, unmusical “buzz” in aliased sound data. • Also creates problems for computer graphics when vectorial data is sampled and rasterised.

  6. Jagged edges due to aliasing during the rasterisation process Vector representation of a circle Effects of Aliasing in Graphics • Jagged effect in rasterised graphics:

  7. Image representing a chessboard in 3D Closeup of most distant squares Effects of Aliasing in Graphics • Poor representation of fine detail:

  8. Aliasing in Graphics • A graphics example: (http://en.wikipedia.org/wiki/Anti-aliasing)

  9. Avoiding Aliasing? • The aliasing problem can be avoided when sampling audio by applying Nyquist’s Theorem. • Nyquist-Aliasing-Wikipedia • Sampling should be done at least at TWICE the rate of the maximum frequency present in the original signal. • Apply to the signal seen earlier…

  10. Sampled signal Input signal Sampling Rate (2x input frequency) Avoiding Aliasing? • Use of Nyquist’s theorem produces a mathematically identical output signal.

  11. Avoiding Aliasing? • In computer graphics, the resolution of the rasterised image replaces the sampling rate seen in the audio example. • To apply Nyquist would require the output device to have a resolution double that which is discernable to the human visual system. • Technology is not currently at this level, so alternatives must be sought.

  12. Anti-Aliasing Techniques • Consider a diagonal line represented as a raster graphic…

  13. Anti-Aliasing Techniques • The simplest way to rasterise would be to fill only those pixels with >50% coverage.

  14. Anti-Aliasing Techniques • This is not a particularly good representation of the original line. • Aliasing artefacts create a jagged, ‘stepped’ appearance. • The aliasing also makes lines appear to have different intensities depending on their angle.

  15. 90% 15% 65% 50% Anti-Aliasing Techniques • A better method would be to determine the strength of the colour used to fill each individual pixel according to the percentage covered by the line.

  16. Circle with aliasing Pre-filtering applied Anti-Aliasing Techniques • This technique (known as pre-filtering) creates a much smoother appearance.

  17. Anti-Aliasing Techniques • In the method seen on the previous slides, the amount of coverage given to each pixel is determined irrespective of the distance from the center of the line. • It is therefore known as Un-weighted filtering. • The filter used to calculate the % coverage of each pixel in this method can be thought of as a cube covering an area of 1x1 pixels, as explained in the following slides…

  18. Unweighted Filtering • Consider the line on a plane surface in a 3D space…

  19. Unweighted Filtering • A cube is extrapolated up from the plane for each pixel that the line intersects…

  20. Unweighted Filtering • The line is then extrapolated to fill a portion of this cube…

  21. Unweighted Filtering • The percentage of the cube filled by the line can now be calculated and used to shade this pixel. • Unweighted filtering is computationally simple, but better results can be achieved by using a weighted filter.

  22. Weighted Filtering • In weighted filtering, a cone is used in place of the cube.

  23. Weighted Filtering • The line is extrapolated into the cone and the percentage of the cone filled is calculated.

  24. Aliasing in Graphics • A graphics example: (http://en.wikipedia.org/wiki/Anti-aliasing)

  25. Weighted Filtering • This weighted filtering gives a more accurate result by taking into account the pixels around the one currently being investigated. • The use of a cone means that priority is given to line coverage closest to the center of the pixel in question. • It is possible to give different priorities to the outlying pixels by adjusting the shape of the cone - a bell-shape will give more priority to the pixel at the center.

  26. The Results (http://en.wikipedia.org/wiki/Anti-aliasing)

  27. Supersampling • These filtering methods have so far been applied just once per pixel in the rasterised image. • This is referred to as “1x” anti-aliasing. • Greater accuracy and more graphically impressive results can be obtained by a technique known as supersampling.

  28. Supersampling • Supersampling performs calculations on a virtual image ‘n’ times the resolution of the desired output. • This produces several pixels for each pixel in the final output. • Filtering is applied to each of these virtual pixels and the resultant average value is used to shade the corresponding pixel in the output image.

  29. n = 1 (1x anti-aliasing) n = 2 (2x anti-aliasing) n = 4 (4x anti-aliasing) n = 8 (8x anti-aliasing) Supersampling • Supersampling anti-aliasing is usually referred to in terms of the n value used:

  30. Supersampling • Supersampling is expensive computationally, but many high-end video cards provide on-board functionality to speed the process up. • Modern video games strive for smooth, realistic edges and make extensive use of anti-aliasing techniques. • Many games provide the user with options to select the level of supersampling used (2x, 4x, 8x) to balance the desired graphics level with the computing power available.

  31. Review of Material Covered • What is Aliasing? • Effects of Aliasing • Avoiding Aliasing • Anti-Aliasing Techniques • Unweighted Filtering • Weighted Filtering • Supersampling

  32. Bibliography • Anti-Aliasing. Wikipedia, 2005. • http://en.wikipedia.org/wiki/Anti-aliasing • Nyquist-Shannon Sampling Theorem. Wikipedia, 2005. • http://en.wikipedia.org/wiki/Nyquist-Shannon_sampling_theorem • Antialiasing Techniques. Kaushik, S.2005. • http://www.cs.wpi.edu/~matt/courses/cs563/talks/antialiasing/first.html • Anti-aliasing and Fractals. Jones, D.2004. • http://www.fractalus.com/info/antialias.htm • Aliasing problems and Anti-Aliasing Techniques. Owen, S. 1999. • http://www.siggraph.org/education/materials/HyperGraph/aliasing/alias0.htm

More Related