What are the side effects due to scan conversion? How can the effects be minimized?
Aliasing Effects (Side effects of scan conversion) Scan conversion is essentially a systematic approach to mapping objects that are defined in continuous space to their discrete approximation. The various forms of distortion that result from this operation are collectively referred to as the aliasing effects of scan conversion.
1. Staircase A common example of aliasing effects is the staircase of jagged appearance, we see when scan converting a primitive such as a line of a circle. We also see the stair steps of jaggiest along the border of a filled region.
2. Unequal Brightness Another side effect that is less noticeable is the unequal brightness of lines of different orientation. A slanted line appears dimmer than a horizontal of vertical line although all are presented at the same intensity level. The reason for this problem can be explained using Fig. below where the pixels on the horizontal line are placed one unit apart, whereas those on the diagonal line are approximately 1.414 units apart. This difference in density produces the perceived difference in brightness.
3. Picket Fence Problem The picket fence problem occurs when an object is not aligned with of does not fit into the pixel grid properly. Fig. (a) below shows a picket fence where the distance between two adjacent pickets is not a multiple of the unit distance between pixels. Scan converting it normally into the image space will result in uneven distances between pickets since the endpoints will have to be snapped to pixel coordinates. This is sometimes called global aliasing, as the overall length of the picket fence is approximately correct. On the other hand an attempt to maintain equal spacing will greatly distort the overall length of the fence. This is sometimes called local aliasing, as the distances between pickets are kept close to their true distances. Another example of such a problem arises with the outline font. Suppose we want to scan convert the uppercase character E in Fig. below from its outline description to a bitmap consisting of pixels inside the region defined by the outline. The result in Fig. exhibits both asymmetry and dropout . A slight adjustment and / of realignment of the outline can lead to a reasonable outcome.
Anti aliasing Techniques Most aliasing artifacts, when appear in a static image at a moderate resolution are often tolerable and in many cases, negligible, However, they can have a significant impact on our viewing experience when lift untreated in a series of images that animate moving objects. For example a line being rotated around one of its endpoints becomes a rotating escalator with length altering steps. A moving object with small parts of surface details may have some of those features intermittently change shape of even disappear. Although increasing image resolution is straightforward way to decrease the size of many aliasing artifacts and alleviate their negative we pay a heavy price in terms of system resource and the results are not always satisfactory. On the other hand there are techniques that can greatly reduce aliasing artifacts and improve the appearance of images without increasing their resolution. These techniques are collectively referred to as anti aliasing techniques. Some anti- aliasing techniques are designed to treat a particular type of artifact. For instance, an outline font can be associated with a set of rules or hints to guide the adjustment and realignment that is necessary for its conversion into bitmaps of relatively low resolution. An example of such approach is called the
True Type font. 1. Pre- filtering and post- Filtering Pre- filtering and post-filtering are two types of general- purpose anti- aliasing techniques. The concept of filtering originates from the field of signal processing, where true intensity values are continuous signals that consist of elements of various frequencies. Constant intensity values that correspond to a uniform region are at the low end of the spectrum. In order to lessen the jagged appearance of lines and other contours in the image space, we seek to smooth out sudden intensity changes, or in signal- processing terms, to filter out the high frequency components. A pre- filtering techniques works on the true signal in the continuous space to derive proper values for individual pixels (filtering before sampling), whereas a post- filtering techniques takes discrete samples of the continuous signal and uses the samples to compute pixel values (sampling before filtering).
2. Area Sampling Area sampling is a pre- filtering techniques in which we superimpose a pixel grid pattern onto the continuous object, definition. For each pixel area that intersects the object, we calculate the percentage of overlap by the object. This percentage determines the proportion of the overall intensity values of the corresponding pixel that is due to the object's contribution. In other words, the higher the percentage of overlap, the greater influence the object has on the pixel's overall intensity value. In fig. (a) a mathematical shown in dotted form is represented by a rectangular region that is one pixel wide. The percentage of overlap between the rectangle and each intersection pixel is calculated analytically. Assuming that the background is black and the line is white, the percentage values can be used directly to set the intensity of the pixel [see fig. (b)]. On the other hand, had the background been gray (0.5, 0.5, 0.5) and the line green (0, 1, 0), each blank pixel in the grid would have had the background gray value and each pixel filled with a fractional number F would have been assigned a value of [0.5 (1-f), 0.5 (1-f) +f, (1-f)] a proportional blending of the background and object colors. Although the resultant discrete approximation of the line in Fig. (c) takes on a blurry appearance, it no longer exhibits the sudden transition from an on pixel to an off pixel and vice versa, which is what we would get with an ordinary scan- conversion method [see in fig.] . This trade- off is characteristic of an anti- aliasing techniques based on supper sampling.
3. Super Sampling In this approach we subdivide each pixel into sub pixels and check the position of each sub pixel in relation to the object to be scan- converted. The object's contribution to a pixel's overall intensity value is proportional to the number of sub pixels that are inside the area occupied by the object. Fig 5 shows a example where we have a white object that is bounded by two slanted lines on a black background. We subdivide each pixel into nine (3*3) subpixels. The scene is mapped to the pixel values in Fig. (b). The pixel at the upper 7 right corner, for instance, is assigned- since seven of its nine sub pixels are inside the object area. Had the object been red (1,0,0) and the background light yellow (0.5, 0.5, 0), the pixel would have been assigned (1*7/9+0.5*2/9,0.5),which is (8/9,1/9,0). Super sampling is often regarded as a post filtering technique since discrete samples are first taken and then used to calculate pixel values. On the other hand it can be viewed as an approximation to the area sampling method since we are simply using a finite number of values in each pixel area to approximate the accurate analytical result.
4. Low pass Filtering This is a post filtering technique in which we reassign each pixel a new value that is a weighted average of its original value and the original values of its neighbors. A low pass filter in the form of a (2/I + 1) (2/I + 1) grid, where n> 1, holds the weights for the computation. All weight values in a filter should sum to one. An example of a 3*3 filter is given in Fig. (a). To compute a new value for pixel, we align the filter with the pixel grid and center it at the pixel. The weighted average is simply the sum of products of each weight in the filter times the corresponding pixel original value. The filter shown in fig. means that half of each pixel's original value is retained in its new value, while each of the pixel four immediate neighbors contributes one eighth of its original value in Fig. is shown in fig.(b). A low pass filter with equal weights sometimes referred to as a box filter, is said to be doing neighborhood averaging. On the other hand a filter with its weight values conforming to a two dimensional is called a Gaussian filter.
5. Pixel Phasing Pixel phasing is a hardware based anti aliasing technique. The graphics system in this case is capable of shifting individual pixels from their normal positions to the pixel grid by fraction of the unit distance between pixels. By moving pixels closer to the true line of other contour this technique is very effective in smoothing out the stair steps without reducing the sharpness of the edges.