JP3879804B2 - Character / graphic processing unit - Google Patents

Character / graphic processing unit Download PDF

Info

Publication number
JP3879804B2
JP3879804B2 JP15336099A JP15336099A JP3879804B2 JP 3879804 B2 JP3879804 B2 JP 3879804B2 JP 15336099 A JP15336099 A JP 15336099A JP 15336099 A JP15336099 A JP 15336099A JP 3879804 B2 JP3879804 B2 JP 3879804B2
Authority
JP
Japan
Prior art keywords
edge
list
bitmap
character
line
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
Application number
JP15336099A
Other languages
Japanese (ja)
Other versions
JP2000348191A (en
Inventor
正二三 知久
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP15336099A priority Critical patent/JP3879804B2/en
Publication of JP2000348191A publication Critical patent/JP2000348191A/en
Application granted granted Critical
Publication of JP3879804B2 publication Critical patent/JP3879804B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、文字・図形を示す輪郭線の情報をビットマップに展開する文字・図形処理装置に関するものである。
【0002】
【従来の技術】
ページプリンタ、ディスプレイ等のビットマップスクリーンをベースとする出力装置では、解像度が向上するにしたがって、同じサイズの文字・図形パターンを出力するために、より多くのビットマップデータが必要となる。さらに各種のサイズの文字・図形パターンの出力に対応するためには、それぞれのサイズ毎にビットマップデータを保持しなければならず、効率が悪くなる。そこで、特に文字のように決まった輪郭をもつパターンについては、基本となるパターンの輪郭線を、複数の直線セグメントや曲線セグメントによって構成される輪郭線の情報(アウトライン情報)として保持し、所望のサイズに拡大縮小してから輪郭線の内部を塗りつぶす方法を利用し、メモリ効率を向上させている。
【0003】
この、輪郭線の内部を塗りつぶす方法を利用して文字・図形パターンを描画する処理について、以下に簡単に説明する。図7は、輪郭線と、その輪郭線から得られるビットマップの一例の説明図である。図7において、制御点(○に×印で示す)の間を結ぶ太線が輪郭線の情報を構成する各セグメントである。図7に示した文字「A」は、11個の直線セグメントで構成されている。このような輪郭線の情報に基づいて、その輪郭線の内部に存在する画素を例えば反転させることによって、図7においてハッチングで示したような文字「A」のビットマップを得るものである。
【0004】
図8は、輪郭線の内部の画素であるか否かを判定する一方法の説明図である。上述のように輪郭線の内部に存在する画素を例えば反転させるためには、各画素について、輪郭線の内部か否かを判定する必要がある。その判定方法の一つとして、ここでは、各画素の中心位置が輪郭線の内部か否かを判定する。すなわち、矩形で示した各画素の中心位置(図中の○)が、輪郭線(図中、○に×印で示した制御点を結ぶ太線)で囲まれた内部に存在するか否かを判断すればよい。このような判定方法によって、図8においてハッチングを施して示した画素(矩形)が、輪郭線の内部であると判定される。これらの画素を例えば反転することによって、文字や図形のビットマップを得ることができる。
【0005】
基本的には上述のようにして、輪郭線の情報に基づいて、その内部の画素を例えば反転して塗りつぶし処理を行う。実際に、このような塗りつぶし処理を行う方法には、代表的な方法としてスキャンコンバージョン法がある。図9は、スキャンコンバージョン法による塗りつぶし処理の説明図である。ここでは、輪郭線の延在する方向(ストローク方向)を考慮しないEVEN−ODDルールと呼ばれる条件で輪郭線の内外を判定する例について説明する。
【0006】
いま、図9(A)に太線で示すような輪郭線の情報が与えられたとする。ここで、ビットマップの画素の配列方向のうち、一方の配列方向を走査方向とする。ここでは、図中の左右方向を走査方向とする。もちろん、図中の上下方向を走査方向としてもよい。
【0007】
そして、走査方向に平行で、各画素の中心点を結ぶ複数の走査線と、輪郭線との交点の座標を求める。図9では、交点を●によって示し、各画素の中心を○によって示している。さらに、ここでは交点の図中右側において最も近い位置に中心を有する画素を得る。この画素をエッジと呼び、塗りつぶし範囲の始点、終点となる。図9(A)ではエッジの画素にハッチングを施して示している。この例では走査線を図中の左右方向に設定しているので、左右方向の輪郭線上では輪郭線と走査線とが交点を持たないため、エッジが現れない。
【0008】
次に、ルールに従ってペイント処理を行う。EVEN−ODDルールでは、走査線との交点を一方の端から数えて奇数番目から、偶数番目までが塗りつぶし範囲となる。上述のように、エッジを交点の右側に取った場合には、左端から数えて奇数番目のエッジが始点、偶数番目のエッジが終点となる。図9(B)に示すように、このルールに従って走査方向に沿って画素を調べて行き、奇数エッジから偶数エッジまでの画素を反転する。ここで、偶数エッジ自身は輪郭線の外側となるので、偶数エッジの左の画素までが塗りつぶし範囲であることに注意する。また、エッジが偶数個重なった場合は、エッジを消すことで正しく塗りつぶすことができる。
【0009】
図9(B)に示した例では、三角で示した画素が始点となり、逆三角で示した画素が終点となる。そのため、ハッチングを施した画素が反転されることになる。
【0010】
図10は、スキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。図7で示した文字「A」の場合について、図9で説明したスキャンコンバージョン法により塗りつぶし処理を行った場合の例を示している。図10(A)に太線で示すような輪郭線の情報が与えられると、各輪郭線と各走査線との交点から、図10(A)にハッチングを施して示したエッジが求められる。ここで、走査方向の左側から奇数番目のエッジ(三角で示す)が始点、偶数番目のエッジ(逆三角で示す)が終点となる。
【0011】
このようにして求められたエッジの情報をもとに、始点の画素から終点の画素の手前の画素までを反転することにより、図10(B)に示すようなビットマップを得ることができる。文字「A」では上半分の内部が抜けているが、この方法によればこのような白く抜ける部分についても正確に表現することができる。
【0012】
上述の輪郭線の内部を塗りつぶす方法を利用して小サイズのパターンを出力しようとすると、塗りつぶしに抜け(ドロップアウト)が発生する場合がある。この原因は、輪郭線の間隔が狭くなりすぎて、輪郭線の間に中心点を持つ画素が存在しない場合に発生する。言い換えると、隣接する画素の中心点間を複数の輪郭線が貫く場合に発生する。
【0013】
図11は、ドロップアウトの一例の説明図である。例えば図11(A)に示すように、水平に並んだ画素の中心点間を複数の輪郭線が貫いた場合に、破線で示す画素が塗りつぶされず、図形が途切れたように見えてしまう。この原因は、図11に示す2本の輪郭線と走査線との交点から得られるエッジが同じ画素となってしまうことによる。すなわち、図11(B)に示すように、中央の画素においては、塗りつぶし領域の始点であり終点でもある。上述のように、ペイント処理を正常に実施するためには、偶数個重なったエッジを消去する。そのため、図11(B)に示す中央の画素はエッジが消去され、塗りつぶしは行われない。このようにしてドロップアウトが発生してしまう。
【0014】
上述のようにエッジが重なっている部分にドロップアウトが発生することから、逆にエッジを抽出する段階で2つのエッジが重なっていることを検出すれば、ドロップアウトが発生することを予測できる。しかし前述したように、ペイント処理を正常に実施するためには、この重なっているエッジを削除しなければならないので、ペイント処理とは別にドロップアウトの補正処理を行うことになる。
【0015】
図12は、ドロップアウトの別の例の説明図である。図12では、垂直方向に隣接する画素の中心点間を、複数の輪郭線が貫く場合に発生するドロップアウトを示している。この例では、各走査線と輪郭線との交点から得られるエッジに従って塗りつぶす領域が、隣接する走査線において連続しない。すなわち、エッジは図12(B)に示すように得られるが、このエッジに従って塗りつぶされる画素は、図12(A)においてハッチングを施した画素である。このように、隣接する走査線間で塗りつぶす領域が離れてしまうため、破線で囲んだ箇所において図形が途切れたように見えてしまう。
【0016】
この図12に示す例では、図11に示す例のように走査方向から調べても重なったエッジは発見できず、図11に示す場合と同様の方法ではドロップアウトの発生は予測できない。このような場合には、図12(C)に示すように、走査線を図中の上下方向に設定すると、図11に示す例と同様にして、ドロップアウトの発生を予測することが可能になる。
【0017】
以上のように、ドロップアウトを全て発見するためには、図中の左右方向と上下方向の両方向からエッジを検出する必要がある。但し、ペイント処理は、水平及び垂直のどちらからでも結果が同じなので、一方で検出したエッジに対してのみ実施すればよい。
【0018】
図13は、ドロップアウトの補正を含むスキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。ここでは小さい文字「0」をビットマップ展開する例を示している。2つの曲線セグメントによって挟まれた部分を塗りつぶすことによって、小さい文字「0」を出力できる。
【0019】
この例において、図中の左右方向(または上下方向)を走査方向として得られたエッジを用いてペイント処理を行うことによって、図13(A)にハッチングを施して示す画素が塗りつぶされる。輪郭線間隔の狭い部分でドロップアウトが発生していることが判る。
【0020】
次に、図11において説明したように、走査方向のエッジの重なりを調べると、図13(B)にハッチングを施して示した画素がドロップアウトしていることが発見できる。また、図12において説明したように、走査方向を変更(例えば図中の左右方向から上下方向に変更)してエッジの重なりを調べると、図13(C)にハッチングを施して示した画素がドロップアウトしていることが発見できる。図13(A)、(B)、(C)の各画像を合成することによって、図13(D)に示すようにドロップアウトのない図形(文字「0」)を得ることができる。なお、図13では図13(A)、(B)、(C)の各ビットマップ画像を別々に示しているが、例えば1枚のビットマップに図13(B)、(C)に示す両方向の走査方向におけるドロップアウトする画素を書き込んでもよい。また、図13(A)、(B)、(C)の各画像を1枚のビットマップに書き込むように構成してもかまわない。
【0021】
ところで、輪郭線と走査線との交点により選択されたエッジを、もっとも単純に記録しておくには、上述の各例において示したように、ビットマップ上で画素を反転させておけばよい。この場合、ペイント処理で全ての画素を調べることによって、上述のような塗りつぶしを行うことができる。しかし、文字のサイズが大きくなった場合や高解像度の場合には、ビットマップの画素数も非常に多くなる。このように画素数が多くなると、ペイント処理で全ての画素を調べる処理は非常に重くなる。また、ビットマップのためのメモリ量も大きくなる。例えば縦横n倍のビットマップを作成するためにはnの2乗倍のメモリが必要となる。さらに、ドロップアウト処理にビットマップがもう1枚必要であったり、単純なデータ構造のためにEVEN−ODDルール以外のもっと複雑なペイントルールが利用しにくい、などの欠点がある。
【0022】
そこで、エッジの座標を走査線毎にリストにし、リストから隣接するエッジの座標を2つずつ取り出して塗りつぶし範囲とする、エッジリストと呼ばれる方法がある。例えば特開平5−224653号公報に記載されている文字出力装置では、セグメントと走査線の交点のX座標、Y座標を組にしてリストに登録し、このリストをもとにペイント処理を行っている。
【0023】
図14は、エッジリストを用いたスキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。図14(A)は、輪郭線と画素との関係の一例を示した拡大図である。ここでは、走査線S1,S2における画素の塗りつぶし処理を考える。また、太線で示した▲1▼〜▲5▼が輪郭線のセグメントであり、この順番で格納されているとする。
【0024】
まず、各セグメントは順次呼び出され、走査線との交点を検出する。例えばセグメント▲1▼は、走査線S1及び走査線S2と●で示した位置で交差する。この●の座標を、それぞれの走査線のリストに加えて行く。すなわち、図14(B)に示すように、走査線S1のリストに、セグメント▲1▼と走査線S1の交点の座標としてP1(▲1▼)を格納する。同様に、走査線S2のリストに、セグメント▲1▼と走査線S2の交点の座標としてP2(▲1▼)を格納する。このような処理を、各セグメント▲2▼〜▲5▼についても行う。これによって、図14(B)に示すようなリストが得られる。ここでは、上述の文献のようにX、Y座標を格納するほか、走査線S1によって一方の座標値が分かっているので、他方の座標値のみを格納してもよい。
【0025】
このようにしてすべてのセグメントについて、走査線との交点の座標をリストに登録したら、走査線毎に登録されている座標をソートする。ここでは左から右への順でソートすると、図14(B)に示すリストは、図14(C)に示すようにソートされる。
【0026】
ソート後、図14(D)に示すように先頭からペアでセグメントと走査線の交点の座標を取り出す。ペアの座標のうち、先の座標に対応するエッジが塗りつぶし処理の始点、後の座標に対応するエッジが塗りつぶし処理の終点となる。始点から終点までの画素を反転することによって塗りつぶし処理を行うことができる。なお、上述のように終点の画素は反転しない。
【0027】
このようなペイント処理によって、図14(E)にハッチングで示す画素が反転され、走査線S1,S2における塗りつぶし処理が終了する。なお、図14ではセグメントと走査線との交点の座標をリストに登録する例を示しているが、例えば交点の座標に対応するエッジの座標を登録してもよい。
【0028】
エッジリストでは、エッジの情報をビットマップ上に持たないので、ドロップアウトする画素についてはペイント処理を施しているビットマップに直接描画すればよい。また、エッジ間を塗りつぶすためにビットマップをすべて読み出す必要がなく、また、ビットマップ上で偶数エッジを消去するなどのエッジ情報を操作する必要も無い。そのため、ワークエリアのメモリにビットマップを持つ必要がなく、最終的な出力先であるフレームバッファに直接書き込むことによってペイント処理を実行してかまわない。
【0029】
上述のようなエッジリストを用いた塗りつぶし処理においても、エッジリストから取り出した2つの座標に対応するエッジが同じであれば、ドロップアウトが発生すると判定できるので、ドロップアウトに対する処理を行うことができる。また、上述のようなエッジリストを、直交する2方向の走査線について別々に作成し、それぞれのエッジリストからドロップアウトを検出することも考えられている。
【0030】
上述のように、輪郭線の間隔が狭くなりすぎて塗りつぶしに抜け(ドロップアウト)が発生する場合、この現象を回避するためにスキャンコンバージョンの過程でドロップアウトの発生個所を検知し、修正を行う。しかし、輪郭線の1セグメントの中でドロップアウト部分とそうでない部分とが存在した場合、ドロップアウトでない部分に凹形状が現れるという不具合がある。
【0031】
図15は、ドロップアウト処理による不具合の一例の説明図である。図15(A)では、文字「1」を描画した例を示している。文字「1」のセリフ部分において、P1およびP3はドロップアウト処理によって塗りつぶされるが、P2は塗りつぶされず、凹形状が現れている。このような現象は、図15に示す文字「1」のセリフ部分に限らず、文字「T」の上部等、水平部分と垂直部分が交わる個所で顕著である。この凹形状は、その形状が鳥の足のように見えることから、この個所を「鳥足」と呼んでいる。
【0032】
図15(B)には図15(A)の鳥足発生部分を拡大して示している。輪郭線を構成するセグメントのうち、図中の左右方向に延在する水平セグメントL1、L2、L3は、図中の上下方向の走査線に対して交点をもつ。このとき、エッジとなる画素P1、P2、P3のうち、P1,P3についてはドロップアウトが検出され、ドロップアウト処理によって塗りつぶされる。しかし、P2は単なる終端のエッジとなるためドロップアウトとは判定されない。例えば図中の上下方向に走査線を設定した場合には、P2の1つ上の画素までが塗りつぶし範囲となり、P2は塗りつぶされない。また、例えば図中の左右方向に走査線を設定した場合には、P1〜P3の何れもエッジとはならない。そのため、図中の左右方向及び上下方向の両方に走査方向を設定したとしても、P2については塗りつぶされない。そのため、図15(A)に示すような凹形状の「鳥足」が現れる。
【0033】
従来の技術では、上述のようなドロップアウト部分の補正処理は行っているが、「鳥足」の発生を防ぐことはできなかった。
【0034】
【発明が解決しようとする課題】
本発明は、上述した事情に鑑みてなされたもので、文字・図形を示す輪郭線の情報をビットマップに展開する際に発生していた凹形状の「鳥足」を補正し、良好な文字・図形を再現可能な文字・図形処理装置を提供することを目的とするものである。
【0035】
【課題を解決するための手段】
本発明は、エッジリストを用いて輪郭線の情報をビットマップに展開する際に、つのエッジの座標が同じである場合にドロップアウトが発生するエッジを検出して補正処理を行うとともに、その補正処理により生じた凹状部をセグメントに沿って補正する補正処理を行うものである。より具体的には、エッジリストの作成時に、エッジの検出とともに走査線とセグメントとが直交するか否かを判定し、走査線とセグメントとが直交すると判定した場合には、そのセグメントと走査線との交点のエッジの座標を順次リンクさせておく。そして、ドロップアウトの補正処理時に、ドロップアウトが発生するエッジを検出したとき、そのエッジの座標からリンクされているエッジの座標が存在する場合には、そのリンクをたどって得られるエッジの座標について補正処理を行う。
【0036】
これによって、輪郭線の1セグメントの中でドロップアウト部分とそうでない部分とが存在した場合でも、ドロップアウト部分からセグメントに沿って補正処理を行うため、「鳥足」と呼ばれるような凹形状は補正され、「鳥足」がビットマップ上に現れることはない。そのため、輪郭線の情報から良好に文字・図形をビットマップ展開することができる。
【0037】
【発明の実施の形態】
図1は、本発明の文字・図形処理装置の実施の一形態を示す概略構成図である。図中、1は走査変換部、2はエッジリスト登録部、3はエッジリスト生成部、4は形状補正部、5はエッジリスト展開部、6は輪郭線情報、7はエッジリスト、8はビットマップである。
【0038】
走査変換部1は、指定された文字や図形の輪郭線情報6を取り出し、記録されている順に輪郭線を構成するセグメントを読み出し、セグメントと走査線の交点を計算し、交点の座標からエッジを求める。そして、順次、エッジリスト登録部2にエッジの情報を渡す。この時、セグメントが走査線に対して垂直であれば、エッジリスト登録部2にリンクを作成するように指示する。全てのエッジを登録したら、エッジリスト生成部3を呼び出す。なお、文字や図形の大きさを変更するための拡大縮小処理など、各種の変換処理を予め行っておいてもよい。また、曲線セグメントについては、処理の効率化のため、分割して直線セグメントによって近似してもよい。
【0039】
エッジリスト登録部2は、エッジリスト7として走査線毎に用意されたリストに、走査変換部1から出力されたエッジの情報を、リンク情報とともに、順次、登録する。リストにエッジの情報として登録する要素は、登録するエッジの座標と、このエッジとリンクする次のエッジを格納した場所(例えばリストでの配列番号やメモリアドレス等)の、最低、2つの情報を格納している構造体である。走査変換部1からリンクを作成する指示があった場合は、登録したエッジの情報中の次のエッジを格納した場所として、同じセグメントについて次の走査線で登録するエッジの情報の場所を登録する。指示が無い場合は、リンクに終端番号(例えば−1など、特定の値)を代入する。
【0040】
エッジリスト生成部3は、エッジリスト7をエッジの座標で走査線毎にソートし、1本の走査線についてリストのソートが終了するごとに形状補正部4を呼び出し、そのソートされたリストを渡す。
【0041】
形状補正部4は、エッジリスト生成部3から渡された1走査線分のリストを検査し、エッジがドロップアウトの可能性があるか否かを判断する。そして、ドロップアウトの可能性があれば、ドロップアウト用のビットマップ8に登録し、通常のエッジであればエッジリスト展開部5を呼び出す。ドロップアウトの可能性があると判断されたエッジにリンクがある場合は、リンクを追跡し、そのエッジもドロップアウト用のビットマップ8に登録する。
【0042】
エッジリスト展開部5は、形状補正部4が出力したエッジ間を、ビットマップ8上に展開する。
【0043】
なお、既に述べたように、ドロップアウトの検出は、ビットマップの画素が配列されている2方向(以下の説明では便宜上、水平方向および垂直方向とする)について行う必要がある。そのため、走査変換部1,エッジリスト登録部2,エッジリスト生成部3,形状補正部4は、水平方向の走査線と垂直方向の走査線の2つの場合についてそれぞれ処理を行う。また、エッジリスト展開部5については、いずれかの方向の走査線について処理を行えばよいので、2回の処理のうち1回目(または2回目)の実行時のみ呼び出される。
【0044】
図2は、本発明の文字・図形処理装置の実施の一形態における動作の一例を示すフローチャートである。例えば外部より輪郭線情報6が入力されたり、あるいはコード情報が入力され、コード情報に従って例えば内部のROMや外部記憶装置から輪郭線情報6を読み出し、ビットマップに展開すべき文字・図形の輪郭線情報6が与えられると、文字・図形処理装置の動作を開始する。上述のように、補正処理のために異なる走査方向によって2回の処理を行う。
【0045】
まずビットマップ8を初期化し、1度目の処理を開始する。走査変換部1は、与えられた輪郭線情報6に対し、必要に応じて、出力したいサイズに座標変換するなど各種の変換処理を行う。また、画素のサイズから曲線セグメントは分割数を決め、短い直線セグメントに分割しておく。さらに、エッジリスト7を初期化しておく。
【0046】
S21において、走査変換部1は、与えられた輪郭線情報6を構成するすべてのセグメントについて、各走査線との交点に対応するエッジを順次求める。エッジリスト登録部2は、走査変換部1で求めたエッジの情報を、エッジリスト7に順次登録してゆく。このとき、走査変換部1は、セグメントが走査線に対して垂直であるか否かを判定し、走査線に対して垂直なセグメントについてはエッジリスト登録部2にリンクの作成を指示する。この指示に従って、エッジリスト登録部2は、走査線に対して垂直なセグメントについて、走査線毎に登録されるエッジをリンクで順次接続してゆく。
【0047】
輪郭線情報6を構成するすべてのセグメントについて、エッジを求めてエッジリスト7に格納した後、走査線毎にエッジリスト生成部3、形状補正部4、エッジリスト展開部5の処理を行う。まずS22において、最初の走査線に設定し、S23において全走査線について処理を終了したか否かを判定した後、S24において、エッジリスト生成部3は1走査線分のエッジのリストをソートする。そして、ソートされたエッジのリストの最初からエッジの情報を取り出せるように初期化しておく。なお、エッジは2つをペアとし、始点及び終点として処理する。
【0048】
S25において、1走査線分のリスト中のエッジについて、すべて処理し終えたか否かを判定し、未処理のエッジが残っている場合にはS26に進む。
【0049】
S26では、形状補正部4においてドロップアウトの判定を行う。すなわち、1走査線分のリストからエッジを2つ取り出したとき、その座標が同じであればドロップアウトが発生するものと判定できる。ドロップアウトが発生しなければ、S27において、エッジリスト展開部5は、取り出したエッジ間のビットマップ8を反転し、塗りつぶす。このとき、終点となるエッジについては反転しない。また、ドロップアウトが発生していればS30に進み、形状補正部4はドロップアウトの補正処理と、そのドロップアウトの補正処理に伴う「鳥足」の発生を防止する補正処理を行う。
【0050】
その後、この2つのエッジを処理済とし、S28において次の2つのエッジを取り出し、S25へ戻る。このように2つのエッジ毎に処理を行って行き、1走査線のリストに格納されているすべてのエッジについて処理を終えると、S25でこれを検出し、S29において次の走査線へ処理を移してS23に戻る。なお、エッジは2つをペアとして処理するので、エッジが1つだけ残る場合が発生しても、1走査線について処理を終了したものとして扱う。
【0051】
このようにして、順次、走査線毎の処理を行ってゆき、すべての走査線についての処理を終えると、これをS23で検出し、1回目の処理を終了する。次に、走査方向を変更して2回目の処理を行う。2回目の処理では、エッジリスト展開部5による塗りつぶしの処理、すなわち、S27における処理を行わない。その他の処理は1回目と同様の処理である。2回の処理を終えると、輪郭線情報6をビットマップ8に展開する処理を終了する。
【0052】
図3は、本発明の文字・図形処理装置の実施の一形態においてドロップアウトが発生する場合の動作の一例を示すフローチャートである。この処理は、図2のS26においてドロップアウトが発生すると判定された場合に実行される。S30においてドロップアウトが発生すると判定されたエッジの情報を取得し、S31において、そのエッジについて、ビットマップ8に登録する。
【0053】
さらに、ドロップアウトが発生すると判定されたエッジが、走査線に垂直なセグメントに含まれていた場合には、そのセグメント上の各画素について補正処理を行う。このとき、エッジに含まれるリンクをたどることによって、走査線に垂直なセグメント上の画素を取得することができる。
【0054】
S32において、ドロップアウトの判定を行った際に用いた2つのエッジの両方について、リンクが終端であるか否かを判定する。両方とも終端であれば、このドロップアウト時の補正処理を終了する。
【0055】
少なくともいずれかのリンクが終端でなければ、S33において、始点となるエッジのリンクの有無を確認する。リンクが終端でなければ、S34において、リンク先の次の走査線におけるエッジを取得し、このエッジのリンクを終端に変更する。同様に、S35において、終点となるエッジのリンクの有無を確認する。リンクが終端でなければ、S36において、リンク先の次の走査線におけるエッジを取得し、このエッジのリンクを終端に変更する。S37において補正処理における処理対象の走査線を次に進め、S31に戻ってS34,S36で取得したエッジについてビットマップ8に登録する。以後、S34,S36で取得したエッジを処理対象として、S32以降の処理を繰り返す。
【0056】
このような繰り返し処理によって、走査線に垂直なセグメントに対応するエッジを追跡し、順次、ビットマップ8に登録して行く。2つのセグメントが終端に達すると、対応するエッジのリンクが終端となる。これをS32で検出し、補正処理を終了してS28へ戻り、ドロップアウトが発生すると判定された2つのエッジについての処理を終了する。
【0057】
上述の動作の一例を、具体例を用いながら説明する。図4は、本発明の文字・図形処理装置の実施の一形態における動作の一例において遷移するエッジリストの状態の一例を示す説明図、図5は、同じくビットマップの状態を示す説明図である。ここでは図15に示したような文字「1」の下のセリフ部における例を考える。図15(B)と同様の例を図5(A)に示している。記号は図15と同様である。図5(A)に示すように、図中の上下方向を走査方向とし、走査線に垂直な2本のセグメント(セグメントL1とL2、および、セグメントL3とL2)が、上下に隣接する画素の中心間に存在するものとする。
【0058】
図5(A)に太線で示されている輪郭線情報6が渡された場合に、S21においてエッジリスト登録部2が生成するエッジリスト7を図4(A)に示している。すなわち、セグメントL1については、走査線S1,S2,S3と交差するので、それぞれの交点に対応するエッジP1(L1)、P2(L1)、P3(L1)が、それぞれの走査線毎に登録される。このとき、セグメントL1は走査線と垂直であるので、リンクによるエッジの連結を行う。すなわち、エッジP1(L1)のリンク先としてエッジP2(L1)の格納位置がエッジリスト7に格納される。また、エッジP2(L1)のリンク先としてエッジP3(L1)の格納位置がエッジリスト7に格納される。図4では、このリンクを矢線で示している。なお、エッジP3(L1)については、リンク先は終端となる。
【0059】
また、セグメントL2は走査線S1と交差するので、走査線S1とセグメントL2の交点に対応するエッジP1(L2)が、走査線S1に対応するリストに登録される。同様に、セグメントL3は走査線S3と交差するので、走査線S3とセグメントL3の交点に対応するエッジP3(L3)が、走査線S3に対応するリストに登録される。なお、これらのエッジについても、セグメントL2,L3の追跡を行うが、セグメントL2,L3は次の走査線まで達しておらず、次のエッジが存在しないので、リンクは終端となる。
【0060】
このようにして、図4(A)に示すように作成されたエッジリスト7は、S24においてエッジリスト生成部3が走査線毎にエッジをソートする。まず走査線S1について登録されているエッジをソートすると、図4(B)に示すように同じエッジを示すP1(L1)とP1(L2)が並ぶことになる。ソートされたエッジを先頭から2つずつ処理して行くが、通常はこのエッジP1(L1)とP1(L2)が同時に処理対象となる。
【0061】
S26においてドロップアウトの判定を行うと、エッジP1(L1)とP1(L2)は同じ位置を示しているので、ドロップアウトの可能性があると判定される。そのため、まずS31において、このドロップアウトの可能性があると判定されたエッジP1(L1)(=P1(L2))についてビットマップ8に登録する。これにより、図5(B)にハッチングを施して示したように、ドロップアウトの補正が行われる。
【0062】
さらに、エッジP1(L1)にはリンク先が格納されている。そのため、リンクの追跡処理を行う。S34またはS36のいずれかにおいてリンク先のエッジP2(L1)を取り出し、エッジP1(L1)のリンク先を終端とする。そしてS31において、エッジP2(L1)についてビットマップ8に登録する。さらにエッジP2(L1)にもリンク先が格納されている。そのため、リンク先のエッジP3(L1)を取り出し、エッジP2(L1)のリンク先を終端とし、エッジP3(L1)についてビットマップ8に登録する。なお、エッジP3(L1)のリンク先は終端であるので、これ以上の追跡処理は行わない。
【0063】
このようにしてリンク先を追跡し、ビットマップ8に登録することによって、図5(C)にハッチングを施して示すように、文字「1」の下のセリフ部が補正処理される。なお、エッジリスト7においては、上述の追跡処理後はリンク先が終端に変更されるので、図4(C)に示すように、セグメントL1によるリンク(矢線)は消去されている。
【0064】
なお、ソートされたリストから取り出した2つのエッジから、ドロップアウトが発生しないと判定された場合には、S27でビットマップ8に対してエッジ間の画素を塗りつぶす処理を実施する。
【0065】
このようにして走査線S1に対応するリストに登録されているエッジについて、それぞれ2個ずつ処理して行く。走査線S1における処理が終了したら、図4(D)に示すように、次の走査線S2に対応するリストに登録されているエッジについての処理を行う。走査線S2については、リスト中にエッジP2(L1)が登録されている。このエッジは、他のエッジ(文字「1」の上部のエッジ)とともに取り出される。ドロップアウトは発生しないので、エッジP2(L1)を終点として塗りつぶし処理が行われる。この処理ではエッジP2(L1)は塗りつぶされない。しかし、上述のエッジP1(L1)からのリンクの追跡による補正処理によって、エッジP2(L1)は塗りつぶされる。なお、エッジP2(L1)についてはドロップアウトが発生しないと判断されているので、形状補正部4による補正処理は行われない。
【0066】
走査線S2の処理が終了したら、次の走査線S3について処理を行う。走査線S3についてソートを行うと、エッジリスト7は図4(E)に示すようになる。走査線S3には、同じ位置のエッジP3(L1)、P3(L3)が存在する。そのためドロップアウトが発生すると判断され、エッジP3(L1)(=P3(L3))について、ビットマップ8に登録される。この画素はエッジP1(L1)からリンクをたどって補正処理を行った際に既に登録されているので、画素としては何ら変わらない。
【0067】
このようにして、図5(D)にハッチングで示す画素が塗りつぶされる。図15(A)に示したように、従来は文字「1」の下のセリフ部に凹状部である「鳥足」が発生していたが、本発明の文字・図形処理装置によれば、図5(D)に示すように「鳥足」は発生しておらず、良好な文字にビットマップ展開されていることが分かる。
【0068】
なお、図4,図5では、図中の上下方向を走査方向として処理を行った例を示した。垂直方向の輪郭線については、図中の左右方向を走査方向として処理を行うことによって、同様にドロップアウトの補正及び「鳥足」の補正処理を行うことができる。始点から終点までの塗りつぶし処理は、いずれか一方の処理中に行うのみでよい。
【0069】
図6は、本発明の文字・図形処理装置の実施の一形態を実現するための構成例を示すブロック図である。図中、11はCPU、12はRAM、13はROM、14は外部記憶装置、15はビデオインタフェース、16はフレームバッファ、17はプリンタインタフェースである。ROM13またはRAM12には、CPU11が動作するためのプログラムが格納されている。CPU11は、このROM13またはRAM12に格納されているプログラムに従って動作し、走査変換部1、エッジリスト登録部2、エッジリスト生成部3、形状補正部4、エッジリスト展開部5の機能を実行する。なお、プログラムは外部記憶装置14に記憶されており、RAM12に読み出された後にCPU11が実行する場合もある。
【0070】
RAM12には、CPU11で実行されるプログラムのほか、CPU11によるエッジリスト登録部2及びエッジリスト生成部3の機能を実行することで生成されるエッジリスト7を記憶する。また、同じく形状補正部4やエッジリスト展開部5の機能を実行する際に用いられるビットマップ8を記憶する。その他、CPU11が実行する際に作業用としても用いられる。
【0071】
ROM13には、CPU11で実行されるプログラムのほか、フォントの情報として輪郭線の情報を保持しておくことができる。
【0072】
外部記憶装置14は、例えばハードディスクやCD−ROM、MO、FD、さらにはSRAMやROMなど、デジタル情報が記憶できる記憶媒体で構成され、CPU11で実行されるプログラムのほか、各種のデータが格納される。格納されるデータの一つとして、例えば文字や図形の輪郭線の情報をフォントファイルとして格納しておくことができる。
【0073】
ビデオインタフェース15は、例えばCRTなどの表示装置に接続され、表示装置に表示信号を送出して各種の表示を行うことができる。例えば本発明の文字・図形処理装置の機能を用いてビットマップに展開した文字や図形を表示させることができる。同様に、プリンタインタフェース17は、プリンタなどの記録装置に接続され、記録装置に記録データを送出することによって記録用紙などにデータを記録することができる。例えば本発明の文字・図形処理装置の機能を用いてビットマップに展開した文字や図形を記録することができる。
【0074】
フレームバッファ16は、例えばビデオインタフェース15に接続される表示装置の1画面以上、あるいはプリンタインタフェース17に接続される記録装置における1バンドあるいは1ページ以上のビットマップを有している。例えばCPU11が形状補正部4やエッジリスト展開部5の機能を実行する際に、ビットマップ8として直接書き込んだり、あるいは、一旦、RAM12内に展開した後にこのフレームバッファ16に転送してもよい。
【0075】
このような構成において、外部から輪郭線の情報が直接入力される場合には、CPU11が図1に示す各構成の機能を実行してRAM12にビットマップ展開する。また、文字コードなどで入力される場合には、ROM13や外部記憶装置14から文字コードに対応する輪郭線の情報を読み出し、ビットマップ展開する。なお、輪郭線の情報に対し、例えば指定された文字や図形の大きさに応じて拡大縮小を行ったり、その他各種の変形処理などを行ってから、本発明の文字・図形処理装置の機能を実行させてもよい。また、輪郭線の情報をもとにビットマップ展開する処理は、上述のように補正処理のために走査方向を変えて2回行い、そのうちの1回において塗りつぶし処理を行う。
【0076】
RAM12に展開されたビットマップは、フレームバッファ16の所定の位置に転送される。そして、1画面あるいは1ページなど、所定の単位のビットマップ画像が完成した時点で、あるいは一定の時間間隔で、例えばビデオインタフェース15を介して表示装置に転送し、画像を表示させたり、あるいは、プリンタインタフェース17を介して記録装置に転送し、記録用紙などに画像を記録することができる。また、フレームバッファ16の内容を外部記録装置14に格納したり、あるいは外部に出力することも可能である。
【0077】
上述の説明ではビットマップ8をRAM12上に設け、展開処理後にフレームバッファ16に転送する例を示したが、本発明の文字・図形処理装置においてはビットマップを読み出すことはないので、フレームバッファ16に対して直接、書き込むように構成することも可能である。この場合、必要となるメモリ量をさらに減らすことができる。
【0078】
上述の実施の形態では、ドロップアウトの補正処理によって現れる凹状部(鳥足)の補正処理を、エッジリスト中に設けておいたリンクをたどることによって行った。本発明はこれに限られるものではなく、例えばドロップアウト処理を行った座標によって次以降の走査線におけるエッジを順次検索するように構成したり、あるいは、エッジにセグメントを対応付けておき、ドロップアウト処理を行ったエッジに対応するセグメントを読み出して直線の描画を別途行うなど、形状補正部4において凹状部(鳥足)を補正するための各種の方法を適用することが可能である。
【発明の効果】
以上の説明から明らかなように、本発明によれば、輪郭線の情報をビットマップ展開する際に、ドロップアウトを補正するとともに、ドロップアウトの補正処理によって従来発生していた「鳥足」と呼ばれる凹状部についても補正することができる。これによって、例えば小サイズや低解像度での文字や図形の出力時においても、良好な形状でビットマップを出力することができるという効果がある。
【図面の簡単な説明】
【図1】 本発明の文字・図形処理装置の実施の一形態を示す概略構成図である。
【図2】 本発明の文字・図形処理装置の実施の一形態における動作の一例を示すフローチャートである。
【図3】 本発明の文字・図形処理装置の実施の一形態においてドロップアウトが発生する場合の動作の一例を示すフローチャートである。
【図4】 本発明の文字・図形処理装置の実施の一形態における動作の一例において遷移するエッジリストの状態の一例を示す説明図である。
【図5】 本発明の文字・図形処理装置の実施の一形態における動作の一例において遷移するビットマップの状態を示す説明図である。
【図6】 本発明の文字・図形処理装置の実施の一形態を実現するための構成例を示すブロック図である。
【図7】 輪郭線と、その輪郭線から得られるビットマップの一例の説明図である。
【図8】 輪郭線の内部の画素であるか否かを判定する一方法の説明図である。
【図9】 スキャンコンバージョン法による塗りつぶし処理の説明図である。
【図10】 スキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。
【図11】 ドロップアウトの一例の説明図である。
【図12】 ドロップアウトの別の例の説明図である。
【図13】 ドロップアウトの補正を含むスキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。
【図14】 エッジリストを用いたスキャンコンバージョン法による塗りつぶし処理の具体例の説明図である。
【図15】 ドロップアウト処理による不具合の一例の説明図である。
【符号の説明】
1…走査変換部、2…エッジリスト登録部、3…エッジリスト生成部、4…形状補正部、5…エッジリスト展開部、6…輪郭線情報、7…エッジリスト、8…ビットマップ、11…CPU、12…RAM、13…ROM、14…外部記憶装置、15…ビデオインタフェース、16…フレームバッファ、17…プリンタインタフェース。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a character / graphic processing apparatus that develops information of contour lines indicating characters / graphics into a bitmap.
[0002]
[Prior art]
An output device based on a bitmap screen such as a page printer or a display requires more bitmap data in order to output a character / graphic pattern of the same size as the resolution improves. Furthermore, in order to cope with output of character / graphic patterns of various sizes, the bitmap data must be held for each size, resulting in poor efficiency. Therefore, especially for a pattern having a fixed outline such as a character, the outline of the basic pattern is held as outline information (outline information) composed of a plurality of straight line segments and curved segments, and a desired pattern is stored. The memory efficiency is improved by using a method of filling the inside of the contour line after scaling to the size.
[0003]
A process for drawing a character / graphic pattern using the method of painting the inside of the outline will be briefly described below. FIG. 7 is an explanatory diagram of an example of a contour line and a bitmap obtained from the contour line. In FIG. 7, the thick lines connecting the control points (indicated by x marks in the circles) are the segments constituting the contour information. The letter “A” shown in FIG. 7 is composed of 11 straight line segments. Based on such contour information, pixels existing inside the contour line are inverted, for example, to obtain a bitmap of the character “A” as shown by hatching in FIG.
[0004]
FIG. 8 is an explanatory diagram of one method for determining whether or not a pixel is inside a contour line. As described above, in order to invert the pixels existing inside the outline, for example, it is necessary to determine whether each pixel is inside the outline. As one of the determination methods, it is determined here whether or not the center position of each pixel is inside the contour line. That is, whether or not the center position of each pixel indicated by a rectangle (◯ in the figure) is present inside the outline (thick line connecting control points indicated by X to ○ in the figure). Just judge. By such a determination method, it is determined that the pixel (rectangle) indicated by hatching in FIG. 8 is inside the contour line. By reversing these pixels, for example, a bitmap of characters and figures can be obtained.
[0005]
Basically, as described above, based on the information on the contour line, for example, the pixels inside the pixel are inverted and the filling process is performed. In fact, a scan conversion method is a typical method for performing such a filling process. FIG. 9 is an explanatory diagram of the painting process by the scan conversion method. Here, an example will be described in which the inside / outside of the contour line is determined under a condition called an EVEN-ODD rule that does not consider the extending direction (stroke direction) of the contour line.
[0006]
Now, it is assumed that contour information as shown by a bold line in FIG. 9A is given. Here, one of the arrangement directions of the pixels of the bitmap is set as the scanning direction. Here, the horizontal direction in the figure is the scanning direction. Of course, the vertical direction in the figure may be the scanning direction.
[0007]
Then, the coordinates of intersections between the plurality of scanning lines parallel to the scanning direction and connecting the center points of the respective pixels and the contour line are obtained. In FIG. 9, the intersection is indicated by ● and the center of each pixel is indicated by ○. Further, here, the pixel having the center at the closest position on the right side of the intersection in the drawing is obtained. This pixel is called an edge and becomes the start point and end point of the filled area. In FIG. 9A, the edge pixels are hatched. In this example, since the scanning line is set in the left-right direction in the figure, no edge appears on the left-right direction contour line because the contour line and the scanning line have no intersection.
[0008]
Next, paint processing is performed according to the rules. In the EVEN-ODD rule, the intersections with the scanning lines are counted from one end, and the range from the odd number to the even number is the filled range. As described above, when the edge is taken to the right of the intersection, the odd-numbered edge counted from the left end is the start point, and the even-numbered edge is the end point. As shown in FIG. 9B, the pixels are examined along the scanning direction according to this rule, and the pixels from the odd edge to the even edge are inverted. Here, since the even edge itself is outside the contour line, it should be noted that the area up to the left of the even edge is the filled range. If an even number of edges overlap, it can be correctly painted by erasing the edges.
[0009]
In the example shown in FIG. 9B, a pixel indicated by a triangle is a start point, and a pixel indicated by an inverted triangle is an end point. Therefore, the hatched pixels are inverted.
[0010]
FIG. 10 is an explanatory diagram of a specific example of the painting process by the scan conversion method. In the case of the letter “A” shown in FIG. 7, an example is shown in which the fill processing is performed by the scan conversion method described in FIG. 9. When information on a contour line as shown by a bold line in FIG. 10A is given, an edge shown by hatching in FIG. 10A is obtained from the intersection of each contour line and each scanning line. Here, an odd-numbered edge (indicated by a triangle) from the left side in the scanning direction is a start point, and an even-numbered edge (indicated by an inverted triangle) is an end point.
[0011]
Based on the edge information obtained in this way, a bit map as shown in FIG. 10B can be obtained by inverting the pixels from the start point pixel to the pixel before the end point pixel. In the letter “A”, the inside of the upper half is missing, but according to this method, such white missing parts can be accurately expressed.
[0012]
When trying to output a small-size pattern using the above-described method of filling the inside of the contour line, there may be a case where dropout occurs in the fill. This is caused when the interval between the contour lines becomes too narrow and there is no pixel having a center point between the contour lines. In other words, this occurs when a plurality of contour lines penetrate between the center points of adjacent pixels.
[0013]
FIG. 11 is an explanatory diagram of an example of a dropout. For example, as shown in FIG. 11A, when a plurality of contour lines pass through the center points of horizontally arranged pixels, the pixels indicated by the broken lines are not filled, and the figure appears to be broken. This is because the edges obtained from the intersection of the two contour lines and the scanning line shown in FIG. 11 become the same pixel. That is, as shown in FIG. 11B, the center pixel is the start point and end point of the filled area. As described above, in order to perform the painting process normally, even-numbered overlapping edges are deleted. Therefore, the edge of the center pixel shown in FIG. 11B is erased and no painting is performed. In this way, dropout occurs.
[0014]
As described above, dropout occurs in the overlapping portion of the edge, so that it is possible to predict that the dropout will occur if it is detected that two edges overlap at the stage of extracting the edge. However, as described above, in order to perform the painting process normally, the overlapping edges must be deleted, so that the dropout correction process is performed separately from the painting process.
[0015]
FIG. 12 is an explanatory diagram of another example of dropout. FIG. 12 shows a dropout that occurs when a plurality of contour lines penetrate between the center points of pixels adjacent in the vertical direction. In this example, the area to be filled according to the edge obtained from the intersection of each scanning line and the contour line is not continuous in the adjacent scanning line. That is, the edge is obtained as shown in FIG. 12B, but the pixels filled in according to the edge are the hatched pixels in FIG. As described above, since the area to be filled is separated between adjacent scanning lines, the figure appears to be interrupted at a portion surrounded by a broken line.
[0016]
In the example shown in FIG. 12, overlapping edges cannot be found even when examined from the scanning direction as in the example shown in FIG. 11, and the occurrence of dropout cannot be predicted by the same method as shown in FIG. In such a case, as shown in FIG. 12C, when the scanning line is set in the vertical direction in the drawing, it is possible to predict the occurrence of dropout in the same manner as in the example shown in FIG. Become.
[0017]
As described above, in order to discover all dropouts, it is necessary to detect edges from both the left and right directions and the vertical direction in the figure. However, since the result of the painting process is the same from both the horizontal and vertical directions, it is only necessary to perform the painting process on the detected edge.
[0018]
FIG. 13 is an explanatory diagram of a specific example of the painting process by the scan conversion method including the correction of dropout. Here, an example in which a small character “0” is expanded into a bitmap is shown. A small character “0” can be output by painting a portion sandwiched between two curved segments.
[0019]
In this example, by performing paint processing using edges obtained with the horizontal direction (or vertical direction) in the drawing as the scanning direction, the pixels shown in FIG. 13A are hatched. It can be seen that a dropout occurs in a portion where the contour interval is narrow.
[0020]
Next, as described with reference to FIG. 11, when the overlap of edges in the scanning direction is examined, it can be found that the pixels shown by hatching in FIG. 13B are dropped out. In addition, as described in FIG. 12, when the overlapping of edges is examined by changing the scanning direction (for example, changing from the horizontal direction in the drawing to the vertical direction), the pixels shown in FIG. You can discover that you are dropping out. By combining the images in FIGS. 13A, 13B, and 13C, a graphic (character “0”) having no dropout can be obtained as shown in FIG. 13D. In FIG. 13, the bitmap images of FIGS. 13A, 13B, and 13C are shown separately. For example, one bitmap is displayed in both directions shown in FIGS. 13B and 13C. Pixels to be dropped out in the scanning direction may be written. Further, each image of FIGS. 13A, 13B, and 13C may be written in one bitmap.
[0021]
By the way, in order to record the edge selected by the intersection of the contour line and the scanning line in the simplest manner, it is only necessary to invert the pixel on the bitmap as shown in the above examples. In this case, the above-described filling can be performed by examining all the pixels in the paint process. However, when the character size is increased or the resolution is high, the number of pixels in the bitmap is very large. As the number of pixels increases in this way, the process of examining all pixels in the paint process becomes very heavy. Also, the amount of memory for the bitmap is increased. For example, in order to create a vertical and horizontal n-fold bitmap, a memory of n square times is required. In addition, there is a disadvantage that another bit map is required for the dropout processing, or that a more complicated paint rule other than the EVEN-ODD rule is difficult to use due to a simple data structure.
[0022]
Therefore, there is a method called an edge list in which edge coordinates are listed for each scanning line, and two adjacent edge coordinates are extracted from the list and used as a fill range. For example, in the character output device described in Japanese Patent Application Laid-Open No. 5-224653, the X coordinate and Y coordinate of the intersection of the segment and the scanning line are registered in a list, and paint processing is performed based on this list. Yes.
[0023]
FIG. 14 is an explanatory diagram of a specific example of the painting process by the scan conversion method using the edge list. FIG. 14A is an enlarged view showing an example of the relationship between the contour line and the pixel. Here, a pixel filling process on the scanning lines S1 and S2 is considered. Also, (1) to (5) indicated by bold lines are contour segments, and are stored in this order.
[0024]
First, each segment is called sequentially to detect the intersection with the scanning line. For example, the segment {circle around (1)} intersects the scanning line S1 and the scanning line S2 at the positions indicated by ●. The coordinates of ● are added to the list of each scanning line. That is, as shown in FIG. 14B, P1 (1) is stored in the list of the scanning line S1 as the coordinates of the intersection of the segment (1) and the scanning line S1. Similarly, P2 (1) is stored in the list of scanning line S2 as the coordinates of the intersection of segment (1) and scanning line S2. Such processing is also performed for each of the segments (2) to (5). As a result, a list as shown in FIG. 14B is obtained. Here, in addition to storing the X and Y coordinates as in the above-mentioned document, only one coordinate value may be stored because one coordinate value is known by the scanning line S1.
[0025]
When the coordinates of the intersections with the scanning lines are registered in the list for all the segments in this way, the coordinates registered for each scanning line are sorted. Here, when sorting is performed from left to right, the list shown in FIG. 14B is sorted as shown in FIG. 14C.
[0026]
After the sorting, as shown in FIG. 14D, the coordinates of the intersection of the segment and the scanning line are taken out from the head as a pair. Of the coordinates of the pair, the edge corresponding to the previous coordinate is the starting point of the painting process, and the edge corresponding to the subsequent coordinate is the ending point of the painting process. The filling process can be performed by inverting the pixels from the start point to the end point. Note that the end pixel is not inverted as described above.
[0027]
By such a paint process, the pixels indicated by hatching in FIG. 14E are inverted, and the fill process in the scanning lines S1 and S2 ends. FIG. 14 shows an example in which the coordinates of the intersection of the segment and the scanning line are registered in the list. However, for example, the coordinates of the edge corresponding to the coordinates of the intersection may be registered.
[0028]
Since the edge list does not have edge information on the bitmap, the pixels to be dropped out may be directly drawn on the bitmap subjected to the paint processing. Further, it is not necessary to read out the entire bitmap in order to fill between the edges, and it is not necessary to manipulate edge information such as erasing even edges on the bitmap. Therefore, it is not necessary to have a bitmap in the memory of the work area, and the paint process may be executed by directly writing to the frame buffer that is the final output destination.
[0029]
Even in the filling process using the edge list as described above, if the edges corresponding to the two coordinates extracted from the edge list are the same, it can be determined that a dropout occurs, so the process for the dropout can be performed. . It is also conceivable to create the edge lists as described above separately for two orthogonal scanning lines and detect dropouts from the respective edge lists.
[0030]
As described above, when the interval between the outlines becomes too narrow and the fill-out occurs (dropout), the occurrence of dropout is detected and corrected in the scan conversion process to avoid this phenomenon. . However, when there is a dropout portion and a portion other than the dropout portion in one segment of the contour line, there is a problem that a concave shape appears in the portion that is not the dropout.
[0031]
FIG. 15 is an explanatory diagram of an example of a defect caused by the dropout process. FIG. 15A shows an example in which the character “1” is drawn. In the serif portion of the character “1”, P1 and P3 are filled by the dropout process, but P2 is not filled and a concave shape appears. Such a phenomenon is significant not only in the serif portion of the character “1” shown in FIG. 15 but also in a portion where the horizontal portion and the vertical portion intersect, such as the upper portion of the character “T”. This concave shape is called a “bird's foot” because the shape looks like a bird's foot.
[0032]
FIG. 15B is an enlarged view of the bird leg generation portion of FIG. Among the segments constituting the contour line, horizontal segments L1, L2, and L3 extending in the left-right direction in the figure have intersections with the vertical scanning lines in the figure. At this time, dropouts are detected for P1 and P3 among the pixels P1, P2, and P3 that are edges, and are filled by the dropout process. However, since P2 is merely a terminal edge, it is not determined to be a dropout. For example, when a scanning line is set in the vertical direction in the figure, the area up to the pixel one pixel above P2 is the filled area, and P2 is not painted. For example, when scanning lines are set in the left-right direction in the figure, none of P1 to P3 is an edge. Therefore, even if the scanning direction is set in both the horizontal direction and the vertical direction in the figure, P2 is not filled. Therefore, a concave “bird leg” as shown in FIG.
[0033]
In the prior art, the dropout portion correction processing as described above is performed, but the occurrence of “bird's feet” cannot be prevented.
[0034]
[Problems to be solved by the invention]
The present invention has been made in view of the above-described circumstances, and corrects the concave “bird's feet” generated when the contour information indicating the characters / graphics is developed into a bitmap, so that a good character can be obtained. An object of the present invention is to provide a character / graphic processing device capable of reproducing graphics.
[0035]
[Means for Solving the Problems]
In the present invention, when developing contour information into a bitmap using an edge list, an edge where dropout occurs when the coordinates of two edges are the same is detected and corrected. Correction processing for correcting the concave portion generated by the processing along the segment is performed. More specifically, when the edge list is created, it is determined whether or not the scanning line and the segment are orthogonal with the detection of the edge. If it is determined that the scanning line and the segment are orthogonal, the segment and the scanning line are determined. The coordinates of the edge of the intersection with are sequentially linked. When the edge where the dropout occurs is detected during the dropout correction process, if there is an edge coordinate linked from the edge coordinate, the edge coordinate obtained by following the link Perform correction processing.
[0036]
As a result, even if there is a dropout portion and a portion that does not exist in one segment of the contour line, since the correction process is performed along the segment from the dropout portion, a concave shape called “bird leg” is formed. It is corrected and “bird's feet” never appears on the bitmap. Therefore, it is possible to develop a bitmap of characters / graphics from the information on the contour line.
[0037]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a schematic configuration diagram showing an embodiment of a character / graphics processing apparatus according to the present invention. In the figure, 1 is a scan conversion unit, 2 is an edge list registration unit, 3 is an edge list generation unit, 4 is a shape correction unit, 5 is an edge list development unit, 6 is contour information, 7 is an edge list, and 8 is a bit. It is a map.
[0038]
The scan conversion unit 1 takes out the outline information 6 of the designated character or figure, reads the segments constituting the outline in the recorded order, calculates the intersection of the segment and the scan line, and calculates the edge from the coordinates of the intersection Ask. Then, the edge information is sequentially transferred to the edge list registration unit 2. At this time, if the segment is perpendicular to the scanning line, the edge list registration unit 2 is instructed to create a link. When all edges are registered, the edge list generation unit 3 is called. Various conversion processes such as an enlargement / reduction process for changing the size of characters and figures may be performed in advance. In addition, a curved segment may be divided and approximated by a straight line segment in order to improve processing efficiency.
[0039]
The edge list registration unit 2 sequentially registers the edge information output from the scan conversion unit 1 together with link information in a list prepared for each scanning line as the edge list 7. The elements to be registered as edge information in the list include at least two pieces of information, such as the coordinates of the edge to be registered and the location where the next edge linked to this edge is stored (for example, array number or memory address in the list). The stored structure. When there is an instruction to create a link from the scan conversion unit 1, the location of the edge information to be registered with the next scan line for the same segment is registered as the location where the next edge in the registered edge information is stored. . When there is no instruction, a termination number (a specific value such as -1) is assigned to the link.
[0040]
The edge list generation unit 3 sorts the edge list 7 for each scanning line by edge coordinates, calls the shape correction unit 4 every time the list sorting for one scanning line is completed, and passes the sorted list. .
[0041]
The shape correction unit 4 examines the list of one scanning line passed from the edge list generation unit 3 and determines whether or not the edge may be dropped out. If there is a possibility of dropout, it is registered in the bitmap 8 for dropout, and if it is a normal edge, the edge list development unit 5 is called. If there is a link at an edge that has been determined to be dropout, the link is tracked and the edge is also registered in the dropout bitmap 8.
[0042]
The edge list development unit 5 develops between the edges output by the shape correction unit 4 on the bitmap 8.
[0043]
As already described, dropout detection needs to be performed in two directions in which bitmap pixels are arranged (in the following description, for the sake of convenience, the horizontal direction and the vertical direction). Therefore, the scan conversion unit 1, the edge list registration unit 2, the edge list generation unit 3, and the shape correction unit 4 perform processing for two cases of a horizontal scanning line and a vertical scanning line, respectively. The edge list development unit 5 is called only at the time of the first (or second) execution of the two processes because the scan line in any direction may be processed.
[0044]
FIG. 2 is a flowchart showing an example of the operation in the embodiment of the character / graphics processing apparatus of the present invention. For example, outline information 6 is input from the outside, or code information is input, and the outline information 6 is read from, for example, an internal ROM or an external storage device according to the code information, and the outline of characters / graphics to be developed into a bitmap When the information 6 is given, the operation of the character / graphics processing apparatus is started. As described above, two processes are performed in different scanning directions for the correction process.
[0045]
First, the bitmap 8 is initialized and the first process is started. The scan conversion unit 1 performs various conversion processes on the given contour information 6 such as coordinate conversion to a size to be output as necessary. Further, the number of divisions of the curve segment is determined from the pixel size, and is divided into short straight line segments. Further, the edge list 7 is initialized.
[0046]
In S <b> 21, the scan conversion unit 1 sequentially obtains edges corresponding to the intersections with the respective scan lines for all the segments constituting the given outline information 6. The edge list registration unit 2 sequentially registers the edge information obtained by the scan conversion unit 1 in the edge list 7. At this time, the scan conversion unit 1 determines whether the segment is perpendicular to the scan line, and instructs the edge list registration unit 2 to create a link for the segment perpendicular to the scan line. In accordance with this instruction, the edge list registration unit 2 sequentially connects the edges registered for each scanning line with respect to the segments perpendicular to the scanning line.
[0047]
Edges are obtained and stored in the edge list 7 for all segments constituting the contour line information 6, and then the processing of the edge list generation unit 3, shape correction unit 4, and edge list development unit 5 is performed for each scanning line. First, in S22, the first scanning line is set, and in S23, it is determined whether or not the processing has been completed for all scanning lines. In S24, the edge list generation unit 3 sorts the list of edges for one scanning line. . Then, initialization is performed so that edge information can be extracted from the beginning of the sorted edge list. Note that two edges are paired and processed as a start point and an end point.
[0048]
In S25, it is determined whether or not all the edges in the list for one scanning line have been processed. If there are unprocessed edges, the process proceeds to S26.
[0049]
In S26, the shape correction unit 4 determines dropout. That is, when two edges are extracted from the list of one scanning line, it can be determined that a dropout occurs if the coordinates are the same. If dropout does not occur, in S27, the edge list developing unit 5 inverts and paints out the bitmap 8 between the extracted edges. At this time, the end point is not inverted. If a dropout has occurred, the process proceeds to S30, where the shape correction unit 4 performs a dropout correction process and a correction process for preventing the occurrence of “bird's feet” associated with the dropout correction process.
[0050]
After that, the two edges are processed, the next two edges are taken out in S28, and the process returns to S25. In this way, the process is performed for every two edges, and when all the edges stored in the list of one scanning line are finished, this is detected in S25, and the process moves to the next scanning line in S29. And return to S23. Since two edges are processed as a pair, even if only one edge remains, it is treated as having been processed for one scanning line.
[0051]
In this way, the processing for each scanning line is sequentially performed, and when the processing for all the scanning lines is completed, this is detected in S23, and the first processing is terminated. Next, the second process is performed by changing the scanning direction. In the second process, the painting process by the edge list developing unit 5, that is, the process in S27 is not performed. The other processes are the same as the first process. When the two processes are finished, the process of developing the contour line information 6 into the bitmap 8 is finished.
[0052]
FIG. 3 is a flowchart showing an example of an operation when dropout occurs in the embodiment of the character / graphics processing apparatus of the present invention. This process is executed when it is determined that a dropout occurs in S26 of FIG. Information on the edge determined to cause dropout in S30 is acquired, and the edge is registered in the bitmap 8 in S31.
[0053]
Further, when an edge determined to cause dropout is included in a segment perpendicular to the scanning line, correction processing is performed on each pixel on the segment. At this time, a pixel on a segment perpendicular to the scanning line can be acquired by following the link included in the edge.
[0054]
In S32, it is determined whether or not the link is the terminal for both of the two edges used when the dropout determination is performed. If both are terminations, the correction process at the time of dropout is terminated.
[0055]
If at least one of the links is not a termination, in S33, it is confirmed whether or not there is a link at the edge serving as the start point. If the link is not the termination, in S34, an edge in the next scan line of the link destination is acquired, and the link of this edge is changed to the termination. Similarly, in S35, it is confirmed whether or not there is an edge link as an end point. If the link is not the termination, in S36, an edge in the next scan line to be linked is acquired, and the link of this edge is changed to the termination. In S37, the scanning line to be processed in the correction process is advanced, and the process returns to S31 to register the edges acquired in S34 and S36 in the bitmap 8. Thereafter, the processing after S32 is repeated with the edge acquired at S34 and S36 as the processing target.
[0056]
By such repeated processing, an edge corresponding to a segment perpendicular to the scanning line is tracked and sequentially registered in the bitmap 8. When two segments reach the end, the corresponding edge link ends. This is detected in S32, the correction process is terminated, the process returns to S28, and the process for the two edges determined to cause dropout is terminated.
[0057]
An example of the above operation will be described using a specific example. FIG. 4 is an explanatory diagram showing an example of the state of the edge list that is transitioned in an example of the operation in the embodiment of the character / graphics processing apparatus of the present invention, and FIG. . Here, consider an example in the serif portion under the character “1” as shown in FIG. An example similar to FIG. 15B is shown in FIG. The symbols are the same as in FIG. As shown in FIG. 5A, the vertical direction in the figure is the scanning direction, and two segments (segments L1 and L2 and segments L3 and L2) perpendicular to the scanning line are vertically adjacent pixels. It is assumed to exist between the centers.
[0058]
FIG. 4A shows an edge list 7 generated by the edge list registration unit 2 in S21 when the contour information 6 indicated by a thick line in FIG. 5A is passed. That is, since the segment L1 intersects with the scanning lines S1, S2, and S3, the edges P1 (L1), P2 (L1), and P3 (L1) corresponding to the respective intersections are registered for each scanning line. The At this time, since the segment L1 is perpendicular to the scanning line, edges are connected by links. That is, the storage position of the edge P2 (L1) is stored in the edge list 7 as the link destination of the edge P1 (L1). Further, the storage position of the edge P3 (L1) is stored in the edge list 7 as the link destination of the edge P2 (L1). In FIG. 4, this link is indicated by an arrow line. For the edge P3 (L1), the link destination is the end.
[0059]
Since the segment L2 intersects with the scanning line S1, the edge P1 (L2) corresponding to the intersection of the scanning line S1 and the segment L2 is registered in the list corresponding to the scanning line S1. Similarly, since the segment L3 intersects with the scanning line S3, the edge P3 (L3) corresponding to the intersection of the scanning line S3 and the segment L3 is registered in the list corresponding to the scanning line S3. Note that the segments L2 and L3 are also tracked with respect to these edges, but since the segments L2 and L3 do not reach the next scanning line and there is no next edge, the link is terminated.
[0060]
In this manner, the edge list 7 created as shown in FIG. 4A is sorted by edge list for each scanning line by the edge list generation unit 3 in S24. First, when the registered edges for the scanning line S1 are sorted, P1 (L1) and P1 (L2) indicating the same edge are arranged as shown in FIG. 4B. The sorted edges are processed two by two from the top, but usually the edges P1 (L1) and P1 (L2) are processed simultaneously.
[0061]
When the dropout is determined in S26, it is determined that there is a possibility of dropout because the edges P1 (L1) and P1 (L2) indicate the same position. Therefore, first, in S31, the edge P1 (L1) (= P1 (L2)) determined to have the possibility of dropout is registered in the bitmap 8. Thereby, the dropout is corrected as shown by hatching in FIG.
[0062]
Furthermore, the link destination is stored in the edge P1 (L1). Therefore, link tracking processing is performed. In either S34 or S36, the link destination edge P2 (L1) is taken out, and the link destination of the edge P1 (L1) is terminated. In S31, the edge P2 (L1) is registered in the bitmap 8. Further, the link destination is also stored in the edge P2 (L1). Therefore, the link destination edge P3 (L1) is taken out, the link destination of the edge P2 (L1) is terminated, and the edge P3 (L1) is registered in the bitmap 8. Since the link destination of the edge P3 (L1) is the end point, no further tracking processing is performed.
[0063]
By tracking the link destination and registering it in the bitmap 8 in this way, the serif portion under the character “1” is corrected as shown by hatching in FIG. In the edge list 7, since the link destination is changed to the end after the tracking process described above, the link (arrow line) by the segment L1 is deleted as shown in FIG.
[0064]
If it is determined that no dropout occurs from the two edges extracted from the sorted list, a process for filling pixels between the edges is performed on the bitmap 8 in S27.
[0065]
In this way, two edges are registered for each edge registered in the list corresponding to the scanning line S1. When the processing on the scanning line S1 is completed, as shown in FIG. 4D, processing on the edge registered in the list corresponding to the next scanning line S2 is performed. For the scanning line S2, an edge P2 (L1) is registered in the list. This edge is extracted together with another edge (the upper edge of the character “1”). Since no dropout occurs, the painting process is performed with the edge P2 (L1) as the end point. In this process, the edge P2 (L1) is not filled. However, the edge P2 (L1) is filled by the correction process by tracking the link from the edge P1 (L1) described above. Since it is determined that no dropout occurs for the edge P2 (L1), the correction processing by the shape correction unit 4 is not performed.
[0066]
When the process for the scanning line S2 is completed, the process is performed for the next scanning line S3. When sorting is performed for the scanning line S3, the edge list 7 is as shown in FIG. The scanning line S3 has edges P3 (L1) and P3 (L3) at the same position. Therefore, it is determined that dropout occurs, and the edge P3 (L1) (= P3 (L3)) is registered in the bitmap 8. Since this pixel has already been registered when the correction process is performed by following the link from the edge P1 (L1), the pixel does not change at all.
[0067]
In this manner, the pixels indicated by hatching in FIG. As shown in FIG. 15 (A), a “bird's feet” that is a concave portion has conventionally occurred in the serif portion under the character “1”, but according to the character / graphic processing device of the present invention, As shown in FIG. 5D, it is understood that “bird's feet” does not occur and the bitmap is developed into a good character.
[0068]
4 and 5 show an example in which processing is performed with the vertical direction in the figure as the scanning direction. With respect to the vertical outline, by performing processing in the horizontal direction in the drawing as the scanning direction, it is possible to perform the dropout correction and the “bird leg” correction processing in the same manner. The filling process from the start point to the end point need only be performed during one of the processes.
[0069]
FIG. 6 is a block diagram showing a configuration example for realizing one embodiment of the character / graphic processing apparatus of the present invention. In the figure, 11 is a CPU, 12 is a RAM, 13 is a ROM, 14 is an external storage device, 15 is a video interface, 16 is a frame buffer, and 17 is a printer interface. The ROM 13 or RAM 12 stores a program for operating the CPU 11. The CPU 11 operates according to a program stored in the ROM 13 or RAM 12 and executes the functions of the scan conversion unit 1, edge list registration unit 2, edge list generation unit 3, shape correction unit 4, and edge list development unit 5. Note that the program is stored in the external storage device 14 and may be executed by the CPU 11 after being read into the RAM 12.
[0070]
In addition to programs executed by the CPU 11, the RAM 12 stores an edge list 7 generated by executing the functions of the edge list registration unit 2 and the edge list generation unit 3 by the CPU 11. Similarly, a bitmap 8 used when executing the functions of the shape correction unit 4 and the edge list development unit 5 is stored. In addition, it is also used for work when the CPU 11 executes.
[0071]
In addition to the program executed by the CPU 11, the ROM 13 can hold contour information as font information.
[0072]
The external storage device 14 is composed of a storage medium capable of storing digital information, such as a hard disk, CD-ROM, MO, FD, and SRAM and ROM, and stores various data in addition to programs executed by the CPU 11. The As one of the stored data, for example, information on the outlines of characters and figures can be stored as a font file.
[0073]
The video interface 15 is connected to a display device such as a CRT, for example, and can send various display signals to the display device. For example, it is possible to display characters and graphics developed in a bitmap using the function of the character / graphic processing apparatus of the present invention. Similarly, the printer interface 17 is connected to a recording device such as a printer, and can record data on recording paper or the like by sending the recording data to the recording device. For example, it is possible to record characters and graphics developed in a bitmap using the function of the character / graphic processing apparatus of the present invention.
[0074]
The frame buffer 16 has a bitmap of one band or one page or more in, for example, one screen or more of a display device connected to the video interface 15 or a recording device connected to the printer interface 17. For example, when the CPU 11 executes the functions of the shape correction unit 4 and the edge list development unit 5, it may be directly written as the bitmap 8, or once developed in the RAM 12 and transferred to the frame buffer 16.
[0075]
In such a configuration, when contour information is directly input from the outside, the CPU 11 executes the function of each configuration shown in FIG. Further, when input is performed using a character code or the like, information on the contour line corresponding to the character code is read from the ROM 13 or the external storage device 14 and developed into a bitmap. For example, the outline / line information is enlarged / reduced according to the size of the designated character or figure, or other various deformation processes are performed, and then the function of the character / figure processing apparatus of the present invention is applied. It may be executed. Further, the bitmap development process based on the contour line information is performed twice while changing the scanning direction for the correction process as described above, and the painting process is performed once.
[0076]
The bitmap developed in the RAM 12 is transferred to a predetermined position in the frame buffer 16. Then, when a bitmap image of a predetermined unit, such as one screen or one page, is completed, or at regular time intervals, it is transferred to the display device via the video interface 15 to display the image, or The image can be transferred to a recording device via the printer interface 17 and recorded on a recording sheet or the like. The contents of the frame buffer 16 can be stored in the external recording device 14 or output to the outside.
[0077]
In the above description, an example is shown in which the bitmap 8 is provided on the RAM 12 and transferred to the frame buffer 16 after the expansion process. However, the character / graphic processing apparatus of the present invention does not read out the bitmap, so the frame buffer 16 It is also possible to configure to write directly. In this case, the required amount of memory can be further reduced.
[0078]
In the above-described embodiment, the concave portion (bird's feet) correction processing that appears due to the dropout correction processing is performed by following the link provided in the edge list. The present invention is not limited to this. For example, it is configured to sequentially search for the edges in the next and subsequent scanning lines based on the coordinates where the dropout processing has been performed, or the segments are associated with the edges and the dropout is performed. It is possible to apply various methods for correcting the concave portion (bird's feet) in the shape correction unit 4 such as reading out a segment corresponding to the processed edge and separately drawing a straight line.
【The invention's effect】
As is clear from the above description, according to the present invention, when the contour information is expanded into a bitmap, the dropout is corrected and the “bird's feet” that has conventionally occurred by the dropout correction processing is It can correct also about the concave-shaped part called. Thus, for example, there is an effect that a bitmap can be output with a good shape even when characters and figures are output in a small size and low resolution.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram showing an embodiment of a character / graphics processing apparatus of the present invention.
FIG. 2 is a flowchart showing an example of operation in the embodiment of the character / graphics processing apparatus of the present invention;
FIG. 3 is a flowchart showing an example of an operation when dropout occurs in the embodiment of the character / graphics processing apparatus of the present invention;
FIG. 4 is an explanatory diagram showing an example of a state of an edge list that is transitioned in an example of an operation in the embodiment of the character / graphics processing apparatus of the present invention;
FIG. 5 is an explanatory diagram showing a state of a bitmap that transitions in an example of an operation in the embodiment of the character / graphics processing apparatus of the present invention;
FIG. 6 is a block diagram showing a configuration example for realizing an embodiment of the character / graphics processing apparatus of the present invention;
FIG. 7 is an explanatory diagram of an example of a contour line and a bitmap obtained from the contour line;
FIG. 8 is an explanatory diagram of a method for determining whether or not a pixel is inside a contour line.
FIG. 9 is an explanatory diagram of a painting process using a scan conversion method.
FIG. 10 is an explanatory diagram of a specific example of a painting process using a scan conversion method.
FIG. 11 is an explanatory diagram of an example of a dropout.
FIG. 12 is an explanatory diagram of another example of dropout.
FIG. 13 is an explanatory diagram of a specific example of a painting process by a scan conversion method including correction of dropout.
FIG. 14 is an explanatory diagram of a specific example of a painting process by a scan conversion method using an edge list.
FIG. 15 is an explanatory diagram of an example of a defect caused by dropout processing.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Scan conversion part, 2 ... Edge list registration part, 3 ... Edge list production | generation part, 4 ... Shape correction part, 5 ... Edge list expansion | deployment part, 6 ... Contour line information, 7 ... Edge list, 8 ... Bit map, 11 ... CPU, 12 ... RAM, 13 ... ROM, 14 ... external storage device, 15 ... video interface, 16 ... frame buffer, 17 ... printer interface.

Claims (4)

文字・図形を示す輪郭線の情報をビットマップに展開する文字・図形処理装置において、前記輪郭線の情報を構成するセグメントと前記ビットマップの画素の配列方向に平行な走査線との交点からエッジを検出する走査変換手段と、該走査変換手段が出力するエッジの座標を走査線ごとにリストとして登録するエッジリスト登録手段と、前記リストに前記エッジリスト登録手段で登録した前記エッジの座標を走査線ごとにソートするエッジリスト生成手段と、該エッジリスト生成手段によってソートされたリストをもとに2つのエッジの座標が同じである場合にドロップアウトが発生するエッジを検出して補正処理を行うとともに該補正処理により生じた凹状部をセグメントに沿って補正する補正処理を行う形状補正手段と、前記エッジリスト生成手段によってソートされたリストをもとにビットマップに展開するエッジリスト展開手段を有することを特徴とする文字・図形処理装置。In a character / graphic processing apparatus for developing contour information indicating characters / graphics into a bitmap, an edge is formed from an intersection of a segment constituting the contour information and a scanning line parallel to the pixel arrangement direction of the bitmap Scanning conversion means for detecting the edge, edge list registration means for registering the edge coordinates output by the scanning conversion means as a list for each scanning line, and scanning the edge coordinates registered in the list by the edge list registration means Edge list generation means for sorting line by line, and correction processing is performed by detecting an edge where dropout occurs when the coordinates of two edges are the same based on the list sorted by the edge list generation means a shape correction unit for performing a correction process for correcting along the segment concave portion caused by the correction process with the Ejjirisu Characters and graphics processing apparatus characterized by having an edge list expansion means for expanding the original sorted list into a bitmap by the generation means. 前記走査変換手段は、エッジの検出とともに走査線とセグメントとが直交するか否かを判定し、前記エッジリスト登録手段は、前記走査変換手段が走査線とセグメントとが直交すると判定した場合に該セグメントと走査線との交点のエッジの座標を順次リンクさせ、前記形状補正手段は、前記ドロップアウトが発生するエッジを検出したとき、該エッジの座標からリンクされているエッジの座標が存在する場合に該リンクをたどって得られるエッジの座標について補正処理を行うことを特徴とする請求項1に記載の文字・図形処理装置。  The scan conversion means determines whether or not the scan line and the segment are orthogonal with the detection of the edge, and the edge list registration means determines that the scan conversion means determines that the scan line and the segment are orthogonal. When the coordinates of the edge of the intersection of the segment and the scanning line are sequentially linked, and when the shape correction means detects the edge where the dropout occurs, the edge coordinate linked from the edge coordinate exists. 2. The character / graphic processing apparatus according to claim 1, wherein correction processing is performed on edge coordinates obtained by following the link. 前記形状補正手段は、前記補正処理としてビットマップに補正対象の画素を書き込むことを特徴とする請求項1または請求項2に記載の文字・図形処理装置。  The character / graphics processing apparatus according to claim 1, wherein the shape correction unit writes a pixel to be corrected in a bitmap as the correction processing. 前記形状補正手段は、前記エッジリスト生成手段が1走査線について前記エッジの座標をソートするごとに補正処理を行うことを特徴とする請求項1ないし請求項3のいずれか1項に記載の文字・図形処理装置。  4. The character according to claim 1, wherein the shape correction unit performs a correction process each time the edge list generation unit sorts the coordinates of the edge with respect to one scanning line. 5. -Graphic processing device.
JP15336099A 1999-06-01 1999-06-01 Character / graphic processing unit Expired - Fee Related JP3879804B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15336099A JP3879804B2 (en) 1999-06-01 1999-06-01 Character / graphic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15336099A JP3879804B2 (en) 1999-06-01 1999-06-01 Character / graphic processing unit

Publications (2)

Publication Number Publication Date
JP2000348191A JP2000348191A (en) 2000-12-15
JP3879804B2 true JP3879804B2 (en) 2007-02-14

Family

ID=15560762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15336099A Expired - Fee Related JP3879804B2 (en) 1999-06-01 1999-06-01 Character / graphic processing unit

Country Status (1)

Country Link
JP (1) JP3879804B2 (en)

Also Published As

Publication number Publication date
JP2000348191A (en) 2000-12-15

Similar Documents

Publication Publication Date Title
JP3111639B2 (en) Continuous pattern printing system
JP3879804B2 (en) Character / graphic processing unit
JP2625612B2 (en) Image processing method and image processing apparatus
JP3471817B2 (en) How to edit small-sized character bitmaps using linked runs
JPH09106460A (en) Adjacent relation discriminating method for image parts
JP2004334533A (en) Image processing device and method
JP3567728B2 (en) Image processing method and apparatus
JP3129717B2 (en) Image processing apparatus and image processing method
JPH1138960A (en) Pattern generating method, device therefor, and recording medium
JP3603589B2 (en) Image processing method and apparatus
JPH05143733A (en) Contour extracting device
JP3350324B2 (en) Character output device
JP3567727B2 (en) Image processing method and apparatus
JP2664948B2 (en) Image processing apparatus and image processing method
JPH08183208A (en) Method and apparatus for recording bit map
JP2000235651A (en) Compiling method/device for raster data
JP2008098947A (en) Image processor and image processing method
JPH0237391A (en) Image interpolating system
JPH01205388A (en) Generation system for high quality character and graphic or the like
JPH07273958A (en) Image forming device
JPH0698156A (en) Enlarging printer
JP2002133430A (en) Plotting processing device
JPH02270083A (en) Graphic painting-out method
JPH01129370A (en) Contour data extraction processor
JPH05183753A (en) Device and method for outputting color image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20031211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060726

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060922

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: 20061018

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061031

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: 20101117

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111117

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111117

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121117

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121117

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131117

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees