JP3567728B2 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
JP3567728B2
JP3567728B2 JP07934898A JP7934898A JP3567728B2 JP 3567728 B2 JP3567728 B2 JP 3567728B2 JP 07934898 A JP07934898 A JP 07934898A JP 7934898 A JP7934898 A JP 7934898A JP 3567728 B2 JP3567728 B2 JP 3567728B2
Authority
JP
Japan
Prior art keywords
edge
scanning line
mark
line
contour
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
JP07934898A
Other languages
Japanese (ja)
Other versions
JPH11282450A (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 JP07934898A priority Critical patent/JP3567728B2/en
Publication of JPH11282450A publication Critical patent/JPH11282450A/en
Application granted granted Critical
Publication of JP3567728B2 publication Critical patent/JP3567728B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、画像処理方法および装置に関し、特に、文字デザイン情報をアウトライン情報で格納し、小サイズの文字出力時にドロップアウトを補正する画像処理方法および装置に関する。
【0002】
【従来技術】
ページプリンタやディスプレイ等のビットマップスクリーンをベースとする出力装置では、画素が細かくなる、つまり、高解像度になるにしたがって、同じサイズの文字や図形を表示するために多くのデータが必要となる。特に、決まった輪郭をもつ文字情報においても、サイズ毎にビットマップデータを持つ必要があり効率が悪いものとなる、そのため、文字情報においてはサイズ毎にビットマップデータを持つのではなく、アウトライン情報を拡大または縮小してから文字の輪郭線の内部を塗り潰すことで文字を表示する方法が有利となる。
【0003】
しかし、輪郭線内部を塗り潰す方法では小サイズの文字を出力(表示)する場合には、輪郭線の間隔が狭くなりすぎて塗り潰しに抜け(ドロップアウト)が発生することがある。このドロップアウトが生じる現象を回避するためには、大きく分けてアウトライン情報自体に小サイズ出力時の輪郭線変更情報を持たせる方法と、処理系にドロップアウト発生場所を検知させ修正を行う方法の2つがある。前者は一般に処理が速く文字のデザインの崩れもデータ作成段階で補正できるが、文字数が増えた場合にデータサイズが増大し、データ作成時の手間も増える。後者ではデータの変更の必要はないが、処理が遅くなり、前者の場合と比較して文字のデザインが崩れる場合もある。したがって、現在では前者と後者を組み合わせて使用するのが主流となっている。
【0004】
なお、この発明は、上述の2つの方法のうち後者の方法に関するものであるため、後者の方法についてさらに説明する。
【0005】
図14に文字の輪郭線とその輪郭線から得られるビットマップを示す。同図に示すように文字を出力(表示)する場合には、出力しようとする文字の輪郭線の内側の画素を他の画素と反転させたビットマップを出力する。また、各画素は、図15に示すように高さ1、幅1の正方形をしており、その4隅に整数座標値がくる。画素の座標は左下隅の座標値で表現し、これをピクセル座標と呼ぶことにする。また、図16に示すように輪郭線の内側に画素の中心点がある場合、その画素は輪郭線の内側であると判断される。
【0006】
次に、スキャンコンバージョンの一例を示す。この例においては、輪郭線の方向を考慮しないEVEN−ODDルールと呼ばれる条件で輪郭線の内外を判定している。
【0007】
ここで、図17に示すようにx軸方向に画素の中心点を結んだ線を走査線または主走査線、y軸方向に画素の中心点を結んだ線を副走査線と呼ぶことにする。輪郭線の内側を求める際には、図18(a)に示すように輪郭線と走査線の交点を求め、交点とy座標が等しく、交点の右側にある画素(画素の中心点)のうち最も近い画素を選択する。この画素をエッジと呼ぶが、エッジは、例えば上記交点のx座標値の小数点第1位を四捨五入することで求めることができる。
【0008】
さて、全ての輪郭線についてエッジを選択したら、図18(b)に示すように各走査線についてエッジに挟まれた画素を反転する。このとき、反転する画素の始点または終点となるエッジのうち、始点となる画素は反転させるが、終点となる画素は反転させない。
【0009】
また、エッジを選択する段階でエッジが重なった場合、その重なりが偶数個であればそのエッジを削除する。この操作を実施しないと塗り潰しが正確に行われない。
なお、スキャンコンバージョンはドロップアウトが発生しない限り副走査線方向から実施しても同様の画像が得られる。
【0010】
ところで、選択されたエッジの登録を最も単純に行うには図19(a)に示すように実際のビットマップで画素を反転させればよい。しかし、文字のサイズが大きくなった場合や高解像度の場合には塗り潰しの段階で全ての画素を調べなければならないので、速度的に不利であり、単純な構造のために複雑なペイントルールが利用しにくく、輪郭線の方向等のエッジの情報をつけるとメモリ効率が悪くなるといった欠点がある。
【0011】
そのため、図19(b)に示すように各走査線をリストで管理する方法がある。これは、選択したエッジをリストに登録していき、全てのエッジが登録されたところで各リストをソートし、塗り潰し過程ではこのリストからエッジを2つずつ取り出してこれを始点および終点とする。なお、このリストはエッジリストと呼ばれる。
【0012】
ここで、図20にドロップアウトの発生例を示す。
図20(a)に示すように2つの輪郭線が隣接する画素の中心点の間を通った場合には、反転する画素が存在しないため、ドロップアウトが発生する。この場合、図20(b)に示すように2つの輪郭線の走査線との各交点から選択されるエッジが重なる。エッジが重なった場合、両輪郭線の間が輪郭線の外側であれば問題ないが、内側であればドロップアウトになる。エッジが重なった場合は前述のように削除するので、このような画素はエッジとは別のビットマップまたはエッジリストに登録する必要がある。また、図20(c)は、輪郭線と走査線の交点から求めたエッジでは発見できないドロップアウトの例を示しており、この場合には副走査線方向からエッジを選択することでドロップアウトを発見できる。この例から判るように全てのドロップアウトを発見するには、走査線方向と副走査線方向の両方から実施する必要がある。
【0013】
このような処理は、文字のサイズが十分大きく、ドロップアウトが発生しなければ輪郭線からのエッジの選択は走査線または副走査線方向のどちらか一方から実施すればよいが、文字のサイズが小さくドロップアウトを処理する必要がある場合は、両方向からエッジの選択を実施しなければならずドロップアウトの処理を含む出力(表示))処理に要する時間が長くなる。
【0014】
また、ドロップアウトの発生を防止または抑制する技術としては、特開平8−87602号公報で開示されている「アウトラインフォント描画装置」や特開平8−95545号公報で開示されている「アウトラインフォント描画装置」、特開平8−77372号公報で開示されている「アウトライン塗りつぶし装置」等がある。
【0015】
特開平8−87602号公報記載の「アウトラインフォント描画装置」では、走査線方向と副走査線方向で各々スキャンコンバージョンを行い、別々のビットマップを作成し、両者を合成することでドロップアウトの無いビットマップ画像を得ており、特開平8−95545号公報記載の「アウトラインフォント描画装置」では、通常は各画素の中心部に設定されるスキャンラインをずらしてスキャンコンバージョンを行い、これによりドロップアウトの発生を抑制している。
【0016】
また、特開平8−77372号公報記載の「アウトライン塗りつぶし装置」では、1つ上のスキャンラインの輪郭線との交点の座標を参照してエッジを補正している。
【0017】
【発明が解決しようとする課題】
ところが、上述の特開平8−87602号公報記載の「アウトラインフォント描画装置」では、常に走査線方向と副走査線方向の両方向からスキャンコンバージョンを行っており、ドロップアウトの検出に要する時間が長くなるとともに、ドロップアウトが発生する可能性の低い文字または文字の一部分をスキャンコンバージョンする際には無駄な処理を行っていることになる。
【0018】
特開平8−95545号公報記載の「アウトラインフォント描画装置」では、スキャンラインをずらすことでドロップアウトの発生を抑制しているために、本来作成したい画像とは異なる画像ができる可能性があるとともに、スキャンラインの移動方向を輪郭線の方向から判断しているので塗り潰しのルールによっては適用できないものもある。
【0019】
また、特開平8−77372号公報記載の「アウトライン塗りつぶし装置」では、交点の座標のみを使用しているため、別々の輪郭線の上端下端が隣接するスキャンラインと夫々交点を持った場合には、間違えて接続してしまう可能性があるとともに、スキャンライン単位で処理を行っているために輪郭線毎の処理の分岐等はできない。
【0020】
そこで、この発明は、ドロップアウトの検出を高速に処理し、高品質のビットマップ画像を作成することのできる画像処理方法および装置を提供することを目的とする。
【0021】
【課題を解決するための手段】
上述した目的を達成するため、請求項1の発明は、描画する文字の輪郭線と走査線との交点から走査方向に最も近い画素をエッジとして選択し、前記走査線上のエッジ間の画素を反転することで該文字に対応する画像をビットマップ上に展開する画像処理方法において、注目走査線上で第1のエッジを順次選択するとともに、該注目走査線に隣接する隣接走査線上で選択された第2のエッジのうち、前記第1のエッジと前記輪郭線上で隣接する第2のエッジを前記注目走査線に直交する方向に該注目走査線上に移動し、該移動した位置を該第1のエッジに対応するマークエッジとして設定し、前記第1のエッジと前記マークエッジとに各々所定の値を割り当て、前記注目走査線上における前記所定の値を順次加算し、該加算結果に基づいて前記第1のエッジの1つである第3エッジと該第3のエッジとの対応が設定されたマークエッジとの間の領域と前記第1のエッジのうち前記第3のエッジとは別の第4のエッジと該第4のエッジに対応するマークエッジとの間の領域とが重なる領域を特定し、該重なる領域を画素抜けとして検出することを特徴とする。
【0022】
また請求項2の発明は、請求項1の発明において、前記注目走査線が、x軸と該x軸に直交するy軸とで表されるxy平面上において前記x軸と平行であり、前記隣接走査線が、前記xy平面上において前記注目走査線よりもyの値が小さい場合には、前記輪郭線の傾きが正であれば、前記第1のエッジに−1を割り当てるとともに前記マークエッジに1を割り当て、前記輪郭線の傾きが負であれば、前記第1のエッジに1を割り当てるとともに前記マークエッジに−1を割り当て、前記加算結果が2となった領域を前記重なる領域として検出することを特徴とする。
【0023】
また請求項3の発明は、請求項1または2の発明において、前記マークエッジの設定は、前記輪郭線の傾きが−1より大きく、かつ、1より小さい場合に行うことを特徴とする。
【0024】
また請求項4の発明は、描画する文字の輪郭線と走査線との交点から走査方向に最も近い画素をエッジとして選択し、前記走査線上のエッジ間の画素を反転することで該文字に対応する画像をビットマップ上に展開する画像処理装置において、走査線上のエッジを選択するエッジ選択手段と、前記エッジ選択手段が注目走査線上で選択したエッジを第1のエッジとするとともに、前記エッジ選択手段が前記注目走査線に隣接する隣接走査線上で選択したエッジを第2のエッジとし、前記第1のエッジと前記輪郭線上で隣接する第2のエッジを前記注目走査線に直交する方向に該注目走査線上に移動し、該移動した位置を該第1のエッジに対応するマークエッジとして設定するマークエッジ設定手段と、前記第1のエッジと前記マークエッジとに各々所定の値を割り当て、前記注目走査線上における前記所定の値を順次加算し、該加算結果に基づいて前記第1のエッジの1つである第3エッジと該第3のエッジとの対応が設定されたマークエッジとの間の領域と前記第1のエッジのうち前記第3のエッジとは別の第4のエッジと該第4のエッジに対応するマークエッジとの間の領域とが重なる領域を特定し、該重なる領域を画素抜けとして検出する画素抜け判定手段とを具備することを特徴とする。
【0025】
また請求項5の発明は、請求項4の発明において、前記注目走査線が、x軸と該x軸に直交するy軸とで表されるxy平面上において前記x軸と平行であり、前記隣接走査線が、前記xy平面上において前記注目走査線よりもyの値が小さい場合には、前記画素抜け判定手段は、前記輪郭線の傾きが正であれば、前記第1のエッジに−1を割り当てるとともに前記マークエッジに1を割り当て、前記輪郭線の傾きが負であれば、前記第1のエッジに1を割り当てるとともに前記マークエッジに−1を割り当て、前記加算結果が2となった領域を前記重なる領域として検出することを特徴とする。
【0026】
また請求項6の発明は、請求項4または5の発明において、前記マークエッジ設定手段は、前記輪郭線の傾きが−1より大きく、かつ、1より小さい場合に動作することを特徴とする。
【0031】
【発明の実施の形態】
以下、この発明に係わる画像処理方法および装置の一実施例を添付図面を参照して詳細に説明する。
【0032】
図1は、この発明に係わる画像処理装置の構成を示すブロック図である。
画像処理装置10は、アウトライン情報の拡大縮小等の座標変換と曲線(輪郭線情報)を画素に応じて滑らかに見える大きさの直線に分割(複数の直線による近似)を行う座標変換手段1と、走査線方向からエッジを選択してエッジリストに登録し、その後エッジの重なった部分を検出してドロップアウト登録リストに登録するとともに、登録したエッジからマークエッジを求めてエッジリストに登録する交点・ドロップアウト検出手段2、マークエッジとエッジの間の領域の重なりを判定し、ドロップアウトが発生する画素を求めてドロップアウト登録リストに登録するドロップアウト判定手段3、エッジリストからビットマップを生成し、さらにドロップアウト登録リストの情報を合成するビットマップ展開手段4を具備して構成される。
【0033】
この画像処理装置10は、実際には図2に示すようにCPU11と、RAM12、ROM13、外部記憶装置14、ビデオI/F(インタフェイス)15、フレームバッファ16、プリンタI/F(インタフェイス)17を具備して構成される。
【0034】
図1に示した座標変換手段1と交点・ドロップアウト検出手段2、ドロップアウト判定手段3、ビットマップ展開手段4は、RAM12またはROM13に収められたプログラムによりCPU11上で構成される。また、RAM12には上述のエッジリストやドロップアウト登録リスト等が構成され、ROM13および外部記憶装置14にはアウトラインフォントデータが格納されている。フレームバッファ16は、ビットマップ展開手段4が展開したビットマップ画像を一時的に記憶し、この画像をビデオI/F15に接続されたディスプレイ(不図示)またはプリンタI/F17に接続されたページプリンタ(不図示)等の外部出力装置へ出力する。
【0035】
次に、画像処理装置10の動作について説明する。
画像処理装置10は、現在処理を行おうとするエッジの座標と、これに隣接する走査線から選択されたエッジの座標からドロップアウト区間を判定して補正を行う。
【0036】
図3は、ドロップアウト区間の判定方法を示した図である。
図3(a)は、ドロップアウトが発生しない場合の例を示している。同図中のL1およびL2は左側の輪郭線から選択されるエッジを示しており、R1およびR2は右側の輪郭線から選択されるエッジを示している。また、L2およびR2は、L1およびR2を選択した走査線の1つ上の走査線と輪郭線の交点から選択されたエッジである。このエッジに対しては、スキャンコンバージョンによってL1−R1間、L2−R2間の領域が塗りつぶされるが、この両者の領域のx座標値の少なくとも一部が重なって(連続して)いればドロップアウトは発生しない。
【0037】
図3(b)は、ドロップアウトが発生する場合の例を示している。同図においては、スキャンコンバージョンによって塗りつぶされるL1−R1間とL2−R2間の領域のx座標値に重なりがないため、x軸方向にR1−L2間でドロップアウトが発生する。
【0038】
このため、画像処理装置10は、図3(c)に示すようにL1とR1の写像L1′とR1′をL2とR2と同一の走査線上に配置し、L1′−L2間とR1′−R2間の領域を比較する。この比較により両領域が重なった部分がドロップアウトとなるため、これをドロップアウトと判定する。なお、以下では、この写像L1′とR1′をマークエッジと呼ぶことにする。
【0039】
また、画像処理装置10は、主としてCPU11により動作するため、プログラムによりドロップアウトの判定を行う必要がある。図3(d)は、プログラムによりドロップアウトを判定させる場合の一例を示している。この例では、エッジに整数値の要素を持たせ、マークエッジには+1、エッジには−1を設定する。また、輪郭線の傾きが負の場合にはマークエッジには−1、エッジには+1を設定する。このように設定したマークエッジおよびエッジの値をx座標の昇順(図中左から右の順)に加算していくと、その値が2となった部分がドロップアウトの発生した領域であると判定できる。
【0040】
ここで、図4乃至7を参照して画像処理装置10の動作を説明する。
図4乃至7は、夫々画像処理装置10の動作の流れを示すフローチャートである。
【0041】
画像処理装置10は、CPU11が図示しないインタフェース等を通じて図示しないRAM(またはRAM12)上に貯えられた画像情報等を読み込む。画像情報が文字コードであればROM13または外部記憶装置14からアウトラインフォントデータを読みだして画像生成プログラムの実行を開始する(図4、ステップ101)。
【0042】
次に、CPU11は、RAM13上にエッジリストとドロップアウト登録リスト等を作成し、これらリストを初期化する(ステップ102)。続いて、CPU11は画像変換手段1を実行して、輪郭線(アウトライン)を出力したい大きさに座標変換し(ステップ103)、この輪郭線を短い複数の直線に分割する(曲線部は直線近似、ステップ104)。
【0043】
輪郭線の分割が終了すると、CPU11は、交点・ドロップアウト検出手段2を実行して、エッジおよびマークエッジの選択とエッジリストへの登録を行う(ステップ105)。このとき、交点・ドロップアウト検出手段2は、エッジの重なりによるドロップアウトの検出とドロップアウト登録リストへの登録も行う。次に、ドロップアウト判定手段3がマークエッジによるドロップアウトの検出とドロップアウト登録リストへの登録を行う(ステップ106)。なお、ステップ105および106の動作の詳細は後述する。
【0044】
次に、CPU11は、ビットマップ展開手段4を実行し、エッジリストからビットマップを生成し(ステップ107)、ドロップアウト登録リストに登録されている座標の画素を合成(反転)した後(ステップ108)、フレームバッファ16へ出力する(ステップ109)。
【0045】
ここで、図示しない出力装置(ディスプレイやページプリンタ等)が、一定時間間隔またはCPU11からの終了信号に応じてフレームバッファ16を調べ、登録されているビットマップを出力することで画像処理装置10は動作を終了する。
【0046】
次に、上述のステップ105におけるエッジおよびマークエッジの選択とエッジリストへの登録処理の詳細について説明する。
交点・ドロップアウト検出手段2は、まず、直線に分割された最初(予め設定した順序の最初であり、どのような順序でも良い)の輪郭線をセットし(図5、ステップ201)、走査線との交点(複数)を検出する(ステップ202)。続いて、検出された交点のy座標値の小数点以下を切り捨て、x座標値の小数点以下を四捨五入してピクセル座標を取得する(ステップ203)。このピクセル座標は、交点とy座標が等しく、交点の右側にある画素(画素の中心点)のうち最も近い画素であるのでこれをエッジとし、また、このエッジからマークエッジを求め、エッジとマークエッジをエッジリストに順次登録する(ステップ204)。
【0047】
エッジリストへの登録は、まず、最初のエッジをセットし(図6、ステップ301)、その座標値のy座標(またはx座標)から登録するエッジリストを選択する(ステップ302)。ここで、エッジリストに登録しようとする(ステップ301でセットした)エッジと同じ座標値があった場合には(ステップ303でYES)、その座標値をエッジリストから削除し、これをドロップアウト登録リストの最後に追加する(ステップ304)。また、同じ座標値が無ければ(ステップ303でNO)、エッジリストにその座標値を追加する(ステップ305)。
【0048】
次に、エッジのy座標値に1を加算して1つ上段のピクセルを示す座標値を算出して(y座標値から1を減算して1つ下段のピクセルを示す座標値を算出してもよい)、これをマークエッジの座標値とする(ステップ306)。ここで、このマークエッジの座標値と同じ座標値(既に登録されているマークエッジ)がエッジリストにあった場合には(ステップ307でYES)、その座標値をエッジリストから削除し(ステップ308)、同じ座標値が無ければ(ステップ307でNO)、エッジリストにその座標値を追加する(ステップ309)。
【0049】
エッジおよびマークエッジの登録は、最後のエッジを登録するまでは(ステップ310でNO)、次のエッジをセットして(ステップ311)、エッジリストの選択(ステップ302)以降の処理を繰り返し、最後のエッジを登録すると(ステップ310でYES)、ステップ205(図5)へ進む。
【0050】
なお、エッジおよびマークエッジの登録の際には、必要に応じてそのエッジに対応する輪郭線の傾きの情報を付加しておく。
【0051】
ステップ201乃至204(ステップ301乃至311を含む)の各処理は、最後の輪郭線に対する処理が終了するまでは(ステップ205でNO)、次の輪郭線をセットして(ステップ206)、ステップ202に戻り、同様の処理を行い、最後の輪郭線に対する処理が終了すると(ステップ205でYES)、ステップ105(図4)の処理を終了して、ステップ106へ進む。
【0052】
次に、上述のステップ106におけるマークエッジによるドロップアウトの検出とドロップアウト登録リストへの登録処理の詳細について説明する。
ドロップアウト判定手段3は、まず、エッジリストをソートし(図7、ステップ401)、ソートが終了すると最下段の走査線エッジリストを処理対象としてセットして(ステップ402)この走査線エッジリストの各要素(エッジ、マークエッジ)を順次加算する(ステップ403)。加算する値は、傾きが正の輪郭線に対するエッジおよびマークエッジを各々−1、+1とし、傾きが負の輪郭線に対するエッジおよびマークエッジを各々+1、−1とする。
【0053】
次に、要素の加算値が2となる区間を検出し(ステップ404)、2となる区間が検出されたら(ステップ404でYES)、検出した区間の画素の座標値をドロップアウト登録リストに追加し(ステップ405)、加算値が2となる区間が検出されなければ(ステップ404でNO)、何も処理は行わない。
【0054】
最下段の走査線エッジリストの処理が終了すると(ステップ406でNO)、1つ上段の走査線エッジリストをセットし(ステップ407)、ステップ403以降の処理を行い、最上段の走査線エッジリストに対する処理が行われると(ステップ406でYES)、ドロップアウトの検出とドロップアウト登録リストへの登録処理を終了してステップ107に進む。
【0055】
次に、図8乃至12を参照して画像処理装置10による文字の描画例を説明する。
例えば、ある大きさで文字「0」を描画しようとする場合、走査線と輪郭線の交点から選択されるエッジは、図8に示すようになる。図8においては中心に黒点を記した画素が選択されたエッジである。この選択されたエッジのうち、ピクセル座標(2,6)、(2,7)、(2,8)、(2,9)で示される画素は、2本の輪郭線から選択されたエッジである。
【0056】
図9は、図8に示したエッジを順次登録したエッジリストの内容を示した図であり、2本の輪郭線から選択されたために2重に選択されているピクセル座標(2,6)、(2,7)、(2,8)、(2,9)で示される画素を除く(図6のステップ303、304参照)全ての画素が登録されている。
【0057】
図10は、エッジリストに登録されるマークエッジを示した図である。マークエッジは選択されたエッジに基づいて算出され、ここでは選択されたエッジのy座標値に1加算した座標の画素をマークエッジとしている。また、2重に選択されているピクセル座標(2,6)、(2,7)、(2,8)、(2,9)で示される画素に対応するマークエッジは登録されない(図6のステップ307、308参照)。
【0058】
図11は、ドロップアウト登録リストに登録される画素を示す図である。
同図において、中心に「×」を記した画素は、2本の輪郭線から選択されたために2重に選択されているピクセル座標(2,6)、(2,7)、(2,8)、(2,9)で示される画素をドロップアウトとして登録したものであり(図6のステップ303、304参照)、中心に「+」を記した画素(4,2)、(4,14)、(8,2)、(8,14)は、エッジとマークエッジにより検出されたドロップアウトを登録したものである。なお、同図中の各画素に示す数字は、画素の下段の数字がエッジとマークエッジが持つ値(輪郭線の傾きが正のときエッジ−1、マークエッジ+1、輪郭線の傾きが負のときエッジ+1、マークエッジ−1)を示しており、画素の上段に示す数字がy座標の等しい各段の画素における各要素(エッジ、マークエッジ)の値をx軸方向(左から右)に加算した値を示している。
【0059】
図12は、エッジリストとドロップアウト登録リストに基づいて描画された文字「0」を示しており、同図から画像処理装置10によりドロップアウトの無い文字を描画できることがわかる。
【0060】
なお、上述の実施例においては、選択された全てのエッジに基づいてマークエッジの算出を行っているが、図13に示すように輪郭線の傾きが−1以下または1以上の場合には、複数の輪郭線から重ねて選択されるエッジによるドロップアウト以外のドロップアウト、つまり、マークエッジを使用して検出するドロップアウトは生じないため、マークエッジを算出する際に輪郭線の傾きに応じてマークエッジに関する処理を省略することができ、この場合にもドロップアウトの検出に不都合は生じない。
【0061】
また、上述の実施例においては、ドロップアウト登録リストの情報の合成(図4のステップ108)をビットマップ展開手段4により、ビットマップ画像上で行っているが、1画素分の始点および終点のエッジを登録することで、直接ドロップアウトをエッジリストに登録することが可能であり、ディスプレイ等のラスタベースの出力装置ではビットマップに展開しなくともエッジリストのままで出力を実行できる場合があるため、構成によってはビットマップ展開手段4を必要としない。
【0062】
さらに、エッジリストおよびドロップアウト登録リストをRAM12上にテーブル値として形成してもよく、ビットマップとして登録するように形成してもよい。
【0063】
【発明の効果】
以上説明したように、この発明によれば、輪郭線と走査線の交点から選択されるエッジに基づいて、隣接する段のエッジの位置をマークエッジとして登録し、エッジとマークエッジの位置関係からドロップアウトを検出して補正するように構成したので、
描画しようとする文字の変形を生じさせる可能性を低く保ったまま、一方向からの走査のみで高速にドロップアウトの補正を行うことができる。
【図面の簡単な説明】
【図1】この発明に係わる画像処理装置の構成を示すブロック図。
【図2】画像処理装置10の実際の構成を示すブロック図。
【図3】ドロップアウト区間の判定方法を示した図。
【図4】画像処理装置10の動作の流れを示すフローチャート(1)。
【図5】画像処理装置10の動作の流れを示すフローチャート(2)。
【図6】画像処理装置10の動作の流れを示すフローチャート(3)。
【図7】画像処理装置10の動作の流れを示すフローチャート(4)。
【図8】走査線と輪郭線の交点から選択されるエッジを示した図。
【図9】図8に示したエッジを順次登録したエッジリストの内容を示した図。
【図10】エッジリストに登録されるマークエッジを示した図。
【図11】ドロップアウト登録リストに登録される画素を示す図。
【図12】エッジリストとドロップアウト登録リストに基づいて描画された文字「0」を示した図。
【図13】輪郭線の傾きが−1以下、または1以上の場合に選択されるエッジを示した図。
【図14】文字の輪郭線とその輪郭線から得られるビットマップを示した図。
【図15】画素の形状を示した図。
【図16】各画素が輪郭線の内外のいずれかかを判定する方法を示した図。
【図17】走査線および副走査線を示した図。
【図18】文字の描画例を示した図。
【図19】エッジの登録方法を示した図。
【図20】ドロップアウトの発生例を示した図。
【符号の説明】
1 座標変換手段
2 交点・ドロップアウト検出手段
3 ドロップアウト判定手段
4 ビットマップ展開手段
10 画像処理装置
11 CPU
12 RAM
13 ROM
14 外部記憶装置
15 ビデオI/F(インタフェイス)
16 フレームバッファ
17 プリンタI/F(インタフェイス)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing method and apparatus, and more particularly to an image processing method and apparatus that stores character design information as outline information and corrects dropout when outputting small-sized characters.
[0002]
[Prior art]
In an output device based on a bitmap screen, such as a page printer or a display, as the pixels become finer, that is, as the resolution increases, more data is required to display characters and graphics of the same size. In particular, even for character information having a fixed contour, it is necessary to have bitmap data for each size, which is inefficient. Therefore, character information does not have bitmap data for each size but outline information. A method of displaying a character by enlarging or reducing is followed by filling the inside of the outline of the character is advantageous.
[0003]
However, when a small-size character is output (displayed) in the method of filling the inside of the outline, the interval between the outlines may be too narrow and dropout may occur in the fill. In order to avoid this dropout phenomenon, there are two methods: outline information that has outline change information at the time of small size output in the outline information itself, and method of detecting and correcting the dropout occurrence location in the processing system. There are two. The former is generally faster in processing and can correct the destruction of the character design at the data creation stage. However, when the number of characters increases, the data size increases and the time and effort required for data creation also increase. In the latter case, the data does not need to be changed, but the processing is slower, and the character design may be distorted compared to the former case. Therefore, it is now mainstream to use the former and the latter in combination.
[0004]
Since the present invention relates to the latter method among the above two methods, the latter method will be further described.
[0005]
FIG. 14 shows an outline of a character and a bit map obtained from the outline. When a character is output (displayed) as shown in the figure, a bitmap is output in which pixels inside the outline of the character to be output are inverted with respect to other pixels. Each pixel is a square having a height of 1 and a width of 1, as shown in FIG. 15, and integer coordinate values come at the four corners. The coordinates of the pixel are represented by the coordinate value of the lower left corner, which will be referred to as pixel coordinates. When the center point of a pixel is inside the contour as shown in FIG. 16, the pixel is determined to be inside the contour.
[0006]
Next, an example of scan conversion will be described. In this example, the inside and outside of the outline are determined under a condition called an EVEN-ODD rule that does not consider the direction of the outline.
[0007]
Here, a line connecting the center points of the pixels in the x-axis direction as shown in FIG. 17 is called a scanning line or a main scanning line, and a line connecting the center points of the pixels in the y-axis direction is called a sub-scanning line. . When finding the inside of the contour, as shown in FIG. 18 (a), the intersection of the contour and the scanning line is determined, and the intersection and the y coordinate are equal, and among the pixels on the right side of the intersection (the center point of the pixel) Select the closest pixel. This pixel is called an edge, and the edge can be obtained by, for example, rounding off the first decimal place of the x coordinate value of the intersection.
[0008]
Now, when the edges are selected for all the contour lines, the pixels sandwiched between the edges are inverted for each scanning line as shown in FIG. At this time, of the edges serving as the start point or the end point of the pixel to be inverted, the pixel serving as the start point is inverted, but the pixel serving as the end point is not inverted.
[0009]
Further, when edges overlap at the stage of selecting an edge, if the number of overlaps is an even number, the edges are deleted. Unless this operation is performed, the filling is not performed accurately.
Note that the same image can be obtained even if scan conversion is performed from the sub-scanning line direction unless dropout occurs.
[0010]
By the way, the simplest way to register the selected edge is to invert the pixel with the actual bitmap as shown in FIG. However, when the size of the character becomes large or at high resolution, all pixels must be examined at the filling stage, which is disadvantageous in terms of speed, and complicated painting rules are used due to the simple structure. It is disadvantageous that the memory efficiency is deteriorated if edge information such as the direction of a contour line is added.
[0011]
Therefore, there is a method of managing each scanning line in a list as shown in FIG. In this method, the selected edges are registered in a list, and when all the edges are registered, each list is sorted. In the filling process, two edges are extracted from the list, and these are set as a start point and an end point. This list is called an edge list.
[0012]
Here, FIG. 20 shows an example of the occurrence of dropout.
When two contour lines pass between the center points of adjacent pixels as shown in FIG. 20A, dropout occurs because there is no pixel to be inverted. In this case, as shown in FIG. 20B, edges selected from intersections of the two contours with the scanning line overlap. When the edges overlap, there is no problem if the space between the outlines is outside the outline, but if it is inside the outline, a dropout occurs. If the edges overlap, they are deleted as described above, and such pixels need to be registered in a bitmap or edge list different from the edges. FIG. 20C shows an example of a dropout that cannot be found from the edge obtained from the intersection between the contour and the scanning line. In this case, the dropout is selected by selecting an edge from the sub-scanning line direction. Can be found. As can be seen from this example, in order to find all the dropouts, it is necessary to execute from both the scanning line direction and the sub-scanning line direction.
[0013]
In such processing, if the size of the character is sufficiently large and no dropout occurs, the selection of the edge from the outline may be performed from either the scanning line or the sub-scanning line direction. When it is necessary to process a small dropout, edges must be selected from both directions, and the time required for output (display) processing including the processing of the dropout increases.
[0014]
Further, as a technique for preventing or suppressing the occurrence of dropout, an “outline font drawing apparatus” disclosed in JP-A-8-87602 and an “outline font drawing” disclosed in JP-A-8-95545 are disclosed. Device ", and" outline filling device "disclosed in JP-A-8-77372.
[0015]
In the "outline font drawing apparatus" described in JP-A-8-87602, scan conversion is performed in each of the scanning line direction and the sub-scanning line direction, and separate bitmaps are created. A bitmap image is obtained, and in the "outline font drawing apparatus" described in Japanese Patent Application Laid-Open No. 8-95545, scan conversion is usually performed by shifting a scan line set at the center of each pixel, thereby performing dropout. The occurrence of is suppressed.
[0016]
In the “outline filling device” described in Japanese Patent Application Laid-Open No. 8-77372, an edge is corrected with reference to coordinates of an intersection with a contour line of the immediately higher scan line.
[0017]
[Problems to be solved by the invention]
However, in the "outline font drawing apparatus" described in JP-A-8-87602, scan conversion is always performed from both the scanning line direction and the sub-scanning line direction, and the time required for dropout detection becomes longer. In addition, when scan conversion is performed on a character or a part of a character that is unlikely to cause dropout, wasteful processing is performed.
[0018]
In the “outline font drawing device” described in Japanese Patent Application Laid-Open No. 8-95545, since the occurrence of dropout is suppressed by shifting the scan line, there is a possibility that an image different from the image originally intended may be formed. Since the moving direction of the scan line is determined from the direction of the contour line, some of the rules cannot be applied depending on the rule of filling.
[0019]
Further, in the “outline filling device” described in JP-A-8-77372, only the coordinates of the intersections are used. Therefore, when the upper and lower ends of the separate contour lines have the intersections with the adjacent scan lines, respectively. In addition, there is a possibility that connection may be made by mistake, and since processing is performed in units of scan lines, branching of processing for each contour cannot be performed.
[0020]
Therefore, an object of the present invention is to provide an image processing method and apparatus capable of processing dropout detection at high speed and generating a high-quality bitmap image.
[0021]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1 selects a pixel closest to the scanning direction from an intersection of a contour line of a character to be drawn and a scanning line as an edge, and inverts a pixel between edges on the scanning line. Then, in the image processing method for developing an image corresponding to the character on a bitmap, the first edge is sequentially selected on the target scanning line, and the first edge is selected on the adjacent scanning line adjacent to the target scanning line. A second edge adjacent to the first edge on the contour line among the two edges is moved on the target scanning line in a direction orthogonal to the target scanning line, and the moved position is defined as the first edge. Is set as a mark edge corresponding to the first edge and the mark edge, and a predetermined value is assigned to each of the first edge and the mark edge, and the predetermined values on the scan line of interest are sequentially added. A region between a third edge, which is one of the first edges, and a mark edge in which the correspondence between the third edge is set, and a third edge of the first edge, which is different from the third edge. An area in which the area between the fourth edge and the mark edge corresponding to the fourth edge overlaps is specified, and the overlapping area is detected as a missing pixel.
[0022]
Further, according to a second aspect of the present invention, in the first aspect of the present invention, the scan line of interest is parallel to the x axis on an xy plane represented by an x axis and a y axis orthogonal to the x axis. If the adjacent scanning line has a smaller y value than the target scanning line on the xy plane, if the inclination of the contour line is positive, -1 is assigned to the first edge and the mark edge is assigned. If the inclination of the contour line is negative, 1 is assigned to the first edge and -1 is assigned to the mark edge, and the area where the addition result is 2 is detected as the overlapping area. It is characterized by doing.
[0023]
According to a third aspect of the present invention, in the first or second aspect, the setting of the mark edge is performed when the inclination of the contour is larger than −1 and smaller than 1.
[0024]
According to a fourth aspect of the present invention, a pixel closest to the scanning direction from an intersection of a contour line of a character to be drawn and a scanning line is selected as an edge, and pixels between edges on the scanning line are inverted to correspond to the character. An image processing apparatus for developing an image to be processed on a bit map, an edge selecting means for selecting an edge on a scanning line, an edge selected on the scanning line of interest by the edge selecting means as a first edge, The edge selected by the means on an adjacent scanning line adjacent to the target scanning line is set as a second edge, and the second edge adjacent to the first edge and the contour line is set in a direction orthogonal to the target scanning line. Mark edge setting means for moving on the target scanning line and setting the moved position as a mark edge corresponding to the first edge; and the first edge and the mark edge A predetermined value is assigned to each of them, the predetermined values on the target scanning line are sequentially added, and a correspondence between the third edge, which is one of the first edges, and the third edge is determined based on the addition result. A region between the set mark edge and a region between a fourth edge of the first edge different from the third edge and a mark edge corresponding to the fourth edge overlap with each other. Pixel omission determining means for specifying an area and detecting the overlapped area as omission of pixels.
[0025]
According to a fifth aspect of the present invention, in the fourth aspect of the present invention, the scan line of interest is parallel to the x-axis on an xy plane represented by an x-axis and a y-axis orthogonal to the x-axis. If the adjacent scanning line has a smaller y value than the target scanning line on the xy plane, the pixel omission determining unit determines that the first edge has a negative value if the inclination of the contour line is positive. When 1 is assigned to the mark edge and 1 is assigned to the mark edge, and if the inclination of the contour line is negative, 1 is assigned to the first edge and -1 is assigned to the mark edge, and the addition result is 2. A region is detected as the overlapping region.
[0026]
According to a sixth aspect of the present invention, in the fourth or fifth aspect, the mark edge setting means operates when the inclination of the contour is larger than −1 and smaller than 1.
[0031]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of an image processing method and apparatus according to the present invention will be described in detail with reference to the accompanying drawings.
[0032]
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to the present invention.
The image processing apparatus 10 includes a coordinate conversion unit 1 that performs coordinate conversion such as enlargement / reduction of outline information and divides a curve (contour line information) into straight lines of a size that can be seen smoothly according to pixels (approximation using a plurality of straight lines). , Select an edge from the scanning line direction and register it in the edge list, then detect the overlapping portion of the edge and register it in the dropout registration list, and find the mark edge from the registered edge and register it in the edge list Dropout detection means 2, dropout determination means 3 which determines the overlap of the area between the mark edge and the edge, finds the pixel where the dropout occurs, and registers it in the dropout registration list, and generates a bitmap from the edge list And a bitmap developing means 4 for synthesizing information of the dropout registration list.
[0033]
As shown in FIG. 2, the image processing apparatus 10 actually includes a CPU 11, a RAM 12, a ROM 13, an external storage device 14, a video I / F (interface) 15, a frame buffer 16, and a printer I / F (interface). 17 is provided.
[0034]
The coordinate conversion means 1, the intersection / dropout detection means 2, the dropout determination means 3, and the bitmap development means 4 shown in FIG. 1 are configured on the CPU 11 by a program stored in the RAM 12 or the ROM 13. The RAM 12 stores the above-described edge list and dropout registration list, and the ROM 13 and the external storage device 14 store outline font data. The frame buffer 16 temporarily stores the bitmap image developed by the bitmap developing means 4 and stores the image in a display (not shown) connected to the video I / F 15 or a page printer connected to the printer I / F 17. (Not shown).
[0035]
Next, the operation of the image processing apparatus 10 will be described.
The image processing apparatus 10 determines a dropout section based on the coordinates of an edge to be currently processed and the coordinates of an edge selected from a scanning line adjacent thereto, and performs correction.
[0036]
FIG. 3 is a diagram illustrating a method of determining a dropout section.
FIG. 3A shows an example where no dropout occurs. In the figure, L1 and L2 indicate edges selected from the left outline, and R1 and R2 indicate edges selected from the right outline. L2 and R2 are edges selected from the intersection of the contour line and the scan line immediately above the scan line that selected L1 and R2. The area between L1 and R1 and the area between L2 and R2 are filled with this edge by scan conversion. If at least a part of the x-coordinate values of both areas overlap (continuously), dropout occurs. Does not occur.
[0037]
FIG. 3B shows an example in which a dropout occurs. In the figure, since the x-coordinate values of the region between L1 and R1 and the region between L2 and R2, which are filled by scan conversion, do not overlap, a dropout occurs between R1 and L2 in the x-axis direction.
[0038]
Therefore, the image processing apparatus 10 arranges the mappings L1 'and R1' of L1 and R1 on the same scanning line as L2 and R2 as shown in FIG. Compare the region between R2. As a result of this comparison, a portion where both regions overlap is a dropout, and this is determined as a dropout. In the following, the mappings L1 'and R1' are referred to as mark edges.
[0039]
Further, since the image processing apparatus 10 is mainly operated by the CPU 11, it is necessary to determine a dropout by a program. FIG. 3D shows an example of a case where a dropout is determined by a program. In this example, the edge has an integer element, +1 is set for the mark edge, and -1 is set for the edge. If the inclination of the contour is negative, -1 is set for the mark edge and +1 is set for the edge. When the mark edge and edge values set in this manner are added in ascending order of the x-coordinate (in order from left to right in the figure), a portion where the value becomes 2 is a region where a dropout has occurred. Can be determined.
[0040]
Here, the operation of the image processing apparatus 10 will be described with reference to FIGS.
4 to 7 are flowcharts showing the flow of the operation of the image processing apparatus 10, respectively.
[0041]
The image processing apparatus 10 reads image information and the like stored on a RAM (or RAM 12) not shown through an interface or the like not shown by the CPU 11. If the image information is a character code, outline font data is read from the ROM 13 or the external storage device 14 and the execution of the image generation program is started (FIG. 4, step 101).
[0042]
Next, the CPU 11 creates an edge list, a dropout registration list, and the like on the RAM 13 and initializes these lists (step 102). Subsequently, the CPU 11 executes the image conversion means 1 to convert the coordinates of the outline (outline) into a size desired to be output (step 103), and divides the outline into a plurality of short straight lines (the curved portion is approximated by a straight line). , Step 104).
[0043]
When the division of the contour is completed, the CPU 11 executes the intersection / dropout detecting means 2 to select an edge and a mark edge and register them in the edge list (step 105). At this time, the intersection / dropout detection means 2 also detects a dropout due to overlapping edges and registers it in a dropout registration list. Next, the dropout judging means 3 detects the dropout due to the mark edge and registers it in the dropout registration list (step 106). The details of the operations in steps 105 and 106 will be described later.
[0044]
Next, the CPU 11 executes the bitmap developing means 4 to generate a bitmap from the edge list (step 107), and after combining (inverting) the pixels of the coordinates registered in the dropout registration list (step 108). ), And output to the frame buffer 16 (step 109).
[0045]
Here, an output device (not shown) (such as a display or a page printer) checks the frame buffer 16 at regular time intervals or in response to an end signal from the CPU 11 and outputs a registered bitmap, so that the image processing device 10 End the operation.
[0046]
Next, details of the selection of the edge and the mark edge and the registration processing to the edge list in step 105 described above will be described.
The intersection / dropout detecting means 2 first sets the first (first in a preset order, whichever order may be used) contour line divided into straight lines (step 201 in FIG. 5), Is detected (step 202). Subsequently, the decimal point of the y coordinate value of the detected intersection is rounded down, and the decimal point of the x coordinate value is rounded to obtain pixel coordinates (step 203). The pixel coordinates are the same as the intersection point and the y coordinate, and are the closest pixels among the pixels (center points of the pixels) on the right side of the intersection point. Therefore, this pixel is regarded as an edge, and a mark edge is obtained from this edge. Edges are sequentially registered in an edge list (step 204).
[0047]
For registration in the edge list, first, the first edge is set (step 301 in FIG. 6), and the edge list to be registered is selected from the y-coordinate (or x-coordinate) of the coordinate value (step 302). If there is the same coordinate value as the edge to be registered in the edge list (set in step 301) (YES in step 303), the coordinate value is deleted from the edge list, and this is registered in the dropout. It is added to the end of the list (step 304). If the same coordinate value does not exist (NO in step 303), the coordinate value is added to the edge list (step 305).
[0048]
Next, 1 is added to the y-coordinate value of the edge to calculate a coordinate value indicating the pixel in the upper row (by subtracting 1 from the y-coordinate value to calculate a coordinate value indicating the pixel in the lower row). This is used as the coordinate value of the mark edge (step 306). Here, if the same coordinate value (the already registered mark edge) as the coordinate value of this mark edge is present in the edge list (YES in step 307), the coordinate value is deleted from the edge list (step 308). If the same coordinate value does not exist (NO in step 307), the coordinate value is added to the edge list (step 309).
[0049]
Until the last edge is registered (NO in step 310), the next edge is set (step 311), and the processing after selection of the edge list (step 302) is repeated until the last edge is registered. Is registered (YES in step 310), the process proceeds to step 205 (FIG. 5).
[0050]
When registering an edge and a mark edge, information on the inclination of the contour line corresponding to the edge is added as necessary.
[0051]
In each processing of steps 201 to 204 (including steps 301 to 311), the next contour is set (step 206) until the processing for the last contour is completed (step 205), and step 202 Then, the same processing is performed. When the processing for the last contour line is completed (YES in step 205), the processing in step 105 (FIG. 4) is completed, and the process proceeds to step 106.
[0052]
Next, the details of the detection of a dropout due to a mark edge and the registration processing to the dropout registration list in step 106 described above will be described.
The drop-out determination means 3 first sorts the edge list (step 401 in FIG. 7), and when the sorting is completed, sets the lowermost scanning line edge list as a processing target (step 402). Each element (edge, mark edge) is sequentially added (step 403). The values to be added are -1 and +1, respectively, for the edge and the mark edge with respect to the contour line having a positive gradient, and +1, -1 for the edge and the mark edge with respect to the contour line having a negative gradient.
[0053]
Next, a section where the added value of the element is 2 is detected (step 404), and if a section where the element is 2 is detected (YES in step 404), the coordinate value of the pixel of the detected section is added to the dropout registration list. Then, if no section in which the added value is 2 is detected (NO in step 404), no processing is performed.
[0054]
When the processing of the lowermost scanning line edge list is completed (NO in step 406), the one upper scanning line edge list is set (step 407), and the processing of step 403 and subsequent steps is performed to obtain the uppermost scanning line edge list. Is performed (YES in step 406), the detection of the dropout and the registration processing to the dropout registration list are completed, and the process proceeds to step 107.
[0055]
Next, an example of drawing characters by the image processing apparatus 10 will be described with reference to FIGS.
For example, when a character “0” is to be drawn in a certain size, the edge selected from the intersection of the scanning line and the outline is as shown in FIG. In FIG. 8, a pixel with a black dot at the center is the selected edge. Among the selected edges, pixels indicated by pixel coordinates (2, 6), (2, 7), (2, 8), and (2, 9) are edges selected from the two contour lines. is there.
[0056]
FIG. 9 is a diagram showing the contents of an edge list in which the edges shown in FIG. 8 are sequentially registered, and the pixel coordinates (2, 6) which are selected twice from two contour lines, All pixels are registered except for the pixels indicated by (2, 7), (2, 8), and (2, 9) (see steps 303 and 304 in FIG. 6).
[0057]
FIG. 10 is a diagram showing mark edges registered in the edge list. The mark edge is calculated based on the selected edge. In this case, a pixel at a coordinate obtained by adding 1 to the y coordinate value of the selected edge is set as a mark edge. Also, mark edges corresponding to the pixels selected by the doubly selected pixel coordinates (2, 6), (2, 7), (2, 8), and (2, 9) are not registered (FIG. 6). Steps 307 and 308).
[0058]
FIG. 11 is a diagram illustrating pixels registered in the dropout registration list.
In the figure, the pixels marked with “x” at the center are the pixel coordinates (2, 6), (2, 7), (2, 8) that are double selected because they are selected from two contour lines. ) And (2, 9) are registered as dropouts (see steps 303 and 304 in FIG. 6), and pixels (4, 2) and (4, 14) with "+" in the center are registered. ), (8, 2), and (8, 14) are registered dropouts detected by edges and mark edges. In the figure, the numbers shown at each pixel in the lower part of the pixel are the values that the edge and the mark edge have (the edge -1 when the slope of the contour is positive, the mark edge +1 and the slope of the contour is negative). When the edge +1 and the mark edge -1), the numbers shown in the upper row of the pixel indicate the values of the elements (edges, mark edges) in the pixels of each row having the same y coordinate in the x-axis direction (from left to right). The added value is shown.
[0059]
FIG. 12 shows a character “0” drawn based on the edge list and the dropout registration list, and it can be seen from FIG. 12 that the image processing apparatus 10 can draw a character without a dropout.
[0060]
In the above-described embodiment, the mark edge is calculated based on all the selected edges. However, as shown in FIG. 13, when the inclination of the outline is −1 or less or 1 or more, Since there is no dropout other than the dropout due to the edge selected from multiple contour lines, that is, the dropout detected using the mark edge, the mark edge is calculated according to the inclination of the contour line when calculating the mark edge. The processing relating to the mark edge can be omitted, and in this case, there is no inconvenience in dropout detection.
[0061]
In the above-described embodiment, the information of the dropout registration list is synthesized on the bitmap image by the bitmap developing means 4 (step 108 in FIG. 4). By registering the edge, it is possible to directly register the dropout in the edge list, and a raster-based output device such as a display may be able to execute the output as it is without expanding it to a bitmap. Therefore, depending on the configuration, the bitmap developing means 4 is not required.
[0062]
Further, the edge list and the dropout registration list may be formed as table values on the RAM 12 or may be formed so as to be registered as bitmaps.
[0063]
【The invention's effect】
As described above, according to the present invention, the position of the edge of the adjacent step is registered as a mark edge based on the edge selected from the intersection of the contour line and the scanning line, and the positional relationship between the edge and the mark edge is determined. Since it is configured to detect and correct dropouts,
The dropout can be corrected at high speed only by scanning from one direction while keeping the possibility of causing deformation of the character to be drawn low.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to the present invention.
FIG. 2 is a block diagram illustrating an actual configuration of the image processing apparatus 10.
FIG. 3 is a diagram showing a method for determining a dropout section.
FIG. 4 is a flowchart (1) showing a flow of the operation of the image processing apparatus 10.
FIG. 5 is a flowchart (2) showing a flow of the operation of the image processing apparatus 10.
FIG. 6 is a flowchart (3) showing the flow of the operation of the image processing apparatus 10.
FIG. 7 is a flowchart (4) showing the flow of the operation of the image processing apparatus 10.
FIG. 8 is a diagram showing edges selected from intersections of scanning lines and contour lines.
FIG. 9 is a diagram showing contents of an edge list in which edges shown in FIG. 8 are sequentially registered.
FIG. 10 is a diagram showing mark edges registered in an edge list.
FIG. 11 is a diagram showing pixels registered in a dropout registration list.
FIG. 12 is a diagram showing a character “0” drawn based on an edge list and a dropout registration list.
FIG. 13 is a diagram illustrating edges selected when the inclination of the contour is −1 or less, or 1 or more.
FIG. 14 is a diagram showing an outline of a character and a bitmap obtained from the outline.
FIG. 15 illustrates a shape of a pixel.
FIG. 16 is a diagram showing a method for determining whether each pixel is inside or outside a contour line.
FIG. 17 is a diagram showing a scanning line and a sub-scanning line.
FIG. 18 is a diagram illustrating a drawing example of a character.
FIG. 19 is a diagram showing an edge registration method.
FIG. 20 is a diagram showing an example of occurrence of dropout.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Coordinate conversion means 2 Intersection / dropout detection means 3 Dropout determination means 4 Bitmap development means 10 Image processing device 11 CPU
12 RAM
13 ROM
14 External storage device 15 Video I / F (interface)
16 Frame buffer 17 Printer I / F (interface)

Claims (6)

描画する文字の輪郭線と走査線との交点から走査方向に最も近い画素をエッジとして選択し、前記走査線上のエッジ間の画素を反転することで該文字に対応する画像をビットマップ上に展開する画像処理方法において、
注目走査線上で第1のエッジを順次選択するとともに、該注目走査線に隣接する隣接走査線上で選択された第2のエッジのうち、前記第1のエッジと前記輪郭線上で隣接する第2のエッジを前記注目走査線に直交する方向に該注目走査線上に移動し、該移動した位置を該第1のエッジに対応するマークエッジとして設定し、
前記第1のエッジと前記マークエッジとに各々所定の値を割り当て、前記注目走査線上における前記所定の値を順次加算し、該加算結果に基づいて前記第1のエッジの1つである第3エッジと該第3のエッジとの対応が設定されたマークエッジとの間の領域と前記第1のエッジのうち前記第3のエッジとは別の第4のエッジと該第4のエッジに対応するマークエッジとの間の領域とが重なる領域を特定し、該重なる領域を画素抜けとして検出する
ことを特徴とする画像処理方法。
An image corresponding to the character is developed on a bitmap by selecting a pixel closest to the scanning direction from an intersection between the contour line of the character to be drawn and the scanning line as an edge and inverting pixels between edges on the scanning line. Image processing method,
The first edge is sequentially selected on the target scanning line, and the second edge selected on the adjacent scanning line adjacent to the target scanning line and the second edge adjacent on the contour line among the second edges selected on the adjacent scanning line are selected. Moving an edge on the target scanning line in a direction orthogonal to the target scanning line, setting the moved position as a mark edge corresponding to the first edge;
A predetermined value is assigned to each of the first edge and the mark edge, and the predetermined values on the scan line of interest are sequentially added. Based on the result of the addition, a third edge, which is one of the first edges, is added. A region between an edge and a mark edge in which the correspondence between the third edge is set, and a fourth edge different from the third edge and corresponding to the fourth edge among the first edges An image processing method comprising: identifying an area that overlaps with an area between a mark edge to be overlapped; and detecting the overlapped area as a missing pixel.
前記注目走査線が、x軸と該x軸に直交するy軸とで表されるxy平面上において前記x軸と平行であり、前記隣接走査線が、前記xy平面上において前記注目走査線よりもyの値が小さい場合には、
前記輪郭線の傾きが正であれば、前記第1のエッジに−1を割り当てるとともに前記マークエッジに1を割り当て、
前記輪郭線の傾きが負であれば、前記第1のエッジに1を割り当てるとともに前記マークエッジに−1を割り当て、
前記加算結果が2となった領域を前記重なる領域として検出する
ことを特徴とする請求項1記載の画像処理方法。
The scan line of interest is parallel to the x-axis on an xy plane represented by an x-axis and a y-axis orthogonal to the x-axis, and the adjacent scan line is more than the scan line of interest on the xy plane. Also, if the value of y is small,
If the inclination of the contour line is positive, -1 is assigned to the first edge and 1 is assigned to the mark edge,
If the inclination of the contour is negative, 1 is assigned to the first edge and -1 is assigned to the mark edge,
2. The image processing method according to claim 1, wherein an area where the addition result is 2 is detected as the overlapping area.
前記マークエッジの設定は、
前記輪郭線の傾きが−1より大きく、かつ、1より小さい場合に行うことを特徴とする請求項1または2に記載の画像処理方法。
The setting of the mark edge is as follows.
3. The image processing method according to claim 1, wherein the method is performed when the inclination of the contour is larger than -1 and smaller than 1.
描画する文字の輪郭線と走査線との交点から走査方向に最も近い画素をエッジとして選択し、前記走査線上のエッジ間の画素を反転することで該文字に対応する画像をビットマップ上に展開する画像処理装置において、
走査線上のエッジを選択するエッジ選択手段と、
前記エッジ選択手段が注目走査線上で選択したエッジを第1のエッジとするとともに、前記エッジ選択手段が前記注目走査線に隣接する隣接走査線上で選択したエッジを第2のエッジとし、前記第1のエッジと前記輪郭線上で隣接する第2のエッジを前記注目走査線に直交する方向に該注目走査線上に移動し、該移動した位置を該第1のエッジに対応するマークエッジとして設定するマークエッジ設定手段と、
前記第1のエッジと前記マークエッジとに各々所定の値を割り当て、前記注目走査線上における前記所定の値を順次加算し、該加算結果に基づいて前記第1のエッジの1つである第3エッジと該第3のエッジとの対応が設定されたマークエッジとの間の領域と前記第1のエッジのうち前記第3のエッジとは別の第4のエッジと該第4のエッジに対応するマークエッジとの間の領域とが重なる領域を特定し、該重なる領域を画素抜けとして検出する画素抜け判定手段と
を具備することを特徴とする画像処理装置。
An image corresponding to the character is developed on a bitmap by selecting a pixel closest to the scanning direction from the intersection of the contour line of the character to be drawn and the scanning line as an edge and inverting pixels between edges on the scanning line. Image processing apparatus,
Edge selection means for selecting an edge on the scanning line;
The edge selected by the edge selecting means on the target scanning line is set as a first edge, and the edge selected on the adjacent scanning line adjacent to the target scanning line by the edge selecting means is set as a second edge. A second edge adjacent to the edge of the contour line on the contour line is moved on the target scanning line in a direction orthogonal to the target scanning line, and the moved position is set as a mark edge corresponding to the first edge. Edge setting means;
A predetermined value is assigned to each of the first edge and the mark edge, and the predetermined values on the scan line of interest are sequentially added. Based on the result of the addition, a third edge, which is one of the first edges, is added. A region between an edge and a mark edge in which the correspondence between the third edge is set, and a fourth edge different from the third edge and corresponding to the fourth edge among the first edges An image processing apparatus comprising: a pixel omission determination unit configured to specify an area where an area between a mark edge and a target mark edge overlaps, and detect the overlapping area as a pixel omission.
前記注目走査線が、x軸と該x軸に直交するy軸とで表されるxy平面上において前記x軸と平行であり、前記隣接走査線が、前記xy平面上において前記注目走査線よりもyの値が小さい場合には、
前記画素抜け判定手段は、
前記輪郭線の傾きが正であれば、前記第1のエッジに−1を割り当てるとともに前記マークエッジに1を割り当て、
前記輪郭線の傾きが負であれば、前記第1のエッジに1を割り当てるとともに前記マークエッジに−1を割り当て、
前記加算結果が2となった領域を前記重なる領域として検出する
ことを特徴とする請求項4記載の画像処理装置。
The scan line of interest is parallel to the x-axis on an xy plane represented by an x-axis and a y-axis orthogonal to the x-axis, and the adjacent scan line is more than the scan line of interest on the xy plane. Also, if the value of y is small,
The pixel omission determining means,
If the inclination of the contour line is positive, -1 is assigned to the first edge and 1 is assigned to the mark edge,
If the inclination of the contour is negative, 1 is assigned to the first edge and -1 is assigned to the mark edge,
The image processing apparatus according to claim 4, wherein an area in which the addition result is 2 is detected as the overlapping area.
前記マークエッジ設定手段は、
前記輪郭線の傾きが−1より大きく、かつ、1より小さい場合に動作することを特徴とする請求項4または5に記載の画像処理装置。
The mark edge setting means,
The image processing apparatus according to claim 4, wherein the apparatus operates when the inclination of the contour is greater than −1 and less than 1.
JP07934898A 1998-03-26 1998-03-26 Image processing method and apparatus Expired - Fee Related JP3567728B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07934898A JP3567728B2 (en) 1998-03-26 1998-03-26 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07934898A JP3567728B2 (en) 1998-03-26 1998-03-26 Image processing method and apparatus

Publications (2)

Publication Number Publication Date
JPH11282450A JPH11282450A (en) 1999-10-15
JP3567728B2 true JP3567728B2 (en) 2004-09-22

Family

ID=13687407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07934898A Expired - Fee Related JP3567728B2 (en) 1998-03-26 1998-03-26 Image processing method and apparatus

Country Status (1)

Country Link
JP (1) JP3567728B2 (en)

Also Published As

Publication number Publication date
JPH11282450A (en) 1999-10-15

Similar Documents

Publication Publication Date Title
JP3433828B2 (en) Method and apparatus for edge improvement of pixel images
JPH0659665A (en) Image processing device
JP2876942B2 (en) Data converter
JP2634851B2 (en) Image processing device
JPH08194459A (en) Outline character plotting device
JP3567728B2 (en) Image processing method and apparatus
JP2770582B2 (en) Figure filling device
US6504543B1 (en) Polygon drawing method and polygon drawing apparatus
JP3416489B2 (en) Font processing device and recording medium recording font processing program
JP3567727B2 (en) Image processing method and apparatus
JP3603589B2 (en) Image processing method and apparatus
JP3350324B2 (en) Character output device
JPH0777969A (en) Font rasterising device and method thereof
JP3350325B2 (en) Character output device
JP2782752B2 (en) Character pattern output device
JP3139805B2 (en) Image processing method and apparatus
JP3879804B2 (en) Character / graphic processing unit
JPH0683968A (en) Picture processor
JP2005135272A (en) Information processing device and method
JP2000268181A (en) Graphic processing device and method
JPH06175637A (en) Method for generating character
JPH01205388A (en) Generation system for high quality character and graphic or the like
JP2000305550A (en) Half tone font generating device
JPH0319991B2 (en)
JP2002073001A (en) Quadrangle plotting method and apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040419

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040607

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees