1 / 20

Aliasing artifacts and anti-aliasing techniques.

Aliasing artifacts and anti-aliasing techniques. By Max Veitch Smaldon mvs1@aber.ac.uk. The origin of the term. The term "aliasing" comes from radio engineering, where a radio signal can be received at two different frequencies. One above the signal frequency and one below. Aliasing.

astra
Download Presentation

Aliasing artifacts 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 artifacts and anti-aliasing techniques. By Max Veitch Smaldon mvs1@aber.ac.uk

  2. The origin of the term. The term "aliasing" comes from radio engineering, where a radio signal can be received at two different frequencies. One above the signal frequency and one below.

  3. Aliasing. Aliasing is an effect where two different continuous signals are merged, or become undistinguishable form one and another when sampled. When aliasing has occurred the original signal cannot be completely reconstructed from the sampled signal. This is a problem for digital image processing (issues of moiré patterns and jagged outlines) speech processing, audio and video signal processing (digital to analogue conversions of audio and video signals ). Anti-aliasing techniques can be used to reduce these effects.

  4. Signal Sampling. When a digital signal is a representation of a continuous analogue signal, the representation often introduces errors into the data, which are dependent on the sampling frequency (the intervals at which the analogue signal is sampled). The ideal sampling rate or frequency is infinite, so the signal is checked at every point in time. This is not possible, so any sampling effectively applies a low band pass filter to the signal being sampled. This has to be compensate for if a high quality sampled signal is to be represented or produced. The Nyquist-Shannon sampling theorem, states that ‘ a sampled signal cannot unambiguously represent signal components with frequencies above half the sampling frequency’. see Nyquist criterion for details.

  5. Examples of aliasing. If a photograph is taken of the sun every 23 hours, the sun would be sampled at a lower frequency than its true image frequency. This would have the effect that the sun would move from west to east, with 552 hours between sunrises. Another example is found in films, when the wheels of a car appear to move in the wrong direction or at an incorrect speed, this again is caused because the image is sampled at a lower frequency than its true sample frequency.

  6. Sinusoid signal sampling. • As with the previous examples, if a sinusoid signal is measured at regular intervals, the resulting sample would be lower frequency signal. If a sinusoid frequency is measured at half the frequency (times per second) the resulting signal would be a sinusoid signal with half the frequency. • The original signal would not be able to be reconstructed from the sampled signal, because we do not know how much of the signal component to take

  7. Moiré pattern. This is an optical illusion that is created when two grids are overlaid at an angle to each other, or of a slightly different size. The human visual system creates imaginary patterns of roughly horizontal dark and light bands. More complicated moiré patterns are created with curved lines, or lines that are not exactly parallel. It is also an effect produced by digital and computer graphics techniques, caused by lower sample frequencies of fine regular patterns.

  8. What is anti-aliasing? Anti-aliasing is the technique of minimizing aliasing when sampling high frequency signals at a lower frequency.

  9. The Nyquist criterion. A method to avoid aliasing. This method requires that the signal to be sampled does not contain any ‘sinusoidal components’ with a frequency greater than half the signal frequency. Generally it is sufficient to ensure that the signal is appropriately band-limited. Or that the difference between the frequencies of any two sinusoidal components must be less than half the frequency.

  10. Anti-aliasing in computer graphics. Because the computer screen is unable to display an infinite number of pixels with an infinite number of colours, the images that can be displayed on it are limited ( by the resolution of the screen). So if an image with a greater resolution (than the screen) is to be represented on a computer screen, it is necessary to convert or sample the image to fit within the limitations of the screen. The image is represented using function f (x, y), where x and y are the coordinates of the image and its content. it is possible to simplify the coordinates with the pigeonhole principle.

  11. The pigeon hole principle. ‘if n pigeons are put into m pigeonholes, and if n > m, then at least one pigeonhole must contain more than one pigeon’ This means that any number of holes can only hold the same number of objects, with out putting more than one object in a hole. If the holes are the pixels on the computer screen, then it becomes impossible to add more than one colour to the pixel, without overwriting the original pixel colour. So to resolve this an average can be found for a set number of pixels or coordinates of the image. This results in a reduction of the number of pixels needed to display an image.

  12. Examples of pigeonhole. If 11 people want to play 5 aside football, it is impossible for all the players to play without having 6 people on one team, which would mean that they were not playing 5 a side football. This means that only 10 of the people can play. Another example can be found with collisions in hash tables, when there are more keys trying to be entered into the table tan there are indexes. The solution requires a hash table with a greater number of keys, or less that keys are to be added.

  13. Signal processing. If an image is thought of as a signal, it is possible to filter the signal (image) to be displayed on a screen. The idea is to produce an image (of lower quality ) that most resembles the original image. The Fourier transform, is a method used to decompose the signal into basic waves and gives an amplitude of the wave. The waves can be any waves, but each wave will produce a slightly different image. To sample a signal of frequency n1, it is required to have n well placed sample points (if the sample points are at zero, the sample will appear to be zero). Experimentations has suggested that the Fourier transform is the bet method to use for humans, as it is perhaps the best way to simulate what the human mind sees, or at least expects to see.

  14. Fourier transform. Named after Jean Baptiste Joseph Fourier. It is an integral transform that re-expresses a function in terms of sinusoidal basis functions, i.e. as a sum of sinusoidal functions multiplied by some coefficients ("amplitudes"). There are many closely-related variations of this transform, depending upon the type of function being transformed.

  15. Variants of the Fourier transform. The most common form of the Fourier transform is the Continuous Fourier transform. Which represents any square integrable function f(t) as the sum of exponentials with angular frequencies w and amplitudes F(w) This is the inverse continuous Fourier transform. The Fourier transform expresses F(w) in terms of f(t). The fractional Fourier transform is a generalization of the continuous Fourier transform, and the transform can be raised to any power. The sine and cosine transforms are when f(t) is an even or odd function, without the sine or cosine terms. The discrete Fourier transforms used for scientific computation and digital signal processing. The functions xk are defined over discrete domains, and are finite or periodic. Where fj are amplitudes, if the formula is applied directly the transform requires O(n2) operations, but can only be computed in O(n log n) operations using a fast Fourier transform algorithm.

  16. Variants of the Fourier transform continued. The discrete Fourier transform is a version of the discrete-time Fourier transform, the xk are defined over discrete but infinite domains. It is the inverse for the Fourier series. To obtain the frequency data from a signal time frequencies are used. There various transforms, short time, wavelet fraction Fourier transforms. The uncertainty principle limits the ability to resolve time and frequency simultaneously.

  17. Interpretation in terms of time and frequency. When used in signal processing, the transform is a decomposition of the function into harmonics of different frequencies and takes a function in the time domain into the frequency domain, or maps the time into a frequency spectrum, where w is the angular frequency. If the function f is a function of time and represents a physical signal, the transform is a standard interpretation of the spectrum of the signal. The amplitudes of the respective frequencies (w) are represented by the size of the complex-valued function (F). The phaze shifts are represented by arctan(imaginary parts/real parts) The Fourier transforms can be used to analyse spatial frequencies, or any function domain, as not limited to functions of time and temporal frequencies

  18. Practical and real time anti-aliasing. When real time rendering is required only a few primitives are used, triangles (used in 3d graphics etc) lines and points. It is possible to ‘smudge’ the edges of these primitives, to give an anti-aliasing effect, but a problem arises when putting these primitives next to one and another. A buffer for ‘sub-pixel’ data is introduced and is used to find the uniform average. The sub pixel data contains two or more sub-pixels for the pixel, and holds the data on colour and intensity, within a grid. A ‘smoothing’ effect can be created with the use of the sub-pixel data. Information may be shared between the sub-pixels. Using this method a good image can be produced if the primitives are order carefully.

  19. Mipmapping. Another method that does not use sub-pixels is the mipmapping method it is a specialised approach for texture mapping, and can improve the speed of rendering. This method uses lower resolution, pre-filtered texture maps, and the correct resolution is chosen as required when rendering. Typically, the lower resolutions will be half of the highest resolution image, and may different resolutions may be used, i.e. half, quarter, eighth etc. This method requires careful filtering as at a high resolution the image is clear but uses more memory, at a lower resolution the image can be too unclear to view but requires less memory, so a compromise must be found. To reduce this problem rip-maps are used, which use more resolutions for the image.

  20. Mipmapping continued. Rip-maps require four times the amount of memory as the base texture map. Summed-area tables are used to reduce the amount of memory required and increase the amount of resolutions that can be used. The following equation is used to build a summed area table given a texture (tjk), the table has the same amount of entries as the texels in the texture map. The average of the texels in the rectangle (a1, b1)*(a2, b2) are given by: Summed area tables are not implemented today because of the poor cache behaviour, and because they require wider types to store the partial sums sjk than the word size used to store tjk. anisotropic mipmapping is used when a anisotropic filter is needed, which gives a compromise to the problems of rip-mapping. This method requires a higher resolution mipmap, and then several texels are averaged in one direction. This gives greater filtering in that direction. It does have a poor cache behaviour, but improves the image quality.

More Related