JP5665902B2 - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- 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
Links
- 238000003672 processing method Methods 0.000 title claims 2
- 238000000034 method Methods 0.000 description 45
- 239000000872 buffer Substances 0.000 description 37
- 238000004364 calculation method Methods 0.000 description 15
- 230000000052 comparative effect Effects 0.000 description 12
- 230000010365 information processing Effects 0.000 description 6
- 238000004519 manufacturing process Methods 0.000 description 5
- 101150053299 Mark1 gene Proteins 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 101150116075 Mark2 gene Proteins 0.000 description 3
- 101150059478 Mark3 gene Proteins 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
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.
従来の技術では、この手法で下の図形を描画する時点ではどの部分が上の図形により隠蔽されるかが不明であるため、画像処理装置は、隠蔽される図形のピクセル(画素)に対しても描画のための処理を実行する。本発明の課題は、ベクタグラフィックス、あるいは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.
以下、図面を参照して、一実施形態に係る画像処理装置について説明する。以下の実施形態の構成は例示であり、本装置は実施形態の構成には限定されない。 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
図1(B)は、画像処理装置101によるピクセル(画素)の生成例である。画像処理装置101は、図1(A)の画像を表示装置に表示するため、それぞれの図形のピクセルを生成する。下層の図形のピクセル生成の際、画像処理装置101は、上層の図形と、下層の図形が一部重なりあっていることを認識しないで、下層の図形から順番に図形のピクセルを生成する。このため、画像処理装置101は、下層の図形において、上層の図形によって隠された隠面に対しても、ピクセルを生成する。
FIG. 1B is an example of pixel generation by the
図2は、画像処理装置101を含む情報処理装置の構成を例示する図である。情報処理装置は、画像処理装置101の他に、例えば、CPU102を含む。CPU102は、例えば、画像処理プログラムを実行し、図形情報を画像処理装置101に引き渡す。図形情報は、例えば、多角形、幅情報を含む線等である。
FIG. 2 is a diagram illustrating a configuration of an information processing apparatus including the
画像処理装置101は、エッジ生成部112、シーケンサ113、交点生成部114、ソータ115、スパン生成部116、交点バッファ117、ラスタライザ118、およびピクセル処理部119を含む。
The
エッジ生成部112は、CPU102から図形情報を受け取り、エッジ情報を生成する。エッジ生成部112は、生成したエッジ情報を図示しないバッファに出力する。なお、バッファは、シーケンサ113によって制御されるため、図2では便宜的に、エッジ生成部112からシーケンサ113にエッジ情報が引き渡されている。エッジ生成部112は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。
The
シーケンサ113は、交点生成部114、ソータ115、およびスパン生成部116を制御する。シーケンサ113は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。エッジ情報が引き渡されると、シーケンサ113は、交点生成部114を起動する。ただし、エッジ生成部112と交点生成部114とは、例えば、エッジ情報を格納するバッファを通じて、エッジ情報を授受できればよい。したがって、1つの図形、例えば、多角形中の1つのエッジ情報を生成する度に、エッ
ジ情報が交点生成部114に引き渡されるようにしてもよい。つまり、1つの図形の処理において、エッジ生成部112と交点生成部114とは、並列に処理を実行してもよい。
The
交点生成部114は、エッジ生成部112が出力したエッジ情報を基に、交点情報を生成する。ここで、交点情報とは、エッジ生成部112が出力したエッジ情報と、画像の水平線との交点である。画像の水平線は、画像中のピクセルの水平方向の並びであり、走査線ともいう。
The intersection generation unit 114 generates intersection information based on the edge information output from the
つまり、交点情報とは、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
ソータ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
スパン生成部116は、並べ替えが完了した交点バッファ117の交点情報から、スパン情報を生成する。スパン生成部116は、生成したスパン情報をラスタライザ118に引き渡す。スパン生成部116は、例えば、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。
The
ラスタライザ118は、スパン情報からピクセル情報を生成する。ラスタライザ118は、生成したピクセル情報をピクセル処理部119に引き渡す。ラスタライザ118は、プログラムを実行するDSPであってもよいし、専用のハードウェア回路であってもよい。ピクセル処理部119は、ピクセル情報から図示しない表示装置を制御する表示装置の制御情報を生成し、表示装置に出力する。
The
なお、図2の説明では、シーケンサ113が、交点生成部114の処理終了後ソータ115を起動し、ソータ115の処理終了後スパン生成部116を起動するものとして説明した。しかし、交点生成部114が交点生成部114の処理終了後ソータ115を起動し、ソータ115がソータ115の処理終了後スパン生成部116を起動してもよい。
In the description of FIG. 2, the
(エッジ情報とスパン情報)
図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
図2に例示したように、CPU102上のアプリケーションプログラムは、例えば、図5のような図形をエッジ生成部112に引き渡す。エッジ生成部112は、円形環状パターンで例示される図形境界線を直線近似した微小直線(エッジ)を生成し、交点生成部114に引き渡す。交点生成部114は、エッジと水平線が交差する交点情報を交点バッファ117に保存する。なお、図5のような外形が曲線の図形ではなく、外形が直線の辺を含む多角形の図形については、直線の辺がそのままエッジとなる。
As illustrated in FIG. 2, the application program on the
交点生成部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
スパン生成部116は、スパン生成時、カバー値情報を基に、ピクセル全体のカバー値を算出する。カバー値1は、ピクセルが完全にエッジの内側にカバーされることを示す。つまり、カバー値1のピクセルは、図形内部に完全包含されるピクセルを示す。図7の例では、エッジが上向きであるので、エッジの右側に存在するサブピクセルに対応する各ビットに1が設定されている。さらに、同一図形内で重なりがある場合には、エッジの重なりが発生する。スパン生成部116は、同一座標においてエッジの重なりが重なる場合のカバー値情報を算出するためのカウンタを有している。例えば、スパン生成部116が16ビット長のカウンタをサブピクセル数用いると、同一座標における各サブピクセルにおいて、65535個のエッジの重なりの度合いを算出できる。
The
また、図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
図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
(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
図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
図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
(スパンの生成)
図13に、スパン生成部116によるスパン生成処理を例示する。スパン生成部116
は、カバー値が0.0 でないピクセルのX座標をスパンの始点とする。そして、スパン生成部116は、次に現れるカバー値が0.0 となるピクセルのX座標-1(左隣)のピクセルを終点とする。スパン生成部116は、始点と終点を含むスパン情報を生成し、生成したスパン情報をラスタライザ118に出力する。
(Span generation)
FIG. 13 exemplifies span generation processing by the
Uses the X coordinate of a pixel whose cover value is not 0.0 as the start point of the span. Then, the
例えば、図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
(問題点)
図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
図14から図18を参照して、実施例に係る画像処理装置1について説明する。上記比較例の問題点を解決するため、実施例の画像処理装置1は、交点情報にレイヤ番号を付加して保存する。レイヤ番号は、例えば、図形ごとに与えられる0から始まる整数である。実施例では、レイヤ番号が大きいほど図形の重ねあわせ、つまり図形間の階層関係で上位の図形とする。レイヤ番号は、例えば、CPU上のソフトウェアの処理で与えるものとしてもよい。
The
図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
実施例では、CPU102は、例えば、画像処理プログラムを実行し、図形情報とともに、レイヤ番号を含む情報を画像処理装置1に引き渡す。一方、シーケンサ13は、レジスタを有しており、現在処理中の図形のレイヤ番号を保持する。シーケンサ13は、例えば、図形情報の切り替わりごとに、レイヤ番号を交点生成部14に引き渡せばよい。交点生成部14は、生成した交点情報に、シーケンサ13から引き渡されたレイヤ番号を付与する。レイヤ番号を付与された交点情報は、交点バッファ17に保持される。スパン生成部16は、交点情報に付されたレイヤ番号によって、スパンの上下関係を判断しつつ、スパンを生成する。
In the embodiment, for example, the
一方、実施例のエッジ生成部12、ソータ15、ラスタライザ18、およびピクセル処理部19の処理は、それぞれ比較例のエッジ生成部112、ソータ115、ラスタライザ118、およびピクセル処理部119の処理と同様である。
On the other hand, the processing of the
図16から図18によりスパン生成部16の処理を例示する。図16に、スパン生成部16が実行するスパン生成処理のフローチャートを例示する。図16の処理では、まず、スパン生成部16は、注目レイヤ番号を初期値設定する(S1)。注目レイヤ番号は、現在処理中のレイヤ番号を意味する。注目レイヤ番号の初期値は、例えば、最下層のレイヤを示す0である。
The processing of the
次に、スパン生成部16は、水平線位置を初期値設定する(S2)。水平線位置とは、例えば、画像中のラスタの番号であり、図8の交点バッファ117の縦方向の番号(0〜H−1)で例示される。なお、実施例においても、交点バッファの構成は、比較例の図8と同様である。また、S2の処理とともに、スパン生成部16は、各レイヤのカバー値情報を0クリアする。すなわち、各レイヤには、エッジと重なりのない状態を示す初期値が設定される。
Next, the
次に、スパン生成部16は、現在処理中の水平線で交点バッファ読み出し初期位置を設定する(S3)。交点バッファ読み出し位置は、例えば、図8の交点バッファ117の横方向の番号(0〜k−1)で例示される。交点バッファ読み出し初期位置は、例えば、0である。
Next, the
そして、スパン生成部16は、交点処理を実行する(S4)。交点処理は、水平線と図形エッジの交点座標において、エッジとピクセルとの関係を示すカバー値を算出するとともに、図形の水平線上の存在範囲を示すスパンを上位レイヤ優先で算出する処理である。S4の詳細は、図17、図18にしたがって、後述する。
And the span production |
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
一方、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
一方、全レイヤの処理が終了した場合、スパン生成部16は、スパン生成処理を終了する。なお、図16の処理では、外側のループで注目レイヤ番号を更新し、内側のループで水平線を更新した。しかし、スパン生成部16の処理が、図16に限定される訳ではない。例えば、スパン生成部16は、外側のループで水平線を更新し、内側のループの注目レイヤ番号を更新してもよい。
On the other hand, when all the layers have been processed, the
図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
図17の例では、まず、スパン生成部16は、交点バッファから交点情報を読む(S40)。そして、スパン生成部16は、読み出した交点情報のレイヤ番号が注目レイヤ番号より下層か否かを判定する(S41)。読み出した交点情報のレイヤ番号が注目レイヤ番号以上の場合、スパン生成部16は、読み出した交点情報のカバー値情報を基に、レイヤごとにスパンのカバー値情報を算出する(S42)。
In the example of FIG. 17, first, the
S42の処理では、スパン生成部16は、まず、比較例の図9および図11に示した処理と同様の処理を実行する。すなわち、スパン生成部16は、交点上でエッジが上向きか下向きかを判定する。そして、スパン生成部16は、交点情報が上向きエッジを示す場合には、交点情報が示すレイヤにおいて、スパンの現在のカバー値情報の各ワードに、S41で読み出した交点のカバー値情報の各ワードを加算する。一方、スパン生成部16は、交点情報が下向きエッジを示す場合には、交点情報が示すレイヤにおいて、スパンの現在のカバー値情報の各ワードから、S41で読み出した交点のカバー値情報の各ワードを減算する。
In the process of S42, the
そして、スパン生成部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
一方、次の交点の座標が、現在処理中の交点の座標と異なる場合、スパン生成部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
そして、スパン生成部16は、スパン計算を実行する(S45)。スパン計算では、交点座標が同一の複数の交点情報、または単一の交点情報を基に、スパンの開始、スパンの終了、またはスパンの継続が判断される。
And the span production |
図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
また、上位レイヤの次の交点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
さらに、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
その後、スパン生成部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
さらに、スパン生成部16は、現在の交点X1に注目レイヤがなく、注目レイヤの現在のカバー値が0.0より大きく、かつ、上位レイヤのカバー値が現在の交点X1で1.0未満に変化した場合、現在の交点X1をスパンの始点に設定する(S456)。S456の処理は、上位レイヤに隠されていた、スパン継続中の注目レイヤが表れたことに対応する。この場合には、上位レイヤに隠されていた注目レイヤのスパンが開始する。
Further, the
さらにまた、注目レイヤの次の交点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
図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
さらに、複数の交点座標に対するスパン計算1の処理(図18)の繰り返しにおいて、水平線上で上位レイヤの交点に到達した場合にS452の処理によって、注目レイヤのスパンの終点が設定される。また、水平線上で、注目レイヤの図形の右側エッジに達した場合には、S457の処理によって、注目レイヤのスパンの終点が設定される。
Further, in the repetition of the
(変形例)
図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
図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
また、上位レイヤの次の交点座標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
次に、スパン生成部16は、交点座標X1に、カバー値1の上位レイヤがあるか否かを判定する(T453)。交点座標X1に、カバー値1の上位レイヤがあるときで、注目レイヤのスパン継続中のとき、スパン生成部16は、交点座標X1の左隣の座標X1−1のピクセルを注目レイヤのスパンの終点に設定する(T454)。さらに、T454において、注目レイヤが継続中でなく、注目レイヤカバー値が1となった場合には、スパン生成部16は、現在の交点座標X1を注目レイヤのスパンの始点に設定する。さらに、注目レイヤの現在の交点座標X1でのカバー値および座標X1+1のカバー値を算出する。そして、スパン生成部16は、座標X1+1のカバー値を次の交点までのカバー値とする。この処理は、S454と同様である。
Next, the
一方、交点座標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
さらに、スパン生成部16は、現在の交点X1に注目レイヤがなく、注目レイヤの現在
のカバー値が1であり、かつ、上位レイヤのカバー値が現在の交点X1で0に変化した場合、現在の交点X1をスパンの始点に設定する(T456)。T456の処理は、S456と同様である。さらにまた、注目レイヤの次の交点座標X2のカバー値が0で、注目レイヤのスパン継続中のとき、スパン生成部16は、次の交点座標X2の左隣の座標X2−1のピクセルを注目レイヤのスパンの終点に設定する(T457)。
Further, the
以上述べたように、カバー値を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
さらに、複数の交点座標に対するスパン計算2の処理(図19)の繰り返しにおいて、水平線上で上位レイヤの交点に到達した場合にT452の処理によって、注目レイヤのスパンの終点が設定される。また、水平線上で、注目レイヤの図形の右側エッジに達した場合には、T456の処理によって、注目レイヤのスパンの終点が設定される。
Further, in the repetition of the
なお、図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
(その他)
以下、本実施形態で説明したベクタグラフィックスにおけるピクセルの処理と、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
《コンピュータが読み取り可能な記録媒体》
コンピュータその他の機械、装置(以下、コンピュータ等)に上記いずれかの機能を実現させるプログラムをコンピュータ等が読み取り可能な記録媒体に記録することができる。そして、コンピュータ等に、この記録媒体のプログラムを読み込ませて実行させることにより、その機能を提供させることができる。
<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
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.
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)
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 |
-
2013
- 2013-03-15 JP JP2013054190A patent/JP5665902B2/en active Active
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 |