JP5665902B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP5665902B2
JP5665902B2 JP2013054190A JP2013054190A JP5665902B2 JP 5665902 B2 JP5665902 B2 JP 5665902B2 JP 2013054190 A JP2013054190 A JP 2013054190A JP 2013054190 A JP2013054190 A JP 2013054190A JP 5665902 B2 JP5665902 B2 JP 5665902B2
Authority
JP
Japan
Prior art keywords
intersection
span
graphic
information
pixel
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.)
Active
Application number
JP2013054190A
Other languages
Japanese (ja)
Other versions
JP2014179031A (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.)
TAKUMI
Original Assignee
TAKUMI
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 TAKUMI filed Critical TAKUMI
Priority to JP2013054190A priority Critical patent/JP5665902B2/en
Publication of JP2014179031A publication Critical patent/JP2014179031A/en
Application granted granted Critical
Publication of JP5665902B2 publication Critical patent/JP5665902B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、ベクタグラフィックス処理に関する。   The present invention relates to vector graphics processing.

ベクタグラフィックス、あるいは2次元コンピュータグラフィックスを処理する画像処理では、画像処理装置が重なりあう図形を描画する場合、重なりの一番下の図形から上の図形にむかって順番に描画する。   In image processing for processing vector graphics or two-dimensional computer graphics, when an image processing apparatus draws overlapping figures, it draws in order from the lowest overlapping figure to the upper figure.

特開2006−221418号公報JP 2006-221418 A

従来の技術では、この手法で下の図形を描画する時点ではどの部分が上の図形により隠蔽されるかが不明であるため、画像処理装置は、隠蔽される図形のピクセル(画素)に対しても描画のための処理を実行する。本発明の課題は、ベクタグラフィックス、あるいは2次元コンピュータグラフィックスを処理する画像処理において、重なりあう図形を描画する処理を効率化することにある。   In the conventional technology, since it is unclear which part is hidden by the upper figure at the time of drawing the lower figure by this method, the image processing apparatus applies the pixel (pixel) of the figure to be hidden. Also performs processing for drawing. An object of the present invention is to improve the efficiency of drawing overlapping graphics in image processing for processing vector graphics or two-dimensional computer graphics.

本発明の実施形態の1つの側面は、画像処理装置によって例示される。本画像処理装置は、図形の境界線と画像の走査線方向の画素の並びとの交点の位置、および図形と他の図形との階層関係を示すレイヤ情報を含む交点情報を生成する交点生成部と、階層関係における上位レイヤの図形の存在範囲を除外して、画像の走査線に交差する図形の一方の境界線と走査線との交点(始点)から、図形の他方の境界線と走査線との交点(終点)までの間に含まれる画素の集合であるスパンを生成するスパン生成部と、を備える。   One aspect of embodiments of the present invention is illustrated by an image processing device. The image processing apparatus generates an intersection generation unit that generates intersection information including a position of an intersection between a boundary line of a graphic and an arrangement of pixels in the scanning line direction of the image, and layer information indicating a hierarchical relationship between the graphic and another graphic. And the other boundary line of the figure and the scanning line from the intersection (starting point) of one boundary line and the scanning line of the figure that intersects the scanning line of the image, excluding the existence range of the upper layer figure in the hierarchical relationship A span generation unit that generates a span, which is a set of pixels included up to the intersection (end point).

本画像処理装置によれば、ベクタグラフィックス、あるいは2次元コンピュータグラフィックスを処理する画像処理において、重なりあう図形を描画する処理を効率化することができる。   According to this image processing apparatus, it is possible to improve the efficiency of drawing overlapping graphics in image processing for processing vector graphics or two-dimensional computer graphics.

比較例の画像処理装置の処理例である。It is an example of a process of the image processing apparatus of a comparative example. 比較例に係る画像処理装置を含む情報処理装置の構成を例示する図である。It is a figure which illustrates the structure of the information processing apparatus containing the image processing apparatus which concerns on a comparative example. エッジ情報の構成を例示する図である。It is a figure which illustrates the composition of edge information. スパン情報の構成を例示する図である。It is a figure which illustrates the structure of span information. 画像処理装置による処理対象を例示する図である。It is a figure which illustrates the processing target by an image processing device. 比較例に係る交点バッファのフォーマット例である。It is a format example of the intersection buffer which concerns on a comparative example. 1つのピクセルを4×4のサブピクセルに分割した場合のカバー値を例示する図である。It is a figure which illustrates the cover value at the time of dividing one pixel into 4x4 subpixels. 交点バッファの構成を例示する図である。It is a figure which illustrates the structure of an intersection buffer. カバー値情報を加算する処理を例示する図である。It is a figure which illustrates the process which adds cover value information. 交点Xの右側に隣接する座標(X+1)のピクセルのカバー値情報の算出を例示する図である。6 is a diagram illustrating calculation of cover value information of a pixel at coordinates (X + 1) adjacent to the right side of an intersection point X. FIG. カバー値情報を減算する処理を例示する図である。It is a figure which illustrates the process which subtracts cover value information. カバー値情報の例である。It is an example of cover value information. スパン生成処理を例示する図である。It is a figure which illustrates a span production | generation process. レイヤ付き交点情報の交点バッファ上のフォーマットを例示する図である。It is a figure which illustrates the format on the intersection buffer of intersection information with a layer. 実施例に係る画像処理装置を含む情報処理装置の構成を例示する図である。It is a figure which illustrates the structure of the information processing apparatus containing the image processing apparatus which concerns on an Example. 実施例に係るスパン生成処理のフローチャートを例示する図である。It is a figure which illustrates the flowchart of the span production | generation process which concerns on an Example. 交点処理の詳細を例示する図である。It is a figure which illustrates the detail of an intersection process. スパン計算の詳細を例示する図である。It is a figure which illustrates the detail of span calculation. 変形例に係るスパン計算の詳細を例示する図である。It is a figure which illustrates the detail of the span calculation which concerns on a modification.

以下、図面を参照して、一実施形態に係る画像処理装置について説明する。以下の実施形態の構成は例示であり、本装置は実施形態の構成には限定されない。   Hereinafter, an image processing apparatus according to an embodiment will be described with reference to the drawings. The configuration of the following embodiment is an exemplification, and the present apparatus is not limited to the configuration of the embodiment.

[比較例]
図1から図13を参照して、比較例に係る画像処理装置を説明する。図1は、比較例の画像処理装置101の処理例である。図1(A)は、画像処理装置101を含むコンピュータの表示装置に表示される図形の例である。図1(A)では、上層の図形と、下層の図形が一部重なりあって表示されている。
[Comparative example]
An image processing apparatus according to a comparative example will be described with reference to FIGS. FIG. 1 is a processing example of the image processing apparatus 101 of the comparative example. FIG. 1A is an example of a graphic displayed on a display device of a computer including the image processing device 101. In FIG. 1A, the upper layer graphic and the lower layer graphic are partially overlapped and displayed.

図1(B)は、画像処理装置101によるピクセル(画素)の生成例である。画像処理装置101は、図1(A)の画像を表示装置に表示するため、それぞれの図形のピクセルを生成する。下層の図形のピクセル生成の際、画像処理装置101は、上層の図形と、下層の図形が一部重なりあっていることを認識しないで、下層の図形から順番に図形のピクセルを生成する。このため、画像処理装置101は、下層の図形において、上層の図形によって隠された隠面に対しても、ピクセルを生成する。   FIG. 1B is an example of pixel generation by the image processing apparatus 101. The image processing apparatus 101 generates pixels of each figure in order to display the image of FIG. When generating pixels for the lower layer graphic, the image processing apparatus 101 does not recognize that the upper layer graphic partially overlaps with the lower layer graphic, and generates graphic pixels in order from the lower layer graphic. For this reason, the image processing apparatus 101 generates pixels even in the hidden surface hidden by the upper layer graphic in the lower layer graphic.

図2は、画像処理装置101を含む情報処理装置の構成を例示する図である。情報処理装置は、画像処理装置101の他に、例えば、CPU102を含む。CPU102は、例えば、画像処理プログラムを実行し、図形情報を画像処理装置101に引き渡す。図形情報は、例えば、多角形、幅情報を含む線等である。   FIG. 2 is a diagram illustrating a configuration of an information processing apparatus including the image processing apparatus 101. The information processing apparatus includes, for example, a CPU 102 in addition to the image processing apparatus 101. For example, the CPU 102 executes an image processing program and delivers graphic information to the image processing apparatus 101. The graphic information is, for example, a polygon, a line including width information, or the like.

画像処理装置101は、エッジ生成部112、シーケンサ113、交点生成部114、ソータ115、スパン生成部116、交点バッファ117、ラスタライザ118、およびピクセル処理部119を含む。   The image processing apparatus 101 includes an edge generation unit 112, a sequencer 113, an intersection generation unit 114, a sorter 115, a span generation unit 116, an intersection buffer 117, a rasterizer 118, and a pixel processing unit 119.

エッジ生成部112は、CPU102から図形情報を受け取り、エッジ情報を生成する。エッジ生成部112は、生成したエッジ情報を図示しないバッファに出力する。なお、バッファは、シーケンサ113によって制御されるため、図2では便宜的に、エッジ生成部112からシーケンサ113にエッジ情報が引き渡されている。エッジ生成部112は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。   The edge generation unit 112 receives graphic information from the CPU 102 and generates edge information. The edge generation unit 112 outputs the generated edge information to a buffer (not shown). Since the buffer is controlled by the sequencer 113, the edge information is handed over from the edge generation unit 112 to the sequencer 113 in FIG. The edge generation unit 112 may be, for example, a DSP that executes a program or a dedicated hardware circuit.

シーケンサ113は、交点生成部114、ソータ115、およびスパン生成部116を制御する。シーケンサ113は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。エッジ情報が引き渡されると、シーケンサ113は、交点生成部114を起動する。ただし、エッジ生成部112と交点生成部114とは、例えば、エッジ情報を格納するバッファを通じて、エッジ情報を授受できればよい。したがって、1つの図形、例えば、多角形中の1つのエッジ情報を生成する度に、エッ
ジ情報が交点生成部114に引き渡されるようにしてもよい。つまり、1つの図形の処理において、エッジ生成部112と交点生成部114とは、並列に処理を実行してもよい。
The sequencer 113 controls the intersection generation unit 114, the sorter 115, and the span generation unit 116. The sequencer 113 may be, for example, a DSP that executes a program or a dedicated hardware circuit. When the edge information is handed over, the sequencer 113 activates the intersection generation unit 114. However, the edge generation unit 112 and the intersection generation unit 114 only need to be able to exchange edge information through, for example, a buffer that stores edge information. Accordingly, the edge information may be delivered to the intersection generation unit 114 every time one piece of edge information in one figure, for example, a polygon is generated. That is, in the processing of one figure, the edge generation unit 112 and the intersection generation unit 114 may execute processing in parallel.

交点生成部114は、エッジ生成部112が出力したエッジ情報を基に、交点情報を生成する。ここで、交点情報とは、エッジ生成部112が出力したエッジ情報と、画像の水平線との交点である。画像の水平線は、画像中のピクセルの水平方向の並びであり、走査線ともいう。   The intersection generation unit 114 generates intersection information based on the edge information output from the edge generation unit 112. Here, the intersection information is an intersection of the edge information output from the edge generation unit 112 and the horizontal line of the image. The horizontal line of the image is a horizontal arrangement of pixels in the image, and is also called a scanning line.

つまり、交点情報とは、CPU102が出力した図形の境界線と走査線との交点の情報である。交点生成部114は、生成した交点情報を交点バッファ117に出力する。交点生成部114が例えば、1まとまりの図形に対する交点情報を交点バッファ117に出力すると、シーケンサ113は、ソータ115を起動する。   That is, the intersection information is information on the intersection between the boundary line of the graphic output by the CPU 102 and the scanning line. The intersection generation unit 114 outputs the generated intersection information to the intersection buffer 117. For example, when the intersection generation unit 114 outputs the intersection information for a single figure to the intersection buffer 117, the sequencer 113 activates the sorter 115.

ソータ115は、交点バッファ上の交点情報を走査線(例えば、表示される図形のY座標)、X座標をキーに並べ替える。ソータ115は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。ソータ115による並べ替えが完了すると、シーケンサ113は、スパン生成部116を起動する。   The sorter 115 rearranges the intersection information on the intersection buffer using the scanning line (for example, the Y coordinate of the displayed graphic) and the X coordinate as the key. The sorter 115 may be, for example, a DSP that executes a program or a dedicated hardware circuit. When the sorting by the sorter 115 is completed, the sequencer 113 activates the span generator 116.

スパン生成部116は、並べ替えが完了した交点バッファ117の交点情報から、スパン情報を生成する。スパン生成部116は、生成したスパン情報をラスタライザ118に引き渡す。スパン生成部116は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。   The span generator 116 generates span information from the intersection information of the intersection buffer 117 that has been rearranged. The span generator 116 delivers the generated span information to the rasterizer 118. The span generator 116 may be, for example, a DSP that executes a program or a dedicated hardware circuit.

ラスタライザ118は、スパン情報からピクセル情報を生成する。ラスタライザ118は、生成したピクセル情報をピクセル処理部119に引き渡す。ラスタライザ118は、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。ピクセル処理部119は、ピクセル情報から図示しない表示装置を制御する表示装置の制御情報を生成し、表示装置に出力する。   The rasterizer 118 generates pixel information from the span information. The rasterizer 118 delivers the generated pixel information to the pixel processing unit 119. The rasterizer 118 may be a DSP that executes a program, or may be a dedicated hardware circuit. The pixel processing unit 119 generates control information for a display device that controls a display device (not shown) from the pixel information, and outputs the control information to the display device.

なお、図2の説明では、シーケンサ113が、交点生成部114の処理終了後ソータ115を起動し、ソータ115の処理終了後スパン生成部116を起動するものとして説明した。しかし、交点生成部114が交点生成部114の処理終了後ソータ115を起動し、ソータ115がソータ115の処理終了後スパン生成部116を起動してもよい。   In the description of FIG. 2, the sequencer 113 has been described as starting the sorter 115 after the processing of the intersection generation unit 114 is completed and starting the span generation unit 116 after the processing of the sorter 115 is completed. However, the intersection generation unit 114 may activate the sorter 115 after the processing of the intersection generation unit 114 ends, and the sorter 115 may activate the span generation unit 116 after the processing of the sorter 115 ends.

(エッジ情報とスパン情報)
図3に、エッジ情報の構成を例示する。図3のように、エッジ情報は、例えば、エッジ上端のY座標(YTOP)、エッジ下端のY座標(YBottom)、エッジ上端のX座標(XTOP)、Y座標が1行変化したときのX座標の増(減)分(DeltaX)、エッジの向き(Dir)を有す
る。ここで、エッジの向き(Dir)は、エッジが上向きか下向きかを示す。ただし、図形
の内部は、エッジの向きにエッジに沿って移動したときの進行方向の右側(または左側)に定義される。したがって、エッジの向きが図形の内部がエッジの右側に存在するか、右側に存在するかを定義している、ということもできる。
(Edge information and span information)
FIG. 3 illustrates the configuration of edge information. As shown in FIG. 3, the edge information includes, for example, the Y coordinate (YTOP) of the upper edge of the edge, the Y coordinate (YBottom) of the lower edge of the edge, the X coordinate (XTOP) of the upper edge of the edge, and the X coordinate when the Y coordinate changes by one line. Increase (decrease) amount (DeltaX) and edge direction (Dir). Here, the direction of the edge (Dir) indicates whether the edge is upward or downward. However, the inside of the figure is defined on the right side (or left side) of the traveling direction when moving along the edge in the direction of the edge. Therefore, it can be said that the direction of the edge defines whether the inside of the figure is on the right side or the right side of the edge.

図4にスパン情報の構成を例示する。スパンとは、例えば、画像の走査線、例えば、水平方向のピクセルの並びのうち、走査線が1つの図形と交差する部分に相当する。スパン情報は、スパン両端を定義する。図4のように、スパン情報は、スパンのY座標(Y)、
スパンの左端のX座標(XLeft)、スパンの右端のX座標(XRight)、およびスパンのカバー
値(Cover)を含む。カバー値とは、エッジが通過するピクセルにおいて、エッジが通過す
る部分の当該ピクセルに対する比率をいう。例えば、カバー値0は、エッジがピクセルを通過しないことを意味する。一方、カバー値1は、エッジがそのピクセルの全体を被覆し
て通過することをいう。一方、カバー値が0から1の間の値のとき、エッジがそのピクセルの一部を被覆して通過することをいう。スパン情報は、例えば、カバー値ごとに出力される。
FIG. 4 illustrates the configuration of span information. A span corresponds to, for example, a portion where a scanning line intersects one figure in a scanning line of an image, for example, a horizontal pixel array. The span information defines both ends of the span. As shown in FIG. 4, the span information includes the Y coordinate (Y) of the span,
The X coordinate (XLeft) of the left end of the span, the X coordinate (XRight) of the right end of the span, and the cover value (Cover) of the span are included. The cover value refers to a ratio of a portion through which an edge passes to a pixel through which the edge passes. For example, a cover value of 0 means that no edge passes through the pixel. On the other hand, a cover value of 1 means that the edge passes through the entire pixel. On the other hand, when the cover value is a value between 0 and 1, it means that the edge passes covering a part of the pixel. The span information is output for each cover value, for example.

(交点生成部114の処理)
図5から図8により、交点生成部114の処理を例示する。図5は、画像処理装置101による処理対象を例示する。図5には、円形環状パターンが例示されている。また、円形環状パターンと交差する水平線が例示されている。円形環状パターンの境界線と水平線との間に、4つの交点が形成される。
(Processing of intersection generation unit 114)
The process of the intersection generation unit 114 is illustrated with reference to FIGS. FIG. 5 illustrates a processing target by the image processing apparatus 101. FIG. 5 illustrates a circular annular pattern. Moreover, the horizontal line which cross | intersects a circular annular pattern is illustrated. Four intersection points are formed between the boundary line of the circular annular pattern and the horizontal line.

図2に例示したように、CPU102上のアプリケーションプログラムは、例えば、図5のような図形をエッジ生成部112に引き渡す。エッジ生成部112は、円形環状パターンで例示される図形境界線を直線近似した微小直線(エッジ)を生成し、交点生成部114に引き渡す。交点生成部114は、エッジと水平線が交差する交点情報を交点バッファ117に保存する。なお、図5のような外形が曲線の図形ではなく、外形が直線の辺を含む多角形の図形については、直線の辺がそのままエッジとなる。   As illustrated in FIG. 2, the application program on the CPU 102 delivers, for example, a graphic as illustrated in FIG. 5 to the edge generation unit 112. The edge generation unit 112 generates a minute straight line (edge) obtained by linear approximation of a figure boundary line exemplified by a circular annular pattern, and passes it to the intersection generation unit 114. The intersection generation unit 114 stores, in the intersection buffer 117, intersection information at which the edge and the horizontal line intersect. Note that, in the case of a polygonal figure whose outer shape includes a straight side instead of a curved shape as shown in FIG. 5, the straight side becomes an edge as it is.

交点生成部114は、図形のエッジが水平線と交差する箇所について、交差したピクセルのX座標、エッジがピクセルをどれだけカバーしたかを示す情報(カバー値情報)、およびエッジの向き(Dir)を1つの交点情報として保存する。   The intersection generation unit 114 obtains the X coordinate of the intersected pixel, the information indicating how much the edge has covered the pixel (cover value information), and the direction of the edge (Dir) at the location where the edge of the figure intersects the horizontal line. Save as one intersection information.

図6は、1つのピクセルを4×4のサブピクセルに分割した場合の1交点当たりの交点情報を格納する交点バッファのフォーマット例である。図6では、交点情報は、カバー値情報(Mark1[0:3]、Mark2[0:3]、Mark3[0:3]、Mark4[0:3])、向き(Dir)、予備(Reserved)、およびX座標を含む。   FIG. 6 is an example of a format of an intersection buffer that stores intersection information per intersection when one pixel is divided into 4 × 4 subpixels. In FIG. 6, the intersection information includes cover value information (Mark1 [0: 3], Mark2 [0: 3], Mark3 [0: 3], Mark4 [0: 3]), direction (Dir), and reserved (Reserved). , And X coordinates.

図7は、ピクセルとエッジとの交点で交点情報を取り出すとき、1つのピクセルを4×4のサブピクセルに分割した場合のカバー値情報の例である。Mark1[0:3]、Mark2[0:3]、Mark3[0:3]、Mark4[0:3]は、それぞれ4ビットを有し、エッジによって各サブピクセルがカバーされるか否か、つまり、各サブピクセルが図形の内部に含まれるか否かを示す。交点生成部114は、各交点において、エッジに対して図形外側のサブピクセルに対応するカバー値情報のビットに0を設定し、エッジに対して図形内側のサブピクセルに対応するカバー値情報のビットに1を設定する。   FIG. 7 is an example of the cover value information when one pixel is divided into 4 × 4 subpixels when the intersection information is extracted at the intersection of the pixel and the edge. Mark1 [0: 3], Mark2 [0: 3], Mark3 [0: 3], Mark4 [0: 3] each have 4 bits, and whether or not each subpixel is covered by an edge, that is, , Indicates whether each sub-pixel is included in the figure. The intersection generation unit 114 sets 0 to the bit of the cover value information corresponding to the subpixel outside the graphic with respect to the edge at each intersection, and the bit of the cover value information corresponding to the subpixel inside the graphic with respect to the edge Set 1 to.

スパン生成部116は、スパン生成時、カバー値情報を基に、ピクセル全体のカバー値を算出する。カバー値1は、ピクセルが完全にエッジの内側にカバーされることを示す。つまり、カバー値1のピクセルは、図形内部に完全包含されるピクセルを示す。図7の例では、エッジが上向きであるので、エッジの右側に存在するサブピクセルに対応する各ビットに1が設定されている。さらに、同一図形内で重なりがある場合には、エッジの重なりが発生する。スパン生成部116は、同一座標においてエッジの重なりが重なる場合のカバー値情報を算出するためのカウンタを有している。例えば、スパン生成部116が16ビット長のカウンタをサブピクセル数用いると、同一座標における各サブピクセルにおいて、65535個のエッジの重なりの度合いを算出できる。   The span generator 116 calculates the cover value of the entire pixel based on the cover value information when generating the span. A cover value of 1 indicates that the pixel is completely covered inside the edge. That is, a pixel with a cover value of 1 indicates a pixel that is completely contained within the figure. In the example of FIG. 7, since the edge is upward, 1 is set to each bit corresponding to the sub-pixel existing on the right side of the edge. Further, when there is an overlap in the same figure, an edge overlap occurs. The span generator 116 has a counter for calculating cover value information when edges overlap at the same coordinates. For example, when the span generator 116 uses a 16-bit counter with the number of subpixels, the degree of overlap of 65535 edges can be calculated for each subpixel at the same coordinate.

また、図6において、交点バッファ上の向き(Dir)は、エッジが交点を上向きに通過
するか、下向きに通過するかを示す。本実施形態では、例えば、エッジが交点を上向きに通過するとき、交点の右側に図形の内部が存在するものと定義される。ただし、CPU102、図形処理装置101を含む情報処理装置内で統一されている限り、向きの定義は逆であっても構わない。つまり、エッジが交点を上向きに通過するとき、交点の左側に図形の内部が存在するものと定義してもよい。さらに、図6において、X座標は、水平線上の
位置を示す情報である。X座標は、例えば、左から右に並ぶピクセルの通し番号で例示できる。
In FIG. 6, the direction (Dir) on the intersection buffer indicates whether the edge passes upward or downward through the intersection. In the present embodiment, for example, when the edge passes upward through the intersection, it is defined that the inside of the graphic exists on the right side of the intersection. However, as long as it is unified within the information processing apparatus including the CPU 102 and the graphic processing apparatus 101, the definition of the direction may be reversed. That is, when the edge passes upward through the intersection, it may be defined that the inside of the figure exists on the left side of the intersection. Further, in FIG. 6, the X coordinate is information indicating a position on the horizontal line. The X coordinate can be exemplified by, for example, serial numbers of pixels arranged from left to right.

図8は、交点バッファの構成を例示する図である。本実施形態では、各水平線に対して、用意される交点情報の配列である。図8の各矩形内に、図6の交点バッファのフォーマット形式で、交点情報が格納される。   FIG. 8 is a diagram illustrating the configuration of the intersection buffer. In the present embodiment, it is an array of intersection information prepared for each horizontal line. Intersection information is stored in each rectangle of FIG. 8 in the format of the intersection buffer of FIG.

図8の縦方向の並び(0〜H−1)は、水平線、つまり走査線の番号を示す。一方、横方向の並び(0〜k−1)は、各水平線ごとの交点バッファの集合を例示する。図8の例では、各水平線ごとに、k個の交点バッファの配列のエントリが用意される。交点生成部114は、図6のような水平線とエッジが交差する箇所を特定する度に、各水平線の交点配列の空きエントリに、配列の左から順に交点情報を図6のフォーマットで追加する。   The vertical arrangement (0 to H-1) in FIG. 8 indicates the number of the horizontal line, that is, the scanning line. On the other hand, the horizontal arrangement (0 to k−1) illustrates a set of intersection buffers for each horizontal line. In the example of FIG. 8, an entry of an array of k intersection buffers is prepared for each horizontal line. The intersection generation unit 114 adds intersection information in the format of FIG. 6 in order from the left of the array to the empty entry of the intersection array of each horizontal line every time the location where the horizontal line and the edge intersect as shown in FIG. 6 is specified.

なお、図2に例示したソータ115は、図6、図8で例示される交点バッファ上の交点情報の配列を各水平線(1〜H−1)において、X座標により並べ替えて再度交点バッファ117に保存する。   The sorter 115 illustrated in FIG. 2 rearranges the array of intersection information on the intersection buffer illustrated in FIGS. 6 and 8 by the X coordinate on each horizontal line (1 to H−1) and again intersects the buffer 117. Save to.

以下、図9から図13により、スパン生成部116の処理を例示する。
(スパン生成部116によるカバー値情報の計算)
図9から図11は、スパン生成部116によるカバー値情報の計算手順を例示する図である。スパン生成部116はソート後の各水平線上の交点情報の配列の先頭より交点情報を取り出す。そして、スパン生成部116は現在のカバー値情報と取り出した交点情報のカバー値情報とを加算または減算して交点のカバー値を求める。スパン生成部116は加算するか減算するかはエッジの向き(Dir)により決定する。本実施形態では、上向きが加
算、下向きが減算とする。本実施形態では、エッジが上向きの場合に、図形の内部がエッジの右側に存在すると定義されているからである。図9にカバー値情報を加算する処理を例示する。カバー値は、ピクセル内のサブピクセルに対応する各ワードのエントリ(Marki[j],i=1,4,j=0,3)ごとに加算される。
Hereinafter, the processing of the span generator 116 will be exemplified with reference to FIGS. 9 to 13.
(Calculation of cover value information by the span generator 116)
FIGS. 9 to 11 are diagrams illustrating an example of the procedure for calculating the cover value information by the span generator 116. The span generator 116 extracts intersection information from the head of the array of intersection information on each horizontal line after sorting. Then, the span generation unit 116 adds or subtracts the current cover value information and the cover value information of the extracted intersection information to obtain the intersection cover value. The span generator 116 determines whether to add or subtract based on the edge direction (Dir). In this embodiment, the upward direction is addition and the downward direction is subtraction. This is because, in the present embodiment, it is defined that the inside of the graphic exists on the right side of the edge when the edge is upward. FIG. 9 illustrates a process of adding cover value information. The cover value is added for each word entry (Marki [j], i = 1, 4, j = 0, 3) corresponding to the sub-pixel in the pixel.

図10に、交点Xの右側に隣接する座標(X+1)のピクセルのカバー値情報の算出を例示する。図10の例では、交点の次の座標X+1のピクセルのカバー値情報は交点のサ
ブピクセルのうち、座標X+1のピクセルの左側に隣接する縦方向の1列(4サブピクセ
ル)をそのまま右側に4列コピーしたものである。なお、交点Xの次の座標X+1に、さ
らに交点がある場合(交点が連続した場合)には、スパン生成部116は、上記の手順で交点Xのカバー値情報から算出された値に、さらにX+1座標の交点から算出されるカバ
ー値情報を加算する。
FIG. 10 illustrates calculation of cover value information of a pixel at coordinates (X + 1) adjacent to the right side of the intersection X. In the example of FIG. 10, the cover value information of the pixel at the coordinate X + 1 next to the intersection is the vertical one column (4 subpixels) adjacent to the left side of the pixel at the coordinate X + 1 among the subpixels at the intersection. A column copy. When there are further intersections at the next coordinate X + 1 of the intersection X (when the intersections are continuous), the span generator 116 further adds the value calculated from the cover value information of the intersection X in the above procedure. Cover value information calculated from the intersection of the X + 1 coordinates is added.

図11に、カバー値情報を減算する処理を例示する。カバー値は、ピクセル内のサブピクセルに対応する各ビットのエントリ(Marki[j],i=1,4,j=0,3)ごとに減算される。   FIG. 11 illustrates processing for subtracting cover value information. The cover value is subtracted for each bit entry (Marki [j], i = 1, 4, j = 0, 3) corresponding to the sub-pixel in the pixel.

スパン生成部116は、図9から図11の処理によって得られるカバー値情報を基に、所定のルールにしたがって、スパンのカバー値を算出する。例えば、図12のカバー値情報を例に、カバー値の算出結果を例示する。算出方法として、カバー値情報に含まれるサブピクセルのうち、ゼロでないサブピクセル数を数える方法(Non-zeroルール)が例示できる。Non-zeroルールによれば、図12の例では、カバー値は13/16=0.8125となる。また、例えば、サブピクセルのカバー値情報が奇数の数を数える方法(ODDルー
ル)では、図12のカバー値情報の場合、カバー値は6/16=0.375となる。
The span generator 116 calculates a span cover value according to a predetermined rule based on the cover value information obtained by the processes of FIGS. 9 to 11. For example, the cover value calculation result is illustrated by taking the cover value information of FIG. 12 as an example. As a calculation method, a method of counting the number of non-zero subpixels among the subpixels included in the cover value information (Non-zero rule) can be exemplified. According to the non-zero rule, the cover value is 13/16 = 0.8125 in the example of FIG. Further, for example, in the method (ODD rule) of counting an odd number of sub-pixel cover value information (ODD rule), in the case of the cover value information in FIG.

(スパンの生成)
図13に、スパン生成部116によるスパン生成処理を例示する。スパン生成部116
は、カバー値が0.0 でないピクセルのX座標をスパンの始点とする。そして、スパン生成部116は、次に現れるカバー値が0.0 となるピクセルのX座標-1(左隣)のピクセルを終点とする。スパン生成部116は、始点と終点を含むスパン情報を生成し、生成したスパン情報をラスタライザ118に出力する。
(Span generation)
FIG. 13 exemplifies span generation processing by the span generator 116. Span generator 116
Uses the X coordinate of a pixel whose cover value is not 0.0 as the start point of the span. Then, the span generator 116 sets the pixel at the X coordinate −1 (adjacent to the left) of the pixel whose cover value appears next to 0.0 as the end point. The span generator 116 generates span information including the start point and the end point, and outputs the generated span information to the rasterizer 118.

例えば、図13では、交点Aでカバー値1、交点B+1でカバー値0の場合、スパン生成部116は、交点Aを始点として、交点Bを終点とするスパン情報を生成する。交点Aから交点Bまでが、カバー値1のスパンとなる。   For example, in FIG. 13, when the cover value is 1 at the intersection A and the cover value is 0 at the intersection B + 1, the span generator 116 generates span information starting from the intersection A and ending at the intersection B. The span from the intersection point A to the intersection point B is the span of the cover value 1.

(問題点)
図6に例示した通り、交点バッファ117上の交点情報には、奥行き情報がない。例えば、図13のようなスパンが複数生成された場合、スパンとスパンとの間の上下関係が不明である。このような場合には、重なりあう複数の図形を描画する場合には、画像処理装置101は、一番下の図形から順に描画することを要求される。したがって、画像処理装置101は、後の段階で、上層に描画される図形によって隠れた下層の図形部分についても、スパン、さらにはピクセルを生成することになり、無駄な処理を実行することになる。
(problem)
As illustrated in FIG. 6, the intersection information on the intersection buffer 117 has no depth information. For example, when a plurality of spans as shown in FIG. 13 are generated, the vertical relationship between the spans is unknown. In such a case, when drawing a plurality of overlapping figures, the image processing apparatus 101 is required to draw in order from the bottom figure. Therefore, in the later stage, the image processing apparatus 101 generates a span and further a pixel for a lower-layer graphic portion hidden by a graphic drawn on the upper layer, and executes a useless process. .

図14から図18を参照して、実施例に係る画像処理装置1について説明する。上記比較例の問題点を解決するため、実施例の画像処理装置1は、交点情報にレイヤ番号を付加して保存する。レイヤ番号は、例えば、図形ごとに与えられる0から始まる整数である。実施例では、レイヤ番号が大きいほど図形の重ねあわせ、つまり図形間の階層関係で上位の図形とする。レイヤ番号は、例えば、CPU上のソフトウェアの処理で与えるものとしてもよい。   The image processing apparatus 1 according to the embodiment will be described with reference to FIGS. In order to solve the problem of the comparative example, the image processing apparatus 1 according to the embodiment adds a layer number to the intersection information and saves it. The layer number is an integer starting from 0 given for each figure, for example. In the embodiment, the higher the layer number, the higher the figure in the superposition of the figures, that is, the hierarchical relationship between the figures. The layer number may be given by software processing on the CPU, for example.

図14にレイヤ付き交点情報の交点バッファ上のフォーマットを例示する。図14のように、実施例の交点情報は、比較例の図16において、予備エリア(Reserved)が、レイヤ番号(Layer[3:0])となっている。図14の例では、レイヤ番号は4ワードで設定される。   FIG. 14 illustrates the format of the intersection information with layers on the intersection buffer. As shown in FIG. 14, in the intersection information of the embodiment, the reserved area (Reserved) is the layer number (Layer [3: 0]) in FIG. 16 of the comparative example. In the example of FIG. 14, the layer number is set with 4 words.

図15に、実施例に係る画像処理装置1と、CPU102とを含む情報処理装置の構成を例示する。画像処理装置1は、エッジ生成部12、シーケンサ13、交点生成部14、ソータ15、スパン生成部16、交点バッファ17、ラスタライザ18、およびピクセル処理部19を含む。エッジ生成部12、シーケンサ13、交点生成部14、ソータ15、スパン生成部16、交点バッファ17、ラスタライザ18、およびピクセル処理部19等は、例えば、コンピュータプログラムを実行するDSPであってもよい。また、例えば、ハードウェア記述言語によって画像処理装置1に含まれる各構成部分の処理を記述し、ハードウェア回路によって、各構成部分の処理を実行してもよい。また、画像処理装置1に含まれる各構成部分の処理うち、一部をDSPがコンピュータプログラムによって実行し、一部をハードウェア回路によって実行してもよい。   FIG. 15 illustrates a configuration of an information processing apparatus including the image processing apparatus 1 according to the embodiment and a CPU 102. The image processing apparatus 1 includes an edge generation unit 12, a sequencer 13, an intersection generation unit 14, a sorter 15, a span generation unit 16, an intersection buffer 17, a rasterizer 18, and a pixel processing unit 19. The edge generation unit 12, the sequencer 13, the intersection generation unit 14, the sorter 15, the span generation unit 16, the intersection buffer 17, the rasterizer 18, the pixel processing unit 19, and the like may be, for example, a DSP that executes a computer program. Further, for example, the processing of each component included in the image processing apparatus 1 may be described in a hardware description language, and the processing of each component may be executed by a hardware circuit. Further, part of the processing of each component included in the image processing apparatus 1 may be executed by the DSP using a computer program, and part of the processing may be executed by a hardware circuit.

実施例では、CPU102は、例えば、画像処理プログラムを実行し、図形情報とともに、レイヤ番号を含む情報を画像処理装置1に引き渡す。一方、シーケンサ13は、レジスタを有しており、現在処理中の図形のレイヤ番号を保持する。シーケンサ13は、例えば、図形情報の切り替わりごとに、レイヤ番号を交点生成部14に引き渡せばよい。交点生成部14は、生成した交点情報に、シーケンサ13から引き渡されたレイヤ番号を付与する。レイヤ番号を付与された交点情報は、交点バッファ17に保持される。スパン生成部16は、交点情報に付されたレイヤ番号によって、スパンの上下関係を判断しつつ、スパンを生成する。   In the embodiment, for example, the CPU 102 executes an image processing program and delivers information including a layer number to the image processing apparatus 1 together with graphic information. On the other hand, the sequencer 13 has a register and holds the layer number of the graphic currently being processed. For example, the sequencer 13 may pass the layer number to the intersection generation unit 14 every time the graphic information is switched. The intersection generation unit 14 assigns the layer number passed from the sequencer 13 to the generated intersection information. The intersection information given the layer number is held in the intersection buffer 17. The span generation unit 16 generates a span while determining the vertical relationship of the span based on the layer number attached to the intersection information.

一方、実施例のエッジ生成部12、ソータ15、ラスタライザ18、およびピクセル処理部19の処理は、それぞれ比較例のエッジ生成部112、ソータ115、ラスタライザ118、およびピクセル処理部119の処理と同様である。   On the other hand, the processing of the edge generation unit 12, sorter 15, rasterizer 18, and pixel processing unit 19 of the embodiment is the same as the processing of the edge generation unit 112, sorter 115, rasterizer 118, and pixel processing unit 119 of the comparative example, respectively. is there.

図16から図18によりスパン生成部16の処理を例示する。図16に、スパン生成部16が実行するスパン生成処理のフローチャートを例示する。図16の処理では、まず、スパン生成部16は、注目レイヤ番号を初期値設定する(S1)。注目レイヤ番号は、現在処理中のレイヤ番号を意味する。注目レイヤ番号の初期値は、例えば、最下層のレイヤを示す0である。   The processing of the span generator 16 is illustrated with reference to FIGS. FIG. 16 illustrates a flowchart of span generation processing executed by the span generation unit 16. In the process of FIG. 16, first, the span generation unit 16 sets an initial value for the attention layer number (S1). The attention layer number means the layer number currently being processed. The initial value of the attention layer number is, for example, 0 indicating the lowest layer.

次に、スパン生成部16は、水平線位置を初期値設定する(S2)。水平線位置とは、例えば、画像中のラスタの番号であり、図8の交点バッファ117の縦方向の番号(0〜H−1)で例示される。なお、実施例においても、交点バッファの構成は、比較例の図8と同様である。また、S2の処理とともに、スパン生成部16は、各レイヤのカバー値情報を0クリアする。すなわち、各レイヤには、エッジと重なりのない状態を示す初期値が設定される。   Next, the span generator 16 sets an initial value for the horizontal line position (S2). The horizontal line position is, for example, a raster number in the image, and is exemplified by a vertical number (0 to H-1) of the intersection buffer 117 in FIG. In the embodiment, the configuration of the intersection buffer is the same as that in FIG. 8 of the comparative example. Further, along with the process of S2, the span generator 16 clears the cover value information of each layer to zero. That is, an initial value indicating a state where there is no overlap with the edge is set for each layer.

次に、スパン生成部16は、現在処理中の水平線で交点バッファ読み出し初期位置を設定する(S3)。交点バッファ読み出し位置は、例えば、図8の交点バッファ117の横方向の番号(0〜k−1)で例示される。交点バッファ読み出し初期位置は、例えば、0である。   Next, the span generator 16 sets the intersection buffer read initial position on the horizontal line currently being processed (S3). The intersection buffer reading position is exemplified by the horizontal number (0 to k−1) of the intersection buffer 117 in FIG. 8, for example. The intersection buffer read initial position is 0, for example.

そして、スパン生成部16は、交点処理を実行する(S4)。交点処理は、水平線と図形エッジの交点座標において、エッジとピクセルとの関係を示すカバー値を算出するとともに、図形の水平線上の存在範囲を示すスパンを上位レイヤ優先で算出する処理である。S4の詳細は、図17、図18にしたがって、後述する。   And the span production | generation part 16 performs an intersection process (S4). The intersection process is a process of calculating a cover value indicating the relationship between the edge and the pixel at the intersection coordinates of the horizontal line and the graphic edge, and calculating a span indicating the existence range on the horizontal line of the graphic with higher layer priority. Details of S4 will be described later with reference to FIGS.

S4において1つの交点座標における処理を実行後、スパン生成部16は、現在の水平線に次の交点があるか否かを判定する(S5)。現在の水平線に次の交点がある場合、スパン生成部16は、制御をS4に戻す。一方、現在の水平線に次の交点がない場合、スパン生成部16は、水平線を更新するとともに、各レイヤのカバー値情報を0クリアする(S6)。そして、スパン生成部16は、全水平線の処理が終了したか否かを判定する(S7)。全水平線の処理が終了していない場合、スパン生成部16は、制御をS3に戻す。すなわち、スパン生成部16は、次の水平線で、交点バッファ読み出し初期位置から処理を実行する。   After executing the processing at one intersection point coordinate in S4, the span generator 16 determines whether or not there is a next intersection point on the current horizontal line (S5). If there is a next intersection on the current horizontal line, the span generator 16 returns the control to S4. On the other hand, when there is no next intersection on the current horizontal line, the span generator 16 updates the horizontal line and clears the cover value information of each layer to 0 (S6). Then, the span generator 16 determines whether or not the processing for all the horizontal lines has been completed (S7). If the processing for all horizontal lines has not been completed, the span generator 16 returns the control to S3. That is, the span generation unit 16 executes processing from the intersection buffer read initial position on the next horizontal line.

一方、S7の判定で、全水平線の処理が終了した場合、スパン生成部16は、注目レイヤ番号を更新する(S8)。そして、スパン生成部16は、全レイヤ番号の処理が終了したか否かを判定する(S9)。なお、レイヤ番号の最大値は、例えば、CPU102からシーケンサ13を通じて、スパン生成部16に引き渡される。現在の水平線で全レイヤ番号の処理が終了していない場合、スパン生成部16は、制御をS2に戻す。つまり、新たな注目レイヤ番号において、水平線の初期位置から処理を実行する。   On the other hand, if it is determined in S7 that all horizontal lines have been processed, the span generator 16 updates the target layer number (S8). Then, the span generator 16 determines whether or not the processing of all layer numbers has been completed (S9). Note that the maximum value of the layer number is transferred from the CPU 102 to the span generation unit 16 through the sequencer 13, for example. If the processing of all layer numbers has not been completed for the current horizontal line, the span generator 16 returns the control to S2. That is, the process is executed from the initial position of the horizontal line at the new attention layer number.

一方、全レイヤの処理が終了した場合、スパン生成部16は、スパン生成処理を終了する。なお、図16の処理では、外側のループで注目レイヤ番号を更新し、内側のループで水平線を更新した。しかし、スパン生成部16の処理が、図16に限定される訳ではない。例えば、スパン生成部16は、外側のループで水平線を更新し、内側のループの注目レイヤ番号を更新してもよい。   On the other hand, when all the layers have been processed, the span generation unit 16 ends the span generation processing. In the process of FIG. 16, the attention layer number is updated in the outer loop, and the horizontal line is updated in the inner loop. However, the processing of the span generator 16 is not limited to FIG. For example, the span generation unit 16 may update the horizontal line in the outer loop and update the attention layer number of the inner loop.

図17に、交点処理(図16のS4)の詳細を例示する。図17の処理では、スパン生成部16は、水平線上の1つの交点座標において、カバー値の算出と、スパンの算出を実行する。   FIG. 17 illustrates details of the intersection process (S4 in FIG. 16). In the process of FIG. 17, the span generator 16 calculates a cover value and a span at one intersection coordinate on the horizontal line.

図17の例では、まず、スパン生成部16は、交点バッファから交点情報を読む(S40)。そして、スパン生成部16は、読み出した交点情報のレイヤ番号が注目レイヤ番号より下層か否かを判定する(S41)。読み出した交点情報のレイヤ番号が注目レイヤ番号以上の場合、スパン生成部16は、読み出した交点情報のカバー値情報を基に、レイヤごとにスパンのカバー値情報を算出する(S42)。   In the example of FIG. 17, first, the span generator 16 reads the intersection information from the intersection buffer (S40). And the span production | generation part 16 determines whether the layer number of the read intersection information is a lower layer than an attention layer number (S41). If the layer number of the read intersection information is greater than or equal to the target layer number, the span generation unit 16 calculates span cover value information for each layer based on the cover value information of the read intersection information (S42).

S42の処理では、スパン生成部16は、まず、比較例の図9および図11に示した処理と同様の処理を実行する。すなわち、スパン生成部16は、交点上でエッジが上向きか下向きかを判定する。そして、スパン生成部16は、交点情報が上向きエッジを示す場合には、交点情報が示すレイヤにおいて、スパンの現在のカバー値情報の各ワードに、S41で読み出した交点のカバー値情報の各ワードを加算する。一方、スパン生成部16は、交点情報が下向きエッジを示す場合には、交点情報が示すレイヤにおいて、スパンの現在のカバー値情報の各ワードから、S41で読み出した交点のカバー値情報の各ワードを減算する。   In the process of S42, the span generator 16 first executes a process similar to the process shown in FIGS. 9 and 11 of the comparative example. That is, the span generator 16 determines whether the edge is upward or downward on the intersection. Then, when the intersection information indicates an upward edge, the span generator 16 adds each word of the cover value information of the intersection read in S41 to each word of the current cover value information of the span in the layer indicated by the intersection information. Is added. On the other hand, when the intersection information indicates a downward edge, the span generation unit 16 selects each word of the cover value information of the intersection read in S41 from each word of the current cover value information of the span in the layer indicated by the intersection information. Is subtracted.

そして、スパン生成部16は、各交点座標において、サブピクセルのカバー値情報を基に、各スパンにおける交点のカバー値を算出する。サブピクセルのカバー値情報を基に、各スパンにおける交点のカバー値を算出する処理は、比較例において図12にしたがって例示した処理と同様である。すなわち、スパン生成部16は、0以外のサブピクセル数と、ピクセルに含まれる全サブピクセル数の比率を求めてもよい。また、スパン生成部16は、サブピクセルのカバー値情報(Mark1[0:3]、Mark2[0:3]、Mark3[0:3]、Mark4[0:3])各ビットごとの加算値)が奇数のサブピクセル数と、ピクセルに含まれる全サブピクセル数の比率を求めてもよい。なお、読み出した交点情報のレイヤ番号が注目レイヤ番号より下層の場合、スパン生成部16は、S42の処理を実行しないで、そのままS43に処理を進める。そして、スパン生成部16は、交点バッファ上の次の交点情報の交点の座標が、現在処理中の交点情報の交点の座標と同一か否かを判定する(S43)。ここで、交点の座標が同一とは、2つの交点が重なっていることを意味する。次の交点の座標が、現在処理中の交点の座標と同一の場合、スパン生成部16は、制御をS40に戻す。すなわち、スパン生成部16は、重複した交点座標を有するすべての交点情報に対して、図17の交点処理を実行する。   Then, the span generator 16 calculates the cover value of the intersection in each span based on the cover value information of the subpixel at each intersection coordinate. The process of calculating the cover value at the intersection in each span based on the sub-pixel cover value information is the same as the process illustrated according to FIG. 12 in the comparative example. That is, the span generation unit 16 may obtain a ratio between the number of subpixels other than 0 and the total number of subpixels included in the pixel. In addition, the span generation unit 16 adds sub-pixel cover value information (Mark1 [0: 3], Mark2 [0: 3], Mark3 [0: 3], Mark4 [0: 3]) added values for each bit) The ratio of the odd number of subpixels to the total number of subpixels included in the pixel may be obtained. If the layer number of the read intersection information is lower than the target layer number, the span generation unit 16 proceeds to S43 as it is without executing the process of S42. Then, the span generator 16 determines whether or not the coordinates of the intersection of the next intersection information on the intersection buffer are the same as the coordinates of the intersection of the intersection information currently being processed (S43). Here, the same coordinate of the intersection means that the two intersections overlap. If the coordinates of the next intersection are the same as the coordinates of the intersection currently being processed, the span generator 16 returns the control to S40. That is, the span generation unit 16 performs the intersection process of FIG. 17 on all intersection information having overlapping intersection coordinates.

一方、次の交点の座標が、現在処理中の交点の座標と異なる場合、スパン生成部16は、スパン生成部16は、次の交点情報を一時的にレジスタ等に保持する(S44)。以下、一時的にレジスタに保持した交点情報の交点座標をX2とする。なお、S40で読み出した現在の交点情報の交点座標を以下の処理ではX1とする。   On the other hand, when the coordinate of the next intersection is different from the coordinate of the intersection currently being processed, the span generator 16 temporarily stores the next intersection information in a register or the like (S44). Hereinafter, the intersection coordinate of the intersection information temporarily stored in the register is X2. Note that the intersection coordinates of the current intersection information read in S40 are set to X1 in the following processing.

そして、スパン生成部16は、スパン計算を実行する(S45)。スパン計算では、交点座標が同一の複数の交点情報、または単一の交点情報を基に、スパンの開始、スパンの終了、またはスパンの継続が判断される。   And the span production | generation part 16 performs a span calculation (S45). In the span calculation, the start of the span, the end of the span, or the continuation of the span is determined based on a plurality of pieces of intersection information having the same intersection coordinates or single intersection information.

図18に、スパン計算(図17のS45)の詳細を例示する。すなわち、上位レイヤの交点座標X1でのカバー値が0.0より大きく、上位レイヤのスパン未継続のとき、スパン生成部16は、交点座標X1のピクセルを上位レイヤのスパンの始点に設定する。ここで、スパン未継続とは、スパンの始点が設定されていない状態をいう。さらに、スパン生成部16は、始点の右隣のピクセルのカバー値を計算し、次の交点までのカバー値に設定する(S451)。   FIG. 18 illustrates details of span calculation (S45 in FIG. 17). That is, when the cover value at the intersection coordinate X1 of the upper layer is larger than 0.0 and the span of the upper layer is not continued, the span generation unit 16 sets the pixel of the intersection coordinate X1 as the start point of the upper layer span. Here, the span non-continuation means a state where the span start point is not set. Further, the span generator 16 calculates the cover value of the pixel immediately adjacent to the start point, and sets the cover value up to the next intersection (S451).

また、上位レイヤの次の交点X2のカバー値が0.0で、上位レイヤのスパン継続中のとき、スパン生成部16は、次の交点X2の左隣の座標X2−1のピクセルを上位レイヤのスパンの終点に設定する(S452)。次に、スパン生成部16は、交点座標X1に、カバー値1の上位レイヤがあるか否かを判定する(S453)。交点座標X1に、カバー値1の上位レイヤがあるときで、注目レイヤのスパン継続中のとき、スパン生成部16は、交点座標X1の左側の座標X1−1のピクセルを注目レイヤのスパンの終点に設定する(S454)。さらに、本実施例においては、スパン生成部16は、注目レイヤの現在の交点座標X1でのカバー値および座標X1+1のカバー値を算出する。そして、スパン生成部16は、座標X1+1のカバー値を次の交点までのカバー値とする。すなわち、本実施例においては、カバー値1の上位レイヤがある場合でも、注目レイヤのカバー値が0になるまでは、注目レイヤのカバー値を算出しておく。   Further, when the cover value of the next intersection X2 of the upper layer is 0.0 and the span of the upper layer is continuing, the span generation unit 16 sets the pixel of the coordinate X2-1 next to the left of the next intersection X2 to the upper layer. Is set to the end point of the span (S452). Next, the span generator 16 determines whether or not there is an upper layer with a cover value of 1 at the intersection coordinate X1 (S453). When there is an upper layer with the cover value 1 at the intersection coordinate X1, and the span of the target layer is continuing, the span generator 16 determines the pixel at the coordinate X1-1 on the left side of the intersection coordinate X1 as the end point of the span of the target layer (S454). Further, in the present embodiment, the span generator 16 calculates the cover value at the current intersection coordinate X1 and the cover value at the coordinate X1 + 1 of the target layer. Then, the span generator 16 sets the cover value at the coordinate X1 + 1 as the cover value up to the next intersection. That is, in this embodiment, even when there is an upper layer having a cover value of 1, the cover value of the target layer is calculated until the cover value of the target layer becomes zero.

さらに、S454では、注目レイヤが継続中でなく、注目レイヤカバー値が0より大きくなった場合には、スパン生成部16は、現在の交点座標X1を注目レイヤのスパンの始点に設定する。さらに、スパン生成部16は、注目レイヤの現在の交点座標X1でのカバー値および座標X1+1のカバー値を算出する。そして、スパン生成部16は、座標X1+1のカバー値を次の交点までのカバー値とする。上述のように、現在交点座標X1において、注目レイヤのスパンが継続していて、上位レイヤの交点が1未満に変化した場合は、現在の交点座標X1に注目レイヤの交点がなくても注目レイヤのスパンの始点とする必要がある。そのため、カバー値1の上位レイヤが存在する場合でも、注目レイヤについて、始点の設定と、カバー値の計算とを実行しておくのである。   Furthermore, in S454, when the target layer is not continuing and the target layer cover value is greater than 0, the span generator 16 sets the current intersection coordinate X1 as the start point of the span of the target layer. Further, the span generator 16 calculates a cover value at the current intersection coordinate X1 and a cover value at the coordinate X1 + 1 of the target layer. Then, the span generator 16 sets the cover value at the coordinate X1 + 1 as the cover value up to the next intersection. As described above, if the span of the attention layer continues at the current intersection coordinate X1 and the intersection of the upper layer changes to less than 1, the attention layer even if there is no intersection of the attention layer at the current intersection coordinate X1 It is necessary to be the start point of the span. For this reason, even when there is an upper layer with a cover value of 1, the start point is set and the cover value is calculated for the target layer.

その後、スパン生成部16は、スパン計算1の処理を終了する。一方、交点座標Xに、カバー値1の上位レイヤがないときには、スパン生成部16は、S455からS457の処理を実行する。すなわち、注目レイヤの交点座標X1でのカバー値が0.0より大きく、注目レイヤのスパン未継続のとき、スパン生成部16は、交点座標X1のピクセルを注目レイヤのスパンの始点に設定する。また、スパン生成部16は、始点の右隣のピクセルのカバー値を計算し、次の交点までのカバー値に設定する。注目レイヤの次の交点座標X2までのカバー値を現在のカバー値と呼ぶ。さらに、スパン生成部16は、交点座標X1から次の交点座標X2−1までのスパン情報をラスタライザ18に送出する(S455)。したがって、本実施例の処理では、次の交点X2のカバー値が0でなくても一旦スパンは終了する。ただし、S455の処理に代えて、スパン生成部16が次の交点X2のカバー値が0になるまで、スパンを継続し、次の交点X2のカバー値が0になったときに、スパン情報をラスタライザ18に送出するようにしてもよい。   Thereafter, the span generator 16 ends the span calculation 1 process. On the other hand, when there is no upper layer with the cover value 1 at the intersection coordinate X, the span generation unit 16 executes the processing from S455 to S457. That is, when the cover value at the intersection coordinate X1 of the target layer is greater than 0.0 and the span of the target layer is not continued, the span generation unit 16 sets the pixel of the intersection coordinate X1 as the start point of the span of the target layer. Further, the span generator 16 calculates the cover value of the pixel immediately adjacent to the start point, and sets the cover value up to the next intersection. The cover value up to the next intersection coordinate X2 of the target layer is referred to as the current cover value. Further, the span generator 16 sends span information from the intersection point coordinate X1 to the next intersection point coordinate X2-1 to the rasterizer 18 (S455). Therefore, in the process of the present embodiment, the span is once ended even if the cover value of the next intersection X2 is not zero. However, instead of the processing of S455, the span generation unit 16 continues the span until the cover value of the next intersection X2 becomes 0, and when the cover value of the next intersection X2 becomes 0, the span information is displayed. It may be sent to the rasterizer 18.

さらに、スパン生成部16は、現在の交点X1に注目レイヤがなく、注目レイヤの現在のカバー値が0.0より大きく、かつ、上位レイヤのカバー値が現在の交点X1で1.0未満に変化した場合、現在の交点X1をスパンの始点に設定する(S456)。S456の処理は、上位レイヤに隠されていた、スパン継続中の注目レイヤが表れたことに対応する。この場合には、上位レイヤに隠されていた注目レイヤのスパンが開始する。   Further, the span generator 16 has no attention layer at the current intersection X1, the current cover value of the attention layer is greater than 0.0, and the cover value of the upper layer is less than 1.0 at the current intersection X1. If changed, the current intersection point X1 is set as the start point of the span (S456). The process of S456 corresponds to the appearance of the attention layer that is hidden in the upper layer and is continuing the span. In this case, the span of the target layer hidden in the upper layer starts.

さらにまた、注目レイヤの次の交点X2のカバー値が0.0で、注目レイヤのスパン継続中のとき、スパン生成部16は、次の交点X2座標の左隣の座標X2−1のピクセルを注目レイヤのスパンの終点に設定する(S457)。   Furthermore, when the cover value of the next intersection point X2 of the attention layer is 0.0 and the span of the attention layer is continuing, the span generation unit 16 determines the pixel at the coordinate X2-1 next to the left of the next intersection point X2 coordinate. The end point of the span of the target layer is set (S457).

図18の手順を交点座標ごとに繰り返すにより、上位レイヤが存在しない場合には、S455の処理で、注目レイヤのスパンの始点が設定される。一方、交点座標に、カバー値1の上位レイヤが存在する場合でも、S454の説明で述べたように、注目レイヤのスパンの始点と次の交点までの現在のカバー値が設定される。すなわち、本実施例では、上位
レイヤのカバー値が1以上の場合も、注目レイヤの始点とカバー値は一応算出される。
If the upper layer does not exist by repeating the procedure of FIG. 18 for each intersection coordinate, the start point of the span of the target layer is set in S455. On the other hand, even when an upper layer having a cover value of 1 exists at the intersection coordinates, as described in the description of S454, the current cover value from the start point of the span of the target layer to the next intersection point is set. That is, in this embodiment, even when the cover value of the upper layer is 1 or more, the start point and the cover value of the target layer are calculated temporarily.

しかしながら、上位レイヤのカバー値が1の場合、S453の判定がYESとなり、S455からS457の処理が省略される。その結果、交点にカバー値1の上位レイヤが存在する場合には、注目レイヤに対するスパン情報の出力が省略される。したがって、上位レイヤの図形によって隠される範囲では、当該スパンのピクセルは生成されず、図形処理装置1は、ベクタグラフィックスにおいて、効率的にピクセルを作成できる。   However, when the upper layer cover value is 1, the determination in S453 is YES, and the processing from S455 to S457 is omitted. As a result, when an upper layer having a cover value of 1 exists at the intersection, output of span information for the target layer is omitted. Therefore, in the range hidden by the graphic of the upper layer, the pixel of the span is not generated, and the graphic processing device 1 can efficiently create the pixel in vector graphics.

さらに、複数の交点座標に対するスパン計算1の処理(図18)の繰り返しにおいて、水平線上で上位レイヤの交点に到達した場合にS452の処理によって、注目レイヤのスパンの終点が設定される。また、水平線上で、注目レイヤの図形の右側エッジに達した場合には、S457の処理によって、注目レイヤのスパンの終点が設定される。   Further, in the repetition of the span calculation 1 process (FIG. 18) for a plurality of intersection coordinates, when the intersection of the upper layer is reached on the horizontal line, the end point of the span of the target layer is set by the process of S452. When the right edge of the figure of the target layer is reached on the horizontal line, the end point of the span of the target layer is set by the processing in S457.

(変形例)
図17、図18では、交点のカバー値をサブピクセルのカバー値情報から得られる0〜1の間の値として、算出した。しかし、このような手順に代えて、交点のカバー値を0か1かに限定してもよい。例えば、図形処理装置1は、図14の交点情報において、Mark1[3:0]からMark4[3:0]に代えて、交点の有無を示す1ビットのフラグによって、交点の有無を記憶すればよい。その場合には、図17のS43の交点のカバー値計算としては、スパン生成部16は、単に、交点情報から、交点の有無を示す1ビットのフラグを読み出せばよい。
(Modification)
In FIGS. 17 and 18, the cover value at the intersection is calculated as a value between 0 and 1 obtained from the cover value information of the subpixel. However, instead of such a procedure, the cover value of the intersection may be limited to 0 or 1. For example, the graphic processing apparatus 1 stores the presence / absence of an intersection by a 1-bit flag indicating the presence / absence of an intersection in place of Mark1 [3: 0] to Mark4 [3: 0] in the intersection information of FIG. Good. In that case, as the cover value calculation of the intersection point in S43 of FIG.

図19に、カバー値を0か1に限定する場合のスパン計算(図17のS45)の詳細を例示する。すなわち、上位レイヤの交点座標X1でのカバー値が1であり、かつ、上位レイヤのスパン未継続のとき、スパン生成部16は、交点座標X1のピクセルを上位レイヤのスパンの始点に設定する(T451)。   FIG. 19 illustrates details of span calculation (S45 in FIG. 17) when the cover value is limited to 0 or 1. That is, when the cover value at the intersection coordinate X1 of the upper layer is 1 and the span of the upper layer is not continued, the span generator 16 sets the pixel of the intersection coordinate X1 as the start point of the upper layer span ( T451).

また、上位レイヤの次の交点座標X2のカバー値が0で、上位レイヤのスパン継続中のとき、スパン生成部16は、次の交点座標X2の左隣の座標X2−1のピクセルを上位レイヤのスパンの終点に設定する(T452)。   Further, when the cover value of the next intersection coordinate X2 of the upper layer is 0 and the span of the upper layer is continuing, the span generation unit 16 sets the pixel of the coordinate X2-1 next to the left of the next intersection coordinate X2 to the upper layer Is set to the end point of the span (T452).

次に、スパン生成部16は、交点座標X1に、カバー値1の上位レイヤがあるか否かを判定する(T453)。交点座標X1に、カバー値1の上位レイヤがあるときで、注目レイヤのスパン継続中のとき、スパン生成部16は、交点座標X1の左隣の座標X1−1のピクセルを注目レイヤのスパンの終点に設定する(T454)。さらに、T454において、注目レイヤが継続中でなく、注目レイヤカバー値が1となった場合には、スパン生成部16は、現在の交点座標X1を注目レイヤのスパンの始点に設定する。さらに、注目レイヤの現在の交点座標X1でのカバー値および座標X1+1のカバー値を算出する。そして、スパン生成部16は、座標X1+1のカバー値を次の交点までのカバー値とする。この処理は、S454と同様である。   Next, the span generator 16 determines whether or not there is an upper layer with a cover value of 1 at the intersection coordinate X1 (T453). When there is an upper layer of the cover value 1 at the intersection coordinate X1, and the span of the target layer is continuing, the span generator 16 sets the pixel of the coordinate X1-1 next to the left of the intersection coordinate X1 to the span of the target layer. The end point is set (T454). Further, in T454, when the target layer is not continuing and the target layer cover value is 1, the span generation unit 16 sets the current intersection coordinate X1 as the start point of the span of the target layer. Further, the cover value at the current intersection coordinate X1 and the cover value at the coordinate X1 + 1 of the target layer are calculated. Then, the span generator 16 sets the cover value at the coordinate X1 + 1 as the cover value up to the next intersection. This process is the same as S454.

一方、交点座標X1に、カバー値1の上位レイヤがないときには、スパン生成部16は、T455からT457の処理を実行する。すなわち、注目レイヤの交点座標X1でのカバー値が1であり、かつ、注目レイヤのスパン未継続のとき、スパン生成部16は、交点座標X1のピクセルを注目レイヤのスパンの始点に設定する。また、現在の交点座標X1の右隣から次の交点座標X2までのカバー値を1に設定する。そして、スパン生成部16は、現在の交点座標X1から次の交点X2−1までのスパン情報をラスタライザ1に送出する(T455)。   On the other hand, when there is no upper layer with the cover value 1 at the intersection coordinate X1, the span generation unit 16 executes the processing from T455 to T457. That is, when the cover value at the intersection coordinate X1 of the attention layer is 1 and the span of the attention layer is not continued, the span generation unit 16 sets the pixel of the intersection coordinate X1 as the start point of the span of the attention layer. Further, the cover value from the right adjacent to the current intersection coordinate X1 to the next intersection coordinate X2 is set to 1. Then, the span generator 16 sends span information from the current intersection point X1 to the next intersection point X2-1 to the rasterizer 1 (T455).

さらに、スパン生成部16は、現在の交点X1に注目レイヤがなく、注目レイヤの現在
のカバー値が1であり、かつ、上位レイヤのカバー値が現在の交点X1で0に変化した場合、現在の交点X1をスパンの始点に設定する(T456)。T456の処理は、S456と同様である。さらにまた、注目レイヤの次の交点座標X2のカバー値が0で、注目レイヤのスパン継続中のとき、スパン生成部16は、次の交点座標X2の左隣の座標X2−1のピクセルを注目レイヤのスパンの終点に設定する(T457)。
Further, the span generation unit 16 does not have the attention layer at the current intersection X1, the current cover value of the attention layer is 1, and the cover value of the upper layer changes to 0 at the current intersection X1, Is set as the span start point (T456). The process of T456 is the same as that of S456. Furthermore, when the cover value of the next intersection coordinate X2 of the target layer is 0 and the span of the target layer is continuing, the span generator 16 pays attention to the pixel of the next adjacent coordinate X2-1 on the left side of the next intersection coordinate X2. The end point of the span of the layer is set (T457).

以上述べたように、カバー値を0か1に限定し、サブピクセルによってカバー値を算出しない場合でも、図16−図18と同様に、図形の上位レイヤと下位レイヤの関係から、効率的なピクセルの生成が可能である。   As described above, even when the cover value is limited to 0 or 1 and the cover value is not calculated by sub-pixels, it is efficient from the relationship between the upper layer and the lower layer of the figure as in FIGS. Pixel generation is possible.

すなわち、上位レイヤのカバー値が1の場合、T453の判定がYESとなり、T455からT457の処理が省略される。その結果、交点にカバー値1の上位レイヤが存在する場合には、注目レイヤに対するスパン情報の出力が省略される。したがって、上位レイヤの図形によって隠される範囲では、当該スパンのピクセルは生成されず、図形処理装置1は、ベクタグラフィックスにおいて、効率的にピクセルを作成できる。   That is, when the cover value of the upper layer is 1, the determination at T453 is YES, and the processing from T455 to T457 is omitted. As a result, when an upper layer having a cover value of 1 exists at the intersection, output of span information for the target layer is omitted. Therefore, in the range hidden by the graphic of the upper layer, the pixel of the span is not generated, and the graphic processing device 1 can efficiently create the pixel in vector graphics.

さらに、複数の交点座標に対するスパン計算2の処理(図19)の繰り返しにおいて、水平線上で上位レイヤの交点に到達した場合にT452の処理によって、注目レイヤのスパンの終点が設定される。また、水平線上で、注目レイヤの図形の右側エッジに達した場合には、T456の処理によって、注目レイヤのスパンの終点が設定される。   Further, in the repetition of the span calculation 2 process (FIG. 19) for a plurality of intersection coordinates, when the intersection of the upper layer is reached on the horizontal line, the end point of the span of the target layer is set by the process of T452. When the right edge of the figure of the attention layer is reached on the horizontal line, the end point of the span of the attention layer is set by the process of T456.

なお、図19の処理を図18と比較した場合、図18では、交点のカバー値が0から1の範囲の値を取り得るため、上位レイヤの図形が半透明となって下位レイヤの図形を表示する場合があり、スパン生成部16は、始点から次の交点までのカバー値を維持する(図18のS455)。一方、図19では、カバー値は、0または1のいずれかであるので、始点から終点まではカバー値が確定しており、スパン生成部16は、始点から次の交点までのカバー値を維持する必要がない(図19のT455)。   When the processing of FIG. 19 is compared with FIG. 18, in FIG. 18, the cover value of the intersection can take a value in the range of 0 to 1, so that the graphic of the upper layer becomes translucent and the graphic of the lower layer In some cases, the span generation unit 16 maintains the cover value from the start point to the next intersection (S455 in FIG. 18). On the other hand, in FIG. 19, since the cover value is either 0 or 1, the cover value is fixed from the start point to the end point, and the span generator 16 maintains the cover value from the start point to the next intersection. There is no need to do this (T455 in FIG. 19).

(その他)
以下、本実施形態で説明したベクタグラフィックスにおけるピクセルの処理と、3次元グラフィックスでのZバッファ法との違いを説明する。3次元グラフィックスにおける隠面処理に用いられるZバッファ法では、図形処理装置は、ピクセル単位で奥行き情報(Z値)を持ちピクセル単位でZ値比較する。これに対して、本実施形態の図形処理装置1は、ピクセルの集合であるスパン単位で処理するため、より効率よく隠面処理を実行できる。
(Other)
Hereinafter, a difference between the pixel processing in the vector graphics described in the present embodiment and the Z buffer method in the three-dimensional graphics will be described. In the Z buffer method used for hidden surface processing in three-dimensional graphics, the graphic processing apparatus has depth information (Z value) in pixel units and compares Z values in pixel units. On the other hand, since the graphic processing apparatus 1 according to the present embodiment performs processing in units of spans, which are sets of pixels, it can perform hidden surface processing more efficiently.

《コンピュータが読み取り可能な記録媒体》
コンピュータその他の機械、装置(以下、コンピュータ等)に上記いずれかの機能を実現させるプログラムをコンピュータ等が読み取り可能な記録媒体に記録することができる。そして、コンピュータ等に、この記録媒体のプログラムを読み込ませて実行させることにより、その機能を提供させることができる。
<Computer-readable recording medium>
A program for causing a computer or other machine or device (hereinafter, a computer or the like) to realize any of the above functions can be recorded on a recording medium that can be read by the computer or the like. The function can be provided by causing a computer or the like to read and execute the program of the recording medium.

ここで、コンピュータ等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的、または化学的作用によって蓄積し、コンピュータ等から読み取ることができる記録媒体をいう。このような記録媒体のうちコンピュータ等から取り外し可能なものとしては、例えばフレキシブルディスク、光磁気ディスク、CD−ROM、CD−R/W、DVD、ブルーレイディスク、DAT、8mmテープ、フラッシュメモリなどのメモリカード等がある。また、コンピュータ等に固定された記録媒体としてハードディスクやROM(リードオンリーメモリ)等がある。   Here, a computer-readable recording medium is a recording medium that stores information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read from a computer or the like. Say. Examples of such a recording medium that can be removed from a computer or the like include a flexible disk, a magneto-optical disk, a CD-ROM, a CD-R / W, a DVD, a Blu-ray disk, a DAT, an 8 mm tape, a flash memory, and the like. There are cards. In addition, as a recording medium fixed to a computer or the like, there are a hard disk, a ROM (read only memory), and the like.

1 図形処理装置
12 エッジ生成部
13 シーケンサ
14 交点生成部
15 ソータ
16 スパン生成部
17 交点バッファ
18 ラスタライザ
19 ピクセル処理部
1 Graphic Processing Device 12 Edge Generation Unit 13 Sequencer 14 Intersection Generation Unit 15 Sorter 16 Span Generation Unit 17 Intersection Buffer 18 Rasterizer 19 Pixel Processing Unit

Claims (6)

図形の境界線と画像の走査線方向の画素の並びとの交点の位置、および前記図形と他の図形との階層関係を示すレイヤ情報を含む交点情報を生成する交点生成部と、
前記階層関係における上位レイヤの図形の存在範囲を除外して、画像の走査線に交差する図形の一方の境界線と前記走査線との交点(始点)前記図形の他方の境界線と走査線との交点(終点)とによって定義されるスパンを生成するスパン生成部と、
前記スパンに含まれる画素の集合を生成するラスタライザと、を備える画像処理装置。
An intersection generation unit for generating intersection information including the position of the intersection between the boundary line of the graphic and the arrangement of pixels in the scanning line direction of the image, and layer information indicating a hierarchical relationship between the graphic and the other graphic;
Excluding the existence range of the graphic of the upper layer in the hierarchical relationship, the intersection (starting point) of one boundary line of the graphic intersecting the scanning line of the image and the scanning line, and the other boundary line and the scanning line of the graphic span generation section for generating a span that will be defined by the intersection (end point) and,
An image processing apparatus comprising: a rasterizer that generates a set of pixels included in the span .
前記交点生成部は、交点位置のピクセルを複数のサブピクセルに分割してサブピクセルごとに、図形の境界線がカバーする範囲を示すカバー情報を設定し、
前記スパン生成部は、サブピクセルのカバー情報を基に、前記ピクセルにおいて境界線が通過する部分の前記ピクセルに対する比率を示すカバー値を算出し、前記カバー値にしたがって、前記上位レイヤの図形の存在範囲および前記それぞれの交点を判定する請求項1に記載の画像処理装置。
The intersection generation unit divides the pixel at the intersection position into a plurality of subpixels, sets cover information indicating a range covered by the boundary of the figure for each subpixel,
The span generation unit calculates a cover value indicating a ratio of a portion where a boundary line passes through the pixel to the pixel based on the cover information of the sub-pixel, and the presence of the graphic of the upper layer according to the cover value The image processing apparatus according to claim 1, wherein a range and each intersection point are determined.
コンピュータが、図形の境界線と走査線方向の画素の並びとの交点の位置、および前記図形と他の図形との階層関係を示すレイヤ情報を含む交点情報を生成する交点生成ステップと、
前記階層関係における上位レイヤの図形の存在範囲を除外して、画像の走査線に交差する図形の一方の境界線と前記走査線との交点(始点)前記図形の他方の境界線と走査線との交点(終点)とによって定義されるスパンを生成するスパン生成ステップと、
前記スパンに含まれる画素の集合を生成するステップと、を実行する画像処理方法。
An intersection generation step in which the computer generates intersection information including the position of the intersection between the boundary line of the graphic and the arrangement of pixels in the scanning line direction, and layer information indicating a hierarchical relationship between the graphic and the other graphic;
Excluding the existence range of the graphic of the upper layer in the hierarchical relationship, the intersection (starting point) of one boundary line of the graphic intersecting the scanning line of the image and the scanning line, and the other boundary line and the scanning line of the graphic and span generation step of generating a span that will be defined by the intersection (end point) and,
Generating a set of pixels included in the span .
前記交点生成ステップは、交点位置のピクセルを複数のサブピクセルに分割してサブピクセルごとに、図形の境界線がカバーする範囲を示すカバー情報を設定するステップを有し、
前記スパン生成ステップは、サブピクセルのカバー情報を基に、前記ピクセルにおいて境界線が通過する部分の前記ピクセルに対する比率を示すカバー値を算出し、前記カバー値にしたがって、前記上位レイヤの図形の存在範囲および前記それぞれの交点を判定するステップを有する請求項3に記載の画像処理方法。
The intersection generation step has a step of dividing the pixel at the intersection position into a plurality of subpixels and setting cover information indicating a range covered by the boundary of the figure for each subpixel,
The span generation step calculates a cover value indicating a ratio of a portion through which a boundary line passes in the pixel to the pixel based on the cover information of the sub-pixel, and the presence of the graphic of the upper layer according to the cover value The image processing method according to claim 3, further comprising a step of determining a range and each intersection point.
コンピュータに、図形の境界線と走査線方向の画素の並びとの交点の位置、および前記図形と他の図形との階層関係を示すレイヤ情報を含む交点情報を生成する交点生成ステップと、
前記階層関係における上位レイヤの図形の存在範囲を除外して、画像の走査線に交差する図形の一方の境界線と前記走査線との交点(始点)前記図形の他方の境界線と走査線との交点(終点)とによって定義されるスパンを生成するスパン生成ステップと、
前記スパンに含まれる画素の集合を生成するステップと、を実行させるためのコンピュータ実行可能なプログラム。
An intersection generation step for generating intersection information including, on a computer, a position of an intersection between the boundary line of the figure and the arrangement of pixels in the scanning line direction, and layer information indicating a hierarchical relationship between the figure and another figure;
Excluding the existence range of the graphic of the upper layer in the hierarchical relationship, the intersection (starting point) of one boundary line of the graphic intersecting the scanning line of the image and the scanning line, and the other boundary line and the scanning line of the graphic and span generation step of generating a span that will be defined by the intersection (end point) and,
Generating a set of pixels included in the span .
前記交点生成ステップは、交点位置のピクセルを複数のサブピクセルに分割してサブピクセルごとに、図形の境界線がカバーする範囲を示すカバー情報を設定するステップを有し、
前記スパン生成ステップは、サブピクセルのカバー情報を基に、前記ピクセルにおいて境界線が通過する部分の前記ピクセルに対する比率を示すカバー値を算出し、前記カバー値にしたがって、前記上位レイヤの図形の存在範囲および前記それぞれの交点を判定するステップを有する請求項5に記載のプログラム。
The intersection generation step has a step of dividing the pixel at the intersection position into a plurality of subpixels and setting cover information indicating a range covered by the boundary of the figure for each subpixel,
The span generation step calculates a cover value indicating a ratio of a portion through which a boundary line passes in the pixel to the pixel based on the cover information of the sub-pixel, and the presence of the graphic of the upper layer according to the cover value The program according to claim 5, further comprising a step of determining a range and each of the intersections.
JP2013054190A 2013-03-15 2013-03-15 Image processing apparatus, image processing method, and program Active JP5665902B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013054190A JP5665902B2 (en) 2013-03-15 2013-03-15 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013054190A JP5665902B2 (en) 2013-03-15 2013-03-15 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2014179031A JP2014179031A (en) 2014-09-25
JP5665902B2 true JP5665902B2 (en) 2015-02-04

Family

ID=51698880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013054190A Active JP5665902B2 (en) 2013-03-15 2013-03-15 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5665902B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03278189A (en) * 1990-02-21 1991-12-09 Ricoh Co Ltd Graphic processor
JPH05250123A (en) * 1992-03-05 1993-09-28 Sharp Corp Multiwindow system
JP4370438B2 (en) * 2007-06-27 2009-11-25 Necシステムテクノロジー株式会社 Vector image drawing apparatus, vector image drawing method and program
JP5325744B2 (en) * 2009-10-30 2013-10-23 京セラドキュメントソリューションズ株式会社 Image processing apparatus and image processing program

Also Published As

Publication number Publication date
JP2014179031A (en) 2014-09-25

Similar Documents

Publication Publication Date Title
KR102101626B1 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
JP4621618B2 (en) Graphic drawing apparatus, graphic drawing method, and program
JP4579262B2 (en) Early Z-test method and system for rendering three-dimensional images
KR102238651B1 (en) Method and apparatus for performing path rendering
US8970580B2 (en) Method, apparatus and computer-readable medium rendering three-dimensional (3D) graphics
JP4030519B2 (en) Image processing apparatus and image processing system
KR20150039495A (en) Apparatus and Method for rendering a current frame using an image of previous tile
JP5005090B2 (en) Cutting simulation display device, cutting simulation display method, and cutting simulation display program
JP5634104B2 (en) Tile-based rendering apparatus and method
US9013479B2 (en) Apparatus and method for tile-based rendering
WO2010088029A2 (en) Single-pass bounding box calculation
CN105701852A (en) Apparatus and method for rendering
CN105335994B (en) Method and apparatus for performing tile-based path rendering
KR20150093689A (en) Method for forming an optimized polygon based shell mesh
JP4960119B2 (en) Point-based rendering apparatus and method
US20150325022A1 (en) Technique for processing a character string for graphical representation on a man/machine interface
JP2010146255A (en) Vector graphics drawing device
JP5665902B2 (en) Image processing apparatus, image processing method, and program
JP2008305347A (en) Method and device for generating interference discrimination information
JP5304443B2 (en) Drawing data processing method, drawing system, and drawing data creation program
KR20170016156A (en) Method and apparatus for performing a path rendering
US10134184B2 (en) Method of rendering object including path and rendering apparatus for performing path rendering
JP4691494B2 (en) Image drawing apparatus, vertex selection method, vertex selection program, and integrated circuit
JP6361267B2 (en) Image processing device
JP2006293470A (en) Drawing system, method therefor, and drawing program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140916

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141114

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141202

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141209

R150 Certificate of patent or registration of utility model

Ref document number: 5665902

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250