JP2018152113A - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2018152113A JP2018152113A JP2018095500A JP2018095500A JP2018152113A JP 2018152113 A JP2018152113 A JP 2018152113A JP 2018095500 A JP2018095500 A JP 2018095500A JP 2018095500 A JP2018095500 A JP 2018095500A JP 2018152113 A JP2018152113 A JP 2018152113A
- Authority
- JP
- Japan
- Prior art keywords
- group
- image processing
- intermediate data
- processing apparatus
- synthesis
- 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.)
- Granted
Links
Images
Landscapes
- Image Generation (AREA)
Abstract
Description
本発明は、ラスタ画像を生成する画像処理装置、画像処理方法、及びプログラムに関する。特に、本発明は、合成を伴う画像処理に関するものであり、ラスタ画像のレンダリングに好適である。 The present invention relates to an image processing apparatus, an image processing method, and a program for generating a raster image. In particular, the present invention relates to image processing that involves composition, and is suitable for rendering raster images.
レンダリングにおける合成処理とは、前面画像と、背面画像とを合成して該合成結果の画像を形成する処理である。一例として、非特許文献1に記載されたPorter−Duffルールでは、12個の合成演算子を体系化し、透過合成に対応している。別の例として、非特許文献2では、PDF(Portable Document Format)のTransparency Groupsという、連続したオブジェクトの集合をまとめて透過合成する方法を規定している。前記連続したオブジェクトの集合(本明細書では、「グループ」と記載する。)は、別のグループを要素に持つことができる。グループが別のグループを要素に持つとは、グループがネスト構造であることを意味する。本明細書では、グループの要素を「グループ要素」と記載する。
The compositing process in rendering is a process of composing the front image and the back image to form an image of the composite result. As an example, the Porter-Duff rule described in Non-Patent
また、レンダリングに関連する技術として、中間データを格納するメモリ領域がオーバーフローしてしまった場合に、該オーバーフロー時点の中間データを一旦レンダリングすることでデータサイズの削減を図る技術が知られている(特許文献1を参照)。この技術のうち特に合成処理によってデータサイズの削減を図ることを、本明細書では、「フラット化」と記載する。 Further, as a technique related to rendering, when a memory area for storing intermediate data overflows, a technique for reducing the data size by temporarily rendering the intermediate data at the time of the overflow is known ( (See Patent Document 1). In this specification, reducing the data size by combining processing among these techniques is referred to as “flattening”.
上述の如く、中間データを格納するメモリ領域がオーバーフローしてしまった場合に、該オーバーフロー時点の中間データを一旦レンダリングすることでデータサイズの削減を図る技術が知られている。しかしながら、グループを有する画像をフラット化する際、本来まとめて合成するべきグループの合成処理においても、段階的に合成処理が行われる場合があり、ユーザーが意図していた色とは異なる色が出力される場合があった。 As described above, when a memory area for storing intermediate data overflows, a technique for reducing the data size by rendering the intermediate data at the time of overflow once is known. However, when flattening images that have groups, the composition processing of groups that should be combined together may be performed step by step, and a color different from the color intended by the user is output. There was a case.
本発明は、上述の課題を解決するための装置を提供することを目的とする。 An object of this invention is to provide the apparatus for solving the above-mentioned subject.
本発明は、入力された描画命令からラスタ画像を生成する画像処理装置であって、前記描画命令から中間データを生成する中間データ生成手段と、前記中間データをレンダリングして前記ラスタ画像を生成するレンダリング手段と、前記中間データ生成手段及び前記レンダリング手段と協働して、前記中間データを合成する合成手段とを備え、前記合成手段がどのオブジェクトまで処理したかを示す実行状況と、前記描画命令におけるグループの合成方法とに基づき、前記合成手段の処理手順を切り替えることを特徴とする。 The present invention is an image processing device that generates a raster image from an input drawing command, and generates intermediate data from the drawing command and intermediate data generating means for generating the raster image by rendering the intermediate data. A rendering unit; a synthesizing unit that synthesizes the intermediate data in cooperation with the intermediate data generating unit and the rendering unit; an execution status indicating to which object the synthesizing unit has processed; and the drawing command The processing procedure of the synthesizing means is switched based on the group synthesizing method.
本発明によれば、グループの途中でフラット化を行った場合であっても、ユーザーが意図していた色が最終的に出力されるようにグループ要素を合成できる。 According to the present invention, even when flattening is performed in the middle of a group, the group elements can be combined so that the color intended by the user is finally output.
以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[実施例1]
(画像処理装置100の構成)
図1は、実施例1における画像処理装置100の構成を示すブロック図である。画像処理装置は、入力部101と、解釈部102と、ラスタ画像処理部103と、出力部104とから成る。入力部101は、画像処理装置100に接続されている外部装置から入力データを受け取る。解釈部102は、入力部101で受け取った入力データを解釈して描画命令を抽出し、背面から前面への描画順に描画命令をソートする。実施例1における入力データはPDL(Page Description Language)で記述されたPDLデータである。入力データの好適なフォーマットは非特許文献2に記載のPDFであり、好適な描画命令は該PDFのオブジェクトである。ラスタ画像処理部103は、解釈部102により抽出された描画命令に基づきラスタ画像を生成する。出力部104は、ラスタ画像処理部103により生成されたラスタ画像に対して、ハーフトーン処理等の画像処理を施して出力データを生成し、該生成した出力データを出力する。
[Example 1]
(Configuration of the image processing apparatus 100)
FIG. 1 is a block diagram illustrating a configuration of an
なお、実施例1における画像処理装置100は、MFP(Multi Function Printer)であり、出力部104は、記録紙に印刷を行うことで出力データを出力する。入力部101と、解釈部102と、ラスタ画像処理部103と、出力部104とは、各種プログラムをRAM(Random Access Memory)にロードし、ロードしたプログラムをCPUが実行することで実現される。また、ラスタ画像処理部103は、CPUではなくラスタ画像を生成するためのASIC(Application Specific Integrated Circuit)で実現されてもよい。
The
(画像処理装置100におけるデータフロー)
図2は、画像処理装置100におけるデータフローを示す図である。ラスタ画像処理部103は、中間データ生成部200と、レンダリング部201と、合成部202とから成る。中間データ生成部200は、描画命令204から中間データ205を生成する。レンダリング部201は、中間データ205をレンダリングしてラスタ画像206を生成する。中間データ生成部200及びレンダリング部201は、夫々の処理において、合成部202を用いて中間データの合成処理を行う。
(Data flow in the image processing apparatus 100)
FIG. 2 is a diagram illustrating a data flow in the
(中間データ生成部200における処理)
図3は、中間データ生成部200により実行される処理のフローチャートである。ステップS300(以降、「ステップS300」を「S300」と略記し、他のステップも同様に略記する。)で、中間データ205のデータサイズが予め定めた閾値以上であるか否かを判断する。中間データ205のデータサイズが閾値以上であると判断した場合、S301で、合成部202を用いて中間データ205を合成し、フラット化したラスタ画像を新たな描画命令にする。中間データ205のデータサイズが閾値以上ではないと判断した場合、又は、S301で中間データ205を合成すると、次にS302で、描画命令204のうち1つを取り出す。次いで、S303で該取り出した描画命令からオブジェクトの描画座標を計算し、S304でオブジェクトのFill情報を生成する。このオブジェクトの描画座標の計算では、ページ座標系から出力座標系への変換を行う。また、オブジェクトがベクタ形式であれば、オブジェクトの輪郭の座標を出力座標系で求める。次いで、S305で、オブジェクトの座標情報及びFill情報に基づき中間データを更新する。ここで未だ中間データを生成していなかった場合には、中間データを新規生成する。次いで、S306で、描画命令204を全て取り出したか否かを判断する。描画命令204を全て取り出していないと判断した場合、S300に戻る。描画命令204を全て取り出していると判断した場合、処理を終了する。
(Processing in the intermediate data generation unit 200)
FIG. 3 is a flowchart of processing executed by the intermediate
(中間データ)
以下、中間データ205を詳細に説明する。
(Intermediate data)
Hereinafter, the
図4は、入力データ203の例を示す図であり、図4(a)が立体関係を表す斜視図であり、図4(b)が断面図であり、図4(c)が上面図である。この例では、オブジェクト400〜402と、BackGround403とが重なっている。中間データ205では、オブジェクト及びBackGroundの重なる範囲毎に、領域に分割する。
4 is a diagram showing an example of the
図5は、中間データ205において領域に分割した様子を示す図である。上面図5(a)を参照すると、領域500〜504の5つの領域に分割していることが分かる。例えば、領域500は、オブジェクト400と、オブジェクト401と、BackGround403との重なりから成る領域である。図5(b)は、領域500〜504の夫々が、どのオブジェクト及びBackGroundの重なりから成るかを表している。
FIG. 5 is a diagram illustrating a state where the
以下、中間データ205のデータ構造を説明する。
Hereinafter, the data structure of the
図6は、領域リスト600のデータ構造を示す図である。領域リスト600は、前記分割した領域に関する情報を管理するデータであり、夫々の領域に対応する該情報をリスト構造で繋げている。好適な実施形態では、入力データ203の1ページにつき、1つの領域リスト600が存在する。図6の領域リスト600では、領域500〜504に対応する前記情報をリスト構造で繋げている。前記情報は、描画座標601と、合成スタックポインタ602とから構成される。描画座標601は、出力座標系のXY座標(左上を原点とする)で示され、好適な実施形態では、領域における、Y座標の最大値と最小値、及び、各Y座標でのX座標の最大値と最小値によって表現される。合成スタックポインタ602は、合成スタックを参照するために用いられるデータである。好適な実施形態では、領域リスト600に含まれる情報は、描画座標601のY座標の最小値に従って昇順ソートされる。
FIG. 6 is a diagram showing the data structure of the
図7は、合成スタックのデータ構造を示す図である。合成スタックは、重なりに関する情報を管理するデータであり、分割後の1つの領域につき、1つの合成スタックが存在する。例えば、合成スタック700は領域500に対応する合成スタックであり、領域500に対応する合成スタックポインタ602から参照される。
FIG. 7 shows the data structure of the composite stack. The composite stack is data for managing information related to overlap, and there is one composite stack for each divided area. For example, the
さらに、合成スタックは、合成ノードをスタック要素として持つ、スタック構造になっている。合成ノードは夫々、重なっているオブジェクト又はBackGroundに対応する情報を持つデータである。例えば、合成スタック700は、3つの合成ノード705〜707を持つ。合成ノード705はオブジェクト400、合成ノード706はオブジェクト401、合成ノード707はBackGround403に夫々対応している。なお、合成ノードはオブジェクト及びBackGroundの重なる順序でスタックに積まれ、背面側がスタックのトップになる(即ち、最も背面側にある合成ノードが最後に積まれる)。また、夫々の合成スタックには、必ず1つ以上の合成ノードが存在する。
Furthermore, the composite stack has a stack structure having composite nodes as stack elements. Each composite node is data having information corresponding to an overlapping object or BackGround. For example, the
合成ノードは、Fill識別子708と、合成演算子709とから構成される。Fill識別子708は、Fillテーブル800内のFill識別子801と結び付いている。図8は、Fillテーブル800の構造を示す図である。Fillテーブル800は、Fill識別子801と、Fill情報802と、参照カウント803との3つの列項目から成る。Fill情報802は、オブジェクト及びBackGroundの色のデータであり、例えば単色のRGB値、グラデーション、画像データ等である。参照カウント803は、いくつの合成ノードから参照されているかをカウントした値である。
The composition node is composed of a
合成演算子709は、夫々の重なりにおいてどのような合成を行うかを指定する演算子である。図7では合成演算子709を「OP」と表記しているが、合成演算子709の具体的な内部構造については図9に示している。図9(a)で示すように、合成演算子709は、色演算子901と、透過演算子902と、透明度903とから成る。色演算子901は、合成結果の色をどのように計算するかを指定する。透過演算子902は、合成結果の透明度をどのように計算するかを指定する。透明度903は、オブジェクト又はBackGroundの透過の程度を表す。好適な実施形態では、色演算子901及び透過演算子902は、非特許文献1のCompositing Operators又は非特許文献2のPDFのブレンドモードで指定される。透明度903は、0〜1の範囲の何れかの値を取り、0は完全な透明、1は不透明(透過無し)を意味する。図9(b)において、合成ノード705〜707の合成演算子709の例を、合成演算子904〜906として夫々示している。なお、合成演算子906のように、最背面の合成ノードに対しては、色演算子901及び透過演算子902を指定しなくてよい。
The
(ラスタ画像生成処理)
以下、レンダリング部201が中間データ205をレンダリングしてラスタ画像206を生成する処理を説明する。
(Raster image generation processing)
Hereinafter, a process in which the
図10は、レンダリング部201によって実行されるラスタ画像生成処理のフローチャートである。まずS1000で、スキャンラインを1つ選択する。好適な実施形態では、ページ原点を通るスキャンラインから主走査方向の順序で選択していく。次いで、S1001に進む。S1001で、スキャンライン上にある領域の情報を、領域リスト600から取得する。次いで、S1002に進む。S1002で、取得した情報に含まれる合成スタックポインタ602が参照する、合成スタックを取得する。次いで、S1003に進む。S1003で、取得した合成スタックに含まれる合成ノードを、合成部202を用いて合成する。S1003での合成が終了すると、合成スタックには合成ノードが1つだけ残っている。次いで、S1004に進む。S1004で、前記1つだけ残っている合成ノードに対応するFill情報802に従い、出力先のメモリアドレスに書き込むことでラスタ画像を生成する。ここで、合成ノードに対応するFill情報802は、Fill識別子708と一致するものをFill識別子801の項目の中からサーチすることでFillテーブル800から取得できる。合成ノードに対応するFill情報802に従って書き込むとき、例えばFill情報802が単色の色値であれば、該色値をそのまま書き込む。また、例えばFill情報802が画像データであれば、該画像データに対する出力解像度への拡縮処理を行い、当該拡縮処理後にクリッピング処理を施してから書き込む。次いで、S1005に進む。S1005で、スキャンライン上にある全ての領域の情報を、取得したか否かを判断する。判断の結果、取得していない場合、S1001に戻り、取得した場合、S1006に進む。S1006で、全てのスキャンラインを選択したか否かを判断する。判断の結果、全てのスキャンラインを選択していない場合、S1000に戻り、全てのスキャンラインを選択した場合、処理を終了する。
FIG. 10 is a flowchart of raster image generation processing executed by the
(ラスタ画像生成処理−合成ノード合成処理)
図11は、S1003で合成部202を使って合成スタックに含まれる合成ノードを合成する処理のフローチャートである。なお、スタックにおけるpushとpopの操作は、当該スタックのトップに存在するノードに対して行われるものとする。また、一時データへのデータ格納は上書きで行われるものとする。まずS1100で、合成スタックに合成ノードが2つ以上あるか否かを判断する。判断の結果、合成スタックに合成ノードが2つ以上ある場合、S1101に進み、合成スタックに合成ノードが2つ以上ない場合、処理を終了する。S1101で、合成スタックから合成ノードをpopして、一時データDestとして格納する。次いで、S1102に進む。S1102で、さらに合成スタックから合成ノードをpopして、一時データSrcとして格納する。次いで、S1103に進む。S1103で、一時データSrcがグループノードか否かを判断する(グループノードについては後で詳しく説明する)。判断の結果、Srcがグループノードである場合、S1104に進み、そうでない場合、S1105に進む。ここではグループノードが存在しないものとして説明する(S1103→S1105)。Srcがグループノードでない場合、S1105で、SrcとDestとの合成演算子709に従って、SrcとDestとの合成結果を計算して、該計算結果を一時データResとして格納する。次いで、S1106に進む。S1106で、Srcとして格納された合成ノードに対する参照カウント803を更新する。次いで、S1107に進む。S1107で、Destとして格納された合成ノードに対する参照カウント803を更新する。次いで、S1108に進む。S1108で、Resとして格納されたノードのFill情報がFillテーブル800にあるか否かを判断する。判断の結果、Resして格納されたノードのFill情報がFillテーブル800にある場合、S1110に進み、Resして格納されたノードのFill情報がFillテーブル800にない場合、S1109に進む。S1109で、Resとして格納されたノードに対応するFill識別子と、Fill情報と、参照カウントとを、Fillテーブル800に追加する。次いで、S1110に進む。S1110で、Resとして格納された合成ノードを合成スタックにpushする。次いで、S1100に戻る。S1100で、合成スタックに合成ノードが2つ以上ないと判断された場合、即ち、合成スタックに合成ノードが1つだけ残っている場合に、処理を終了する。処理を終了する際に、Src、Dest、Resとして格納されていた一時データは破棄される。
(Raster image generation process-Composite node composite process)
FIG. 11 is a flowchart of a process for synthesizing the synthesis nodes included in the synthesis stack using the
(ラスタ画像生成処理−合成ノード合成処理−参照カウント更新処理)
図12は、S1106及びS1107における、参照カウント803の更新処理のフローチャートである。まずS1200で、対応する参照カウント803を1つ減らす。次いで、S1201に進む。S1201で、参照カウントが0になったか否かを判断する。判断の結果、参照カウントが0になった場合、S1202に進み、参照カウントが0になっていない場合、処理を終了する。S1202で、対応するFill識別子801と、Fill情報802と、参照カウント803との項目を、Fillテーブル800から行ごと削除し、処理を終了する。
(Raster image generation process-Composite node composite process-Reference count update process)
FIG. 12 is a flowchart of the update processing of the
(グループの説明)
以下、グループについて説明する。
(Group description)
Hereinafter, the group will be described.
図13は、グループの例を示す図であり、図13(a)は斜視図であり、図13(b)は断面図である。この例では、BackGround1303の上の3つのオブジェクト1300〜1302がグループ1304を構成するグループ要素になっている。
FIG. 13 is a diagram illustrating an example of a group, FIG. 13A is a perspective view, and FIG. 13B is a cross-sectional view. In this example, three
図14は、図13の例における、合成スタックの構造を示す図である。グループ要素は、グループスタート(Grp Start)及びグループエンド(Grp End)という特殊な合成ノード(本明細書では「グループノード」と呼ぶ)に挟まれる。このとき、グループスタートが背面(合成スタックのトップ)側、グループエンドが前面(合成スタックのボトム)側になる。グループスタートは、グループ演算子Grp OPとセットになっており、グループ演算子はグループの合成方法を指定している。実施例1におけるグループの合成方法は、IsolatedかNon−Isolatedか、及び、KnockoutかNon−Knockoutかによる計4(=2×2)通りの方法を想定している。夫々の合成方法については、非特許文献2のPDFのTransparency Groupsで既定されている。
FIG. 14 is a diagram showing the structure of the composite stack in the example of FIG. The group element is sandwiched between special composite nodes (referred to herein as “group nodes”) called group start (Grp Start) and group end (Grp End). At this time, the group start is on the back (top of the composite stack) side, and the group end is on the front (bottom of the composite stack) side. The group start is set with the group operator Grp OP, and the group operator designates a group synthesis method. The group synthesis method in the first embodiment assumes a total of 4 (= 2 × 2) methods depending on whether it is Isolated or Non-Isolated, and Knockout or Non-Knockout. The respective synthesis methods are defined in the PDF Transparency Groups of
(ラスタ画像生成処理−合成ノード合成処理−グループノード処理)
図11のS1103でSrcがグループノードであると判断した場合、S1104でグループノードを処理して、S1100に戻る。図15は、S1104の詳細なフローチャートである。まずS1500で、グループノードがグループスタートであるか否かを判断する。判断の結果、グループノードがグループスタートである場合、S1501に進み、グループノードがグループスタートではない(即ち、グループノードがグループエンドである)場合、S1507に進む。S1501で、グループ演算子を参照して合成方法がKnockoutであるか否かを判断する。判断の結果、合成方法がKnockoutである場合、S1502に進み、合成方法がKnockoutではない場合、S1503に進む。S1502で、グループの最前面以外のグループ要素を削除する。次いで、S1503に進む。S1503で、グループ演算子を参照して合成方法がIsolatedであるか否かを判断する。判断の結果、合成方法がIsolatedである場合、S1504に進み、合成方法がIsolatedではない場合、S1505に進む。S1504で、完全に透明な合成ノードを作成し、合成スタックにpushする。次いで、S1506に進む。一方、S1503の判断の結果、合成方法がIsolatedではない場合、S1505で、Destのコピーの合成ノードを作成し、合成スタックにpushする。次いで、S1506に進む。S1504又はS1505で、合成スタックに合成ノードをpushすると、続いてS1506で、Destをグループスタックという一時スタックにpushして、処理を終了する。なお、グループスタックは初期状態で空である。S1500で、グループノードがグループスタートではない(即ち、グループノードがグループエンドである)と判断した場合、S1507で、Destを合成スタックにpushする。次いで、S1508に進む。S1508で、グループスタックから合成ノードをpopして、該popした合成ノードを合成スタックにpushして、処理を終了する。
(Raster image generation process-Composite node composite process-Group node process)
If it is determined in S1103 in FIG. 11 that Src is a group node, the group node is processed in S1104, and the process returns to S1100. FIG. 15 is a detailed flowchart of S1104. First, in S1500, it is determined whether or not the group node is a group start. As a result of the determination, if the group node is a group start, the process proceeds to S1501. If the group node is not a group start (that is, the group node is a group end), the process proceeds to S1507. In S1501, it is determined whether or not the synthesis method is Knockout with reference to the group operator. As a result of the determination, if the combining method is Knockout, the process proceeds to S1502, and if the combining method is not Knockout, the process proceeds to S1503. In step S1502, group elements other than the forefront of the group are deleted. Next, the process proceeds to S1503. In step S1503, it is determined whether the synthesis method is Isolated with reference to the group operator. As a result of the determination, if the combining method is Isolated, the process proceeds to S1504, and if the combining method is not Isolated, the process proceeds to S1505. In S1504, a completely transparent composition node is created and pushed to the composition stack. Next, the process proceeds to S1506. On the other hand, if the result of determination in S1503 is that the composition method is not Isolated, a composite node for a copy of Dest is created and pushed to the composition stack in S1505. Next, the process proceeds to S1506. In step S1504 or S1505, when a composite node is pushed to the composite stack, in step S1506, Dest is pushed to a temporary stack called a group stack, and the process ends. The group stack is empty in the initial state. If it is determined in S1500 that the group node is not a group start (that is, the group node is a group end), Dest is pushed to the composite stack in S1507. Next, the process proceeds to S1508. In step S1508, the composite node is popped from the group stack, the popped composite node is pushed to the composite stack, and the process ends.
図16は、図15のフローチャートにおいて、グループノードがグループスタートであるときの合成スタック等の様子を表した図である。図16では、図の左から右へ処理が流れる様子を示している。図16の例ではグループの合成方法がKnockoutかつIsolatedの場合を想定している。グループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード1601と合成ノード1602とは削除される。また、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード1603が合成スタックにpushされる。さらに、Destとして格納された合成ノード1604はグループスタックにpushされる(S1500→S1501→S1502→S1503→S1504→S1506)。
FIG. 16 is a diagram showing the state of the composite stack and the like when the group node is a group start in the flowchart of FIG. FIG. 16 shows a state in which processing flows from the left to the right in the figure. In the example of FIG. 16, it is assumed that the group combining method is Knockout and Isolated. Since the group combining method is Knockout, the
図17は、図16の続きでグループノードがグループスタートでない(即ち、グループノードがグループエンドである)ときの合成スタック等の様子を表した図である。図17も、図16と同様に図の左から右へ処理が流れる様子を示している。合成ノード1600と、合成ノード1603とは、図11で示したフローチャートに沿って合成されており、図17を参照すると、該合成結果である合成ノード1700が合成スタックに積まれている。なお、その合成の際に、Srcとして格納されていたグループスタートは上書きされて消えている。合成ノード1700はDestにpopされた後、Srcがグループエンドであるため、再度合成スタックにpushされる。そして、グループスタックに積まれていた合成ノード1604が、グループスタックからpopされて、合成スタックにpushされる(S1101→S1102→S1103→S1104,S1500→S1507→S1508)。
FIG. 17 is a continuation of FIG. 16 and shows the state of the composite stack and the like when the group node is not the group start (that is, the group node is the group end). FIG. 17 also shows a state in which processing flows from the left to the right in the figure as in FIG. The
後の合成処理は、図11で示した通りである。これまでに説明した処理フローによって、フラット化を行う場合を除いて、一連の合成処理が実現される。 The subsequent synthesis process is as shown in FIG. A series of composition processing is realized by the processing flow described so far, except when flattening is performed.
(フラット化)
以下、フラット化について説明する。
(Flattened)
Hereinafter, flattening will be described.
上(「中間データ生成部200の処理」の章)で説明した通り、図3のS300で、中間データ205のデータサイズが閾値以上と判断した場合、合成部202を用いてフラット化を行う。フラット化とはS300の判断時点の中間データ205である合成ノードを合成する処理であり、実施例1においては参照されなくなったFill情報802の項目等をFillテーブル800から行ごと削除することで、データサイズの削減を実現する。
As described above (Chapter “Processing of Intermediate
フラット化は、グループの途中までしか中間データ205を生成していないときでも、行われる可能性がある。図18は、グループの途中でフラット化を行う場合の中間データ205(特に合成スタック)の例を示す図である。図18(a)の例では、グループ1800のグループ要素に、3つのオブジェクト1801〜1803がある。ここで、オブジェクト1802まで中間データ205を生成した直後にフラット化が行われる場合、オブジェクト1801がどのようなオブジェクトであり、どのように重なるかは該生成した直後の時点では不明である。図18(b)は、前記時点での中間データ205の合成スタックを示す図である。グループの途中までしか中間データ205を生成していないときにフラット化が行われた状況であっても最終的に意図していた色が出力されるように合成する方法について、以下説明する。
Flattening may be performed even when the
図19は、フラット化を行う場合のグループ処理のフローチャートである。図19に示すフローに応じてグループ処理の方法が決定される。S1900〜S1906は、フラット化を行わない場合(図15)と同様である。しかし、S1907で、Src(即ちグループスタート)もグループスタックにpushする点で、図15と異なる。 FIG. 19 is a flowchart of group processing when flattening is performed. The group processing method is determined according to the flow shown in FIG. S1900 to S1906 are the same as when flattening is not performed (FIG. 15). However, in S1907, Src (that is, group start) is also pushed to the group stack, which is different from FIG.
ここで図20に、フラット化を行う場合の合成部202によって実行される合成ノード合成処理のフローチャートを示す。S2000〜S2010は、フラット化を行わない場合(図11)と同様である。ただし、S2000で、合成ノードが2つ以上ないと判断した場合、S2011でグループスタックが空か否かを判断する点で図11と異なる。S2011における判断の結果、グループスタックが空である場合、処理を終了し、グループスタックが空ではない場合、S2012に進む。グループスタックが空ではない場合とは、グループの途中までしか中間データ205を生成していない状態で、フラット化を行っていることを意味する。このとき、S2012で、グループスタックから合成ノードをpopして、Destとして格納する。次いで、S2013に進む。S2013で、Destがグループスタートであるか否かを判断する。判断の結果、Destがグループスタートである場合、S2014に進み、Destがグループスタートではない場合、S2015に進む。S2014で、Destをグループリスタートという特殊な合成ノードに変更する。なお、グループリスタートもグループノードの1つである。グループリスタートもグループ演算子とセットになっており、該セットになっているグループ演算子はグループスタートのときと同じグループ演算子にしておく。次いで、S2015に進む。S2015で、Destを合成スタックにpushする。次いで、S2011に戻る。
Here, FIG. 20 shows a flowchart of a synthesis node synthesis process executed by the
図19の説明に戻る。S1900で、グループノードがグループスタートではないと判断した場合、S1908に進む。S1908で、グループノードがグループリスタートであるか否かを判断する。判断の結果、グループノードがグループリスタートである場合、S1909に進む。S1909で、グループ要素が2つ以上であり、かつ、合成方法がKnockoutであるか否かを判断する。判断の結果、グループ要素が2つ以上であり、かつ、合成方法がKnockoutである場合、S1902に進む。そうでない場合、S1906に進む。S1908及びS1909の処理分岐により、必要な場合にのみ、IsolatedかNon−Isolatedかに応じて分けられる合成ノード(完全に透明もしくはDestのコピー)を、合成スタックにpushしている。S1908でグループノードがグループリスタートではない(即ち、グループノードがグループエンドである)と判断した場合、S1910に進む。ここで、S1910及びS1912は、フラット化を行わない場合の処理(図15のS1507及びS1508)と同様である。但し、S1911において、グループスタックのトップに積まれている、グループスタートをpopして破棄している点で、図15と異なる。 Returning to the description of FIG. If it is determined in S1900 that the group node is not a group start, the process advances to S1908. In step S1908, it is determined whether the group node is a group restart. As a result of the determination, if the group node is a group restart, the process proceeds to S1909. In S1909, it is determined whether there are two or more group elements and the combining method is Knockout. As a result of the determination, if there are two or more group elements and the combining method is Knockout, the process proceeds to S1902. Otherwise, the process proceeds to S1906. By the processing branching of S1908 and S1909, only when necessary, a synthesis node (completely transparent or a copy of Dest) divided according to whether it is Isolated or Non-Isolated is pushed to the synthesis stack. If it is determined in S1908 that the group node is not a group restart (that is, the group node is a group end), the process proceeds to S1910. Here, S1910 and S1912 are the same as the processes when flattening is not performed (S1507 and S1508 in FIG. 15). However, in S1911, it is different from FIG. 15 in that the group start that is stacked at the top of the group stack is popped and discarded.
図21は、図19及び図20のフローチャートにおいて、フラット化を行っているときの合成スタック等の様子を表した図である。この例では、グループの合成方法がKnockoutかつIsolatedの場合を想定している。グループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード2101は削除される(S1901→S1902)。また、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード2102が合成スタックにpushされる(S1903→S1904)。さらに、Destとして格納された合成ノード2103と、Srcとして格納されたグループスタート2104とがグループスタックにpushされる(S1906→S1907)。その後、合成ノード2100と、合成ノード2102とが合成されて、該合成結果の合成ノード2105が合成スタックにpushされる(S2000→・・・→S2010)。これにより、合成スタックに合成ノードが1つだけになるため、グループスタック内の全ての要素が合成スタックにpushされる。このとき、グループスタート2104はグループリスタート2106に変更される(S2000→S2011→S2012→S2013→S2014→S2015)。
FIG. 21 is a diagram showing a state of a composite stack and the like when flattening is performed in the flowcharts of FIGS. 19 and 20. In this example, it is assumed that the group combining method is Knockout and Isolated. Since the group combining method is Knockout, the combining node 2101 that is a group element other than the forefront of the group is deleted (S1901 → S1902). Since the group composition method is Isolated, the
図22は、図21の続きで中間データ205の生成が完了し、レンダリング部201で合成処理を行うときの合成スタック等の様子を表した図である。中間データ205の生成が完了しているため、合成スタックにグループエンド2200と、合成ノード2201とが積まれている。グループ要素が2つ以上かつグループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード2105は削除される(S1908→S1909→S1902)。さらに、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード2102が再び合成スタックにpushされる(S1903→S1904)。そして、Destとして格納された合成ノード2103と、Srcとして格納されたグループリスタート2106とがグループスタックにpushされる(S1906→S1907)。その後、合成ノード2201と、合成ノード2102とが合成されて、該合成結果の合成ノード2203が合成スタックにpushされる(S2000→・・・→S2010)。グループエンド2200に到達すると、Destとして格納された合成ノード2203と、グループスタック内の合成ノード2103とが合成スタックにpushされる(S1910,S1912)。このとき、グループスタック内のグループリスタート2106は、グループスタックからpopされて破棄される(S1911)。
FIG. 22 is a diagram showing the state of the synthesis stack and the like when the generation of the
以上説明したようにフラット化の実行状況と、グループの合成方法とに応じて合成処理手順を切り替えることで、グループの途中でフラット化を行った場合であっても、最終的に意図していた色が出力されるように合成できる。 As described above, even if flattening is performed in the middle of a group by switching the compositing process procedure according to the execution status of flattening and the group compositing method, it was finally intended It can be combined so that colors are output.
[実施例2]
グループの合成方法がIsolatedのときに、合成処理を行う色空間をグループ演算子で指定するようにしてもよい。
[Example 2]
When the group composition method is Isolated, a color space for performing composition processing may be designated by a group operator.
なお、図19及び図20で説明したフローチャートは、フラット化を行わない場合であっても意図していた色が出力されるように合成できるため、フラット化を行わない場合にも共通して、これらのフローチャートの合成処理を用いてよい。 In addition, since the flowchart demonstrated in FIG.19 and FIG.20 can be synthesize | combined so that the color which was intended even if it is a case where flattening is not performed, also in the case where flattening is not performed, You may use the synthetic | combination process of these flowcharts.
[その他の実施例]
本発明の目的は、前述した実施例の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体を、システム又は装置に供給し、システム又は装置(具体的にはCPUやMPU)がプログラムコードを読み出し実行することによっても、達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することとなり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
[Other Examples]
An object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and the system or apparatus (specifically, CPU or MPU) stores the program code. This can also be achieved by executing read. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM、DVD等を用いることが出来る。 As a storage medium for supplying the program code, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, DVD, or the like is used. I can do it.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施例の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSが実際の処理の一部又は全部を行っても良い。OSの処理によって前述した実施例の機能が実現される場合も、本発明の範囲に含まれる。 In addition, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the OS running on the computer performs one of the actual processing based on the instruction of the program code. Part or all may be performed. The case where the functions of the above-described embodiments are realized by the processing of the OS is also included in the scope of the present invention.
更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、処理が実行されても良い。また、機能拡張ボードや機能拡張ユニットに備わるCPUが実際の処理の一部又は全部を実行しても良く、機能拡張ボードや機能拡張ユニットに備わるCPUの実行処理によって前述した実施例の機能が実現される場合も、本発明の範囲に含まれる。 Furthermore, the program code read from the storage medium is written in the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, and then the process is executed based on the instruction of the program code. May be. In addition, the CPU provided in the function expansion board or function expansion unit may execute part or all of the actual processing, and the functions of the above-described embodiments are realized by the execution processing of the CPU provided in the function expansion board or function expansion unit. Such cases are also included in the scope of the present invention.
また、前述の実施例の機能を実現するためのプログラムコードを、1つのコンピュータ(CPU、MPU)で実行しても良いし、複数のコンピュータが協働することによって実行しても良い。更に、プログラムコードをコンピュータが実行しても良いし、プログラムコードの機能を実現するための回路等のハードウェアを設けても良い。または、プログラムコードの一部をハードウェアで実現し、残りの部分をコンピュータが実行しても良い。 Further, the program code for realizing the functions of the above-described embodiments may be executed by one computer (CPU, MPU) or may be executed by cooperation of a plurality of computers. Further, the program code may be executed by a computer, or hardware such as a circuit for realizing the function of the program code may be provided. Alternatively, a part of the program code may be realized by hardware and the remaining part may be executed by a computer.
Claims (12)
前記描画命令から中間データを生成する中間データ生成手段と、
前記中間データをレンダリングして前記ラスタ画像を生成するレンダリング手段と、
前記中間データ生成手段及び前記レンダリング手段と協働して、前記中間データを合成する合成手段と
を備え、
前記合成手段がどのオブジェクトまで処理したかを示す実行状況と、前記描画命令におけるグループの合成方法とに基づき、前記合成手段の処理手順を切り替えることを特徴とする画像処理装置。 An image processing apparatus that generates a raster image from an input drawing command,
Intermediate data generating means for generating intermediate data from the drawing command;
Rendering means for rendering the intermediate data to generate the raster image;
A synthesizing unit for synthesizing the intermediate data in cooperation with the intermediate data generating unit and the rendering unit;
An image processing apparatus, wherein the processing procedure of the combining means is switched based on an execution status indicating to which object the combining means has processed and a group combining method in the drawing command.
前記描画命令から中間データを生成する中間データ生成ステップと、
前記中間データをレンダリングして前記ラスタ画像を生成するレンダリングステップと、
前記中間データ生成ステップ及び前記レンダリングステップにおいて、前記中間データを合成する合成ステップと
を備え、
前記合成ステップにおいてどのオブジェクトまで処理したかを示す実行状況と、前記データにおけるグループの合成方法とに基づき、前記合成ステップにおける処理手順を切り替えることを特徴とする画像処理方法。 An image processing method for generating a raster image from an input drawing command,
An intermediate data generation step of generating intermediate data from the drawing command;
A rendering step of rendering the intermediate data to generate the raster image;
A synthesis step of synthesizing the intermediate data in the intermediate data generation step and the rendering step;
An image processing method, wherein the processing procedure in the synthesis step is switched based on an execution status indicating which object has been processed in the synthesis step and a group synthesis method in the data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018095500A JP6636083B2 (en) | 2018-05-17 | 2018-05-17 | Image processing apparatus, control method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018095500A JP6636083B2 (en) | 2018-05-17 | 2018-05-17 | Image processing apparatus, control method, and program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014079721A Division JP6341732B2 (en) | 2014-04-08 | 2014-04-08 | Printing apparatus, printing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018152113A true JP2018152113A (en) | 2018-09-27 |
JP6636083B2 JP6636083B2 (en) | 2020-01-29 |
Family
ID=63680438
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018095500A Active JP6636083B2 (en) | 2018-05-17 | 2018-05-17 | Image processing apparatus, control method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6636083B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11405520B2 (en) | 2020-01-24 | 2022-08-02 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data |
-
2018
- 2018-05-17 JP JP2018095500A patent/JP6636083B2/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11405520B2 (en) | 2020-01-24 | 2022-08-02 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data |
US11637944B2 (en) | 2020-01-24 | 2023-04-25 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data |
Also Published As
Publication number | Publication date |
---|---|
JP6636083B2 (en) | 2020-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4365950B2 (en) | Graphic object processing method and apparatus for high-speed raster format rendering | |
US8207972B2 (en) | Quick pixel rendering processing | |
EP2905705A1 (en) | Client server interaction for graphical/audio applications | |
JP4343344B2 (en) | A high-speed image rendering method using raster graphic objects | |
US7593012B2 (en) | Graphics image generation method, program and statistical data drawing apparatus | |
JP2004318832A (en) | Reducing method of number of compositing operations performed in pixel sequential rendering system | |
US8869051B2 (en) | Systems and methods for using separate editing applications from within electronic content creation applications while preventing data loss | |
JP2008033692A (en) | Image processing device and its control method, and, computer program and computer readable storage medium | |
JP7213616B2 (en) | Information processing device, information processing program, and information processing method. | |
JP6636083B2 (en) | Image processing apparatus, control method, and program | |
JPH01304588A (en) | Clipping processing system | |
CN108090943A (en) | Render the methods, devices and systems of curve | |
JP6341732B2 (en) | Printing apparatus, printing method, and program | |
JP4646436B2 (en) | Digital image processing device | |
JP4827659B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP4143613B2 (en) | Drawing method and drawing apparatus | |
US7365743B1 (en) | Assignments for parallel rasterization | |
CN109145263B (en) | Document processing method and device and computer readable storage medium | |
KR20160011326A (en) | Electronic sheet music editing system and providing method thereof | |
US7061494B1 (en) | Method and apparatus for hardware optimization of graphics pipeline functions | |
US11410357B2 (en) | Pixel-based techniques for combining vector graphics shapes | |
JP4479957B2 (en) | Curved surface subdivision device | |
US10387757B2 (en) | Multicore printer definition language processing | |
Halladay et al. | Your First Shaders | |
JP2023166265A (en) | Image processing apparatus, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180618 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190610 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190618 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190814 |
|
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: 20191119 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191217 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6636083 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |