JP3750396B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP3750396B2 JP3750396B2 JP04235999A JP4235999A JP3750396B2 JP 3750396 B2 JP3750396 B2 JP 3750396B2 JP 04235999 A JP04235999 A JP 04235999A JP 4235999 A JP4235999 A JP 4235999A JP 3750396 B2 JP3750396 B2 JP 3750396B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- variable
- intermediate code
- pixel
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 223
- 238000006243 chemical reaction Methods 0.000 claims description 27
- 230000015572 biosynthetic process Effects 0.000 claims description 25
- 238000003786 synthesis reaction Methods 0.000 claims description 25
- 230000002194 synthesizing effect Effects 0.000 claims description 16
- 238000001514 detection method Methods 0.000 claims description 13
- 238000000605 extraction Methods 0.000 claims description 6
- 238000011161 development Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 description 84
- 239000013598 vector Substances 0.000 description 65
- 230000008569 process Effects 0.000 description 54
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 11
- 239000003973 paint Substances 0.000 description 10
- 238000010422 painting Methods 0.000 description 8
- 238000000926 separation method Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 239000003086 colorant Substances 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Dot-Matrix Printers And Others (AREA)
- Color, Gradation (AREA)
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
Description
【0001】
【発明の属する技術分野】
この発明は、画像処理装置に関し、特に文字・線画を表す文字・線画データをラスター画像データに変換して出力する画像処理装置に関する。
【0002】
【従来の技術】
近年、パーソナルコンピュータ(以下、PCという)やワークステーション(以下、WSという)で作成された文書をプリントアウトする機会が増えている。特に、オフィスでプリントアウトされる文書は、文字・グラフィクスあるいはスキャナで読み込んだ写真等が同一ページ内にレイアウトされたものが多く、最近では様々な色で彩られたカラー文書もプリントアウトする機会が増えている。また、複数のPCやWSがネットワークを介してプリンタを共有するシステム構成がとられることも多く、プリンタに対する高速化・高画質化の要求はますます強くなっている。
【0003】
ところで、PCやWSからプリンタへのデータ転送時間を短縮するためと、特性の異なるプリンタでもできるだけ同一の内容でプリントアウトするために、文書を描画コマンドの集合体であるプリント記述言語(以下、PDLという)で記述してプリンタに転送し、プリンタでPDLを解釈してラスター画像に変換してプリントアウトすることが一般的となっている。しかしながら、現存するプリンタの解像度に合せてPDLをラスター画像に変換してプリントアウトすると、特に文字や線画のエッジにジャギーを生じてしまう。
【0004】
そこで、上述したジャギーを低減するために、例えば米国特許第4,847,641号に開示されている技術のように、変換後のラスター画像からジャギーが発生しうる領域をパターンマッチンクによって抽出して補正を施す方法が提案されている。しかしながら、この方法では、例えば明朝体文字のトメやハネのように、補正を施すべきでない領域であっても補正されてしまい、字体の変形を引き起こしてしまう。一方、太さが均一で等間隔かつ平行な直線群が解像度の制限によりラスター画像への変換の際に、太さにばらつきが生じたり、あるいは等間隔でない平行な直線群に変換されるような場合には、上記従来技術では補正できない。
【0005】
そこで、例えば特開平6−40074号公報に開示されている技術のように、一旦PDLをプリンタの解像度より高い解像度の2値ラスター画像に変換し、該ラスター画像を解像度変換によってプリンタの解像度と同じ解像度の多値ラスター画像に変換して、画素値に応じてドットの大きさを変える方法が提案されている。しかしながら、後者の技術では、一旦PDLをプリンタの解像度より高い解像度の2値ラスター画像に変換する必要があるため、前者の技術と比較すると多大な記憶領域を要する。そこで、特開平6−168334号公報に開示されている技術のように、一旦PDLをプリンタの解像度より高い解像度の2値ラスター画像を表す2値コードデータに変換し、2値コードデータをプリンタの解像度と同じ解像度の多値ラスター画像を表す多値コードデータに変換して、多値コードデータを多値ラスター画像に変換する方法が提案されている。
【0006】
【発明が解決しようとする課題】
ところで、プリンタでプリントアウトするドキュメントには、文字や線画以外にもグラフィクスや写真等の絵柄が混在することがある。高い画質のプリントアウトを得るためには、文字や線画には解像性が要求され、絵柄には階調性が要求される。したがって、文字や線画には上述した技術のようにジャギーを低減する処理が適用され、絵柄には面積階調処理が適用される。
【0007】
また、さらに画質を高めるためには、例えばグラフィクスと写真とで面積階調処理の内容を異ならせるといったように、分類をさらに細かくし、その分類毎に適用する処理を変更する手法もある。しかしながら、ラスター画像から文字や線画、あるいはグラフィクスや写真等を完全に分離することは困難である。したがって、従来技術では、文字や線画に面積階調処理が適用されたり、絵柄にジャギーを低減する処理が適用される場合があり、画質向上を図ることが難しいという問題があった。
【0008】
この発明は上述した事情に鑑みてなされたもので、ページ記述言語で記述された画像情報をラスター画像に変換する際に必要な記憶容量を少なくでき、より高画質のプリントアウトを得ることができる画像処理装置を提供することを目的としている。
【0009】
【課題を解決するための手段】
上述した問題点を解決するために、請求項1記載の発明では、ページ記述言語で記述された画像情報を入力する入力手段と、前記入力手段で入力された前記画像情報の中から文字または線画部を抽出する抽出手段と、前記抽出手段で抽出した文字または線画部を、ラスター展開するための中間的なコードであり、2値の階調を有する第1の中間コードに変換する第1の変換手段と、前記第1の変換手段により変換された第1の中間コードを、当該第1の中間コードより低い解像度で多値の階調を有する第2の中間コードに変換する第2の変換手段と、前記第1の変換手段により変換された第1の中間コードまたは前記第2の変換手段により変換された第2の中間コードに基づいて、前記入力手段で入力された前記画像情報の所定の領域毎に、当該領域を占める画像の種類を表すタグ情報を生成するタグ生成手段とを具備し、前記タグ生成手段が生成する前記タグ情報は、前記第2の中間コードで表された文字または線画部であることを表す情報を少なくとも含むことを特徴とする。
【0010】
この発明によれば、ページ記述言語で表され、入力手段から入力された画像情報の中から抽出手段により文字または線画部を抽出し、抽出した文字または線画部を第1の変換手段により2値の階調を有する第1の中間コードに変換し、第1の中間コードを第2の変換手段により上記第1の中間コードより低い解像度で多値の階調を有する第2の中間コードに変換する。また、タグ生成手段により、第1の中間コードまたは第2の中間コードに基づいて、入力された画像情報の所定の領域ごとに当該領域を占める画像の種類を表し、当該第2の中間コードで表された文字または線画部であることを表す情報を少なくとも含むタグ情報を生成する。したがって、ページ記述言語で記述された画像情報をラスター画像に変換する際に必要な記憶容量を少なくすることが可能となるとともに、より高画質のプリントアウトを得ることが可能となる。
【0011】
【発明の実施の形態】
次に、図面を参照してこの発明の実施形態について説明する。なお、以下において、画像データは各色成分の1画素あたりの階調数は「256」であり、末尾に「b」が付加されている数は2進表記、「h」が付加されている数は16進表記、何も付加されていない数は10進表記とする。また、以下においては、1つの色成分の処理のみ説明するが、複数色成分の処理については、1つの色成分の処理を色成分の数だけ適用するか、あるいは全ての色成分を同時平行に処理してもよい。
【0012】
まず、画像データをランレングスコーディングした形式のコードデータについて説明する。コードデータは、ラスター画像をライン単位でランレングスコーディングしたものであり、ある値の画素が主走査方向のある位置からどれだけ連続するかを記述したものである。例えば、画素値「255(黒画素)」の画素がライン先頭から10番目の画素から20画素連続している場合、「255」、「10」、「20」の3つの整数値が1組のデータとして記述される。このとき、画素値「0」の画素については記述する必要がないため、ラスター画像に比較するとデータ量を圧縮することができる。また、2値画像を対象とした場合には、画素値についても記述する必要がないため、さらにデータ量を圧縮することができる。一方、ラスター画像での種々の画像処理は、コードデータ間の操作に置き換えられるので、より高速に処理を行うことができる。以下、上述したコードデータをエッジリストと呼ぶこととし、エッジリストの具体例およびエッジリスト間の操作については後述する。
【0013】
A.実施形態の構成
図1は、本発明の実施形態による画像処理装置の一構成例を示すブロック図である。図において、11はコマンド分離部、12は多値文字処理部、13は2値文字処理部、14は多値ベクトル処理部、15は2値ベクトル処理部、16はグラフィクス処理部、17はラスターイメージ処理部、18は合成部である。コマンド分離部11は、入力端Aに入力されたPDLを、多値文字描画コマンド、2値文字描画コマンド、多値ベクトル描画コマンド、2値ベクトル描画コマンド、グラフィクス描画コマンド、ラスターイメージ描画コマンドの6種類のコマンドに分類し、各々、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15、グラフィクス処理部16、ラスターイメージ描画コマンド17に供給する。
【0014】
なお、多値文字描画コマンドおよび2値文字描画コマンドは、ASCIIコード等の文字コードと、書体名・ポイント数・フェース・ウェイト・色等の印字特性を示す情報とからなり、さらに、文字描画を多値または2値のいずれで行うかを示す情報も含む。また、多値ベクトル描画コマンドおよび2値ベクトル描画コマンドは、直線・曲線等の線を表す情報であり、始点・終点・経由点等の座標情報および線幅・線の種類・線の色等の画情報からなり、さらに、ベクトル描画を多値または2値のいずれで行うかを示す情報も含む。また、グラフィクス描画コマンドは、領域を塗り潰す色を表す情報であり、塗り潰す領域の座標情報および塗り潰す色・塗り潰し方法を表す情報を含む。また、ラスターイメージ描画コマンドは、ラスター画像をPDLで表現したものであり、主走査および副走査方向の画素数・解像度・色成分構成等の情報を含む。
【0015】
多値文字処理部12は、入力された多値文字描画コマンドを、プリンタ解像度のn倍(nは2以上の整数)の解像度の2値のエッジリスト(以下、高解像度エッジリストという)に変換した後、該エッジリストをプリンタ解像度と同じ解像度の多値のエッジリスト(以下、多値エッジリストという)に変換して合成部18に供給する。2値文字処理部13は、入力された2値文字描画コマンドを、プリンタ解像度と同じ解像度の2値のエッジリスト(以下、2値エッジリストという)に変換し、合成部18に供給する。多値ベクトル処理部14は、入力された多値ベクトルコマンドを、高解像度エッジリストに変換した後、該エッジリストを多値エッジリストに変換して合成部18に供給する。
【0016】
2値ベクトル処理部15は、入力されたベクトルコマンドを、2値エッジリストに変換して合成部18に供給する。グラフィクス処理部16は、入力されたグラフィクス描画コマンドを、多値エッジリストに変換して合成部18に供給する。ラスターイメージ処理部17は、入力されたラスターイメージ描画コマンドを、多値エッジリストに変換して合成部18に供給する。合成部18は、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15、グラフィクス処理部16、ラスターイメージ処理部17から供給されるエッジリストを合成するとともに、ラスター画像に変換して出力端Aに出力する。また、ラスター画像への変換と同時にラスター画像の各画素の分類を示す分類データを生成し、出力端Bに出力する。なお、分類データには、エッジリストがどの処理部から出力されたかを示す情報とともに、異なる処理部から出力されたエッジリストがそれぞれ表すラスター画像の境界を示す情報も含まれる。
【0017】
ここで、図2は、PDLの一例を示す概念図である。以下、図2に例示するPDLが入力端Aに入力された場合を例にとってさらに詳細に説明する。なお、図2において、TYPEは文字描画コマンド、LINEは直線描画コマンド、PAINTはグラフィクス描画コマンド、RASTERはラスターイメージ描画コマンドである。また、コマンド名に続いて括弧()で括られた部分は各コマンドのパラメータ、括弧{}で括られた部分はラスターイメージデータである。TYPEコマンドの4つのパラメータは、先頭から順に描画開始x座標、描画開始y座標、フォントの種類、ポイント数、描画文字列、描画モードであり、図2の1行目は、文字列「abcdefg」を座標(x1,y1)を始点として多値モードで、2行目は、2値モードで描画することを意味する。
【0018】
また、LINEコマンドの6つのパラメータは、先頭から順に描画開始x座標、描画開始y座標、描画終了x座標、描画終了y座標、線幅、描画モードであり、図2の3行目は、座標(x2,y2)から(x3,y3)に1ポイントの太さの直線を多値モードで、4行目は、2値モードで描画することを意味する。次に、図2の5行目は、座標(x4,y4)と座標(x5、y5)とを結ぶ直線を対角線とする矩形領域を、色空間をRGBとして指定色RED(赤色)で塗り潰すことを意味する。また、図2の6行目は、座標(x6,y6)を左上隅として、p画素×lラインのラスターイメージを、色空間をRGBとし、主走査方向の解像度rx、副走査方向の解像度ryで括弧{}内のラストイメージデータにしたがって描画することを意味する。なお、上記コマンドおよび各コマンドのパラメータは一例であり、コマンド名、各コマンドのパラメータ内容は、上記内容に限定されない。また、各描画動作に対するコマンドの設定も上記内容に限らず、例えばTYPEコマンドを2つ以上のコマンドに分割するといったように変更してもよい。
【0019】
コマンド分離部11は、多値文字描画コマンドとして図2に示す1行目を多値文字処理部12へ、2値文字描画コマンドとして2行目を2値文字処理部13へ、多値ベクトル描画コマンドとして3行目を多値ベクトル処理部14へ、2値ベクトル描画コマンドとして4行目を2値ベクトル処理部15へ、グラフィクス描画コマンドとして5行目をグラフィクス処理部16へ、ラスターイメージ描画コマンドとして6行目をラスターイメージ処理部17へそれぞれ出力する。
【0020】
多値文字処理部12は、多値文字描画コマンドとして入力された1行目のコマンドを解釈し実行する。すなわち、文字列を指定フォントで多値モードで描画する。フォントには、文字をラスター画像データで記述したビットマップフォントと、文字の輪郭を直線・曲線等の線の集合体として線の描画情報(アウトラインデータ)で記述したアウトラインフォントとがあるが、ポイント数・フェース・ウェートに対応した変形処理の容易さと変形処理後のディフェクトの少なさとから、本実施形態ではアウトラインフォントを使用することとする。アウトラインフォントを使用した場合、指定された文字のアウトラインデータが読み出され、該アウトラインデータに基づいて仮想座標平面に文字の輪郭が描画され、該輪郭で囲まれた閉領域が塗り潰されて仮想座標平面上で理想的な文字画像を得る。そして、上記仮想座標平面上の文字の輪郭(以下、単に文字輪郭という)に基づいて多値エッジリストを生成し、合成部18に出力する。
【0021】
2値文字処理部13は、2値文字描画コマンドとして入力された2行目のコマンドを解釈し実行する。すなわち、文字列を指定フォントで2値モードで描画する。ここでは、多値文字処理部12と同様にして仮想座標平面上で理想的な文字画像を得る。そして、文字輪郭に基づいて2値エッジリストを生成し、合成部18に出力する。多値ベクトル処理部14は、多値ベクトル描画コマンドとして入力された3行目のコマンドを解釈し実行する。すなわち、ベクトルを多値モードで描画する。まず、仮想座標平面上で指定された2つの座標点を端点とする直線が描画され、該直線から指定された線幅の半分の距維にある領域が塗り潰されて仮想座標平面上で理想的なベクトル画像を得る。そして、上記仮想座標平面上のベクトルの輪郭(以下、単にベクトル輪郭)に基づいて多値エッジリストを生成し、合成部18に出力する。
【0022】
次に、2値ベクトル処理部15は、2値ベクトル描画コマンドとして入力された4行目のコマンドを解釈し実行する。すなわち、ベクトルを2値モードで描画する。ここでは、多値ベクトル処理部14と同様にして仮想座標平面上で理想的なベクトル画像を得る。そして、上記仮想座標平面上のベクトルの輪郭に基づいて2値エッジリストを生成し、合成部18に出力する。グラフィクス処理部16は、グラフィクス描画コマンドとして入力された5行目のコマンドを解釈し実行する。すなわち、指定された領域を指定された色で塗り潰す。まず、仮想座標平面上で塗り潰し領域が設定され、該領域を指定された色で塗り潰す。そして、上記仮想平面上の塗り潰された領域に基づいて2値エッジリストを生成し、合成部18に出力する。なお、塗り潰しの際に指定された色空間をプリンタに適合した色空間に変換するのは当然であり、さらにその際にプリンタの色再現特性に応じて色の近似処理を行う。この色空間変換処理および色近似処理の内容はどのようなものでも構わない。
【0023】
次に、ラスターイメージ処理部17は、ラスターイメージ描画コマンドとして入力された6行目のコマンドを解釈し実行する。すなわち、指定されたラスターイメージデータに従って指定された領域に指定された色空間および指定された解像度で描画する。まず、仮想座標平面上に主走査および副走査方向の画素数および解像度に応じた描画領域が設定され、該領域に指定された色空間で指定されたラスターイメージデータに従ってラスターイメージが描画される。なお、塗り潰しの際に指定された色空間をプリンタに適合した色空間に変換するのは当然であり、さらにその際にプリンタの色再現特性に応じて色の近似処理を行う。また、指定された解像度とプリンタの解像度とが一致しない場合には、解像度変換処理を行う。この色空間変換処理、色近似処理および解像度変換処理の内容はどのようなものでも構わない。
【0024】
合成部18は、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15、グラフィクス処理部16およびラスターイメージ処理部17から供給されるエッジリストを1つのエッジリストに合成し、ラスター画像に変換して出力端Aから外部に出力する。また、合成部18に入力される各エッジリストがどの処理部から出力されたかを示すデータを画素毎に作成して上記ラスター画像と同期をとりながら出力端Bから外部に出力する。合成部18での合成処理は、エッジリスト間の操作によって実現される。
【0025】
B.実施形態の動作
次に、上述した実施形態の動作について説明する。まず、多値文字処理部12での仮想座標平面上の文字の輪郭からの多値エッジリスト生成について詳述する。図3は、エッジリスト生成過程を説明するためのフローチャートである。まず、描画する文字に対応したアウトラインデータをロードし(ステップS100)、高解像度エッジリストを作成し(ステップS101)、該エッジリストを多値エッジリストに変換する(ステップS102)。TYPEコマンドで指定された文字列中の全ての文字の描画が終了すると、合成部18に多値エッジリストを出力して処理を終え、描画してない文字がある場合には、ステップS100以降を繰り返す。なお、以下においてはn=2として説明する。
【0026】
図4は、図3におけるステップS101での処理の詳細を示すフローチャートである。なお、図4において、iは主走査方向の処理位置、jは副走査方向の処理位置を示すインデックスであり、stは主走査方向の塗り潰し開始位置(以下、塗潰開始位置という)、rlは塗り潰す画素の連続数(以下、塗潰画素連続数という)を格納する変数であり、flはその値が「1」のときは塗り潰し開始位置stおよび連続数rlに有効データが残っており「0」のときは残っていないことを示すフラグである。また、PおよびLは、1つの文字を描画する領域の主走査方向および副走査方向の画素数である。なお、記号=は右辺の数または演算結果を左辺の変数に格納することを、記号==は両辺が等しいことを意味する。
【0027】
まず、処理に必要な変数を初期化する(ステップS200、S201)。次に、インデックスiおよびjで示される仮想座標点TP(i,j)が塗り潰し領域にあるかどうかを判定し、塗り潰し領域にあるときは、ステップS203以降の処理を行い、塗り潰し領域にないときは、ステップS206以降の処理を行う(ステップS202)。なお、仮想座標点TP(i,j)は、プリンタの解像度の2倍の解像度の画素の中心点である。仮想座標点TP(i,j)が塗り潰し領域にあるときは、塗潰画素連続数rlをインクリメントし(ステップS203)、フラグflが「0」か否か、つまり塗潰開始位置stおよび塗潰画素連続数rlに有効データが残っていないかどうかを調べ(ステップS204)、残っていなければ、現在の主走査方向の位置を主走査方向の塗潰開始位置stに設定する(ステップS205)。
【0028】
一方、仮想座標点TP(i,j)が塗り潰し領域にないときは、フラグflが「1」か否か、つまり塗潰開始位置stおよび塗潰画素連続数rlに有効データが残っているかどうかを調べ(ステップS206)、残っていれば塗潰開始位置stおよび塗潰画素連続数rlをリストに登録し(ステップS207)、塗潰開始位置st、塗潰画素連続数rlおよびフラグflを初期化する(ステップS208)。ステップS205またはステップS208が終了するか、ステップS204またはステップS206での判定結果が「NO」である場合には、インデックスiをインクリメントし(ステップS209)、主走査方向画素数Pを2倍した値とインデックスiとを比較して(ステップS210)、等しいならば、ステップS211以降の処理を行い、等しくないならば、ステップS202以降の処理を行う。
【0029】
インデックスiが主走査方向画素数Pを2倍した値に等しい場合には、フラグflが「1」か否か、つまり塗潰開始位置stおよび塗潰画素連続数rlに有効データが残っているかどうかを調べ(ステップS211)、残っていれば塗潰開始位置stおよび塗潰画素連続数rlをリストに登録する(ステップS212)。そして、ステップS212での処理が終了するか、ステップS211での判定結果が「NO」である場合には、リストに終端符号EOLを登録してインデックスjをインクリメントし(ステップS213)、副走査方向画素数Lを2倍した値とインデックスjとを比較して〈ステップS214)、等しいならば処理を終了し、等しくないならばステップS201以降の処理を行う。上述した処理により、プリンタ解像度の2倍の解像度の2値のエッジリストが作成される。なお、上述した処理においては、作成するエッジリストは2値であるため、印字する画素の開始位置および連続数のみがリストの内容となる。また、ライン終了時に終端符号EOLをリストに登録していることからも分かるように、エッジリストはライン単位で作成される。
【0030】
次に、図5ないし図7は、図3のステップS1O2での処理の詳細を示すフローチャートである。なお、図5ないし図7において、iは主走査方向の処理位置、jは副走査方向の処理位置を示すインデックスであり、st1〜st6は主走査方向の塗り潰し開始位置、rl1〜rl6は塗り潰す画素の連続数を格納する変数であり、stは多値エッジリストに登録する主走査方向の塗り潰し開始位置、rlは多値エッジリストに登録する塗り潰す画素の連続数、pvは多値エッジリストに登録する画素値を格納する変数である。また、n2は注目画素、n1およびn3はその直上・直下の画素の状態を表す変数であり、mは画素値を格納する変数である。また、PおよびLが表す数、記号=および記号==の意味は図4と同様であり、関数LUT−Aおよび関数LUT−Bは互いに異なるルックアップテーブル(以下、LUTという)を用いて引数を変換する関数を意味する。
【0031】
まず、インデックスiに初期値を設定し(ステップS300)、先頭ラインの処理を行う(ステップS301)。なお、先頭ラインの処理については後述する。次に、インデックスiをインクリメントし(ステップS302)、ST1,RL1〜ST6,RL6を読み込むとともに、処理に必要な変数を初期化する(ステップS303)。なお、STx,RLx(x=1〜6)は、図3のステップS102で作成した2値のエッジリストの(2・j+x−3)番目のラインのリストから読み込んだ主走査方向の塗り潰し開始位置および塗り潰す画素の連続数である。例えば、j=1のときST1,RL1は0番目のライン(つまり先頭ライン)のリストから読み込んだ主走査方向の塗り潰し開始位置および塗り潰す画素の連続数である。次に、画素の状態を表す変数n1、n3を算出する(ステップS304)。表1に算出した値と画素の状態を示す。
【0032】
【表1】
表1において、状態欄の図形は、図3のステップS101で作成した2値のエッジリストのうち、注目画素に対応する部分の状態を模式的に示したものであり、白色矩形は塗り潰さない画素、黒色画素は塗り潰す画素を表す。なお、この算出方法については後述する。
【0033】
次に、変数n2が「3」に等しいどうかを調べ(ステップS305)、等しければステップS306以降の処理を行い、等しくなければステップS309以降の処理を行う。変数n2が「3」に等しい場合、変数n3が「0」または「12」に等しいかどうかを調べ(ステップS306)、どちらかに等しい場合には変数n2を表3に示すLUTで濃度値に変換して変数mに格納する(ステップS307)。一方、どちらにも等しくない場合には変数n2を表2に示すLUTで濃度値に変換して変数mに格納する(ステップS308)。
【表2】
【0034】
【表3】
【0035】
一方、変数n2が「3」に等しくない場合、変数n2が「12」に等しいかどうかを調べ(ステップS309)、等しければステップS310以降の処理を行い、等しくなければステップS312以降の処理を行う。変数n2が「12」に等しい場合、変数n1が「0」または「3」に等しいかどうかを調べ(ステップS310)、等しければ表3に示すLUTで濃度値に変換して変数mに格納し(ステップS311)、等しくなければ表2に示すLUTで濃度値に変換して変数皿に格納する(ステップS312)。
【0036】
上記ステップS307、ステップS308、ステップS311、ステップS312のいずれかでの処理が終了すると、濃度値が格納されている変数mと変数pvが「0」より大きいかどうかを調べる(ステップS310)。そして、変数mと変数pvがともに「0」より大きければ、変数mと変数pvが等しいかどうかを調べ(ステップS312)、等しければ変数rlをインクリメントし(ステップS313)、等しくなければ変数st、変数pvおよび変数rlをリストに登録し(ステップS314)、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS315)。
【0037】
一方、変数mが「0」であり、変数pvが「0」より大きければ、変数st、変数pvおよび変数rlをリストに登録し(ステップS317)、変数pVに「0」を設定する(ステップS318)。また、変数mが「0」より大きく、変数pvが「0」であれば、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS316)。つまり、ステップS310からステップS319における処理は、ランレングスコーディング処理である。
【0038】
次に、ステップS313、ステップS315、ステップS316またはステップS318での処理が終了するか、ステップS310で変数mと変数pvがともに「0」であった場合には、インデックスiをインクリメントし(ステップS319)、インデックスiがPに等しいかどうかを調べる(ステップS320)。そして、等しければステップS321以降の処理を行い、等しくなければステップS304以降の処理を行う。
【0039】
インデックスiがPに等しい場合、変数pvが「0」より大きいかどうかを調べ(ステップS321)、大きければ変数st、変数pvおよび変数rlをリストに登録する(ステップS322)。そして、ステップS322での処理が終了するか、ステップS321での判定結果が「NO」であった場合、EOLをリストに登録してインデックスjをインクリメントし(ステップS323)、インデックスjがLから「1」を減じた値に等しいかどうかを調べる(ステップS324)。そして、等しければ後述する最終ライン処理を行って(ステップS325)、全ての処理を終了し、等しくなければステップS303以降の処理を行う。
【0040】
ここで、図5のステップS301における先頭ライン処理について説明する。図8および図9は、先頭ライン処理の詳細を示すフローチャートである。なお、図6において、図5ないし図7と同じ名前のインデックス、変数、記号および関数は、図5ないし図7と同様である。
【0041】
まず、ST3,RL3〜ST6,RL6を読み込むとともに、処理に必要な変数を初期化する(ステップS400)。次に、画素の状態を表す変数n2、n3を算出する(ステップS401)。次に、変数n2が「3」に等しいどうかを調べ(ステップS402)、等しければステップS403以降の処理を行い、等しくなければステップS405以降の処理を行う。変数n2が「3」に等しい場合には、変数n3が「0」または「12」に等しいかどうかを調べ(ステップS403)、どちらかに等しい場合には、変数n2を表3に示すLUTで濃度値に変換して変数mに格納する(ステップS404)。一方、どちらにも等しくない場合には、変数n2を表2に示すLUTで濃度値に変換して変数mに格納する(ステップS405)。
【0042】
上記ステップS404、ステップS405のいずれかでの処理が終了すると、濃度値が格納されている変数mと変数pvが「0」より大きいかどうかを調べ(ステップS406)、変数mと変数pvとがともに「0」より大きければ、変数mと変数pvとが等しいかどうかを調べる(ステップS407)。そして、等しければ、変数rlをインクリメントし(ステップS408)、等しくなければ、変数st、変数pvおよび変数rlをリストに登録し(ステップS409)、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS410)。一方、変数mが「0」であり、変数pvが「0」より大きければ、変数st、変数pvおよび変数rlをリストに登録し(ステップS412)、変数pvに「0」を設定する(ステップS413)。また、変数mが「0」より大きく、変数pvが「0」であれば、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS411)。つまり、ステップS406からステップS413における処理は、先頭ラインのランレングスコーディング処理である。
【0043】
次に、ステップS408、ステップS410、ステップS411またはステップS413での処理が終了するか、ステップS406で変数nと変数pvがともに「0」であった場合には、インデックスiをインクリメントし(ステップS414)、インデックスiがPに等しいかどうかを調べ(ステップS415)、等しければステップS416以降の処理を行い、等しくなければステップS401以降の処理を行う。インデックスiがPに等しい場合、変数pvが「0」より大きいかどうかを調べ(ステップS416)、大きければ変数st、変数pvおよび変数rlをリストに登録する(ステップS417)。そして、ステップS417での処理が終了するか、子テップS416での判定結果が「NO」であった場合、EOLをリストに登録して(ステップS418)、処理を終了する。
【0044】
次に、図7のステップS325における最終ライン処理について説明する。図10および図11は、最終ライン処理の詳細を説明するためのフローチャートである。なお、図10および図11において、図5ないし図7と同じ名前のインデックス、変数、記号および関数は、図5ないし図7と同様である。
【0045】
まず、ST1,RL1〜ST4,RL4を読み込むとともに、処理に必要な変数を初期化する(ステップS500)。次に、画素の状態を表す変数n1〜n2を算出する(ステップS501)。次に、変数n1が「12」に等しいどうかを調べ(ステップS502)、等しければステップS503以降の処理を行い、等しくなければステップS505以降の処理を行う。変数n2が「12」に等しい場合には、変数n1が「0」または「3」に等しいかどうかを調べ(ステップS503)、どちらかに等しい場合には、変数n2を表3に示すLUTで濃度値に変換して変数mに格納する(ステップS504)。一方、どちらにも等しくない場合には、変数n2を表2に示すLUTで濃度値に変換して変数mに格納する(ステップS505)。
【0046】
上記ステップS504、ステップS505のいずれかでの処理が終了すると、濃度値が格納されている変数mと変数pvが「0」より大きいかどうかを調べ(ステップS506)、変数mと変数pvがともに「0」より大きければ変数mと変数pvとが等しいかどうかを調べ(ステップS507)、等しければ変数rlをインクリメントする(ステップS508)。一方、等しくなければ変数st、変数pvおよび変数rlをリストに登録し(ステップS509)、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS510)。一方、変数mが「0」であり、変数pvが「0」より大きければ、変数st、変数pvおよび変数rlをリストに登録し(ステップS513)、変数pvに‘0’を設定する(ステップS514)。また、変数mが「0」より大きく、変数pvが「0」であれば、変数stにインデックスi、変数pvに変数m、変数rlに「1」を設定する(ステップS512)。つまり、ステップS506からステップS514における処理は、最終ラインのランレングスコーディング処理である。
【0047】
次に、ステップS508、ステップS510、ステップS512またはステップS514での処理が終了するか、ステップS506で変数mと変数pvとがともに「0」であった場合には、インデックスiをインクリメントし(ステップS514)、インデックスiがPに等しいかどうかを調べる(ステップS515)。そして、双方が等しければステップS517以降の処理を、等しくなければステップS501以降の処理を行う。インデックスiがPに等しい場合、変数pVが「0」より大さいかどうかを調べ(ステップS517)、大きければ変数st、変数pvおよび変数rlをリストに登録する(ステップS518)。ステップS518での処理が終了するか、ステップS517での判定結果が「NO」であった場合には、EOLをリストに登録して(ステップS519)、処理を終了する。
【0048】
次に、図5のステップS304、図8のステップS401および図10のステップS501における変数n1、n3の算出方法について説明する。なお、この算出方法は、変数n1〜n3について同じであるため、変数n1の場合についてのみ説明する。図12および図13は、変数n1を算出するアルゴリズムを説明するためのフローチャートである。なお、図12および図18において、図ないし図7と同じ名前のインデックス、変数および記号は、図5ないし図7と同様であり、記号「|」はビットOR演算を示すものとする。
【0049】
まず、変数n1を初期化し(ステップS600)、注目画素の主走査方向での位置を示すインデックスiが変数ST1以上、かつ変数ST1と変数RL1との和より小さいか否かを調べる(ステップS601)。つまり、注目画素が塗潰領域にあるかどうかを調べる。ステップS601での判定結果が「YES」の場合、すなわち注目画素が塗潰領域にある場合には、変数n1と定数「1000b」とのビットOR演算結果を変数n1に格納する(ステップS602)。一方、「NO」の場合、すなわち注目画素が塗潰領域にない場合には、インデックスiが変数ST1と変数RL1の和以上であるか否かを調べる(ステップS603)。ステップS603での判定結果が「YES」の場合には、リストからST1およびRL1を読み込む(ステップS604)。
【0050】
次に、ステップS602またはステップS604での処理が終了するか、ステップS603での判定結果が「NO」である場合には、インデックスiに「1」を加えた値が変数ST1以上、かつ変数ST1と変数RL1との和より小さいか否かを調べる(ステップS605)。つまり、注目画素の右の画素(以下、単に右画素という)が塗潰領域にあるか否かを調べる。ステップS605での判定結果が「YES」の場合、すなわち右画素が塗潰領域にある場合には、変数n1と定数「100b」とのビットOR演算結果を変数n1に格納する(ステップS606)。一方、「NO」の場合、すなわち右画素が塗潰領域にない場合には、インデックスiに「1」を加えた値が変数ST1と変数RL1との和以上であるか否かを調べる(ステップS607)。そして、ステップS607での判定結果が「YES」の場合には、リストからST1およびRL1を読み込む(ステップS608)。
【0051】
次に、ステップS606またはステップS608での処理が終了するか、ステップS607での判定結果が「NO」である場合には、インデックスiが変数ST2以上で、かつ変数ST2と変数RL2との和より小さいか否かを調べる(ステップS609)。つまり、注目画素の下の画素(以下、単に下画素という)が塗潰領域にあるかどうかを調べる。ステップS609での判定結果が「YES」の場合、すなわち下画素が塗潰領域にある場合には、変数n1と定数「10b」とのビットOR演算結果を変数n1に格納する(ステップS610)。一方、「NO」の場合、すなわち下画素が塗潰領域にない場合には、インデックスiが変数ST2と変数RL2との和以上であるか否かを調べる(ステップS611)。そして、ステップS611での判定結果が「YES」の場合には、リストからST2およびRL2を読み込む(ステップS612)。
【0052】
次に、ステップS610またはステップS612での処理が終了するか、ステップS611での判定結果が「NO」である場合には、インデックスiに「1」を加えた値が変数ST2以上で、かつ変数ST2と変数RL2との和より小さいか否かを調べる(ステップS613)。つまり、注目画素の右下の画素(以下、単に右下画素という)が塗潰領域にあるかどうかを調べる。ステップS613での判定結果が「YES」の場合、すなわち右下画素が塗潰領域にある場合には、変数n1と定数「1b」とのビットOR演算結果を変数n1に格納し(ステップS614)、当該処理を終了する。一方、「NO」の場合、すなわち次画素が塗潰領域にない場合には、インデックスiに「1」を加えた値が変数ST2と変数RL2との和以上であるか否かを調べる(ステップS615)。ステップS615での判定結果が「YES」の場合には、リストからST2およびRL2を読み込み(ステップS616)、当該処理を終了する。また、ステップS615での判定結果が「NO」である場合には、何もせずに当該処理を終了する。なお、上記処理において、画素の相対的な位置関係は、ラインの先頭画素を最左端、先頭ラインを最上端ラインとして記述している。
【0053】
ここで、明朝体の文字「一」を例にとり、処理の具体例を示す。図14は、処理過程でのラスタライズ画像ならびに比較対照のための概念図である。また、図15は、図14(a),(e)の部分拡大図である。なお、図14および図15において、矩形は画素を表し、白色矩形以外の矩形の意味についてはそれぞれ右横の注釈の通りである。また、図14においては、1つの文字を主走査方向16画素、副走査方向16画素の領域に展開するものとし、該領域の左上端を座標原点とし、上述した画素の相対的な位置関係と同様の位置関係で示している。また、図15においては、破線矢印は、プリンタ解像度のn倍の解像度の2値の画像データを表すエッジリストを作成する際に仮想的に設定されるスキャンラインであり、主走査および副走査の両方向のスキャンラインの交点が図4における仮想座標点TP(i,j)である。なお、図15では、上述と同様にn=2の場合について示しているが、nの値が他の値であっても同様に仮想座標点を設定できるのは明らかである。
【0054】
図14(a)は、文字「一」を理想的に展開した場合の塗潰領域を示す概念図であるが、固有の解像度を有するプリンタに出力するためには、塗潰領域を含む画素の値を何らかの論理に従って決定する必要がある。例えば、図14(a)に示す塗潰領域を少しでも含む画素を印字、含まない画素を非印字と決定すると、図14(b)に示すような印字結果が得られる。両図を見てもわかるように、この画素値決定論理では、高い画質の印字結果を得ることはできない。一方、前述した従来技術に記載されているように、PDLから作成したプリンタ解像度のn倍の解像度の2値の画像データを表すエッジリストから単純にプリンタ解像度の多値の画像データを表すエッジリストに変換してラスタライズすると、図14(c)に示すラスター画像が得られ、このラスター画像を印字すると図14(d)に示す印字結果が得られる。この場合、特に文字「一」の横棒部分が想定していた線幅よりも細い線幅で印字されてしまい、場合によっては途切れたり印字されないことがある。
【0055】
一方、上述した本発明の実施形態によってラスタライズすると、図14(e)に示すラスター画像が得られ、このラスター画像を印字すると図14(f)に示す印字結果が得られる。図15(a)および図15(b)は、それぞれ図14(a)および図14(e)の部分拡大図である。以下、本発明によるラスタライズ処理例を図14(a)、図14(e)、図14(f)および図15を参照しながら説明する。まず、本実施形態において、入力されたPDLのうち、多値展開を指定された文字についてPDLからアウトラインデータ、さらにエッジリストへと変換が行われる。図4ないし図7に示したアルゴリズムに従って、各仮想座標点が塗潰領域にあるか否かが判定され、その結果エッジリストが作成されていく。
【0056】
例えば、図15(a)の7ライン目について見てみると、上側の主走査方向のスキャンライン(以下、単に主走査スキャンラインという)では、13番目の画素の右側の仮想座標点が塗潰領域内にある。これは、図4のステップS202において、i=27,j=14のときに判定結果が「YES」となることを意味している。この仮想座標点までに、ステップS202における判定結果が「YES」となることはなく、また、この仮想座標点以降の同じ主走査スキャンライン上の仮想座標点についてもステップS202における判定結果が「NO」となるため、この主走査スキャンラインが終了した時点でのリストには、st=27,rl=1のみが登録されている。
【0057】
一方、下側の主走査スキャンラインでは、13番目の画素の左右両側および14番目の画素の左側の仮想座標点が連続して塗潰領域内にある。従って、上側と同様に処理を行うと、この主走査スキャンラインが終了した時点でのリストには、st=26,rl=3がリストに追加されている。同様に8ライン目についても処理を行うと、上側の主走査スキャンラインでは、st=2,rl=26がリストに追加され、下側の主走査スキャンラインでは、何もリストに追加されない。上述したライン以外については、いずれの仮想座標点も塗演領域にはないため、最終的には表4に示すようなリストが得られる。
【表4】
【0058】
表4に示すリストは、一形態例であってリストを見やすい形で表現したものにすぎず、リストの記憶媒体でのデータ形式は、表4に隈定されるわけではなく、どの主走査スキャンラインにどのようなst,rlが登録されているかが分かればどのような形態であっても構わない。なお、表4においては、EOL符号のみが登録されている主走査スキャンラインおよびEOL符号については省略している。
【0059】
次に、表4に示すリストに基づいて多値のエッジリストが作成される。この作成の具体例を図15(b)の7ライン目および8ライン目を例にとり説明する。まず、7ライン目では、1番目の画素から12番目の画素までは、図12または図13におけるn1、n2の算出でステップS601、ステップS605、ステップS609およびステップS613での判定結果がいずれも「NO」となり、n3の算出でステップS601およびステップS605での判定結果がいずれも「YES」、ステップS609およびステップS613での判定結果がいずれも「NO」となるので、n1=0、n2=0、n3=12となり、図5のステップS305およびステップS309での判定結果がいずれも「NO」となる。従って、変数n2が表2に示すLUTで変換され、画素値「0」が得られる。ゆえに、多値エッジリストには何も登録されない。同ラインの13番目の画素の時点でn1=0、n2=7、n3=12、14番目の画素の時点でn1=0、n2=2、n3=12となるので、それぞれ表2に示すLUTから画素値「192」および画素値「64」が得られる。
【0060】
先頭画素および15番目以降の画素については、いずれもn1=0、n2=0、n3=0となるので、7ライン目の処理が終了した時点で、多値エッジリストには、st=13、pv=192、rl=1およびst=14、pv=64、rl=1が登録されている。次に、8ライン目では、1番目の画素から12番目の画素までは、n1=0、n2=12、n3=0となり、図5のステップS305での判定結果は「NO」、ステップS309およびステップS310での判定結果は「YES」となる。従って、変数n2が表3に示すLUTで変換され、画素値「192」が得られる。また、同ラインの13番目の画素の時点で、n1=7、n2=12、n3=0となり、14番目の画素の時点で、nl=2、n2=12、n3=0となり、ともに画素値「128」が得られる。上述したライン以外については、いずれの画素についても、画素値は「0」となるため、最終的には、例えば表5に示すようなリストが得られる。
【表5】
【0061】
表5に示すリストは、一形態例であってリストを見やすい形で表現したものにすぎず、リストの記憶媒体でのデータ形式は表5に限定されるわけではなく、どのラインにどのようなst,pv,rlが登録されているかが分かればどのような形態であっても構わない。なお、表5においては、EOL符号のみが登録されている主走査スキャンラインおよびEOL符号については省略している。以上により、多値エッジリストが得られ、多値文字処理部12から合成部18に出力される。
【0062】
次に、2値文字処理部13での処理を説明する。まず、描画する文字に対応したアウトラインデータをロードし、2値エッジリストを作成する。TYPEコマンドで指定された文字列中の全ての文字の描画が終了すると、合成部18に2値エッジリストを出力して処理を終了し、描画してない文字がある場合には、アウトラインデータのロード以降を繰り返す。
【0063】
なお、上述した処理のうちアウトラインデータのロードは、多値文字処理部12と同じであり、文字輪郭からの2値エッジリストの作成は、多値文字処理部12における高解像度エッジリストの作成と解像度の設定、つまり仮想座標点の設定が異なるのみで他は同じであるので、詳細な説明は省略する。文字「一」から作成したエッジリストを表6に示す。
【表6】
【0064】
次に、多値ベクトル処理部14での処理を説明する。図16は、多値ベクトル処理部14での処理を示すフローチャートである。まず、指定されたベクトルを描画し(ステップS700)、高解像度エッジリストを作成し(ステップS701)、該エッジリストを多値エッジリストに変換する(ステップS702)。全てのベクトルの描画が終了すると、合成部18に多値エッジリストを出力して処理を終了し、描画していないベクトルがある場合には、ステップS700以降を繰り返す。ステップS701以降は、多値文字処理部12と同じであるので、ここでは、ステップS700についてのみ説明する。まず、指定されたベクトルは、指定された座標点情報に従って仮想座標平面上に描画される。次に、仮想座標平面上に描画されたベクトルを中心として、指定された線幅の半分の距離にある領域を塗潰領域とする。そして、多値文字処理部12と同様に仮想座標点を設定し、高解像度エッジリストの作成、および該エッジリストの多値エッジリストヘの変換を行っていく。
【0065】
ここで、図17は、多値ベクトル処理部14での処理の具体例を説明するための概念図である。まず、指定されたベクトルが図17(a)に示すハッチング領域の中心線のように描画される。次に、該中心線から指定された線幅の半分の距離にある領域が図17(a)に示すハッチング領域のように塗潰領域に指定される。このとき、多値文字処理部12においては、アウトラインデータをロードし、塗潰領域を設定したときと同じ状態であるので、上記処理以降では、多値文字処理部12と同様の処理を行い、一旦、高解像度エッジリストを取得した後、多値エッジリストを取得する。表7は、高解像度エツジリストを示し、表8は、多値エッジリストを示す。また、図17(c)は、最終的に得られた多値エッジリストを印字した結果を示す図である。
【表7】
【0066】
【表8】
【0067】
次に、2値ベクトル処理部15での処理を説明する。まず、指定された図形を描画し、2値エッジリストを作成する。全ての図形の描画が終了すると、合成部18に2値エッジリストを出力して処理を終了し、描画していない図形がある場合には、描画以降を繰り返す。なお、上述した処理のうち、図形の描画は、多値ベクトル処理部14と同じであり、ベクトルからの2値エッジリストの作成は、多値文字処理部12における高解像度エッジリストの作成と解像度の設定、つまり仮想座標点の設定が異なるのみで、他は同じであるので、詳細な説明は省略する。図17(a)に示す図形から作成したエッジリストを表9に示す。
【表9】
【0068】
次に、グラフィクス処理部16での処理を説明する。ここでは、指定された領域を指定された色および指定された塗り潰し方法で塗り潰す処理が行われるが、塗り潰し方法が指定された領域を一様に塗り潰す方法である場合には詳述するまでもないので、一様に塗り潰さない方法について説明する。このような塗り潰し方法では、仮想座標平面上の座標位置の関数として各座標位置の画素値が決定される。この関数としては、例えば矩形領域内で主走査方向に最高濃度から最低濃度まで画素値が単調減少する関数がある。
【0069】
ここで、図18は、一様に塗り潰さない方法を説明するための概念図である。図18(a)は、主走査方向14画素、副走査方向1ラインの仮想座標平面上の領域に、該領域の主走査方向の左端を最高濃度、右端を最低濃度とし、その間は主走査方向の左から右に向かって単調減少する関数により描画した例、図18(b)は、プリンタ解像度と同じ解像度で仮想座標点を設定して各画素値を決定した例、図18(c)は、図18(b)に示す領域をプリントアウトした例である。なお、図18(b)の上側の数値は、その直下の画素の値を示している。なお、図18に示す例は、一具体例であり、座標位置から画素値を決定する関数を様々に変えることにより、どのような領域の塗り潰し方法にも対応できるのは明らかである。ここで、座標位置によらず画素値が同じ値に決定される関数を用いれば、指定された領域を一様に塗り潰すことができるので、一様に塗り潰す方法も上述した塗り潰し方法に含まれる。画素値の決定が終了すると、決定した画素偉から多値エッジリストを作成し、合成部18に出力する。表10に図18(b)に示す領域の各画素値から作成したエッジリストを示す。
【表10】
【0070】
次に、イメージ処理部17での処理を説明する。ここでは、ラスターイメージデータに従って指定された領域に、指定された解像度および指定された色空間で描画するのみであるが、指定された解像度がプリンタ解像度と一致しない場合がある。このような場合には、プリンタ解像度と同じ解像度で設定した仮想座標点と、ラスターイメージデータの各画素の位置とが一致しないため、ある座標点の近傍にあるラスターイメージデータの各画素の値から近似画素値を算出することによりプリントアウトを可能にする。
【0071】
つまり、解像度変換処理によって、ラスターイメージデータをプリンタ解像度に合せることにより、プリントアウトを可能にする。このときの近似画素値の算出方法は、周知の方法でよい。また、指定された色空間がプリントアウト可能な色空間と一致しない、あるいはラスターイメージデータの各画素値が表す色がプリンタで再現できない場合には、ラスターイメージデータの画素値を変更する。このときの画素値の変更方法も周知の方法でよい。上述したように、ラスターイメージデータをプリントアウト可能な解像度および色空間の画像に変換した後、変換した画像から多値エッジリストを作成し、合成部18に出力する。
【0072】
最後に、合成部18での処理を説明する。合成部18は、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15、グラフィクス処理部16およびラスターイメージ処理部17から出力されたエッジリストを合成し、ラスター画像に変換して、出力端Aを通じて外部に出力する。なお、この合成処理は、エッジリスト間の操作、例えばリストの連結・挿入・選択であり、優先順位はコマンド分離部11に入力されたPDL内での描画順序に従う。例えば、何も指定がない場合には、PDLの先頭から最後尾に向けて優先順位が高くなる。
【0073】
つまり、後から描画される文字またはベクトルが先に描画した文字またはベクトルに上書きされることとなる。このとき、後から描画される文字またはベクトルのエッジリストは、既存の出力用エッジリストに強制挿入され、既存の出力用エッジリストの該当部分は書きつぶされる。また、何らかの指定があった場合には、上記描画順序に従わずに指定された描画順序に従う。例えば、PDLの先頭に記述されている文字またはベクトルを最優先で描画するよう指定があった場合には、後から描画される文字またはベクトルのエッジリストを既存の出力用エッジリストに合成する際に、同じ画素位置にリストのデータがなければリストを連結し、同じものがある場合には何もしない。
【0074】
次に、上述した合成部18での処理の具体例を説明する。例えば、表5に示す多値エッジリストが多値文字処理部12から出力され、その後、表11に示す2値エッジリストが2値ベクトル処理部15から出力されたとする。
【表11】
【0075】
なお、PDLの記述では、表5に示す多値エッジリストに関する記述、すなわち文字「一」を多値展開する記述が、表11に示す2値エッジリストに関する記述より先、すなわち副走査方向の画索幅「1」の直線を描画する記述より先にあるとする。ここで、描画順序に関する指定がない場合には、後から描画される文字またはベクトルが優先されるため、表12に示すようなエッジリストが作成される。つまり、表5に示す多値エッジリストにデータがない6ライン目、7ライン目および9ライン目の8番目の画素については、表11に示す2値エッジリストのデータが連結され、8ライン目の8番目の画素についてはともにデータが存在しているため、表11に示す2値エッジリストのデータが挿入されている。
【表12】
【0076】
一方、文字「一」を最優先で多値展開する指定があった場合には、同じ画素位置にデータがあっても、指定された文字またはベクトルが優先されるため、表13に示すようなエッジリストが作成される。つまり、表5に示す多値エッジリストにデータがない6ライン目、7ライン目および9ライン目の8番目の画素については、表11に示す2値エッジリストのデータが連結され、8ライン目の8番目の画素についてはともにデータが存在しているが、指定により多値エッジリストのデータが優先されるため、リストの操作は何も行われない。
【表13】
【0077】
以上説明したように、合成部18では、リストの合成処理が行われ、最終的にラスター画像に変換される。ラスター画像への変換は、ランレングス形式で記述されているエッジリストをその記述内容に従ってラスター画像に変換するのみであるので、詳細な説明は省略する。また、合成部18では、多値エッジリストまたは2値エッジリストが多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15のいずれから出力されたかを検出し、その結果を識別データとして上記ラスター画像の画素毎に出力端Bから外部に出力する。なお、識別データ作成の際には、上述したリストの合成時の描画順序に関する処理結果が反映される。
【0078】
ところで、上述したリストの合成処理の際には、同じ画素位置に、リストにデータがあるかどうかを調べるため、異なる処理部から出力されたエッジリストが表す画像の境界を容易に知ることができる。したがって、このような境界に対する処理、例えばグラフィクス領域中に黒色文字が埋め込まれているような場合に、プリント時のレジストレーションのずれを目立たなくするような境界処理も容易に行える。この境界処理は、以下のようにして実現できる。
【0079】
まず、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15のいずれかから出力されたエッジリストから画像の境界を検出する。この検出は、当該エッジリストをラスター画像に変換した場合に「0」でない画素値の画素群の主走査方向の始点と終点とを検出すること、つまりエッジリスト内で同じラインに位置する各リストデータの主走査方向の始点と終点とを調べ、さらに1つのリストデータの終点と他のリストデータの始点とが主走査方向に隣接する場合には、その2つのリストデータの隣接する始点と終点とを検出対象からはずすことにより行うことができる。
【0080】
次に、合成部18において、グラフィクス処理部16またはイメージ処理部17から出力されたエッジリストと、多値文字処理部12、2値文字処理部13、多値ベクトル処理部14、2値ベクトル処理部15のいずれかから出力されたエッジリストとを合成する際には、例えばグラフィクス処理部16またはイメージ処理部17から出力されたエッジリスト中のリストデータで、検出した画像の境界と始点あるいは終点とが一致するとき、一致した点が始点であった場合には、その値をデクリメントし、終点であった場合には、インクリメントする。このように境界処理を行えば、プリント時のレジストレーションのずれを目立たなくすることができる。
【0081】
上述した処理に対して、エッジリスト合成時にリストデータを変更するのではなく、境界であることをどの処理部から出力されたかを示す識別データとは異なる内容の識別データとして出力端Bから外部に出力するようにしてもよい。
【0082】
また、別の境界処理として、多値文字と背景との重ね合わせ処理がある。以下では、当該重ね合わせ処理の例を図14を参照して説明する。ここで、図19(a)は、色成分をYMCKの4成分として背景上に理想的に展開した例を示す概念図であり、各色成分の各画素は256階調である。図19(b)、(c)は、図19(a)に示した画像のうち、文字を多値展開した画像のそれぞれK成分・C成分を示す概念図、図19(d)は、図19(b)、(c)に示す画像をプリントアウトした例を示す概念図である。なお、図19において、矩形は画素を表し、白色でない矩形の画素値は階調を有する画素であり、図中の凡例に従う。
【0083】
通常、文字を白色ではない背景に重ね合わせる場合、図19(c)に示すように、背景の画素のうち文字の有色画素と同じ位置にある画素は、文字の画素に置き換えられる。これに対して、多値展開した文字は、パルス幅変調等の解像度を拡張する印字方法により印字されるため、特に画素値が中間調である画素については、図19(d)に示すように、色成分間で白隙を生じることがある。したがって、多値展開文字の中間調画素を背景に重ね合わせる場合には、背景画素を多値展開文字の画素に単純に置き換えるのではなく、背景画素の色成分のうち、多値展開文字とは異なる色成分の画素の値を保存し、同一色成分の画素のみ背景画素を文字画素に置き換えるようにすればよい。図19(e)は、図19(a)に示す画像を文字と背景の重ね合わせを上述した方法で行った場合のプリントアウト例を示す概念図である。上述した境界処理の実現方法は、プリント時のレジストレーションのずれを目立たなくする境界処理と同様であるため、詳細な説明は省略する。なお、上述において、ラスターイメージは、ラスターイメージ処理部17でエッジリストに変換された後、他の処理部から出力されたエッジリストと合成処理されるとしているが、ラスターイメージ処理部17では、ラスターデータの取り出しだけを行い、ラスターイメージ処理部17から出力されるエッジリストを合成し、ラスタライズした後、当該ラスターデータとの合成処理を行うようにしてもよい。
【0084】
C.変形例
以上、本発明の一実施形態について説明したが、本発明の実施形態は、これに限定されるわけではなく、例えば上記実施形態の合成部18においては、複数の処理部から出力されたエッジリストをラスタライズする前に合成処理を行っているが、各エッジリストをラスタライズした後に合成処理を行っても、本発明の趣旨は何ら逸脱しない。以下では、本発明の変形例として後者の実施形態について説明する。
【0085】
この変形例では、上記実施形態とは、合成部18における合成処理が異なるのみで、コマンド分離部11および各処理部における処理については同じであるため説明を省略する。合成部18は、まず、各処理部から出力されたエッジリストをラスタライズする。ラスタライズした結果得られるラスター画像は、合成処理を行うために合成部18内のメモリ(図示せず)に書き込まれる。メモリへは、メモリ上のラスター画像がそのまま外部に出力できるよう書き込まれる。具体的には、書き込もうとする画素のメモリ上での位置関係が画像全体での位置関係と一致するように書き込まれる。
【0086】
しかしながら、書き込みの際には、他の処理部から出力されたエッジリストをラスタライズしたラスト画像が書き込まれている場合がある。したがって、この場合には、上記実施形態と同様に、PDL内での描画順序に応じて書き込もうとする画素を、書き込もうとする位置の既存の画素に上書きするのか、上書きせずに既存の画素を保存するのかを決定する。この画素の上書きの可否決定は、上記実施形態の合成部18におけるエッジリスト間の合成処理に相当するが、エッジリストとラスター画像との違いはあるが合成論理は変わらない。したがって、出力端Aから外部に出力される画像については何ら相違はない。
【0087】
また、上記実施形態の合成部18における文字と背景との境界処理についてもエッジリスト間の合成処理と同様にラスター画像間で処理を行うことができる。上記実施形態では、文字と背景との境界を検出した後、境界部分のエッジリストの内容を操作することにより、プリント時のレジストレーションのずれを防止する処理あるいは多値展開文字と背景とを重ね合わせる際の多値文字周辺の白隙を防止する処理を行っている。これに対して、本変形例では、境界を検出した後、メモリに書き込む際に上記処理を行う。具体的には、プリント時のレジストレーションのずれを防止するために、境界部分の文字の画素をメモリに書き込む前に、その画素の主走査方向の1つ前あるいは1つ後の画素値のうち、文字とは異なる色成分の画素値を書き込む文字の画素の同一色成分の画素値とする。また、多値展開文字と背景とを重ね合わせる際に多値文字周辺の白隙を防止するために、多値展開文字の中間調画素をメモリに書き込む前に、その画素の主走査方向の1つ前あるいは1つ後の画素値のうち、文字とは異なる色成分の画素値を、書き込む文字の画素の同一色成分の画素値とする。
【0088】
いずれも、上記実施形態でエッジリストの内容を繰作する処理を、ラスター画像間の処理に置き換えただけであり、両者とも最終的に出力端Aから出力される画像の内容に相違はない。なお、書き込む画素の文字とは異なる色成分の画素値を、当該画素の主走査方向の1つ前あるいは1つ後の画素の同一色成分の値としているが、1つ前あるいは1つ後の画素のどちらを選択するかは上記実施形態における、プリント時のレジストレーションのずれを防止する処理での選択と同一論理とする。
【0089】
ところで、上述した実施形態および変形例は、いずれもPDLを出力するアプリケーションソフトウェアとプリントエンジンとの間に実装すればよいので、いくつかの異なる形態により実現することができる。例えば、印字を行うプリントエンジンと、プリントエンジンの制御、外部との通信の制御等を行うプリントコントローラとが1つの筐体に納められているプリンタでは、プリントコントローラで動作するソフトウェアとして実現できる。また、プリントエンジンとプリントコントローラとが別個の筐体となっている場合にも、プリントコントローラで動作するソフトウェアとして実現できる。あるいは、PDLを出力するアプリケーションソフトウェアが搭載されているPCあるいはWSで動作するソフトウェアとしても実現できる。さらに、処理速度を速めるために上記実施形態における処理の一部あるいは全部をハードウェアで実現してもよく、いずれの実施形態で実現しても本発明の趣旨を何ら逸脱するものではない。
【0090】
以上、本発明による画像処理装置の実施例について述べたが、本発明による画像処理装置の実現形態は、上述した内容に限定されるものではなく、他の実現形態であっても本発明の趣旨を逸脱しない範囲ならばどのような実現形態であっても構わない。
【0091】
【発明の効果】
以上、説明したように、この発明によれば、ページ記述言語で表され、入力手段から入力された画像情報の中から抽出手段により文字または線画部を抽出し、抽出した文字または線画部を第1の変換手段により2値の階調を有する第1の中間コードに変換し、第1の中間コードを第2の変換手段により上記第1の中間コードより低い解像度で多値の階調を有する第2の中間コードに変換し、また、タグ生成手段により、第1の中間コードまたは第2の中間コードに基づいて、入力された画像情報の所定の領域ごとに当該領域を占める画像の種類を表し、当該第2の中間コードで表された文字または線画部であることを表す情報を少なくとも含むタグ情報を生成するようにしたので、ページ記述言語で記述された画像情報をラスター画像に変換する際に必要な記憶容量を少なくすることができ、より高画質のプリントアウトを得ることができるという利点が得られる。
【図面の簡単な説明】
【図1】 本発明による画像処理装置の一構成例を示すブロック図である。
【図2】 本発明による画像処理装置に入力されるPDLの一例を示す概念図である。
【図3】 エッジリスト生成過程を示すフローチャートである。
【図4】 2値エッジリスト作成処理の詳細を示すフローチャートである。
【図5】 2値エッジリスト作成処理の詳細を示すフローチャートである。
【図6】 2値エッジリスト作成処理の詳細を示すフローチャートである。
【図7】 2値エッジリスト作成処理の詳細を示すフローチャートである。
【図8】 先頭ライン処理の詳細を示すフローチャートである。
【図9】 先頭ライン処理の詳細を示すフローチャートである。
【図10】 最終ライン処理の詳細を説明するためのフローチャートである。
【図11】 最終ライン処理の詳細を説明するためのフローチャートである。
【図12】 変数n1を算出するアルゴリズムを説明するためのフローチャートである。
【図13】 変数n1を算出するアルゴリズムを説明するためのフローチャートである。
【図14】 処理過程でのラスタティズ画像ならびに比較対照のための概念図である。
【図15】 図14(a),(b)の部分拡大図である。
【図16】 多値ベクトル処理部14での処理を示すフローチャートである。
【図17】 多値ベクトル処理部14での処理の具体例を説明するための概念図である。
【図18】 グラフィクス処理部16での指定された領域を一様に塗り潰さない方法を説明するための概念図である。
【図19】 多値文字と背景との重ね合わせ処理を説明するための概念図である。
【符号の説明】
11 コマンド分離部(入力手段、抽出手段)
12 多値文字処理部(第1の変換手段)
13 2値文字処理部(第1の変換手段)
14 多値ベクトル処理部(第1の変換手段)
15 2値ベクトル処理部(第1の変換手段)
16 グラフィクス処理部
17 ラスターイメージ処理部
18 合成部(第2の変換手段、タグ生成手段、合成手段、境界検知手段)[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that converts character / line drawing data representing a character / line drawing into raster image data and outputs the raster image data.
[0002]
[Prior art]
In recent years, there are increasing opportunities to print out documents created on personal computers (hereinafter referred to as PCs) and workstations (hereinafter referred to as WSs). In particular, many documents printed out in the office have text / graphics or photographs read by a scanner laid out on the same page, and recently there is an opportunity to print out color documents colored in various colors. is increasing. In addition, a system configuration in which a plurality of PCs and WSs share a printer via a network is often adopted, and the demand for higher speed and higher image quality is increasing.
[0003]
By the way, in order to shorten the data transfer time from the PC or WS to the printer and to print out the document with the same contents as much as possible even with printers having different characteristics, a document is described in a print description language (hereinafter referred to as PDL) which is a collection of drawing commands. In general, the data is transferred to a printer, interpreted by the printer, converted into a raster image, and printed out. However, if PDL is converted into a raster image in accordance with the resolution of an existing printer and printed out, jaggies are generated particularly at the edges of characters and line drawings.
[0004]
Therefore, in order to reduce the above-described jaggy, an area where jaggy can occur is extracted from the converted raster image by pattern matching as in the technique disclosed in US Pat. No. 4,847,641, for example. A method of performing correction is proposed. However, according to this method, even areas that should not be corrected, such as the mines and folds of Mincho characters, are corrected and cause deformation of the font. On the other hand, when straight line groups with uniform thickness, equal spacing, and parallel are converted to raster images due to resolution limitations, the thickness may vary, or may be converted to parallel straight line groups with no equal spacing. In such a case, it cannot be corrected by the above prior art.
[0005]
Therefore, for example, as in the technique disclosed in Japanese Patent Laid-Open No. 6-40074, the PDL is once converted into a binary raster image having a resolution higher than the resolution of the printer, and the raster image is the same as the resolution of the printer by resolution conversion. There has been proposed a method of converting to a multi-value raster image having a resolution and changing the dot size in accordance with the pixel value. However, in the latter technique, since it is necessary to convert the PDL into a binary raster image having a resolution higher than that of the printer, a large storage area is required as compared with the former technique. Therefore, like the technique disclosed in Japanese Patent Laid-Open No. 6-168334, the PDL is once converted into binary code data representing a binary raster image having a resolution higher than the resolution of the printer, and the binary code data is converted into the printer's resolution. There has been proposed a method of converting multi-value code data into a multi-value raster image by converting into multi-value code data representing a multi-value raster image having the same resolution as the resolution.
[0006]
[Problems to be solved by the invention]
By the way, in a document printed out by a printer, there are cases where graphics and photographs are mixed in addition to characters and line drawings. In order to obtain a printout with high image quality, resolution is required for characters and line drawings, and gradation is required for patterns. Therefore, processing for reducing jaggies is applied to characters and line drawings as in the above-described technique, and area gradation processing is applied to the pattern.
[0007]
In order to further improve the image quality, there is a technique in which the classification is further refined, for example, the contents of the area gradation processing are different between graphics and photographs, and the processing applied for each classification is changed. However, it is difficult to completely separate characters, line drawings, graphics, photographs, and the like from raster images. Therefore, in the prior art, there are cases where area gradation processing is applied to characters or line drawings, or processing for reducing jaggy is applied to a pattern, and it is difficult to improve image quality.
[0008]
The present invention has been made in view of the above-described circumstances, and can reduce the storage capacity required for converting image information described in a page description language into a raster image, thereby obtaining a higher quality printout. An object of the present invention is to provide an image processing apparatus.
[0009]
[Means for Solving the Problems]
In order to solve the above-described problem, in the first aspect of the present invention, an input means for inputting image information described in a page description language, and a character or line drawing from the image information input by the input means. An extraction means for extracting a portion and a character or line drawing portion extracted by the extraction means is an intermediate code for raster development, and is converted into a first intermediate code having binary gradations A conversion unit and a second conversion for converting the first intermediate code converted by the first conversion unit into a second intermediate code having a lower resolution than the first intermediate code and having a multi-valued gradation And a predetermined intermediate value of the image information input by the input means based on the first intermediate code converted by the first conversion means or the second intermediate code converted by the second conversion means For each area Tag generating means for generating tag information representing the type of image occupying the area, and the tag information generated by the tag generating means is a character or line drawing part represented by the second intermediate code. Including at least information representing the above.
[0010]
According to the present invention, a character or line drawing part is extracted from the image information expressed in the page description language by the extraction means from the image information input from the input means, and the extracted character or line drawing part is binarized by the first conversion means. Is converted into a first intermediate code having a plurality of gradations, and the first intermediate code is converted into a second intermediate code having a multilevel gradation at a resolution lower than that of the first intermediate code by the second conversion means. To do. Further, the tag generation means represents the type of image occupying the area for each predetermined area of the input image information based on the first intermediate code or the second intermediate code, and the second intermediate code Tag information including at least information indicating that the character or line drawing portion is represented is generated. Accordingly, it is possible to reduce the storage capacity required for converting image information described in the page description language into a raster image, and to obtain a higher quality printout.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings. In the following, in the image data, the number of gradations per pixel of each color component is “256”, the number with “b” added at the end is binary notation, and the number with “h” added. Is in hexadecimal notation, and numbers with nothing added are in decimal notation. In the following description, only one color component process will be described, but for multiple color component processes, one color component process is applied by the number of color components, or all color components are simultaneously processed in parallel. It may be processed.
[0012]
First, code data in a format in which image data is run-length coded will be described. The code data is obtained by run-length coding a raster image in units of lines, and describes how many pixels of a certain value continue from a certain position in the main scanning direction. For example, when a pixel having a pixel value “255 (black pixel)” is 20 pixels continuous from the tenth pixel from the top of the line, a set of three integer values “255”, “10”, and “20” is set. Described as data. At this time, since it is not necessary to describe the pixel having the pixel value “0”, the data amount can be compressed as compared with the raster image. Further, when a binary image is targeted, it is not necessary to describe pixel values, so that the data amount can be further compressed. On the other hand, since various image processing with a raster image is replaced with an operation between code data, processing can be performed at higher speed. Hereinafter, the above-described code data will be referred to as an edge list, and a specific example of the edge list and operations between the edge lists will be described later.
[0013]
A. Configuration of the embodiment
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment of the present invention. In the figure, 11 is a command separation unit, 12 is a multi-value character processing unit, 13 is a binary character processing unit, 14 is a multi-value vector processing unit, 15 is a binary vector processing unit, 16 is a graphics processing unit, and 17 is a raster. An
[0014]
The multi-value character drawing command and the binary character drawing command are composed of a character code such as ASCII code and information indicating print characteristics such as a typeface name, the number of points, a face, a weight, and a color. Information indicating whether to perform multi-value or binary is also included. Multi-value vector drawing commands and binary vector drawing commands are information representing lines such as straight lines and curves, such as coordinate information such as start points, end points, and via points, and line widths, line types, line colors, etc. It includes image information, and further includes information indicating whether vector drawing is performed in multi-value or binary. The graphics drawing command is information representing a color for filling a region, and includes coordinate information of the region to be filled and information representing a color to be painted and a painting method. The raster image drawing command represents a raster image in PDL, and includes information such as the number of pixels, resolution, and color component configuration in the main scanning and sub-scanning directions.
[0015]
The multi-value
[0016]
The binary
[0017]
Here, FIG. 2 is a conceptual diagram showing an example of PDL. Hereinafter, the case where the PDL illustrated in FIG. 2 is input to the input terminal A will be described in detail. In FIG. 2, TYPE is a character drawing command, LINE is a straight line drawing command, PAINT is a graphics drawing command, and RASTER is a raster image drawing command. The part enclosed in parentheses () following the command name is the parameter of each command, and the part enclosed in parentheses {} is raster image data. The four parameters of the TYPE command are a drawing start x coordinate, a drawing start y coordinate, a font type, the number of points, a drawing character string, and a drawing mode in order from the top. The first line in FIG. 2 is a character string “abcdefg”. Means that the coordinates are (x1, y1) as a starting point and the second line is drawn in the binary mode.
[0018]
The six parameters of the LINE command are the drawing start x coordinate, the drawing start y coordinate, the drawing end x coordinate, the drawing end y coordinate, the line width, and the drawing mode in order from the top. The third line in FIG. It means that a straight line with a thickness of 1 point is drawn from (x2, y2) to (x3, y3) in the multi-value mode and the fourth line in the binary mode. Next, the fifth line in FIG. 2 fills a rectangular area whose diagonal is a straight line connecting the coordinates (x4, y4) and the coordinates (x5, y5) with the specified color RED (red) with the color space as RGB. Means that. Further, the sixth line in FIG. 2 has a raster image of p pixels × l line with coordinates (x6, y6) as the upper left corner, RGB color space, resolution rx in the main scanning direction, and resolution ry in the sub scanning direction. Means drawing according to the last image data in parentheses {}. Note that the commands and parameters of each command are examples, and the command name and parameter contents of each command are not limited to the above contents. Further, the setting of commands for each drawing operation is not limited to the above contents, and may be changed, for example, such that the TYPE command is divided into two or more commands.
[0019]
The
[0020]
The multi-value
[0021]
The binary
[0022]
Next, the binary
[0023]
Next, the raster
[0024]
The synthesizing
[0025]
B. Operation of the embodiment
Next, the operation of the above-described embodiment will be described. First, generation of the multi-value edge list from the outline of the character on the virtual coordinate plane in the multi-value
[0026]
FIG. 4 is a flowchart showing details of the processing in step S101 in FIG. In FIG. 4, i is a processing position in the main scanning direction, j is an index indicating a processing position in the sub scanning direction, st is a filling start position in the main scanning direction (hereinafter referred to as a filling start position), and rl is This is a variable for storing the number of continuous pixels to be filled (hereinafter referred to as the number of continuous pixels to be filled), and when fl is “1”, valid data remains at the fill start position st and the continuous number rl. When it is “0”, it is a flag indicating that it does not remain. P and L are the numbers of pixels in the main scanning direction and the sub-scanning direction of an area where one character is drawn. The symbol = means that the number of the right side or the calculation result is stored in the variable on the left side, and the symbol == means that both sides are equal.
[0027]
First, variables necessary for processing are initialized (steps S200 and S201). Next, it is determined whether or not the virtual coordinate point TP (i, j) indicated by the indexes i and j is in the filled area. If the virtual coordinate point TP (i, j) is in the filled area, the process from step S203 is performed. Performs the processing after step S206 (step S202). The virtual coordinate point TP (i, j) is the center point of a pixel having a resolution twice that of the printer. When the virtual coordinate point TP (i, j) is in the filled area, the filled pixel continuous number rl is incremented (step S203), whether or not the flag fl is “0”, that is, the filling start position st and the filled area. It is checked whether or not valid data remains in the number of continuous pixels rl (step S204). If there is no remaining data, the current position in the main scanning direction is set as the filling start position st in the main scanning direction (step S205).
[0028]
On the other hand, when the virtual coordinate point TP (i, j) is not in the filled area, whether or not the flag fl is “1”, that is, whether or not valid data remains in the filled start position st and the filled pixel continuous number rl. (Step S206), if it remains, the paint start position st and the paint pixel continuous number rl are registered in the list (step S207), and the paint start position st, the paint pixel continuous number rl and the flag fl are initialized. (Step S208). When step S205 or step S208 ends or when the determination result in step S204 or step S206 is “NO”, the index i is incremented (step S209), and the value obtained by doubling the number P of pixels in the main scanning direction And index i are compared (step S210). If they are equal, the process from step S211 is performed, and if they are not equal, the process from step S202 is performed.
[0029]
When the index i is equal to a value obtained by doubling the number P of pixels in the main scanning direction, whether or not the flag fl is “1”, that is, whether valid data remains in the paint start position st and the paint pixel continuous number rl. It is checked whether or not it remains (step S211), and if it remains, the paint start position st and the paint pixel continuous number rl are registered in the list (step S212). When the process in step S212 ends or the determination result in step S211 is “NO”, the end code EOL is registered in the list and the index j is incremented (step S213), and the sub-scanning direction The value obtained by doubling the number of pixels L is compared with the index j (step S214). If they are equal, the process ends. Through the processing described above, a binary edge list having a resolution twice the printer resolution is created. In the above-described processing, since the edge list to be created is binary, only the start position and the continuous number of pixels to be printed are the contents of the list. Further, as can be seen from the fact that the end code EOL is registered in the list at the end of the line, the edge list is created in units of lines.
[0030]
Next, FIGS. 5 to 7 are flowcharts showing details of the processing in step S1O2 of FIG. 5 to 7, i is a processing position in the main scanning direction, j is an index indicating a processing position in the sub scanning direction, st1 to st6 are fill start positions in the main scanning direction, and rl1 to rl6 are filled. This is a variable for storing the number of continuous pixels, st is the fill start position in the main scanning direction registered in the multi-valued edge list, rl is the number of continuous pixels to be registered in the multi-valued edge list, and pv is the multi-valued edge list This is a variable for storing the pixel value to be registered in. Further, n2 is a pixel of interest, n1 and n3 are variables representing the state of the pixels immediately above and directly below, and m is a variable for storing a pixel value. The meanings of the numbers represented by P and L, the symbol = and the symbol == are the same as those in FIG. 4, and the function LUT-A and the function LUT-B are arguments using different lookup tables (hereinafter referred to as LUT). Means a function that transforms.
[0031]
First, an initial value is set for the index i (step S300), and the first line is processed (step S301). The processing of the first line will be described later. Next, the index i is incremented (step S302), ST1, RL1 to ST6, and RL6 are read, and variables necessary for processing are initialized (step S303). STx and RLx (x = 1 to 6) are the fill start positions in the main scanning direction read from the list of the (2 · j + x−3) th line in the binary edge list created in step S102 of FIG. And the continuous number of pixels to be filled. For example, when j = 1, ST1 and RL1 are the fill start position in the main scanning direction read from the list of the 0th line (that is, the top line) and the number of continuous pixels to be filled. Next, variables n1 and n3 representing pixel states are calculated (step S304). Table 1 shows the calculated values and pixel states.
[0032]
[Table 1]
In Table 1, the figure in the state column schematically shows the state of the portion corresponding to the target pixel in the binary edge list created in step S101 in FIG. 3, and the white rectangle is not filled in. The black pixel represents a pixel to be filled. This calculation method will be described later.
[0033]
Next, it is checked whether or not the variable n2 is equal to “3” (step S305). If they are equal, the processing from step S306 is performed, and if they are not equal, the processing from step S309 is performed. When the variable n2 is equal to “3”, it is checked whether or not the variable n3 is equal to “0” or “12” (step S306). If the variable n2 is equal to either, the variable n2 is set to the concentration value by the LUT shown in Table 3. The data is converted and stored in the variable m (step S307). On the other hand, if they are not equal to each other, the variable n2 is converted into a density value by the LUT shown in Table 2 and stored in the variable m (step S308).
[Table 2]
[0034]
[Table 3]
[0035]
On the other hand, if the variable n2 is not equal to “3”, it is checked whether or not the variable n2 is equal to “12” (step S309). If they are equal, the processing from step S310 is performed, and if they are not equal, the processing from step S312 is performed. . If the variable n2 is equal to “12”, it is checked whether the variable n1 is equal to “0” or “3” (step S310). If they are equal, they are converted into density values by the LUT shown in Table 3 and stored in the variable m. (Step S311), if not equal, it is converted into a density value by the LUT shown in Table 2 and stored in a variable dish (Step S312).
[0036]
When the processing in any of the above steps S307, S308, S311 and S312 is completed, it is checked whether the variable m and the variable pv in which the density value is stored are larger than “0” (step S310). If both the variable m and the variable pv are larger than “0”, it is checked whether the variable m and the variable pv are equal (step S312). If they are equal, the variable rl is incremented (step S313). Variable pv and variable rl are registered in the list (step S314), index i is set in variable st, variable m is set in variable pv, and "1" is set in variable rl (step S315).
[0037]
On the other hand, if the variable m is “0” and the variable pv is greater than “0”, the variable st, the variable pv, and the variable rl are registered in the list (step S317), and “0” is set to the variable pV (step S317). S318). If the variable m is larger than “0” and the variable pv is “0”, the index i is set in the variable st, the variable m is set in the variable pv, and “1” is set in the variable rl (step S316). That is, the process from step S310 to step S319 is a run-length coding process.
[0038]
Next, when the processing in step S313, step S315, step S316, or step S318 ends, or if both the variable m and the variable pv are “0” in step S310, the index i is incremented (step S319). ), Whether or not the index i is equal to P is checked (step S320). If they are equal, the process from step S321 is performed, and if they are not equal, the process from step S304 is performed.
[0039]
When the index i is equal to P, it is checked whether or not the variable pv is larger than “0” (step S321). If larger, the variable st, the variable pv and the variable rl are registered in the list (step S322). When the process in step S322 ends or the determination result in step S321 is “NO”, the EOL is registered in the list and the index j is incremented (step S323). It is checked whether it is equal to the value obtained by subtracting “1” (step S324). If they are equal, a final line process described later is performed (step S325), and all the processes are terminated. If they are not equal, the process from step S303 is performed.
[0040]
Here, the head line processing in step S301 in FIG. 5 will be described. 8 and 9 are flowcharts showing details of the head line processing. In FIG. 6, indexes, variables, symbols, and functions having the same names as those in FIGS. 5 to 7 are the same as those in FIGS.
[0041]
First, ST3, RL3 to ST6, and RL6 are read, and variables necessary for processing are initialized (step S400). Next, variables n2 and n3 representing pixel states are calculated (step S401). Next, it is checked whether or not the variable n2 is equal to “3” (step S402). If they are equal, the processing from step S403 is performed, and if they are not equal, the processing from step S405 is performed. If the variable n2 is equal to “3”, it is checked whether the variable n3 is equal to “0” or “12” (step S403). If the variable n2 is equal to either, the variable n2 is determined by the LUT shown in Table 3. It is converted into a density value and stored in a variable m (step S404). On the other hand, if it is not equal to either, the variable n2 is converted into a density value by the LUT shown in Table 2 and stored in the variable m (step S405).
[0042]
When the process in either step S404 or step S405 is completed, it is checked whether the variable m and the variable pv in which the density value is stored are larger than “0” (step S406), and the variable m and the variable pv are determined. If both are larger than “0”, it is checked whether the variable m and the variable pv are equal (step S407). If they are equal, the variable rl is incremented (step S408). If they are not equal, the variable st, the variable pv, and the variable rl are registered in the list (step S409), the variable i is index i, the variable pv is variable m, the variable “1” is set to rl (step S410). On the other hand, if the variable m is “0” and the variable pv is greater than “0”, the variable st, the variable pv, and the variable rl are registered in the list (step S412), and “0” is set to the variable pv (step S412). S413). If the variable m is greater than “0” and the variable pv is “0”, the index i is set in the variable st, the variable m is set in the variable pv, and “1” is set in the variable rl (step S411). That is, the processing from step S406 to step S413 is a run-length coding process for the top line.
[0043]
Next, when the processing in step S408, step S410, step S411, or step S413 ends, or when both the variable n and the variable pv are “0” in step S406, the index i is incremented (step S414). ), It is checked whether or not the index i is equal to P (step S415). If they are equal, the processing from step S416 is performed, and if they are not equal, the processing from step S401 is performed. If the index i is equal to P, it is checked whether or not the variable pv is greater than “0” (step S416). If larger, the variable st, the variable pv and the variable rl are registered in the list (step S417). If the process in step S417 ends or if the determination result in child step S416 is “NO”, the EOL is registered in the list (step S418), and the process ends.
[0044]
Next, the final line process in step S325 in FIG. 7 will be described. 10 and 11 are flowcharts for explaining the details of the final line processing. 10 and 11, the same names, indexes, variables, symbols, and functions as those in FIGS. 5 to 7 are the same as those in FIGS.
[0045]
First, ST1, RL1 to ST4, and RL4 are read, and variables necessary for processing are initialized (step S500). Next, variables n1 to n2 representing pixel states are calculated (step S501). Next, it is checked whether or not the variable n1 is equal to “12” (step S502). If they are equal, the processing from step S503 is performed, and if they are not equal, the processing from step S505 is performed. If the variable n2 is equal to “12”, it is checked whether the variable n1 is equal to “0” or “3” (step S503). If the variable n2 is equal to either, the variable n2 is determined by the LUT shown in Table 3. It is converted into a density value and stored in a variable m (step S504). On the other hand, if it is not equal to either, the variable n2 is converted into a density value by the LUT shown in Table 2 and stored in the variable m (step S505).
[0046]
When the process in either step S504 or step S505 is completed, it is checked whether the variable m and the variable pv in which the density value is stored are larger than “0” (step S506). If greater than “0”, it is checked whether or not the variable m and the variable pv are equal (step S507), and if equal, the variable rl is incremented (step S508). On the other hand, if not equal, variable st, variable pv and variable rl are registered in the list (step S509), index i is set in variable st, variable m is set in variable pv, and "1" is set in variable rl (step S510). On the other hand, if the variable m is “0” and the variable pv is larger than “0”, the variable st, the variable pv, and the variable rl are registered in the list (step S513), and “0” is set to the variable pv (step S513). S514). If the variable m is larger than “0” and the variable pv is “0”, the index i is set in the variable st, the variable m is set in the variable pv, and “1” is set in the variable rl (step S512). That is, the processing from step S506 to step S514 is a run-length coding process for the last line.
[0047]
Next, when the processing in step S508, step S510, step S512, or step S514 ends, or when both the variable m and the variable pv are “0” in step S506, the index i is incremented (step In step S514, it is checked whether the index i is equal to P (step S515). Then, if both are equal, the processing from step S517 is performed, and if they are not equal, the processing from step S501 is performed. If the index i is equal to P, it is checked whether or not the variable pV is greater than “0” (step S517). If larger, the variable st, the variable pv, and the variable rl are registered in the list (step S518). If the process in step S518 ends or if the determination result in step S517 is “NO”, the EOL is registered in the list (step S519), and the process ends.
[0048]
Next, a method for calculating the variables n1 and n3 in step S304 in FIG. 5, step S401 in FIG. 8, and step S501 in FIG. 10 will be described. Since this calculation method is the same for the variables n1 to n3, only the case of the variable n1 will be described. 12 and 13 are flowcharts for explaining an algorithm for calculating the variable n1. 12 and 18, the same names, variables, and symbols as in FIGS. 7 to 7 are the same as those in FIGS. 5 to 7, and the symbol “|” represents a bit OR operation.
[0049]
First, the variable n1 is initialized (step S600), and it is checked whether or not the index i indicating the position of the target pixel in the main scanning direction is equal to or larger than the variable ST1 and smaller than the sum of the variable ST1 and the variable RL1 (step S601). . That is, it is checked whether or not the target pixel is in the painted area. If the determination result in step S601 is “YES”, that is, if the target pixel is in the filled region, the bit OR operation result of the variable n1 and the constant “1000b” is stored in the variable n1 (step S602). On the other hand, if “NO”, that is, if the target pixel is not in the painted area, it is checked whether or not the index i is equal to or greater than the sum of the variable ST1 and the variable RL1 (step S603). If the determination result in step S603 is “YES”, ST1 and RL1 are read from the list (step S604).
[0050]
Next, when the processing in step S602 or step S604 ends or the determination result in step S603 is “NO”, the value obtained by adding “1” to the index i is equal to or greater than the variable ST1 and the variable ST1. It is checked whether or not the sum is smaller than the sum of the variable RL1 (step S605). That is, it is checked whether or not the pixel on the right of the target pixel (hereinafter simply referred to as the right pixel) is in the painted area. If the determination result in step S605 is “YES”, that is, if the right pixel is in the filled region, the bit OR operation result of the variable n1 and the constant “100b” is stored in the variable n1 (step S606). On the other hand, in the case of “NO”, that is, when the right pixel is not in the filled region, it is checked whether or not the value obtained by adding “1” to the index i is equal to or greater than the sum of the variable ST1 and the variable RL1 (step S607). If the determination result in step S607 is “YES”, ST1 and RL1 are read from the list (step S608).
[0051]
Next, when the processing in step S606 or step S608 ends or the determination result in step S607 is “NO”, the index i is greater than or equal to the variable ST2, and the sum of the variable ST2 and the variable RL2 Whether it is smaller is checked (step S609). That is, it is checked whether a pixel below the target pixel (hereinafter simply referred to as a lower pixel) is in the painted area. If the determination result in step S609 is “YES”, that is, if the lower pixel is in the filled region, the bit OR operation result of the variable n1 and the constant “10b” is stored in the variable n1 (step S610). On the other hand, if “NO”, that is, if the lower pixel is not in the painted area, it is checked whether or not the index i is greater than or equal to the sum of the variable ST2 and the variable RL2 (step S611). If the determination result in step S611 is “YES”, ST2 and RL2 are read from the list (step S612).
[0052]
Next, when the processing in step S610 or step S612 ends or the determination result in step S611 is “NO”, the value obtained by adding “1” to the index i is equal to or greater than the variable ST2, and the variable It is checked whether it is smaller than the sum of ST2 and variable RL2 (step S613). That is, it is checked whether or not the lower right pixel of the target pixel (hereinafter simply referred to as the lower right pixel) is in the filled region. If the determination result in step S613 is “YES”, that is, if the lower right pixel is in the filled region, the bit OR operation result of the variable n1 and the constant “1b” is stored in the variable n1 (step S614). Then, the process ends. On the other hand, in the case of “NO”, that is, when the next pixel is not in the filled region, it is checked whether or not the value obtained by adding “1” to the index i is greater than or equal to the sum of the variable ST2 and the variable RL2 (step S615). If the determination result in step S615 is “YES”, ST2 and RL2 are read from the list (step S616), and the process ends. If the determination result in step S615 is “NO”, the process ends without doing anything. In the above processing, the relative positional relationship of the pixels is described with the first pixel of the line as the leftmost end and the first line as the uppermost line.
[0053]
Here, a specific example of the processing will be shown taking the Mincho character “one” as an example. FIG. 14 is a conceptual diagram for a rasterized image and a comparison in the process. FIG. 15 is a partially enlarged view of FIGS. 14 (a) and 14 (e). 14 and 15, the rectangle represents a pixel, and the meanings of the rectangles other than the white rectangle are as described on the right side. In FIG. 14, one character is developed in an area of 16 pixels in the main scanning direction and 16 pixels in the sub-scanning direction, the upper left corner of the area is the coordinate origin, and the relative positional relationship between the pixels described above is used. The same positional relationship is shown. In FIG. 15, broken line arrows are scan lines that are virtually set when creating an edge list representing binary image data having a resolution n times the printer resolution. The intersection of the scan lines in both directions is a virtual coordinate point TP (i, j) in FIG. FIG. 15 shows the case of n = 2 as described above, but it is obvious that the virtual coordinate point can be set similarly even if the value of n is another value.
[0054]
FIG. 14A is a conceptual diagram showing a filled area when the character “one” is ideally developed. In order to output to a printer having a specific resolution, the pixel including the filled area is displayed. The value must be determined according to some logic. For example, if it is determined that pixels including even a small area shown in FIG. 14A are printed and pixels not included are not printed, a printing result as shown in FIG. 14B is obtained. As can be seen from both figures, this pixel value decision logic cannot obtain a high-quality print result. On the other hand, as described in the above-mentioned prior art, an edge list that simply represents multi-valued image data of printer resolution from an edge list that represents binary image data having a resolution n times the printer resolution created from PDL. When the raster image is converted into raster and rasterized, the raster image shown in FIG. 14C is obtained. When this raster image is printed, the print result shown in FIG. 14D is obtained. In this case, in particular, the horizontal bar portion of the character “one” is printed with a line width thinner than the line width assumed, and in some cases, it may be interrupted or not printed.
[0055]
On the other hand, when rasterization is performed according to the above-described embodiment of the present invention, a raster image shown in FIG. 14E is obtained, and when this raster image is printed, a printing result shown in FIG. 14F is obtained. FIG. 15A and FIG. 15B are partially enlarged views of FIG. 14A and FIG. 14E, respectively. Hereinafter, an example of rasterization processing according to the present invention will be described with reference to FIGS. 14 (a), 14 (e), 14 (f), and 15. FIG. First, in the present embodiment, among input PDL, characters designated for multi-level expansion are converted from PDL to outline data and further to an edge list. According to the algorithm shown in FIGS. 4 to 7, it is determined whether or not each virtual coordinate point is in the painted area, and as a result, an edge list is created.
[0056]
For example, looking at the seventh line in FIG. 15A, the virtual coordinate point on the right side of the thirteenth pixel is filled in the upper main scan direction scan line (hereinafter simply referred to as the main scan scan line). In the area. This means that the determination result is “YES” when i = 27 and j = 14 in step S202 of FIG. Until this virtual coordinate point, the determination result in step S202 is not “YES”, and the determination result in step S202 is “NO” for virtual coordinate points on the same main scanning scan line after this virtual coordinate point. Therefore, only st = 27 and rl = 1 are registered in the list when the main scanning scan line is completed.
[0057]
On the other hand, in the lower main scanning scan line, the virtual coordinate points on the left and right sides of the 13th pixel and the left side of the 14th pixel are continuously in the painted area. Accordingly, when processing is performed in the same manner as in the upper side, st = 26 and rl = 3 are added to the list when the main scanning scan line is completed. Similarly, when processing is performed for the eighth line, st = 2 and rl = 26 are added to the list for the upper main scanning scan line, and nothing is added to the list for the lower main scanning scan line. For the lines other than those described above, since no virtual coordinate points are in the painting area, a list as shown in Table 4 is finally obtained.
[Table 4]
[0058]
The list shown in Table 4 is merely an example and is expressed in an easy-to-read form. The data format in the storage medium of the list is not determined in Table 4, and any main scanning scan is used. As long as it is known what st and rl are registered in the line, any form may be used. In Table 4, the main scan scan line and the EOL code in which only the EOL code is registered are omitted.
[0059]
Next, a multi-valued edge list is created based on the list shown in Table 4. A specific example of this creation will be described by taking the seventh and eighth lines in FIG. 15B as an example. First, in the seventh line, from the first pixel to the twelfth pixel, the determination results in step S601, step S605, step S609, and step S613 are all calculated by calculating n1 and n2 in FIG. “NO”, the determination results in steps S601 and S605 are both “YES” and the determination results in steps S609 and S613 are both “NO” in the calculation of n3, so that n1 = 0 and n2 = 0 , N3 = 12, and the determination results in step S305 and step S309 in FIG. 5 are both “NO”. Therefore, the variable n2 is converted by the LUT shown in Table 2, and the pixel value “0” is obtained. Therefore, nothing is registered in the multi-value edge list. At the time of the 13th pixel on the same line, n1 = 0, n2 = 7, n3 = 12, and at the time of the 14th pixel, n1 = 0, n2 = 2, and n3 = 12, respectively. Thus, the pixel value “192” and the pixel value “64” are obtained.
[0060]
For the first pixel and the fifteenth and subsequent pixels, n1 = 0, n2 = 0, and n3 = 0. Therefore, when the processing on the seventh line is completed, the multi-value edge list includes st = 13, pv = 192, rl = 1 and st = 14, pv = 64, rl = 1 are registered. Next, in the eighth line, from the first pixel to the twelfth pixel, n1 = 0, n2 = 12, and n3 = 0, and the determination result in step S305 of FIG. 5 is “NO”, step S309 and The determination result in step S310 is “YES”. Therefore, the variable n2 is converted by the LUT shown in Table 3, and the pixel value “192” is obtained. At the time of the 13th pixel on the same line, n1 = 7, n2 = 12, and n3 = 0, and at the time of the 14th pixel, nl = 2, n2 = 12, and n3 = 0, both of which are pixel values. “128” is obtained. For all the pixels other than the lines described above, the pixel value is “0” for any pixel, so that a list as shown in Table 5 is finally obtained.
[Table 5]
[0061]
The list shown in Table 5 is merely an example and is expressed in an easy-to-read form. The data format of the list storage medium is not limited to Table 5, and what type is on which line? Any form can be used as long as it is known whether st, pv, and rl are registered. In Table 5, the main scan scan line and the EOL code in which only the EOL code is registered are omitted. As described above, a multi-value edge list is obtained and output from the multi-value
[0062]
Next, processing in the binary
[0063]
Of the above-described processes, the loading of outline data is the same as that of the multi-value
[Table 6]
[0064]
Next, processing in the multi-value
[0065]
Here, FIG. 17 is a conceptual diagram for explaining a specific example of processing in the multi-value
[Table 7]
[0066]
[Table 8]
[0067]
Next, processing in the binary
[Table 9]
[0068]
Next, processing in the
[0069]
Here, FIG. 18 is a conceptual diagram for explaining a method of not painting uniformly. FIG. 18A shows an area on the virtual coordinate plane of 14 pixels in the main scanning direction and one line in the sub-scanning direction, with the left end of the area in the main scanning direction being the highest density and the right end being the lowest density, and in the main scanning direction FIG. 18B shows an example of drawing with a function that monotonously decreases from left to right, FIG. 18B shows an example in which each pixel value is determined by setting virtual coordinate points at the same resolution as the printer resolution, and FIG. This is an example in which the area shown in FIG. 18B is printed out. Note that the upper numerical value in FIG. 18B indicates the value of the pixel immediately below the numerical value. Note that the example shown in FIG. 18 is a specific example, and it is clear that any method of filling a region can be handled by variously changing the function for determining the pixel value from the coordinate position. Here, if a function in which the pixel value is determined to be the same regardless of the coordinate position is used, it is possible to uniformly paint the specified area, so the method of uniformly painting is also included in the above-described painting method. It is. When the determination of the pixel value is completed, a multi-value edge list is created from the determined pixel greatness and output to the combining
[Table 10]
[0070]
Next, processing in the
[0071]
That is, printout is enabled by matching raster image data to the printer resolution by resolution conversion processing. A method for calculating the approximate pixel value at this time may be a known method. If the designated color space does not match the color space that can be printed out, or if the color represented by each pixel value of the raster image data cannot be reproduced by the printer, the pixel value of the raster image data is changed. The pixel value changing method at this time may be a known method. As described above, raster image data is converted into an image in a resolution and color space that can be printed out, and then a multi-value edge list is created from the converted image and output to the
[0072]
Finally, processing in the
[0073]
That is, the character or vector drawn later is overwritten on the character or vector drawn previously. At this time, the edge list of characters or vectors to be drawn later is forcibly inserted into the existing output edge list, and the corresponding portion of the existing output edge list is overwritten. If there is any designation, the designated drawing order is not followed. For example, when it is specified that the character or vector described at the top of the PDL is drawn with the highest priority, the edge list of the character or vector drawn later is combined with the existing output edge list. If there is no list data at the same pixel position, the lists are concatenated. If there is the same data, nothing is done.
[0074]
Next, a specific example of processing in the above-described combining
[Table 11]
[0075]
In the PDL description, the description related to the multi-valued edge list shown in Table 5, that is, the description that multi-values the character “one” is expanded before the description related to the binary edge list shown in Table 11, that is, the image in the sub-scanning direction. It is assumed that it is ahead of the description for drawing a straight line having a search width “1”. Here, when there is no designation regarding the drawing order, a character or vector to be drawn later is given priority, so an edge list as shown in Table 12 is created. That is, for the sixth pixel, the seventh line, and the ninth line that have no data in the multi-valued edge list shown in Table 5, the data of the binary edge list shown in Table 11 is connected, and the eighth line Since there is data for the eighth pixel, the binary edge list data shown in Table 11 is inserted.
[Table 12]
[0076]
On the other hand, when the character “one” is designated to be subjected to multilevel expansion with the highest priority, even if there is data at the same pixel position, the designated character or vector is given priority. An edge list is created. That is, for the sixth pixel, the seventh line, and the ninth line that have no data in the multi-valued edge list shown in Table 5, the data of the binary edge list shown in Table 11 is connected, and the eighth line Although there is data for the eighth pixel, the data of the multi-valued edge list is given priority by designation, so that no list operation is performed.
[Table 13]
[0077]
As described above, the synthesizing
[0078]
By the way, in the above-described list combining process, it is checked whether there is data in the list at the same pixel position. Therefore, it is possible to easily know the boundary between the images represented by the edge lists output from different processing units. . Therefore, processing for such a boundary, for example, when a black character is embedded in the graphics area, it is possible to easily perform a boundary processing that makes the registration shift inconspicuous. This boundary processing can be realized as follows.
[0079]
First, an image boundary is detected from an edge list output from any one of the multi-value
[0080]
Next, in the
[0081]
In contrast to the processing described above, the list data is not changed at the time of the edge list synthesis, but is output from the output terminal B to the outside as identification data having different contents from the identification data indicating which processing unit has output that the boundary is output. You may make it output.
[0082]
As another boundary process, there is an overlay process of multi-valued characters and background. Below, the example of the said superimposition process is demonstrated with reference to FIG. Here, FIG. 19A is a conceptual diagram showing an example in which color components are ideally developed on the background as four components of YMCK, and each pixel of each color component has 256 gradations. FIGS. 19B and 19C are conceptual diagrams showing the K component and the C component, respectively, of an image obtained by developing a multivalued character in the image shown in FIG. 19A, and FIG. It is a conceptual diagram which shows the example which printed out the image shown to 19 (b) and (c). In FIG. 19, a rectangle represents a pixel, and a pixel value of a non-white rectangle is a pixel having a gradation, and follows the legend in the figure.
[0083]
Normally, when a character is overlaid on a background that is not white, as shown in FIG. 19C, the pixel at the same position as the colored pixel of the character among the background pixels is replaced with the character pixel. On the other hand, multi-valued characters are printed by a printing method that expands the resolution, such as pulse width modulation, and therefore, especially for pixels whose pixel values are halftone, as shown in FIG. , White gaps may occur between the color components. Therefore, when superimposing halftone pixels of a multivalued developed character on the background, the background pixel is not simply replaced with the pixel of the multivalued developed character. It is only necessary to store the pixel values of different color components and replace the background pixels with character pixels only for pixels of the same color component. FIG. 19E is a conceptual diagram showing an example of printout when the image shown in FIG. 19A is overlaid with characters and background by the method described above. The method for realizing the boundary processing described above is the same as the boundary processing that makes the registration shift during printing inconspicuous, and thus detailed description thereof is omitted. In the above description, the raster image is converted into an edge list by the raster
[0084]
C. Modified example
The embodiment of the present invention has been described above, but the embodiment of the present invention is not limited to this. For example, in the
[0085]
In this modified example, only the synthesizing process in the synthesizing
[0086]
However, when writing, a last image obtained by rasterizing an edge list output from another processing unit may be written. Therefore, in this case, as in the above embodiment, the pixel to be written is overwritten on the existing pixel at the position to be written according to the drawing order in the PDL, or the existing pixel is not overwritten. Decide whether to save. This determination of whether or not to overwrite a pixel corresponds to the synthesis processing between the edge lists in the
[0087]
Further, the boundary processing between the character and the background in the combining
[0088]
In either case, the processing of repeating the contents of the edge list in the above embodiment is merely replaced with the processing between raster images, and there is no difference in the content of the image finally output from the output terminal A. Note that the pixel value of the color component different from the character of the pixel to be written is the value of the same color component of the pixel immediately before or after the pixel in the main scanning direction. Which pixel to select is the same logic as the selection in the processing for preventing registration deviation during printing in the above embodiment.
[0089]
By the way, any of the above-described embodiments and modifications may be implemented in several different forms because they may be implemented between application software that outputs PDL and the print engine. For example, in a printer in which a print engine that performs printing and a print controller that performs control of the print engine, control of communication with the outside, and the like are housed in one housing, it can be realized as software that operates on the print controller. Further, even when the print engine and the print controller are separate casings, it can be realized as software operating on the print controller. Alternatively, it can be realized as software operating on a PC or WS on which application software for outputting PDL is installed. Furthermore, in order to increase the processing speed, part or all of the processing in the above embodiment may be realized by hardware, and the implementation of any embodiment does not depart from the spirit of the present invention.
[0090]
The embodiments of the image processing apparatus according to the present invention have been described above. However, the implementation of the image processing apparatus according to the present invention is not limited to the above-described contents, and the gist of the present invention is possible even with other implementations. As long as it does not deviate from the above, any implementation may be used.
[0091]
【The invention's effect】
As described above, according to the present invention, the character or line drawing part is extracted by the extracting means from the image information expressed in the page description language and input from the input means. The first intermediate code is converted into a first intermediate code having a binary gradation by one conversion means, and the first intermediate code has a multi-value gradation at a lower resolution than the first intermediate code by the second conversion means. The second intermediate code is converted into a second intermediate code, and the tag generation means determines the type of image that occupies the area for each predetermined area of the input image information based on the first intermediate code or the second intermediate code. Tag information including at least information indicating that it is a character or a line drawing part represented by the second intermediate code is generated, and image information described in a page description language is converted into a raster image It is possible to reduce the storage capacity required in that, to obtain the advantage that more can be obtained printout with high image quality.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to the present invention.
FIG. 2 is a conceptual diagram illustrating an example of PDL input to the image processing apparatus according to the present invention.
FIG. 3 is a flowchart showing an edge list generation process.
FIG. 4 is a flowchart showing details of binary edge list creation processing;
FIG. 5 is a flowchart showing details of binary edge list creation processing;
FIG. 6 is a flowchart showing details of binary edge list creation processing;
FIG. 7 is a flowchart showing details of binary edge list creation processing;
FIG. 8 is a flowchart showing details of the head line processing.
FIG. 9 is a flowchart showing details of the head line processing.
FIG. 10 is a flowchart for explaining details of final line processing;
FIG. 11 is a flowchart for explaining details of final line processing;
FIG. 12 is a flowchart for explaining an algorithm for calculating a variable n1.
FIG. 13 is a flowchart for explaining an algorithm for calculating a variable n1.
FIG. 14 is a conceptual diagram for a rasterized image and a control for comparison.
15 is a partially enlarged view of FIGS. 14 (a) and 14 (b). FIG.
16 is a flowchart showing processing in the multi-value
FIG. 17 is a conceptual diagram for explaining a specific example of processing in the multi-value
FIG. 18 is a conceptual diagram for explaining a method of not uniformly filling a designated area in the
FIG. 19 is a conceptual diagram for explaining a superimposition process of a multi-valued character and a background.
[Explanation of symbols]
11 Command separation unit (input means, extraction means)
12 Multi-valued character processing unit (first conversion means)
13 Binary character processing unit (first conversion means)
14 Multi-value vector processing unit (first conversion means)
15 Binary vector processing unit (first conversion means)
16 Graphics processing unit
17 Raster image processor
18 synthesis unit (second conversion means, tag generation means, synthesis means, boundary detection means)
Claims (8)
前記入力手段で入力された前記画像情報の中から文字または線画部を抽出する抽出手段と、
前記抽出手段で抽出した文字または線画部を、ラスター展開するための中間的なコードであり、2値の階調を有する第1の中間コードに変換する第1の変換手段と、
前記第1の変換手段により変換された第1の中間コードを、当該第1の中間コードより低い解像度で多値の階調を有する第2の中間コードに変換する第2の変換手段と、
前記第1の変換手段により変換された第1の中間コードまたは前記第2の変換手段により変換された第2の中間コードに基づいて、前記入力手段で入力された前記画像情報の所定の領域毎に、当該領域を占める画像の種類を表すタグ情報を生成するタグ生成手段とを具備し、
前記タグ生成手段が生成する前記タグ情報は、前記第2の中間コードで表された文字または線画部であることを表す情報を少なくとも含むことを特徴とする画像処理装置。An input means for inputting image information described in a page description language;
Extraction means for extracting a character or line drawing part from the image information input by the input means;
First conversion means for converting the character or line drawing part extracted by the extraction means into a first intermediate code for raster development, which is a first intermediate code having a binary gradation;
Second conversion means for converting the first intermediate code converted by the first conversion means into a second intermediate code having a multi-level gradation at a lower resolution than the first intermediate code;
For each predetermined region of the image information input by the input unit based on the first intermediate code converted by the first conversion unit or the second intermediate code converted by the second conversion unit And tag generation means for generating tag information representing the type of image occupying the area,
The image processing apparatus according to claim 1, wherein the tag information generated by the tag generation unit includes at least information indicating a character or a line drawing part represented by the second intermediate code.
前記タグ生成手段が生成する前記タグ情報は、前記境界検知手段により検知された境界であることを表す情報をさらに含むことを特徴とする請求項第2項に記載の画像処理装置。Boundary detection means for detecting a boundary between the character or line drawing part and a portion other than the character or line drawing part;
The image processing apparatus according to claim 2, wherein the tag information generated by the tag generation unit further includes information indicating a boundary detected by the boundary detection unit.
前記境界検知手段における検知結果により前記合成手段における合成を異ならせることを特徴とする請求項第2項に記載の画像処理装置。Boundary detection means for detecting a boundary between the character or line drawing part and a portion other than the character or line drawing part;
The image processing apparatus according to claim 2, wherein the composition in the composition unit is made different depending on the detection result in the boundary detection unit.
前記タグ生成手段が生成する前記タグ情報は、前記境界検知手段により検知された境界であることを表す情報をさらに含むことを特徴とする請求項第5項に記載の画像処理装置。Boundary detection means for detecting a boundary between the character or line drawing part and a portion other than the character or line drawing part;
The image processing apparatus according to claim 5, wherein the tag information generated by the tag generation unit further includes information indicating a boundary detected by the boundary detection unit.
前記境界検知手段における検知結果により前記合成手段における合成を異ならせることを特徴とする請求項第5項に記載の画像処理装置。Boundary detection means for detecting a boundary between the character or line drawing part and a portion other than the character or line drawing part;
The image processing apparatus according to claim 5, wherein the synthesis in the synthesis unit is made different depending on a detection result in the boundary detection unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP04235999A JP3750396B2 (en) | 1999-02-19 | 1999-02-19 | Image processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP04235999A JP3750396B2 (en) | 1999-02-19 | 1999-02-19 | Image processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000242461A JP2000242461A (en) | 2000-09-08 |
| JP3750396B2 true JP3750396B2 (en) | 2006-03-01 |
Family
ID=12633852
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP04235999A Expired - Fee Related JP3750396B2 (en) | 1999-02-19 | 1999-02-19 | Image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3750396B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8089553B2 (en) | 2007-11-14 | 2012-01-03 | Ricoh Company, Ltd. | Lens drive device, image pickup device and lens drive method |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7400421B2 (en) * | 2002-12-12 | 2008-07-15 | Seiko Epson Corporation | Image processing method and image processing system using the same |
| JP4412363B2 (en) | 2007-07-18 | 2010-02-10 | コニカミノルタビジネステクノロジーズ株式会社 | Image processing device |
| JP6249782B2 (en) * | 2014-01-14 | 2017-12-20 | 三菱電機株式会社 | Data processing apparatus, data processing method, and program |
-
1999
- 1999-02-19 JP JP04235999A patent/JP3750396B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8089553B2 (en) | 2007-11-14 | 2012-01-03 | Ricoh Company, Ltd. | Lens drive device, image pickup device and lens drive method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000242461A (en) | 2000-09-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR950011807B1 (en) | Character processing method and apparatus | |
| EP0999522B1 (en) | Image processing method, system and apparatus, and storage medium | |
| US7692813B2 (en) | Image processing apparatus and method, and storage medium | |
| JPH11105349A (en) | PRINT PROCESSING SYSTEM, PRINT PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PRINT PROCESSING CONTROL PROGRAM | |
| US5195175A (en) | Image synthesizing system | |
| JP4428743B2 (en) | Image processing method and apparatus, printer, image processing system, and storage medium | |
| JP3750396B2 (en) | Image processing device | |
| KR20080032638A (en) | A computer-readable recording medium recording an image processing apparatus, an image processing method and an image processing program | |
| US8259347B2 (en) | Image processing apparatus and computer readable medium | |
| JP2003158632A (en) | Image processing method, image processing apparatus and image processing system for executing the same | |
| JP3952188B2 (en) | Image interpolation apparatus, image interpolation method, and image interpolation program | |
| JP4514168B2 (en) | Image processing system and image processing method | |
| JP4109785B2 (en) | Image processing apparatus and method, and computer-readable memory | |
| JP3888090B2 (en) | Image processing apparatus and image processing method | |
| JP3346051B2 (en) | Image processing device | |
| JP2001283212A (en) | Method of base interpolation by vector transformation | |
| JP4217332B2 (en) | Image processing apparatus and method, and computer-readable memory | |
| JP2000181425A (en) | Picture processor | |
| JP2002007102A (en) | Print control device, drawing control device, data processing method, and storage medium | |
| JP4306841B2 (en) | Image processing apparatus and method, and computer-readable memory | |
| JP4115073B2 (en) | Image processing apparatus and image processing method | |
| JPH07210669A (en) | Image processing apparatus and control method thereof | |
| JP2915700B2 (en) | Image processing method and apparatus | |
| JP2006237858A (en) | Image processing apparatus, image processing method, program for causing computer to execute the method, and recording medium | |
| JP2640591B2 (en) | How to create a border image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20051109 |
|
| 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: 20051115 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051128 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091216 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101216 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111216 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111216 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121216 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121216 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131216 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |