8 - j. kajyia and m. ullner, 1981, “filtering high quality text for display on raster scan...

Upload: linalopes

Post on 06-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    1/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5, N u m b e r 3 A u g us t 1 9 8 1

    FILTERING HIGH QUALITY TEXT FOR DISPLAYON RASTER SCAN DEVICESby d. Kajiya and M. UllnerComputer Science DepartmentCalifornia Institute of Technology

    Ahstr act. Recently several investi gators havestudied the problem of displaying text characters ongrey leve l ras ter scan displ ays. Despite argumentssuggesting that g r e y l e v e l displays are equivalentto ver y high reso lu ti on bitmaps, the performance ofgrey level displ ays has been disappoint ing. Thispaper wi l l show that much of the problem can betraced to inappropriate antialiasing procedures.Instead of the classical (sin x)/x fi lt er, thesit uat ion call s For a fi lt er with characteristicsmatched hath to the nature of displ ay on CRTs and tothe h u m a n visua l system. We give examl)les toil l us tr at e the problems of the exi sti ng melhods andthe advantages of the new methods. Although thetechniques are described in terms of text , theresults have application to the general antialiasingproblem--at least in theory if not in practice.

    I . INTRODUCTION

    lhe computer age nearly destroyed qual it ypr in te d and displayed t ex t. Many of us remember ourFi rs t sig ht of the ugly, uneven impression of a highspeed c h a i n p r i n t e r . At the time, i t seemedin ev it ab le tha t high technology would sweep morebeauti ful-- and less util itarian--methods of textdi sp la y aside fo r a l l but the most premium of uses.Recentl y th is prospect has changed. With thegrowing av ai la bi li ty of raster scan displays we havewitnessed a technology with the capa bil it y ofgene rat ing alphanumeric tex t that is more than justreadable but pleasant to view as well.

    I t i s an ex ci ti ng dream of men l ike DonaldKnuth to be able to compose lo ca ll y and transmit forpubl icat ion high qual ity text containing multiplefo nt s and mathematical equations. This dream wouldbe made more at t rac t ive i f an author would be ableto see the result immediately, rather than having towait several days fo r the output of a $100,000machine. The ideal would be to close the loop: tomake ava il abl e to the author an inexpensive r ealtime device able to displ ay high performance images.

    P e r m i s s i o n t o c o p y w i t h o u t f e e a l l o r p a r t o f t h i s m a t e r i a l i s g r a n t e dp r o v i d e d t h a t t h e c o p i e s a r e n o t m a d e o r d i st r i bu t e d f o r direc tc o m m e r c i a l a d v a n ta g e , t h e A C M c o p y r i g h t n o ti c e a n d t h e t i t l e o f t h ep u b l i c a t i o n a n d i t s d a t e a p p e a r , a n d n o t i c e is g i v e n t h a t c o p y i n g i s b yp e r m i s s io n o f t h e A s s o c i a t i o n fo r C o m p u t i n g M a c h i n er y . T o c o p yo t h e r w i s e , o r t o r e p u b l i s h , r e q u i r e s a f e e a n d / o r s p e c if i c p e r m i s s i o n .

    1981 AC M O-8971-045 -1/81-0800-0007 $00.75

    F u r t h e r m o r e , t h e e f f e c t o f h i g h q u a l i t y r e a ltime dis plays on the ac ti vi ti es of computer scienceitse l.F has yet to he accurately assessed.But --asi de from the creat ion of the word processingind ust ry- -th e introduction of expanded codes toinclude rel at i ve ly mundane Features such as lowercase characters has tremendously changed the fl av ori f not the substance of programmin(t: sure ly none ofus would wish i:o return to the 5- hi t Baudot code!More importantl y, the astonishing power and economyof computer languages and mathematical notati onswhich incorporate spec ial symbols (such as APL andsymbolic l ogi c) cert ai nl y has hidden lessons f or thecomputer science community.

    Many researchers s oon discovered that theproblem of displ aying syn the ti cal ly generated imageson ra st er scan devices was a nont ri vi al task [Crow1976, al in e 1979]. lhe so cal led al iasing prohlemwas encountered due to the high frequency content ofar ti fi ci al ly synthesized images, lhese researchersdeveloped methods to overcome thi s problem which canhe viewed al ter nat ive ly as i nterpola tion ofbrightnesses between pixels or fi lt er in g with atri angul ar convolution kernel. We shall, fordef in it eness, refe r to thi s popular scheme ast r iangular F i l ter ing.lhe Fi rs t attempts to display tex t on rasterscan devices used these in tu it iv e fi lt er in g schemesthat worked sur pr isi ngl y well in practice [WarnockIg80, Sei tz ]. It is the aim of th is paper toana lyze the performance of these schemes For thegeneral image case as wel l as the te xt case. Wealso propose a new method for choosing the pi xelvalues which make up a syntheti c image, show someprel imin ary resul ts, and fi nal ly discuss the futuredi re ct io ns tha t thi s research may take.By now, th~ al iasing problem for computergenerated images is well known to all in the fi el d,as arc the frequency domain inte rpretat ion of thephenomenon and the fi rst order approximation to i tssol uti on. We wish to examine i~ detail theperformance o f th is fi rs t order approximation, Itis well known that the triangular fi lt eri ngal gori thm is cheap, fast , easy to implement, andproduces an adequate ant ia li ased image for very manyappl icat ions . There are other applications,however, that requi re higher performance. Text is

    just such an application. Characters consist almostent ire ly of sharp edges and contain small subl)ixelfeatures , such as seri fs . Also, the processing ofte xt can be done or fl in e and the resul t stored inpermanent memory. The method we present here isexpensive, slow, and rel at i ve ly hard to implement,but i t produces higher qua l i ty images than the usualtri ang ula r fi lt eri ng scheme. It is not now suitablefo r real time, or near real time, raster displayappl icat ions.

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    2/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b e r 3 A u g u st 1 9 8 1I t should be emphasized that these methods andanalyses are applic able-- at least in theory--t o thegeneral problem of ant ia li asi ng ar bi tr ar y images.We have chosen to focus on the display of tex trat her than ar bi tr ar y graphic objects becausece rt ai n computational advantages accrue due to thesmall size of characters. I f the computationalimplementat ions of these methods curren tl y were noteconomical ly impracticable we would be reporti ng on

    the general synthet ic image disp lay problem as we ll .2. AN ANALYSIS OF POPULAR ANTIAI_IASING SCIIEHESLINEAR FILTERING WITH A TRIANGULAR PSF.

    This sect ion wi l l analyze how wel l thetr ia ngu la r f il te ri ng algorithm does in removingal ia si ng while not otherwise dist orti ng the picture.The d et ai ls of the development are necessari lymathemati cal , but we present the key ideas here forthose who want an overview of the section. Thereare two primary sources of err or in the tr iangu la rfi lt er in g scheme. (I ) The tria ngle inter polat ionkernel i s not an ideal low pass fi l ter and passesfrequencies that are beyond the Nyquist l im i t.Thus, i t is subject to a li asi ng. (2) Thein te rp ol at io n kernel does not take into account thereco nst ruct ion kernel. That is, i t ignores the factth at pi xe ls on the CRT display are Gaussian spots.The Gaussian spots are not ideal Iowpass f i l tersei the r and given the usual focus set ti ng the thefrequency response of the reconstruction is far fromfl at . flow wel l do es the usual scheme work? Theanswer depends, of course, on the nature of theimages displayed, and the mathematics te l l s you howto ca lc ul ate the answer fo r your image. The gi st ofthe answer, though, is tha t for certain images l iket.ext, there is plen ty of room fo r improvement.

    lhe most popular scheme for ant ia li asi ng is toli ne ar ly fi lt er the input signal with some sort ofi nt er po lat ion kernel [Schafer and Rabiner 1973,Oetken, et . al . |975]. We focus on the case ofar ti fi ci al images such as text and computergenerated cal li gr aph ic and halftone images fo rdi sp la y on raster scan frame buf fer s. There s somecontroversy about the characteri sti cs of the optimumin te rp ol at io n kernel with respect to the amount ofri ng ing , and whether negative lobes are desi rable[Gabri el 1977]. Many workers h ave sett led on atr ia ng ul ar int erpol ati on kernel as a simplecompromise that gives good result s in practi ce andis easy to compute [Crow 1976, Warnock 1980].In the i nt er es t of concreteness we sha llre st ri ct the ensuing analysis to the tri angu larint er po lat ion case; however, the reader can read il ydiscern that the arguments involved are quitegeneral. Parts of this analysis are simi lar tothose found in [P ra tt 1978].The t r iang ular PSF is shown in Figure 1 and isgiven by the equation:

    To perform the sampling and reconstruc tion weconvolve the ideal image with the int erpola tio nkern el, sample with r aste r pitch T, and reconstructby convoIving the sampled signal with thereco nst ruct ion kernel. As is well known, thesesteps are best visualized in the frequency domain.The Fourier transform of k(~), the triangularke rn el , is K(~) as shown in Figure 2. This isc o m p a r e d w i t h t h e i dea l N y qu i s t k e rne l o f s i n ( F - j v " F ) / { ~ / f ~ .

    The analytic expression for K(cO) is

    lh i s fi gt ir e cl ea rl y shows a possible source ofal ia si ng err or allowed by thi s kernel. Namely oran i nput image f( ~) with Fourier transform F(ua) thero ot mean square a li as ing energy is given byD

    Now i f F has most of i ts energy concentrated inthe low frequencies then the al iasing er ror energyis qu it e Small since the two terms in Equation (2.1)are roughl y the sa me . Unfortunately, mostar ti fi ci al images, and especially text, have aFou rier spectrum tha t resides almost exc lusivel y inthe high f requency por tions of signal space. To getsome idea of the energy er ror involved, let us takea "l in e source", viz . a line of delta functions.This si tu at io n is to be met, fo r example, in thever y thin strokes of cl ass ic Roman capi ta ls , and inthe diagonal strokes of a cap ital A fo r the Bodonitypeface.In thi s case f (~ ) approaches a Dirac del tafunct ion who se Fourier transform, in turn,approaches a f la t spectrum. Equation (2.1) thengives

    f For ~-~ J- ~

    the re la ti ve ali asin g energy is roughlyE (lJ+l'~ ( i"i'l. J 6 ) .

    To perform the sampling step in the frequency domainwe merely re pl ic at e the signal at the samplingfrequency. Assume we have already folded in al l theal ias ing energy so tha t our modified signal appearsas in Figure 3. Sampling now rep li cat es th ismod if ied signal to something shown in Figure 4. Nowwe can recon struct the signal by passing i t througha reconstruct ion fi lt er . If the reconstructionkernel is the Nyquist kernel,

    then the signal is a low pass fi lt er ed version ofthe or ig ina l. However, in thi s matter we are notfr ee to exercise a choice for our reconstructionker ne l, except fo r a very limit ed range. Thereconst ructi on kernels available to us are fixed bythe physics of the output devices at our disposal ,whether they be ele ctr ost at ic pri nte r, COM devices,or CRT base d di sp lays. To take the most commonexample, i t is well known that the spot luminancedi st ri bu t ion fo r a CRT is Gaussian, the variance ofwhich is set by the focus ing. At the proper focuspoi nt , a fl at -f i el d rast er just becomes smooth, thi sis given roughly at the point

    w h e r e ~ i s t h e s t a n d a r d d e v i a t i o n o f t h e G a u s s i a n ,

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    3/9

    C o m p u t e r G r a p h i c s V o l um e 1 5, N u m b e r 3 A u g u s t 1 9 81

    Now, the Fourier transform of thi s reconstructionkernel is

    Thus the Final output signal looks more li ke Figure5 instead of appearing as in the normal case. Inthis picture we can see two sources of error arisingfrom the mismatch of triangular and Gaussian kernel:Imaging er ro rs and equal izat ion erro rs.Imaging er ro rs are produced by the leakage ofspurious copies of the ori ginal signal. This isgiven by

    When the Gausslan spot Is focused proper ly th iser ro r is qu ite small. (Otherwise a fl at fi el dwouldn't have appeared fl at .)By fa r the more serious error is caused by themismatch between the tr ian gle and Gaussian frequencyresponses. Let us fo r the-moment ignore the ef fe ct sof al ias ing and imaging, say by attempting todi spl ay an already pe rf ect ly bandlimited signal on apr oper ly focused display (0-=T/.66). In thi s casethe ov er al l modulation transfer function, is givenby

    lhi s curve is plotted on a dB scale inFigure 6. No te hat for the higher Frequencies theMTF is down by almost 10 (IB! Clearl y, th is amountof attenuati on is causing a signi fi can t amount ofsharpness loss, pa rt icu lar ly in the Fine features ofhigh qu ali ty fonts.

    Thtls, i f one i s constrained t o use to thel in ea r Fi l ter i ng approach, a high frequencypreemphasis is cl ea rl y called f or -- at the expense ofan increased alias ing error t radeo ff.

    OTHER KERNELS

    Many ad hoc schemes besides li near f i l ter inghave be en proposed. Many are equivalent to li nearfi lt er in g with tria ngul ar or other kernels. Theseinclude propo rti onal weighting o f the area of agiven pi xe l covered, trapezoidal decomposition,contour smoothing, and nearest neighbor schemes.One may wonder i f the above remarks apply toal l int erp ola ti on kernels as well as the tri angl e.Furthermore, there are a wealth of possiblenonl inear schemes that come to mind. One canimagine an Edison-type programme involv ing a massiveamount of experiment in order to converge on theco rr ec t so lut io n. There is , however, a non ad hoeapproach that is c losel y related to the roots of theWhittaker-Shannon sampling theorem, from which theor ig in al frequency domain analysis is derived.

    3. OPTIMLIM LINEAR SAMPLING AND RECONSTRUCTION

    Instead of choosing an ar bi tr ar y kernel andca lc ti la ti ng i ts performance, in this section wepresent an approach that calcu lates the optimumlin ear anti alia sing fi lt er for a given outputres to rat io n kernel. It turns out that this methodhas a Flaw which is corrected in the next sect ion.The fl aw is that images with negative outputs wi l lbe generated.

    In a way, we mny th ink of the image samplingand reconstruct ion procedure as an functionapproximation pr'oi}lem. We are given as basisfu nc ti ons the Gaussian spots on a CRT. The questionwe may pose then is: "What are the optimum weightsto li ne ar l y combine the basis vectors fo rapproximation of the ideal signal?"In other words, we are free to vary thebri ght ness of each pixel spot (which is a Gaussiandi st ri bu ti on ) in order to make the reconstructedsignal as "close" to the or ig inal ideal image aspos sible. In a CRT, the reconstructed image isgiven by a weighted sum of Gaus.sian bumps:go

    In this equation, x~ represents the pixelvalue, and gi (~ ) represents a Gaussian di st ri bu ti oncentered at the i ~k pixe l . See Figure 7.Each Gaussian is a shif ted version of acanonical bump:

    Now the question is. how do we measure the closenessof two images? Namely, given two images how do weassign a non-negative real number whi ch correspondsto the distance between them? The choice of such adistance metric is a nont ri vi al task--a choice onwhich the ult imate visual qual it y of the images isst ro ng ly inf luenced. We wi l l discuss the choice ofother image met rics based on the human visual systembelow, but for now we choose a pa rt icu la r metri cwhich has many pleasing anal yti c (i f not vi sua l)pr oper ti es , the mean square metric. The distancebetween two images f~ , ~ is given by

    The sampling problem may now be stated thus:Given an input image f (~), what arethe op ti mum pixel values xminimizing the er ro r between th~or ig in al image and the reconstructedimage? That is, find the values.. .. . x~, xo, x .. .. minimizing

    _ i=-~oNow, in p ract ice, there are only a f ini te number ofsample poin ts to be determined, say xa, xc, .. ., x~_ .In order to minimize this func tional we take i tsgradient and set it to zero.

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    4/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b e r 3 A u g u s t 1 9 8 1This give ri se to a system of equations

    pm ~-t:

    o r

    Doing a l i t t le algebra we obtain:,do gO

    i=O -reNow we use the ide nt i ty (2.2) to get

    ~'=oThe quan ti ti es on both sides of thi s equation havenames,

    where R~( (i -k) T) is the autocor relat ion Function ofthe Ga(~ssian spot evaluated at the point (i -k )T .The quantity on the left is simply Rfa(kT) the crossco rr el at i on of f and g at kT. 7JSe tting R_q((i-k)T)=alk" and R zl(kT)=bj~ the abovenormal equations take the fami l ia l ' form

    Ax=b.Where A is an n n matr ix cal led the Gram mat rix andb is an n-dimensional column vector, where n is thenumber of pi xe ls in the output. The optimum pix elvalues are then given by the solution of this systemof equations.

    It is wel l known that the autocorr elati onmat ri x A is of the so called symmetric Toep li tzform, vi z. i t is constant along the majordiagona ls. There ex is t fast methods to inver t suchmatr ices [Levinson 1947, Trench 1964] . The se stemfrom the fact that there are not re al ly n~independent elements but rather n. Inversion withthe Le~inson-Trench scheme is O(n 2-) instead of theUsua l n - ~ .Note that in the 2-dimensional case the matrixis no longer Toepli tz but rather Block Toep li tz,wit h Toepl it z sub-blocks, thus enabling sign if ic an teconomies in the storage and computation of thesol ut ion vectors [Ka ji ya 1981]. These savings canbe quite si gni fi can t since For a picture n pixelssquare, the fol l Gram matri x requires n~r elementsand take time O(n (e) time to solve, fo r n=512 thest ra ig ht fo rwa rd inversion scheme is well beyond theca pa bi li ti es of even the largest of computers, whil ethe Levinson-Trench recursion is quite p ract ic al .I t may seem tha t fo r text character fonts, muchof th is discussion is moot since characters arequit e small, say lOx13 pixel s. However, even forth is size, the matrices have 16900 elements, and fora 30~30 pix el font the fu ll autocorr elat ion matrixrequires almost a million entries!An important point concerns the reconstructi onkern el s. I f they were not Gaussians as in a CRT butra ther Nyquist kernels as in the ideal case, thenthe Sampling theorem obta ins. The Gramaut oco rr el at io n matrix reduces to the id en ti ty dueto the ort honormal it y of the Nyquist kernels, andthe cross correlation step corresponds to a perfectlowpass f i l ter ing and sampling operati on.

    Thus, the operation may be very roughlyinterpreted as follows:To reconstr tl ct with a given waveForm,fi rs t fi lt er by that waveform (takethe inner product) th en solve thematr ix problem with the Gram matrixof autocorrel ations. I f the matrixis la rge we may be able to ignoreedge ef fec ts and consider the matr ixsimply as a convolution with the"Green's funct ion" of the Gramoperator , which serves as anequalizing fi lt er to flat ten theresponse of the ini ti al fi lt er .

    Thus, the above process is a l inear processand, we might ad d, one that is quite fa mi li ar ince rt ai n ci rc l es . It is, however, inadequate fromseveral standpoints.

    The two major inadequacies are, f i r st ,po si ti vi ty const raints stemming from the physics ofl i gh t and the physics of the displ ay devices and,second, the inadequacy of the least square imagemetri c as a sui tab le model for vi sio n. In the nextsec ti on we discuss the f i rs t of these shortcomings,while in a later section we treat the second.

    4. TilE POSITIVITY CONSTRAINTIn th is sect ion we analyze the cause of thenegative lobes output by the optimum li near fi l ter .We also explore methods For correct ing the negativelobe output . I t turns out tha t the obvious methodof tr uncati ng the negat ive lobes at zero may or maynot work, depending upon the form of the res to rat ionkernel. We analyze the cri ter ia und er whichtru ncat ion works. Unfortunately, for the case ofin te re st , v iz. Gaussian reconstruction kernels, thecr it er ia are not met.Figure 8 shows the minimum mean square e rr orrecons tr uc ti on of an impulse using Gaussianreconstruction kernels.The re lat i ve extrema represent the strongestcon tri but ion s of each individual Gaussian spot.This response can be couched in almost tel eo log ica lterms as follows:

    To make an impulse wi th a ser ies ofGaussian bumps, take an in i t ia l bumpand shave of f the sides to narrow thebump by subt ract ing a small Gaussianfrom ei the r side. Now to compensatefor these negative lobes we add' insome po si ti ve Gaussians of smallerproportions a lit tl e fart her away,Now to compensate for these postivelobes, .. .. etc.This procedure cannot be fo ll owed i f we have, say, aseri es of potentiometers cont rol lin g the brightnessof a number of Gaussian spots. This is becauae thepots cannot be turned negative. There s no way tomake negative light--much to the Frustration of manyworkers concerned with these kind of displayproblems. Thus the display of a reconstructed imageis constrained to the pos it ive cone xo>O, x~>O,x~>O . . . ~.l>O.

    This puts on additiona l const rain t on thesampling problem. A succinct statement of theproblem is now:

    lO

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    5/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b e r 3 A u g u s t 1 9 8 1Sampling problem (with positivity):

    with x restricted to the positive cone

    How do we approach this problem? Well, one popularmethod has been to ignore i t completely: simplysolve For the unconstrained optimum reconst ructionand set any negati ve values to zero. This methodmay work in cert ai n cases. For example, i f thepict ure is suffi cie ntl y bright everywhere, thenegati ve lobe may never dip below zero. Whenever weneed to truncate negative values, however, poss ibl ysevere inaccuracies resul t. Characters, lines, andmany other graphic objects are binary pictures withthe lesser value being zero. Thus in graphics theneed to truncate arises often.lhe typical case is illustrated by the previouse x a m p l e , v i z . s a m p l i n g a n i m p u l s e . S i m p l yt r u n c a t i n g t h e n e g a t i v e l o b e s l e a v e s a c u r i o u s" r i n g i n g " p a t t e r n a r o u n d th e i m p u ls e ( F i g u r e 9 ) .T h e r i n g i n g p a t t e r n i n n o w a y c o n t r i b u t e s t o t h em i n i m i z a t i o n o f t h e m ea n s q u a r e m e t r i c , s i n c e t h e i rpr inipal Function was to compensate for thenegat ive lobes. Setting the posi tive sidelobes tozero also happens to be very close to the minimummean square error pi cture: a single Gaussian bump.Geometrically, the si tua ti on may be visual izedas in Figure 10. We have suppressed al l dimensionsexcept two and drawn contour lines for er ror. Theactual optimum can be seen to be at point A in whichxc>O but x~

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    6/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b er 3 A u gu s t 1 9 8 1We now state a Kuhn-Tucker theorem.Knhn-Tucker Theorem. Under the condi tionsmentioned above, the nonl inear programming problem(Equation 4.1) has a minimal s ol ll tion x*>O i f f thereex ist s ~,*>0 such that the Lagrangian

    ~=0has a saddle point at (x*,~,*).

    A useful inte rpret atio n of this theorem[Co l lat z and Wetterl ing 1975] is t hat at the optimumpoi nt x*, the gradient of the functional isperpendicular to the active constraininghyperplanes, vi z. the coordinate hyperplanes inwhich x* has a zero component. I f there is nocons tra ini ng act ive hyperplane th en the gradientmust be zero.The Kuhn-Tncker theorem provides the basis fora number of di ff er en t optimization algorithms. Oneof the simplest (and slowest) is the one we havechosen in thi s work: the method of feas ib ledi re ct io ns. In thi s it er at iv e method, a point x ~ isupdated by a vector proport ional to the gradient ofthe func ti onal projected upon a subspace whichmaintains the new it er at e in the posi ti ve cone:N a m e l y , % : - 6 ~

    w h e r e ~ JPl i m i t s~>0make

    is the gradient of the functional.is the project ion operator which~J to a feasible subspace, andis a sequence of numbers chosen tothe Jacobian decrease at eachi te ra t ion (Steepest descent).

    There are several sal ient points about th is methodwhich should be mentioned.Fi rs t, th is method is nonlinear, e.g.

    In pa rt ic ul ar , if c is chosen to make the bulk of cfnegati ve, then the output wi l l be zero.Second, the method can in cer ta in casescoll apse to the unconstrained case. For an inputimage tha t li es deep in the feasible set, i. e. itis po si ti ve everywhere, then one can af fo rd theluxury o f negat ive lobes because the ult imate answerwil l sti l l have only positive coeffi cients. For aninput image on the boundary of the feas ib le set,i .e. one t hat has many pix els set to zero, themethod wi l l suppress negative lobes. The nextsec ti on wi l l demonstrate how these constrai ntscontrol r inging.

    5 . R E S U L T S

    T h e a b o v e a l g o r i t h m w a s p r o g r a m m e d o n aD E C S Y S T E M - 2 0 f o r b o t h t h e o n e a n d t w o d i m e n s i o n a lcases. For the input images we hand di gi ti zedcharac ter s on ei ther a IxIDO or I00XI00 gri d. Thedecimation rat io was set to 100:16 or 6.25. Theco ef fi ci en ts were then reconstructed with a rt if ic ia lGaussian d is t ri bu ti on s of known variances.

    Results for the one dimensional ca se are asfo l lows: An impulse response centered on a samplevalue gives the ident ical answer as the tri angu larkernel in te rpol an t, a single Gaussian spot. Alsoshown is the unconstrained optimLJm for a box, whichappears in Figure 13 as a ringing si nc - l ikefunction.Figure 14 shows the ef fe ct of const rain ts uponthe negative lobes of a step response. Note thatsuppression occurs fo r not only the negativesidelobes but also for the residual posi ti vesidelobes. We st il l have ringing on the positi vepo rt ion s of the step, however. These can be removedby a ran~)o cons tr ai nt : i f we know tha t the imageshave values between 0 and 1 (as do many graphicob je cts) then const rain ing the x~ to O

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    7/9

    C o m p u t e r G r a p h i c s V o l um e 1 5, N u m b e r 3 A u g u s t 1 9 81The foremost task yet to be done is theinc lusi on of a bette r visual metric than the leastsquares metr ic. It wi ll be clear from the fol lowi ngdiscussion that a minimum mean square r econstruct ionis q uite far from optimum compared with areconst ructi on which takes into account certai n keyfeatures of the human visual system.TIIIT SINGLE CHANNEL MODELThe simplest model of the visua l system is theso-ca lled Lateral Inhi bi ti on model (also known asthe si ng le channel model). The model is given bythe following equation

    Where f(~) is the input image, ~(~) is thereconstrncted image and h(~) is a PSF known as thelater al inhi hit i on kernel (or RatliFf kernel).Thus, in th is model, each of the individua l imagesto be compared undergoes a logarit hmic poi nttransf ormation aft er which the difference isf i l tered and then summed in a mean square procedure.The frequency response corresponding to h(~) isshown in Figure Ig where the peak of the responsecurve is at about 3 cy/deg [Cornsweet 1971].

    Let us analyze th is image metric a bi t . Recallth at tile Parseval theorem rel ates mean square errorin the spa ti al domain to that in the frequencydomain [Rudin 1966]: o9~0

    App ly ing th is fo rmu la to the express ion fo r thev isua l model response we ob ta in ( v ia the convo lu t iontheorem)

    where H(~) is the Fourier transform of h(~) , ~i (~)and ~2_((~) are the Fourier transforms of log fl andlog f~- . Note that in th is form the response is justa c lass ica l we igh ted leas t square e r ro r met r icbetw een the logs of t he images. From the HTF of thev isua l sys tem (F igu re ]9 ) we see tha t th is we i gh t ingfavo rs the h igh f reque ncie s much more than the lowf r e q u e n c ie s .There a re two essen t ia l fea tu res tha t cause theopt imum image reco nstr uct i on for t i~e ord i nary leas tsquare met r ic and fo r the la te ra l inh ib i t i on modelmet r ic to d i f fe r s ign i f i can t ly . The f i r s t concernsthe re la t i ve impor tance g iven to e r ro rs a t d i f fe ren tlumin ance leve ls and the second concerns there la t ive impor tance g iven to e r ro rs a t d i f fe ren ts p a t i a l f r e q u e n c ie s .The logar i thm i c po in t t rans fo rmat ion , wh ichfo rms t i le non l inear i t y in the in i t ia l s tage o f themodel, , implements Weber 's law:

    E _ _ A Zwhere AI is the just noticeable difference inluminance and I is the average luminance. This lawholds over a range of intensities that easilyencompasses the range encountered in graphics andte xt di sp lay. It has been found that k~.02. Theprecise form for the funct ion implementing Weber'slaw is in dispute . However, al l proposed functi onsare reasonably close to the logarithm for a range ofin tens it ie s and share most of it s important

    prop erti es-- such as concavity. In words, this laws ta tes tha t sma l l lum inance e r ro rs fo r the lowlumin ance por t ions of an image are far moreobje ct i onab le than those for the h igh luminancep o r t i o n s .An opt i mal appr oxim ator using th is image metr i cwi l ] thus be more fast id io us about the low luminancepor t ions of an image, spending more of i ts er ro rbudget to fi t the data there. Since the humanvi sua l system is more sens iti ve to errors in th ispo rt io n (hence the logari thm in the model) imagesreconst ruc ted in th is manner should compare

    favorabl y to those of the ordinary least squaresmetr ic in which al l the errors are treated ase q u a l s .A second d i f fe rence is man i fes ted by thef requency we igh t ing wh ich appears in Equa t ion 6 .1 .Here the model correc t ly pred icts that we are by farmore sens i t i v e to h igh spa t ia l f requency e r ro rs . I ti s th is inc reased sens i t i v i t y a t h igh f requenc i esthat makes the ar t i fact s of fuzz y edges produced bythe t r iangu la r ke rne l - -an d the pers is ten t r ing ingproduced by the uncons t ra i ned l inear lea s t squaresapprox imant - - so ob jec t ion ab le . Bo th a r t i fac ts a rehigh f req uenc y ef fe cts whose ef fe ct is enhanced byour v isua l sys tem. Us ing the la te ra l inh ib i t io nmetr i c wi l l resu l t in improved image sharpness and

    lower r ing ing a t the expense o r o f h igher e r ro rs a tthe low f requency por t ions o f the image , wh ichpres umabl y we do not see.The methods For calc nlat ion of an opt i malappr oxim ant for such an image metr ic have yet to beresol ved. Intr oduct ion of the logarithmicnon li nea ri ty (or any other nonline arity popular invisual modelli ng) causes a loss of convexi ty for thefun ct ion al . Thus , the Kuhn-Tucker theorems may notbe applied dir ect ly. We are currently investigatingimplementations which will bypass this difficulty.

    HULTICHANNEL MODELS

    More rea l i st ic visual models can be consideredfor use in the op t ima l approximan t scheme.Cur ren t ly popu la r in the psychophys ica l l i t e ra tu r eare a c las s of models know as mult icha nnel models[Graham and Nachmias 1971, Hos taf avi and Sakr is on1976, Kaji ya 1979]. In these models the image,a f te r pass ing th rough a non l inear i t y , i s no tf i l te red by a s ing le f requency shaping ne twork bu trath er by many bandpass channels of vary ingsens i t i v i t i es. There is a cer t a in amount ofcon t roversy over the charac te r is t i cs o f suchchannels and the mode of summation of the outputs ofsuch channe ls , but i t i s a p romis ing poss ib i l i t ythat L metr i cs rath er than L m etr i cs may be c los erto the t rut h. I f t h is i s the case then the door isopen for n onl i near Chebyshev techni ques to beapp l ied to the an t ia l ias ing p rob lem.

    CONCLUSIONS

    There is fa r more to the an t ia l ias ing p rob lemthan simp le l ine ar f i l t er in g. We have analyzed theper fo rmance o f the l inear F i l te r ing approach toant i a l i asin g, and int rodu ced the use of morep o w e r f u l t e c h n iq u e s f o r c e r t ai n c r i t i c a lapp l ica t i ons such as the d isp lay o f h igh qua l i t ytex t . Perhaps someday computa t iona l techn iques w i l lbe d iscovere d to pe r fo rm these ca lcu la t i ons fo r moregene ral synt het i c images. For now, though, theprac t ica l use o f ou r techn ique is l im i ted to imageswith relatively small pixel sizes--such as thedisplay of text characters.

    13

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    8/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b e r 3 A u g u s t 1 9 81

    R E F E R E N C E S

    B l i n n J . F . ( 1 9 7 8 ) " C o m p ut e r" D i s p l a y o f C u r v e ds u r f ' a c e s " U . U t a h P h . D . T h e s i s , D ec e m be r1 9 7 8 .C o l l a t z L . a n d W e t t e r l i n g W . ~ 1 9 7 5 ) O P T I M IZ A T I O NM [ I II O D S , S p r i n g e r V e r l a g , B e r l i n .C o r n s w e e t T . ( 1 9 7 0 ) V I S U A L P E RC E PT IO N , A c a d e m i cP r e s s , N ew Y o r k .C r o w F . C . ( 1 9 7 6 ) " T h e a l i a s i n g p r o l ) le m i nC o m p u t e r - s y n t h e s i z e d s h a d e d i m a g es " U . U t a hC o m p u t e r S c i e n c e T e e h R e p t . U T E C - C s c - T G - O I 5 .G a b r i e l S . A . ( 1 9 7 7 ) P r i v a t e c o m m u n i c a t io n .G r a h a m N . a n d N a c h m i a s J . ( 1 9 7 1 ) " D e t e c t i o n o fg r ~ , l i n g p a t t e r n s c o n t a i n i n g t w o s p a t i a lf r e q u e n c i e s : a c o m p a r i s o n o f s i n g l e c h a n n e la n d m u l t i p l e c h a n n e l m o d e l s " V i s i o n R e s . , v .1 1 , p p . 2 5 1 - 2 5 9 .K a j i y a , J . T . ( 1 9 7 9 ) " T o w a r d a H a t h e m a t i c a l T h e o r yo f P e r c e p t i o n " , P h . D . T h e s i s , U . U t a h .K a j i y a J . T . ( 1 9 8 1 ) " O n f a s t m e t ho d s f o r t w od i m e n s i o n a l s p e c t r a l f a e t o r i z a t i o n " , t o a p p e a r .L e v i n s o n N . ( 1 9 4 7 ) " T h e W i e n e r RM S e r r o r c r i t e r i o ni n f i l t e r d e s i g n a n d p r e d i c t i o n " J . M a t h .P h y s . v . 2 5 , n o . 4 , p p . 2 6 1 - 2 7 8 .H o s t a f a v i H . a n d S a k r i s o n D .J . ( 1 9 7 6 ) " S t r u c t u r ea n d p r o p e r t i e s o f a s i n g l e c h a n n e l i n th e h um a nv i s u a l s y s t e m " V i s i o n R e s . , v . I G , p p .9 5 7 - 9 6 8 .O e t k e n G . , P a r k s T . W . , S c h u e s s l e r H .W . ( 1 9 7 5 ) "N e wr e s u l t s i n t h e d e s i g n o f d i g i t a l i n t e r p o l a t o r s "] E E E T r a n s . A S SP , v . A S S P - 2 3 , p p . 3 0 ] - 3 0 9 .P r a t t W . K . ( 1 9 7 8 ) D I G I T A L I MA GE P RO C E SS IN G ,W i l e y - l n t e r s c i e n c e .R t m d i n W . ( 1 9 6 6 ) R E A L A N D C O M PL E X A N A L Y S l S ,M c G r a w - l l i l l , N ew Y o r k .S a c h s M . B . , N a c h m i a s J . a n d R o b so n J . G . ( 1 9 7 1 )" S p a t i a l f r e q u e n c y c h a n n e l s i n h um an v i s i o n " J .O p t i c a l S o c . A m . , v . 6 1 , p p . 1 1 7 6 - 1 1 8 6 .S a k r i s o n D . O . ( 1 9 7 7 ) " O n t h e r o l e o f t h e o b s e r v e ra n d a d i s t o r t i o n m e a s u r e i n i m ag e t r a n s m i s s i o n "I E E E T r a n s . o n C o m m u n i c a t i o n s , v . C 0 M - 2 5 , p p .1 2 5 1 - 1 2 6 7 .S c h a f e r R .W . a n d R a b i n e r L . R . ( 1 9 7 3 ) " A d i g i t a ls i g n a l p r o c e s s i n g a p p r o a ch t o i n t e r p o l a t i o n "P r e c . I E E E v . 6 1 , p p . 6 9 2 - 7 0 2 .T r e n c h W . F . ( 1 9 6 4 ) " A n a l g o r i t h m f o r t h e i n v e r s i o no f f i n i t e l o e p l i t z m a t r i c e s " J . S IA M v . 1 2 ,n o . 3 , p p . 5 1 5 - 5 2 2 .S e i t z C . , e L . a l . " D i g i t a l V i d e o D i s p l a y s y s t e mw i t h a P l u r a l i t y o f G r e y - s c a l e l e v e l s " US

    P a t e n t 4 , 1 5 8 , 2 0 0 .W a r n o c k O . E . ( 1 9 8 0 ) " T h e D i s p l a y o f C h a r a c t e r sU s i n g G r a y l e v e l S a m p l e a r r a y s " A CM S IG G R A P H 80 ,

    p p . 3 0 2 - 3 0 7 .

    F i g u r e t .

    F i g u r e 2 .

    F i g u r e 3 .

    F i g u r e 4 .

    F i g u r e 5 .

    Figure 6 .

    F i g u r e 7 .

    7-

    /

    t rT

    FT .....

    ] 4

  • 8/3/2019 8 - J. Kajyia and M. Ullner, 1981, Filtering High Quality Text For Display On Raster Scan Devices

    9/9

    C o m p u t e r G r a p h i c s V o lu m e 1 5 , N u m b e r 3 A u g u st 1 9 8 1

    Figure 8. Figure 9.

    l:igure 10.J

    Figure 11.8 C

    Figure 13.

    Figure 14.

    Figure t 5 .

    Figure 19.

    Figure 12.

    Figure 16. Figure 17. F i g u r e 1 8 .

    ]5