@ @ Computer Graphics, Volume 25, Number 4, July 1991 An Efficient Antialiasing Technique Xiaolin Wu Department of Computer Science University of Western Ontario London, Ontario, Canada N6A 5B7 Abstract– An intuitive concept of antialiasing is developed into very efficient antialiased line and cir- cle generators that require even less amount of inte- ger arithmetic than Bresenham’s line and circle algo- rithms. Unlike its predecessors, the new antialiasing technique is derived in spatial domain (raster plane) under a subjectively meaningful error measure to pre- serve the dynamics of curve and object boundaries. A formal analysis of the new antialiasing technique in fre- quency domain is also conducted. It is shown that our antialiasing technique computes the same antialiased images as Fujimoto-Iwata’s algorithm but at a fraction of the Iat ter’s computational cost. The simplicities of the new antialiased line and circle generators also mean their easy hardware implementations. CR Category: 1.3.3 [Computer Graphics]: Pic- ture/Image Generation - display algorithms. Key Words: Antialiasing, curve digitization, digital geometry, convolution. 1 Introduction Curve-rendering on raster devices, a fundamental oper- ation in computer graphics, is essentially a process of quantizing (digitizing) continuous two-dimensional vi- sual signals at the sampling rate of device resolution. This sampling rate is usually significantly lower than twice the maximum frequency of object boundaries and Perm}ssmn10copywithoutfeeall or part nf this material is grarrled provided that the copies are rtol made or distributed for direct cnmrnerclal advantage. the ACM cnpyright notwc and [he [itle of the publication and m date appear. and notice is given [hat cupying is by permissmn of the Association fur Cumputing Machinery. To copy otherwise, nr to republish. requires i fee and/nr specific pmrriss ion curve edges, 1 resulting in loss of information as ex- plained by the Shannon sampling theorem. This in- formation loss is the reason for the existence of visu- ally unpleasant “aliasing” (staircasing effect) on dig- itized object boundaries and curves. There are two ways to attack the problem: increasing the sampling rate and removing high frequency components of the image. The first approach calls for increasing the res- olution of the raster device. But the size of frame buffer and consequently the rendering costs increase quadratically in the resolution. Even at a resolution of 1024 x 1024, objectionable staircasing effects still exist. High-resolution alone is not an economic solu- tion to the problem. The second approach of filtering high frequency components of the image was adopted by many researchers [1, 4, 5, 6, 7, 8] to combat alias- ing. These techniques utilize grayscales to increase the effective spatial resolution. The disadvantages of the second approach are high computational cost involved in low-pass filtering operations, and fuzzy object edges. Proposed in this paper is a new concept of an- tialiasing that leads to efficient smooth curve render- ing algorithms. Our antialiasing research is done in both spatial and frequency domains. The new algo- rithms achieve exactly the same antialiasing effects as Fujimot~Iwata’s algorithm for line segments but at a fraction of the latter’s cost. A new antialiased line gen- erator is designed for smooth line generation that re- quires only half as much integer arithmetic as Bresen- ham’s line algorithm [2]. And the antialiased line gener- ation can be easily implemented by hardware. Smooth circles can also be generated by the new technique I For phy~i~~ di~plays a curve should be mOdekd = a narrow 2-dimensional image rather than a l-dimensional mathematical entity of no area. ‘, 1991 .4CM-()-89791-43h-X’9 1/M7/()143 $0075 I43
10
Embed
An Efficient Antialiasing Technique - GitLab · anti-aliasing scheme Eq(3) is a two-step process. First the image of the curve y = j(x) is modeled by the two dimensional impulse signal
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
@ @ Computer Graphics, Volume 25, Number 4, July 1991
An Efficient Antialiasing Technique
Xiaolin Wu
Department of Computer Science
University of Western Ontario
London, Ontario, Canada N6A 5B7
Abstract– An intuitive concept of antialiasing is
developed into very efficient antialiased line and cir-
cle generators that require even less amount of inte-
ger arithmetic than Bresenham’s line and circle algo-
rithms. Unlike its predecessors, the new antialiasing
technique is derived in spatial domain (raster plane)
under a subjectively meaningful error measure to pre-
serve the dynamics of curve and object boundaries. A
formal analysis of the new antialiasing technique in fre-
quency domain is also conducted. It is shown that our
antialiasing technique computes the same antialiased
images as Fujimoto-Iwata’s algorithm but at a fraction
of the Iat ter’s computational cost. The simplicities of
the new antialiased line and circle generators also mean
their easy hardware implementations.
CR Category: 1.3.3 [Computer Graphics]: Pic-
ture/Image Generation - display algorithms.
Key Words: Antialiasing, curve digitization, digital
geometry, convolution.
1 Introduction
Curve-rendering on raster devices, a fundamental oper-
ation in computer graphics, is essentially a process of
sual signals at the sampling rate of device resolution.
This sampling rate is usually significantly lower than
twice the maximum frequency of object boundaries and
Perm}ssmn10copywithoutfee all or part nf this material is grarrledprovided that the copies are rtol made or distributed for directcnmrnerclal advantage. the ACM cnpyright notwc and [he [itle of thepublication and m date appear. and notice is given [hat cupying is bypermissmn of the Association fur Cumputing Machinery. To copyotherwise, nr to republish. requires i fee and/nr specific pmrrission
curve edges, 1 resulting in loss of information as ex-
plained by the Shannon sampling theorem. This in-
formation loss is the reason for the existence of visu-
ally unpleasant “aliasing” (staircasing effect) on dig-
itized object boundaries and curves. There are two
ways to attack the problem: increasing the sampling
rate and removing high frequency components of the
image. The first approach calls for increasing the res-
olution of the raster device. But the size of frame
buffer and consequently the rendering costs increase
quadratically in the resolution. Even at a resolution
of 1024 x 1024, objectionable staircasing effects still
exist. High-resolution alone is not an economic solu-
tion to the problem. The second approach of filtering
high frequency components of the image was adopted
by many researchers [1, 4, 5, 6, 7, 8] to combat alias-
ing. These techniques utilize grayscales to increase the
effective spatial resolution. The disadvantages of the
second approach are high computational cost involved
in low-pass filtering operations, and fuzzy object edges.
Proposed in this paper is a new concept of an-
tialiasing that leads to efficient smooth curve render-
ing algorithms. Our antialiasing research is done in
both spatial and frequency domains. The new algo-
rithms achieve exactly the same antialiasing effects as
Fujimot~Iwata’s algorithm for line segments but at a
fraction of the latter’s cost. A new antialiased line gen-
erator is designed for smooth line generation that re-
quires only half as much integer arithmetic as Bresen-
ham’s line algorithm [2]. And the antialiased line gener-
ation can be easily implemented by hardware. Smooth
circles can also be generated by the new technique
I For phy~i~~ di~plays a curve should be mOdekd = a narrow
2-dimensional image rather than a l-dimensional mathematicalentity of no area.
But it is not restricted to those two graphics primi-
tives. The intensity interpolation of Eq(3) applies to
any curves or object edges. We should not partition a
general curve into line segments and then antialias line
Figure 7: Circles by Bresenham’s (above) and the new
antialiasing algorithms (below).
150
630 Comwter GraDhics. Volume 25. Number 4. Julv 1991
segments as suggested by some authors before. Insteadan antialiased curve can be computed by directly scan-converting the curve, i.e., for increasing raster ordinatei, computing f(i) and then interpolate the intendedcurve intensity Is between the two pixels (i, Lr(i)J) and(i, [f(i)]). The main cost is to compute the real valuef(i), but it is required by scan-conversion anyway. Soantialiasing will not be a computational burden for gen-eral curves.
Although our algorithms were presented for antialias-ing curves, their extension to object boundaries isstraightforward. We simply partition the object bound-aries into x-dominant and y-dominant curve segments,and scan-convert them. It is easy to determine whichside of such a curve segment is exterior. We use Eq(3)to interpolate the object color on two adjacent pixelsat the two sides of the continuous boundary curve, andthen blend the outer pixel value with the backgroundcolor. Let Ic and Ib be the intensities (colors) for objectand its background, and d < 1 be the distance betweenthe outer pixel and the true object boundary, then theblending formuIa for the boundary pixel is
I = dlo + (1 - d)lb. (19)
Note that unlike the blending formula by Fujimoto andIwata [6] no division is required here. Furthermore, forantialiasing polygon edges in uniform background, wecan solve Eq(19) incrementally with only integer addi-tions and binary shifts much like our antialiased linealgorithm. We will not pursue this efficiency issue anyfurther due to the space limitation. The performance ofthe new technique on antialiased object edges in color-ful background is shown by Fig. 8, where a filled circlewit11 antialiasing in a complex background is comparedwith the one without. The antialiased filled circle ap-pears smooth and sharp. Note that the results of Fig.8 were obtained on an g-bit color device, so color quan-tization was necessarily performed. On a 24-bit colordevice with more subtle shades available the antialiaseddisk looked even better.
Our antialiasing technique has the same subpixel ad-dressability as Fujimoto-Iwata’s method due to theirequivalence.
8 Conclusion
Unlike all previous antialiasing research, our two-pointantialiasing scheme was derived in spatial domain un-der a subjectively meaningful error measure to preserve
Figure 8: Filled circles embedded in colorful back-ground without antialiasing (above) and with antialias-ing (below).
151
SIGGRAPH ’91 Las Vegas, 28 July-2 August 1991
dynamic information of the original curves or object
edges. The behaviour of this antialiasing scheme in fre-
quency domain was also analyzed. It was shown that
the new antialiasing technique can generate smooth line
segments and circular arcs at even higher speeds than
those of Bresenham’s line and circle algorithms. The
hardware or assembly-language realization of our new
antialiasing algorithms ia straightforward. These fea-
tures have practical significance when antialiasing is
performed on small economical graphics devices or in
time-constrained applications.
Acknowledgment
The author gratefully acknowledges the financial sup-
port of the Canadian Government through NSERC
grant 0GPO041926 and thanks SIGGRAPH reviewers
for their polishing of his original manuscript.
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
A. C. Barkans, “High speed high quality an-
tialiased vector generation,” Computer Graphics,
vol. 24, no. 4, p. 319-326, Aug. 1990.
J. E. Bresenham, “Algorithm for computer control
of digital plotter,” IBM Syst. J., vol. 4, no. 1, 1965,
p. 25-30.
J. E. Bresenham, “A linear algorithm for incremen-
tal digital display of circular arcs”, Comm. ACM,
vol. 20, no. 2, 1977, p. 750-752.
F. Crow, “The aliasing problem in computer-
generated shaded images: Comm. ACM, vol. 20,
no. 11, Nov. 1977.
D. Field, “Algorithms for drawing anti-aliased cir-
cles and ellipses,” Computer Vision, Graphics, and
Image l%oc., vol. 33, p. 1-15, 1986.
A. Fujimoto and K. Iwata, “Jay-free images on
raster displays,” IEEE CG&A, vol. 3, no. 9, p. 26-
34, Dec. 1983.
S. Gupta and R. F. Sproull, “Filtering edges for
gray-scale displays,” Computer Graphics, vol. 15,
no. 3, p. 1-5, Aug. 1981.
M. Pitteway and D. Watkinson, “Bresenham’s al-
[9]
10]
11]
[12]
[13]
[14]
X. Wu and J. Rokne, “Double-step incremental
generation of lines and circles”, Computer Vision,
Graphics, Image Proc., vol. 37, 1987, p. 331-344.
X. Wu and J. Rokne, “On properties of discretized
convex curves,” IEEE Thans. Pattern Analysis and
Machine Intelligence, vol. 11, p. 217-223, Feb.
1989.
X. Wu and J. Rokne, “Double-step generation of
ellipses”, IEEE CG&A, vol. 9, no. 3. p. 56-69, May