1 / 24

Aliasing and Anti-Aliasing Techniques

Aliasing and Anti-Aliasing Techniques. What is Aliasing? Effects of Aliasing Anti-Aliasing Techniques. Images. an image is a 2D function I(x, y) that specifies intensity for each point (x, y). Aliasing. Consider a diagonal line represented as a raster graphic…. Aliasing.

blancaw
Download Presentation

Aliasing and Anti-Aliasing Techniques

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. Aliasing and Anti-Aliasing Techniques • What is Aliasing? • Effects of Aliasing • Anti-Aliasing Techniques

  2. Images • an image is a 2D function I(x, y) that specifies intensity for each point (x, y)

  3. Aliasing • Consider a diagonal line represented as a raster graphic…

  4. Aliasing • The simplest way to rasterise would be to fill only those pixels with >50% coverage.

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

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

  7. Antialiasing Techniques 1. Super sampling 2. Area sampling 3. Pixel Phasing

  8. Super-Sampling • Split single pixel into sub-pixels. • Pixel’s final color is a mixture of sub-pixels’ colors. • Simple method: Sample at the middle of each sub-pixel. • Then, pixel’s color is the average of the sub-pixels’ color. Sub-divide into sub-pixels Pixels

  9. Super-Sampling a Zero-Width Line Apply Bresenham’s algorithm at sub-pixel level Sub-divide each pixel into sub-pixels, for example 4x4 sub-pixels Each pixel can have a maximum of 4 colored sub-pixels 0.0 0.0 0.0 1.0 0.5 1.0 1.0 0.0 0.5 0.0 0.0 0.0 0 0 0 4 2 4 4 0 2 0 0 0 Assign color Fraction of pixel’s color to be line’s color How many sub-pixels are colored?

  10. Super-Sampling a Line with Non-Zero Width A line that is one-pixel wide. For every pixel: Maximum number of sub-pixels inside line = 16 A sub-pixel is considered in if its lower-left corner is inside the line 0 0 5/16 9/16 10/16 15/16 13/16 7/16 8/16 2/16 0 0 Fraction of sub-pixels are in = fraction of color of the pixel should be line color

  11. Super sampling (post filtering) • Super sampling performs calculations on a virtual image ‘n’ times the resolution of the desired 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. • Greater accuracy and more graphically impressive results can be obtained by a technique known as super sampling.

  12. Supersampling • Super sampling 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 super sampling used (2x, 4x, 8x) to balance the desired graphics level with the computing power available.

  13. 90% 15% 65% 50% Anti-Aliasing Techniques(Area sampling/pre-filtering) • Un-weighted filtering: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.

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

  15. 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 centre of the line. • 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…

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

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

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

  19. 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.

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

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

  22. 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.

  23. Pixel Phasing • Hardware based technique. • System incorporating this technique are designed so that individual pixel position can be shifted by a fraction of a diameter. • The electron beam is typically shifted by ¼ ,½ , ¾ of a pixel diameter to plot points closer to true line path0

  24. Antialiasing Example • With anti-aliasing: • Without anti-aliasing:

More Related