[go: up one dir, main page]

JP3367506B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method

Info

Publication number
JP3367506B2
JP3367506B2 JP2000093507A JP2000093507A JP3367506B2 JP 3367506 B2 JP3367506 B2 JP 3367506B2 JP 2000093507 A JP2000093507 A JP 2000093507A JP 2000093507 A JP2000093507 A JP 2000093507A JP 3367506 B2 JP3367506 B2 JP 3367506B2
Authority
JP
Japan
Prior art keywords
vertex
tile
polygon
determination
information
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 - Fee Related
Application number
JP2000093507A
Other languages
Japanese (ja)
Other versions
JP2001283242A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2000093507A priority Critical patent/JP3367506B2/en
Publication of JP2001283242A publication Critical patent/JP2001283242A/en
Application granted granted Critical
Publication of JP3367506B2 publication Critical patent/JP3367506B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

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 and an image processing method, and more particularly to an image processing apparatus and an image processing method capable of high-speed processing.

【0002】[0002]

【従来の技術】3次元グラフィクス描画処理手法の一つ
に、表示画面に対応する画像メモリを最小ユニットであ
るタイルに分割し、このタイル毎に描画処理を行う分割
処理方法がある。このタイル分割処理方法では、三角形
ポリゴンの各頂点の座標情報を参照して三角形ポリゴン
の全領域が含まれるポリゴン矩形領域を設定し、そのポ
リゴン矩形領域内に存在するタイル毎に描画処理を行
う。
2. Description of the Related Art One of three-dimensional graphics rendering processing methods is a partitioning processing method in which an image memory corresponding to a display screen is divided into tiles, which are the minimum units, and rendering processing is performed for each tile. In this tile division processing method, the polygon rectangular area including the entire area of the triangular polygon is set by referring to the coordinate information of each vertex of the triangular polygon, and the drawing processing is performed for each tile existing in the polygon rectangular area.

【0003】従来のタイル処理方法を図18を参照して
説明すると、図18で811,812〜821〜831
〜は、上述したタイルであり、P1〜P3は三角形ポリ
ゴン800を構成する各頂点を表す。各頂点の座標をそ
れぞれ、P1(x1,y1),P2(x2,y2),P
3(x3,y3)とし、これらの座標から各頂点P1〜
P3を包含する矩形801の左上の座標(Xmin,Y
min)と、右下の座標(Xmax,Ymax)を算出
する。ここで、画面の左上隅に座標原点(0,0)を設
定している。
A conventional tile processing method will be described with reference to FIG. 18. 811, 812 to 821 to 831 in FIG.
Are the tiles described above, and P1 to P3 represent the vertices that form the triangular polygon 800. The coordinates of each vertex are P1 (x1, y1), P2 (x2, y2), P, respectively.
3 (x3, y3), and from these coordinates, each vertex P1
Upper left coordinates (Xmin, Y) of rectangle 801 including P3
min) and the lower right coordinates (Xmax, Ymax) are calculated. Here, the coordinate origin (0,0) is set in the upper left corner of the screen.

【0004】このように設定された矩形801を構成す
るタイルは、822,823〜827,832〜83
7,・・・872〜877の順に描画処理される。
The tiles forming the rectangle 801 set in this way are 822, 823 to 827, 832 to 83.
7, ... 872 to 877 are drawn in this order.

【0005】[0005]

【発明が解決しようとする課題】上述した従来のタイル
処理方法は、三角形ポリゴンの各頂点のX座標およびY
座標の最小値と最大値を求め、これらの最小値と最大値
から設定されたポリゴン矩形領域内のタイルに対し、順
番にポリゴン処理を行っている。
The conventional tile processing method described above uses the X coordinate and the Y coordinate of each vertex of a triangular polygon.
The minimum value and the maximum value of the coordinates are obtained, and the polygon processing is sequentially performed on the tiles in the polygon rectangular area set from the minimum value and the maximum value.

【0006】従って、サイズの大きい三角形ポリゴンが
ポリゴン矩形領域内に存在する場合、一般的にはポリゴ
ン矩形領域内に描画処理をしなくても良いタイルが多数
存在する。しかしながらこれらのタイルに対しても、ポ
リゴン処理が行われてしまう。例えば、図18のタイル
822,823,826,827,832,837,8
72等は、三角形ポリゴン800の外側に位置するタイ
ルであり、本来描画対象とならないタイルであるが、従
来のタイル処理方法では実際には描画処理がなされてし
まう。
Therefore, when a large triangular polygon exists in the polygon rectangular area, generally, there are many tiles in the polygon rectangular area that do not need to be drawn. However, polygon processing is also performed on these tiles. For example, tiles 822, 823, 826, 827, 832, 837, 8 in FIG.
72 and the like are tiles located outside the triangular polygon 800 and are tiles that should not be originally drawn. However, the conventional tile processing method actually carries out drawing processing.

【0007】最近描画対象の画像が複雑化するに伴い、
画像を構成するポリゴンのポリゴン形状が多様化し、か
つポリゴンデータのデータ量が著しく増加してきてい
る。このため、リアルタイム性が必要な画像処理装置お
よび画像処理方法においては、特に描画処理を高速に実
行することへの要求が強くなっている。しかしながら、
従来のタイル処理方法は、本来描画処理を必要としない
タイルまで描画処理を行うため、描画処理の処理速度が
遅いという問題がある。
As the image to be drawn has recently become complicated,
The polygon shapes of polygons forming an image are diversified, and the amount of polygon data is increasing remarkably. Therefore, in image processing apparatuses and image processing methods that require real-time processing, there is a strong demand for high-speed drawing processing. However,
The conventional tile processing method has a problem in that the processing speed of the drawing processing is low because the drawing processing is performed up to the tile that originally does not require the drawing processing.

【0008】このため本発明の目的は、ポリゴンデータ
を構成する各頂点を全て包含するポリゴン矩形領域を設
定し、このポリゴン矩形領域に含まれるタイルがポリゴ
ンの内側に存在するのか、外側に存在するのかを判定
し、ポリゴンの外側に存在するタイルについては描画処
理を行わないことにより、高速に描画処理を行うことが
可能な画像処理装置および画像処理方法を提供すること
にある。
Therefore, an object of the present invention is to set a polygon rectangular area including all vertices forming polygon data, and tiles included in this polygon rectangular area are present inside or outside the polygon. It is an object of the present invention to provide an image processing device and an image processing method capable of performing high-speed drawing processing by determining whether or not the tiles existing outside the polygon are not drawn.

【0009】[0009]

【課題を解決するための手段】そのため本発明による画
像処理方法は、マトリクス状に配列された矩形状のタイ
ルから構成され表示画面に対応する画像メモリに、ポリ
ゴンを含む画像データを前記タイル毎に描画する画像処
理方法であって、前記画像メモリにおいて前記ポリゴン
を包含する領域であるポリゴン矩形領域を生成し、この
ポリゴン矩形領域に存在する前記タイルの情報であるタ
イル情報を出力するタイル選択工程と、前記タイル情報
と前記ポリゴンの座標情報を参照して、前記ポリゴン矩
形領域内の前記タイルから前記ポリゴンを含むタイルで
ある描画タイルを選択する描画タイル選択工程とを備
え、前記ポリゴンが三角形からなる三角形ポリゴンであ
り、前記描画タイル選択工程は、前記ポリゴンの第1の
頂点を選択し、この頂点を通るx方向およびy方向の各
直線により、前記ポリゴン矩形領域を4分割するポリゴ
ン矩形領域分割工程と、前記第1の頂点に隣接する第2
の頂点が前記4分割された平面のどちらに存在するかを
判定し、判定情報である第2頂点判定情報を出力する第
2頂点判定工程と、前記第1の頂点から前記第2の頂点
に向かって前記第2の頂点に隣接する第3の頂点を探索
し、前記第3の頂点が前記第1の頂点と前記第2の頂点
を通る直線により分割された平面のどちらに存在するか
を判定し、判定情報である第3頂点判定情報を出力する
第3頂点判定工程と、前記第1の頂点の位置座標と前記
第2頂点判定情報および第3頂点判定情報を参照して、
前記第1の頂点および前記第2の頂点から構成される辺
に対して、前記タイル判定頂点を算出する第1の判定頂
点算出工程と、前記第3頂点判定工程で判定された前記
第3の頂点が存在する平面を、前記第2頂点を通るx方
向およびy方向の各直線により分割し、分割された平面
のどちらに前記第3の頂点が存在するかを判定し、判定
情報である第2の第3頂点判定情報を出力する第2の第
3頂点判定工程と、 前記第1の頂点の位置座標と前記第
2頂点判定情報および前記第2の第3頂点判定情報を参
照して、前記第2の頂点および前記第3の頂点から構成
される辺と前記第3の頂点および前記第1の頂点から構
成される辺に対して、前記タイル判定頂点を各々算出す
る第2の判定頂点算出工程と、前記各タイル判定頂点の
座標情報と、前記タイル判定頂点に対応する前記三角形
ポリゴンの辺の座標情報を参照し、前記各タイル判定頂
点が前記タイル判定頂点に対応する前記三角形ポリゴン
の辺を含む直線により分割された平面のどちらに存在す
るかを判定し、判定情報であるタイル判定頂点の内外判
定情報を出力するタイル判定頂点の内外判定工程と、前
記タイル判定頂点の内外判定情報を参照し、前記タイル
の頂点が前記三角形ポリゴンの内部に存在するか否かを
判定するタイルの内外判定工程とを備え、前記描画タイ
ルを前記画像メモリに描画し、前記描画タイル以外の前
記タイルに対しては前記画像メモリに描画しないことを
特徴としている。
Therefore, according to the image processing method of the present invention , rectangular tiles arranged in a matrix are used.
Image memory that is composed of
Image processing that draws image data including gons for each tile
A method of processing the polygons in the image memory.
Generate a polygon rectangular area that is an area containing
Information that is the information of the tiles existing in the polygon rectangular area
Tile information output step, and the tile information
And the polygon coordinate information to refer to the polygon rectangle.
A tile containing the polygon from the tile in the shape region
A drawing tile selection process for selecting a drawing tile is provided.
Well, if the polygon is a triangular polygon consisting of triangles,
In the drawing tile selection step,
Select a vertex and each of the x and y directions through this vertex
Polygon that divides the polygon rectangular area into four by a straight line
A rectangular area dividing step, and a second area adjacent to the first vertex.
Which of the four divided planes the vertices of
The second vertex determination information that is the determination information and outputs the determination information
Two-vertex determination step, and from the first vertex to the second vertex
Search for a third vertex adjacent to the second vertex towards
And the third vertex is the first vertex and the second vertex
Which of the planes is divided by the straight line passing through
Is determined and the third vertex determination information, which is the determination information, is output.
A third vertex determining step, the position coordinates of the first vertex and the
Referring to the second vertex determination information and the third vertex determination information,
An edge composed of the first vertex and the second vertex
For the first determination point for calculating the tile determination vertex
The point calculation step and the above-mentioned judgment in the third vertex judgment step
The plane in which the third vertex is present is the x direction passing through the second vertex.
Plane divided by each straight line in the direction and y direction
Which of the three vertices there is, the determination
Second second which outputs second third vertex determination information which is information
3 vertex determination step, position coordinates of the first vertex and the first vertex
See 2 vertex determination information and the 2nd 3rd vertex determination information.
The second vertex and the third vertex.
The edge, the third vertex, and the first vertex.
Calculate the tile judgment vertices for each edge
The second determination vertex calculating step of
Coordinate information and the triangle corresponding to the tile determination vertex
By referring to the coordinate information of the sides of the polygon, each tile judgment
The triangular polygon whose point corresponds to the tile determination vertex
Exists on a plane divided by a straight line containing the edges of
Whether or not the tile is determined, which is the determination information.
The inside / outside determination process of the tile determination vertex that outputs constant information, and
Refer to the inside / outside judgment information of the tile judgment apex,
Whether the vertices of the exist inside the triangular polygon
And a step of determining the inside / outside of a tile to be judged, wherein the drawing tile is drawn in the image memory, and tiles other than the drawing tile are not drawn in the image memory.

【0010】また本発明による画像処理方法は、マトリ
クス状に配列された矩形状のタイルから構成され表示画
面に対応する画像メモリに、ポリゴンを含む画像データ
を前記タイル毎に描画する画像処理方法であって、前記
画像メモリにおいて前記ポリゴンを包含する領域である
ポリゴン矩形領域を生成し、このポリゴン矩形領域に存
在する前記タイルの情報であるタイル情報を出力するタ
イル選択工程と、前記タイル情報と前記ポリゴンの座標
情報を参照して、前記ポリゴン矩形領域内の前記タイル
から前記ポリゴンを含むタイルである描画タイルを選択
する描画タイル選択工程とを備え、前記ポリゴンが三角
形からなる三角形ポリゴンであり、前記描画タイル選択
工程は、前記三角形ポリゴンを構成する3辺の長さを算
出し、これら3辺の長さの加算値を算出する工程と、前
記タイルの各頂点と前記三角形ポリゴンの頂点とを結ぶ
線分の長さを前記タイルの各頂点毎に算出し、これらの
線分の長さの加算値を算出する工程と、前記三角形ポリ
ゴンの3辺の長さの加算値と、前記線分の長さの加算値
とを基に算出した次式を満足する前記タイルの頂点が存
在する場合は、この頂点を含む前記タイルを前記描画タ
イルとして選択し、前記次式を満足する前記タイルの頂
点が存在しない場合は、対応する前記タイルを前記画像
メモリに描画しない工程とを備えることを特徴としてい
る。 3辺の長さの加算値>線分の長さの加算値>3辺の長さ
の加算値/2
[0010] The image processing method according to the invention, Matricaria
Display image composed of rectangular tiles arranged in the shape of a box
Image data including polygons in the image memory corresponding to the surface
Is an image processing method for drawing for each tile,
This is the area containing the polygon in the image memory.
Generates a polygon rectangular area and exists in this polygon rectangular area.
It outputs tile information that is information of the existing tiles.
File selection step, the tile information and the coordinates of the polygon
Referring to information, the tiles in the polygon rectangular area
Select the drawing tile that is the tile containing the polygon from
And a drawing tile selection step for
It is a triangular polygon consisting of shapes, and the drawing tile selection
The step is to calculate the lengths of the three sides forming the triangular polygon.
And a step of calculating the added value of the lengths of these three sides,
Connect each vertex of the tile and the vertex of the triangle polygon
Calculate the length of the line segment for each vertex of the tile,
Calculating the added value of the lengths of the line segments,
The added value of the length of the three sides of the gon and the added value of the length of the line segment
There is a vertex of the tile that satisfies the following formula calculated based on
If present, the tile containing this vertex is
The tiles that satisfy the following equation
If there are no points, the corresponding tile is
It is characterized by having a process of not drawing in memory
It Addition value of length of 3 sides> Addition value of length of line segment> Length of 3 sides
Addition value / 2

【0011】[0011]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described with reference to the drawings.

【0012】図1は、本発明の画像処理装置の実施の形
態を表すブロックであり、画像データをラッチし、三角
形ポリゴンの各頂点のx座長x1,x2,x3およびy
座標y1,y2,y3をそれぞれラッチし、これらのデ
ータを出力するラッチ回路101〜106と、座標x1
〜x3を相互に比較し、最大値xmaxと最小値xmi
nを出力する比較回路11と、座標y1〜y3を相互に
比較し、最大値ymaxと最小値yminを出力する比
較回路12と、最大値xmaxと最小値xminから、
タイルを単位として、三角形ポリゴンの存在するポリゴ
ン矩形領域のx方向の最大値Xmaxと最小値Xmin
を生成するX領域生成回路21と、最大値ymaxと最
小値yminから、タイルを単位として、三角形ポリゴ
ンの存在するポリゴン矩形領域のy方向の最大値Yma
xと最小値Yminを生成するY領域生成回路22とを
備えている。
FIG. 1 is a block diagram showing an embodiment of an image processing apparatus of the present invention. It latches image data and x seat lengths x1, x2, x3 and y of each vertex of a triangular polygon.
Latch circuits 101 to 106 for latching the coordinates y1, y2, y3 respectively and outputting these data, and the coordinate x1
-X3 are compared with each other, and the maximum value xmax and the minimum value xmi
From the comparison circuit 11 that outputs n, the comparison circuit 12 that compares the coordinates y1 to y3 with each other and outputs the maximum value ymax and the minimum value ymin, and the maximum value xmax and the minimum value xmin,
With tile as a unit, the maximum value Xmax and the minimum value Xmin in the x direction of a polygon rectangular area in which a triangular polygon exists
From the maximum value ymax and the minimum value ymin, and the maximum value Yma in the y direction of the polygon rectangular area in which the triangular polygons exist, in units of tiles.
x area and a Y area generation circuit 22 for generating a minimum value Ymin.

【0013】また本発明の実施の形態による画像処理装
置は、X領域生成回路21から出力される最大値Xma
xと最小値Xmin、及びY領域生成回路22から出力
される最大値Ymaxと最小値Yminとから三角形ポ
リゴンを包含するポリゴン矩形領域を生成し、ポリゴン
矩形領域のタイル情報を順に出力するポリゴン矩形領域
生成回路31を備えている。
In the image processing apparatus according to the embodiment of the present invention, the maximum value Xma output from the X area generation circuit 21 is set.
A polygon rectangular area that generates a polygon rectangular area including a triangular polygon from x and the minimum value Xmin, and the maximum value Ymax and the minimum value Ymin output from the Y area generation circuit 22, and sequentially outputs tile information of the polygon rectangular area. A generation circuit 31 is provided.

【0014】ここで、比較回路11,12、X領域生成
回路21、Y領域生成回路22、ポリゴン矩形領域生成
回路31とから、三角形ポリゴンを構成する各頂点座標
を入力し、三角形ポリゴンが存在するポリゴン矩形領域
内のタイルを決定し、このタイルに対するタイル番号な
どのタイル情報を出力するタイル選択回路51が構成さ
れる。
Here, each vertex coordinate forming a triangular polygon is input from the comparison circuits 11 and 12, the X area generating circuit 21, the Y area generating circuit 22, and the polygon rectangular area generating circuit 31, and the triangular polygon exists. A tile selection circuit 51 that determines a tile in the polygon rectangular area and outputs tile information such as a tile number for this tile is configured.

【0015】また、本発明の実施の形態による画像処理
装置は、三角形ポリゴンの各頂点のx座長x1,x2,
x3およびy座標y1,y2,y3と、タイル選択回路
51からの出力されるタイル情報とを入力して、ポリゴ
ン矩形領域内のタイルであって、ポリゴンを含む描画対
象のタイルだけを選択し、選択したタイルの情報、すな
わち描画タイル情報を出力する描画タイル選択回路41
を備えている。
Further, the image processing apparatus according to the embodiment of the present invention is arranged such that x seat lengths x1, x2 of respective vertices of a triangular polygon.
By inputting x3 and y coordinates y1, y2, y3 and the tile information output from the tile selection circuit 51, only tiles in the polygon rectangular area, which are drawing target tiles including polygons, are selected, Drawing tile selection circuit 41 that outputs information on the selected tile, that is, drawing tile information.
Is equipped with.

【0016】次に図1に示す本発明の実施の形態による
画像処理装置の動作について、図3を参照して具体的に
説明する。
Next, the operation of the image processing apparatus according to the embodiment of the present invention shown in FIG. 1 will be specifically described with reference to FIG.

【0017】図3は、マトリクス状に配列された矩形状
のタイルから構成され表示画面に対応する画像メモリ
に、三角形ポリゴン30を含む画像データが前記タイル
毎に描画される本発明の画像処理装置において、メモリ
でのタイルおよび三角形ポリゴンを表す説明図である。
FIG. 3 is an image processing apparatus of the present invention in which image data including triangular polygons 30 is drawn for each tile in an image memory which is composed of rectangular tiles arranged in a matrix and corresponds to a display screen. 3 is an explanatory diagram showing tiles and triangular polygons in a memory. FIG.

【0018】図3において、30は3頂点P1(x1,
y1,z1)、P2(x2,y2,z2)、P3(x
3,y3,z3)とから構成される三角形ポリゴンであ
る。この三角形ポリゴン30のデータが、ラッチ回路1
01〜106に入力すると、これらのラッチ回路101
〜106は、三角形ポリゴン30の頂点座標のうち2次
元座標であるx1〜x3,y1〜y3をそれぞれ出力す
る。
In FIG. 3, 30 is three vertices P1 (x1,
y1, z1), P2 (x2, y2, z2), P3 (x
3, y3, z3) and a triangular polygon. The data of this triangular polygon 30 is the latch circuit 1
01 to 106, these latch circuits 101
To 106 output two-dimensional coordinates x1 to x3 and y1 to y3 of the vertex coordinates of the triangular polygon 30, respectively.

【0019】次に比較回路11は、座標x1〜x3を相
互に比較し、座標x1〜x3の最大値xmaxと最小値
xminを出力する。図3において、x3がxmaxで
あり、x2がxminとなる。
Next, the comparison circuit 11 compares the coordinates x1 to x3 with each other and outputs the maximum value xmax and the minimum value xmin of the coordinates x1 to x3. In FIG. 3, x3 is xmax and x2 is xmin.

【0020】同様に比較回路12は、座標y1〜y3を
相互に比較し、座標y1〜y3の最大値ymaxと最小
値yminを出力する。図3において、y3がymax
であり、y1がyminとなる。ここで、左上隅をx軸
およびy軸の原点、右方向をx軸の正の向きとし、下方
向をy軸の正の向きとしている。
Similarly, the comparison circuit 12 compares the coordinates y1 to y3 with each other and outputs the maximum value ymax and the minimum value ymin of the coordinates y1 to y3. In FIG. 3, y3 is ymax
And y1 becomes ymin. Here, the upper left corner is the origin of the x-axis and the y-axis, the right direction is the positive direction of the x-axis, and the downward direction is the positive direction of the y-axis.

【0021】次にX領域生成回路21は、最大値xma
xと最小値xminから、タイルを単位として、三角形
ポリゴンの存在するポリゴン矩形領域のx方向の最大値
Xmaxと最小値Xminを生成する。
Next, the X area generation circuit 21 determines the maximum value xma.
From x and the minimum value xmin, the maximum value Xmax and the minimum value Xmin in the x direction of the polygon rectangular area in which the triangular polygon exists are generated in units of tiles.

【0022】すなわち頂点P2が存在するタイルの左辺
のx座標をXminとし、頂点P3が存在するタイルの
右辺のx座標をXmaxとし、Xmin〜Xmaxの範
囲をポリゴン矩形領域のx領域として設定する。このよ
うに、最小値xminに対応する頂点が含まれるタイル
の左辺のx座標を最小値Xminとし、最大値xmax
に対応する頂点が含まれるタイルの右辺のx座標を最大
値Xmaxとする。
That is, the x coordinate of the left side of the tile where the vertex P2 exists is Xmin, the x coordinate of the right side of the tile where the vertex P3 exists is Xmax, and the range of Xmin to Xmax is set as the x region of the polygon rectangular region. In this way, the x coordinate of the left side of the tile including the vertex corresponding to the minimum value xmin is set to the minimum value Xmin, and the maximum value xmax is set.
The x coordinate of the right side of the tile including the vertex corresponding to is set to the maximum value Xmax.

【0023】同様に、頂点P1が存在するタイルの上辺
のy座標をYminとし、頂点P3が存在するタイルの
下辺のy座標をYmaxとし、Ymin〜Ymaxの範
囲をポリゴン矩形領域のy領域として設定する。このよ
うに、最小値yminに対応する頂点が含まれるタイル
の上辺のy座標を最小値Yminとし、最大値ymax
に対応する頂点が含まれるタイルの下辺のy座標を最大
値Ymaxとする。
Similarly, the y coordinate of the upper side of the tile having the vertex P1 is Ymin, the y coordinate of the lower side of the tile having the vertex P3 is Ymax, and the range of Ymin to Ymax is set as the y region of the polygon rectangular region. To do. In this way, the y coordinate of the upper side of the tile including the vertex corresponding to the minimum value ymin is set to the minimum value Ymin, and the maximum value ymax
The y coordinate of the lower side of the tile including the vertex corresponding to is set to the maximum value Ymax.

【0024】次にポリゴン矩形領域生成回路31は、X
領域生成回路21から出力される最大値Xmaxと最小
値Xmin、及びY領域生成回路22から出力される最
大値Ymaxと最小値Yminとから三角形ポリゴンが
存在するポリゴン矩形領域内のタイルを決定し、このタ
イルのタイル番号などのタイル情報を出力する。
Next, the polygon rectangular area generation circuit 31 outputs X
From the maximum value Xmax and the minimum value Xmin output from the area generation circuit 21, and the maximum value Ymax and the minimum value Ymin output from the Y area generation circuit 22, a tile in the polygon rectangular area in which the triangular polygon exists is determined, The tile information such as the tile number of this tile is output.

【0025】図3において、x領域とy領域からポリゴ
ン矩形領域300が生成され、このポリゴン矩形領域3
00内に存在するタイルにタイル番号が付加される。す
なわち、頂点P1が含まれるタイルの行には、順に31
1,312〜のタイル番号が付加され、頂点P1にはタ
イル番号314が付加される。
In FIG. 3, a polygon rectangular area 300 is generated from the x area and the y area.
The tile number is added to the tile existing in 00. That is, the row of the tile including the vertex P1 has 31 in order.
The tile numbers 1, 312 to 312 are added, and the tile number 314 is added to the vertex P1.

【0026】同様に頂点P2にはタイル番号331が付
加され、頂点P3にはタイル番号366が付加される。
Similarly, the tile number 331 is added to the vertex P2, and the tile number 366 is added to the vertex P3.

【0027】次に描画タイル選択回路41は、三角形ポ
リゴン30の各頂点のx座長x1,x2,x3およびy
座標y1,y2,y3と、タイル選択回路51から出力
されるタイル番号とを入力して、ポリゴン矩形領域30
0内のタイルであって、三角形ポリゴンデータが存在す
る描画対象のタイルだけを選択し、選択したタイルの情
報、例えば描画タイル番号を出力する。図3において
は、タイル番号313,314,322〜325,33
1〜335,342〜345,353〜356,36
5,366が描画対象のタイルであり、描画タイル選択
回路41はこれらの選択したタイルの情報、例えば描画
タイル番号を出力する。
Next, the drawing tile selection circuit 41 causes the x seat lengths x1, x2, x3 and y of the respective vertices of the triangular polygon 30.
By inputting the coordinates y1, y2, y3 and the tile number output from the tile selection circuit 51, the polygon rectangular area 30
Only tiles within 0 that are drawing targets in which triangular polygon data exist are selected, and information on the selected tiles, for example, drawing tile numbers are output. In FIG. 3, tile numbers 313, 314, 322 to 325, 33 are used.
1-335, 342-345, 353-356, 36
5, 366 are tiles to be drawn, and the drawing tile selection circuit 41 outputs information on these selected tiles, for example, drawing tile numbers.

【0028】次に描画回路(図示せず)は、描画タイル
選択回路41から出力される描画タイル番号を参照し
て、この描画タイル番号に対応するタイルに対して、画
像メモリに描画処理を行う。
Next, a drawing circuit (not shown) refers to the drawing tile number output from the drawing tile selection circuit 41, and performs drawing processing in the image memory for the tile corresponding to this drawing tile number. .

【0029】このように本発明の実施の形態による画像
処理装置は、ポリゴンを構成する各頂点を全て包含する
ポリゴン矩形領域を設定し、このポリゴン矩形領域に含
まれるタイルがポリゴンの内側に存在するのか、外側に
存在するのかを判定し、ポリゴンの外側に存在するタイ
ルについては画像メモリに描画処理を行わないことによ
り、高速に描画処理を行うことが可能である。
As described above, the image processing apparatus according to the embodiment of the present invention sets a polygon rectangular area that includes all the vertices that form a polygon, and tiles included in this polygon rectangular area exist inside the polygon. It is possible to perform the drawing process at high speed by determining whether the tile exists outside the polygon and not performing the drawing process in the image memory for the tile existing outside the polygon.

【0030】次に図2を参照して、本発明の画像処理装
置を構成する描画タイル選択回路41の回路構成につい
て説明する。
Next, with reference to FIG. 2, the circuit configuration of the drawing tile selection circuit 41 constituting the image processing apparatus of the present invention will be described.

【0031】描画タイル選択回路41は、三角形ポリゴ
ンの各頂点のx座長x1,x2,x3およびy座標y
1,y2,y3とタイル情報を入力して、三角形ポリゴ
ンの各辺に対し最も距離的に近いタイルの頂点であるタ
イル判定頂点を各辺に対しそれぞれ算出し、タイル判定
頂点情報として出力するタイル頂点判定回路411と、
タイル判定頂点情報とタイル情報を入力して、タイル判
定頂点が対応するポリゴンの辺により分割される平面の
うちのどちらの平面に属するかを、三角形ポリゴンの各
辺に対して判定し、タイル判定頂点が三角形ポリゴンの
内部にあると判定した場合は、タイル判定頂点が属する
タイルを描画するタイルとして選択し描画タイル情報を
出力し、タイル判定頂点が三角形ポリゴンの外部にある
と判定した場合は、このタイル判定頂点が属するタイル
を描画しないタイルとして選択するタイル判定回路41
2とを備えている。
The drawing tile selection circuit 41 uses the x seat lengths x1, x2, x3 and the y coordinate y of each vertex of the triangular polygon.
1, y2, y3 and tile information are input, the tile determination vertices that are the vertices of the tile closest to each side of the triangular polygon are calculated for each side, and the tiles are output as tile determination vertex information. A vertex determination circuit 411,
By inputting tile determination vertex information and tile information, it is determined for each side of the triangular polygon which of the planes the tile determination vertex belongs to is divided by the corresponding polygon sides, and tile determination is performed. When it is determined that the vertex is inside the triangle polygon, the tile to which the tile determination vertex belongs is selected as the tile to be drawn, the drawing tile information is output, and when it is determined that the tile determination vertex is outside the triangle polygon, A tile determination circuit 41 that selects a tile to which this tile determination vertex belongs as a tile that is not drawn.
2 and.

【0032】次に本発明による第1の実施の形態の画像
処理方法について、図4,5を参照して説明する。
Next, an image processing method according to the first embodiment of the present invention will be described with reference to FIGS.

【0033】図4は、本発明による第1の実施の形態に
よる画像処理方法を表すフローチャートであり、ステッ
プS1で画面の表示サイズLx,Ly、及びタイルサイ
ズTx,Tyなどを設定する。ここで、Lx,Lyはそ
れぞれ画面のx方向及びy方向の大きさ、Tx,Tyは
それぞれタイルのx方向及びy方向の大きさを表わし、
マトリクス状に配列された矩形状のタイルから構成され
表示画面に対応する画像メモリに、三角形ポリゴンを含
む画像データがタイル毎に描画される。
FIG. 4 is a flow chart showing an image processing method according to the first embodiment of the present invention. In step S1, the screen display sizes Lx, Ly, tile sizes Tx, Ty, etc. are set. Here, Lx and Ly represent the sizes of the screen in the x direction and the y direction, respectively, and Tx and Ty represent the sizes of the tile in the x direction and the y direction, respectively.
Image data including triangular polygons is drawn for each tile in an image memory that is composed of rectangular tiles arranged in a matrix and corresponds to a display screen.

【0034】次にステップS2において、表示画面のx
方向のタイル数nxとy方向のタイル数nyを次式で算
出する。
Next, in step S2, x on the display screen
The number of tiles in the direction nx and the number of tiles in the y direction ny are calculated by the following equation.

【0035】 nx=Lx/Tx,ny=Ly/Ty ・・・(1) すなわち表示画面に対応する画像メモリは、x方向にn
x個、y方向にny個配列されたタイルにより構成され
る。
Nx = Lx / Tx, ny = Ly / Ty (1) That is, the image memory corresponding to the display screen is n in the x direction.
It is composed of tiles arranged in x and ny in the y direction.

【0036】次にステップS3で、三角形ポリゴンを構
成する3つの頂点座標P1(x1,y1),P2(x
2,y2),P3(x3,y3)を入力する。
Next, in step S3, the three vertex coordinates P1 (x1, y1), P2 (x
2, y2) and P3 (x3, y3) are input.

【0037】続いてステップS4で、タイル選択回路5
1により、三角形ポリゴンを包含するポリゴン矩形領域
内の全てのタイルを決定し、このタイルに対するタイル
番号を生成する。
Subsequently, in step S4, the tile selection circuit 5
By 1, all tiles in the polygon rectangular area including the triangular polygon are determined, and the tile number for this tile is generated.

【0038】次にステップS51において、タイルを構
成する頂点を選択する。続いてステップS52におい
て、三角形ポリゴンの3つの頂点のうちの2つの頂点を
選択し、これらの頂点を結ぶ直線lにより平面を2分割
する。
Next, in step S51, the vertices forming the tile are selected. Then, in step S52, two vertices of the three vertices of the triangular polygon are selected, and the plane is divided into two by a straight line 1 connecting these vertices.

【0039】次にステップS53において、ステップS
51で選択した頂点がステップS52で分割された平面
のどちらに存在するのか、すなわち直線l上に無い三角
形ポリゴンの第3の頂点と同一平面に存在するか、直線
lに対して反対方向の平面に存在するかが判定され、こ
の判定情報が記憶される。
Next, in step S53, step S
In which of the planes divided in step S52 the vertex selected in 51 exists, that is, in the same plane as the third vertex of the triangular polygon that is not on the straight line l, or in the opposite direction to the straight line l. It is determined whether or not it exists in, and this determination information is stored.

【0040】次にステップS54において、三角形ポリ
ゴンの3辺に対して、ステップS53の処理が終了した
か否かを判定し、終了していないと判定された場合は、
ステップS52に戻って、次の2頂点を選択してステッ
プS52以降の処理を行い、ステップS54において三
角形ポリゴンの3辺に対して、ステップS53の処理が
終了したと判定された場合、次のステップS55の処理
を行う。
Next, in step S54, it is determined whether or not the processing of step S53 is completed for the three sides of the triangular polygon. If it is determined that the processing is not completed,
Returning to step S52, the next two vertices are selected, the processes of step S52 and subsequent steps are performed, and when it is determined in step S54 that the process of step S53 is completed for the three sides of the triangular polygon, the next step The process of S55 is performed.

【0041】次にステップS55において、タイルの全
ての頂点に対して、ステップS52〜ステップS54の
処理が終了したか否かが判定され、終了していないと判
定された場合は、ステップS51に戻って、タイルを構
成する次の頂点を選択し、ステップS52〜ステップS
54の処理が終了したと判定された場合、次のステップ
S56の処理を行う。
Next, in step S55, it is determined whether or not the processes of steps S52 to S54 have been completed for all the vertices of the tile. If it is determined that the processes have not been completed, the process returns to step S51. And select the next vertex forming the tile, and step S52 to step S52.
When it is determined that the process of 54 is completed, the process of the next step S56 is performed.

【0042】ステップS56において、ステップS53
で算出された判定情報を基に、三角形ポリゴンの内部に
含まれるタイルの頂点が存在するか否かが判定される。
具体的には、タイルを構成する頂点が、三角形ポリゴン
を構成する辺に無い第3の頂点と同一平面に存在すると
いう判定条件を、異なる3辺に対して満足する場合は、
この頂点が三角形ポリゴンの内部に含まれると判定する
ことが出来る。
In step S56, step S53
Based on the determination information calculated in step 1, it is determined whether or not the apex of the tile included inside the triangular polygon exists.
Specifically, when the determination condition that the vertices that form the tile are on the same plane as the third vertex that is not on the side that forms the triangular polygon is satisfied for three different sides,
It can be determined that this vertex is included inside the triangular polygon.

【0043】ステップS56において、三角形ポリゴン
の内部に含まれるタイルの頂点が存在すると判定された
場合、ステップS57において、ステップS56の条件
を満たすタイルを描画対象の描画タイルとして選択し、
ステップS56において、三角形ポリゴンの内部に含ま
れるタイルの頂点は存在しないと判定された場合、ステ
ップS58において、上記ステップS51〜ステップS
56で判定処理したタイルは、描画を行わない非描画タ
イルとして選択される。
When it is determined in step S56 that the vertices of tiles included in the triangular polygon are present, in step S57 a tile satisfying the conditions of step S56 is selected as a drawing tile to be drawn,
If it is determined in step S56 that the vertices of the tile included inside the triangular polygon do not exist, in step S58, the steps S51 to S are performed.
The tile determined in 56 is selected as a non-drawing tile for which drawing is not performed.

【0044】そしてステップS59で、描画タイルに対
しての情報、例えば描画タイル番号などの描画タイル情
報が出力され、図4に記載していない次の処理工程で、
描画タイルに対して描画処理が行われる。
Then, in step S59, information about the drawing tile, for example, drawing tile information such as the drawing tile number is output, and in the next processing step not shown in FIG.
Drawing processing is performed on the drawing tile.

【0045】次にステップS4の処理について、図5に
示すフローチャートを参照して説明する。
Next, the processing of step S4 will be described with reference to the flowchart shown in FIG.

【0046】ステップS41で図1に示す比較回路11
は、三角形ポリゴンの3つの頂点座標を相互に比較し、
x方向の最大値xmaxと最小値xminを算出する。
In step S41, the comparison circuit 11 shown in FIG.
Compares the three vertex coordinates of a triangular polygon with each other,
The maximum value xmax and the minimum value xmin in the x direction are calculated.

【0047】次にステップS42で、図1に示すX領域
生成回路21は、三角形ポリゴンを包含するポリゴン矩
形領域において、タイルを単位とするx方向の最大値X
maxと最小値Xminを算出する。
Next, in step S42, the X area generation circuit 21 shown in FIG. 1 sets the maximum value X in the x direction in tile units in the polygon rectangular area including the triangular polygon.
Calculate max and minimum value Xmin.

【0048】同様に、ステップS43で図1に示す比較
回路12は、三角形ポリゴンの3つの頂点座標を相互に
比較し、y方向の最大値ymaxと最小値yminを算
出する。
Similarly, in step S43, the comparison circuit 12 shown in FIG. 1 compares the three vertex coordinates of the triangular polygon with each other to calculate the maximum value ymax and the minimum value ymin in the y direction.

【0049】次にステップS44で、図1に示すY領域
生成回路22は、三角形ポリゴンを包含するポリゴン矩
形領域において、タイルを単位とするy方向の最大値Y
maxと最小値Yminを算出する。
Next, at step S44, the Y area generation circuit 22 shown in FIG. 1 determines the maximum value Y in the y direction in tile units in the polygon rectangular area including the triangular polygon.
Calculate max and minimum value Ymin.

【0050】そしてステップS45で、ステップS42
で算出した最大値Xmaxと最小値Xmin、およびス
テップS44で算出した最大値Ymaxと最小値Ymi
nを基に、三角形ポリゴンを包含するポリゴン矩形領域
を設定し、設定したポリゴン矩形領域内の全てのタイル
に対してのタイル番号などのタイル情報を出力する。
Then, in step S45, step S42
The maximum value Xmax and the minimum value Xmin calculated in step S44, and the maximum value Ymax and the minimum value Ymi calculated in step S44.
A polygon rectangular area including a triangular polygon is set based on n, and tile information such as tile numbers for all tiles in the set polygon rectangular area is output.

【0051】次に図4の処理フローのうち、タイルが三
角形ポリゴンの内部にあるのか外部にあるのかを判定す
る処理内容について、図6を用い具体的に説明する。
Next, in the processing flow of FIG. 4, the processing content for determining whether the tile is inside or outside the triangular polygon will be specifically described with reference to FIG.

【0052】図6において、60は頂点P1(x1,y
1)、P2(x2,y2)、P3(x3,y3)からな
る三角形ポリゴンであり、頂点P1と頂点P2を結ぶ直
線をl1、頂点P2と頂点P3を結ぶ直線をl2、頂点
P3と頂点P1を結ぶ直線をl3とする。また図6に示
すように、三角形ポリゴン60の内部に存在しタイルを
構成する頂点をw(x”,y”)、三角形ポリゴン60
の外部に存在しタイルを構成する頂点をu(x,y)、
v(x’、y’)とする。
In FIG. 6, 60 is a vertex P1 (x1, y
1), P2 (x2, y2), P3 (x3, y3), which is a triangular polygon, where the straight line connecting the vertices P1 and P2 is l1, the straight line connecting the vertices P2 and P3 is l2, and the vertices P3 and P1 are P1. Let the straight line connecting the lines be l3. Further, as shown in FIG. 6, the vertices existing inside the triangular polygon 60 and forming the tile are w (x ″, y ″), and the triangular polygon 60
The vertices that are outside of and that make up the tile are u (x, y),
Let v (x ', y').

【0053】図4のステップS51で、タイルの頂点u
(x,y)、v(x’、y’)、w(x”,y”)のう
ちの一つ、例えばu(x,y)を選択し、続いてステッ
プS52で頂点P1,P2から直線l1を生成し、平面
を直線l1で2分割する。
In step S51 of FIG. 4, the vertex u of the tile is
One of (x, y), v (x ', y'), w (x ", y"), for example u (x, y), is selected, and then, in step S52, the vertices P1 and P2 are selected. A straight line l1 is generated and the plane is divided into two by the straight line l1.

【0054】次にステップS53で、頂点u(x,y)
は、三角形ポリゴン60を構成する辺に無い第3の頂点
P3と同一平面には存在しないと判定され、この判定情
報が記憶される。
Next, in step S53, the vertex u (x, y)
Is determined not to be on the same plane as the third vertex P3 which is not on the side forming the triangular polygon 60, and this determination information is stored.

【0055】ここで、表示画面上の頂点u(x,y)が
頂点P1(x1,y1)と頂点P2(x2,y2)とを
結ぶ直線l1により分割される平面のうちどちらの平面
に属するかは、次の不等式により判定する。
Here, which one of the planes the vertex u (x, y) on the display screen is divided by the straight line l1 connecting the vertex P1 (x1, y1) and the vertex P2 (x2, y2) belongs to. Whether or not is determined by the following inequality.

【0056】 y>((y1−y2)/(x1−x2))・(x−x1)+y1 ・・(2) 点u(x,y)が上式を満たす場合は、点u(x,y)
は図6の斜線部の範囲にあると判定し、上式を満たさな
い場合は斜線部で示す直線l1に対して反対側の平面に
あるとして判定される。このようにして、直線により分
割された平面のどちらの平面に属するかは(2)式と同
様な不等式を用いて容易に判定することが出来る。
Y> ((y1-y2) / (x1-x2)). (X-x1) + y1 .. (2) If the point u (x, y) satisfies the above equation, the point u (x, y)
Is determined to be within the range of the shaded portion in FIG. 6, and when the above expression is not satisfied, it is determined to be on the plane opposite to the straight line l1 indicated by the shaded portion. In this way, which of the planes divided by the straight line belongs to can be easily determined using the inequality similar to the equation (2).

【0057】次にステップS51で、タイルの頂点v
(x’、y’)またはw(x”,y”)が選択された場
合、ステップS53で、これらの頂点v(x’、
y’)、w(x”,y”)は、三角形ポリゴン60を構
成する辺に無い第3の頂点P3と同一平面に存在すると
判定され、この判定情報が記憶される。
Next, in step S51, the vertex v of the tile
If (x ', y') or w (x ", y") is selected, these vertices v (x ',
It is determined that y ′) and w (x ″, y ″) exist on the same plane as the third vertex P3 that is not on the side forming the triangular polygon 60, and this determination information is stored.

【0058】次にステップS54で、三角形ポリゴン6
0の3辺に対して、ステップS53の処理が終了してい
ないと判定されるので、ステップS52に戻って直線l
2を生成し、平面を直線l2で2分割する。
Next, in step S54, the triangular polygon 6
Since it is determined that the process of step S53 has not been completed for the three sides of 0, the process returns to step S52 and the straight line l
2 is generated and the plane is divided into two by the straight line l2.

【0059】ステップS53で頂点v(x’、y’)
は、三角形ポリゴン60を構成する辺l2に無い第3の
頂点P1と同一平面には存在しないと判定されるが、頂
点w(x”,y”)は、第3の頂点P1と同一平面に存
在すると判定され、これらの判定情報が記憶される。
In step S53, the vertex v (x ', y')
Is determined not to be on the same plane as the third vertex P1 which does not exist on the side 12 of the triangular polygon 60, but the vertex w (x ″, y ″) is on the same plane as the third vertex P1. It is determined to exist, and these pieces of determination information are stored.

【0060】続いてステップS54で、三角形ポリゴン
60の3辺に対して、ステップS53の処理が終了して
いないと判定されるので、ステップS52に戻って直線
l3を生成し、平面を直線l3で2分割する。
Subsequently, in step S54, since it is determined that the processing of step S53 has not been completed for the three sides of the triangular polygon 60, the process returns to step S52 to generate the straight line l3, and the plane is defined by the straight line l3. Divide into two.

【0061】次にステップS53で頂点w(x”,
y”)は、三角形ポリゴン60を構成する辺l3に無い
第3の頂点P2と同一平面には存在すると判定され、こ
の判定情報が記憶される。
Next, in step S53, the vertex w (x ",
It is determined that y ″) exists on the same plane as the third vertex P2 that does not exist on the side l3 forming the triangular polygon 60, and this determination information is stored.

【0062】次にステップS54において、直線l1,
l2,l3に対するステップS52、ステップS53の
処理が終了したと判定され、次のステップS55の処理
が行われる。
Next, in step S54, the straight line l1,
It is determined that the processes of steps S52 and S53 for 12 and 13 are finished, and the process of the next step S55 is performed.

【0063】次にステップS55において、タイルの全
ての頂点に対して、ステップS52〜ステップS54の
処理が終了したと判定された場合、ステップS56で、
ステップS53で算出された判定情報を基に、三角形ポ
リゴン60の内部に含まれるタイルの頂点が存在するか
否かが判定される。頂点w(x”,y”)は、三角形ポ
リゴン60を構成する辺に無い第3の頂点と同一平面に
存在するという判定条件を、異なる3辺に対して満足す
るので、頂点w(x”,y”)は三角形ポリゴン60の
内部に含まれると判定することが出来る。
Next, in step S55, when it is determined that the processes in steps S52 to S54 have been completed for all the vertices of the tile, in step S56,
Based on the determination information calculated in step S53, it is determined whether or not the apex of the tile included inside the triangular polygon 60 exists. The vertex w (x ″, y ″) satisfies the determination condition that the vertex w (x ″, y ″) exists on the same plane as the third vertex that does not exist on the side forming the triangular polygon 60, for the three different sides. , Y ″) can be determined to be included inside the triangular polygon 60.

【0064】上述したように、タイルを構成する4つの
頂点に対し、ステップS51〜ステップS55の処理を
順次実行し、ステップS53で得られた判定情報を基
に、ステップS56の判定処理を行う。
As described above, the processes of steps S51 to S55 are sequentially executed for the four vertices forming the tile, and the determination process of step S56 is performed based on the determination information obtained in step S53.

【0065】ステップS56において、頂点w(x”,
y”)は三角形ポリゴン60の内部に含まれると判定さ
れるので、ステップS57において、頂点w(x”,
y”)が構成するタイルは、描画タイルとして選択され
る。
In step S56, the vertex w (x ",
Since it is determined that y ″) is included inside the triangular polygon 60, in step S57, the vertex w (x ″,
The tile formed by y ″) is selected as the drawing tile.

【0066】次に本発明による第2の実施の形態の画像
処理方法について、図7,8を参照して説明する。
Next, an image processing method according to the second embodiment of the present invention will be described with reference to FIGS.

【0067】図7は、本発明による第2の実施の形態の
画像処理方法を表すフローチャートであり、ステップS
71で、三角形ポリゴンの各辺に対してタイルの各頂点
のうち三角形ポリゴンの辺に1番近い頂点であるタイル
判定頂点を算出する。
FIG. 7 is a flow chart showing an image processing method according to the second embodiment of the present invention.
At 71, for each side of the triangular polygon, the tile determination vertex which is the closest to the side of the triangular polygon among the respective vertices of the tile is calculated.

【0068】図8を参照して説明すると、頂点P1〜P
3を有する三角形ポリゴンの各辺を含む直線l1〜l3
に対し、タイル判定頂点は次のようになる。すなわち、
直線l1に対するタイル判定頂点はcであり、直線l2
に対するタイル判定頂点はa’であり、直線l3に対す
るタイル判定頂点はb”となる。
Explaining with reference to FIG. 8, the vertices P1 to P1
Straight lines l1 to l3 including each side of a triangular polygon having 3
On the other hand, the tile determination vertices are as follows. That is,
The tile determination vertex for the straight line l1 is c, and the straight line l2
The tile determination apex for the line is a ′, and the tile determination apex for the straight line l3 is b ″.

【0069】次に図7のステップS72において、三角
形ポリゴンの各辺に対するタイル判定頂点の位置関係を
判定する。
Next, in step S72 of FIG. 7, the positional relationship of the tile determination vertices with respect to each side of the triangular polygon is determined.

【0070】図9を参照すると、三角形ポリゴンの頂点
P1とP2を結ぶ直線l1とタイル81,91,92の
各タイル判定頂点の位置関係から、タイル81のタイル
判定頂点cは、直線l1によって分割された平面のうち
左方の平面内にあると判定され、タイル91,92のタ
イル判定頂点は、直線l1によって分割された平面のう
ち右方の平面、すなわち頂点P3が存在する平面と同じ
平面に存在するとして判定される。
Referring to FIG. 9, from the positional relationship between the straight line l1 connecting the vertices P1 and P2 of the triangular polygon and the tile determination vertices of the tiles 81, 91, 92, the tile determination vertex c of the tile 81 is divided by the straight line l1. It is determined that the tiles 91 and 92 are located in the left plane, and the tile determination vertices of the tiles 91 and 92 are the same planes to the right of the planes divided by the straight line l1, that is, the planes in which the vertex P3 exists. Is determined to exist.

【0071】次に図7のステップS73において、三角
形ポリゴンを構成する3辺に対してのステップ72の判
定結果に基づいて、タイルが三角形ポリゴンの内部にあ
るのか外部にあるのかを判定する。
Next, in step S73 of FIG. 7, it is determined whether the tile is inside or outside the triangular polygon based on the result of the determination in step 72 for the three sides forming the triangular polygon.

【0072】次に図10および図11を参照して、図7
の処理フローについて具体的に説明する。
Next, referring to FIGS. 10 and 11, FIG.
The processing flow of is specifically described.

【0073】最初に図11(a)に示すようにステップ
101で、三角形ポリゴンの第1の頂点を選択し、この
頂点を通るx方向およびy方向の各直線によりポリゴン
矩形領域を4分割(A〜D)する。ここで、水平方向お
よび垂直方向をそれぞれx軸およびy軸とし、右方をx
軸の正方向、下方をy軸の正方向とし、左上隅を座標原
点(0,0)とする。また、第1の頂点のy座標は、次
に選択する第2の頂点のy座標よりも小さいという条件
の下で第1の頂点を選択する。
First, as shown in FIG. 11A, in step 101, the first vertex of a triangular polygon is selected, and the polygon rectangular area is divided into four by the straight lines in the x and y directions passing through this vertex (A). ~ D). Here, the horizontal direction and the vertical direction are the x-axis and the y-axis, respectively, and the right side is the x-axis.
The positive direction of the axis is defined as the positive direction of the y-axis, and the lower left corner is defined as the coordinate origin (0,0). Further, the first vertex is selected under the condition that the y coordinate of the first vertex is smaller than the y coordinate of the second vertex selected next.

【0074】次に図10に示すステップS102におい
て、三角形ポリゴンの頂点を反時計回りに探索したと
き、第2の頂点が4分割された領域のどこに存在するか
を判定する。図11(b),(c)に示すように、第2
の頂点P2(x2,y2)は、領域Bまたは領域Cのい
ずれかに存在する。
Next, in step S102 shown in FIG. 10, when the vertices of the triangular polygon are searched counterclockwise, it is determined where the second vertex is in the four-divided area. As shown in FIGS. 11B and 11C, the second
The vertex P2 (x2, y2) of P exists in either the region B or the region C.

【0075】次に図10のステップ103において、三
角形ポリゴンの第3の頂点が、第1の頂点と第2の頂点
とを通る直線によって2分割された平面のどちらの平面
に存在するかを判定する。
Next, in step 103 in FIG. 10, it is determined which of the two planes the third vertex of the triangular polygon is divided by the straight line passing through the first vertex and the second vertex. To do.

【0076】図11(b)の場合は、三角形ポリゴンの
頂点を順次反時計回りに探索するので、三角形ポリゴン
の第3の頂点P3(x3,y3)は図11(d)の斜線
部の領域に存在し、同様に図11(c)の場合は、第3
の頂点P3(x3,y3)は、図11(e)の斜線部の
領域に存在する。
In the case of FIG. 11B, the vertices of the triangular polygon are sequentially searched in the counterclockwise direction, so that the third vertex P3 (x3, y3) of the triangular polygon is the shaded area in FIG. 11D. , And similarly in the case of FIG. 11 (c), the third
The vertex P3 (x3, y3) exists in the shaded area of FIG. 11 (e).

【0077】次に図10のステップS104において、
三角形ポリゴンの頂点P1,P2から構成される辺に対
して、ポリゴン矩形領域に存在する全てのタイル判定頂
点を算出する。図12(a)を参照すると、x1>x2
のときはタイル121,122のタイル頂点cがタイル
判定頂点となり、x1≦x2の場合、タイル123,1
24のタイル頂点dがタイル判定頂点となる。
Next, in step S104 of FIG.
All tile determination vertices existing in the polygon rectangular area are calculated with respect to the side formed by the vertices P1 and P2 of the triangular polygon. Referring to FIG. 12A, x1> x2
, The tile vertex c of the tiles 121 and 122 becomes the tile determination vertex, and when x1 ≦ x2, the tiles 123 and 1
The tile vertex d of 24 becomes the tile determination vertex.

【0078】次に図10のステップS105において、
処理ステップS103で算出された第3の頂点が存在す
る平面を、さらに頂点P2を通るx方向およびy方向の
各直線により分割し、分割された平面のいずれに頂点P
3が存在するのかを示す判定情報を出力する。図13
(a)に示すように、図12(a)の斜線部の領域は、
頂点P2を通るx方向およびy方向の各直線により3つ
の領域131〜133に分割される。
Next, in step S105 of FIG.
The plane in which the third apex existing in the processing step S103 exists is further divided by each straight line in the x direction and the y direction passing through the apex P2.
The determination information indicating whether 3 exists is output. FIG.
As shown in FIG. 12A, the shaded area in FIG.
It is divided into three regions 131 to 133 by the straight lines in the x direction and the y direction that pass through the vertex P2.

【0079】次に図10のステップS106において、
三角形ポリゴンの頂点P2,P3から構成される辺に対
して、タイル判定頂点を算出する。図13(a)を参照
すると、領域131に頂点P3(x3,y3)が存在す
る場合、すなわちy2<y3でかつx2>x3の場合は
タイル判定頂点はcであり、領域132に頂点P3’
(x3’,y3’)が存在する場合、すなわちy2<y
3’でかつx2≦x3’の場合はタイル判定頂点はdで
あり、領域133に頂点P3”(x3”,y3”)が存
在する場合、すなわちy2≧y3”でかつx2≦x3”
の場合はタイル判定頂点はaとなる。
Next, in step S106 of FIG.
The tile determination vertices are calculated for the side formed by the vertices P2 and P3 of the triangular polygon. With reference to FIG. 13A, when the vertex P3 (x3, y3) exists in the area 131, that is, when y2 <y3 and x2> x3, the tile determination vertex is c and the vertex P3 ′ in the area 132.
When (x3 ′, y3 ′) exists, that is, y2 <y
If 3 ′ and x2 ≦ x3 ′, the tile determination vertex is d, and if the area 133 has a vertex P3 ″ (x3 ″, y3 ″), that is, y2 ≧ y3 ″ and x2 ≦ x3 ″.
In this case, the tile determination vertex is a.

【0080】次に図10のステップS107において、
三角形ポリゴンの頂点P3,P1から構成される辺に対
して、タイル判定頂点を算出する。図13(a)を参照
すると、頂点P3と頂点P1を結ぶ辺に対して、x3≦
x1のときタイル判定頂点はaであり、x3>x1のと
きタイル判定頂点はbとなる。
Next, in step S107 of FIG.
The tile determination vertices are calculated with respect to the side formed by the vertices P3 and P1 of the triangular polygon. Referring to FIG. 13A, x3 ≦ for the side connecting the vertices P3 and P1.
The tile determination vertex is a when x1 and the tile determination vertex is b when x3> x1.

【0081】同様に図13(b)の場合は、頂点P2と
頂点P3を結ぶ辺に対して、y2<y3でかつx2≦x
3のときタイル判定頂点はdであり、y2≧y3でかつ
x2≦x3のときタイル判定頂点はaであり、y2≧y
3でかつx2>x3のときタイル判定頂点はbとなる。
Similarly, in the case of FIG. 13B, y2 <y3 and x2 ≦ x with respect to the side connecting the vertices P2 and P3.
When 3, the tile determination vertex is d, when y2 ≧ y3 and x2 ≦ x3, the tile determination vertex is a, and y2 ≧ y
When 3 and x2> x3, the tile determination vertex is b.

【0082】また、頂点P3と頂点P1を結ぶ辺に対し
て、x3≦x1のときタイル判定頂点はdであり、x3
>x1のときタイル判定頂点はcとなる。
Further, with respect to the side connecting the vertices P3 and P1, the tile determination vertex is d when x3 ≦ x1, and x3
When> x1, the tile determination vertex is c.

【0083】以上説明したように、図10のステップS
101〜ステップS107までが図7のステップS71
の処理フローに相当する。上記に説明した三角形ポリゴ
ンを構成する辺P1P2,P2P3,P3P1に対する
タイル判定頂点をまとめると図14のようになる。
As described above, step S in FIG.
101 to step S107 are step S71 in FIG.
Corresponds to the processing flow of. The tile determination vertices for the sides P1P2, P2P3, P3P1 forming the triangular polygon described above are summarized as shown in FIG.

【0084】次に図7のステップS72の判定方法につ
いて説明する。
Next, the determination method of step S72 of FIG. 7 will be described.

【0085】三角形ポリゴンを構成する頂点Pm(x
m,ym,zm)とPn(xn,yn,zn)を結ぶ直
線の方程式は、次の(3)式のようになる。
The vertices Pm (x
The equation of the straight line connecting (m, ym, zm) and Pn (xn, yn, zn) is as the following equation (3).

【0086】 y1−yn=((yn−ym)/(xn−xm))・(x−xn)・・(3) また、(3)式の直線に平行でタイル判定頂点(xt,
yt)を通る直線の方程式は次の(4)式のようにな
る。
Y1-yn = ((yn-ym) / (xn-xm)). (X-xn). (3) Further, the tile determination vertex (xt,
The equation of a straight line passing through yt) is as shown in the following equation (4).

【0087】 y2−yt=((yn−ym)/(xn−xm))・(x−xt)・・(4) 従って、(3)、(4)式よりx=0としたy切片の大
小関係により、辺PmPnとタイル判定頂点との位置関
係を判定することが出来る。具体的には、(3)、
(4)式でx=0とし、y1−y2を計算することによ
り、判定式D=(ym−yt)(xn−xm)−(yn
−ym)(xn−xt)の正負の判定で、三角形ポリゴ
ンの各辺に対するタイル判定頂点の位置関係を判定する
ことが出来る。すなわち、図15を参照して、各辺に対
するタイル判定頂点の位置関係を判定する。
Y2-yt = ((yn-ym) / (xn-xm)). (X-xt) .. (4) Therefore, from the equations (3) and (4), the y intercept with x = 0 is obtained. The positional relationship between the side PmPn and the tile determination vertex can be determined based on the magnitude relationship. Specifically, (3),
By setting y = 0 in the equation (4) and calculating y1-y2, the determination equation D = (ym-yt) (xn-xm)-(yn
The positional relationship of the tile determination vertices with respect to each side of the triangular polygon can be determined by the positive / negative determination of -ym) (xn-xt). That is, with reference to FIG. 15, the positional relationship of the tile determination vertices with respect to each side is determined.

【0088】例えば図14でP1P2辺に対し、x1≦
x2の場合タイル判定頂点はdとなる。そこで、頂点P
1,P2の各座標から判定式Dおよび(xn−xm)を
算出し、図15から判定結果を算出する。
For example, in FIG. 14, x1 ≦ for the P1P2 side.
In the case of x2, the tile determination vertex is d. Therefore, the vertex P
The determination expressions D and (xn-xm) are calculated from the coordinates of 1 and P2, and the determination result is calculated from FIG.

【0089】これをP2P3辺、P3P1辺に対しても
繰り返し、3回の判定結果ともポリゴン内の判定であれ
ば、タイルと三角形ポリゴンは重なり合うと判定され、
図4のステップS57で描画タイルとして選択される。
また一つでもポリゴン外と判定されれば、タイルと三角
形ポリゴンは重なり合わないと判定され、図4のステッ
プS56で非描画タイルとして選択される。
This is repeated for the P2P3 side and the P3P1 side, and if the three determination results are within the polygon, it is determined that the tile and the triangular polygon overlap.
It is selected as a drawing tile in step S57 of FIG.
If even one is determined to be outside the polygon, it is determined that the tile and the triangular polygon do not overlap each other, and the tile is selected as a non-drawing tile in step S56 of FIG.

【0090】本発明による第2の実施の形態の画像処理
方法は、第1の実施の形態の画像処理方法に比較して、
タイル判定頂点を場合分けして算出する手順が必要であ
り、この手順に関しては、第1の実施の形態の画像処理
方法よりも複雑である。しかし、第1の実施の形態の画
像処理方法のように、タイルの全ての頂点に対し各3回
の判定を行うことは不要であり、タイル判定頂点に対し
てだけ三角形ポリゴンを構成する辺との位置関係を判定
するので、全体の処理としては高速に出来る。
The image processing method of the second embodiment according to the present invention is
A procedure for calculating the tile determination vertices in different cases is necessary, and this procedure is more complicated than the image processing method of the first embodiment. However, unlike the image processing method of the first embodiment, it is not necessary to make determinations for all the vertices of a tile three times each, and only the tile determination vertices are considered as edges that form a triangular polygon. Since the positional relationship of is determined, the overall processing can be performed at high speed.

【0091】なお上記において、三角形ポリゴンの頂点
を順次反時計回りに探索するとして説明したが時計回り
に探索しても同様に処理可能である。
In the above description, the vertices of the triangular polygon are sequentially searched in the counterclockwise direction, but the same processing can be performed in the clockwise search.

【0092】次に本発明による第3の実施の形態の画像
処理方法について、図16,17を参照して説明する。
なお、図4と共通の構成要素には共通の参照文字/数字
を付してある。
Next, an image processing method according to the third embodiment of the present invention will be described with reference to FIGS.
It should be noted that common reference characters / numerals are attached to components common to FIG.

【0093】図16は、本発明による第3の実施の形態
の画像処理方法を表すフローチャートであり、ステップ
S1〜ステップS4までの処理は、図4と同様の処理で
あるので説明を省略し、ステップS161の説明から行
う。
FIG. 16 is a flow chart showing the image processing method of the third embodiment according to the present invention. Since the processes from step S1 to step S4 are the same as those in FIG. 4, the description thereof will be omitted. The description will be given from step S161.

【0094】ステップS161で、頂点P1,P2,P
3から構成される三角形ポリゴンの各辺の長さa,b,
cと、これらの加算値(a+b+c)とを算出する。
At step S161, the vertices P1, P2, P
The lengths a and b of each side of a triangular polygon composed of 3
c and the added value (a + b + c) thereof are calculated.

【0095】次にステップS162で、タイルの4つの
頂点t1〜t4と三角形ポリゴンの頂点P1〜P3とを
結ぶ線分である頂点間線分の長さt11〜t13,〜,
t41〜t43と、各頂点間線分の長さの和(t11+
t12+t13)〜(t41+t42+t43)とをそ
れぞれ算出する。
Next, in step S162, the lengths t11 to t13, ... Of the line segments between vertices, which are line segments connecting the four vertices t1 to t4 of the tile and the vertices P1 to P3 of the triangular polygon.
t41 to t43 and the sum of the lengths of the line segments between the vertices (t11 +
t12 + t13) to (t41 + t42 + t43) are calculated.

【0096】次にステップS163で、タイルの4つの
頂点のうち次式を満たす頂点が存在するか否かについて
判定する。
Next, in step S163, it is determined whether or not there is a vertex satisfying the following expression among the four vertices of the tile.

【0097】 a+b+c>ti1+ti2+ti3>(a+b+c)/2 ・・(5) 但しi=1〜4で、tijはタイルのi番目の頂点と、
三角形ポリゴンのj番目の頂点との頂点間線分の長さで
ある。
A + b + c> ti1 + ti2 + ti3> (a + b + c) / 2 (5) where i = 1 to 4 and tij is the i-th vertex of the tile,
It is the length of the line segment between the j-th vertex of the triangular polygon and the vertex.

【0098】ステップS163で、タイルの4つの頂点
のうち(5)式を満たす頂点が存在すると判定された場
合、(5)式を満足する頂点は、三角形ポリゴンの内部
に存在すると判定できるので、ステップS164で、
(5)式を満足する頂点を含むタイルは、描画タイルと
して選択される。
If it is determined in step S163 that among the four vertices of the tile, a vertex satisfying the equation (5) exists, it can be determined that a vertex satisfying the equation (5) exists inside the triangular polygon. In step S164,
A tile including a vertex that satisfies the expression (5) is selected as a drawing tile.

【0099】また、ステップS163で、タイルの4つ
の頂点のうち(5)式を満たす頂点が存在しないと判定
された場合、タイルの4つの頂点は全て三角形ポリゴン
の外部に存在すると判定できるので、ステップS165
で非描画タイルとして選択される。
If it is determined in step S163 that none of the four vertices of the tile satisfy the expression (5), it can be determined that all four vertices of the tile are outside the triangular polygon. Step S165
Is selected as a non-drawing tile.

【0100】次に図17を参照して上述した処理内容を
具体的に説明すると、頂点P1(x1,y1)、P2
(x2,y2)、P3(x3,y3)から構成される三
角形ポリゴンの3辺の長さを、それぞれa,b,cとす
る。また、タイルの頂点t(x,y)と、頂点P1、P
2、P3をそれぞれ結んで生成した線分の長さを、t1
1+t12+t13とする。
Next, the processing contents described above will be described in detail with reference to FIG. 17. The vertices P1 (x1, y1), P2
Let the lengths of the three sides of the triangular polygon composed of (x2, y2) and P3 (x3, y3) be a, b, and c, respectively. In addition, the vertex t (x, y) of the tile and the vertices P1 and P
The length of the line segment generated by connecting 2 and P3 is t1
1 + t12 + t13.

【0101】ここで、長さa,b,c,t11,t1
2,t13は次の(6)式のように計算することが出来
る。
Here, the lengths a, b, c, t11, t1
2, t13 can be calculated by the following equation (6).

【0102】 a=平方根((x1−x2)2+(y1−y2)2) t11=平方根((x1−x)2+(y1−y)2) ・・・(6) 長さb,c,t12,t13についても(6)式と同様
に計算することが出来る。
A = square root ((x1-x2) 2 + (y1-y2) 2 ) t11 = square root ((x1-x) 2 + (y1-y) 2 ) ... (6) Length b, c , T12, t13 can be calculated in the same manner as in the equation (6).

【0103】頂点t(x,y)は、図16のステップS
163で(6)式を満足すると判定されるので、ステッ
プS164で頂点t(x,y)を含むタイルは、描画タ
イルとして選択される。
The vertex t (x, y) is determined by step S in FIG.
Since it is determined in step 163 that the expression (6) is satisfied, the tile including the vertex t (x, y) is selected as the drawing tile in step S164.

【0104】本実施の形態による画像処理方法は、判定
条件が簡明なので、処理速度を高速化することが出来る
という特徴がある。
The image processing method according to this embodiment has a feature that the processing speed can be increased because the judgment condition is simple.

【0105】なお、上記においてポリゴンは三角形ポリ
ゴンを例にとって説明したが、四角形以上の多角形ポリ
ゴンについても本発明による画像処理装置および画像処
理方法は、同様に適用し得る。
In the above description, the polygon has been described by taking a triangular polygon as an example. However, the image processing apparatus and the image processing method according to the present invention can be similarly applied to a polygonal polygon having a quadrangle or more.

【0106】[0106]

【発明の効果】以上説明したように、本発明による画像
処理装置および画像処理方法は、ポリゴンを構成する各
頂点を全て包含するポリゴン矩形領域を設定し、このポ
リゴン矩形領域に含まれるタイルがポリゴンの内側に存
在するのか、外側に存在するのかを判定し、ポリゴンの
外側に存在するタイルについては描画処理を行わないこ
とにより、高速に描画処理を行うことが可能である。図
3に示す三角形ポリゴンが画像データとして、図1のラ
ッチ回路101〜106に入力した場合、ポリゴン矩形
領域に含まれるタイルの総数は6×6=36個である
が、非描画タイルは14個ありこれらの非描画タイルに
ついては、本発明による画像処理装置および画像処理方
法では描画処理を行わないので、従来の画像処理装置お
よび画像処理方法に比べ約40%程度の性能向上が見込
まれる。
As described above, according to the image processing apparatus and the image processing method of the present invention, a polygon rectangular area including all vertices forming a polygon is set, and tiles included in this polygon rectangular area are polygons. It is possible to perform high-speed drawing processing by determining whether the tiles are inside or outside and not performing drawing processing for tiles outside the polygon. When the triangular polygons shown in FIG. 3 are input as image data to the latch circuits 101 to 106 of FIG. 1, the total number of tiles included in the polygon rectangular area is 6 × 6 = 36, but there are 14 non-drawing tiles. With these non-drawing tiles, the image processing apparatus and the image processing method according to the present invention do not perform the drawing processing, so that a performance improvement of about 40% is expected compared to the conventional image processing apparatus and the image processing method.

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

【図1】本発明の画像処理装置の実施の形態を示すブロ
ック図である。
FIG. 1 is a block diagram showing an embodiment of an image processing apparatus of the present invention.

【図2】図1の描画タイル選択回路41の内部回路を示
すブロック図である。
FIG. 2 is a block diagram showing an internal circuit of a drawing tile selection circuit 41 of FIG.

【図3】本発明による画像処理装置および画像処理方法
の処理を説明するための説明図である。
FIG. 3 is an explanatory diagram for explaining processing of an image processing apparatus and an image processing method according to the present invention.

【図4】本発明による第1の実施の形態による画像処理
方法を説明するためのフローチャートである。
FIG. 4 is a flowchart for explaining an image processing method according to the first embodiment of the present invention.

【図5】図4のステップS4における処理を説明するた
めの詳細フローチャートである。
5 is a detailed flowchart for explaining the process in step S4 of FIG.

【図6】本発明による第1の実施の形態による画像処理
方法を説明するための説明図である。
FIG. 6 is an explanatory diagram illustrating an image processing method according to the first embodiment of the present invention.

【図7】本発明による第2の実施の形態による画像処理
方法を説明するためのフローチャートである。
FIG. 7 is a flowchart illustrating an image processing method according to a second embodiment of the present invention.

【図8】本発明による第2の実施の形態による画像処理
方法を説明するための説明図である。
FIG. 8 is an explanatory diagram illustrating an image processing method according to a second embodiment of the present invention.

【図9】本発明による第2の実施の形態による画像処理
方法を説明するための説明図である。
FIG. 9 is an explanatory diagram illustrating an image processing method according to a second embodiment of the present invention.

【図10】図7のステップS71の詳細な処理内容を説
明するためのフローチャートである。
FIG. 10 is a flowchart for explaining detailed processing contents of step S71 of FIG.

【図11】図7のステップS71の処理内容を説明する
ための説明図である。
FIG. 11 is an explanatory diagram for explaining the processing content of step S71 of FIG.

【図12】図7のステップS71の処理内容を説明する
ための説明図である。
FIG. 12 is an explanatory diagram for explaining the processing content of step S71 of FIG.

【図13】図7のステップS71の処理内容を説明する
ための説明図である。
FIG. 13 is an explanatory diagram for explaining the processing content of step S71 of FIG. 7.

【図14】図7のステップS71の処理内容を説明する
ための説明図である。
FIG. 14 is an explanatory diagram for explaining the processing content of step S71 of FIG.

【図15】図7のステップS73の処理内容を説明する
ための説明図である。
FIG. 15 is an explanatory diagram for explaining the processing content of step S73 of FIG. 7.

【図16】本発明による第3の実施の形態による画像処
理方法を説明するためのフローチャートである。
FIG. 16 is a flowchart illustrating an image processing method according to a third embodiment of the present invention.

【図17】本発明による第3の実施の形態による画像処
理方法を処理を説明するための説明図である。
FIG. 17 is an explanatory diagram illustrating a process of the image processing method according to the third embodiment of the present invention.

【図18】従来の画像処理方法を処理を説明するための
説明図である。
FIG. 18 is an explanatory diagram illustrating a process of a conventional image processing method.

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

101〜106 ラッチ回路 11,12 比較回路 21 X領域生成回路 22 Y領域生成回路 30,800 三角形ポリゴン 31 ポリゴン矩形領域生成回路 41 描画タイル選択回路 411 タイル頂点判定回路 412 タイル判定回路 51 タイル選択回路 300 ポリゴン矩形領域 81〜83,91,92,121〜124,311〜3
15,321〜326,331〜335,341〜34
5,353〜356,361〜366,811〜81
3,821〜827,831〜832,871〜873
タイル 131〜133,134〜136 領域
101 to 106 Latch circuits 11 and 12 Comparison circuit 21 X region generation circuit 22 Y region generation circuit 30 and 800 Triangle polygon 31 Polygon rectangular region generation circuit 41 Drawing tile selection circuit 411 Tile vertex determination circuit 412 Tile determination circuit 51 Tile selection circuit 300 Polygon rectangular areas 81-83, 91, 92, 121-124, 311-3
15, 321 to 326, 331 to 335, 341 to 34
5,353-356,361-366,811-81
3,821-827,831-832,871-873
Tiles 131-133, 134-136 areas

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−290175(JP,A) 特開 平7−152357(JP,A) 特開 平8−77367(JP,A) 特開 平8−293021(JP,A) 特開 平9−16144(JP,A) 特開 平9−161085(JP,A) 特開 平10−207766(JP,A) 特開2000−149055(JP,A) 特開2000−338959(JP,A) 特表 平4−501777(JP,A) 特表 平8−502845(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 15/00 100 JICSTファイル(JOIS)─────────────────────────────────────────────────── --- Continuation of the front page (56) Reference JP-A-5-290175 (JP, A) JP-A-7-152357 (JP, A) JP-A-8-77367 (JP, A) JP-A-8- 293021 (JP, A) JP 9-16144 (JP, A) JP 9-161085 (JP, A) JP 10-207766 (JP, A) JP 2000-149055 (JP, A) Open 2000-338959 (JP, A) Special table 4-501777 (JP, A) Special table 8-502845 (JP, A) (58) Fields surveyed (Int.Cl. 7 , DB name) G06T 15 / 00 100 JISST file (JOIS)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 マトリクス状に配列された矩形状のタイ
ルから構成され表示画面に対応する画像メモリに、ポリ
ゴンを含む画像データを前記タイル毎に描画する画像処
理方法であって、 前記画像メモリにおいて前記ポリゴンを包含する領域で
あるポリゴン矩形領域を生成し、このポリゴン矩形領域
に存在する前記タイルの情報であるタイル情報を出力す
るタイル選択工程と、 前記タイル情報と前記ポリゴンの座標情報を参照して、
前記ポリゴン矩形領域内の前記タイルから前記ポリゴン
を含むタイルである描画タイルを選択する描画タイル選
択工程とを備え、 前記ポリゴンが三角形からなる三角形ポリゴンであり、 前記描画タイル選択工程は、前記ポリゴンの第1の頂点
を選択し、この頂点を通るx方向およびy方向の各直線
により、前記ポリゴン矩形領域を4分割するポリゴン矩
形領域分割工程と、 前記第1の頂点に隣接する第2の頂点が前記4分割され
た平面のどちらに存在するかを判定し、判定情報である
第2頂点判定情報を出力する第2頂点判定工程と、 前記第1の頂点から前記第2の頂点に向かって前記第2
の頂点に隣接する第3の頂点探索し、前記第3の頂点が
前記第1の頂点と前記第2の頂点を通る直線により分割
された平面のどちらに存在するかを判定し、判定情報で
ある第3頂点判定情報を出力する第3頂点判定工程と、
前記第1の頂点の位置座標と前記第2頂点判定情報およ
び第3頂点判定情報を参照して、前記第1の頂点および
前記第2の頂点から構成される辺に対して、前記タイル
判定頂点を算出する第1の判定頂点算出工程と、 前記第3頂点判定工程で判定された前記第3の頂点が存
在する平面を、前記第2頂点を通るx方向およびy方向
の各直線により分割し、分割された平面のどちらに前記
第3の頂点が存在するかを判定し、判定情報である第2
の第3頂点判定情報を出力する第2の第3頂点判定工程
と、 前記第1の頂点の位置座標と前記第2頂点判定情報およ
び前記第2の第3頂点 判定情報を参照して、前記第2の
頂点および前記第3の頂点から構成される辺と前記第3
の頂点および前記第1の頂点から構成される辺に対し
て、前記タイル判定頂点を各々算出する第2の判定頂点
算出工程と、 前記各タイル判定頂点の座標情報と、前記タイル判定頂
点に対応する前記三角形ポリゴンの辺の座標情報を参照
し、前記各タイル判定頂点が前記タイル判定頂点に対応
する前記三角形ポリゴンの辺を含む直線により分割され
た平面のどちらに存在するかを判定し、判定情報である
タイル判定頂点の内外判定情報を出力するタイル判定頂
点の内外判定工程と、 前記タイル判定頂点の内外判定情報を参照し、前記タイ
ルの頂点が前記三角形ポリゴンの内部に存在するか否か
を判定するタイルの内外判定工程とを備え、 前記描画タイルを前記画像メモリに描画し、前記描画タ
イル以外の前記タイルに対しては前記画像メモリに描画
しないことを特徴とする画像処理方法
1. A rectangular tie arranged in a matrix.
Image memory that is composed of
Image processing that draws image data including gons for each tile
In the area including the polygon in the image memory,
Generate a certain polygon rectangular area,
The tile information that is the information of the tile existing in
A tile selection step that, with reference to the coordinate information of the tile information and the polygon,
From the tiles in the polygon rectangular area to the polygon
Select a drawing tile that is a tile that contains
A-option step, said polygon is a triangle polygon consisting of a triangle, the rendering tile selection process, first vertex of the polygon
And select each straight line in the x and y directions that passes through this vertex
The polygon rectangular area that divides the polygon rectangular area into four
Shape region dividing step, and the second vertex adjacent to the first vertex is divided into four.
It is the judgment information by judging which of the two existing planes exists.
A second apex determination step of outputting second apex determination information, and the second apex toward the second apex from the first apex
Search for a third vertex adjacent to the vertex of
Split by a straight line passing through the first vertex and the second vertex
It is determined which of the planes that exist and the judgment information
A third vertex determining step of outputting certain third vertex determining information,
The position coordinates of the first vertex and the second vertex determination information and
And the third vertex determination information, the first vertex and
The tile with respect to the side composed of the second vertex
There is a first determination vertex calculating step of calculating a determination vertex and the third vertex determined in the third vertex determination step.
The existing plane is defined as the x direction and the y direction passing through the second vertex.
Which is divided by each straight line of
It is determined whether there is a third vertex,
Second third vertex determining step of outputting third vertex determining information of
And the position coordinates of the first vertex, the second vertex determination information, and
And the second third vertex determination information, the second
An edge composed of a vertex and the third vertex and the third edge
For the edge consisting of the vertex of and the first vertex
And a second determination vertex for calculating each of the tile determination vertices.
The calculation step, the coordinate information of each tile determination vertex, and the tile determination vertex
Refer to the coordinate information of the side of the triangular polygon corresponding to the point
And each tile determination vertex corresponds to the tile determination vertex
Is divided by a straight line including the sides of the triangular polygon
It is the judgment information by judging which of the two existing planes exists.
Tile judgment The tile judgment vertex that outputs the inside / outside judgment information of the vertex
By referring to the inside / outside determination step of the point and the inside / outside determination information of the tile determination vertex,
Whether the vertex of the rule exists inside the triangular polygon
And a step of determining the inside / outside of the tile, the drawing tile is drawn in the image memory, and the drawing tile is drawn.
For tiles other than tiles, draw in the image memory
An image processing method characterized by not doing .
【請求項2】 マトリクス状に配列された矩形状のタイ
ルから構成され表示画面に対応する画像メモリに、ポリ
ゴンを含む画像データを前記タイル毎に描画する画像処
理方法であって、 前記画像メモリにおいて前記ポリゴンを包含する領域で
あるポリゴン矩形領域を生成し、このポリゴン矩形領域
に存在する前記タイルの情報であるタイル情報を出力す
るタイル選択工程と、 前記タイル情報と前記ポリゴンの座標情報を参照して、
前記ポリゴン矩形領域内の前記タイルから前記ポリゴン
を含むタイルである描画タイルを選択する描画タイル選
択工程とを備え、 前記ポリゴンが三角形からなる三角形ポリゴンであり、 前記描画タイル選択工程は、前記三角形ポリゴンを構成
する3辺の長さを算出し、これら3辺の長さの加算値を
算出する工程と、 前記タイルの各頂点と前記三角形ポリゴンの頂点とを結
ぶ線分の長さを前記タイルの各頂点毎に算出し、これら
の線分の長さの加算値を算出する工程と、 前記三角形ポリゴンの3辺の長さの加算値と、前記線分
の長さの加算値とを基に算出した次式を満足する前記タ
イルの頂点が存在する場合は、この頂点を含む前記タイ
ルを前記描画タイルとして選択し、前記次式を満足する
前記タイルの頂 点が存在しない場合は、対応する前記タ
イルを前記画像メモリに描画しない工程と、を備えるこ
とを特徴とする画像処理方法。 3辺の長さの加算値>線分の長さの加算値>3辺の長さ
の加算値/2
2. A rectangular tie arranged in a matrix.
Image memory that is composed of
Image processing that draws image data including gons for each tile
In the area including the polygon in the image memory,
Generate a certain polygon rectangular area,
The tile information that is the information of the tile existing in
A tile selection step that, with reference to the coordinate information of the tile information and the polygon,
From the tiles in the polygon rectangular area to the polygon
Select a drawing tile that is a tile that contains
A selecting step , wherein the polygon is a triangular polygon consisting of triangles, and the drawing tile selecting step configures the triangular polygon.
Calculate the length of the three sides, and add the values of these three sides
The calculation process and the vertices of the tile and the vertices of the triangular polygon are connected.
The length of the line segment is calculated for each vertex of the tile,
Calculating the added value of the lengths of the line segments, the added value of the lengths of the three sides of the triangular polygon, and the line segments.
The following equation calculated based on the added value of the length of
If there is an apex of the
Selected as the drawing tile and satisfies the following equation
If the top point of the tile does not exist, the corresponding said data
Image is not drawn in the image memory.
An image processing method characterized by: Addition value of length of 3 sides> Addition value of length of line segment> Length of 3 sides
Addition value / 2
JP2000093507A 2000-03-30 2000-03-30 Image processing apparatus and image processing method Expired - Fee Related JP3367506B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000093507A JP3367506B2 (en) 2000-03-30 2000-03-30 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000093507A JP3367506B2 (en) 2000-03-30 2000-03-30 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2001283242A JP2001283242A (en) 2001-10-12
JP3367506B2 true JP3367506B2 (en) 2003-01-14

Family

ID=18608685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000093507A Expired - Fee Related JP3367506B2 (en) 2000-03-30 2000-03-30 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP3367506B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210639B2 (en) 2015-03-20 2019-02-19 Samsung Electronics Co., Ltd. Method and apparatus for tile-based rendering

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003263650A (en) * 2002-03-12 2003-09-19 Sony Corp Image processor and image processing method
KR100762811B1 (en) * 2006-07-20 2007-10-02 삼성전자주식회사 Tile Binning Method and System Using Half-Plane Edge Function
KR100793990B1 (en) * 2006-09-18 2008-01-16 삼성전자주식회사 Early Wet Test Method and System in Tile-based 3D Rendering
JP4568750B2 (en) 2007-11-30 2010-10-27 富士通株式会社 Drawing apparatus, drawing program, and drawing method
CN113051491B (en) * 2021-04-22 2023-12-15 北京百度网讯科技有限公司 Map data processing method, apparatus, storage medium, and program product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000149055A (en) 1998-11-12 2000-05-30 Hewlett Packard Co <Hp> Scan conversion executing device for graphic display system
JP2000338959A (en) 1999-05-31 2000-12-08 Toshiba Corp Image processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000149055A (en) 1998-11-12 2000-05-30 Hewlett Packard Co <Hp> Scan conversion executing device for graphic display system
JP2000338959A (en) 1999-05-31 2000-12-08 Toshiba Corp Image processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210639B2 (en) 2015-03-20 2019-02-19 Samsung Electronics Co., Ltd. Method and apparatus for tile-based rendering

Also Published As

Publication number Publication date
JP2001283242A (en) 2001-10-12

Similar Documents

Publication Publication Date Title
JP3313221B2 (en) Image generation method and image generation device
US20080198158A1 (en) 3D map display system, 3D map display method and display program
JP2002529871A (en) Shading of 3D computer generated images
CN115147579B (en) Block rendering mode graphic processing method and system for expanding block boundary
JP3349871B2 (en) Image processing device
CN104732479B (en) Resizing an image
WO2010088029A2 (en) Single-pass bounding box calculation
JP2002529868A (en) Shading of 3D computer generated images
CN111986303A (en) Fluid rendering method and device, storage medium and terminal equipment
US6791569B1 (en) Antialiasing method using barycentric coordinates applied to lines
CN116977598B (en) Triangular mesh numerical simulation smoothing method
JP3367506B2 (en) Image processing apparatus and image processing method
EP1704535B1 (en) Method of rendering graphical objects
US20060119614A1 (en) Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
JPWO2009104218A1 (en) Map display device
JP2837584B2 (en) How to create terrain data
JP2000348206A (en) Image generation apparatus and image priority determination method
JP3979162B2 (en) Image processing apparatus and method
KR100848687B1 (en) 3D graphics processing device and its operation method
JP3522714B2 (en) Image generation method
CN100382109C (en) partial bounding box clipping
CN102543040B (en) Convex polygon interpolation method and system for graphic raster scanning
KR100269118B1 (en) Rasterization using quadrangle
US20100141649A1 (en) Drawing device
CN112183579B (en) Method, medium and system for detecting micro target

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021008

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

Free format text: PAYMENT UNTIL: 20071108

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081108

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20081108

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091108

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091108

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101108

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20101108

Year of fee payment: 8

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20101108

Year of fee payment: 8

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111108

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111108

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121108

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20121108

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131108

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees