JPH064679A - Image processor - Google Patents

Image processor

Info

Publication number
JPH064679A
JPH064679A JP4166189A JP16618992A JPH064679A JP H064679 A JPH064679 A JP H064679A JP 4166189 A JP4166189 A JP 4166189A JP 16618992 A JP16618992 A JP 16618992A JP H064679 A JPH064679 A JP H064679A
Authority
JP
Japan
Prior art keywords
polygon
image processing
processing apparatus
displacement
straight line
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.)
Pending
Application number
JP4166189A
Other languages
Japanese (ja)
Inventor
Naoyuki Kai
直行 甲斐
Ichiro Nagashima
一郎 長嶋
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4166189A priority Critical patent/JPH064679A/en
Publication of JPH064679A publication Critical patent/JPH064679A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To provide an image processor which can plot a polygon that is subjected to anti-aliasing at high speed with less hardware amount by simultaneously executing an anti-aliasing processing and the judgement processing of paint out area on an image processor which efficiently removes the aliasing of a boundary in the paint out or shading of the polygon. CONSTITUTION:A calculation means 1 which sequentially calculates the linear expression of a two-dimensional coordinate system in accordance with the respective sides of the polygon, judges a relative position relation of plotting points with respect to the polygon and obtains the displacement of the respective plotting points from the sides of the polygon and a conversion means 5 changing the color or gradation of the plotting point near the sides of the polygon based on displacement obtained in the calculation means 1 are provided. Then, the internal part of the polygon is painted out or it is shaded on a bit map memory.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータグラフィ
ックスにおいて図形及び画像等のイメージ情報の処理を
行なうイメージ処理装置に関し、特に、多角形の塗りつ
ぶし、或いは陰影付け等における境界のエリアシングを
効率的に除去するイメージ処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for processing image information such as figures and images in computer graphics, and more particularly, to efficiently perform boundary aliasing in polygonal filling or shading. The present invention relates to an image processing device for removing.

【0002】[0002]

【従来の技術】コンピュータグラフィックス(CG)技
法においては、画像はビットマップ、即ち2次元に配列
されたピクセルの集まりとして扱う。このため、多角形
をビットマップ上に表現する際、図16に示すように境
界部分がギザギザになってしまう。この現象はジャギー
或いはエリアシング(aliasing)と呼ばれる。
BACKGROUND OF THE INVENTION In computer graphics (CG) techniques, an image is treated as a bitmap, a collection of pixels arranged in two dimensions. Therefore, when the polygon is represented on the bitmap, the boundary portion becomes jagged as shown in FIG. This phenomenon is called jaggies or aliasing.

【0003】通常はピクセルの階調と組み合わせること
で、例えば図17に示すように、辺の近辺の点(図17
中、×印)は、階調を変えて描画することで、表示した
際のエリアシングを除去することができる。この場合に
用いられる技術がアンチエリアシング(anti-aliasing
)またはエリアサンプリングと呼ばれるもので、中で
もGoupta,Sproullによる方法が良く用いられている。
Normally, by combining with the gradation of pixels, for example, as shown in FIG. 17, points near the side (see FIG. 17).
The middle (x mark) can remove the aliasing at the time of display by drawing by changing the gradation. The technique used in this case is anti-aliasing.
) Or area sampling, among which the method by Goupta, Sproull is often used.

【0004】このGoupta-Sproullの方法では、ピクセル
はピクセル中心の回りに半径1の円錐状の分布を持った
もの(図19参照)とし、この円錐311の体積の内、
どの程度の部分が多角形内部に入っているかにより階調
を決定する。つまり、この方法は、円錐状の空間フィル
タを用いることで、空間周波数分布の内、高周波成分を
落とすことでエリアシングを除去しているものである。
この方法によれば、フィルタ関数が中心の回りに対称に
なっていることから、中心からの距離の関数になってお
り、予め値をテーブルに保持しておくことにより、以下
の手順で処理を行なうことができる。
In the Goupta-Sproull method, the pixels have a cone-shaped distribution with a radius of 1 around the pixel center (see FIG. 19), and the volume of the cone 311 is
The gradation is determined depending on how much part is inside the polygon. That is, this method removes aliasing by using a conical spatial filter to drop high-frequency components in the spatial frequency distribution.
According to this method, since the filter function is symmetrical about the center, it is a function of the distance from the center, and by storing the value in the table in advance, the processing is performed in the following procedure. Can be done.

【0005】(1) 各ピクセルの中心から辺までの距離を
求める。
(1) The distance from the center of each pixel to the side is obtained.

【0006】(2) この距離を基に、ピクセルをどの階調
で塗るかをテーブルを参照して求める。
(2) Based on this distance, the gradation to which the pixel is painted is determined by referring to a table.

【0007】例えば、図18において、多角形のある辺
301に対して点A、B、C、及びDを考えると、点B
及びCが対象となり、各点から辺301までの距離dB
及びdC に基づき、テーブルを参照して階調を求める。
尚、点Dは多角形内部の点であるため多角形の色で塗ら
れ、点Aは外部の点であるので塗られない。
For example, consider points A, B, C, and D with respect to a side 301 having a polygon in FIG.
And C, and the distance dB from each point to side 301
, And dC, the gradation is obtained by referring to the table.
Since the point D is a point inside the polygon, it is painted in the color of the polygon, and the point A is an outside point and is not painted.

【0008】上記ステップ(1) は、多角形の各辺に沿っ
て、順次加算のみを用いた計算により行なわれる。
The step (1) is performed by calculation using only sequential addition along each side of the polygon.

【0009】一方、多角形の塗りつぶし処理では、塗り
つぶすべき領域の判定が必要である。領域の判定では、
図20に示すように、各yの値について、x方向スキャ
ンライン上の両端の点を求め、三角形321を塗ってい
く。上記Goupta-Sproullの方法では、アンチエリアシン
グのための階調の値は辺に沿って求められるために領域
の判定とは別の処理となり、また求められる階調が異な
るため、処理が煩雑で、ハードウェア化も困難であっ
た。
On the other hand, in the polygonal filling process, it is necessary to determine the area to be filled. In the area judgment,
As shown in FIG. 20, for each value of y, the points at both ends on the x-direction scan line are obtained, and the triangle 321 is painted. In the above Goupta-Sproull method, since the gradation value for anti-aliasing is obtained along the side, the processing is different from the area determination, and the required gradation is different, so the processing is complicated. It was difficult to make it into hardware.

【0010】[0010]

【発明が解決しようとする課題】以上のように、従来の
イメージ処理装置では、アンチエリアス処理の技法とし
て例えばGoupta-Sproullの方法を用いており、アンチエ
リアシングのための階調の値は辺に沿って求めるため
に、塗りつぶし処理における塗りつぶすべき領域の判定
とは別の処理となり、また求められる階調が異なるた
め、処理が煩雑で、ハードウェア化も困難であるという
問題があった。
As described above, in the conventional image processing apparatus, for example, the Goupta-Sproull method is used as the anti-aliasing technique, and the gradation value for anti-aliasing is the edge value. In addition, since the processing is different from the determination of the area to be filled in the filling processing, and the required gradation is different, the processing is complicated and hardware implementation is difficult.

【0011】本発明は、上記問題点を解決するもので、
その目的は、アンチエリアス処理と塗りつぶしにおける
領域の判定処理とを同時に行なうことにより、より少な
いハードウェア量で、高速にアンチエリアスされた多角
形を描画可能なイメージ処理装置を提供することであ
る。
The present invention solves the above problems,
It is an object of the present invention to provide an image processing device capable of drawing an anti-aliased polygon at high speed with a smaller amount of hardware by simultaneously performing the anti-aliasing process and the region determination process in filling.

【0012】[0012]

【課題を解決するための手段】前記課題を解決するため
に、本発明の第1の特徴は、図1に示す如く、多角形の
各辺に対応して2次元座標系の1次式を順次計算し、描
画点の前記多角形に対する相対的位置関係を判定し、各
描画点の前記多角形の辺からの変位を求める計算手段1
と、前記計算手段1で求められた変位に基づき、前記多
角形の辺の近辺の描画点の色または階調を変える変換手
段5とを具備し、ビットマップメモリ上で前記多角形の
内部を塗りつぶす、或いは陰影付けを行なうことであ
る。
In order to solve the above-mentioned problems, the first feature of the present invention is that, as shown in FIG. 1, a linear expression of a two-dimensional coordinate system is set for each side of a polygon. Calculation means 1 for sequentially calculating and determining the relative positional relationship of the drawing point with respect to the polygon, and obtaining the displacement of each drawing point from the side of the polygon.
And a conversion means 5 for changing the color or gradation of a drawing point near the side of the polygon based on the displacement obtained by the calculation means 1, and the inside of the polygon on the bitmap memory. Filling or shading.

【0013】本発明の第2の特徴は、請求項1に記載の
イメージ処理装置において、前記変換手段5は、ROM
またはRAMによるテーブルで構成されることである。
A second feature of the present invention is that in the image processing apparatus according to claim 1, the conversion means 5 is a ROM.
Alternatively, it is composed of a RAM table.

【0014】本発明の第3の特徴は、請求項1または2
に記載のイメージ処理装置において、前記計算手段1
は、ディジタル・ディファレンシャル・アナライザ若し
くは直線補間回路で構成されることである。
A third aspect of the present invention is the claim 1 or 2.
The image processing device described in 1.
Is a digital differential analyzer or linear interpolation circuit.

【0015】本発明の第4の特徴は、請求項1、2、ま
たは3に記載のイメージ処理装置において、前記計算手
段1は、前記多角形を含む、或いは前記多角形に重なる
矩形領域を定義し、2次元座標系における2方向のスキ
ャンを該矩形領域内部のみで行なうことである。
According to a fourth aspect of the present invention, in the image processing apparatus according to claim 1, 2 or 3, the calculation means 1 defines a rectangular area including the polygon or overlapping the polygon. However, scanning in two directions in the two-dimensional coordinate system is performed only inside the rectangular area.

【0016】本発明の第5の特徴は、請求項1、2、ま
たは3に記載のイメージ処理装置において、前記計算手
段1は、前記多角形を含む、或いは前記多角形に重なる
矩形領域を定義し、2次元座標系における2方向のスキ
ャンを該矩形領域内部で且つ前記多角形内部のみで行な
うことである。
A fifth feature of the present invention is the image processing apparatus according to claim 1, 2 or 3, wherein the calculation means 1 defines a rectangular area including the polygon or overlapping the polygon. However, scanning in two directions in the two-dimensional coordinate system is performed within the rectangular area and only within the polygon.

【0017】また、本発明の第6の特徴は、図1に示す
如く、幅を持つ直線の両側の辺にそれぞれ対応して2次
元座標系の1次式を順次計算し、描画点の前記直線の両
側の辺に対する相対的位置関係を判定し、各描画点の前
記直線の両側の辺からの変位を求める計算手段1と、前
記計算手段1で求められた変位に基づき、前記直線の両
側の辺の近辺の描画点の色または階調を変える変換手段
5とを具備し、アンチエリアスされた直線を描くことで
ある。
A sixth feature of the present invention is that, as shown in FIG. 1, a linear expression of a two-dimensional coordinate system is sequentially calculated for each side of a straight line having a width, and Both sides of the straight line are determined based on the displacement determined by the calculation means 1 by determining the relative positional relationship with respect to both sides of the straight line and determining the displacement of each drawing point from the both sides of the straight line. And a conversion means 5 for changing the color or gradation of the drawing point near the side of the above, and draw an anti-aliased straight line.

【0018】本発明の第7の特徴は、請求項6に記載の
イメージ処理装置において、前記計算手段1は、任意の
矩形領域を定義して、該矩形領域内部で2次元座標系に
おける2方向のスキャンを行なうことである。
The seventh feature of the present invention is, in the image processing apparatus according to claim 6, the calculation means 1 defines an arbitrary rectangular area, and two directions in a two-dimensional coordinate system are defined inside the rectangular area. Is to scan.

【0019】更に、本発明の第8の特徴は、図11に示
す如く、多角形の各辺に対応して2次元座標系の1次式
を順次計算し、描画点の前記多角形に対する相対的位置
関係を判定し、各描画点の前記多角形の辺からの変位を
求める計算手段1と、前記計算手段1で求められた変位
に基づき、ビットマップメモリに書き込むべき値と、既
に該アドレスに書き込まれている値とを混ぜ合わせるべ
き比率を決定する比率決定手段5及び55とを具備し、
ビットマップメモリ上で前記多角形の内部を塗りつぶ
す、或いは陰影付けを行なうことである。
Further, an eighth feature of the present invention is that, as shown in FIG. 11, a linear expression of a two-dimensional coordinate system is sequentially calculated corresponding to each side of a polygon, and a drawing point is relative to the polygon. Calculating unit 1 for determining the physical positional relationship and obtaining the displacement of each drawing point from the side of the polygon, a value to be written in the bit map memory based on the displacement obtained by the calculating unit 1, and the address Ratio determining means 5 and 55 for determining the ratio to be mixed with the value written in
The inside of the polygon is filled or shaded on the bitmap memory.

【0020】[0020]

【作用】本発明のイメージ処理装置では、多角形の塗り
つぶしにおける領域の判定処理とアンチエリアス処理の
ための計算を同時に同一のハードウェアで行なうことが
大きな特徴である。
The image processing apparatus of the present invention is characterized in that the calculation for the area determination processing and the anti-aliasing processing in the polygonal filling are simultaneously performed by the same hardware.

【0021】先ず、塗りつぶしにおける領域の判定処理
について説明する。多角形の各辺は次の直線の式で表さ
れる。
First, the area determination processing for filling will be described. Each side of the polygon is represented by the following straight line formula.

【0022】 f(x,y)=a×x+b×y+c=0 (1) ここで、符号が次式を満たすように定義されているもの
とする。
F (x, y) = a × x + b × y + c = 0 (1) Here, it is assumed that the sign is defined so as to satisfy the following expression.

【0023】 f(x,y)>0 多角形内部 f(x,y)=0 辺上 f(x,y)<0 多角形外部 (2) 更に、(1) 式には全体に正数を掛ける自由度があるが、
これは、 辺の直線の長軸がX軸の場合は、b=±1 (3) 辺の直線の長軸がY軸の場合は、a=±1 となるように正規化する。従って、 長軸がX軸:f(x,y)=a×x±y+c (4) 長軸がY軸:f(x,y)=±x+b×y+c (5) となる。
F (x, y)> 0 polygon inside f (x, y) = 0 side f (x, y) <0 polygon outside (2) Further, in equation (1), it is a positive number as a whole. You have the freedom to multiply
This is normalized so that when the long axis of the side straight line is the X axis, b = ± 1 (3) When the long axis of the side straight line is the Y axis, a = ± 1. Therefore, the major axis is X-axis: f (x, y) = a × x ± y + c (4) The major axis is Y-axis: f (x, y) = ± x + b × y + c (5).

【0024】多角形の各辺についてf(x,y)の符号
を知ることで、点(x,y)が多角形の内部に位置する
かどうかを判定できる。即ち、全ての辺についてf
(x,y)>0となる点が多角形内部の点である。
By knowing the sign of f (x, y) for each side of the polygon, it can be determined whether the point (x, y) is located inside the polygon. That is, f for all sides
The point where (x, y)> 0 is the point inside the polygon.

【0025】一方、f(x,y)の値は、点(x,y)
の単軸方向の辺までの距離(符号付きの値)を表す。例
えば、多角形が図2に示すような辺201を有する場
合、点A及びBから辺201までのY軸方向の距離dYA
及びdYBは、f(xA ,yA )及びf(xB ,yB )で
与えられる。これらは、辺201までの垂直距離ではな
いが、辺201の傾きと合わせて、変換手段(テーブル
ROM)5のキーとして用いることで、階調の値を求め
ることができる。
On the other hand, the value of f (x, y) is the point (x, y).
Represents the distance (signed value) to the side in the uniaxial direction of. For example, when the polygon has a side 201 as shown in FIG. 2, the distance dYA in the Y-axis direction from the points A and B to the side 201.
And dYB are given by f (xA, yA) and f (xB, yB). These are not the vertical distances to the side 201, but by using them as the keys of the conversion means (table ROM) 5 together with the inclination of the side 201, the gradation value can be obtained.

【0026】f(x,y)の値が一定の範囲内、例えば
−1≦f(x,y)<1の時に、アンチエリアスの処理
対象として階調を変える場合、1つの辺に注目して以下
の処理を行なう。
In the case where the value of f (x, y) is within a certain range, for example, -1≤f (x, y) <1, when changing the gradation as the antialiasing processing target, one side is focused on. And perform the following processing.

【0027】即ち、f(x,y)<−1の時には、多角
形外部であり描画せず、−1≦f(x,y)<1の時に
は、辺の近辺であり階調を変えて描画し(但し、他の辺
については多角形内部の場合)、f(x,y)≧1の時
には、多角形内部であり描画する(但し、他の辺につい
ても多角形内部の場合)。
That is, when f (x, y) <-1, it is outside the polygon and is not drawn. When -1≤f (x, y) <1, it is near the side and the gradation is changed. Draw (however, if other sides are inside the polygon), and if f (x, y) ≧ 1, draw as being inside the polygon (however, if other sides are also inside the polygon).

【0028】本発明の第1、第2、第3、第4、及び第
5の特徴のイメージ処理装置では、計算手段1により多
角形の各辺に対応して2次元座標系の1次式を順次計算
し、また描画点の前記多角形に対する相対的位置関係を
判定し、更に各描画点の前記多角形の辺からの変位を求
め、この変位に基づき、変換手段5により前記多角形の
辺の近辺の描画点の色または階調を変え、ビットマップ
メモリ上で前記多角形の内部を塗りつぶす、或いは陰影
付けを行なうようにしている。尚、計算手段1は、前記
多角形を含む、或いは前記多角形に重なる矩形領域を定
義して、2次元座標系における2方向のスキャンを該矩
形領域内部のみ、或いは該矩形領域内部で且つ多角形内
部のみで行なうようにすることも可能である。
In the image processing apparatus having the first, second, third, fourth and fifth features of the present invention, the calculation means 1 corresponds to each side of the polygon and the linear expression of the two-dimensional coordinate system is used. Is calculated sequentially, the relative positional relationship of the drawing point with respect to the polygon is determined, and the displacement of each drawing point from the side of the polygon is obtained. Based on this displacement, the converting means 5 calculates the polygon Colors or gradations of drawing points near the sides are changed to fill or shade the inside of the polygon on the bitmap memory. Note that the calculation unit 1 defines a rectangular area including the polygon or overlapping the polygon, and scans in two directions in a two-dimensional coordinate system only within the rectangular area or within the rectangular area. It is also possible to do it only inside the polygon.

【0029】これにより、従来独立の処理であった、ア
ンチエリアスの為の変位の計算処理と、塗りつぶしにお
ける多角形の内部領域の判定処理とを共通に行なうこと
ができ、より少ないハードウェア量で、高速にアンチエ
リアス処理を施した多角形を描画することができる。
As a result, it is possible to commonly carry out the calculation processing of the displacement for anti-aliasing and the judgment processing of the internal area of the polygon in the filling, which are conventionally independent processing, and with a smaller amount of hardware. , It is possible to draw a polygon with anti-aliasing processing at high speed.

【0030】また、本発明の第6及び第7の特徴のイメ
ージ処理装置では、計算手段1により幅を持つ直線の両
側の辺にそれぞれ対応して2次元座標系の1次式を順次
計算し、また描画点の前記直線の両側の辺に対する相対
的位置関係を判定し、更に各描画点の前記直線の両側の
辺からの変位を求め、この変位に基づき、変換手段5に
より前記直線の両側の辺の近辺の描画点の色または階調
を変えて、アンチエリアスされた直線を描くようにして
いる。尚、計算手段1は、任意の矩形領域を定義して、
該矩形領域内部で2次元座標系における2方向のスキャ
ンを行なうことも可能である。
Further, in the image processing apparatus having the sixth and seventh characteristics of the present invention, the calculating means 1 sequentially calculates the linear expressions of the two-dimensional coordinate system corresponding to both sides of the straight line having the width. Also, the relative positional relationship of the drawing points with respect to both sides of the straight line is determined, and the displacement of each drawing point from both sides of the straight line is obtained, and based on this displacement, both sides of the straight line are converted by the converting means 5. The color or gradation of the drawing point near the side of is changed to draw an anti-aliased straight line. The calculation means 1 defines an arbitrary rectangular area,
It is also possible to scan in two directions in a two-dimensional coordinate system inside the rectangular area.

【0031】これにより、アンチエリアスの為の変位の
計算処理と、塗りつぶしにおける幅を持つ直線の内部領
域の判定処理とを共通に行なうことができ、より少ない
ハードウェア量で、高速にアンチエリアス処理を施した
直線を描画することができる。
As a result, the displacement calculation process for anti-aliasing and the determination process of the internal area of the straight line having the width in the filling can be performed in common, and the anti-aliasing process can be performed at high speed with a smaller amount of hardware. You can draw a straight line.

【0032】更に、本発明の第8の特徴のイメージ処理
装置では、計算手段1により多角形の各辺に対応して2
次元座標系の1次式を順次計算し、また描画点の前記多
角形に対する相対的位置関係を判定し、更に各描画点の
前記多角形の辺からの変位を求め、この変位に基づき、
比率決定手段5及び55によりビットマップメモリに書
き込むべき値と、既に該アドレスに書き込まれている値
とを混ぜ合わせるべき比率を決定し、ビットマップメモ
リ上で前記多角形の内部を塗りつぶす、或いは陰影付け
を行なうようにしている。
Further, in the image processing apparatus of the eighth feature of the present invention, the calculation means 1 corresponds to each side of the polygon and outputs 2
The linear equation of the dimensional coordinate system is sequentially calculated, the relative positional relationship of the drawing point with respect to the polygon is determined, the displacement of each drawing point from the side of the polygon is determined, and based on this displacement,
The ratio determining means 5 and 55 determine the ratio at which the value to be written in the bit map memory and the value already written in the address are mixed, and the inside of the polygon is filled or shaded in the bit map memory. I am trying to attach it.

【0033】これにより、上述の第1〜第7の特徴のイ
メージ処理装置を3次元グラフィックの多角形の陰影付
け処理等に適用することができる。
As a result, the image processing apparatus having the above-mentioned first to seventh characteristics can be applied to the polygon shading processing of a three-dimensional graphic.

【0034】[0034]

【実施例】以下、本発明に係る実施例を図面に基づいて
説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0035】図1に本発明の第1の実施例に係るイメー
ジ処理装置の構成図を示す。
FIG. 1 is a block diagram of an image processing apparatus according to the first embodiment of the present invention.

【0036】同図において、本実施例のイメージ処理装
置は、多角形の各辺について直線式f(x,y)の値を
計算する領域DDA(Digital Differential Analyzer
;直線補間回路)1と、描画アドレスADRを生成す
るアドレス生成部9と、多角形の各辺の傾きを保持する
傾きレジスタ3と、階調の値を保持するテーブルROM
5と、セレクタ7とから構成されている。
In the figure, the image processing apparatus of the present embodiment is an area DDA (Digital Differential Analyzer) for calculating the value of the linear expression f (x, y) for each side of the polygon.
A linear interpolation circuit) 1, an address generator 9 for generating a drawing address ADR, a tilt register 3 for holding the tilt of each side of the polygon, and a table ROM for holding the gradation value.
5 and a selector 7.

【0037】アドレス生成部9では、例えば図6に示す
ように、描きたい多角形203を包含する矩形領域20
5のアドレスを順次発生する。また、アドレスの変化方
向がX軸方向かY軸方向かを示す信号XYSELが領域
DDA1に対して出力されており、領域DDA1では、
この信号XYSELに応じて直線式f(x,y)の計算
を行なう。
In the address generator 9, for example, as shown in FIG. 6, a rectangular area 20 containing a polygon 203 to be drawn.
5 addresses are sequentially generated. Further, a signal XYSEL indicating whether the address changing direction is the X-axis direction or the Y-axis direction is output to the area DDA1, and in the area DDA1,
The linear equation f (x, y) is calculated according to the signal XYSEL.

【0038】領域DDA1からは、多角形のどの辺の近
辺の点であるかを示す信号が出力されており、この信号
がレジスタファイルで構成される傾きレジスタ3の出力
を選択する辺選択信号ESELとなる。
A signal indicating which side of the polygon is near the point is output from the area DDA1, and the side selection signal ESEL for selecting the output of the tilt register 3 configured by the register file is used as the signal. Becomes

【0039】また領域DDA1からは、辺選択信号ES
ELが指定する辺について、直線式f(x,y)の値を
−1から1の範囲で表す変位信号VALが出力されてお
り、辺選択信号ESELで選択された辺の傾きの値GR
Dとこの変位信号VALとを合わせてテーブルROM5
のキーとしている。
From the area DDA1, the side selection signal ES
The displacement signal VAL representing the value of the linear expression f (x, y) in the range of -1 to 1 is output for the side designated by EL, and the slope value GR of the side selected by the side selection signal ESEL is output.
Table ROM5 by combining D and this displacement signal VAL
The key is.

【0040】テーブルROM5から読み出された階調の
値Cはセレクタ7の入力となる。セレクタ7のもう1つ
の入力は階調1を表す信号であり、領域DDA1からの
辺の近辺であることを示す領域判定信号Pを選択信号と
して入力して選択出力する。セレクタ7の出力は、画像
メモリ(図示しない)に対するライトデータWDmとな
る。
The gradation value C read from the table ROM 5 is input to the selector 7. The other input of the selector 7 is a signal representing gradation 1, and the area determination signal P indicating that it is near the side from the area DDA1 is input as a selection signal and selectively output. The output of the selector 7 becomes the write data WDm for the image memory (not shown).

【0041】更に領域DDA1からは、多角形内部また
は辺の近辺であることを示す領域判定信号Rが出力され
ており、画像メモリに対するライトイネーブル信号とし
て用いられる。
Further, the area DDA1 outputs an area determination signal R indicating that it is inside the polygon or near the side, and is used as a write enable signal for the image memory.

【0042】このような構成により、本実施例では以下
のようにしてアンチエリアスされた多角形の描画が行な
われる。
With this configuration, in this embodiment, the anti-aliased polygon is drawn as follows.

【0043】即ち、アドレス生成部9が生成するアドレ
スADRの内、多角形の内部及び辺の近辺の点に関して
描画が行なわれる。多角形の内部の点については、描画
するデータは階調1であるが、辺の近辺の点について
は、その辺の直線式f(x,y)の値とその辺の傾きか
らテーブルROM5により求められた階調の値Cであ
る。このように本実施例のイメージ処理装置では、アン
チエリアスのための点と辺の距離計算が同一のハードウ
ェアで行なわれている。
That is, in the address ADR generated by the address generating unit 9, drawing is performed on the inside of the polygon and the points near the side. For the points inside the polygon, the data to be drawn has a gradation of 1, but for the points near the side, the values in the linear expression f (x, y) of the side and the slope of the side are used to make a table ROM5. It is the obtained gradation value C. As described above, in the image processing apparatus of this embodiment, the distance calculation between the point and the side for anti-aliasing is performed by the same hardware.

【0044】次に、本実施例の領域DDA1について詳
細に説明する。尚、ここでは、多角形として三角形を扱
う場合について説明するが、一般の多角形への拡張は容
易である。
Next, the area DDA1 of this embodiment will be described in detail. It should be noted that here, a case of handling a triangle as a polygon will be described, but extension to a general polygon is easy.

【0045】図3に領域DDA1の詳細構成図を示す。
同図において、領域DDA1は、三角形の各辺に対応す
る3つの辺DDA、即ち第1辺DDA11、第2辺DD
A12、及び第3辺DDA13と、プライオリティエン
コーダ15と、セレクタ17と、領域判定回路19とか
ら構成されている。
FIG. 3 shows a detailed configuration diagram of the area DDA1.
In the same figure, the area DDA1 has three sides DDA corresponding to each side of the triangle, that is, the first side DDA11 and the second side DD.
A12, a third side DDA 13, a priority encoder 15, a selector 17, and an area determination circuit 19.

【0046】各辺DDA11、12、及び13からは、
描画点が辺の近辺であることを示す信号P0、P1、及
びP2と、描画点がその辺に対して三角形の内部である
ことを示す信号Q0、Q1、及びQ2と、各辺について
の直線式f(x,y)の値の符号を含んだ小数部V0、
V1、及びV2とがそれぞれ出力されている。
From each side DDA 11, 12, and 13,
Signals P0, P1, and P2 indicating that the drawing point is near the side, signals Q0, Q1, and Q2 indicating that the drawing point is inside the triangle with respect to the side, and a straight line for each side. A decimal part V0 containing the sign of the value of the expression f (x, y),
V1 and V2 are output respectively.

【0047】描画点が辺の近辺であることを示す信号P
0、P1、及びP2は、プライオリティエンコーダ15
により2ビットの信号となる。通常は、信号P0、P
1、及びP2の内0または1つが”1”となるが、頂点
付近では2つが”1”となることがあるためにプライオ
リティエンコーダを用いている。
A signal P indicating that the drawing point is near the side
0, P1, and P2 are priority encoders 15
Results in a 2-bit signal. Normally, the signals P0, P
Although 0 or 1 of 1 and P2 is "1", two of them may be "1" in the vicinity of the apex, and thus the priority encoder is used.

【0048】このプライオリティエンコーダ15の出力
は、外部に対する辺選択信号ESELとなるだけでな
く、セレクタ17において直線式f(x,y)の値の符
号を含んだ小数部V0、V1、及びV2を選択する選択
信号にもなる。このセレクタ17の出力は、変位信号V
ALとなる。
The output of the priority encoder 15 is not only the edge selection signal ESEL to the outside, but also the fractional parts V0, V1 and V2 containing the sign of the value of the linear expression f (x, y) in the selector 17. It also serves as a selection signal for selection. The output of the selector 17 is the displacement signal V
Become AL.

【0049】領域判定回路19では、描画点が辺の近辺
であることを示す信号P0、P1、及びP2と、描画点
がその辺に対して三角形の内部であることを示す信号Q
0、Q1、及びQ2とを入力して、以下の論理により領
域判定信号P及びRを生成する。
In the area determination circuit 19, the signals P0, P1 and P2 indicating that the drawing point is near the side and the signal Q indicating that the drawing point is inside the triangle with respect to the side.
Inputting 0, Q1, and Q2, the area determination signals P and R are generated by the following logic.

【0050】[0050]

【数1】 R=(P0+Q0)・(P1+Q1)・(P2+Q2) Q=Q0・Q1・Q2 P=R・/Q (6)[Equation 1] R = (P0 + Q0) ・ (P1 + Q1) ・ (P2 + Q2) Q = Q0 ・ Q1 ・ Q2 P = R ・ / Q (6)

【0051】ここで、記号”・”は論理積、”+”は論
理和、”/”は論理否定を示す。
Here, the symbol ".multidot." Indicates a logical product, "+" indicates a logical sum, and "/" indicates a logical negation.

【0052】図4に辺DDA11、12、及び13の詳
細構成図を示す。同図に示すように、辺DDA11、1
2、及び13は、レジスタYA、XA、YC、及びX
C、セレクタ21及び22、加算器23、並びに出力値
生成回路25から構成されている。
FIG. 4 is a detailed block diagram of the sides DDA 11, 12 and 13. As shown in the figure, the sides DDA11, 1
2 and 13 are registers YA, XA, YC, and X
C, selectors 21 and 22, an adder 23, and an output value generation circuit 25.

【0053】レジスタYA、XA、YC、及びXCは、
外部からのデータバスDBUSにより動作開始時に値を
セットできるようになっている。レジスタYA及びXA
はセレクタ21を介して、また、レジスタYC及びYC
はセレクタ22を介して加算器23の入力となる。尚、
これらのレジスタYA、XA、YC、及びXC、セレク
タ21及び22、並びに加算器23は、共通にlビット
で構成されており、MSB(最上位ビット)は符号ビッ
トsign、下位mビットは小数部dec、これらの間
のl−m−1ビットは整数部intになっており、2の
補数表現をとっている。
Registers YA, XA, YC, and XC are
A value can be set at the start of the operation by the external data bus DBUS. Registers YA and XA
Through the selector 21 and registers YC and YC
Becomes an input to the adder 23 via the selector 22. still,
The registers YA, XA, YC, and XC, the selectors 21 and 22, and the adder 23 are commonly configured by 1 bit. The MSB (most significant bit) is a sign bit sign and the lower m bit is a decimal part. dec, 1-m-1 bits between them are the integer part int, and are in the two's complement representation.

【0054】2つのセレクタ21及び22は、共通に、
アドレス生成回路9からの選択信号XYSELにより、
(図6において)X軸方向にスキャンする時はレジスタ
XA及びXCを選択し、次のY軸方向のラインに進む時
はレジスタYA及びYCを選択するようになっている。
レジスタXA及びXCが選択された際は、加算結果はレ
ジスタXAに格納されるが、レジスタYA及びYCが選
択された際は、加算結果はレジスタXA及びYAの両方
に格納される。尚、レジスタXC及びYCは、辺の直線
式((1)式)におけるa及びbがセットされる定数レ
ジスタである。
The two selectors 21 and 22 have in common:
By the selection signal XYSEL from the address generation circuit 9,
When scanning in the X-axis direction (in FIG. 6), the registers XA and XC are selected, and when proceeding to the next line in the Y-axis direction, the registers YA and YC are selected.
When the registers XA and XC are selected, the addition result is stored in the register XA, but when the registers YA and YC are selected, the addition result is stored in both the registers XA and YA. The registers XC and YC are constant registers in which a and b in the linear equation of the side (Equation (1)) are set.

【0055】出力値生成回路25は、図5に示すような
論理構成を有し、レジスタXAの出力XAoの符号ビッ
トsign、整数部int、及び小数部decから、描
画点が辺の近辺であることを示す信号Pi(i=0,
1,2)、描画点が三角形の内部であることを示す信号
Qi、並びに、辺の直線式f(x,y)の値の符号を含
む小数部Viを生成する。
The output value generation circuit 25 has a logical configuration as shown in FIG. 5, and the drawing point is near the side from the sign bit sign, the integer part int, and the decimal part dec of the output XAo of the register XA. Signal Pi (i = 0,
1, 2), a signal Qi indicating that the drawing point is inside the triangle, and a fractional part Vi including the sign of the value of the linear expression f (x, y) of the side are generated.

【0056】本実施例では、辺の直線式f(x,y)の
値と傾きの両方をテーブルROM5のキーとして用いて
いるが、傾きを省くことも可能である。この場合、発生
する画像の品質がやや劣化する。また、テーブルROM
5を省略し、辺の直線式f(x,y)の値をそのまま階
調の値として用いることもできる。更に、テーブルRO
M5をRAMにより構成すること、或いはPLAまたは
ランダムロジックにより構成することも可能である。
In this embodiment, both the value of the straight line side expression f (x, y) and the slope are used as the keys of the table ROM 5, but the slope can be omitted. In this case, the quality of the generated image is slightly deteriorated. Also, table ROM
It is also possible to omit 5 and use the value of the linear expression f (x, y) of the side as it is as the gradation value. Furthermore, the table RO
It is also possible to configure M5 with RAM, or with PLA or random logic.

【0057】また本実施例では、多角形を包含する矩形
の領域全体をスキャンするようにしているが、スキャン
方法を変更して、多角形の部分のみスキャンすること
で、描画時間を減らすようにすることも可能である。こ
の変形例について、以下詳細に説明する。
In the present embodiment, the entire rectangular area including the polygon is scanned. However, the scanning method is changed so that only the polygonal portion is scanned so that the drawing time can be reduced. It is also possible to do so. This modification will be described in detail below.

【0058】本変形例では、図7に示すように、三角形
211について次の順番でスキャンしながら、領域DD
A1により辺の直線式f(x,y)の値を計算してい
く。この時、各ライン毎に、次のラインのDDA計算の
ために情報を保存すべき点が1つずつ存在する。
In this modification, as shown in FIG. 7, the area DD is scanned while scanning the triangle 211 in the following order.
The value of the linear expression f (x, y) of the side is calculated using A1. At this time, for each line, there is one point to store information for DDA calculation of the next line.

【0059】(1) X軸方向のスキャン開始点が領域内で
あれば、保存すべき点とする(図7中、点P1)。
(1) If the scan start point in the X-axis direction is within the area, it is set as a point to be stored (point P1 in FIG. 7).

【0060】(2) X軸方向に計算を行ない、初めて領域
内に入った点を保存すべき点とする(点P2,P3)。
(2) The calculation is carried out in the X-axis direction, and the points that enter the area for the first time are set as points to be stored (points P2 and P3).

【0061】(3) 計算を継続し、領域外に出た時点で、
そのラインの処理を終了する。
(3) When the calculation is continued and the user goes out of the area,
The processing of that line is completed.

【0062】(4) 保存した点から、Y軸方向へ1点分移
動する。
(4) Move one point in the Y-axis direction from the saved point.

【0063】(5) 移動した点(点P1y,P2y,P3
y)から新たにX軸方向のスキャンを行なう。
(5) The moved point (points P1y, P2y, P3
From y), a new scan in the X-axis direction is performed.

【0064】以上の処理をライン数分繰り返す。The above processing is repeated for the number of lines.

【0065】本変形例では、三角形の左辺についてX座
標が増える向きにYの変化方向を決める必要がある。こ
のため、例えば、図8に示すような三角形221の場
合、上下に2分割し、上半分についてはY座標が減少す
る方向に、下半分についてはY座標が増加する方向にス
キャンを行なう。
In this modification, it is necessary to determine the changing direction of Y in the direction in which the X coordinate increases on the left side of the triangle. Therefore, for example, in the case of the triangle 221, as shown in FIG. 8, the triangle is divided into two parts, and the upper half is scanned in the direction in which the Y coordinate decreases, and the lower half is scanned in the direction in which the Y coordinate increases.

【0066】本変形例の方法を採用する場合、辺DDA
11、12、及び13は、図9に示すような構成とな
る。図4におけるレジスタYAの代わりにレジスタSA
VEを備え、保存すべき点については、レジスタXAの
内容をレジスタSAVEに転送する。またX軸方向のス
キャン時には、 (XA)+(XC)→(XA) の処理を行なう。更に、上記ステップ(4) のY軸方向へ
の移動の際には、 (YA)+(YC)→(XA) の処理を行なう。
When the method of this modification is adopted, the side DDA
11, 12, and 13 are configured as shown in FIG. Register SA instead of register YA in FIG.
Regarding the point to be provided with VE and to be saved, the contents of the register XA are transferred to the register SAVE. When scanning in the X-axis direction, the process of (XA) + (XC) → (XA) is performed. Further, when moving in the Y-axis direction in step (4), the process of (YA) + (YC) → (XA) is performed.

【0067】更に別の変形例として、幅を持つアンチエ
リアスされた直線を描画することもできる。図10に示
すように、幅を持つ直線の両側線231及び232を2
つの辺DDAに対応させればよい。また、直線の両端は
バウンディングボックス233により切断することがで
きる。
As a further modification, it is possible to draw an anti-aliased straight line having a width. As shown in FIG. 10, two side lines 231 and 232 of a straight line having a width are
It suffices to correspond to one side DDA. Further, both ends of the straight line can be cut by the bounding box 233.

【0068】次に、図11に本発明の第2の実施例に係
るイメージ処理装置の構成図を示す。本実施例は、本発
明を3次元グラフィックの多角形の陰影付け処理に適用
したものである。
Next, FIG. 11 shows a block diagram of an image processing apparatus according to the second embodiment of the present invention. In this embodiment, the present invention is applied to a shading process for a polygon of a three-dimensional graphic.

【0069】同図において、本実施例のイメージ処理装
置は、領域DDA1、アドレス生成部9、傾きレジスタ
3、テーブルROM5、セレクタ7、色DDA51、Z
DDA53、及びピクセル演算部55から構成されてい
る。
In the figure, the image processing apparatus of this embodiment has an area DDA1, an address generator 9, an inclination register 3, a table ROM 5, a selector 7, a color DDA 51, Z.
It is composed of a DDA 53 and a pixel calculator 55.

【0070】領域DDA1、アドレス生成部9、傾きレ
ジスタ3、テーブルROM5、及びセレクタ7の詳細構
成及び動作については、第1の実施例と同様であるが、
セレクタ7の出力が階調そのものではなく、αブレンデ
ィングのための補間係数αとして用いられている点が異
なる。
The detailed configurations and operations of the area DDA1, the address generator 9, the inclination register 3, the table ROM 5, and the selector 7 are the same as those in the first embodiment,
The difference is that the output of the selector 7 is used not as the gradation itself but as an interpolation coefficient α for α blending.

【0071】色(R,G,B)の補間、並びにZ値の補
間は辺DDA11、12、及び13と同様に、次の1次
補間で行なわれる。
The color (R, G, B) interpolation and the Z value interpolation are performed by the following primary interpolation as in the case of the sides DDA 11, 12, and 13.

【0072】 f(x,y)=a×x+b×y+c (7) 色DDA51は、図12に示すように、3つのDDA、
即ちR・DDA51r、G・DDA51g、及びB・D
DA51bからなる。これら、R・DDA51r、G・
DDA51g、及びB・DDA51b、並びにZDDA
53は、図13に示す構成をとる。これは、領域DDA
1における辺DDA11、12、及び13とほぼ同様の
構成であるが、出力SDj(j=r,g,b)またはZ
iは、単にレジスタXAの整数部intを取り出すだけ
になっている。
F (x, y) = a × x + b × y + c (7) The color DDA 51 has three DDAs, as shown in FIG.
That is, R / DDA51r, G / DDA51g, and B / D
It consists of DA51b. R, DDA51r, G,
DDA 51g, B / DDA 51b, and ZDDA
53 has the configuration shown in FIG. This is the area DDA
The configuration is almost the same as that of the sides DDA 11, 12, and 13 in 1, but the output SDj (j = r, g, b) or Z
i simply takes out the integer part int of the register XA.

【0073】ピクセル演算部55は、Zチェック、並び
にアンチエリアスのためのαブレンディングを行なう。
色DDA51からの色値SD、ZDDA53からのZ値
Zi、バッファメモリ(図示せず)から読み込んだ色値
DDm及びZ値Zm、領域DDA1からの領域判定信号
R、並びに、補間係数αを入力とし、画像メモリ(図示
しない)に対するライトデータWDm及びライトイネー
ブル信号WEを生成する。
The pixel calculator 55 performs Z-check and α-blending for anti-aliasing.
The color value SD from the color DDA 51, the Z value Zi from the ZDDA 53, the color value DDm and the Z value Zm read from a buffer memory (not shown), the area determination signal R from the area DDA1, and the interpolation coefficient α are input. , Write data WDm and a write enable signal WE for an image memory (not shown).

【0074】図14にピクセル演算部55の詳細構成図
を示す。同図に示すように、ピクセル演算部55は、
R、G、及びBの色に応じたαブレンディング演算器7
1、72、及び73、色入力レジスタ76、色出力レジ
スタ77、Z出力レジスタ78、Z入力レジスタ79、
ライトイネーブル遅延レジスタ80、並びにZ比較器7
5から構成されている。
FIG. 14 shows a detailed configuration diagram of the pixel calculation section 55. As shown in FIG.
Α blending calculator 7 corresponding to R, G, and B colors
1, 72, and 73, a color input register 76, a color output register 77, a Z output register 78, a Z input register 79,
Write enable delay register 80 and Z comparator 7
It is composed of 5.

【0075】色入力レジスタ76を介してバッファメモ
リから読み込んだ色値DD、及び色DDA51からの色
値(描画データ)SDは、R、G、及びBに分解されて
(DDr、DDg、DDb、並びに、SDr、SDg、
SDb)、3つのαブレンディング演算器71、72、
及び73で演算される。αブレンディング演算器71、
72、及び73の詳細構成図を図15に示す。減算器8
1、乗算器83、及び加算器85を備えて、次の計算を
行なっている。
The color value DD read from the buffer memory via the color input register 76 and the color value (drawing data) SD from the color DDA 51 are decomposed into R, G and B (DDr, DDg, DDb, And SDr, SDg,
SDb) three α blending computing units 71, 72,
And 73. α blending calculator 71,
FIG. 15 shows a detailed configuration diagram of 72 and 73. Subtractor 8
1, the multiplier 83 and the adder 85 are provided to perform the following calculation.

【0076】 WDj=α×SDj+(1−α)×DDj (8) ここで、j=r,g,bであり、WDjは画像メモリへ
のライトデータである。
WDj = α × SDj + (1−α) × DDj (8) Here, j = r, g, and b, and WDj is write data to the image memory.

【0077】ZDDA53からのZ値Ziは、Z入力レ
ジスタ79を介してバッファメモリから読み込んだZ値
ZmとZ比較器75で比較され、書き込むデータの方が
手前にある(Z値が小さい)時、比較結果Coは”1”
となり、多角形の内部または辺の近辺であることを示す
領域判定信号Rとの論理積をゲート回路G11により取
って、ライトイネーブル信号WEを生成する。但し、書
き込みデータとのタイミングを合わせるために、ライト
イネーブル遅延レジスタ80を介して出力される。
The Z value Zi from the ZDDA 53 is compared with the Z value Zm read from the buffer memory via the Z input register 79 by the Z comparator 75, and when the data to be written is in front (the Z value is small). , The comparison result Co is “1”
Then, the gate circuit G11 obtains a logical product with the area determination signal R indicating that it is inside the polygon or near the side, and generates the write enable signal WE. However, in order to match the timing with the write data, it is output via the write enable delay register 80.

【0078】[0078]

【発明の効果】以上のように本発明によれば、計算手段
により多角形の各辺に対応して2次元座標系の1次式を
順次計算し、また描画点の前記多角形に対する相対的位
置関係を判定し、更に各描画点の前記多角形の辺からの
変位を求め、この変位に基づき、変換手段により前記多
角形の辺の近辺の描画点の色または階調を変え、ビット
マップメモリ上で前記多角形の内部を塗りつぶす、或い
は陰影付けを行なうこととしたので、従来独立の処理で
あった、アンチエリアスの為の変位の計算処理と、塗り
つぶしにおける多角形の内部領域の判定処理とを共通に
行なうことができ、より少ないハードウェア量で、高速
にアンチエリアス処理を施した多角形を描画可能なイメ
ージ処理装置を提供することができる。
As described above, according to the present invention, the linear means of the two-dimensional coordinate system is sequentially calculated by the calculating means in correspondence with each side of the polygon, and the drawing point is relative to the polygon. The positional relationship is determined, the displacement of each drawing point from the side of the polygon is determined, and the color or gradation of the drawing point near the side of the polygon is changed by the conversion means based on this displacement, and the bitmap is set. Since the inside of the polygon is filled or shaded on the memory, the displacement calculation process for anti-aliasing and the determination process of the polygon internal region in the filling process, which are conventionally independent processes, are performed. It is possible to provide an image processing device capable of drawing a polygon subjected to antialiasing at high speed with a smaller amount of hardware.

【0079】また、本発明によれば、計算手段により幅
を持つ直線の両側の辺にそれぞれ対応して2次元座標系
の1次式を順次計算し、また描画点の前記直線の両側の
辺に対する相対的位置関係を判定し、更に各描画点の前
記直線の両側の辺からの変位を求め、この変位に基づ
き、変換手段により前記直線の両側の辺の近辺の描画点
の色または階調を変えて、アンチエリアスされた直線を
描くこととしたので、アンチエリアスの為の変位の計算
処理と、塗りつぶしにおける幅を持つ直線の内部領域の
判定処理とを共通に行なうことができ、より少ないハー
ドウェア量で、高速にアンチエリアス処理を施した直線
を描画可能なイメージ処理装置を提供することができ
る。
Further, according to the present invention, the linear means of the two-dimensional coordinate system is sequentially calculated by the calculating means in correspondence with both sides of the straight line having a width, and the sides of the drawing point on both sides of the straight line are calculated. Relative to the drawing line, the displacement of each drawing point from both sides of the straight line is obtained, and based on this displacement, the color or gradation of the drawing points near the two sides of the straight line is converted by the converting means. Since it was decided to draw an anti-aliased straight line, it is possible to commonly perform the displacement calculation process for anti-aliasing and the internal region determination process of a straight line having a width in filling, which is less. It is possible to provide an image processing apparatus capable of drawing a straight line subjected to anti-aliasing processing at high speed with the amount of hardware.

【0080】更に、本発明によれば、計算手段により多
角形の各辺に対応して2次元座標系の1次式を順次計算
し、また描画点の前記多角形に対する相対的位置関係を
判定し、更に各描画点の前記多角形の辺からの変位を求
め、この変位に基づき、比率決定手段によりビットマッ
プメモリに書き込むべき値と、既に該アドレスに書き込
まれている値とを混ぜ合わせるべき比率を決定し、ビッ
トマップメモリ上で前記多角形の内部を塗りつぶす、或
いは陰影付けを行なうこととしたので、上述のイメージ
処理装置を3次元グラフィックの多角形の陰影付け処理
等に適用することが可能となる。
Further, according to the present invention, the calculating means sequentially calculates the linear expression of the two-dimensional coordinate system corresponding to each side of the polygon, and determines the relative positional relationship of the drawing point with respect to the polygon. Further, the displacement of each drawing point from the side of the polygon is obtained, and the value to be written in the bitmap memory by the ratio determining means and the value already written in the address should be mixed based on this displacement. Since the ratio is determined and the inside of the polygon is filled or shaded on the bitmap memory, the above-described image processing apparatus can be applied to the polygon shading process of a three-dimensional graphic. It will be possible.

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

【図1】本発明の第1の実施例に係るイメージ処理装置
の構成図である。
FIG. 1 is a configuration diagram of an image processing apparatus according to a first embodiment of the present invention.

【図2】本発明の作用説明図であり、多角形の辺までの
Y軸方向の距離を説明する図である。
FIG. 2 is an operation explanatory diagram of the present invention, and is a diagram illustrating a distance in the Y-axis direction to a side of a polygon.

【図3】第1の実施例のイメージ処理装置における領域
DDAの詳細構成図である。
FIG. 3 is a detailed configuration diagram of an area DDA in the image processing apparatus according to the first embodiment.

【図4】第1の実施例のイメージ処理装置における辺D
DAの詳細構成図である。
FIG. 4 is a side D in the image processing apparatus according to the first embodiment.
It is a detailed block diagram of DA.

【図5】第1の実施例のイメージ処理装置の辺DDAに
おける出力値生成回路の論理回路図である。
FIG. 5 is a logic circuit diagram of an output value generation circuit in the side DDA of the image processing apparatus of the first embodiment.

【図6】第1の実施例のイメージ処理装置におけるアド
レス生成部のアドレス発生の説明図である。
FIG. 6 is an explanatory diagram of address generation of an address generation unit in the image processing apparatus according to the first exemplary embodiment.

【図7】第1の実施例のイメージ処理装置の変形例にお
けるスキャン方式の説明図である。
FIG. 7 is an explanatory diagram of a scanning method in a modified example of the image processing apparatus of the first embodiment.

【図8】第1の実施例のイメージ処理装置の変形例にお
けるスキャン方式の説明図である。
FIG. 8 is an explanatory diagram of a scan method in a modified example of the image processing apparatus of the first embodiment.

【図9】第1の実施例のイメージ処理装置の変形例にお
ける辺DDAの詳細構成図である。
FIG. 9 is a detailed configuration diagram of a side DDA in a modified example of the image processing apparatus of the first embodiment.

【図10】第1の実施例のイメージ処理装置の別の変形
例における幅を持つ直線の描画を説明する図である。
FIG. 10 is a diagram illustrating drawing of a straight line having a width in another modification of the image processing apparatus of the first embodiment.

【図11】本発明の第2の実施例に係るイメージ処理装
置の構成図である。
FIG. 11 is a configuration diagram of an image processing apparatus according to a second embodiment of the present invention.

【図12】本発明の第2の実施例のイメージ処理装置に
おける色DDAの構成図である。
FIG. 12 is a configuration diagram of a color DDA in the image processing apparatus according to the second embodiment of the present invention.

【図13】本発明の第2の実施例のイメージ処理装置に
おける色DDA及びZDDAの詳細構成図である。
FIG. 13 is a detailed configuration diagram of colors DDA and ZDDA in the image processing apparatus according to the second embodiment of the present invention.

【図14】本発明の第2の実施例のイメージ処理装置に
おけるピクセル演算器の詳細構成図である。
FIG. 14 is a detailed configuration diagram of a pixel calculator in the image processing apparatus according to the second embodiment of the present invention.

【図15】本発明の第2の実施例のイメージ処理装置の
ピクセル演算器におけるαブレンディング演算器の詳細
構成図である。
FIG. 15 is a detailed configuration diagram of an α blending computing unit in the pixel computing unit of the image processing apparatus according to the second embodiment of the present invention.

【図16】多角形の辺のエリアシングの説明図である。FIG. 16 is an explanatory diagram of aliasing of sides of a polygon.

【図17】アンチエリアスされた多角形の辺の説明図で
ある。
FIG. 17 is an explanatory diagram of sides of an anti-aliased polygon.

【図18】従来技術によるアンチエリアスの説明図であ
る。
FIG. 18 is an explanatory diagram of antialiasing according to a conventional technique.

【図19】従来技術によるアンチエリアスでの空間フィ
ルタの説明図である。
FIG. 19 is an explanatory diagram of a spatial filter in anti-aliasing according to a conventional technique.

【図20】従来技術による多角形のスキャン方式の説明
図である。
FIG. 20 is an explanatory diagram of a polygon scanning method according to a conventional technique.

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

1 領域DDA(計算手段) 3 傾きレジスタ 5 テーブルROM(変換手段) 7 セレクタ 9 アドレス生成部 DBUS データバス ADR アドレス XYSEL アドレスの変化方向がX軸方向かY軸方向
かを示す信号 ESEL 辺選択信号 VAL 変位信号 GRD 辺の傾きの値 C 階調の値 P,R 領域判定信号 WDm ライトデータ WE ライトイネーブル信号 11,12,13 辺DDA 15 プライオリティエンコーダ 17 セレクタ 19 領域判定回路 P0,P1,P2 描画点が辺の近辺であることを示す
信号 Q0,Q1,Q2 描画点がその辺に対して三角形の内
部であることを示す信号 V0,V1,V2 f(x,y)の値の符号を含んだ小
数部 YA,XA,YC,XC,SAVE レジスタ 21,22,61,62 セレクタ 23,63 加算器 25 出力値生成回路 sign 符号ビット dec 小数部 int 整数部 XAo レジスタXAの出力 G1〜G4,G11 ゲート回路 203 多角形 205,213,223 矩形領域 211,221 三角形 P1,P2,P3,P1y,P2y,P3y 点 231,232 直線の両側線 233 バウンディングボックス 51 色DDA 53 ZDDA 55 ピクセル演算部 α 補間係数 51r R・DDA 51g G・DDA 51b B・DDA SD,SDj,SDr,SDg,SDb 色DDAから
の色値 Zi ZDDAからのZ値 DD,DDm バッファメモリから読み込んだ色値 Zm バッファメモリから読み込んだZ値 71,72、73 αブレンディング演算器 76 色入力レジスタ 77 色出力レジスタ 78 Z出力レジスタ 79 Z入力レジスタ 80 ライトイネーブル遅延レジスタ 75 Z比較器 WD,WDj 画像メモリへのライトデータ Co 比較結果
1 Area DDA (Calculation Means) 3 Gradient Register 5 Table ROM (Conversion Means) 7 Selector 9 Address Generation Unit DBUS Data Bus ADR Address XYSEL Signal that indicates the direction of change of address is X-axis direction or Y-axis direction ESEL Side selection signal VAL Displacement signal GRD Side slope value C Gradation value P, R Area determination signal WDm Write data WE write enable signal 11, 12, 13 Side DDA 15 Priority encoder 17 Selector 19 Area determination circuit P0, P1, P2 Signals Q0, Q1, Q2 indicating that it is near an edge Signals V0, V1, V2 indicating that the drawing point is inside the triangle with respect to that edge V0, V1, V2 Decimal number including the sign of the value of f (x, y) Part YA, XA, YC, XC, SAVE register 21, 22, 61, 62 Selector 23, 3 Adder 25 Output value generation circuit sign Sign bit dec Fractional part int Integer part Output of XAo register XA G1 to G4, G11 Gate circuit 203 Polygon 205, 213, 223 Rectangular area 211, 221 Triangle P1, P2, P3, P1y , P2y, P3y Points 231 and 232 Straight lines 233 Bounding box 51 Color DDA 53 ZDDA 55 Pixel calculation part α Interpolation coefficient 51r R / DDA 51g G / DDA 51b B / DDA SD, SDj, SDr, SDg, SDb Color DDA Color value from Zi Z value from ZDDA DD, DDm Color value read from buffer memory Zm Z value read from buffer memory 71, 72, 73 α blending calculator 76 Color input register 77 Color output register 78 Z output register 7 Z input register 80 write enable delay register 75 Z comparator WD, the write data Co comparison results to WDj image memory

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 多角形の各辺に対応して2次元座標系の
1次式を順次計算し、描画点の前記多角形に対する相対
的位置関係を判定し、各描画点の前記多角形の辺からの
変位を求める計算手段と、 前記計算手段で求められた変位に基づき、前記多角形の
辺の近辺の描画点の色または階調を変える変換手段とを
有し、 ビットマップメモリ上で前記多角形の内部を塗りつぶ
す、或いは陰影付けを行なうことを特徴とするイメージ
処理装置。
1. A linear expression of a two-dimensional coordinate system is sequentially calculated corresponding to each side of a polygon, and a relative positional relationship of a drawing point with respect to the polygon is determined, and a polygonal position of each drawing point of the polygon is determined. And a conversion unit for changing the color or gradation of the drawing point near the side of the polygon based on the displacement calculated by the calculation unit. An image processing apparatus, characterized in that the inside of the polygon is filled or shaded.
【請求項2】 前記変換手段は、ROMまたはRAMに
よるテーブルで構成されることを特徴とする請求項1に
記載のイメージ処理装置。
2. The image processing apparatus according to claim 1, wherein the conversion unit is composed of a table formed of a ROM or a RAM.
【請求項3】 前記計算手段は、ディジタル・ディファ
レンシャル・アナライザ若しくは直線補間回路で構成さ
れることを特徴とする請求項1または2に記載のイメー
ジ処理装置。
3. The image processing apparatus according to claim 1, wherein the calculation means is composed of a digital differential analyzer or a linear interpolation circuit.
【請求項4】 前記計算手段は、前記多角形を含む、或
いは前記多角形に重なる矩形領域を定義し、2次元座標
系における2方向のスキャンを該矩形領域内部のみで行
なうことを特徴とする請求項1、2、または3に記載の
イメージ処理装置。
4. The calculation means defines a rectangular area including the polygon or overlapping the polygon, and scans in two directions in a two-dimensional coordinate system only inside the rectangular area. The image processing apparatus according to claim 1, 2, or 3.
【請求項5】 前記計算手段は、前記多角形を含む、或
いは前記多角形に重なる矩形領域を定義し、2次元座標
系における2方向のスキャンを該矩形領域内部で且つ前
記多角形内部のみで行なうことを特徴とする請求項1、
2、または3に記載のイメージ処理装置。
5. The calculation means defines a rectangular area including the polygon or overlapping the polygon, and scanning in two directions in a two-dimensional coordinate system is performed within the rectangular area and only inside the polygon. The method according to claim 1,
2. The image processing device according to 2 or 3.
【請求項6】 幅を持つ直線の両側の辺にそれぞれ対応
して2次元座標系の1次式を順次計算し、描画点の前記
直線の両側の辺に対する相対的位置関係を判定し、各描
画点の前記直線の両側の辺からの変位を求める計算手段
と、 前記計算手段で求められた変位に基づき、前記直線の両
側の辺の近辺の描画点の色または階調を変える変換手段
とを有し、 アンチエリアスされた直線を描くことを特徴とするイメ
ージ処理装置。
6. A linear expression of a two-dimensional coordinate system is sequentially calculated corresponding to both sides of a straight line having a width, and a relative positional relationship of drawing points with respect to both sides of the straight line is determined. Calculating means for obtaining the displacement of the drawing point from both sides of the straight line; and converting means for changing the color or gradation of the drawing points near both sides of the straight line based on the displacement obtained by the calculating means. An image processing apparatus having an anti-aliased straight line.
【請求項7】 前記計算手段は、任意の矩形領域を定義
して、該矩形領域内部で2次元座標系における2方向の
スキャンを行なうことを特徴とする請求項6に記載のイ
メージ処理装置。
7. The image processing apparatus according to claim 6, wherein the calculation means defines an arbitrary rectangular area, and scans in two directions in a two-dimensional coordinate system inside the rectangular area.
【請求項8】 多角形の各辺に対応して2次元座標系の
1次式を順次計算し、描画点の前記多角形に対する相対
的位置関係を判定し、各描画点の前記多角形の辺からの
変位を求める計算手段と、 前記計算手段で求められた変位に基づき、ビットマップ
メモリに書き込むべき値と、既に該アドレスに書き込ま
れている値とを混ぜ合わせるべき比率を決定する比率決
定手段とを有し、 ビットマップメモリ上で前記多角形の内部を塗りつぶ
す、或いは陰影付けを行なうことを特徴とするイメージ
処理装置。
8. A linear expression of a two-dimensional coordinate system is sequentially calculated corresponding to each side of the polygon, and a relative positional relationship of the drawing point with respect to the polygon is determined, and the polygon of each drawing point is calculated. Calculating means for obtaining a displacement from a side, and a ratio determining for determining a ratio at which a value to be written in the bit map memory and a value already written in the address should be mixed based on the displacement obtained by the calculating means. And an image processing device for filling or shading the inside of the polygon on a bitmap memory.
JP4166189A 1992-06-24 1992-06-24 Image processor Pending JPH064679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4166189A JPH064679A (en) 1992-06-24 1992-06-24 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4166189A JPH064679A (en) 1992-06-24 1992-06-24 Image processor

Publications (1)

Publication Number Publication Date
JPH064679A true JPH064679A (en) 1994-01-14

Family

ID=15826739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4166189A Pending JPH064679A (en) 1992-06-24 1992-06-24 Image processor

Country Status (1)

Country Link
JP (1) JPH064679A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08198970A (en) * 1995-01-27 1996-08-06 Norin Suisansyo Sanshi Konchu Nogyo Gijutsu Kenkyusho Production of silk fibroin fine powder
JP2001243461A (en) * 2000-02-29 2001-09-07 Sony Corp Graphics plotter
JP2002529868A (en) * 1998-11-06 2002-09-10 イマジネイション テクノロジーズ リミテッド Shading of 3D computer generated images
WO2005004105A1 (en) * 2003-07-03 2005-01-13 Sharp Kabushiki Kaisha Character display apparatus, character display method, character display program, and recording medium
JP2006520963A (en) * 2003-03-18 2006-09-14 クゥアルコム・インコーポレイテッド Triangular rendering using direct estimation
JP2010055611A (en) * 2008-08-29 2010-03-11 Fujitsu Ltd Triangle traversing method and device in graphics rasterization
US7764292B2 (en) 2004-11-15 2010-07-27 Sharp Kabushiki Kaisha Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
US8390641B2 (en) 2009-02-23 2013-03-05 Fujitsu Limited Device and method for multicolor vector image processing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08198970A (en) * 1995-01-27 1996-08-06 Norin Suisansyo Sanshi Konchu Nogyo Gijutsu Kenkyusho Production of silk fibroin fine powder
JP2002529868A (en) * 1998-11-06 2002-09-10 イマジネイション テクノロジーズ リミテッド Shading of 3D computer generated images
JP2001243461A (en) * 2000-02-29 2001-09-07 Sony Corp Graphics plotter
US7800631B2 (en) 2003-03-18 2010-09-21 Qualcomm Incorporated Triangle rendering using direct evaluation
JP2006520963A (en) * 2003-03-18 2006-09-14 クゥアルコム・インコーポレイテッド Triangular rendering using direct estimation
US7800632B2 (en) 2003-03-18 2010-09-21 Qualcomm Incorporated Triangle rendering using direct evaluation
CN100437746C (en) * 2003-07-03 2008-11-26 夏普株式会社 Character display apparatus, character display method, character display program, and recording medium
US7701467B2 (en) 2003-07-03 2010-04-20 Sharp Kabushiki Kaisha Character display apparatus, character display method, character display program, and recording medium
KR100749873B1 (en) * 2003-07-03 2007-08-21 샤프 가부시키가이샤 Character display apparatus, character display method, and readable recording medium
WO2005004105A1 (en) * 2003-07-03 2005-01-13 Sharp Kabushiki Kaisha Character display apparatus, character display method, character display program, and recording medium
US7764292B2 (en) 2004-11-15 2010-07-27 Sharp Kabushiki Kaisha Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
JP2010055611A (en) * 2008-08-29 2010-03-11 Fujitsu Ltd Triangle traversing method and device in graphics rasterization
US8390641B2 (en) 2009-02-23 2013-03-05 Fujitsu Limited Device and method for multicolor vector image processing

Similar Documents

Publication Publication Date Title
KR100243174B1 (en) Apparatus and method of generating sub-pixel mask
JP5149288B2 (en) Composition of ANISOMETRIC texture (TEXTURE) (SYNTHESIS)
JPH1186007A (en) Method for finding rate of pixel covered with primitive
EP1958162B1 (en) Vector graphics anti-aliasing
US7764292B2 (en) Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
JP2001512265A (en) Texture mapping in 3D computer graphics
US20200279415A1 (en) Efficiently Computed Distance Fields
JPH064679A (en) Image processor
JPH0927045A (en) Image processor
JP3543928B2 (en) Pixel number converter
JP3026706B2 (en) Image processing device
US6718072B1 (en) Image conversion method, image processing apparatus, and image display apparatus
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
US5333250A (en) Method and apparatus for drawing antialiased lines on a raster display
JP2010134654A (en) Image rendering processing apparatus
JP2005346605A (en) Antialias drawing method and drawing apparatus using the same
JP2001101445A (en) Soft shadow casting circuit
JP3493745B2 (en) Drawing device
JP2009245159A (en) Image processor, image processing program and image processing method
AU2009222438A1 (en) Anti-aliased polygon rendering
JP3214389B2 (en) Data converter
JPH08212357A (en) Device and method for interpolation, and image generating device
JP2000338959A (en) Image processing device
JPH05205070A (en) Graphic plotting method
JPH05119759A (en) Method and device for generating character and graphic