JP3297512B2 - Anti-aliasing method and apparatus - Google Patents

Anti-aliasing method and apparatus

Info

Publication number
JP3297512B2
JP3297512B2 JP27477493A JP27477493A JP3297512B2 JP 3297512 B2 JP3297512 B2 JP 3297512B2 JP 27477493 A JP27477493 A JP 27477493A JP 27477493 A JP27477493 A JP 27477493A JP 3297512 B2 JP3297512 B2 JP 3297512B2
Authority
JP
Japan
Prior art keywords
polygon
coordinate
weight
edge
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP27477493A
Other languages
Japanese (ja)
Other versions
JPH07105387A (en
Inventor
景範 梶原
勝 藤野
正人 緒方
晴二 船矢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Precision Co Ltd
Original Assignee
Mitsubishi Precision Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Precision Co Ltd filed Critical Mitsubishi Precision Co Ltd
Priority to JP27477493A priority Critical patent/JP3297512B2/en
Publication of JPH07105387A publication Critical patent/JPH07105387A/en
Application granted granted Critical
Publication of JP3297512B2 publication Critical patent/JP3297512B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、計算機で画像を生成
する場合に、画像を表現する要素である画素が有限の大
きさを有するために生ずる不自然さ(エイリアシング)
を軽減する方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an unnaturalness (aliasing) caused when a pixel, which is an element representing an image, has a finite size when an image is generated by a computer.
And a method and apparatus for mitigating mitigation.

【0002】[0002]

【従来の技術】コンピュータ・グラフィックスにおいて
は、画像は有限の大きさを持った画素の集合として表現
される。これは数学的には、表示すべき画像を、画素の
大きさで定まる空間周波数でサンプリングした画像を表
示したことになる。従って、表示しようとしている画像
がサンプリング周波数の1/2よりも高い周波数成分を
含んでいるとエイリアシングを生じる。なお、表示すべ
き画像はポリゴン(polygon(多角形))の集合
として表わされる。ここで、各ポリゴンは多角形面を囲
むエッジにより構成され、各エッジのそれぞれは、それ
自身が区切る領域の一方に多角形面を形成可能な、面指
定領域を備える。図2(a)で21がエッジ、斜線側が
面指定領域として示される。
2. Description of the Related Art In computer graphics, an image is represented as a set of pixels having a finite size. Mathematically, this means that an image to be displayed is sampled at a spatial frequency determined by the pixel size. Therefore, if the image to be displayed contains a frequency component higher than 1/2 of the sampling frequency, aliasing occurs. The image to be displayed is represented as a set of polygons. Here, each polygon is constituted by edges surrounding a polygonal surface, and each of the edges has a surface designation area in which a polygonal surface can be formed in one of regions divided by itself. In FIG. 2A, 21 is an edge, and the hatched side is a surface designation area.

【0003】エイリアシングを除去するには、表示すべ
き画像がサンプリング周波数の1/2よりも高い周波数
成分を含まないように空間フィルタをかけた画像を表示
する必要がある。空間フィルタの重み関数の形状として
は、フラット、ピラミッド型(正四角錘として仮想され
る型)、三角屋根型(x軸を主走査方向、xy面を表示
画面として、xz面に2等辺三角形が投影されるように
仮想される型)、かまぼこ型(xz面に半円が投影され
るように仮想される型)等種々の重み関数が用いられ、
積分範囲としては1×1,1×2,2×2画素(ピクセ
ル)等が用いられる。このとき、1ピクセルを縦横J
(J≧2)個のサブピクセルに分割し、その1ピクセル
を中心に含み縦がL個、横がN個のサブピクセルを空間
フィルタの積分範囲とする。例えば、1ピクセルを4×
4のサブピクセルとし、積分範囲が2×2ピクセルのと
きは、8×8サブピクセル/積分範囲となる。図3に表
示画面31、ポリゴン32、ポリゴンエッジ33、ピク
セル34、サブピクセル35、セグメント36、セグメ
ントエッジ37及び積分範囲38が図示される。重みw
は、重み関数をψ(ξ,η)、ポリゴンが積分範囲につ
いて占める面積をSとして、(1)式で表わされる。ま
た、図4に積分範囲の他の例と座標ξ,ηがセグメント
エッジ47、積分範囲48とともに示される。
To remove aliasing, it is necessary to display an image that has been spatially filtered so that the image to be displayed does not contain a frequency component higher than 1/2 of the sampling frequency. As the shape of the weighting function of the spatial filter, a flat, pyramid type (a type assumed as a square pyramid), a triangular roof type (an x-axis is a main scanning direction, an xy plane is a display screen, and an isosceles triangle is an xz plane) Various weighting functions such as a type that is imagined to be projected), a kamaboko type (a type that is imagined so that a semicircle is projected on the xz plane) are used,
As the integration range, 1 × 1, 1 × 2, 2 × 2 pixels (pixels) and the like are used. At this time, one pixel is
The image is divided into (J ≧ 2) sub-pixels, and L sub-pixels and N sub-pixels including one pixel at the center are defined as an integration range of the spatial filter. For example, one pixel is 4 ×
If there are 4 sub-pixels and the integration range is 2 × 2 pixels, then 8 × 8 sub-pixels / integration range. FIG. 3 shows the display screen 31, polygon 32, polygon edge 33, pixel 34, sub-pixel 35, segment 36, segment edge 37, and integration range 38. Weight w
Is expressed by equation (1), where 重 み (ξ, η) is the weighting function and S is the area occupied by the polygon in the integration range. FIG. 4 shows another example of the integration range and the coordinates ξ and η together with the segment edge 47 and the integration range 48.

【0004】[0004]

【数1】 (Equation 1)

【0005】このとき、フィルタリングの計算を算術的
に行なうことは回路が複雑となり、また演算速度も低い
ので、予めフィルタリングをオフラインで計算しておい
てその結果を格納した関数テーブルをひく方法が一般に
とられる。しかし、この関数テーブルをひくために1次
変数として、ポリゴンを構成するエッジ(edge)の
両端点を与えるのであるが、その点を表わすビット数が
多いので非常に大きな関数テーブルが必要になる。
At this time, arithmetically performing the calculation of the filtering requires a complicated circuit and a low operation speed. Therefore, a method of calculating the filtering offline in advance and running a function table storing the result is generally used. Be taken. However, in order to draw this function table, both ends of an edge (edge) constituting a polygon are given as primary variables. However, since the number of bits representing the point is large, a very large function table is required.

【0006】そこで従来、関数テーブルを小さくするた
めに、関数テーブルの1次変数として、エッジの傾斜角
θと積分範囲の中心からのエッジの距離rとを用いる方
法がとられた。
Therefore, conventionally, in order to reduce the size of the function table, a method has been adopted in which the inclination angle θ of the edge and the distance r of the edge from the center of the integration range are used as primary variables of the function table.

【0007】図5は上記のような関数テーブルを用いた
従来方式を説明する機能ブロック図である。図5におい
て、51はソフトウェアで実現する座標変換手段であ
り、エッジの両端点の座標を入力して傾斜角θと積分範
囲の中心からの距離rとを計算する。521,522,
523,524はROMあるいはRAMのメモリで構成
するエッジマスク計算テーブルであり、予めエッジのマ
スクパターンを計算してその結果を格納し、前記エッジ
の傾斜角θと積分範囲の中心からの距離rとを用いてそ
れに対応するマスクパターンを読み出すものである。5
31,532,533はアンド回路で構成するポリゴン
マスク算出手段、541,542,543,544,5
45,546,547,548はROMあるいはRAM
のメモリで構成する重みテーブルであり、予めマスクパ
ターンの部分に応じた重みを計算してその結果を格納
し、マスクパターンの部分集合に応じた重みを読み出す
ものである。55はフレームバッファで構成する積算部
であり、重みテーブル541〜548から読み出したマ
スクパターンの部分のデータを全体のデータにするもの
である。なお、マスクパターンは、エッジに関しては面
指定領域が切り取ることにより対象の領域に形成される
パターンを、ポリゴンに関してはそのポリゴン自身が切
り取ることにより対象の領域に形成されるパターンをい
う(図2参照)。図2(a),(b)において、積分範
囲が正方形で示され、エッジ21により構成されるポリ
ゴン内部方向すなわち面指定領域が斜線で示されて、こ
の斜線部分をエッジ21の積分範囲に対するマスクパタ
ーンといい、同様にエッジ22,23,24のマスクパ
ターンが図2(c),(d),(e)に示される。更
に、図2(h)に積分範囲に対するマスクパターンが示
される。
FIG. 5 is a functional block diagram illustrating a conventional method using the above function table. In FIG. 5, reference numeral 51 denotes a coordinate conversion unit implemented by software, which inputs coordinates of both ends of an edge and calculates a tilt angle θ and a distance r from the center of the integration range. 521,522,
Reference numerals 523 and 524 denote an edge mask calculation table composed of a ROM or a RAM. The edge mask calculation table calculates an edge mask pattern in advance, stores the result, and stores the edge inclination angle θ and the distance r from the center of the integration range. Is used to read the corresponding mask pattern. 5
31, 532, 533 are polygon mask calculating means constituted by AND circuits, 541, 542, 543, 544, 5
45,546,547,548 are ROM or RAM
Is a weight table composed of a memory for calculating a weight corresponding to a portion of a mask pattern in advance, storing the result, and reading a weight corresponding to a subset of the mask pattern. Reference numeral 55 denotes an integrating unit formed of a frame buffer, which converts the data of the mask pattern portion read from the weight tables 541 to 548 into the entire data. Note that the mask pattern refers to a pattern formed in the target area by cutting out the surface designation area for an edge, and a pattern formed in the target area by cutting out the polygon itself for a polygon (see FIG. 2). ). 2A and 2B, the integration range is indicated by a square, the internal direction of the polygon constituted by the edge 21, that is, the surface designation area is indicated by hatching, and the hatched portion is a mask for the integration range of the edge 21. This is called a pattern, and mask patterns of the edges 22, 23, and 24 are similarly shown in FIGS. 2C, 2D, and 2E. FIG. 2H shows a mask pattern for the integration range.

【0008】座標変換手段51には、この前段に位置す
る図示しない幾何計算手段からポリゴンのエッジが計算
され、そのデータとしてポリゴンの各エッジの直線を表
わすものとしてその両端点の位置情報が直角座標で送ら
れる。このとき、直線で区切られる領域のいずれがポリ
ゴンの内部であるかを示す符号がともに送られる。1つ
のエッジの両端点(xt,yt),(xb,yb)が図6に
例示される。座標変換手段51では、このエッジの両端
の位置情報をもとに、各ピクセルについてそれが含まれ
る積分範囲の中心からの距離rとエッジの傾斜角θが計
算される。各エッジの傾斜角θ1、θ2、θ3、θ4及び積
分範囲の中心からの距離r1、r2、r3、r4の例が図6
に示される。図2(a)にはエッジ21の傾斜各θi
積分中心からの距離rcが示される。
The coordinate conversion means 51 calculates the edges of the polygon from a geometric calculation means (not shown) located at the preceding stage, and as its data, the position information of the both ends of the polygon is represented by rectangular coordinates. Sent by At this time, a code indicating which of the areas separated by the straight line is inside the polygon is sent together. Both end points (x t , y t ) and (x b , y b ) of one edge are illustrated in FIG. The coordinate conversion means 51 calculates the distance r from the center of the integration range including each pixel and the inclination angle θ of the edge based on the position information of both ends of the edge. FIG. 6 shows examples of the inclination angles θ 1 , θ 2 , θ 3 , θ 4 of each edge and the distances r 1 , r 2 , r 3 , r 4 from the center of the integration range.
Is shown in Distance r c from the integrating center and inclined each theta i of the edge 21 is shown in FIG. 2 (a).

【0009】あるピクセルについて、前記各エッジに対
する傾斜角θと積分範囲の中心からの距離rを入力した
エッジマスク計算テーブル521,522,523,5
24は、それぞれのエッジに対するマスクパターンを読
み出す。
For a certain pixel, edge mask calculation tables 521, 522, 523, and 5 in which the inclination angle θ with respect to each edge and the distance r from the center of the integration range are input.
24 reads the mask pattern for each edge.

【0010】第1のエッジマスク計算テーブル521と
第2のエッジマスク計算テーブル522から読み出され
た各8×8ビットの各エッジに対するマスクパターンm
1,m2は、第1のポリゴンマスク算出手段531におい
て、対応する各ビット毎に論理積がとられる(図2
(f)参照)。第3のエッジマスク計算テーブル523
と第3のエッジマスク計算テーブル524から読み出さ
れたマスクパターンm3,m4は、第2のポリゴンマスク
算出手段532において、対応する各ビット毎に論理積
がとられる(図2(g)参照)。第1、第2のポリゴン
マスク算出手段531,532の各出力は、第3のポリ
ゴンマスク算出手段533において、対応する各ビット
毎に論理積がとられ、図2(h)の斜線で示されるよう
な、ポリゴンの積分範囲に対するマスクパターンが得ら
れる。
A mask pattern m for each 8 × 8 bit edge read from the first edge mask calculation table 521 and the second edge mask calculation table 522
1 and m 2 are ANDed for each corresponding bit in the first polygon mask calculating means 531 (FIG. 2).
(F)). Third edge mask calculation table 523
And the mask patterns m 3 and m 4 read from the third edge mask calculation table 524 are ANDed for each corresponding bit in the second polygon mask calculation means 532 (FIG. 2 (g)). reference). Each output of the first and second polygon mask calculation means 531 and 532 is ANDed for each corresponding bit in the third polygon mask calculation means 533, and is indicated by the oblique lines in FIG. Such a mask pattern for the integration range of the polygon is obtained.

【0011】第3のポリゴンマスク算出手段533から
出力される8×8ビットの内、図7(a)のように、各
行8ビットずつをサブマスクパターンM1,M2,……M
8に分割され、各行に割当られるサブマスクパターンMi
の8ビットデータを順次重みテーブル541,542,
……548に入力する。各重みテーブル54iには、予
め定められた重み関数により重みが計算されていて、入
力したパターンにより重みが読み出される。例えば、第
2番目の行に相当するサブマスクパターンM2について
は、図7(b)のように積分領域全体に対して当該第2
番目の行の部分が携わる重みが各ビット毎に計算されて
いて、サブマスクパターンM2が有効となるビットにつ
いてその重みw2が得られる。
[0011] Of the 8 × 8-bit output from the third polygon mask calculating means 533, FIG. 7 (a), in the sub-mask pattern M 1 to 8 bits each row, M 2, ...... M
8 and the sub-mask pattern M i assigned to each row
Are sequentially stored in the weight tables 541, 542,
... Input to 548. In each weight table 54i, a weight is calculated by a predetermined weight function, and the weight is read based on the input pattern. For example, for the sub-mask patterns M 2 corresponding to the second row, the relative total integration region as shown in FIG. 7 (b) second
Th part of the row weights involved are being calculated for each bit, the weight w 2 is obtained for bit sub mask pattern M 2 is effective.

【0012】積算部55では、各サブマスクパターンM
1,M2,……M8から得られる重みw1,w2,……w8
その積分範囲の重みWとして、画面表示のためのフレー
ムメモリに出力しておく。積算部55への重みデータの
格納は次のように行なわれる。
In the integrating section 55, each sub-mask pattern M
The weights w 1 , w 2 ,..., W 8 obtained from 1 , M 2 ,..., M 8 are output to the frame memory for screen display as the weights W of the integration range. The storage of the weight data in the integrator 55 is performed as follows.

【0013】ある1ピクセルPiを構成するサブピク
セルとその周囲のサブピクセルとのデータが対応する箇
所に格納される。したがって、隣接する1ピクセルP
i+1を構成するサブピクセルについても前記ピクセルPi
のサブピクセルの1部としてデータが割当られ、マスク
パターンがあればデータが格納される。
The data of the sub-pixel constituting one pixel P i and the surrounding sub-pixels are stored in corresponding locations. Therefore, one adjacent pixel P
The sub-pixels constituting i + 1 are also referred to as the pixels P i
Is allocated as a part of the sub-pixel of the sub-pixel, and if there is a mask pattern, the data is stored.

【0014】その1ピクセルPiの重みデータ格納が
終了すると隣接する1ピクセルPi+1に関してその積分
範囲の重みデータが、当該1ピクセルPi+1を構成する
サブピクセルとその周囲のサブピクセルとに対応する箇
所に格納される。このとき、当該1ピクセルPi+1を構
成するサブピクセルの一部には、その前に格納したピク
セルPiの影響を受けたデータが格納されており、これ
に自身のピクセルに関する重みを加算し積算して格納さ
れるとともに、その1ピクセルPi+1の周囲のサブピク
セルの一部としてその前の1ピクセルPiを構成するサ
ブピクセルの一部にも加算され、積算される。
When the storage of the weight data of the one pixel P i is completed, the weight data of the integration range of the adjacent one pixel P i + 1 is calculated based on the sub-pixels constituting the one pixel P i + 1 and the surrounding sub-pixels. Is stored in the location corresponding to. At this time, data affected by the pixel P i stored before that is stored in a part of the sub-pixels constituting the one pixel P i + 1 , and the weight relating to the own pixel is added thereto. In addition, it is stored as a part of the sub-pixel around the one pixel P i + 1 , and is also added to a part of the sub-pixel constituting the preceding one pixel P i , and is integrated.

【0015】このようにして、各1ピクセルに関する
積分範囲について周囲のサブピクセルについても重みを
計算し、他のピクセルに影響を与えながら順次積算し、
1画面分が終了するとそのデータを図示しない後段のフ
レームメモリに転送する。
In this manner, the weights are calculated for the surrounding sub-pixels in the integration range for each pixel, and the weights are sequentially integrated while affecting the other pixels.
When one screen is completed, the data is transferred to a subsequent frame memory (not shown).

【0016】フレームメモリで1ピクセル毎の読み出し
を飛び越し走査により繰返し行なうことによりエイリア
シングが空間フィルタリングにより除去された画面が構
成される。このとき、1つの走査線について表示してい
るとき、この表示の1ピクセルは隣接する走査線にある
ピクセルのサブピクセルの影響を受けて、ちらつきが少
なくなるという作用もある。
By repeating reading of each pixel by interlaced scanning in the frame memory, a screen is formed from which aliasing has been removed by spatial filtering. At this time, when one scanning line is displayed, one pixel of this display is affected by a sub-pixel of a pixel on an adjacent scanning line, so that there is an effect that flicker is reduced.

【0017】しかし、この方法では次のような欠点があ
った。
However, this method has the following disadvantages.

【0018】(1) 各エッジについて、ポリゴンの参
照点(例えば、ポリゴンの最高端及び最左端の積分範囲
の中心)に関する距離と傾斜と、それら各エッジのx方
向及びy方向の1ピクセル当りの変化率を計算する必要
がある。したがって回路が複雑になるか、計算時間が多
くかかる。 (2) エッジ毎のマスクパターンmiからポリゴンの
積分範囲に対するマスクパターンmを求め、さらにマス
クパターンm(またはそのポリゴンの一部が表示される
場合はmの部分集合Mi)から重みw(またはMiの重み
iの合計としての重みw)を計算する必要があり、そ
のため計算時間がかかり回路が複雑になる。
(1) For each edge, the distance and inclination with respect to the reference point of the polygon (for example, the center of the integration range at the highest end and the leftmost end of the polygon), and the per-pixel value of each edge in the x and y directions You need to calculate the rate of change. Therefore, the circuit becomes complicated or the calculation time is long. (2) determine the mask pattern m for the integral range of the polygon from the mask pattern m i of each edge, and (a subset of m if or part of the polygon is displayed M i) mask pattern m from the weight w ( Alternatively, it is necessary to calculate the weight w) as the sum of the weights w i of M i , which requires a long calculation time and complicates the circuit.

【0019】[0019]

【発明が解決しようとする課題】この発明が解決しよう
とする課題は、関数テーブルを用いるアンチ・エイリア
シングにおいて、関数テーブルが大きくならないように
して、装置を単純化するとともに計算時間を短縮する方
法及び装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for simplifying an apparatus and shortening a calculation time by preventing a function table from becoming large in anti-aliasing using a function table. It is to provide a device.

【0020】[0020]

【課題を解決するための手段】上記課題を解決するた
め、この発明に係るアンチ・エイリアシング方法は、計
算機により生成された画像を形成するポリゴンを有限個
のピクセルで表現する際に生ずるエイリアシングを、空
間フィルタにより除去するため、1ピクセルを縦横J
(J≧2)個のサブピクセルに分割し、その1ピクセル
を含み縦がL個、横がN個のサブピクセルを空間フィル
タの積分範囲とし、ポリゴンを前記縦方向L個のサブピ
クセル幅で画面水平方向に切り取った部分をセグメント
とし、ポリゴンのエッジの状態を表示するセグメント内
の座標情報を圧縮して予め座標圧縮手段に格納し、積分
範囲についてポリゴンのエッジの状態及び位置関係に
より定まる重みを所定の重み関数により予め計算し
座標圧縮手段において圧縮した座標情報をアドレスと
して前記重みを重み算出手段に予め格納し、各セグメン
トについて、ポリゴンのエッジの状態を表示する座標情
報により座標圧縮手段から圧縮した座標情報を読み出
し、前記座標圧縮手段から読み出した座標情報をアドレ
スとして重み算出手段から各積分範囲の重みを読み出
し、ポリゴン内部の重みを得るものである。
In order to solve the above-mentioned problems, an anti-aliasing method according to the present invention provides an anti-aliasing method that eliminates aliasing that occurs when a polygon that forms an image generated by a computer is represented by a finite number of pixels. To remove by a spatial filter, one pixel
(J ≧ 2) sub-pixels, and L sub-pixels including one pixel and N sub-pixels are defined as an integration range of the spatial filter, and the polygon is divided by the L sub-pixels in the vertical direction. The portion cut in the horizontal direction of the screen is defined as a segment, the coordinate information in the segment indicating the state of the edge of the polygon is compressed and stored in advance in the coordinate compression means, and the integration range is determined by the state of the edge of the polygon and the positional relationship. the weight calculated in advance by a predetermined weighting function, previously stored in the weighting calculation means the weight as an address the compressed coordinate information in the coordinate compression means, for each segment, the coordinate by the coordinate information for displaying the status of the polygon edges The compressed coordinate information is read from the compression means, and the coordinate information read from the coordinate compression means is used as an address to calculate the weight. Read the weight of each integral range, thereby obtaining a weight inside the polygon.

【0021】上記の方法において、セグメントは、ポリ
ゴンをy軸方向としての前記縦方向L個のサブピクセル
幅でx軸方向としての画面水平方向に切り取った部分と
し、座標圧縮手段に格納するに際しての圧縮をエッジの
端部のx座標を重み誤差が一定値以内にあるよう
、圧縮関数を用いて行なう。
In the above method, the segment is a portion obtained by cutting a polygon in the horizontal direction of the screen as the x-axis direction with the above-mentioned L sub-pixel widths in the vertical direction as the y-axis direction, and stores the segment in the coordinate compression means. The compression is performed using the compression function on the x-coordinate of the end of the edge so that the error of the weight is within a certain value.

【0022】また、さらに、座標圧縮手段への格納を、
ポリゴンのエッジの状態を表示するセグメント内の座標
情報のうちセグメントのエッジの上端と下端を表わすy
座標を1サブピクセル分だけ上端方向にずらし、当該下
端を表示するビット数を少なくすることによって圧縮し
て予め行なう。
Further, the storage in the coordinate compression means is as follows:
Y representing the upper end and lower end of the segment edge among the coordinate information in the segment indicating the state of the polygon edge
The coordinates shifted only upper direction 1 subpixel, the under
The compression is performed in advance by reducing the number of bits for displaying the edge .

【0023】この発明に係るアンチ・エイリアシングの
装置は、計算機により生成された画像を形成するポリゴ
ンに生ずるエイリアシングを、1ピクセルを縦横J(J
≧2)個のサブピクセルに分割し、その1ピクセルを含
み縦がL個、横がN個のサブピクセルを積分範囲とした
空間フィルタにより除去するためのものであって、ポリ
ゴンをy軸方向としての前記縦方向L個のサブピクセル
幅でx軸方向としての画面水平方向に切り取った部分を
セグメントとし、ポリゴンのエッジの状態を表示する前
記セグメント内の座標情報のうち、エッジの端部のx座
標を重みの誤差が一定値以内にあるように、圧縮関数
を用いて圧縮したものと、エッジの上端と下端を表わす
y座標を1サブピクセル分だけ上端方向にずらし、当該
下端を表示するビット数を少なくすることによって圧縮
されたものとを予め格納し、各セグメントのポリゴンの
エッジ状態を示す情報により読み出される座標圧縮手段
と、積分範囲についてポリゴンのエッジの状態及び位
置関係により定まる重みを所定の重み関数により予め計
算し前記座標圧縮手段において圧縮した座標情報をア
ドレスとして前記重みを予め格納し、前記座標圧縮手段
から読み出された座標情報をアドレスとして重みを読み
出す重み算出手段と、読み出された重みをサブピクセル
毎に積算する重み積算手段からなるものである。
In the anti-aliasing apparatus according to the present invention, aliasing that occurs in a polygon forming an image generated by a computer is performed by dividing one pixel vertically and horizontally by J (J).
≧ 2) sub-pixels, which are to be removed by a spatial filter having an integration range of L sub-pixels and N sub-pixels including one pixel, and the polygon is divided in the y-axis direction. A portion cut out in the horizontal direction of the screen as the x-axis direction with the L subpixel widths in the vertical direction as a segment, and among the coordinate information in the segment for displaying the state of the edge of the polygon, the x-coordinate, so that the error of the weight is within a predetermined value, the compression function
And those compressed using, y coordinates representing the upper and lower ends of the edge is shifted only to the upper end direction 1 subpixel, the
Coordinate compression means for storing in advance the data compressed by reducing the number of bits for displaying the lower end and reading the information indicating the edge state of the polygon of each segment, and the state and position of the edge of the polygon for the integration range the weight determined by the relationship previously calculated by a predetermined weighting function, the weighting previously stored as an address the compressed coordinate information in the coordinate compression means reads the weighting coordinate information read from the coordinate compression means as address It comprises weight calculating means and weight integrating means for integrating the read weights for each sub-pixel.

【0024】[0024]

【作用】上記構成において次のように作用する。座標圧
縮手段からは、セグメントのエッジの両端部のデータに
より、そのx座標重みの誤差が一定値以内にあるように
に圧縮された座標データが読み出され、そのエッジの上
端と下端のy座標を1サブピクセル分だけ上端方向にず
らしたものが読み出される。これら読み出された圧縮座
標データと上端方向にずらされ圧縮された座標データ
は、そのデータビット数がもとの座標表現の場合より少
なくなっている。この少なくなったデータにより重み算
出手段をアクセスし、セグメントのエッジの状態により
定まる予め計算した重みを積分範囲ごとに読み出す。重
み積算手段では、読み出された重みを画面上の位置ごと
に積算する。
The above structure operates as follows. From the coordinate compression means, coordinate data compressed so that the error of the x-coordinate weight is within a certain value is read out from the data at both ends of the edge of the segment, and the y-coordinate of the upper end and the lower end of the edge is read out. Is shifted by one sub-pixel in the upper end direction. The read compressed coordinate data and the coordinate data shifted and compressed in the upper end direction have a smaller number of data bits than in the original coordinate representation. The weight calculating means is accessed based on the reduced data, and a pre-calculated weight determined by the state of the edge of the segment is read for each integration range. The weight integrating means integrates the read weights for each position on the screen.

【0025】[0025]

【実施例】以下本発明の実施例を図により説明する。図
1は本発明を説明する機能ブロック図である。図1にお
いて、111,112,113,114,115,11
6は関数テーブルを構成する第1の座標圧縮手段であ
り、ポリゴンのエッジの状態を表示する前記セグメント
内の座標情報のうち、エッジの端部のx座標を一定の誤
差以内で圧縮したものを予め計算して格納しておく。1
21,122は関数テーブルを構成する第2の座標圧縮
手段であり、ポリゴンのエッジの状態を表示する前記セ
グメント内の座標情報のうち、セグメントの下端に達す
るエッジの上端と下端のy座標を1サブピクセル分だけ
上端方向にずらすことによって圧縮されたものを予め格
納しておく。131,132,133,134は関数テ
ーブルで構成する重み算出手段であり、積分範囲につい
てポリゴンのエッジの状態及び位置関係により定まる重
みを所定の重み関数により予め計算して前記圧縮した座
標情報をアドレスとして予め格納しておく。これらが構
成する関数テーブルは例えばROMあるいはRAMから
なる。14は例えばフレームバッファからなり、重み算
出手段131,132,133,134から読み出され
た重みをサブピクセル毎に積算する重み積算手段であ
る。図中この装置の入力xl1,yl1,……xr3,y
r3は、図示しない幾何計算手段から入力する、あるセグ
メントにおける図8のようなポリゴンのエッジのデータ
すなわちセグメント情報である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. FIG. 1 is a functional block diagram illustrating the present invention. In FIG. 1, 111, 112, 113, 114, 115, 11
Reference numeral 6 denotes a first coordinate compression unit that constitutes a function table, and among coordinate information in the segment that indicates the state of the edge of the polygon, the information obtained by compressing the x coordinate of the edge of the edge within a certain error. It is calculated and stored in advance. 1
Reference numerals 21 and 122 denote second coordinate compressing means constituting a function table. Among coordinate information in the segment for displaying the state of the edge of the polygon, the y coordinate of the upper end and the lower end of the edge reaching the lower end of the segment is set to 1. The data compressed by shifting it toward the upper end by the subpixel is stored in advance. Reference numerals 131, 132, 133, and 134 denote weight calculating means constituted by a function table. The weights determined in advance by the predetermined weight function for the integration range based on the state and the positional relationship of the polygon edge are used to address the compressed coordinate information. Is stored in advance. The function tables formed by these are, for example, ROM or RAM. Numeral 14 denotes a weight integrating means which comprises a frame buffer, for example, and integrates the weights read from the weight calculating means 131, 132, 133, and 134 for each sub-pixel. In the figure, inputs x l1 , y l1 ,..., X r3 , y
r3 is polygon edge data as shown in FIG. 8, that is, segment information, input from a geometric calculation unit (not shown).

【0026】図8において、(xl1,yl1)はセグメン
ト上端とポリゴンのエッジ81とが交差する位置(ある
いは当該ポリゴンのセグメント上端における最左端)、
(xl2,yl2)はポリゴンのエッジ81の最下端(エッ
ジ82の最上端でもある)、(xl3,yl3)はエッジ8
2とセグメント下端とが交差する位置(あるいは当該ポ
リゴンのセグメント下端における最左端)、(xr1,y
r1)セグメント上端とポリゴンのエッジ83とが交差す
る位置(あるいは当該ポリゴンのセグメント上端におけ
る最右端)、(xr2,yr2)はポリゴンのエッジ83の
最下端(エッジ84の最上端でもある)、(xr3
r3)はエッジ84とセグメント下端とが交差する位置
(あるいは当該ポリゴンのセグメント下端における最左
端)である。
In FIG. 8, ( xl1 , yl1 ) is the position where the upper end of the segment intersects the edge 81 of the polygon (or the leftmost end of the upper end of the polygon segment).
( Xl2 , yl2 ) is the lowermost edge of the polygon edge 81 (also the uppermost edge of the edge 82), and ( xl3 , yl3 ) is the edge 8
2 and the intersection of the lower end of the segment (or the left end at the lower end of the segment of the polygon), (x r1 , y
r1 ) the position where the upper end of the segment intersects with the edge 83 of the polygon (or the rightmost end of the upper end of the segment of the polygon); ( xr2 , yr2 ) is the lowermost end of the edge 83 of the polygon (also the uppermost end of the edge 84) , (X r3 ,
yr3 ) is the position where the edge 84 and the lower end of the segment intersect (or the leftmost end of the lower end of the segment of the polygon).

【0027】また、図1においては、第1の座標圧縮手
段111,112,113,114,115,116、
第2の座標圧縮手段121,122、及び重み算出手段
131,132,133,134は、エッジ毎に設けて
いるように図示してあるが、エッジ毎のデータ入力に対
して共通のものを用いて処理してもよい。
In FIG. 1, the first coordinate compressing means 111, 112, 113, 114, 115, 116,
Although the second coordinate compression means 121 and 122 and the weight calculation means 131, 132, 133 and 134 are shown as being provided for each edge, a common one is used for data input for each edge. May be processed.

【0028】以下、スクリーンの分解能が1280×7
68、積分範囲が2×2ピクセル、4×4サブピクセル
/ピクセル、重み関数がフラット(flat)の場合に
ついて、実施例の動作を説明する。
Hereinafter, the screen resolution is 1280 × 7.
68, the operation of the embodiment will be described for the case where the integration range is 2 × 2 pixels, 4 × 4 subpixels / pixel, and the weight function is flat.

【0029】第1の座標圧縮手段111,112,11
3,114,115,116の前段に位置する図示しな
い幾何計算手段からポリゴンのエッジが計算され、その
データとしてポリゴンの各エッジの両端点のx,y座標
が送られる。従来例として説明したものが所定の傾斜角
と距離を求めたものであるのに対して、第1の座標圧縮
手段111〜116はセグメントのx座標を直接用いこ
れを重みの誤差が一定値以内にあるように圧縮するもの
である。圧縮座標uがu=fcp(x)で得られるとする
と、fcpは例えば次式で与えられる。
First coordinate compressing means 111, 112, 11
The edges of the polygon are calculated by a geometric calculation means (not shown) positioned before 3, 114, 115, and 116, and the x and y coordinates of both ends of each edge of the polygon are sent as the data. While what has been described as a conventional example is obtained by calculating a predetermined inclination angle and distance, the first coordinate compression means 111 to 116 directly use the x-coordinate of the segment and use this as the weight error. Is compressed so that is within a certain value. Assuming that the compressed coordinates u can be obtained by u = fcp (x), fcp is given by the following equation, for example.

【0030】[0030]

【数2】x≦1 u=fcp(x)=(1/δs)xX ≦ 1 u = f cp (x) = (1 / δ s ) x

【0031】[0031]

【数3】x>1 u=fcp(x)=(1/δs)(lnx+1)X> 1 u = f cp (x) = (1 / δ s ) (lnx + 1)

【0032】このとき、x(11+2ビット)からu
(7+2ビット)に圧縮され、誤差δsは約2-4ピクセ
ルである。この圧縮関数fcpを説明する。
At this time, from x (11 + 2 bits) to u
(7 + 2 bits) and the error δ s is about 2 -4 pixels. The compression function fcp will be described.

【0033】この圧縮関数fcpは、これを用いてx座標
を圧縮しても、ポリゴンが積分範囲について占める面積
Sの誤差を一定範囲内にすることができるということに
基づいて導かれる。図9はポリゴンが積分範囲について
占める面積Sを説明する図である。図9において、xl
≦−δx<δx≦xとする。
The compression function fcp is derived based on the fact that the error of the area S occupied by the polygon with respect to the integration range can be kept within a certain range even if the x-coordinate is compressed using the compression function fcp . FIG. 9 is a diagram illustrating the area S occupied by the polygon with respect to the integration range. In FIG. 9, x l
≦ −δ xx ≦ x.

【0034】[0034]

【数4】S=−4δxδyl/(x−xl) =−σxl/(x−xl) ここで σ=4δxδy Equation 4] S = -4δ x δ y x l / (x-x l) = -σx l / (x-x l) where σ = 4δ x δ y

【0035】x=f(u)とおき、∂S/∂uが一定と
なるf(x)を求める。
With x = f (u), f (x) at which な る S / ∂u is constant is determined.

【0036】[0036]

【数5】∂S/∂u=(∂S/∂x)(∂x/∂u) ={σxl/(x−xl2}f’(u)Equation 5] ∂S / ∂u = (∂S / ∂x ) (∂x / ∂u) = {σx l / (x-x l) 2} f '(u)

【0037】[0037]

【数6】g(xl)=σxl/(x−xl2 [6] g (x l) = σx l / (x-x l) 2

【0038】とおき、|g(xl)|の最大値を求め
る。
[0038] Distant, | g (x l) | find the maximum value of.

【0039】[0039]

【数7】g’(xl)={σ(xl−x)2−2σxl(x
l−x)}/(xl−x)4=−σ(xl+x)/(xl
x)3
Equation 7] g '(x l) = { σ (x l -x) 2 -2σx l (x
l -x)} / (x l -x) 4 = -σ (x l + x) / (x l -
x) 3

【0040】xl=−xのとき、|g(xl)|は最大と
なる。これらg(xl)、g’(xl)の変化を図10に
示す。
When x 1 = −x, | g (x 1 ) | becomes maximum. FIG. 10 shows changes in g ( xl ) and g '( xl ).

【0041】[0041]

【数8】|∂S/∂u|max=(σ/4x)f’(u) (∵ f’(u)>0,|∂S/∂u|≦|g(xl
||f’(u)|)
[Equation 8] | ∂S / ∂u | max = ( σ / 4x) f '(u) (∵ f'(u)> 0, | ∂S / ∂u | ≦ | g (x l)
|| f '(u) |)

【0042】図9において、x≦1、x>1にわけて面
積を考える。このとき、δx=1,δy=1とする。
In FIG. 9, the area is considered for x ≦ 1, x> 1. At this time, δ x = 1 and δ y = 1.

【0043】(1) x≦1のとき(1) When x ≦ 1

【0044】[0044]

【数9】S=2−(x+xlS = 2- (x + xl )

【0045】[0045]

【数10】dS/du=−dx/du=−f’(u) =−δs ## EQU10 ## dS / du = −dx / du = −f ′ (u) = − δ s

【0046】[0046]

【数11】f(u)=δsu+C1=xF (u) = δ s u + C 1 = x

【0047】(2) x>1のとき(2) When x> 1

【0048】[0048]

【数12】S=−4xl/(x−xl[Number 12] S = -4x l / (x- x l)

【数13】|dS/du| ={4xl/(x−xl2}f’(u) ≦f’(u)/f(u)=δs Equation 13] | dS / du | = {4x l / (x-x l) 2} f '(u) ≦ f' (u) / f (u) = δ s

【0049】[0049]

【数14】lnf(u)=δsu+C2=lnx## EQU14 ## Inf (u) = δ s u + C 2 = Inx

【0050】境界条件を定めることにより、定数C1
2が以下のように定まる。
By defining the boundary conditions, the constants C 1 ,
C 2 is determined as follows.

【0051】[0051]

【数15】 x=0 u1=0 →C1=0 x=1 u1=u2 →C2=1 x=1280 u2=27−0.5 →δs=(ln1280+1)/(27−0.5) ≒2-4(1+0.019)X = 0 u 1 = 0 → C 1 = 0 x = 1 u 1 = u 2 → C 2 = 1 x = 1280 u 2 = 2 7 −0.5 → δ s = (ln 1280 + 1) / ( 2 7 -0.5) ≒ 2 -4 (1 + 0.019)

【0052】よって、Therefore,

【0053】[0053]

【数16】 x≦1 u=fu(x)=x/δs+0.5 (u≦1/δs) x=fx(u)=δsX ≦ 1 u = f u (x) = x / δ s +0.5 (u ≦ 1 / δ s ) x = f x (u) = δ s u

【0054】[0054]

【数17】x>1 u=fu(x)=(lnx+1)
/δs+0.5 (u>1/δs) x=exp(δsu−1)
[Number 17] x> 1 u = f u ( x) = (lnx + 1)
/ Δ s +0.5 (u> 1 / δ s ) x = exp (δ s u-1)

【0055】この(数16)と(数17)のfu(x)
は、(数2)、(数3)のfcp(x)と同じものであ
る。
F u (x) of (Expression 16) and (Expression 17)
Is the same as f cp (x) in ( Equation 2) and ( Equation 3).

【0056】第1の座標圧縮手段111,112,11
3,114,115,116には、以上のように圧縮さ
れたx座標が予め計算されて格納され、前記の図示しな
い幾何計算手段から入力したポリゴンの各エッジの両端
点のx座標は、圧縮したx座標に変換されて読み出され
る。
First coordinate compression means 111, 112, 11
The compressed x-coordinates calculated as described above are preliminarily calculated and stored in 3, 114, 115, and 116. The x-coordinates of both ends of each edge of the polygon input from the above-described geometric calculation means are compressed. The converted x coordinate is read.

【0057】また、前記エッジの両端点のy座標につい
ては、第2の座標圧縮手段121,122に入力する。
第2の座標圧縮手段121,122は、セグメントエッ
ジの両端点のy座標をy軸方向に1サブピクセルずらせ
ることによってセグメントのy座標を表わすビット数を
1ビット少なくした関数テーブルであり、予め計算し格
納しておく。すなわち、セグメントエッジの端点のy座
標を図11(a)のようなトップ(top)端点の座標
系(トップ座標系)から図11(b)のようなボトム
(botom)端点の座標系(ボトム座標系)に、ずら
すことによって変換することになる。これをy座標の圧
縮と称する。いま、積分範囲が2×2ピクセル、4×4
サブピクセル/ピクセルを考えているから、トップ座標
系において、最下端は“8”で表わされ、このデータは
4ビット必要となるが、これ1サブピクセル分をずらす
ことにより前記下端(ボトム)端点の値を“7”として
3ビットで済ますことができ、関数テーブルに必要なメ
モリ容量を1/2にすることができる。
The y-coordinates of both ends of the edge are input to the second coordinate compression means 121 and 122.
The second coordinate compressing means 121 and 122 are function tables in which the number of bits representing the y coordinate of the segment is reduced by one bit by shifting the y coordinate of both ends of the segment edge by one subpixel in the y axis direction. Calculate and store. That is, the y coordinate of the end point of the segment edge is changed from the coordinate system of the top end point (top coordinate system) as shown in FIG. 11A to the coordinate system of the bottom end point as shown in FIG. (Coordinate system). This is called compression of the y coordinate. Now, the integration range is 2 × 2 pixels, 4 × 4
Since subpixels / pixels are considered, the lowermost end is represented by "8" in the top coordinate system, and this data requires 4 bits. By shifting this data by one subpixel, the lower end (bottom) is obtained. The end point value can be set to "7" with only 3 bits, and the memory capacity required for the function table can be reduced to half.

【0058】yt=ft(yb)とおくとftとybとの間
に次の式が成り立つ。
If y t = f t (y b ), the following equation holds between f t and y b .

【0059】[0059]

【数18】0≦yb≦6 yt=f(yb)=yb+1 yb=7 yt=f(yb)=yb ## EQU18 ## 0 ≦ y b ≦ 6 y t = f (y b ) = y b +1 y b = 7 y t = f (y b ) = y b

【0060】重み算出手段131,132,133,1
34には、第1の座標圧縮手段111,112,11
3,114からの圧縮x座標、図示しない幾何計算手段
からのy座標あるいは第2の座標圧縮手段121,12
2からの圧縮y座標がアドレスとして与えられ、これら
により示されるエッジの状態と重み関数とにより与えら
れる重みwが読み出される。重み算出手段131,13
2,133,134の各々は、入力したデータが示すセ
グメントエッジに関する重みwをそのセグメント内全体
の積分範囲の各サブピクセルついて読み出す。このと
き、エッジの左側については重みが「0」となるから結
果的にエッジの右側について得られることとなる。図8
のようなポリゴンエッジの場合は、左上側のエッジ81
に関してその右側の重みwl1が重み算出手段131か
ら、左下側のエッジ82に関してその右側の重みwl2
重み算出手段132から、右上側のエッジ83に関して
その右側の重みwl3が重み算出手段133から、右下側
のエッジ84に関してその右側の重みwl4が重み算出手
段134から読み出される。w=fw(ut,yt,ub
b)とおくとfwは次のように与えられる。
Weight calculation means 131, 132, 133, 1
34, the first coordinate compression means 111, 112, 11
3, 114, the y-coordinate from a geometric calculation means (not shown) or the second coordinate compression means 121, 12
The compressed y coordinate from 2 is given as an address, and the weight w given by the edge state and the weight function indicated by these is read out. Weight calculation means 131, 13
2, 133, and 134 read the weight w for the segment edge indicated by the input data for each subpixel in the integral range of the entire segment. At this time, the weight is “0” for the left side of the edge, and as a result, the weight is obtained for the right side of the edge. FIG.
In the case of a polygon edge such as
From the weight w l1 weighting calculation means 131 on the right side with respect to the lower left side from the weight w l2 weighting calculation means 132 to the right with respect to edge 82, of the right with respect to the edge 83 of the upper right weights w l3 weighting calculation means 133 , The weight w l4 on the right side of the lower right edge 84 is read from the weight calculating means 134. w = f w (u t, y t, u b,
y b) the put and f w is given in the following manner.

【0061】[0061]

【数19】w=fw(ut,yt,ub,yb) (0) xmin<−d 且つ xmax<−d :fw()=0.5*d*dy (1) xmin<−d 且つ −d≦xmax< d :fw()={(A)/(B)}dy (1)において(A)=0.5*d−0.125(x
max+d)2 (B)=(xmax−xmin) (2) xmin<−d 且つ d≦xmax :fw()=−0.5*d*xmin*dy/(xmax−x
min) (3)−d≦xmin< d 且つ −d≦xmax< d :fw()={0.25*d−0.125(xmax+x
min)}dy (4)−d≦xmin< d 且つ d≦xmax :fw()=0.125(d−xmin2*dy/(xmax
−xmin) (5)その他:fw()=0 ここで、xmin=min(xt,xb) xmax=max(xt,xb) xt =fcp -1(ut) xb =fcp -1(ub) dy =yb−yt d =1ピクセル
[Number 19] w = f w (u t, y t, u b, y b) (0) x min <-d and x max <-d: f w ( ) = 0.5 * d * dy (1 ) X min <−d and −d ≦ x max <d: fw () = {(A) / (B)} dy (1) where (A) = 0.5 * d−0.125 (x
max + d) 2 (B) = (x max -x min) (2) x min <-d and d ≦ x max: f w ( ) = - 0.5 * d * x min * dy / (x max - x
min ) (3) −d ≦ x min <d and −d ≦ x max <d: fw () = {0.25 * d−0.125 (x max + x
min)} dy (4) -d ≦ x min <d and d ≦ x max: f w ( ) = 0.125 (d-x min) 2 * dy / (x max
-X min) (5) Others: f w () = 0 where, x min = min (x t , x b) x max = max (x t, x b) x t = f cp -1 (u t ) x b = f cp -1 ( u b) dy = y b -y t d = 1 pixel

【0062】上記のfwの説明中xmin,xmaxの範囲に
より区分される(0)〜(5)は、図12に示す重みと
エッジの位置との関係の(0)〜(5)に対応する。但
し、図中(1)と(1)’、(2)と(2)’、(4)
と(4)’とはエッジが左下がりと右下がりで異なるだ
けで互いに同等のものであり、(0),(3),(5)
について図示しているものはエッジの左下がりのもので
あるがエッジと積分範囲との位置関係を満たす限り右下
がりであってもよい。
[0062] In the above description of the f w x min, it is divided by the range of x max (0) to (5), the relationship between the position of the weight and the edge shown in FIG. 12 (0) - (5) Corresponding to However, (1) and (1) ', (2) and (2)', (4)
And (4) ′ are equivalent to each other except that the edge is different between the lower left and lower right, and (0), (3), (5)
Is shown to the left of the edge, but may be to the right as long as the positional relationship between the edge and the integration range is satisfied.

【0063】なお、重み関数がy軸方向に一定、すなわ
ち関数の形が前述のフラット、三角屋根型、かまぼこ型
等のとき、yt,ybの代わりにdy=yb−ytを用いる
ことができ(上記説明では重み関数をフラットにしてあ
るから、dyはそのようになっている。)、関数テーブ
ルはさらに小さくなる。
[0063] Incidentally, a predetermined weighting function to the y-axis direction, i.e., the form of the function described above flat, triangular roof, when the semi-cylindrical or the like, using dy = y b -y t y t , instead of y b (The weight function is flattened in the above description, so dy is so), and the function table becomes even smaller.

【0064】重み積算手段14は、重み算出手段13
1,132,133,134のそれぞれから読み出した
エッジ毎の重みwl1,wl2,wr1,wr2をそのセグメン
トの積分範囲毎のサブピクセルに対応する部分に入力す
る。このとき、重み算出手段133,134からの出力
は、エッジ83,84の右側についての重みであり、こ
れが重み積算手段14に入力すると、ポリゴンの外部に
ついてのものであるとして負号が付けられて加算され、
重み算出手段131,132の出力の内重複する部分
(ポリゴンの右側外部)を減算し、その結果その大部分
を「0」とする。
The weight accumulating means 14 includes the weight calculating means 13
The weights w l1 , w l2 , w r1 , and w r2 for each edge read from each of the segments 1 , 132, 133, and 134 are input to portions corresponding to subpixels for each integration range of the segment. At this time, the outputs from the weight calculating means 133 and 134 are the weights on the right side of the edges 83 and 84. When the weights are input to the weight integrating means 14, they are negatively attached to the outside of the polygon. Are added,
The overlapped portion (outside of the right side of the polygon) in the outputs of the weight calculation means 131 and 132 is subtracted, and as a result, the majority is set to “0”.

【0065】[0065]

【発明の効果】以上のように、この発明によれば、セグ
メントエッジデータを圧縮して関数テーブルから読み出
すから、関数テーブルを小さくすることができ、セグメ
ントエッジデータのみから比較的小さい関数テーブルを
用いて重みを計算するようにしたので回路が簡単で且つ
高速に重みを計算することができる効果がある。
As described above, according to the present invention, since the segment edge data is compressed and read out from the function table, the function table can be reduced, and a relatively small function table is used only from the segment edge data. Since the weights are calculated in this way, there is an effect that the weight can be calculated at a high speed with a simple circuit.

【0066】すなわち、従来必要であったポリゴンエッ
ジの傾斜の計算、ポリゴンエッジの参照点からの距離の
計算、各積分範囲の中心からのポリゴンエッジの距離の
計算、マスクの計算等が不要となる。
In other words, the calculation of the slope of the polygon edge, the calculation of the distance from the reference point of the polygon edge, the calculation of the distance of the polygon edge from the center of each integration range, the calculation of the mask, and the like, which are conventionally required, become unnecessary. .

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例を説明する機能ブロック図で
ある。
FIG. 1 is a functional block diagram illustrating an embodiment of the present invention.

【図2】ポリゴンとポリゴンエッジの関係を示す図であ
る。
FIG. 2 is a diagram showing a relationship between polygons and polygon edges.

【図3】表示画面31、ポリゴン32、ポリゴンエッジ
33、ピクセル34、サブピクセル35、セグメント3
6、セグメントエッジ37及び積分範囲38を説明する
図である。
FIG. 3 shows a display screen 31, a polygon 32, a polygon edge 33, a pixel 34, a sub-pixel 35, and a segment 3.
6 is a diagram illustrating a segment edge 37 and an integration range 38. FIG.

【図4】積分範囲と座標を説明する図である。FIG. 4 is a diagram illustrating an integration range and coordinates.

【図5】従来方式を説明する機能ブロック図である。FIG. 5 is a functional block diagram illustrating a conventional method.

【図6】エッジの端点及び傾斜角と距離を説明する図で
ある。
FIG. 6 is a diagram illustrating an end point, an inclination angle, and a distance of an edge.

【図7】サブマスクパターン及びその部分の重みを説明
する図である。
FIG. 7 is a diagram illustrating sub-mask patterns and weights of the sub-mask patterns.

【図8】セグメント情報を説明する図である。FIG. 8 is a diagram illustrating segment information.

【図9】面積Sを説明する図である。FIG. 9 is a diagram illustrating an area S.

【図10】g(xl)、g’(xl)の変化を説明する
図である。
FIG. 10 is a diagram illustrating changes in g (xl) and g ′ (xl).

【図11】エッジのy軸方向移動を説明する図である。FIG. 11 is a diagram illustrating movement of an edge in the y-axis direction.

【図12】重みとエッジの位置との関係を示す図であ
る。
FIG. 12 is a diagram illustrating a relationship between weights and edge positions.

【符号の説明】[Explanation of symbols]

111,112,113,114,115,116…第
1の座標圧縮手段 121,122…第2の座標圧縮手段 131,132,133,134…重み算出手段 14…重み積算手段
111, 112, 113, 114, 115, 116 first coordinate compressing means 121, 122 second coordinate compressing means 131, 132, 133, 134 weight calculating means 14 weight integrating means

フロントページの続き (72)発明者 船矢 晴二 神奈川県鎌倉市上町屋345番地 三菱プ レシジョン株式会社内 (56)参考文献 特開 平4−57175(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 15/00 100 G06T 11/40 JICSTファイル(JOIS)Continued on the front page (72) Inventor Seiji Funaya 345 Kamimachiya, Kamakura City, Kanagawa Prefecture Inside Mitsubishi Precision Co., Ltd. (56) References JP-A-4-57175 (JP, A) (58) Fields investigated ( Int.Cl. 7 , DB name) G06T 15/00 100 G06T 11/40 JICST file (JOIS)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】計算機により生成された画像を形成するポ
リゴンを有限個のピクセルで表現する際に生ずるエイリ
アシングを、空間フィルタにより除去するためのアンチ
・エイリアシングの方法であって、 1ピクセルを縦横J(J≧2)個のサブピクセルに分割
し、 その1ピクセルを含み縦がL個、横がN個のサブピクセ
ルを空間フィルタの積分範囲とし、 ポリゴンを前記縦方向L個のサブピクセル幅で画面水平
方向に切り取った部分をセグメントとし、 ポリゴンのエッジの状態を表示するセグメント内の座標
情報を圧縮して予め座標圧縮手段に格納し、 積分範囲についてポリゴンのエッジの状態及び位置関
係により定まる重みを所定の重み関数により予め計算
前記座標圧縮手段において圧縮した座標情報をアド
レスとして前記重みを重み算出手段に予め格納し、 各セグメントについて、ポリゴンのエッジの状態を表示
する座標情報により座標圧縮手段から圧縮した座標情報
を読み出し、前記座標圧縮手段から読み出した座標情報
をアドレスとして重み算出手段から各積分範囲の重みを
読み出し、 ポリゴン内部の重みを得ることを特徴とするアンチ・エ
イリアシングの方法。
An anti-aliasing method for eliminating aliasing caused by expressing a polygon forming an image generated by a computer with a finite number of pixels by a spatial filter, comprising: (J ≧ 2) divided into sub-pixels, and L sub-pixels including one pixel and N sub-pixels are set as an integration range of the spatial filter, and the polygon is divided into L sub-pixels in the vertical direction. The portion cut in the horizontal direction of the screen is used as a segment, the coordinate information in the segment indicating the state of the edge of the polygon is compressed and stored in advance in the coordinate compression means, and the integration range is determined by the state of the edge of the polygon and the positional relationship. the weight calculated in advance by a predetermined weighting function, the weighting coordinate information being compressed in the coordinate compression means as address Previously stored in the weight calculation means, for each segment, reads the coordinate information obtained by compressing the coordinate compression means by the coordinate information for displaying the status of the polygon edges from the weight calculation unit coordinate information read from the coordinate compression means as address An anti-aliasing method characterized by reading the weight of each integration range and obtaining the weight inside the polygon.
【請求項2】計算機により生成された画像を形成するポ
リゴンを有限個のピクセルで表現する際に生ずるエイリ
アシングを、空間フィルタにより除去するためのアンチ
・エイリアシングの方法であって、 1ピクセルを縦横J(J≧2)個のサブピクセルに分割
し、 その1ピクセルを含み縦がL個、横がN個のサブピクセ
ルを空間フィルタの積分範囲とし、 ポリゴンをy軸方向としての前記縦方向L個のサブピク
セル幅でx軸方向としての画面水平方向に切り取った部
分をセグメントとし、 ポリゴンのエッジの状態を表示するセグメント内の座標
情報のうち、エッジの端部のx座標を重みの誤差が一
定値以内にあるように、圧縮関数を用いて圧縮して予め
座標圧縮手段に格納し、 積分範囲についてポリゴンのエッジの状態及び位置関
係により定まる重みを所定の重み関数により予め計算
前記座標圧縮手段において圧縮した座標情報をアド
レスとして前記重みを重み算出手段に予め格納し、 各セグメントについて、ポリゴンのエッジの状態を表示
する座標情報により座標圧縮手段から圧縮した座標情報
を読み出し、前記座標圧縮手段から読み出した座標情報
をアドレスとして重み算出手段から各積分範囲の重みを
読み出し、 ポリゴン内部の重みを得ることを特徴とするアンチ・エ
イリアシングの方法。
2. A method of anti-aliasing for removing aliasing caused by representing a polygon forming an image generated by a computer with a finite number of pixels by a spatial filter. (J ≧ 2) divided into sub-pixels, the L sub-pixels including one pixel and the N sub-pixels being the integration range of the spatial filter, and the L sub-pixels in the vertical direction using the polygon as the y-axis direction The part cut out in the horizontal direction of the screen as the x-axis direction with the sub-pixel width of is a segment. Among the coordinate information in the segment that displays the state of the edge of the polygon, the x-coordinate of the edge of the edge is represented by the error of the weight. as is within a predetermined value, and compressed using a compression function stored in advance in the coordinate compression means, the integral range, the polygon edge state and positional relationship Previously calculated by more determined weight a predetermined weight function, previously stored in the weighting calculation means the weight as an address the compressed coordinate information in the coordinate compression means, for each segment, the coordinate information for displaying the status of the polygon edges Reading the compressed coordinate information from the coordinate compressing means, reading the weight of each integral range from the weight calculating means using the coordinate information read from the coordinate compressing means as an address, and obtaining the weight inside the polygon. the method of.
【請求項3】計算機により生成された画像を形成するポ
リゴンを有限個のピクセルで表現する際に生ずるエイリ
アシングを、空間フィルタにより除去するためのアンチ
・エイリアシングの方法であって、 1ピクセルを縦横J(J≧2)個のサブピクセルに分割
し、 その1ピクセルを含み縦がL個、横がN個のサブピクセ
ルを空間フィルタの積分範囲とし、 ポリゴンをy軸方向としての前記縦方向L個のサブピク
セル幅でx軸方向としての画面水平方向に切り取った部
分をセグメントとし、 ポリゴンのエッジの状態を表示するセグメント内の座標
情報のうちセグメントのエッジの上端と下端を表わすy
座標を1サブピクセル分だけ上端方向にずらし、当該下
端を表示するビット数を少なくすることによって圧縮し
て予め座標圧縮手段に格納し、 積分範囲についてポリゴンのエッジの状態及び位置関
係により定まる重みを所定の重み関数により予め計算
前記座標圧縮手段において圧縮した座標情報をアド
レスとして前記重みを重み算出手段に予め格納し、 各セグメントについて、ポリゴンのエッジの状態を表示
する座標情報により座標圧縮手段から圧縮した座標情報
を読み出し、前記座標圧縮手段から読み出した座標情報
をアドレスとして重み算出手段から各積分範囲の重みを
読み出し、 ポリゴン内部の重みを得ることを特徴とする請求項1又
は2のいずれか記載のアンチ・エイリアシングの方法。
3. A method of anti-aliasing for removing, by a spatial filter, aliasing that occurs when a polygon forming an image generated by a computer is represented by a finite number of pixels. (J ≧ 2) divided into sub-pixels, the L sub-pixels including one pixel and the N sub-pixels being the integration range of the spatial filter, and the L sub-pixels in the vertical direction using the polygon as the y-axis direction The portion cut out in the horizontal direction of the screen as the x-axis direction with the sub-pixel width of is a segment, and the coordinate information indicating the edge state of the polygon among the coordinate information in the segment represents the upper and lower ends of the edge of the segment.
The coordinates shifted only upper direction 1 subpixel, the under
By compressing the data by reducing the number of bits for displaying the edges and storing the data in advance in the coordinate compression means, the weight of the integration range determined in advance by a predetermined weight function based on the state and positional relationship of the polygon edges is calculated in advance by the coordinate compression. The weight is stored in advance in the weight calculating means using the coordinate information compressed by the means as an address, and for each segment, the compressed coordinate information is read out from the coordinate compressing means by the coordinate information indicating the state of the edge of the polygon, and the coordinate compressing means is read out. 3. The anti-aliasing method according to claim 1, wherein the weight of each integral range is read from the weight calculating means by using the coordinate information read from the address as an address, and the weight inside the polygon is obtained.
【請求項4】計算機により生成された画像を形成するポ
リゴンを有限個のピクセルで表現する際に生ずるエイリ
アシングを、1ピクセルを縦横J(J≧2)個のサブピ
クセルに分割し、その1ピクセルを含み縦がL個、横が
N個のサブピクセルを積分範囲とした空間フィルタによ
り除去するためのアンチ・エイリアシングの装置であっ
て、 ポリゴンをy軸方向としての前記縦方向L個のサブピク
セル幅でx軸方向としての画面水平方向に切り取った部
分をセグメントとし、ポリゴンのエッジの状態を表示す
る前記セグメント内の座標情報のうち、エッジの端部の
x座標を重みの誤差が一定値以内にあるように、圧縮
関数を用いて圧縮したものと、エッジの上端と下端を表
わすy座標を1サブピクセル分だけ上端方向にずらすこ
とによって圧縮されたものとを予め格納し、各セグメン
トのポリゴンのエッジ状態を示す情報により読み出され
る座標圧縮手段と、 積分範囲についてポリゴンのエッジの状態及び位置関
係により定まる重みを所定の重み関数により予め計算
前記座標圧縮手段において圧縮した座標情報をアド
レスとして前記重みを予め格納し、前記座標圧縮手段か
ら読み出された座標情報をアドレスとして重みを読み出
す重み算出手段と、読み出された重みをサブピクセル毎
に積算する重み積算手段からなることを特徴とするアン
チ・エイリアシングの装置。
4. Aliasing that occurs when a polygon that forms an image generated by a computer is represented by a finite number of pixels is divided into one pixel in vertical and horizontal J (J ≧ 2) sub-pixels, and the one pixel An anti-aliasing device for removing by a spatial filter having an integration range of L vertical and N horizontal sub-pixels, said L sub-pixels having a polygon as a y-axis direction the portion cut in the horizontal direction of the screen as the x-axis direction and the segment width, among the coordinate information in the segments for displaying the status of the polygon edges, the x-coordinate of the end edges, the error weight is a constant value Compression as within
The information compressed by using the function and the information compressed by shifting the y-coordinate representing the upper and lower edges of the edge toward the upper edge by one subpixel in advance are stored, and information indicating the edge state of the polygon of each segment is stored. previously stored coordinate compressing means to be read out, the integral range, the weight determined by the state and the positional relationship between the polygon edge previously calculated by a predetermined weighting function, the weighting coordinate information being compressed in the coordinate compression means as address by Anti-aliasing, comprising: weight calculation means for reading weights using the coordinate information read from the coordinate compression means as an address; and weight integration means for integrating the read weights for each sub-pixel. apparatus.
JP27477493A 1993-10-07 1993-10-07 Anti-aliasing method and apparatus Expired - Lifetime JP3297512B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27477493A JP3297512B2 (en) 1993-10-07 1993-10-07 Anti-aliasing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27477493A JP3297512B2 (en) 1993-10-07 1993-10-07 Anti-aliasing method and apparatus

Publications (2)

Publication Number Publication Date
JPH07105387A JPH07105387A (en) 1995-04-21
JP3297512B2 true JP3297512B2 (en) 2002-07-02

Family

ID=17546388

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27477493A Expired - Lifetime JP3297512B2 (en) 1993-10-07 1993-10-07 Anti-aliasing method and apparatus

Country Status (1)

Country Link
JP (1) JP3297512B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4930860B2 (en) * 2008-11-07 2012-05-16 Necシステムテクノロジー株式会社 Graphic drawing apparatus, antialiasing method and program
CN116594582B (en) * 2022-06-22 2024-03-22 格兰菲智能科技(北京)有限公司 Image display method, apparatus, computer device and storage medium

Also Published As

Publication number Publication date
JPH07105387A (en) 1995-04-21

Similar Documents

Publication Publication Date Title
JP4327105B2 (en) Drawing method, image generation apparatus, and electronic information device
EP1792281B1 (en) Method and system for anti-aliasing by pixel sampling
US8817034B2 (en) Graphics rendering device, graphics rendering method, graphics rendering program, recording medium with graphics rendering program stored thereon, integrated circuit for graphics rendering
US5461703A (en) Pixel image edge enhancement method and system
KR100818718B1 (en) Image processing device, and computer-readable recording medium having recorded thereon image processing program
EP1480171A1 (en) Method and system for supersampling rasterization of image data
JPH07271999A (en) Outputting method for three-dimensional topography
JP3218372B2 (en) 3D graphic display method
JP3297512B2 (en) Anti-aliasing method and apparatus
JP2000155850A (en) Texture mapping device and rendering device equipped with the same device and information processor
JP4760550B2 (en) Image conversion apparatus and image conversion program
EP0676724A2 (en) Texture mapping method and image processing apparatus
JP3367506B2 (en) Image processing apparatus and image processing method
JP3112810B2 (en) Method and apparatus for generating three-dimensional topographic data
US20040169655A1 (en) Active region determination for line generation in regionalized rasterizer displays
CN112509131B (en) Rendering method, system and computer readable storage medium for map area boundary in game map
US20010055015A1 (en) Area and span based Z-buffer
US6529642B1 (en) Method for enlarging/reducing digital images
JP4009289B2 (en) Method for determining a weighting factor for color-calculating a texel color value associated with a footprint
JP4325812B2 (en) Vector image drawing circuit and vector image drawing method
JP3872056B2 (en) Drawing method
JPH05290177A (en) Polygonal anti-aliasing system
JP3587105B2 (en) Graphic data processing device
JPH10509265A (en) Image organization mapping using modified pixel cache
KR100269118B1 (en) Rasterization using quadrangle

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090412

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100412

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100412

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110412

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120412

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130412

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130412

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140412

Year of fee payment: 12

EXPY Cancellation because of completion of term