JP2011028641A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP2011028641A
JP2011028641A JP2009175561A JP2009175561A JP2011028641A JP 2011028641 A JP2011028641 A JP 2011028641A JP 2009175561 A JP2009175561 A JP 2009175561A JP 2009175561 A JP2009175561 A JP 2009175561A JP 2011028641 A JP2011028641 A JP 2011028641A
Authority
JP
Japan
Prior art keywords
pixel
color
interpolation
distance
interpolation position
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.)
Withdrawn
Application number
JP2009175561A
Other languages
Japanese (ja)
Inventor
Yasushi Sukama
康 洲鎌
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009175561A priority Critical patent/JP2011028641A/en
Publication of JP2011028641A publication Critical patent/JP2011028641A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing device capable of efficiently executing anti-aliasing without storing image information magnified in each direction to a memory. <P>SOLUTION: The image processing device includes: an interpolation unit which determines a plurality of depths and a plurality of distances for an interpolation position by executing processing to each of a plurality of pixels adjacent to the interpolation position based on the depth of a certain pixel adjacent to the interpolation position and the distance to an end of a pattern including the pixel to determine the depth and the distance to the end of the pattern in the interpolation position for each pixel; and a pixel color determination unit which determines a color in the interpolation position based on colors of the plurality of pixels, and the depths and distances in the interpolation position determined by the interpolation unit. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本願開示は、一般に画像処理装置及び画像処理方法に関し、詳しくは3次元グラフィクスにおけるアンチエイリアス処理を行なう画像処理装置及び画像処理方法に関する。   The present disclosure generally relates to an image processing apparatus and an image processing method, and more particularly to an image processing apparatus and an image processing method for performing anti-aliasing processing in three-dimensional graphics.

3次元グラフィックス処理では、図形周辺のギザギザ感(ジャギー)を取り除く技術としてアンチエイリアス処理が用いられている。アンチエイリアス処理のための一般的な方式として、フルシーンアンチエイリアスとマルチサンプルアンチエイリアスとがある。フルシーンアンチエイリアスは、所望の画像の縦横n倍の大きさの拡大画像を描画し、その拡大画像を1/nに縮小させる方式である。この方式ではn×n倍の拡大画像の描画処理を行なうので処理の効率が悪い。このフルシーンアンチエイリアスに対して処理量を低減させた方式がマルチサンプルアンチエイリアスである。   In the three-dimensional graphics processing, antialiasing processing is used as a technique for removing a jagged feeling (jaggy) around a figure. Common methods for anti-aliasing include full scene anti-aliasing and multi-sample anti-aliasing. Full scene anti-aliasing is a method of drawing an enlarged image that is n times the size and width of a desired image and reducing the enlarged image to 1 / n. In this method, the processing efficiency is low because the drawing process of the enlarged image of n × n times is performed. Multi-sample anti-aliasing is a method that reduces the processing amount for this full scene anti-aliasing.

マルチサンプルアンチエイリアスでは、奥行き情報と内外判定データだけを縦横n倍し、色情報についてはn×nの画素に対して同一値を用いることにより、演算量を削減させている。しかし、このマルチサンプルアンチエイリアスを用いた場合でも、グラフィックス描画にn×n倍のメモリアクセスが必要となるとともに、1/nに縮小させる処理のために更なるメモリアクセスが必要となる。この結果、大きなバス帯域が必要となってしまう。   In the multi-sample anti-aliasing, only the depth information and the inside / outside determination data are multiplied n times vertically and horizontally, and the same amount of color information is used for n × n pixels, thereby reducing the amount of calculation. However, even when this multi-sample anti-aliasing is used, n × n times of memory access is required for graphics drawing, and further memory access is required for processing to reduce to 1 / n. As a result, a large bus bandwidth is required.

特開2001−251500号公報JP 2001-251500 A 特開2005−38415号公報JP 2005-38415 A 特許第2682191号公報Japanese Patent No. 2682191

以上を鑑みると、縦横に拡大した画像情報をメモリに格納することなく効率的にアンチエイリアス処理を実行可能な画像処理装置が望まれる。   In view of the above, there is a demand for an image processing apparatus that can efficiently perform anti-aliasing without storing image information expanded vertically and horizontally in a memory.

画像処理装置は、補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求める補間部と、前記複数の画素の色及び前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とに基づいて、前記補間位置における色を決定する画素色決定部とを含むことを特徴とする。   The image processing apparatus performs a process of obtaining a depth at the interpolation position and a distance to the edge of the graphic based on a depth of a pixel adjacent to the interpolation position and a distance to the edge of the graphic including the pixel. An interpolation unit that calculates a plurality of depths and a plurality of distances at the interpolation position by executing each of the plurality of pixels adjacent to the position; and the interpolation unit that calculates the colors of the plurality of pixels and the interpolation unit And a pixel color determining unit configured to determine a color at the interpolation position based on the plurality of depths at the position and the plurality of distances.

画像処理方法は、補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求め、前記複数の奥行きと、前記複数の距離と、前記複数の画素の色とに基づいて、前記補間位置における補間色を決定し、1つの着目画素の位置に隣接する複数の補間位置について決定した前記補間色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める各段階を含むことを特徴とする。   In the image processing method, a process for obtaining a depth at the interpolation position and a distance to the edge of the graphic based on a depth of a pixel adjacent to the interpolation position and a distance to the edge of the graphic including the pixel is performed by the interpolation. By executing for each of a plurality of pixels adjacent to the position, a plurality of depths and a plurality of distances at the interpolation position are obtained, and the plurality of depths, the plurality of distances, and the colors of the plurality of pixels And determining the interpolation color at the interpolation position, and mixing the interpolation color determined for a plurality of interpolation positions adjacent to the position of one target pixel and the color of the one target pixel, It includes each step for obtaining a new color of one pixel of interest.

本願開示の少なくとも1つの実施例によれば、複数の画素の色と、補間部が求めた補間位置における複数の奥行きと複数の距離とに基づいて、補間位置における補間色を決定する。従って、縦横に拡大した画像情報をメモリに格納することなく、効率的に補間位置の画素色を決定して、この画素色を用いたアンチエイリアス処理を実行することができる。   According to at least one embodiment of the present disclosure, the interpolation color at the interpolation position is determined based on the colors of the plurality of pixels and the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit. Accordingly, it is possible to efficiently determine the pixel color at the interpolation position and execute the anti-aliasing process using this pixel color without storing the image information enlarged vertically and horizontally in the memory.

画像処理システムの全体構成の一例を示す図である。It is a figure which shows an example of the whole structure of an image processing system. グラフィック描画の対象となる三角形を模式的に示す図である。It is a figure which shows typically the triangle used as the object of graphic drawing. 着目画素についてその画素が含まれる図形の端までの距離を模式的に示す図である。It is a figure which shows typically the distance to the edge of the figure in which the pixel is included about the pixel of interest. 画素についての図形の端までの距離のx方向の増分について説明するための図である。It is a figure for demonstrating the increment of the x direction of the distance to the edge of the figure about a pixel. 画素についての図形の端までの距離のy方向の増分について説明するための図である。It is a figure for demonstrating the increment of the y direction of the distance to the edge of the figure about a pixel. 図1のフレームバッファに格納するデータのデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of the data stored in the frame buffer of FIG. 奥行き・距離補間部の処理を説明するための図である。It is a figure for demonstrating the process of a depth and distance interpolation part. 奥行き・距離比較部及び画素色決定部の処理を説明するための図である。It is a figure for demonstrating the process of a depth and distance comparison part and a pixel color determination part. 奥行き・距離補間部、奥行き・距離比較部、及び画素色決定部の処理を説明するための別の例を示す図である。It is a figure which shows another example for demonstrating the process of a depth / distance interpolation part, a depth / distance comparison part, and a pixel color determination part. 奥行き・距離比較部及び画素色決定部の処理を説明するための更に別の例を示す図である。It is a figure which shows another example for demonstrating the process of a depth / distance comparison part and a pixel color determination part. 画素ブレンド部の処理を説明するための図である。It is a figure for demonstrating the process of a pixel blend part. 図7に示す補間位置における距離値の意味を説明するための図である。It is a figure for demonstrating the meaning of the distance value in the interpolation position shown in FIG. 図9に示す補間位置における距離値の意味を説明するための図である。It is a figure for demonstrating the meaning of the distance value in the interpolation position shown in FIG. 図10に示す補間位置における距離値の意味を説明するための図である。It is a figure for demonstrating the meaning of the distance value in the interpolation position shown in FIG. アンチエイリアス回路によるアンチエイリアス処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the anti-aliasing process by an anti-aliasing circuit. 図15で実行される補間色決定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the interpolation color determination process performed in FIG. アンチエイリアス回路のより具体的な回路構成の一例を示す図である。It is a figure which shows an example of the more concrete circuit structure of an anti-aliasing circuit. 画素情報保持RAMの読み書き処理について説明するための図である。It is a figure for demonstrating the read-write process of pixel information holding RAM.

以下に、本発明の実施例を添付の図面を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

図1は、画像処理システムの全体構成の一例を示す図である。図1の画像処理システムは、グラフィクス処理回路10、アンチエイリアス回路11、フレームバッファ12、及びディスプレイ装置13を含む。グラフィクス処理回路10は、頂点バッファ21、座標変換・ライティング処理部22、頂点後処理部23、ラスタライズ処理部24、画素処理部25、画素後処理部26、メモリアクセス部27、テクスチャユニット28、及び距離情報算出部29を含む。アンチエイリアス回路11は、奥行き・距離補間部31、奥行き・距離比較部32、画素色決定部33、及び画素ブレンド部34を含む。   FIG. 1 is a diagram illustrating an example of the overall configuration of an image processing system. The image processing system in FIG. 1 includes a graphics processing circuit 10, an antialiasing circuit 11, a frame buffer 12, and a display device 13. The graphics processing circuit 10 includes a vertex buffer 21, a coordinate transformation / lighting processing unit 22, a vertex post-processing unit 23, a rasterization processing unit 24, a pixel processing unit 25, a pixel post-processing unit 26, a memory access unit 27, a texture unit 28, and A distance information calculation unit 29 is included. The anti-aliasing circuit 11 includes a depth / distance interpolation unit 31, a depth / distance comparison unit 32, a pixel color determination unit 33, and a pixel blend unit 34.

グラフィクス処理回路10は、3次元データとして与えられた立体オブジェクトを所定の視点から見たときに見えるべき2次元画像を計算し、その画素毎のデータをフレームバッファ12に書き込むことにより2次元画像データを生成する。このフレームバッファ12に格納された2次元画像データは、アンチエイリアス回路11により処理される。アンチエイリアス回路11により処理されフレームバッファ12に書き込まれた2次元画像データは、その後、描画データとして読出されディスプレイ装置13に表示される。   The graphics processing circuit 10 calculates a two-dimensional image that should be seen when a three-dimensional object given as three-dimensional data is viewed from a predetermined viewpoint, and writes the data for each pixel in the frame buffer 12 to thereby generate two-dimensional image data. Is generated. The two-dimensional image data stored in the frame buffer 12 is processed by the antialiasing circuit 11. The two-dimensional image data processed by the anti-aliasing circuit 11 and written in the frame buffer 12 is then read out as drawing data and displayed on the display device 13.

一般に立体オブジェクトは、多数のポリゴンの集合体として表現されている。この際、最も単純なポリゴンとして三角形を用いるのが一般的である。描画する対象となる立体オブジェクトの3次元データは、三角形の各頂点の座標を示す頂点座標データや各頂点の色を示す頂点カラーデータ等を含む頂点データとして与えられる。グラフィクス処理回路10の頂点バッファ21には、この頂点データが格納されている。座標変換・ライティング処理部22は、頂点バッファ21から読み込んだ立体オブジェクトの3次元データに基づいて、そのオブジェクトの位置・姿勢に応じて拡大・回転等の幾何学的な演算処理を行う。座標変換・ライティング処理部22は更に、ポリゴン単位(三角形単位)での座標変換を実行するとともに、光源計算等の演算処理を実行する。これら幾何学的な演算処理、座標変換、及び光源処理等により、所望の視点から見たオブジェクトの2次元画像を構成する複数の三角形のデータを計算する。頂点後処理部23は、計算された頂点座標が表示画面枠からはみ出すか否かを判定し、はみ出した場合には表示画面内に収まるように三角形を分割する。頂点後処理部23は更に、頂点データから描画処理に必要な増分値の計算を行なう。ここで増分値とは、例えば三角形の辺に沿ったX座標及び各画像パラメータの傾き(変化分)のことである。   In general, a three-dimensional object is expressed as an aggregate of many polygons. At this time, a triangle is generally used as the simplest polygon. The three-dimensional data of the three-dimensional object to be drawn is given as vertex data including vertex coordinate data indicating the coordinates of each vertex of the triangle and vertex color data indicating the color of each vertex. This vertex data is stored in the vertex buffer 21 of the graphics processing circuit 10. Based on the three-dimensional data of the three-dimensional object read from the vertex buffer 21, the coordinate conversion / lighting processing unit 22 performs geometric calculation processing such as enlargement / rotation according to the position / posture of the object. The coordinate conversion / lighting processing unit 22 further performs coordinate conversion in units of polygons (triangles), and also performs arithmetic processing such as light source calculation. Data of a plurality of triangles constituting a two-dimensional image of an object viewed from a desired viewpoint is calculated by these geometric calculation processing, coordinate conversion, light source processing, and the like. The vertex post-processing unit 23 determines whether or not the calculated vertex coordinates protrude from the display screen frame, and when the vertex coordinates protrude, the vertex is divided so as to fit within the display screen. The vertex post-processing unit 23 further calculates an increment value necessary for the drawing process from the vertex data. Here, the increment value is, for example, the X coordinate along the side of the triangle and the inclination (change) of each image parameter.

ラスタライズ処理部24及び画素処理部25は、オブジェクトを構成する各面の各画素を塗りつぶすラスタライズ処理により、2次元の描画データを生成する。ラスタライズ処理では、各三角形の頂点毎の画像パラメータ及び上記の増分値に基づいて、三角形内部に含まれる各スパンの各画素の画像パラメータを補間等により求める。画像パラメータには、例えばRGB各色の輝度、奥行き方向の距離を表すZ値、テクスチャ表示のためのテクスチャ座標値、アルファブレンディングのためのアルファ値等が含まれる。画素後処理部26は、ラスタライズ処理で生成された各画素のテクスチャ座標を用いて、テクスチャユニット28を介してフレームバッファ12にアクセスし、テクスチャデータを読み出す。画素後処理部26は、読み出されたテクスチャデータとカラーデータのブレンド処理等を行なう。   The rasterization processing unit 24 and the pixel processing unit 25 generate two-dimensional drawing data by rasterization processing that fills each pixel of each surface constituting the object. In the rasterizing process, the image parameter of each pixel of each span included in the triangle is obtained by interpolation or the like based on the image parameter for each vertex of each triangle and the above increment value. The image parameters include, for example, the brightness of each RGB color, a Z value representing a distance in the depth direction, a texture coordinate value for texture display, an alpha value for alpha blending, and the like. The pixel post-processing unit 26 accesses the frame buffer 12 via the texture unit 28 using the texture coordinates of each pixel generated by the rasterization process, and reads the texture data. The pixel post-processing unit 26 performs blend processing of the read texture data and color data.

距離情報算出部29は、各画素毎にその画素が含まれる図形(三角形)の端までの距離を計算し、更にX方向及びY方向の各方向における一画素分の位置変化に対応する距離の増分値を計算する。メモリアクセス部27は、書込み対象のスパンの各画素について、画素色、奥行き(デプス)、奥行きの傾き(奥行き増分値)、距離、及び距離の傾き(距離の増分値)をフレームバッファ12に書き込む。この際、メモリアクセス部27は、書込み対象のスパンの各画素のメモリアドレスをアクセスし、フレームバッファ12から画像データを読み出す。フレームバッファ12から読み出した画素データは、生成された各スパンの画素データと合成される。この際、例えばZ値に基づいて隠線処理を行なったり、アルファ値に基づいてアルファブレンディング等を実行したりする。   The distance information calculation unit 29 calculates the distance to the end of the figure (triangle) including the pixel for each pixel, and further calculates the distance corresponding to the position change of one pixel in each direction in the X direction and the Y direction. Calculate the increment value. The memory access unit 27 writes the pixel color, depth (depth), depth gradient (depth increment value), distance, and distance gradient (distance increment value) to the frame buffer 12 for each pixel in the span to be written. . At this time, the memory access unit 27 accesses the memory address of each pixel of the span to be written, and reads the image data from the frame buffer 12. The pixel data read from the frame buffer 12 is combined with the generated pixel data of each span. At this time, for example, hidden line processing is performed based on the Z value, or alpha blending is performed based on the alpha value.

なお画素色データ及び奥行きデータについては、通常のラスタライズ処理により得ることができる。奥行きの傾きのデータは、x方向及びy方向の各方向における一画素分の位置変化に対応する奥行きの増分値を示し、ラスタライズ処理においては各スパン上の画素の奥行きを求める際に使用するデータである。従って、ラスタライズ処理における各画素の処理を実行する画素処理部25からこの奥行きの傾きのデータを出力するようにすればよい。距離データ及び距離の傾きデータについては、前述のように距離情報算出部29により算出すればよい。距離情報算出部29による距離データ及び距離の傾きデータの算出について以下に説明する。   Pixel color data and depth data can be obtained by a normal rasterization process. The depth inclination data indicates the increment value of the depth corresponding to the position change of one pixel in each direction of the x direction and the y direction, and is used when obtaining the depth of the pixel on each span in the rasterizing process. It is. Accordingly, the depth inclination data may be output from the pixel processing unit 25 that executes the processing of each pixel in the rasterizing process. The distance data and the slope data of the distance may be calculated by the distance information calculation unit 29 as described above. Calculation of distance data and distance inclination data by the distance information calculation unit 29 will be described below.

図2は、グラフィック描画の対象となる三角形を模式的に示す図である。三角形は3本の直線E0(x,y)、E1(x,y)、E2(x,y)により構成される。直線E0(x,y)は、E0(x,y)=a0x+b0y+c0=0と表すことができる。直線E1(x,y)は、E1(x,y)=a1x+b1y+c1=0と表すことができる。直線E2(x,y)は、E2(x,y)=a2x+b2y+c2=0と表すことができる。これらの直線の式を利用して、三角形の内部領域は、E0(x,y)>0且つE1(x,y)>0且つE2(x,y)>0を満たす点(x,y)の集合として定義することができる。   FIG. 2 is a diagram schematically showing a triangle to be subjected to graphic drawing. The triangle is composed of three straight lines E0 (x, y), E1 (x, y), and E2 (x, y). The straight line E0 (x, y) can be expressed as E0 (x, y) = a0x + b0y + c0 = 0. The straight line E1 (x, y) can be expressed as E1 (x, y) = a1x + b1y + c1 = 0. The straight line E2 (x, y) can be expressed as E2 (x, y) = a2x + b2y + c2 = 0. Using these straight line equations, the inner region of the triangle is a point (x, y) that satisfies E0 (x, y)> 0 and E1 (x, y)> 0 and E2 (x, y)> 0. Can be defined as a set of

図3は、着目画素についてその画素が含まれる図形の端までの距離を模式的に示す図である。座標(x,y)の点36からE0(x,y)で表わされる辺37までの距離d0(x,y)は、
d0(x,y)=E0(x,y)/D0
となる。ここでD0=(a0+b01/2である。同様にして、E1(x,y)で表わされる辺38までの距離d1(x,y)は、
d1(x,y)=E1(x,y)/D1
となる。ここでD1=(a1+b11/2である。また更に、E2(x,y)で表わされる辺39までの距離d2(x,y)は、
d2(x,y)=E2(x,y)/D2
となる。ここでD2=(a2+b21/2である。このようにして求められたd0(x,y)、d1(x,y)、及びd2(x,y)が、画素36についての図形の端までの距離である。
FIG. 3 is a diagram schematically illustrating the distance from the pixel of interest to the end of the graphic including the pixel. The distance d0 (x, y) from the point 36 of the coordinate (x, y) to the side 37 represented by E0 (x, y) is
d0 (x, y) = E0 (x, y) / D0
It becomes. Here, D0 = (a0 2 + b0 2 ) 1/2 . Similarly, the distance d1 (x, y) to the side 38 represented by E1 (x, y) is
d1 (x, y) = E1 (x, y) / D1
It becomes. Here, D1 = (a1 2 + b1 2 ) 1/2 . Furthermore, the distance d2 (x, y) to the side 39 represented by E2 (x, y) is
d2 (x, y) = E2 (x, y) / D2
It becomes. Here, D2 = (a2 2 + b2 2 ) 1/2 . D0 (x, y), d1 (x, y), and d2 (x, y) obtained in this way are distances to the end of the figure for the pixel 36.

図4は、画素36についての図形の端までの距離d0(x,y)のx方向の増分について説明するための図である。図4において、画素36についての図形の端までの距離がd0(x,y)であり、画素36からx軸方向に+1画素移動した位置における画素40での距離がd0(x+1,y)である。このとき、x方向における一画素分の位置変化に対応する距離の増分値d(d0)dxは、d0(x+1,y)−d0(x,y)として求められる。座標(x+1,y)にある画素40での距離d0(x+1,y)は、
d0(x+1,y)=E0(x+1,y)/D0
={E0(x,y)+a0}/D0
=d0(x,y)+a0/D0
となる。従って、距離d0(x,y)のx方向の増分値はa0/D0である。
FIG. 4 is a diagram for explaining the increment in the x direction of the distance d0 (x, y) to the edge of the figure for the pixel 36. FIG. In FIG. 4, the distance from the pixel 36 to the end of the figure is d0 (x, y), and the distance at the pixel 40 at the position moved +1 pixel from the pixel 36 in the x-axis direction is d0 (x + 1, y). is there. At this time, the increment value d (d0) dx corresponding to the position change of one pixel in the x direction is obtained as d0 (x + 1, y) −d0 (x, y). The distance d0 (x + 1, y) at the pixel 40 at the coordinates (x + 1, y) is
d0 (x + 1, y) = E0 (x + 1, y) / D0
= {E0 (x, y) + a0} / D0
= D0 (x, y) + a0 / D0
It becomes. Therefore, the increment value in the x direction of the distance d0 (x, y) is a0 / D0.

図5は、画素36についての図形の端までの距離d0(x,y)のy方向の増分について説明するための図である。図5において、画素36についての図形の端までの距離がd0(x,y)であり、画素36からy軸方向に+1画素移動した位置における画素41での距離がd0(x,y+1)である。このとき、y方向における一画素分の位置変化に対応する距離の増分値d(d0)dyは、d0(x,y+1)−d0(x,y)として求められる。座標(x,y+1)にある画素41での距離d0(x,y+1)は、
d1(x,y+1)=d0(x,y)+b0/D0
となる。従って、距離d0(x,y)のy方向の増分値はb0/D0である。
FIG. 5 is a diagram for explaining the increment in the y direction of the distance d0 (x, y) to the edge of the figure for the pixel 36. In FIG. In FIG. 5, the distance from the pixel 36 to the end of the figure is d0 (x, y), and the distance at the pixel 41 at the position moved by +1 pixel from the pixel 36 in the y-axis direction is d0 (x, y + 1). is there. At this time, the increment value d (d0) dy corresponding to the position change of one pixel in the y direction is obtained as d0 (x, y + 1) -d0 (x, y). The distance d0 (x, y + 1) at the pixel 41 at the coordinates (x, y + 1) is
d1 (x, y + 1) = d0 (x, y) + b0 / D0
It becomes. Therefore, the increment value in the y direction of the distance d0 (x, y) is b0 / D0.

同様にして、距離d1(x,y)のx方向の増分値はa1/D1であり、y方向の増分値はb1/D1である。また距離d2(x,y)のx方向の増分値はa2/D2であり、y方向の増分値はb2/D2である。   Similarly, the increment value in the x direction of the distance d1 (x, y) is a1 / D1, and the increment value in the y direction is b1 / D1. Further, the increment value in the x direction of the distance d2 (x, y) is a2 / D2, and the increment value in the y direction is b2 / D2.

図6は、図1のフレームバッファ12に格納するデータのデータ構造の一例を示す図である。図6の例では、画素色データとして32ビットデータをフレームバッファ12に格納している。また奥行き(デプス値)データとして同様に32ビットデータをフレームバッファ12に格納している。奥行きの傾き(デプス値の増分)については、x方向の増分データとして8ビットデータを、y方向の増分データとして8ビットデータを格納している。また距離の増分については、距離d0、d1、及びd2の各々に対して、x方向の増分データとして8ビットデータを、y方向の増分データとして8ビットデータを格納している。更に、距離d0、d1、及びd2の各々に対して、10ビットデータを格納している。このように、画素色と奥行きとに関しては4バイト精度としながら、奥行き及び距離の増分値に関しては1バイト精度とし、更に距離に関しては10ビット精度とすることで、1画素あたりの総ビット数を160ビットにするができる。実用上は、このように奥行き及び距離の増分値データ並びに距離データについて精度を落としても十分に品質のよいアンチエイリアス処理を実現することができる。   FIG. 6 is a diagram showing an example of the data structure of data stored in the frame buffer 12 of FIG. In the example of FIG. 6, 32-bit data is stored in the frame buffer 12 as pixel color data. Similarly, 32-bit data is stored in the frame buffer 12 as depth (depth value) data. For depth inclination (increment of depth value), 8-bit data is stored as incremental data in the x direction, and 8-bit data is stored as incremental data in the y direction. As for the distance increment, 8-bit data is stored as incremental data in the x direction and 8-bit data is stored as incremental data in the y direction for each of the distances d0, d1, and d2. Further, 10-bit data is stored for each of the distances d0, d1, and d2. As described above, the pixel color and the depth are set to 4-byte accuracy, the depth and distance increment values are set to 1-byte accuracy, and the distance is set to 10-bit accuracy, thereby reducing the total number of bits per pixel. It can be 160 bits. In practice, sufficiently high quality anti-aliasing processing can be realized even when the accuracy of the increment value data and the distance data of the depth and distance is reduced.

上記のように1画素辺り160ビット構成としても、この160ビットのデータを1画素について一度書込み及び読み出しをすればよい。それに対して2×2倍のマルチサンプルアンチエイリアスでは、それぞれ32ビットの画素色データ及び奥行きデータの4倍の量のデータについて、各画素毎に書込み及び読出しをすることになる。従って、2×2倍のマルチサンプルアンチエイリアスでは、1画素について64×4で256ビットのデータの読み書きが必要になる。このように、図6に示すようなデータにより以下に説明するアンチエイリアス処理を実行することにより、大幅に1画素あたりのビット数及びメモリアクセス量を削減することができる。   As described above, even if the configuration is 160 bits per pixel, the 160-bit data may be written and read once for each pixel. On the other hand, in the multi-sample anti-aliasing of 2 × 2 times, each pixel is written and read out with respect to data of 4 times the amount of 32-bit pixel color data and depth data. Therefore, in the case of 2 × 2 multisample anti-aliasing, it is necessary to read / write data of 64 × 4 and 256 bits per pixel. As described above, by executing the anti-aliasing process described below using data as shown in FIG. 6, the number of bits per pixel and the memory access amount can be greatly reduced.

図1のアンチエイリアス回路11において、奥行き・距離補間部31は、補間位置に隣接するある画素の奥行きとその画素が含まれる図形の端までの距離とに基づいて、補間位置における奥行きと前記図形の端までの距離とを求める処理を実行する。奥行き・距離補間部31は、補間位置に隣接する複数の画素のそれぞれに対して上記の処理を実行することにより、補間位置における複数の奥行きと複数の距離とを求める。奥行き・距離比較部32は、奥行き・距離補間部31が求めた補間位置における複数の奥行きと複数の距離とを複数の画素間で比較する。画素色決定部33は、複数の画素の色及び奥行き・距離補間部31が求めた補間位置における複数の奥行きと複数の距離とに基づいて、補間位置における色を決定する。この際、画素色決定部33は、奥行き・距離比較部32による複数の奥行きの比較結果と複数の距離の比較結果と、複数の画素の色とに基づいて、補間位置における色を決定してよい。また画素ブレンド部34は、1つの着目画素の位置に隣接する複数の補間位置について画素色決定部33が決定した色と、上記1つの着目画素の色とを混合することにより、当該1つの着目画素の新たな色を求める。このようにして求めた新たな色(色の輝度データ)が、エイリアス低減後の画素データとなる。   In the anti-aliasing circuit 11 of FIG. 1, the depth / distance interpolation unit 31 determines the depth at the interpolation position and the figure based on the depth of a pixel adjacent to the interpolation position and the distance to the edge of the figure including the pixel. The process which calculates | requires the distance to an edge is performed. The depth / distance interpolation unit 31 obtains a plurality of depths and a plurality of distances at the interpolation position by executing the above-described processing on each of a plurality of pixels adjacent to the interpolation position. The depth / distance comparison unit 32 compares a plurality of depths and a plurality of distances at the interpolation position obtained by the depth / distance interpolation unit 31 between a plurality of pixels. The pixel color determination unit 33 determines the color at the interpolation position based on the color of the plurality of pixels and the plurality of depths and the plurality of distances at the interpolation position obtained by the depth / distance interpolation unit 31. At this time, the pixel color determination unit 33 determines the color at the interpolation position based on the comparison result of the plurality of depths by the depth / distance comparison unit 32, the comparison result of the plurality of distances, and the colors of the plurality of pixels. Good. In addition, the pixel blending unit 34 mixes the color determined by the pixel color determining unit 33 for a plurality of interpolation positions adjacent to the position of one target pixel and the color of the one target pixel, thereby combining the one target pixel. Find the new color of the pixel. The new color (color luminance data) thus obtained becomes pixel data after alias reduction.

図7は、奥行き・距離補間部31の処理を説明するための図である。(a)に画素A乃至Dが示される。これら画素A乃至Dは、グラフィクス処理回路10のテクスチャユニット28がフレームバッファ12に書き込んだ画素である。(a)に示されるように、各画素A乃至Dの間に補間位置51を想定する。次に(b)に示されるように、奥行き・距離補間部31は、座標(x,y)にある画素Aの距離(画素Aから画素Aが含まれる図形の端までの距離)に基づいて、画素Aに隣接する補間位置における距離を求める。具体的には、画素Aの距離d0(x,y)、d1(x,y)、d2(x,y)のうちで最も小さい値を画素Aの距離値とし、d0(x+0.5,y)、d1(x+0.5,y)、d2(x+0.5,y)のうち最も小さい値を補間位置(x+0.5,y)の距離値とする。ここでd0(x+0.5,y)、d1(x+0.5,y)、d2(x+0.5,y)は、それぞれ以下のようにして求めることができる。   FIG. 7 is a diagram for explaining processing of the depth / distance interpolation unit 31. Pixels A to D are shown in FIG. These pixels A to D are pixels written to the frame buffer 12 by the texture unit 28 of the graphics processing circuit 10. As shown in (a), an interpolation position 51 is assumed between the pixels A to D. Next, as shown in (b), the depth / distance interpolation unit 31 is based on the distance of the pixel A at the coordinates (x, y) (the distance from the pixel A to the end of the figure including the pixel A). The distance at the interpolation position adjacent to the pixel A is obtained. Specifically, the smallest value among the distances d0 (x, y), d1 (x, y), and d2 (x, y) of the pixel A is the distance value of the pixel A, and d0 (x + 0.5, y ), D1 (x + 0.5, y), and d2 (x + 0.5, y) are set to the smallest value as the distance value of the interpolation position (x + 0.5, y). Here, d0 (x + 0.5, y), d1 (x + 0.5, y), and d2 (x + 0.5, y) can be obtained as follows.

d0(x+0.5,y)=d0(x,y)+a0/2D0
d1(x+0.5,y)=d1(x,y)+a1/2D1
d2(x+0.5,y)=d2(x,y)+a2/2D2
図7(b)に示す例では、画素Aから求めた補間位置(x+0.5,y)の距離値は0.5である。同様にして、d0(x,y+0.5)、d1(x,y+0.5)、d2(x,y+0.5)のうち最も小さい値を補間位置(x,y+0.5)の距離値とする。図7(b)に示す例では、画素Aから求めた補間位置(x,y+0.5)の距離値は0.3である。更に、d0(x+0.5,y+0.5)、d1(x+0.5,y+0.5)、d2(x+0.5,y+0.5)のうち最も小さい値を補間位置(x+0.5,y+0.5)の距離値とする。図7(b)に示す例では、画素Aから求めた補間位置(x+0.5,y+0.5)の距離値は0.7である。
d0 (x + 0.5, y) = d0 (x, y) + a0 / 2D0
d1 (x + 0.5, y) = d1 (x, y) + a1 / 2D1
d2 (x + 0.5, y) = d2 (x, y) + a2 / 2D2
In the example shown in FIG. 7B, the distance value of the interpolation position (x + 0.5, y) obtained from the pixel A is 0.5. Similarly, the smallest value among d0 (x, y + 0.5), d1 (x, y + 0.5), and d2 (x, y + 0.5) is set as the distance value of the interpolation position (x, y + 0.5). . In the example shown in FIG. 7B, the distance value of the interpolation position (x, y + 0.5) obtained from the pixel A is 0.3. Furthermore, the smallest value among d0 (x + 0.5, y + 0.5), d1 (x + 0.5, y + 0.5), and d2 (x + 0.5, y + 0.5) is set to the interpolation position (x + 0.5, y + 0.5). ) Distance value. In the example shown in FIG. 7B, the distance value of the interpolation position (x + 0.5, y + 0.5) obtained from the pixel A is 0.7.

更に図7(c)に示されるように、奥行き・距離補間部31は、座標(x,y+1)にある画素Bの距離(画素Bから画素Bが含まれる図形の端までの距離)に基づいて、画素Bに隣接する補間位置における距離を求める。この例では、画素Bから求めた補間位置(x+0.5,y+1)の距離値は0.1である。また画素Bから求めた補間位置(x,y+0.5)の距離値は−0.1である。更に画素Bから求めた補間位置(x+0.5,y+0.5)の距離値は−0.2である。   Further, as shown in FIG. 7C, the depth / distance interpolation unit 31 is based on the distance of the pixel B at the coordinates (x, y + 1) (the distance from the pixel B to the end of the graphic including the pixel B). Thus, the distance at the interpolation position adjacent to the pixel B is obtained. In this example, the distance value of the interpolation position (x + 0.5, y + 1) obtained from the pixel B is 0.1. The distance value of the interpolation position (x, y + 0.5) obtained from the pixel B is −0.1. Further, the distance value of the interpolation position (x + 0.5, y + 0.5) obtained from the pixel B is −0.2.

図12は、図7に示す画素Aと画素Bの間の補間位置における距離値の意味を説明するための図である。図12には、図7に示す画素A乃至Dが示される。図12に示される画素Aと画素Bとの間の補間位置51において、画素Aから求めた距離は0.3である。これは、画素Aが含まれる図形である三角形61の端までの補間位置51からの距離が0.3であることを意味する。また図12に示される画素Aと画素Bとの間の補間位置51において、画素Bから求めた距離は−0.1である。これは、画素Bが含まれる図形である三角形62の端までの補間位置51からの距離が−0.1であることを意味する。ここで距離が正の値である場合には、当該補間位置が対応する図形内に位置することを示し、距離が負の値である場合には、当該補間位置が対応する図形外に位置することを示す。即ち、補間位置51は、三角形61の内部にあるが、三角形62の外部にある。この場合、補間位置51の内挿色(補間色)としては、三角形61の内部の画素の色とすることが好ましい。   FIG. 12 is a diagram for explaining the meaning of the distance value at the interpolation position between the pixel A and the pixel B shown in FIG. FIG. 12 shows the pixels A to D shown in FIG. The distance obtained from the pixel A is 0.3 at the interpolation position 51 between the pixel A and the pixel B shown in FIG. This means that the distance from the interpolation position 51 to the end of the triangle 61 that is a graphic including the pixel A is 0.3. Further, at the interpolation position 51 between the pixel A and the pixel B shown in FIG. 12, the distance obtained from the pixel B is −0.1. This means that the distance from the interpolation position 51 to the end of the triangle 62 that is a graphic including the pixel B is −0.1. Here, when the distance is a positive value, it indicates that the interpolation position is located in the corresponding figure, and when the distance is a negative value, the interpolation position is located outside the corresponding figure. It shows that. That is, the interpolation position 51 is inside the triangle 61 but outside the triangle 62. In this case, the interpolated color (interpolated color) at the interpolation position 51 is preferably the color of the pixel inside the triangle 61.

図8は、奥行き・距離比較部32及び画素色決定部33の処理を説明するための図である。図8(a)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素Eとして示す)において、画素Aから求めた距離は0.3であり、画素Bから求めた距離は−0.1である。奥行き・距離比較部32は、これら複数の距離(0.3及び−0.1)を比較する。この場合、小さい方の距離(−0.1)が負の値であるので、図12で説明したように、補間位置の仮想画素Eの補間色を求めるにあたり、この負の距離に対応する画素Bの画素色は考慮しない。従って画素色決定部33は、(b)に示すように、仮想画素Eの色として、正の距離に対応する画素Aの画素色と同一色を用いる。   FIG. 8 is a diagram for explaining processing of the depth / distance comparison unit 32 and the pixel color determination unit 33. As shown in FIG. 8A, the distance obtained from the pixel A at the interpolation position (shown as a virtual pixel E) between the pixel A and the pixel B is 0.3, and the distance obtained from the pixel B Is -0.1. The depth / distance comparison unit 32 compares the plurality of distances (0.3 and −0.1). In this case, since the smaller distance (−0.1) is a negative value, as described with reference to FIG. 12, when determining the interpolation color of the virtual pixel E at the interpolation position, the pixel corresponding to this negative distance. The pixel color of B is not considered. Accordingly, the pixel color determination unit 33 uses the same color as the pixel color of the pixel A corresponding to the positive distance as the color of the virtual pixel E as shown in FIG.

図9は、奥行き・距離補間部31、奥行き・距離比較部32、及び画素色決定部33の処理を説明するための別の例を示す図である。図9の例では、(a)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素Eとして示す)において、画素Aから求めた距離は0.3であり、画素Bから求めた距離は0.2である。   FIG. 9 is a diagram illustrating another example for explaining processing of the depth / distance interpolation unit 31, the depth / distance comparison unit 32, and the pixel color determination unit 33. In the example of FIG. 9, as shown in FIG. 9A, the distance obtained from the pixel A at the interpolation position (shown as a virtual pixel E) between the pixel A and the pixel B is 0.3, and the pixel B The distance obtained from is 0.2.

図13は、図9に示す画素Aと画素Bの間の補間位置における距離値の意味を説明するための図である。図13には、図9に示す画素A乃至Dが示される。図13に示される画素Aと画素Bとの間の補間位置51において、画素Aから求めた距離は0.3である。これは、画素Aが含まれる図形である三角形61の端までの補間位置51からの距離が0.3であることを意味する。また図13に示される画素Aと画素Bとの間の補間位置51において、画素Bから求めた距離は0.2である。これは、画素Bが含まれる図形である三角形63の端までの補間位置51からの距離が0.2であることを意味する。ここで距離が正の値である場合には、当該補間位置が対応する図形内に位置することを示すので、補間位置51は、両方の三角形61及び63の内部にある。このように複数の距離が正の値を有する場合、即ち補間位置が複数の図形内に含まれる場合には、補間位置の奥行き値に基づいて補間位置の補間色を決定する。具体的には、補間位置の奥行き値が小さい方に対応する三角形の方が手前にある筈なので、補間位置51の内挿色(補間色)としては、この手前にある三角形の内部の画素の色を用いることが好ましい。   FIG. 13 is a diagram for explaining the meaning of the distance value at the interpolation position between the pixel A and the pixel B shown in FIG. FIG. 13 shows the pixels A to D shown in FIG. In the interpolation position 51 between the pixel A and the pixel B shown in FIG. 13, the distance obtained from the pixel A is 0.3. This means that the distance from the interpolation position 51 to the end of the triangle 61 that is a graphic including the pixel A is 0.3. Further, the distance obtained from the pixel B at the interpolation position 51 between the pixel A and the pixel B shown in FIG. 13 is 0.2. This means that the distance from the interpolation position 51 to the end of the triangle 63 that is a graphic including the pixel B is 0.2. Here, when the distance is a positive value, it indicates that the interpolation position is located in the corresponding figure, and therefore the interpolation position 51 is inside both triangles 61 and 63. Thus, when a plurality of distances have positive values, that is, when the interpolation position is included in a plurality of figures, the interpolation color of the interpolation position is determined based on the depth value of the interpolation position. Specifically, since the triangle corresponding to the smaller depth value of the interpolation position should be in front, the interpolation color (interpolation color) of the interpolation position 51 is the pixel inside the triangle in front of this. It is preferable to use a color.

図9(b)に示すように、奥行き・距離補間部31は、座標(x,y)にある画素Aの奥行き値に基づいて、画素Aに隣接する補間位置における奥行きを求める。この例では、画素Aから求めた補間位置(x+0.5,y)の奥行き値は24である。また画素Aから求めた補間位置(x,y+0.5)の奥行き値は23である。更に画素Aから求めた補間位置(x+0.5,y+0.5)の奥行き値は27である。   As shown in FIG. 9B, the depth / distance interpolation unit 31 obtains the depth at the interpolation position adjacent to the pixel A based on the depth value of the pixel A at the coordinates (x, y). In this example, the depth value of the interpolation position (x + 0.5, y) obtained from the pixel A is 24. The depth value of the interpolation position (x, y + 0.5) obtained from the pixel A is 23. Further, the depth value of the interpolation position (x + 0.5, y + 0.5) obtained from the pixel A is 27.

更に図9(c)に示すように、奥行き・距離補間部31は、座標(x,y+1)にある画素Bの奥行き値に基づいて、画素Bに隣接する補間位置における奥行きを求める。この例では、画素Bから求めた補間位置(x+0.5,y+1)の奥行き値は1である。また画素Bから求めた補間位置(x,y+0.5)の奥行き値は8である。更に画素Bから求めた補間位置(x+0.5,y+0.5)の奥行き値は4である。   Further, as shown in FIG. 9C, the depth / distance interpolation unit 31 obtains the depth at the interpolation position adjacent to the pixel B based on the depth value of the pixel B at the coordinates (x, y + 1). In this example, the depth value of the interpolation position (x + 0.5, y + 1) obtained from the pixel B is 1. The depth value of the interpolation position (x, y + 0.5) obtained from the pixel B is 8. Further, the depth value of the interpolation position (x + 0.5, y + 0.5) obtained from the pixel B is 4.

(d)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素Eとして示す)において、画素Aから求めた奥行き値は23であり、画素Bから求めた奥行き値は8である。奥行き・距離比較部32は、これら複数の奥行き値(23及び8)を比較する。この場合、小さい方の奥行き値(8)に対応する画素は画素Bである。従って、図12で説明したように、補間位置の仮想画素Eの補間色を求めるにあたり、画素Aの画素色は考慮しない。画素色決定部33は、(e)に示すように、仮想画素Eの色として、小さい方の奥行き値に対応する画素Bの画素色と同一色を用いる。このように画素色決定部33は、複数の距離のうちで負の値以外のものに対応する複数の奥行きのうちで最も小さいものを求め、この最も小さい奥行きに対応する画素の色を補間位置における色とする。   As shown in (d), at the interpolation position (shown as virtual pixel E) between pixel A and pixel B, the depth value obtained from pixel A is 23, and the depth value obtained from pixel B is 8 It is. The depth / distance comparison unit 32 compares the plurality of depth values (23 and 8). In this case, the pixel corresponding to the smaller depth value (8) is the pixel B. Therefore, as described with reference to FIG. 12, the pixel color of the pixel A is not taken into account when determining the interpolation color of the virtual pixel E at the interpolation position. As shown in (e), the pixel color determination unit 33 uses the same color as the pixel color of the pixel B corresponding to the smaller depth value as the color of the virtual pixel E. As described above, the pixel color determining unit 33 obtains the smallest one of the plurality of depths corresponding to the non-negative values among the plurality of distances, and interpolates the color of the pixel corresponding to the smallest depth. The color in.

図10は、奥行き・距離比較部32及び画素色決定部33の処理を説明するための更に別の例を示す図である。図10の例では、(a)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素Eとして示す)において、画素Aから求めた距離は−0.3であり、画素Bから求めた距離は−0.2である。   FIG. 10 is a diagram illustrating still another example for explaining the processing of the depth / distance comparison unit 32 and the pixel color determination unit 33. In the example of FIG. 10, as shown in FIG. 10A, the distance obtained from the pixel A at the interpolation position (shown as a virtual pixel E) between the pixel A and the pixel B is −0.3, and the pixel The distance obtained from B is -0.2.

図14は、図10に示す画素Aと画素Bの間の補間位置における距離値の意味を説明するための図である。図14には、図10に示す画素A乃至Dが示される。図14に示される画素Aと画素Bとの間の補間位置51において、画素Aから求めた距離は−0.3である。これは、画素Aが含まれる図形である三角形64の端までの補間位置51からの距離が−0.3であり、補間位置51が三角形64の外部にあることを意味する。また図14に示される画素Aと画素Bとの間の補間位置51において、画素Bから求めた距離は−0.2である。これは、画素Bが含まれる図形である三角形65の端までの補間位置51からの距離が−0.2であり、補間位置51が三角形65の外部にあることを意味する。このように複数の距離が全て負の値を有する場合、即ち補間位置が全ての図形の外にある場合、複数の距離の比に応じて複数の画素の色を合成することにより、補間位置の補間色を決定する。   FIG. 14 is a diagram for explaining the meaning of the distance value at the interpolation position between the pixel A and the pixel B shown in FIG. FIG. 14 shows the pixels A to D shown in FIG. In the interpolation position 51 between the pixel A and the pixel B shown in FIG. 14, the distance obtained from the pixel A is −0.3. This means that the distance from the interpolation position 51 to the end of the triangle 64 that is a graphic including the pixel A is −0.3, and the interpolation position 51 is outside the triangle 64. Further, in the interpolation position 51 between the pixel A and the pixel B shown in FIG. 14, the distance obtained from the pixel B is −0.2. This means that the distance from the interpolation position 51 to the end of the triangle 65 that is a graphic including the pixel B is −0.2, and the interpolation position 51 is outside the triangle 65. In this way, when the plurality of distances all have negative values, that is, when the interpolation position is outside of all the figures, the colors of the plurality of pixels are synthesized according to the ratio of the plurality of distances to obtain the interpolation position. Determine the interpolation color.

図10(a)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素Eとして示す)において、画素Aから求めた距離は−0.3であり、画素Bから求めた距離は−0.2である。奥行き・距離比較部32は、これら複数の距離(−0.3及び−0.2)を比較して、それぞれの距離の比を求める。即ち、0.3/(0.3+0.2)=0.6と0.2/(0.3+0.2)=0.4とを求める。画素色決定部33は、(b)に示すように、仮想画素Eの色として、上記求めた比率0.4と0.6とで重み付けして画素Aの画素色と画素Bの画素色とを混合する。(c)は、画素Aの画素色と画素Bの画素色とを混合して仮想画素Eの色が求められた様子を示す。   As shown in FIG. 10A, the distance obtained from the pixel A at the interpolation position (shown as a virtual pixel E) between the pixel A and the pixel B is −0.3, and is obtained from the pixel B. The distance is -0.2. The depth / distance comparison unit 32 compares the plurality of distances (−0.3 and −0.2) to obtain the ratio of the distances. That is, 0.3 / (0.3 + 0.2) = 0.6 and 0.2 / (0.3 + 0.2) = 0.4 are obtained. As shown in (b), the pixel color determining unit 33 weights the virtual pixel E as the color of the virtual pixel E using the ratios 0.4 and 0.6, and determines the pixel color of the pixel A and the pixel color of the pixel B. Mix. (C) shows a state in which the color of the virtual pixel E is obtained by mixing the pixel color of the pixel A and the pixel color of the pixel B.

図11は、画素ブレンド部34の処理を説明するための図である。上記の図7乃至10を参照して説明した手順により、仮想画素Eの補間色を求めることができる。更に同様にして、仮想画素Fの補間色及び仮想画素Gの補間色を求めることができる。なお仮想画素Gの補間色の求め方については後程説明する。図11(a)は、仮想画素E乃至Gのそれぞれについて補間色(内挿色)を求めた様子を示す。画素ブレンド部34は、1つの着目画素Aの位置に隣接する複数の補間位置(仮想画素E乃至G)について画素色決定部33が決定した色と1つの着目画素Aの色とを混合することにより、1つの着目画素Aの新たな色(アンチエイリアス処理後の色)を求める。例えば画素ブレンド部34は、画素Aの色、仮想画素Eの色、仮想画素Fの色、仮想画素Gの色の平均を計算することにより、画素Aのアンチエイリアス処理後の画素値を求める。即ち各画素色がA,E,F,Gであるとして、(A+E+F+G)/4を計算する。図11(b)は、画素Aのアンチエイリアス処理後の画素値A’が求められた様子を示す。画素ブレンド部34は、同様にしてフレームバッファ12に格納されている各画素についてアンチエイリアス処理後の画素値を求めていく。   FIG. 11 is a diagram for explaining the processing of the pixel blend unit 34. The interpolation color of the virtual pixel E can be obtained by the procedure described with reference to FIGS. Similarly, the interpolation color of the virtual pixel F and the interpolation color of the virtual pixel G can be obtained. Note that how to obtain the interpolation color of the virtual pixel G will be described later. FIG. 11A shows a state in which an interpolation color (interpolation color) is obtained for each of the virtual pixels E to G. The pixel blending unit 34 mixes the color determined by the pixel color determining unit 33 and the color of one target pixel A for a plurality of interpolation positions (virtual pixels E to G) adjacent to the position of one target pixel A. Thus, a new color (color after anti-aliasing) of one target pixel A is obtained. For example, the pixel blending unit 34 calculates the average of the color of the pixel A, the color of the virtual pixel E, the color of the virtual pixel F, and the color of the virtual pixel G, thereby obtaining the pixel value of the pixel A after antialiasing. That is, assuming that each pixel color is A, E, F, and G, (A + E + F + G) / 4 is calculated. FIG. 11B shows a state in which the pixel value A ′ after antialiasing processing of the pixel A is obtained. Similarly, the pixel blending unit 34 obtains a pixel value after anti-aliasing for each pixel stored in the frame buffer 12.

図15は、アンチエイリアス回路11によるアンチエイリアス処理の流れを示すフローチャートである。ステップS1において、座標値yを0に初期化し、yを1ずつインクリメントしながら、画面高さのy値に到達するまで以下のステップの処理をループにより繰り返す。ステップS2において、座標値xを0に初期化し、xを1ずつインクリメントしながら、画面横幅のx値に到達するまで以下のステップの処理をループにより繰り返す。即ち、ステップS1及びS2のループにより、フレームバッファ12に格納される画像データの各画素を着目画素として読み出して、順番にアンチエイリアス処理を実行する。まずステップS3で、着目画素を画素Aとして、前述のように画素A及び画素Bに基づいて仮想画素Eの画素値を求める。ステップS4で、画素A及び画素Cに基づいて仮想画素Fの画素値を求める。更にステップS5で、画素A乃至Dに基づいて仮想画素Gの画素値を求める。ステップS7で、画素A、E、F、Gの例えば平均値を求めることにより、画素Aのアンチエイリアス処理後の画素値を求める。ステップS1及びS2で開始したループが終了すると、アンチエイリアス処理を終了する。   FIG. 15 is a flowchart showing the flow of anti-aliasing processing by the anti-aliasing circuit 11. In step S1, the coordinate value y is initialized to 0, and while incrementing y by 1, the following steps are repeated in a loop until the y value of the screen height is reached. In step S2, the coordinate value x is initialized to 0, and while incrementing x by 1, the following steps are repeated in a loop until the x value of the screen width is reached. That is, each pixel of the image data stored in the frame buffer 12 is read out as a pixel of interest by the loop of steps S1 and S2, and antialiasing processing is executed in order. First, in step S3, the pixel of interest is the pixel A, and the pixel value of the virtual pixel E is obtained based on the pixels A and B as described above. In step S4, the pixel value of the virtual pixel F is obtained based on the pixel A and the pixel C. In step S5, the pixel value of the virtual pixel G is obtained based on the pixels A to D. In step S7, for example, an average value of the pixels A, E, F, and G is obtained to obtain a pixel value of the pixel A after the antialiasing process. When the loop started in steps S1 and S2 ends, the anti-aliasing process ends.

図16は、図15のステップS4乃至S6の各ステップで実行される補間色決定処理の流れを示すフローチャートである。ステップS1で、着目補間位置に対して求めた複数の距離値が全て負の値であるか否かを判定する。1つでも正の値がある場合には、処理はステップS2に進む。ステップS2において、負の値である距離値に対応する画素を除外する。例えば図8(a)に示されるように、画素Aと画素Bとの間の補間位置(仮想画素E)において、画素Aから求めた距離が0.3であり、画素Bから求めた距離が−0.1である場合、負の距離−0.1に対応する画素Bを以下の処理から除外する。また例えば、画素A乃至Dの間の補間位置(仮想画素G)において、画素Aから求めた距離が0.3、画素Bから求めた距離が−0.1、画素Cから求めた距離が0.2、画素Dから求めた距離が−0.7であるとする。この場合、負の距離−0.1に対応する画素B及び負の距離−0.7に対応する画素Dを以下の処理から除外する。   FIG. 16 is a flowchart showing the flow of interpolation color determination processing executed in steps S4 to S6 of FIG. In step S1, it is determined whether or not the plurality of distance values obtained for the target interpolation position are all negative values. If there is even one positive value, the process proceeds to step S2. In step S2, pixels corresponding to a distance value that is a negative value are excluded. For example, as shown in FIG. 8A, at the interpolation position (virtual pixel E) between the pixel A and the pixel B, the distance obtained from the pixel A is 0.3, and the distance obtained from the pixel B is If it is −0.1, the pixel B corresponding to the negative distance −0.1 is excluded from the following processing. For example, at the interpolation position (virtual pixel G) between the pixels A to D, the distance obtained from the pixel A is 0.3, the distance obtained from the pixel B is -0.1, and the distance obtained from the pixel C is 0. 2. Assume that the distance obtained from the pixel D is -0.7. In this case, the pixel B corresponding to the negative distance −0.1 and the pixel D corresponding to the negative distance −0.7 are excluded from the following processing.

ステップS3において、上記の除外された画素以外の画素から求めた補間位置における奥行き値のうちで、最も小さい奥行き値を求め、その最小奥行き値に対応する画素を選択する。例えば画素Aと画素Bとの間の補間位置(仮想画素E)において、画素Aから求めた距離が0.3であり、画素Bから求めた距離が−0.1である場合、負の距離−0.1に対応する画素Bを除外し、残りのうちの最小奥行き値0.3に対応する画素Aを選択する。また例えば、画素A乃至Dの間の補間位置(仮想画素G)において、画素Aから求めた距離が0.3、画素Bから求めた距離が−0.1、画素Cから求めた距離が0.2、画素Dから求めた距離が−0.7であるとする。この場合、負の距離−0.1に対応する画素B及び負の距離−0.7に対応する画素Dを除外し、残りのうちの最小奥行き値0.2に対応する画素Cを選択する。   In step S3, the smallest depth value is obtained from the depth values at the interpolation position obtained from the pixels other than the excluded pixels, and the pixel corresponding to the minimum depth value is selected. For example, when the distance obtained from the pixel A is 0.3 and the distance obtained from the pixel B is −0.1 at the interpolation position (virtual pixel E) between the pixel A and the pixel B, the negative distance The pixel B corresponding to −0.1 is excluded, and the remaining pixel A corresponding to the minimum depth value 0.3 is selected. For example, at the interpolation position (virtual pixel G) between the pixels A to D, the distance obtained from the pixel A is 0.3, the distance obtained from the pixel B is -0.1, and the distance obtained from the pixel C is 0. 2. Assume that the distance obtained from the pixel D is -0.7. In this case, the pixel B corresponding to the negative distance −0.1 and the pixel D corresponding to the negative distance −0.7 are excluded, and the remaining pixel C corresponding to the minimum depth value 0.2 is selected. .

ステップS4で、奥行き値が最小として選択された画素の色を補間位置の色とする。即ち、上記の画素Aと画素Bとの間の補間位置(仮想画素E)の例では、画素Aの画素色を補間位置の補間色とする。また上記の画素A乃至Dの間の補間位置(仮想画素G)の例では、画素Cの画素色を補間位置の補間色とする。   In step S4, the color of the pixel selected with the minimum depth value is set as the color at the interpolation position. That is, in the example of the interpolation position (virtual pixel E) between the pixel A and the pixel B, the pixel color of the pixel A is set as the interpolation color at the interpolation position. In the example of the interpolation position (virtual pixel G) between the pixels A to D, the pixel color of the pixel C is set as the interpolation color at the interpolation position.

ステップS1で全ての距離が負の値であると判定された場合、処理はステップS5に進み、複数の距離の比に応じて複数の画素の色を混合する。例えば画素Aから求めた距離値がdAであり、画素Bから求めた距離値がdBである場合、画素Aと画素Bとの間の仮想画素Eの補間色は例えば(dB×A+dA×B)/(dA+dB)としてよい。画素A、B、C、Dの中心に位置する仮想画素Gを補間する場合は、画素A、B、C、Dから求めた距離値をそれぞれdA、dB、dC、dDとして、仮想画素Gの補間色を例えば、   If it is determined in step S1 that all the distances are negative values, the process proceeds to step S5, and the colors of the plurality of pixels are mixed according to the ratio of the plurality of distances. For example, when the distance value obtained from the pixel A is dA and the distance value obtained from the pixel B is dB, the interpolation color of the virtual pixel E between the pixel A and the pixel B is, for example, (dB × A + dA × B) / (DA + dB). When the virtual pixel G located at the center of the pixels A, B, C, and D is interpolated, the distance values obtained from the pixels A, B, C, and D are set as dA, dB, dC, and dD, respectively. For example, the interpolation color

Figure 2011028641
としてよい。以上で補間色決定処理が終了する。
Figure 2011028641
As good as This completes the interpolation color determination process.

図17は、アンチエイリアス回路11のより具体的な回路構成の一例を示す図である。アンチエイリアス回路11は、ラインバッファである画素情報保持RAM71を更に含む。例えば図7乃至11に示すように、画素Aのアンチエイリアス処理を行なうためには、画素Aについての例えば図6に示すデータだけでなく、画素C乃至Dについても同様のデータをフレームバッファ12から読み出す必要がある。各画素についてアンチエイリアス処理を行なう度に、その画素のデータに加えて近傍3画素のデータを読み出すとすると、メモリアクセス量が多くなってしまう。そこで画素情報保持RAM71として3ライン(画像の水平ライン)又はそれ以上の画素データを保持できるようにする。   FIG. 17 is a diagram illustrating an example of a more specific circuit configuration of the anti-aliasing circuit 11. The anti-aliasing circuit 11 further includes a pixel information holding RAM 71 that is a line buffer. For example, as shown in FIGS. 7 to 11, in order to perform the anti-aliasing processing of the pixel A, not only the data shown in FIG. 6 for the pixel A but also the same data for the pixels C to D are read from the frame buffer 12. There is a need. When the anti-aliasing process is performed for each pixel, if the data of three neighboring pixels is read in addition to the data of the pixel, the memory access amount increases. Therefore, the pixel information holding RAM 71 is configured to hold pixel data of three lines (horizontal line of the image) or more.

図18は、画素情報保持RAM71の読み書き処理について説明するための図である。画素情報保持RAM71は、少なくともラインメモリ91乃至93を含む。ラインメモリ91乃至93の各ラインメモリが、アンチエイリアス処理対象の2次元画像の1水平ライン分のデータを格納できる。まず図18の上段に示すように、ラインメモリ91及び92に画像の2ラインを読み込んで、この2ライン分のデータを用いてラインメモリ91の各画素に対するアンチエイリアス処理を実行する。例えば図7乃至11に示した例の場合であれば、画素A及び画素Cがラインメモリ91に格納される画素列の一部であり、画素B及び画素Dがラインメモリ92に格納される画素列の一部である。前述のアンチエイリアス処理を実行することにより、画素A及び画素Cを含むラインメモリ91に格納される画素列の各画素についてのアンチエイリアス処理後の画素値が求められる。このアンチエイリアス処理により求められたアンチエイリアス処理後の画素値は、画素ブレンド部34からフレームバッファ12に書き込まれる。ラインメモリ91に対するアンチエイリアス処理を実行するのと並行して、次の水平ラインの画素データがフレームバッファ12からラインメモリ93に読み込まれる。   FIG. 18 is a diagram for explaining read / write processing of the pixel information holding RAM 71. The pixel information holding RAM 71 includes at least line memories 91 to 93. Each line memory of the line memories 91 to 93 can store data for one horizontal line of the two-dimensional image to be anti-aliased. First, as shown in the upper part of FIG. 18, two lines of an image are read into the line memories 91 and 92, and antialiasing processing is performed on each pixel of the line memory 91 using the data for the two lines. For example, in the case of the example illustrated in FIGS. 7 to 11, the pixel A and the pixel C are part of the pixel column stored in the line memory 91, and the pixel B and the pixel D are pixels stored in the line memory 92. Part of the column. By executing the above-described anti-aliasing process, the pixel value after the anti-aliasing process is obtained for each pixel of the pixel column stored in the line memory 91 including the pixel A and the pixel C. The pixel value after anti-aliasing obtained by this anti-aliasing is written from the pixel blend unit 34 to the frame buffer 12. In parallel with the execution of the anti-aliasing process for the line memory 91, the pixel data of the next horizontal line is read from the frame buffer 12 into the line memory 93.

次に図18の下段に示すように、ラインメモリ92及び93の2ライン分のデータを用いてラインメモリ92の各画素に対するアンチエイリアス処理を実行する。例えば図7乃至11に示した例の場合であれば、画素B及び画素Dを含むラインメモリ92に格納される画素列の各画素についてのアンチエイリアス処理後の画素値が求められる。このアンチエイリアス処理により求められたアンチエイリアス処理後の画素値は、画素ブレンド部34からフレームバッファ12に書き込まれる。ラインメモリ92に対するアンチエイリアス処理を実行するのと並行して、次の水平ラインの画素データがフレームバッファ12からラインメモリ91に読み込まれる。前回のアンチエイリアス処理に用いたラインメモリ91の画素列のデータは既に不要となっているので、フレームバッファ12から読み出した画素データによりラインメモリ91を上書きして問題ない。   Next, as shown in the lower part of FIG. 18, anti-aliasing processing is performed on each pixel of the line memory 92 using data for two lines of the line memories 92 and 93. For example, in the case of the example illustrated in FIGS. 7 to 11, the pixel value after anti-aliasing processing is obtained for each pixel of the pixel column stored in the line memory 92 including the pixel B and the pixel D. The pixel value after anti-aliasing obtained by this anti-aliasing is written from the pixel blend unit 34 to the frame buffer 12. In parallel with the execution of the anti-aliasing processing for the line memory 92, the pixel data of the next horizontal line is read from the frame buffer 12 into the line memory 91. Since the pixel column data in the line memory 91 used for the previous anti-aliasing process is already unnecessary, there is no problem in overwriting the line memory 91 with the pixel data read from the frame buffer 12.

以上のように、小容量で高速の画素情報保持RAM71をアンチエイリアス回路11に設け、各画素のデータをフレームバッファ12から画素情報保持RAM71に1回だけ読出し、アンチエイリアス処理においては画素情報保持RAM71の画素データを参照する。このような構成とすることで、フレームバッファ12からの画素データの読出しは、各画素について1回のみとすることができ、メモリアクセス量を必要最小限とすることが可能となる。   As described above, the small-capacity and high-speed pixel information holding RAM 71 is provided in the anti-aliasing circuit 11, and the data of each pixel is read from the frame buffer 12 to the pixel information holding RAM 71 only once. Browse the data. With this configuration, pixel data can be read from the frame buffer 12 only once for each pixel, and the memory access amount can be minimized.

図17に戻り、奥行き・距離補間部31は、加算回路72及び73を含む。加算回路72は、着目画素の奥行き値に奥行き値のx方向増分又はy方向増分を加算することで、補間位置の奥行き値を求める。加算回路73は、着目画素の距離値に距離値のx方向増分又はy方向増分を加算することで、補間位置の距離値を求める。前述の図7乃至11を用いた説明では、説明の便宜上、距離値を求めてからその後奥行き値を求めるかのように説明したが、実際には図17に示すように距離値計算及び奥行き値計算を並行して実行すればよい。   Returning to FIG. 17, the depth / distance interpolation unit 31 includes addition circuits 72 and 73. The adding circuit 72 obtains the depth value of the interpolation position by adding the x-direction increment or the y-direction increment of the depth value to the depth value of the pixel of interest. The adding circuit 73 obtains the distance value of the interpolation position by adding the x-direction increment or the y-direction increment of the distance value to the distance value of the target pixel. In the description using FIGS. 7 to 11 described above, for the sake of convenience of explanation, the distance value is obtained and then the depth value is obtained. However, in practice, the distance value calculation and the depth value are obtained as shown in FIG. Calculations may be executed in parallel.

奥行き・距離比較部32は、奥行き値保持バッファ74、距離値保持バッファ75、奥行き値比較回路76、及び距離値比較回路77を含む。奥行き値保持バッファ74は、着目補間位置に隣接する複数の画素から求めた複数の奥行き値を保持する。距離値保持バッファ75は、着目補間位置に隣接する複数の画素から求めた複数の距離値を保持する。奥行き値比較回路76は、奥行き値保持バッファ74に格納される複数の奥行き値を互いに比較し、比較結果を画素色決定部33に供給する。この比較結果は、例えば複数の奥行き値のうちで最も小さい奥行き値から奥行き値の大きさ順に奥行き値を並べ、この奥行き値の並びに対応する画素の並びを示す情報であってよい。距離値比較回路77は、距離値保持バッファ75に格納される複数の距離値を互いに比較し、比較結果を画素色決定部33に供給する。この比較結果は、距離値が負の値である画素を特定する情報、距離値が正の値である画素を特定する情報、及び正の値の距離値の比率(重み)を示す情報であってよい。   The depth / distance comparison unit 32 includes a depth value holding buffer 74, a distance value holding buffer 75, a depth value comparison circuit 76, and a distance value comparison circuit 77. The depth value holding buffer 74 holds a plurality of depth values obtained from a plurality of pixels adjacent to the target interpolation position. The distance value holding buffer 75 holds a plurality of distance values obtained from a plurality of pixels adjacent to the target interpolation position. The depth value comparison circuit 76 compares a plurality of depth values stored in the depth value holding buffer 74 with each other, and supplies the comparison result to the pixel color determination unit 33. This comparison result may be information indicating, for example, the depth values arranged in order of the depth value from the smallest depth value among the plurality of depth values, and the arrangement of the corresponding pixels in the depth value. The distance value comparison circuit 77 compares a plurality of distance values stored in the distance value holding buffer 75 and supplies the comparison result to the pixel color determination unit 33. This comparison result is information for identifying a pixel having a negative distance value, information for identifying a pixel having a positive distance value, and information indicating a ratio (weight) of distance values having a positive value. It's okay.

画素色決定部33は、画素選択・ブレンド部78及び画素色保持バッファ79を含む。画素選択・ブレンド部78は、奥行き値比較回路76からの奥行き値比較結果と、距離値比較回路77からの距離値比較結果と、画素情報保持RAM71から読み出した複数の画素の色とに基づいて、着目補間位置における色を決定する。複数の距離が全て負の値であることを距離値比較結果が示す場合には、距離値比較結果が示す距離値の比に応じて、複数の画素の色を合成する。複数の距離に正の値があることを距離値比較結果が示す場合には、距離値比較結果が特定する正の距離値の画素のうちで、奥行き値比較結果が示す最も小さい奥行き値の画素を特定し、この特定された画素の色を着目補間位置における色とする。画素選択・ブレンド部78が求めた着目補間位置の補間色は、画素色保持バッファ79に格納される。   The pixel color determination unit 33 includes a pixel selection / blending unit 78 and a pixel color holding buffer 79. The pixel selection / blending unit 78 is based on the depth value comparison result from the depth value comparison circuit 76, the distance value comparison result from the distance value comparison circuit 77, and the colors of the plurality of pixels read from the pixel information holding RAM 71. The color at the target interpolation position is determined. When the distance value comparison result indicates that the plurality of distances are all negative values, the colors of the plurality of pixels are synthesized according to the ratio of the distance values indicated by the distance value comparison result. When the distance value comparison result indicates that a plurality of distances have a positive value, the pixel having the smallest depth value indicated by the depth value comparison result among the positive distance value pixels specified by the distance value comparison result And the color of the specified pixel is set as the color at the target interpolation position. The interpolation color at the target interpolation position obtained by the pixel selection / blending unit 78 is stored in the pixel color holding buffer 79.

奥行き・距離補間部31、奥行き・距離比較部32、及び画素色決定部33は、1つの着目画素(例えば図11の画素A)に隣接する複数の補間位置(例えば図11の仮想画素E、F、G)について、上記と同様の処理を繰り返し、複数の補間位置の補間色を求める。複数の補間位置について求めた複数の補間色は、画素色保持バッファ79に格納される。また着目画素の画素色も画素色保持バッファ79に格納される。画素ブレンド部34は、画素色保持バッファ79に格納された複数の補間位置の補間色と着目画素の画素色とを混合することにより、着目画素のアンチエイリアス処理後の画素色を求め、フレームバッファ12に格納する。フレームバッファ12に格納するアンチエイリアス処理後の画素色は、既存の着目画素の画素色データを上書きするように書き込まれてよい。或いは、別の画像データとして書き込まれてよい。   The depth / distance interpolation unit 31, the depth / distance comparison unit 32, and the pixel color determination unit 33 have a plurality of interpolation positions (for example, the virtual pixel E, FIG. 11) adjacent to one pixel of interest (for example, the pixel A in FIG. 11). For F, G), the same processing as described above is repeated to obtain interpolation colors at a plurality of interpolation positions. The plurality of interpolation colors obtained for the plurality of interpolation positions are stored in the pixel color holding buffer 79. The pixel color of the pixel of interest is also stored in the pixel color holding buffer 79. The pixel blend unit 34 obtains a pixel color after antialiasing processing of the target pixel by mixing the interpolation colors of the plurality of interpolation positions stored in the pixel color holding buffer 79 and the pixel color of the target pixel, and the frame buffer 12 To store. The pixel color after the anti-aliasing process stored in the frame buffer 12 may be written so as to overwrite the pixel color data of the existing target pixel. Alternatively, it may be written as other image data.

以上、本発明を実施例に基づいて説明したが、本発明は上記実施例に限定されるものではなく、特許請求の範囲に記載の範囲内で様々な変形が可能である。   As mentioned above, although this invention was demonstrated based on the Example, this invention is not limited to the said Example, A various deformation | transformation is possible within the range as described in a claim.

なお本願発明は、以下の内容を含むものである。
(付記1)
補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求める補間部と、
前記複数の画素の色及び前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とに基づいて、前記補間位置における色を決定する画素色決定部と
を含むことを特徴とする画像処理装置。
(付記2)
1つの着目画素の位置に隣接する複数の補間位置について前記画素色決定部が決定した色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める画素色混合部を更に含むことを特徴とする付記1記載の画像処理装置。
(付記3)
前記画素色決定部は、前記複数の距離が全て負の値の場合には前記複数の距離の比に応じて前記複数の画素の色を合成し、前記複数の距離が全て負の値である以外の場合には、前記複数の距離のうちで負の値以外のものに対応する前記複数の奥行きのうちで最も小さいものを求め、前記複数の画素のうちで該最も小さい奥行きに対応する画素の色を前記補間位置における色とすることを特徴とする付記1又は2記載の画像処理装置。
(付記4)
前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とを前記複数の画素間で比較する比較部を更に含み、前記画素色決定部は、前記比較部による複数の奥行きの比較結果と複数の距離の比較結果と、前記複数の画素の色とに基づいて、前記補間位置における色を決定することを特徴とする付記1記載の画像処理装置。
(付記5)
補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求め、
前記複数の奥行きと、前記複数の距離と、前記複数の画素の色とに基づいて、前記補間位置における補間色を決定し、
1つの着目画素の位置に隣接する複数の補間位置について決定した前記補間色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める
各段階を含むことを特徴とする画像処理方法。
(付記6)
前記補間色を決定する段階は、前記複数の距離が全て負の値の場合には前記複数の距離の比に応じて前記複数の画素の色を合成し、前記複数の距離が全て負の値である以外の場合には、前記複数の距離のうちで負の値以外のものに対応する前記複数の奥行きのうちで最も小さいものを求め、前記複数の画素のうちで該最も小さい奥行きに対応する画素の色を前記補間位置における色とすることを特徴とする付記5記載の画像処理方法。
(付記7)
メモリと、
各画素について画素色、奥行き、及び該画素が含まれる図形の端までの距離を計算して前記メモリに格納する画像描画部と、
前記メモリから前記奥行き及び前記距離を読み出して、補間位置に隣接するある画素の前記奥行きと前記距離とに基づいて前記補間位置における奥行きと距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求める補間部と、
前記複数の画素について前記メモリから読み出した前記画素色、及び前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とに基づいて、前記補間位置における色を決定する画素色決定部と、
1つの着目画素の位置に隣接する複数の補間位置について前記画素色決定部が決定した色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める画素色混合部と、
前記画素色混合部により求めた画素色を有する画素により構成された画像を表示する画像表示部
を含むことを特徴とする画像システム。
The present invention includes the following contents.
(Appendix 1)
A plurality of processes adjacent to the interpolation position that calculate the depth at the interpolation position and the distance to the edge of the graphic based on the depth of a pixel adjacent to the interpolation position and the distance to the edge of the graphic including the pixel. An interpolation unit that calculates a plurality of depths and a plurality of distances at the interpolation position by executing each of the pixels;
A pixel color determination unit that determines colors at the interpolation position based on the colors of the plurality of pixels and the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit. An image processing apparatus.
(Appendix 2)
A pixel for obtaining a new color of the one pixel of interest by mixing the color determined by the pixel color determination unit and the color of the pixel of interest for a plurality of interpolation positions adjacent to the position of one pixel of interest The image processing apparatus according to appendix 1, further comprising a color mixing unit.
(Appendix 3)
The pixel color determination unit combines the colors of the plurality of pixels according to a ratio of the plurality of distances when the plurality of distances are all negative values, and the plurality of distances are all negative values. Otherwise, the smallest one of the plurality of depths corresponding to a non-negative value among the plurality of distances is obtained, and the pixel corresponding to the smallest depth among the plurality of pixels. The image processing apparatus according to appendix 1 or 2, wherein the color is the color at the interpolation position.
(Appendix 4)
The comparison unit further includes a comparison unit that compares the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit between the plurality of pixels, and the pixel color determination unit includes a plurality of depths by the comparison unit. The image processing apparatus according to appendix 1, wherein a color at the interpolation position is determined based on a comparison result, a comparison result of a plurality of distances, and colors of the plurality of pixels.
(Appendix 5)
A plurality of processes adjacent to the interpolation position that calculate the depth at the interpolation position and the distance to the edge of the graphic based on the depth of a pixel adjacent to the interpolation position and the distance to the edge of the graphic including the pixel. To obtain a plurality of depths and a plurality of distances at the interpolation position,
Determining an interpolation color at the interpolation position based on the plurality of depths, the plurality of distances, and the colors of the plurality of pixels;
Including each step of obtaining a new color of the one pixel of interest by mixing the interpolation color determined for a plurality of interpolation positions adjacent to the position of one pixel of interest and the color of the one pixel of interest An image processing method characterized by the above.
(Appendix 6)
The step of determining the interpolation color includes combining the colors of the plurality of pixels according to a ratio of the plurality of distances when the plurality of distances are all negative values, and the plurality of distances are all negative values. Otherwise, the smallest depth among the plurality of distances corresponding to a non-negative value among the plurality of distances is obtained, and the smallest depth among the plurality of pixels is handled. 6. The image processing method according to appendix 5, wherein a color of a pixel to be processed is a color at the interpolation position.
(Appendix 7)
Memory,
An image drawing unit that calculates a pixel color, a depth, and a distance to an edge of a graphic including the pixel for each pixel, and stores the calculated image in the memory;
A process of reading the depth and the distance from the memory and obtaining a depth and a distance at the interpolation position based on the depth and the distance of a pixel adjacent to the interpolation position. An interpolation unit that obtains a plurality of depths and a plurality of distances at the interpolation position,
Pixel color determination for determining the color at the interpolation position based on the pixel color read from the memory for the plurality of pixels and the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit And
A pixel for obtaining a new color of the one pixel of interest by mixing the color determined by the pixel color determination unit and the color of the pixel of interest for a plurality of interpolation positions adjacent to the position of one pixel of interest A color mixing section;
An image system comprising: an image display unit that displays an image composed of pixels having a pixel color obtained by the pixel color mixing unit.

10 グラフィクス処理回路
11 アンチエイリアス回路
12 フレームバッファ
13 ディスプレイ装置
21 頂点バッファ
22 座標変換・ライティング処理部
23 頂点後処理部
24 ラスタライズ処理部
25 画素処理部
26 画素後処理部
27 メモリアクセス部
28 テクスチャユニット
29 距離情報算出部
31 奥行き・距離補間部
32 奥行き・距離比較部
33 画素色決定部
34 画素ブレンド部
DESCRIPTION OF SYMBOLS 10 Graphics processing circuit 11 Anti-aliasing circuit 12 Frame buffer 13 Display apparatus 21 Vertex buffer 22 Coordinate conversion / lighting processing unit 23 Vertex post-processing unit 24 Rasterization processing unit 25 Pixel processing unit 26 Pixel post-processing unit 27 Memory access unit 28 Texture unit 29 Distance Information calculation unit 31 Depth / distance interpolation unit 32 Depth / distance comparison unit 33 Pixel color determination unit 34 Pixel blending unit

Claims (5)

補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求める補間部と、
前記複数の画素の色及び前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とに基づいて、前記補間位置における色を決定する画素色決定部と
を含むことを特徴とする画像処理装置。
A plurality of processes adjacent to the interpolation position that calculate the depth at the interpolation position and the distance to the edge of the graphic based on the depth of a pixel adjacent to the interpolation position and the distance to the edge of the graphic including the pixel. An interpolation unit that calculates a plurality of depths and a plurality of distances at the interpolation position by executing each of the pixels;
A pixel color determination unit that determines colors at the interpolation position based on the colors of the plurality of pixels and the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit. An image processing apparatus.
1つの着目画素の位置に隣接する複数の補間位置について前記画素色決定部が決定した色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める画素色混合部を更に含むことを特徴とする請求項1記載の画像処理装置。   A pixel for obtaining a new color of the one pixel of interest by mixing the color determined by the pixel color determination unit and the color of the pixel of interest for a plurality of interpolation positions adjacent to the position of one pixel of interest The image processing apparatus according to claim 1, further comprising a color mixing unit. 前記画素色決定部は、前記複数の距離が全て負の値の場合には前記複数の距離の比に応じて前記複数の画素の色を合成し、前記複数の距離が全て負の値である以外の場合には、前記複数の距離のうちで負の値以外のものに対応する前記複数の奥行きのうちで最も小さいものを求め、前記複数の画素のうちで該最も小さい奥行きに対応する画素の色を前記補間位置における色とすることを特徴とする請求項1又は2記載の画像処理装置。   The pixel color determining unit combines the colors of the plurality of pixels according to a ratio of the plurality of distances when the plurality of distances are all negative values, and the plurality of distances are all negative values. Otherwise, the smallest one of the plurality of depths corresponding to a non-negative value among the plurality of distances is obtained, and the pixel corresponding to the smallest depth among the plurality of pixels. The image processing apparatus according to claim 1, wherein the color is a color at the interpolation position. 前記補間部が求めた前記補間位置における前記複数の奥行きと前記複数の距離とを前記複数の画素間で比較する比較部を更に含み、前記画素色決定部は、前記比較部による複数の奥行きの比較結果と複数の距離の比較結果と、前記複数の画素の色とに基づいて、前記補間位置における色を決定することを特徴とする請求項1記載の画像処理装置。   The comparison unit further includes a comparison unit that compares the plurality of depths and the plurality of distances at the interpolation position obtained by the interpolation unit between the plurality of pixels, and the pixel color determination unit includes a plurality of depths by the comparison unit. The image processing apparatus according to claim 1, wherein a color at the interpolation position is determined based on a comparison result, a comparison result of a plurality of distances, and colors of the plurality of pixels. 補間位置に隣接するある画素の奥行きと該画素が含まれる図形の端までの距離とに基づいて前記補間位置における奥行きと前記図形の端までの距離とを求める処理を前記補間位置に隣接する複数の画素のそれぞれに対して実行することにより、前記補間位置における複数の奥行きと複数の距離とを求め、
前記複数の奥行きと、前記複数の距離と、前記複数の画素の色とに基づいて、前記補間位置における補間色を決定し、
1つの着目画素の位置に隣接する複数の補間位置について決定した前記補間色と前記1つの着目画素の色とを混合することにより、前記1つの着目画素の新たな色を求める
各段階を含むことを特徴とする画像処理方法。
A plurality of processes adjacent to the interpolation position that calculate the depth at the interpolation position and the distance to the edge of the graphic based on the depth of a pixel adjacent to the interpolation position and the distance to the edge of the graphic including the pixel. To obtain a plurality of depths and a plurality of distances at the interpolation position,
Determining an interpolation color at the interpolation position based on the plurality of depths, the plurality of distances, and the colors of the plurality of pixels;
Including each step of obtaining a new color of the one pixel of interest by mixing the interpolation color determined for a plurality of interpolation positions adjacent to the position of one pixel of interest and the color of the one pixel of interest An image processing method characterized by the above.
JP2009175561A 2009-07-28 2009-07-28 Image processing device and image processing method Withdrawn JP2011028641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009175561A JP2011028641A (en) 2009-07-28 2009-07-28 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009175561A JP2011028641A (en) 2009-07-28 2009-07-28 Image processing device and image processing method

Publications (1)

Publication Number Publication Date
JP2011028641A true JP2011028641A (en) 2011-02-10

Family

ID=43637286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009175561A Withdrawn JP2011028641A (en) 2009-07-28 2009-07-28 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP2011028641A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186786A (en) * 2010-03-09 2011-09-22 Fujitsu Ltd Graphic drawing device and method
WO2013105562A1 (en) * 2012-01-10 2013-07-18 シャープ株式会社 Image processing device, image processing method, image processing program, image capture device, and image display device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186786A (en) * 2010-03-09 2011-09-22 Fujitsu Ltd Graphic drawing device and method
WO2013105562A1 (en) * 2012-01-10 2013-07-18 シャープ株式会社 Image processing device, image processing method, image processing program, image capture device, and image display device

Similar Documents

Publication Publication Date Title
KR101862182B1 (en) Varying effective resolution by screen location by altering rasterization parameters
EP3129973B1 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
JP4713591B2 (en) Method and system for anti-aliasing by pixel sampling
EP3129974B1 (en) Gradient adjustment for texture mapping to non-orthonormal grid
JP4327105B2 (en) Drawing method, image generation apparatus, and electronic information device
JP4937359B2 (en) Graphic drawing apparatus and graphic drawing method
JP4456003B2 (en) Low cost supersampling rasterization
JP4801088B2 (en) Pixel sampling method and apparatus
JP4183082B2 (en) 3D image drawing apparatus and 3D image drawing method
JP2011028641A (en) Image processing device and image processing method
JP5159949B2 (en) Vector drawing equipment
JP3872056B2 (en) Drawing method
JP4325812B2 (en) Vector image drawing circuit and vector image drawing method
US20160321835A1 (en) Image processing device, image processing method, and display device
JP4766576B2 (en) Drawing method, image generation apparatus, and electronic information device
JP4669334B2 (en) Edge multi-sampling hybrid anti-aliasing
JPH08235380A (en) Method and device for displaying polyhedron
JP2014174867A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20121002