JP3724868B2 - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP3724868B2
JP3724868B2 JP01603896A JP1603896A JP3724868B2 JP 3724868 B2 JP3724868 B2 JP 3724868B2 JP 01603896 A JP01603896 A JP 01603896A JP 1603896 A JP1603896 A JP 1603896A JP 3724868 B2 JP3724868 B2 JP 3724868B2
Authority
JP
Japan
Prior art keywords
change point
white
coordinate
image
candidate
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 - Lifetime
Application number
JP01603896A
Other languages
Japanese (ja)
Other versions
JPH09214752A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP01603896A priority Critical patent/JP3724868B2/en
Publication of JPH09214752A publication Critical patent/JPH09214752A/en
Application granted granted Critical
Publication of JP3724868B2 publication Critical patent/JP3724868B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ソフトウエアにより2値イメージを扱うシステムにおいて、イメージの縮小等の処理を行なうイメージ処理方法に関する。
【0002】
【従来の技術】
従来、イメージ処理用の専用のハードウェアが設けられていないシステムでは、ソフトウェアによりイメージ処理の機能が実現されている。こうした、システムにおいて、イメージデータを圧縮することによって得られた圧縮データから、元のイメージを縮小した縮小イメージデータを生成する場合には、伸張処理と縮小処理とを組み合わせたイメージ編集処理が必要となる。
【0003】
すなわち、伸張処理によって圧縮データから作業メモリ上にイメージ全体のイメージデータを展開し、次に縮小処理によって作業メモリ上に展開したイメージデータを所定の縮小倍率に応じて縮小して縮小イメージデータを生成している。
【0004】
また、従来の縮小処理では、文字や図形等を含むイメージデータに対しては、文字や図形を構成する線の消失やかすれを防ぐためにOR処理方式を採用している。
【0005】
例えば、図18に示すように、22ドットのイメージデータ(入力イメージ)に対して、7ドットの縮小イメージデータを得るようなOR縮小方式では、DDA(Differential Digital Analaizer)を使用してキャリーパターンを発生させ、キャリー発生位置の右隣の画素から次のキャリーが発生するまでの画素をOR演算し、キャリー個数分(7個)の画素を出力する。
【0006】
ここで、DDAの動作原理について簡単に説明する。図19はDDAのキャリーパターンの生成過程を示す。倍率をN/M(N<M)にすると、初期値とスケール値を次のようにして求める。但し、 divは整数除算、 modは整数除算の余りを示す。
【0007】
スケール値=(10000H×N)div M
初期値 =(10000H×N)mod M
22ドットのイメージを7ドットのイメージに縮小する例では、上式の演算に従うとスケール値=5174H、初期値=0008Hとなる。
【0008】
DDAでは、図19に示すように、まずカレント値に初期値0008Hをセットし、スケール値5174Hを加算する。アダーのビット幅を16ビットとし、アダーの出力に対してスケール値を加算する。以下、データの個数分となるまで、順次、アダーの出力に対してスケール値を加算していき、この間に発生したキャリーパターンを出力画素を決める為に使用する。すなわち、OR演算の対象とする画素の範囲を求める。
この結果、図18に示すように、入力イメージに対するキャリー発生位置に応じたOR縮小の結果は、全ての画素が黒となる。
【0009】
【発明が解決しようとする課題】
このように従来のイメージ処理方法では、圧縮データをもとに縮小イメージデータを生成するために、伸張処理と縮小処理とを組み合わせてイメージ編集する場合、伸張時間と縮小処理とを逐次実行しなければならない。従って、最終的な縮小イメージを得るための時間が、伸張時間分と縮小処理時間分とを要すため、作業応答性が悪くなっていた。
【0010】
また、従来の縮小処理ではOR処理方式を採用することによって、文字や図形を構成する線の消失やかすれを防ぐことができたが、原理上、縮小倍率が大きくなると文字や図形の部分で黒潰れが発生してしまい、著しくイメージの品質が低下してしまうことがあった。
【0011】
本発明は前記のような事情を考慮してなされたもので、伸張処理と縮小処理とを組み合わせた処理でも高速にイメージ処理ができ、かつ画質劣化の少ない縮小結果を提供することが可能なイメージ処理方法を提供することを目的とする。
【0012】
【課題を解決するための手段】
本発明は、イメージデータの主走査方向における白画素及び黒画素への変化点座標列に対し、縮小倍率に応じた縮小後の変化点座標列を求め、この求められた変化点座標列中の変化点座標について、それぞれ直前の変化点座標との距離を求め、前記変化点座標列のそれぞれの変化点座標を、求められた距離が0より大きく、かつ白画素への変化点座標である場合に、白画素への変化点候補とし、求められた距離が0より大きくない場合に、直前の変化点座標に対応する白画素への変化点候補を無効とし、求められた距離が0より大きく、かつ黒画素への変化点座標であり、かつ白画素への変化点候補が存在する場合に、黒画素への変化点座標とすると共に、白画素の変化点候補を白画素への変化点座標とし、求められた距離が1より大きく、かつ黒画素への変化点座標であり、かつ白画素への変化点候補が存在しない場合に、黒画素への変化点座標とすると共に、直前の変化点座標に所定の座標値を加えた上で白画素への変化点座標とすることを特徴とする。
【0013】
また本発明は、イメージデータの主走査方向における白画素及び黒画素への変化点座標列からなる第1変化点テーブルと、前記第1変化テーブルの副走査方向への次のラインの変化点座標列からなる第2変化点テーブルに対し、何れかの変化点テーブル中の黒画素への変化点位置が小さい変化点座標を注目変化点とすると共に変換後の黒画素への変化点座標とし、注目変化点の右側にある最初の白画素への変化点を白変化点候補とし、注目変化点のある変化点テーブルの反対側の変化点テーブルで、変化点座標値が白変化点候補以上となる変化点を検出し、検出した変化点が白変化点候補と同じ座標位置にあり、その色が白画素への変化点であった場合、または白変化点候補を越える座標位置にあり、その色が黒画素への変化点であった場合に、白変化点候補を変換後の白画素への変化点座標とし、検出した変化点が白変化点候補と同じ座標位置にあり、その変化点の色が黒画素への変化点であった場合、この変化点を注目変化点とし、その右側にある最初の白画素への変化点を白変化点候補とし、検出した変化点が白変化点候補を越える座標位置にあり、その変化点の色が白画素への変化点であった場合、白変化点候補の位置を注目変化点とし、この検出した変化点を白変化点候補とし、注目変化点または白変化点候補がライン終端であるかを判定し、ライン終端である場合、白変化点候補を変換後の白画素への変化点座標とすることを特徴とする。
【0014】
また本発明は、イメージデータの主走査方向における白画素及び黒画素への変化点座標列から順次読み出され変化点座標のそれぞれを所定の値で除算し商と余り値を求め、この変化点座標のそれぞれについて求めた商と、この商に対応する変化点座標の直前の変化点座標に対して求めた商との差をそれぞれ求め、この求めた差の値が0の時に、所定の値に達しない変化点座標に対するイメージパターンを前記余り値に応じて求め、求めた差の値が1以上の時に、所定の値に達しない変化点座標に対して求めた前記イメージパターンを変換結果のイメージパターンとして出力し、さらに求めた差に応じた白画素または黒画素が連続するイメージパターンを変換結果のイメージパターンとして出力することを特徴とする。
【0015】
また本発明は、イメージデータを符号化して得られる圧縮データをもとに、縮小処理を施したイメージを生成するイメージ処理方法において、圧縮データから白画素及び黒画素への変化点座標列を生成し、この生成された変化点座標列をもとにしたイメージ縮小方法により、副走査方向に対して縮小した変化点座標列を生成し、変化点座標列をもとにしたイメージ縮小方法により、主走査方向に対して縮小した変化点座標列を生成し、この生成した変化点座標列をもとにしたデータ変換方法により、イメージデータを生成し、以上の処理を1画面分実行することで、圧縮データから縮小後のイメージデータを生成することを特徴とする。
【0016】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態について説明する。図1は、本実施形態に係わるイメージ処理方法を実現するシステムの構成を示すブロック図である。図1に示すように本システムは、CPU10、RAM12、VRAM14、ROM16、入力装置18、入力制御部20、表示装置22、表示制御部24、記憶装置26、記憶制御部28によって構成されている。
【0017】
CPU10は、装置全体の制御を行なうもので、RAM12、VRAM14、ROM16をアクセスして入力指示に従うプログラムの起動で、本発明によるイメージ処理方法の機能を実現する。
【0018】
RAM12は、CPU10の動作を決定する各種処理プログラムが格納されたプログラム領域12aをはじめ、イメージ処理を行なう際に使用される各種変数、テーブル、処理対象とする変化点座標データ等を格納するための作業メモリとしてのワーク領域12b等が設けられている。
【0019】
VRAM14は、表示装置22において表示すべき表示データを展開するための領域である。VRAM14に展開された表示データは、表示制御部24によって読み出され、表示装置22における表示に供される。
【0020】
ROM16は、CPU10の動作を決定する各種処理プログラムが格納されたプログラム領域16a、各種データを格納するためのデータ領域16b等が設けられている。
【0021】
入力装置18は、キーボードまたはマウス等によって構成され、システムに対する指示を入力する。
表示装置22は、例えば液晶ディスプレイによって構成され、表示制御部24の制御のもとに表示を行なう。表示制御部24は、表示装置22における表示を制御するもので、VRAM14に格納された表示データを読み込み、表示装置22における表示に供する。
【0022】
記憶装置26は、処理対象とするイメージデータを符号化して得られる圧縮データ、変化点座標データ、イメージデータ等を格納する。記憶制御部28は、記憶装置26に対するデータ等の入出力制御を行なう。
【0023】
次に、本発明の第1実施形態に係わるイメージ処理方法におけるデータ縮小方法について説明する。
図2及び図3は第1実施形態のデータ縮小方法を説明するためのフローチャートである。第1実施形態のデータ縮小方法では、イメージデータの主走査方向における白及び黒への変化点座標情報をもとに主走査方向に縮小処理を行なう。
【0024】
ステップA1は、イメージデータの1ライン目の処理を開始する前に行う初期化処理であり、縮小倍率(SCALEX)の設定と変倍後の変化点座標をセットする変数を初期化するステップである。
【0025】
ステップA2は、縮小後の変化点検索のための初期化処理であり、直前に検出した変化点座標(REG_SCALE_POS)をセットし、変化点検出フラグ、すなわち白画素から黒画素への変化点を検出したことを示すフラグ(BLACK_FOUND)、及び黒画素から白画素への変化点を検出したことを示すフラグ(WHITE_FOUND)を無効にするステップである。
【0026】
ステップA3は、ラスタ走査方向に順次読み出された変化点座標(CRNT_POS)に対し縮小倍率(SCALEX)を乗算し、その値をカレントの変化点演算値(SCALE_POS)とするステップである。
【0027】
ステップA4は、カレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)を求めるステップである。
【0028】
ステップA5は、ステップA4で求めた差(DIST_POS)が0より大きいか否かを判定するステップである。
ステップA6は、カレントの変化点演算値の色(COLOR)が黒画素への変化点か否かを判定するステップである。
【0029】
ステップA7は、白画素への変化点検出フラグ(WHITE_FOUND)が有効であるか否かを判定するステップである。
ステップA8は、差(DIST_POS)が1より大きいか否かを判定するステップである。
【0030】
ステップA9は、白画素から黒画素への変化点を検出した時のステップであり、変化点検出処理、すなわちカレントの変化点演算結果(SCALE_POS)を白から黒への変化点座標(AVL_SCALE_POSB)とし、直前に決定した変化点座標(REG_SCALE_POS)を黒から白への変化点座標(AVL_SCALE_POSW)として確定する処理を実行する。また、変化点が検出されたことを示す各々の変化点検出フラグ(WHITE_FOUND)、(BLACK_FOUND)を有効(TRUE)にする。
【0031】
ステップA10は、黒画素への変化点を検出し、直前の縮小演算処理で消失した白画素への変化点を復活させる処理であり、カレントの変化点演算結果(SCALE_POS)を白から黒への変化点座標(AVL_SCALE_POSB)とし、直前に決定した変化点座標(REG_SCALE_POS)+1を、白画素への変化点座標(AVL_SCALE_POSW)として確定する。また、変化点が検出されたことを示す各々の変化点検出フラグ(WHITE_FOUND)、(BLACK_FOUND)を有効(TRUE)にする。
【0032】
ステップA11は、黒画素から白画素への変化点候補を検出した時のステップであり、カレントの変化点演算結果(SCALE_POS)を直前に決定した変化点座標(REG_SCALE_POS)とする。また、白画素への変化点検出フラグ(WHITE_FOUND)を有効にし、次の黒画素への変化点を検出するためにステップA3のステップに戻る。
【0033】
ステップA12は、白への変化点検出結果を無効にするステップであり、白への変化点検出フラグ(WHITE_FOUND)を無効(FALSE)にする。
ステップA13は、ライン終端を検出するステップである。
【0034】
ステップA14は、変化点を検索中にライン終端に到達した時のステップであり、白画素への変化点座標(AVL_SCALE_POSW)を縮小後のライン終端座標の右側に置く。
【0035】
以上ステップA2からステップA14までの処理を、一画面のライン分が終了するまで繰り返すことにより、一画面分のイメージ縮小後の変化点座標が求められる。
【0036】
次に、具体例を用いながら第1実施形態におけるデータ縮小処理の動作について説明する。
図4は、縮小倍率(SCALEX)を2/3とした時の、入力データとする変化点座標(CRNT_POS)列に対する縮小後の変化点座標(AVL_SCALE_POSB)(AVL_SCALE_POSW)を算出する過程を示すものである。
【0037】
イメージ縮小処理の対象(入力データ)は、図4(b)に示す変化点座標(CRNT_POS)列、すなわち図4(a)に示すイメージパターンの圧縮データである。また、イメージパターンは変化点座標(座標位置0,1,…)が示すビットパターンを表すものである。
【0038】
変化点座標(CRNT_POS)は、黒画素への変化点座標から始まり、次に黒画素から白画素への変化点座標が続き、以降ライン終端まで交互に並ぶ。ただし、変化点座標(CRNT_POS)のライン終端値を、イメージパターンのライン終端の座標の右側に設けた仮想変化点の値とする。
【0039】
まず、入力となる変化点座標(CRNT_POS)をステップA1で設定された縮小倍率(2/3)で乗算し、カレントの変化点演算値(SCALE_POS)を求める。(ステップA3)。例えば、CRNT_POS=3、COLOR=黒の変化点座標に対しては、カレントの変化点演算値(SCALE_POS)=2が求められる(図4(c)参照)。
【0040】
次に、ステップA4により、カレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)を求める。例えば、カレントの変化点演算値が4(SCALE_POSの第2番目、COLOR=白)であった場合、直前に検出した変化点座標は2であるため、その差(DIST_POS)は2となる。
【0041】
次に、カレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)が0より大きいか否かを判定する(ステップA5)。図4(c)の第2番目の(SCALE_POS)を対象としている場合には、DIST_POS>0となる。
【0042】
この場合、カレントの変化点演算値の色(COLOR)が黒であるか否かを判定する(ステップA6)。この例では、COLOR=白であるため、ステップA11に移行する。
【0043】
ステップA11では、変化点(SCALE_POS)を、黒画素から白画素への変化点候補として直前に検出した変化点座標(REG_SCALE_POS)に保存し、変化点検出フラグ(WHITE_FOUND)を有効にする。この時点では、あくまでも変化点の候補であり、次の変化点演算結果により確定される。
【0044】
ここで、ライン終端に処理が達していなければ、次の黒画素への変化点を検出するためにステップA3のステップに戻る(ステップA13)。
この例では、次の変化点座標(CRNT_POS)=9に対するカレントの変化点演算値(SCALE_POS)は6であり、DIST_POS>0かつCOLOR=黒であり、さらに前の変化点座標の処理で変化点検出フラグ(WHITE_FOUND)を有効としているため(ステップA5,A6,A7)、ステップA9が実行される。
【0045】
ここで、ステップA9では、白画素から黒画素への変化点が検出されたため、変化点検出処理を実行する。すなわち、カレントの変化点演算結果(SCALE_POS)を白から黒への変化点座標(AVL_SCALE_POSB)とし、またステップA11において設定されている、直前に検出された黒画素から白画素への変化点座標(REG_SCALE_POS)を黒から白への変化点座標(AVL_SCALE_POSW)として確定する。さらに、各変化点検出フラグ(WHITE_FOUND)(BLACK_FOUND)も有効(TRUE)にする。
【0046】
次に、ステップA4において求められるカレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)=0の場合について説明する。
【0047】
図4(b)に示す例では、変化点座標(CRNT_POS)が12(第4番目)から13(第5番目)になる時に、図4(c)に示すように、SCALE_POSの値が共に8になり、DIST_POS=0の条件が成立する。
【0048】
変化点座標(CRNT_POS)が13の時点で、DIST_POS>0、すなわちDIST_POS=0であることが判定される。ここでは、WHITE_FOUND=TRUEとなっており、かつCOLOR=黒であるため、直前で検出した白への変化点を無効にする(ステップA12)。
【0049】
この処理によって、カレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)=0の場合、すなわち同じ画素位置において白、黒の両方を示す演算結果が得られた際に、縮小後のイメージパターンに黒画素を優先的に残す。
【0050】
次に、変化点を検索中にライン終端に到達した時の動作を説明する。図4の例では、変化点座標(CRNT_POS)の値が22のとき、DIST_POS>0かつCOLOR=白のため(ステップA5,A6)、白画素への変化点候補を検出した時の処理(ステップA11)を実行する。
【0051】
この時、変化点座標(CRNT_POS)はライン終端であるため(ステップA13)、次の黒画素への変化点を検索する処理に移行せずライン終端処理を実行する(ステップA14)。すなわち、白の変化点座標(AVL_SCALE_POSW)を縮小後のライン終端座標の右側に置く。
【0052】
こうして図4(b)に示す変化点座標(CRNT_POS)列に対する縮小後の変化点座標(白から黒への変化点座標(AVL_SCALE_POSB)と黒から白への変化点座標(AVL_SCALE_POSW))とが図4(d)に示すようにして得られる。図4(d)に示す縮小後の変化点座標列に対応するイメージパターンは図4(e)に示すようになる。
【0053】
次に、ステップA10の縮小演算処理における、消失した白画素への変化点を復活させる処理を図5を用いて説明する。
図5は、縮小倍率(SCALEX)を1/3とした時の、入力データとする変化点座標(CRNT_POS)列に対する縮小後の変化点座標(AVL_SCALE_POSB)(AVL_SCALE_POSW)を算出する過程を示すものである。
【0054】
縮小倍率を1/3に設定した場合、図5(b)に示す変化点座標(CRNT_POS)列に対して、図4を用いて説明したようにして順次処理を進めていくと、変化点座標(CRNT_POS)=12に対しては以下のように処理が施される。
【0055】
まず、変化点座標(CRNT_POS)=12に対して縮小倍率(1/3)を乗算し、カレントの変化点演算値(SCALE_POS)=4(COLOR=白)を求める(ステップA3)。
【0056】
この場合、カレントの変化点演算値(SCALE_POS)=4と直前に検出した変化点座標(REG_SCALE_POS)=3との差(DIST_POS)=1となるので、ステップA5,A6により、ステップA11の処理に移行する。
【0057】
ステップA11では、変化点(SCALE_POS)=4を黒画素から白画素への変化点候補として直前に検出した変化点座標(REG_SCALE_POS)に保存し、変化点検出フラグ(WHITE_FOUND)を有効にする。
【0058】
次に、変化点座標(CRNT_POS)=13に対する処理では、カレントの変化点演算値(SCALE_POS)=4(COLOR=黒)となる。従って、ステップA4において、カレントの変化点演算値(SCALE_POS)=4と直前に検出した変化点座標(REG_SCALE_POS)=4との差(DIST_POS)=0となるため、ステップA12において、先のステップA11において有効にした変化点検出フラグ(WHITE_FOUND)を無効とする。
【0059】
また、変化点座標(CRNT_POS)=14に対する処理においても、カレントの変化点演算値(SCALE_POS)=4(COLOR=白)となるため、変化点座標(CRNT_POS)=13に対する処理と同様に、ステップA4において、カレントの変化点演算値(SCALE_POS)=4と直前に検出した変化点座標(REG_SCALE_POS)=4との差(DIST_POS)=0となる。
【0060】
次に、変化点座標(CRNT_POS)=18に対する処理では、カレントの変化点演算値(SCALE_POS)=6(COLOR=黒)となる。従って、ステップA4において、カレントの変化点演算値(SCALE_POS)=6と直前に検出した変化点座標(REG_SCALE_POS)=4との差(DIST_POS)=2となるため、DIST_POS>1かつCOLOR=黒の条件が成立する(ステップA5,A6)。さらに、先の変化点座標(CRNT_POS)に対する処理の際に、ステップA12において、変化点検出フラグ(WHITE_FOUND)を無効としており、さらにカレントの変化点演算値(SCALE_POS)と直前に検出した変化点座標(REG_SCALE_POS)との差(DIST_POS)=2であるため、ステップA10の処理に移行する(ステップA7,A8)。
【0061】
ステップA10では、直前の縮小演算処理で消失した白画素への変化点を復活させる。すなわち、カレントの変化点演算結果(SCALE_POS)を白から黒への変化点座標(AVL_SCALE_POSB)とし、直前に決定した変化点座標(REG_SCALE_POS)+1を、白画素への変化点座標(AVL_SCALE_POSW)として確定する。
【0062】
ここでは、カレントの変化点演算結果(SCALE_POS)=6であるので白から黒への変化点座標(AVL_SCALE_POSB)=6とし、一方、直前に決定した変化点座標(REG_SCALE_POS)=4であるので、白画素への変化点座標(AVL_SCALE_POSW)=5として白画素への変化点を復活させる。また、変化点検出フラグ(WHITE_FOUND)(BLACK_FOUND)を有効(TRUE)にする。
【0063】
以下、残りの変化点座標(CRNT_POS)に対して、前述と同様にして処理を施す。
こうして図5(b)に示す変化点座標(CRNT_POS)列に対する縮小後の変化点座標(白から黒への変化点座標(AVL_SCALE_POSB)と黒から白への変化点座標(AVL_SCALE_POSW))とが図5(d)に示すようにして得られる。図5(d)において、黒から白への変化点座標(AVL_SCALE_POSW)=5が復活された変化点である。図5(d)に示す縮小後の変化点座標列に対応するイメージパターンは図5(e)に示すようになる。
【0064】
このようにして、イメージデータの主走査方向における縮小処理を行なう際に、白及び黒への変化点座標情報をもとに行なうので、作業メモリ上でのイメージデータの展開が不要となり、データ転送量を減少させることができ高速なイメージ処理が可能となる。特に、図形や文字等を含むイメージにおいては、白(空白)の領域が少ない場合には、縮小処理における演算量とメモリアクセス量が減るため、大幅なイメージ処理の高速化が可能である。
【0065】
さらに、縮小後のイメージパターンに黒画素を優先的に残し、かつ白画素の消失が最小限になるような変化点座標(AVL_SCALE_POSB)(AVL_SCALE_POSW)を生成するので、図面や文字を含むイメージであっても、図形や文字等を構成する線の掠れや消失を防ぐことができ、高品質な縮小処理が可能となる。
【0066】
次に、本発明の第2実施形態に係わるイメージ処理方法におけるデータ縮小方法を、図6及び図7に示すフローチャートを参照しながら説明する。第2実施形態におけるデータ縮小方法は、図8に示すように、イメージデータの主走査方向における白及び黒への変化点座標情報が格納される入力変化点テーブルをもとに副走査線方向に対して縮小処理を行なう。
【0067】
図8(a)には、2ライン分の変化点テーブル(各ラインの変化点座標列)をもとに、OR縮小により1ライン分の変化点テーブル(縮小後の変化点座標列)を生成する例を示している。図8(b)は、直観的に分かるように図8(a)に示す変化点座標をイメージパターンに置き換えたものである。
【0068】
本実施形態では、変化点テーブルA/Bにおける変化点の相対的な位置関係をもとに、図6及び図7に示すフローチャートの手順に従ってOR処理後の変化点座標を抽出する。
【0069】
ステップB1は、初期化処理であり、縮小後の変化点を格納するメモリエリアを2ライン分(読みだし用バンク及び書き込み用バンク)確保し、この縮小変化点テーブル及び縮小後の変化点検出に使用する変数を初期化するステップである。
【0070】
ステップB2は、以降のステップで使用する注目変化点C1、白変化点候補C2が検出されているか否かを判断するステップである。
ステップB3は、変化点C1、C2を検出するステップであり、入力変化点テーブルと読みだし用縮小変化点テーブルの内、黒画素への変化点位置が小さい方を注目変化点(C1)として書き込み用縮小変化点テーブルに登録し、注目変化点の右側にある最初の白画素への変化点を白変化点候補(C2)とするステップである。
【0071】
ステップB4は、変化点テーブル中の変化点がライン終端に到達したか否かを判定するステップである。
ステップB5は、注目変化点C1の反対側のラインで、座標値が白変化点候補(C2)以上となる変化点(CX)を検索するステップである。
【0072】
ステップB6は、ステップB5で検出した変化点CXが条件aまたは条件c(条件a,cの詳細については図9、図10を用いて後述する)を満たすか否か判定するステップである。
【0073】
ステップB7は、条件aまたは条件cが成立した時の処理であり、白変化点候補C2を縮小変化点テーブルに登録する。また、次の注目変化点C1、白変化点候補C2を検出するために(C1C2_FOUND)フラグを無効にする。
【0074】
ステップB8は、ステップB5で検出した変化点CXが条件b(条件bの詳細については図11を用いて後述する)を満たしているか否かを判定するステップである。
【0075】
ステップB9は、条件bが成立した時の処理であり、変化点CXを注目変化点C1とし、その右側にある最初の白画素への変化点を白変化点候補(C2)とする。
【0076】
ステップB10は、条件a、条件b、条件c以外の場合の処理であり、変化点CXが白変化点候補(C2)を越える座標位置にあり、その変化点の色が白画素への変化点であったケースに該当する。この場合、白変化点候補(C2)の位置を注目変化点(C1)とし、この検出した変化点(CX)を白変化点候補(C2)とする。
【0077】
ステップB11,B12,B13は、注目変化点(C1)、または白変化点候補(C2)がライン終端であるかを判定し、ライン終端である場合、白変化点候補C2を縮小変化点テーブルに登録し、ライン終端でない場合、さらに座標値が白変化点候補C2以上となる変化点を検出するために(C1C2_FOUND)フラグを有効にする。
【0078】
ステップB14、B15は、入出力イメージのライン数情報から出力すべき縮小変化点テーブルを選択するステップである。出力する場合は、ステップB1において変化点テーブルが初期化されるように(CLR_TBL)フラグを有効にする。
【0079】
ステップB16、B17は、1画面分の処理を終了したか判断し、終了していない場合は、縮小変化点テーブルのバンクを切替え、ステップB1の処理を繰り返すステップである。
【0080】
次に、第2実施形態におけるデータ縮小処理の動作について説明する。
まず、縮小後の変化点を格納するエリアを2ライン分(読みだし用、書き込み用)確保し、この縮小変化点テーブル及び縮小後の変化点検出に使用する変数を初期化する(ステップB1)。
【0081】
次に、以降のステップで使用する注目変化点(C1)、白変化点候補(C2)が検出されているか否か、すなわち(C1C2_FOUND)フラグが有効(TRUE)となっているかを判断する(ステップB2)。注目変化点C1、白変化点候補C2は、変化点テーブルA(1ライン目)から抽出されるもので、ここで抽出されていなければステップB3に移行する。
【0082】
ステップB3では、入力変化点テーブルと読みだし用縮小変化点テーブルの内、黒画素への変化点位置が小さい方を注目変化点(C1)として書き込み用縮小変化点テーブルに登録し、注目変化点の右側にある最初の白画素への変化点を白変化点候補(C2)とする。
【0083】
図8に示す例において、入力変化点テーブルを変化点テーブルAとし、読みだし用変化点テーブルを変化点テーブルBとした場合、注目変化点(C1)が変化点テーブルAにある1(1番目の変化点)であり、白変化点候補(C2)はその右側にある7(2番目の変化点)となる。また、注目変化点(C1)については、2ラインのOR縮小結果として確定するため、書き込み用縮小変化点テーブルに登録する(図8に示す変化点テーブルAの1番目の変化点1)。
【0084】
次に、処理がラインの終端に達していなければ、注目変化点(C1)が検出されたラインの反対側のライン(読みだし用変化点テーブルである変化点テーブルB)から、座標値が白変化点候補(C2)以上となる変化点(CX)を検索する(ステップB5)。図8に示す例では、変化点テーブルBの8(5番目の変化点)が変化点(CX)となる。
【0085】
ここで、検出した変化点(CX)が条件aまたは条件cを満たすか否か判定する(ステップB6)。
条件aは、変化点(CX)が白変化点候補(C2)と同じ位置にあり、その色が白の変化点であった場合を意味する。図9には条件aが成立するケースを示している(2ライン目の4番目の変化点7が変化点(CX))。なお、実際は変化点テーブル上で処理しているが、ここでは直観的に理解しやすいようにイメージパターンで示している。
【0086】
また条件cは、変化点(CX)が白変化点候補(C2)を越える座標位置にあり、その色が黒画素への変化点であった場合を意味する。図10には条件cが成立するケースを示している(2ライン目の5番目の変化点8が変化点(CX))。
【0087】
どちらかの条件が成立すればステップB7の処理に移行する。ステップB7では、白変化点候補C2を書き込み用縮小変化点テーブルに登録する。図8に示す例では条件cが成立するので、白変化点候補C2の変化点、すなわち2番目の変化点7を書き込み用縮小変化点テーブルに登録する。また、次のC1、C2を検出するために(C1C2_FOUND)フラグを無効(FALSE)にし、ステップB2に戻る。
【0088】
ステップB2では(C1C2_FOUND)フラグが無効(FALSE)となっているため、次の変化点(C1)(C2)を検出するステップB3の処理に移行する。図8に示す例においては、読みだし用縮小変化点テーブルである変化点テーブルBの5番目の変化点8を注目変化点(C1)、変化点テーブルBの6番目の変化点9を白変化点候補C2として検出される(ステップB3)。(なお、図9、図10においては、次の変化点(C1)(C2)を(C1´)(C2´)で表している。)
次に、ステップB5では、注目変化点C1の反対側のラインで、座標値が白変化点候補(C2)以上となる変化点(CX)として、入力変化点テーブルの変化点テーブルAの4番目の変化点10を検出する。
【0089】
この場合、変化点(CX)は条件a、条件cの何れも満たさないため(ステップB6)、ステップB8の処理に移行して条件bを満たすか否かを判定する。
条件bは、変化点(CX)が白変化点候補(C2)と同じ位置にあり、その色が黒への変化点であった場合を意味する。
【0090】
図11には条件bが成立するケースを示している。条件bは、変化点(CX)が白変化点候補(C2)と同じ位置にあり、その色が黒への変化点であった場合を意味している。
【0091】
図8に示す例では、白変化点候補(C2)(変化点テーブルBの7番目の変化点9)と、変化点(CX)(変化点テーブルAの3番目の変化点9)とが同じ位置にあるので条件bが成立する。
【0092】
条件bが成立した場合、変化点(CX)を注目変化点(C1)とし、その右側にある最初の白画素への変化点を白変化点候補(C2)とする(ステップB9)。
【0093】
図11に示す例では、新しい注目変化点が(C1´)、白変化点候補が(C2´)のようになる。この場合、白変化点候補(C2)が注目変化点(C1´)の黒への変化点に潰されるため、縮小変化点テーブルには登録しない。
【0094】
なお、条件bを満たさない場合、すなわち条件a、条件b、条件c以外の場合には、白変化点候補(C2)の位置を注目変化点(C1)とし、検出した変化点(CX)を白変化点候補(C2)とする(ステップB10)。
【0095】
図12に条件a,b,cの何れも満たさないその他のケースを示している。図12の例では新しい注目変化点が(C1´)、白変化点候補が(C2´)のようになる。条件bの時と同様に、ここでも白変化点候補(C2)が変化点(C1´)の黒への変化点に潰されるため、縮小変化点テーブルには登録しない。
【0096】
ステップB9(またはB10)の処理が終了すると、注目変化点(C1)、または白変化点候補(C2)がライン終端であるかを判定する(ステップB11)。ライン終端でない場合には、さらに座標値が白変化点候補(C2)以上となる変化点を検出するために(C1C2_FOUND)フラグを有効(TRUE)にして、ステップB2の処理に戻る。
【0097】
一方、ライン終端である場合、白変化点候補C2を書き込み用縮小変化点テーブルに登録する(ステップB12)。なお、ステップB4において、変化点テーブル中の変化点がライン終端に到達したことが判定された場合にも、ステップB12を実行する。
【0098】
次に、入出力イメージのライン数情報から出力すべき縮小変化点テーブルを選択する(ステップB14)。例えばDDAのキャリー発生条件により実現できる。つまり、1ライン毎にDDAを作動させ、DDAのキャリーが発生した時の書き込み用縮小変化点テーブルを出力すれば良い。
【0099】
また、書き込み用縮小変化点テーブルを出力する場合は、変化点テーブルを初期化することを示す(CLR_TBL)フラグを有効(TRUE)にする(ステップB15)。これにより、ステップB1において縮小変化点テーブルが初期化される。
【0100】
ここで、1画面分の処理を終了したか判断し(ステップB16)、終了していない場合は、縮小変化点テーブルのバンクを切替え、ステップB1の処理に戻り、前述した処理を繰り返す。
【0101】
このようにして、イメージデータの副走査方向における縮小処理を行なう際に、各ラインの白及び黒への変化点座標情報が格納された変化点テーブルをもとにOR縮小変化点情報を求めるので、第1実施形態の場合と同様にして、作業メモリ上でのイメージデータの展開が不要となり、データ転送量を減少させることができ高速なイメージ処理が可能となる。
【0102】
次に、本発明の第3実施形態に係わるイメージ処理方法におけるデータ変換方法を、図13に示すフローチャートを参照しながら説明する。第3実施形態におけるデータ変換方法は、図16に示すように、イメージデータの白及び黒への変化点座標情報からなる変化点データ列をもとにイメージデータを生成する。
【0103】
ステップC1は、初期化処理を実行するステップであり、直前の変化点演算結果の初期化を行う。
ステップC2は、直前の変化点座標に対する演算結果を(BYTELEN_OLD)に保存し、入力変化点の座標を所定の値で除算した商と余りを求めるステップである。
【0104】
ステップC3は、ステップC2で求めた変化点座標のバイトレングス(BYTELEN)と直前の値(BYTELEN_OLD)との差を求め、これを(FILL_NO)に保持するステップである。
【0105】
ステップC4は、ステップC3で求めた(FILL_NO)が1以上であるか否かを判定するステップである。
ステップC5は、カレント変化点の色が黒か否かを判定するステップ。
【0106】
ステップC6,C7は、バイトレングスの端数値(BITPAT_NO)とカレント色(COLOR)をアドレスとし、イメージ変換テーブルを参照し、端数部のイメージパターン(BITPAT_REG)を求めるステップであり、カレント色が黒の場合、(BITPAT_REG)とイメージ変換テーブルの出力をOR演算し、(BITPAT_REG)に代入する。
【0107】
一方、カレント色が白の場合、(BITPAT_REG)とイメージ変換テーブルの出力をANDした結果を(BITPAT_REG)に代入する。
ステップC8は、ステップC4の判定で(FILL_NO)が1以上の場合、実行されるステップであり、ステップC6、C7で生成した端数部のイメージパターン(BITPAT_REG)を出力イメージ領域に転送するステップである。また、(BITPAT_REG)をステップC2で求めた(BITPAT_NO)に対応するイメージパターンで初期化する。
【0108】
ステップC9は、1バイト(ここでは8ビット)で構成される白または黒のイメージを(FILL_NO)−1回分出力イメージ領域に転送するステップである。
【0109】
ステップC10,C11は、ライン終端、1画面終了を判定するステップであり、1画面分の変化点情報をイメージに変換するまでラスタ走査方向に順次処理を実行するための終了判定である。
【0110】
次に、第3実施形態におけるデータ変換方法の動作について、図14、図15、図16に示す具体例を用いながら説明する。
図14(b)に示す入力変化点データが入力データとなる。図14(b)の変化点座標列に対応するイメージデータを、図14(a)に示している。
【0111】
まず、直前の変化点演算結果の初期化を行なった後、直前の演算結果を(BYTELEN_OLD)に保存し、入力データの変化点座標を所定の値で除算した商(バイトレングス(BYTELEN))と余り(BITPAT_NO)を求める(ステップC1,C2)。本実施形態では、所定の値を8とし、変化点座標のバイトレングス(BYTELEN)とその余り(BITPAT_NO)を求めている。すなわち、POSHIFT=3として入力変化点データ(CPOS)をシフトして商をもとめ、またPOSMASK=7として入力変化点データ(CPOS)に対する論理積によって余りを求めている。
【0112】
次に、ステップC2で求めた変化点座標のバイトレングス(BYTELEN)と直前の値(BYTELEN_OLD)との差を求め、これを(FILL_NO)とする(ステップC3)。
【0113】
ここで、(FILL_NO)が0であった場合(ステップC4)、ステップC5に移行する。ステップC5ではカレント変化点の色が黒か否かを判定する。
カレント変化点の色が黒である場合、前の端数部のイメージパターン(BITPAT_REG)と、図15(1)に示す黒用のイメージ変換テーブルから得られるイメージパターンとをOR演算することによって、(BITPAT_REG)を生成する(ステップC6)。
【0114】
また、カレント変化点の色が白である場合、前の端数部のイメージパターン(BITPAT_REG)と、図15(2)に示す白用のイメージ変換テーブルから得られるイメージパターンとをAND演算することによって、(BITPAT_REG)を生成する(ステップC7)。
【0115】
なお、本実施形態では、端数(BITPAT_NO)によりアクセスされるイメージ変換用テーブルに白変化点用と黒変化点用を設けているが、2つのテーブルは互いにビット反転により求められるため必ずしも2つ必要ではない。すなわち、一方のテーブルから得られるイメージパターンを反転して用いることで、他方のテーブルに代用する。また、本実施形態では、8ビットのイメージパターンを格納するテーブルであるが、出力イメージ領域に展開する単位によっては、16ビット/32ビット等のテーブル構成とする。イメージ変換テーブルに格納されるイメージパターンは、例えば黒用とすると、端数(BITPAT_NO)が示す数の連続した白画素の後、残りの画素分の黒画素が連続するパターンである。
【0116】
一方、ステップC4において、ステップC3で求めた(FILL_NO)が1以上であると判定した場合、ステップC6、C7で生成した端数部のイメージパターン(BITPAT_REG)を、変化点データをもとに生成された最終的なイメージパターンとして出力イメージ領域に転送する(ステップC8)。また、(BITPAT_REG)を、次の変化点データに対する処理(ステップC6,C7)のために、ステップC2で求めた(BITPAT_NO)に対応するイメージ変換テーブルから得られたイメージパターンで初期化する。
【0117】
そして、8ビットで構成される白または黒のイメージを(FILL_NO)−1回分出力イメージ領域に転送する。すなわち、(FILL_NO)が2以上である場合には、白または黒の同じ色が連続して1バイト以上連続することを示すので、必要なバイト数の白または黒のデータを連続して出力する。
【0118】
ここで、ライン終端に達していなければ、ステップC2の処理に戻り、対象ラインの残りの部分に対して処理を繰り返す。また、ライン終端に達し、1画面分の処理が終了していなければ、ステップC1の初期化処理にもどり、残りのラインの入力変化点データに対する処理を行なう。全てのラインについての処理が完了したら処理を終了する。
【0119】
図14に示す例では、まず、(FILL_NO)が1以上となるまで端数部の演算を行う。この例では入力変化点データ(CPOS)が5から7までの間、図14(c)に示すように、バイトレングス(BYTELEN)が0なので、端数部についての演算を行なうことになる。
【0120】
入力変化点データ(CPOS)=5の時、端数(BITPAT_NO)が5(黒画素への変化点)であるので、端数部のイメージパターン(BITPAT_REG)を、(BITPAT_NO)=5に対応する黒用のイメージ変換テーブル値(0x07)、すなわち図16に示すCPOSに対応するBITPAT(BITPAT_NO)で初期化する。
【0121】
入力変化点データ(CPOS)=6の時、端数(BITPAT_NO)が6であり、白画素への変化点であるので、白用のイメージ変換テーブルから得られる(BITPAT_NO)=6のテーブル値(0xfc)と、前の端数部のイメージパターン(BITPAT_REG)とANDをとることで(BITPAT_REG)を求める(ステップC7)。
【0122】
(CPOS)=7の時、変化点の色が黒であるため、黒用のイメージ変換テーブルから得られる(BITPAT_NO)=7に対応するイメージパターンと、前の端数部のイメージパターン(BITPAT_REG)とORをとることで(BITPAT_REG)を求める(ステップC6)。
【0123】
(CPOS)=9の時(白画素への変化点)、バイトレングス(BYTELEN)=1となるので、ステップC3において(FILL_NO)=1が求められる。従って、直前で求めた(BITPAT_REG)の値を出力イメージ領域に転送する。また、(BITPAT_NO)=1から白用のイメージ変換テーブルを参照し、(BITPAT_REG)に代入する(ステップC8)。
【0124】
以下、(CPOS)=15まで同様に演算が可能である。最終変化点の(CPOS)=24の時、前のバイトレングス(BYTELEN−OLD)=1であり、バイトレングス(BYTELEN)=3であるため(FILL_NO)=2となる。このため、ステップC8において直前の(BITPAT_REG)を出力した後、(FILL_NO)−1回分のバイトデータ、つまり1バイト分の黒のイメージパターンを出力する。処理対象とする入力変化点データ(イメージパターン)によっては、ここで白のイメージパターンを出力する。
【0125】
このようにして、イメージパターンの主走査方向における白または黒への変化点座標情報列からなる入力変化点データをイメージデータに変換することができる。
【0126】
次に、本発明の第4実施例に係わるイメージ処理方法について、図17に示すフローチャートを参照しながら説明する。第4実施形態では、イメージデータの圧縮データから、全体のイメージを作業メモリ上に展開することなく縮小イメージデータを生成する処理である。
【0127】
ステップD1は、圧縮データから白または黒への変化点座標情報からなる変化点座標データを1ライン分生成するステップである。
ステップD2は、ステップD1により生成した変化点座標データをもとに、副走査方向に対して縮小した変化点情報を生成するステップである。
【0128】
ステップD3は、ステップD2に生成した変化点座標データをもとに、主走査方向に対して縮小した変化点情報を生成するステップである。
ステップD4は、ステップD2において生成した変化点情報をもとにイメージデータを生成するステップである。
【0129】
次に、第4実施形態におけるデータ処理の動作について説明する。
まず、イメージデータの圧縮データから、白または黒への変化点座標情報からなる変化点座標データを1ライン分生成し、ラインバッファに格納する(ステップD1)。
【0130】
例えば、2値化イメージに対する符号化方式としては、一般にMH(Modified Huffman)符号化方式、MR(Modified READ )符号化方式などがある。これらの符号化方式によりイメージデータを圧縮して得られた圧縮データ(符号データ)は、所定の規則に従って符号化されており、この規則に基づいて白または黒への変化点座標を抽出し、変化点座標データとする。
【0131】
次に、ステップD1によって得られた変化点座標データを用いて、副走査方向に対して縮小した変化点情報を生成する。ここで、前述した第2実施形態において説明したデータ縮小方法を用いる。ただし、副走査方向への縮小は2ライン分の変化点座標情報列、すなわち2ライン分の変化点データに対して実行されるので、ステップD1において2ライン分の変化点座標データ(変化点テーブル)が生成されてから実行する。
【0132】
なお、ステップD2は、第2実施形態において説明したデータ縮小方法を用いるものとし、詳細な説明を省略する。
次に、ステップD2における副走査方向への縮小処理により得られた変化点座標データに対して、主走査方向に対する縮小処理を行なう(ステップD3)。なお、ステップD3は、第1実施形態において説明したデータ縮小方法を用いるものとし、詳細な説明を省略する。
【0133】
次に、ステップD3における主走査方向への縮小処理により得られた変化点座標データに対するイメージデータへの変換を行なう。変化点座標データは、主走査方向、副走査方向の両方向に対して縮小処理が施されているため、ここで変化点座標データからイメージデータを生成することで、元のイメージデータを展開することなく縮小イメージデータが得られることになる。なお、ステップD4は、第3実施例において説明したデータ変換方法を用いるものとし、詳細な説明を省略する。
【0134】
ここで、1画面分の符号データについての処理が完了していなければ(ステップD5)、ステップD1の処理に戻り、次のラインについて前述した処理を実行する。以下、1画面分の符号データについての処理が完了すると処理を終了する。
【0135】
このようにして、イメージデータの圧縮データから、作業メモリ上にイメージデータを展開することなく、縮小後のイメージデータを生成することができる。従って、データ転送量を減少させることができ高速なイメージ処理が可能となる。特に、図形や文字等を含むイメージにおいては、白(空白)の領域が少ない場合には、縮小処理における演算量とメモリアクセス量が減るため、大幅なイメージ処理の高速化が可能である。
【0136】
【発明の効果】
以上詳述したように本発明によれば、伸張処理と縮小処理とを組み合わせた処理でも高速にイメージ処理ができ、かつ画質劣化の少ない縮小結果を提供することが可能となる。
【図面の簡単な説明】
【図1】本発明の実施形態に係わるイメージ処理方法を実現するシステムの構成を示すブロック図。
【図2】第1実施形態のデータ縮小方法を説明するためのフローチャート。
【図3】第1実施形態のデータ縮小方法を説明するためのフローチャート。
【図4】第1実施形態における縮小後の変化点座標を検出する処理の過程を説明するための図。
【図5】第1実施形態におけるステップA10の縮小演算処理の消失した白画素への変化点を復活させる処理を説明するための図。
【図6】第2実施形態に係わるイメージ処理方法におけるデータ縮小方法を説明するためのフローチャート。
【図7】第2実施形態に係わるイメージ処理方法におけるデータ縮小方法を説明するためのフローチャート。
【図8】第2実施形態の処理対象とする入力変化点テーブルの一例を示す図。
【図9】第2実施形態における条件aを説明するための図。
【図10】第2実施形態における条件cを説明するための図。
【図11】第2実施形態における条件bを説明するための図。
【図12】第2実施形態における条件a,b,cの何れも満たさないその他のケースを説明するための図。
【図13】第3実施形態に係わるイメージ処理方法におけるデータ変換方法を説明するためのフローチャート。
【図14】第3実施形態におけるデータ変換方法の動作を説明するためのイメージ生成過程を示す図。
【図15】第3実施形態におけるイメージ変換テーブルの一例を示す図。
【図16】第3実施形態におけるデータ変換方法の動作を説明するためのイメージ生成過程を示す図。
【図17】第4実施例に係わるイメージ処理方法を説明するためのフローチャート。
【図18】従来のOR縮小処理を説明するための図。
【図19】DDAによるキャリーパターンの発生過程を示す図。
【符号の説明】
10…CPU10 12…RAM
14…VRAM 16…ROM
18…入力装置 20…入力制御部
22…表示装置 24…表示制御部
26…記憶装置 28…記憶制御部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for performing processing such as image reduction in a system that handles binary images by software.
[0002]
[Prior art]
Conventionally, in a system in which dedicated hardware for image processing is not provided, an image processing function is realized by software. In such a system, when generating reduced image data obtained by reducing the original image from the compressed data obtained by compressing the image data, an image editing process combining expansion processing and reduction processing is required. Become.
[0003]
In other words, the image data of the entire image is expanded from the compressed data to the working memory by the decompression process, and the reduced image data is generated by reducing the image data expanded on the working memory by the reduction process according to a predetermined reduction ratio. are doing.
[0004]
Further, in the conventional reduction processing, an OR processing method is adopted for image data including characters, graphics, and the like in order to prevent disappearance or blurring of lines constituting the characters or graphics.
[0005]
For example, as shown in FIG. 18, in the OR reduction method that obtains 7-dot reduced image data for 22-dot image data (input image), a carry pattern is generated using a DDA (Differential Digital Analyzer). And the OR operation is performed on the pixels from the pixel on the right side of the carry generation position until the next carry is generated, and pixels corresponding to the carry number (7) are output.
[0006]
Here, the operation principle of the DDA will be briefly described. FIG. 19 shows a process of generating a DDA carry pattern. When the magnification is N / M (N <M), the initial value and the scale value are obtained as follows. However, div indicates integer division and mod indicates the remainder of integer division.
[0007]
Scale value = (10000H × N) div M
Initial value = (10000H × N) mod M
In an example of reducing a 22-dot image to a 7-dot image, the scale value = 5174H and the initial value = 0008H are obtained according to the above formula.
[0008]
In DDA, as shown in FIG. 19, first, an initial value 0008H is set as a current value, and a scale value 5174H is added. The adder bit width is 16 bits, and the scale value is added to the adder output. Thereafter, the scale value is sequentially added to the output of the adder until the number of data is reached, and the carry pattern generated during this time is used to determine the output pixel. That is, the range of pixels to be ORed is obtained.
As a result, as shown in FIG. 18, as a result of the OR reduction according to the carry generation position for the input image, all pixels are black.
[0009]
[Problems to be solved by the invention]
As described above, in the conventional image processing method, in order to generate reduced image data based on the compressed data, when image editing is performed by combining expansion processing and reduction processing, the expansion time and reduction processing must be executed sequentially. I must. Accordingly, since the time for obtaining the final reduced image requires the expansion time and the reduction processing time, the work responsiveness has deteriorated.
[0010]
In addition, in the conventional reduction processing, it was possible to prevent the disappearance or blurring of the lines constituting the characters and figures by adopting the OR processing method. However, in principle, when the reduction magnification is increased, the characters and figures are blackened. In some cases, the image is crushed and the quality of the image is remarkably deteriorated.
[0011]
The present invention has been made in consideration of the above-described circumstances. An image that can perform high-speed image processing even with a combination of expansion processing and reduction processing, and can provide a reduction result with little image quality degradation. An object is to provide a processing method.
[0012]
[Means for Solving the Problems]
The present invention obtains a reduced change point coordinate sequence corresponding to a reduction magnification with respect to a change point coordinate sequence to white pixels and black pixels in the main scanning direction of the image data, and includes the change point coordinate sequence in the obtained change point coordinate sequence. For each change point coordinate, find the distance from the previous change point coordinate, Said For each change point coordinate in the change point coordinate sequence, the calculated distance is Greater than zero , And the change point coordinates to the white pixel, the change point candidate to the white pixel is determined, and the obtained distance is Not greater than 0 In this case, the change point candidate to the white pixel corresponding to the previous change point coordinate is invalidated, and the obtained distance is Greater than zero ,And When the coordinates of the change point to a black pixel are present and there are change point candidates to a white pixel , The change point coordinate to the black pixel, and the change point candidate of the white pixel to the change point coordinate to the white pixel, the obtained distance is Greater than 1 ,And When the coordinates of the change point to a black pixel are present and there are no change point candidates to a white pixel The change point coordinates to the black pixel and the change point coordinates to the white pixel after adding a predetermined coordinate value to the immediately previous change point coordinate.
[0013]
The present invention also provides a first change point table composed of a change point coordinate sequence of white and black pixels in the main scanning direction of image data, and a change point coordinate of the next line in the sub-scanning direction of the first change table. With respect to the second change point table composed of columns, the change point coordinates having a small change point position to the black pixel in any of the change point tables are set as the change point of interest and the change point coordinates to the converted black pixel, The change point to the first white pixel on the right side of the change point of interest is the white change point candidate, and the change point coordinate value of the change point table on the opposite side of the change point table with the change point of interest is greater than or equal to the white change point candidate. If the detected change point is at the same coordinate position as the white change point candidate and the color is a change point to a white pixel, or is in a coordinate position beyond the white change point candidate, When the color changes to a black pixel When the white change point candidate is the change point coordinate to the converted white pixel, the detected change point is at the same coordinate position as the white change point candidate, and the color of the change point is the change point to the black pixel , This change point is the change point of interest, the change point to the first white pixel on the right is the white change point candidate, the detected change point is at the coordinate position beyond the white change point candidate, the color of the change point Is the change point to the white pixel, the position of the white change point candidate is set as the noticed change point, the detected change point is set as the white change point candidate, and the noticed change point or the white change point candidate is the end of the line. When the line is at the end of the line, the white change point candidate is set as the change point coordinates to the converted white pixel.
[0014]
In the present invention, image data is sequentially read out from a change point coordinate sequence to white pixels and black pixels in the main scanning direction. Ru Change point coordinates Each of Divide by a given value The Find the quotient and the remainder About each change point coordinate With the quotient , Of the change point coordinates corresponding to this quotient The difference from the quotient calculated for the previous change point coordinates Respectively Seeking this Change point that does not reach the specified value when the difference value obtained is 0 Coordinate Image pattern against Said Change point that is calculated according to the remainder value and does not reach the specified value when the calculated difference value is 1 or more Coordinate Asked for Said Use the image pattern as the conversion result image pattern. Output Further, an image pattern in which white pixels or black pixels corresponding to the obtained difference is continuous is output as an image pattern as a conversion result.
[0015]
The present invention also provides a change point coordinate sequence from compressed data to white pixels and black pixels in an image processing method for generating a reduced image based on compressed data obtained by encoding image data. Then, by the image reduction method based on the generated change point coordinate sequence, a change point coordinate sequence reduced in the sub-scanning direction is generated, and by the image reduction method based on the change point coordinate sequence, A change point coordinate sequence reduced in the main scanning direction is generated, image data is generated by a data conversion method based on the generated change point coordinate sequence, and the above processing is executed for one screen. The image data after reduction is generated from the compressed data.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a system that implements the image processing method according to the present embodiment. As shown in FIG. 1, this system includes a CPU 10, a RAM 12, a VRAM 14, a ROM 16, an input device 18, an input control unit 20, a display device 22, a display control unit 24, a storage device 26, and a storage control unit 28.
[0017]
The CPU 10 controls the entire apparatus, and realizes the function of the image processing method according to the present invention by starting the program according to the input instruction by accessing the RAM 12, the VRAM 14, and the ROM 16.
[0018]
The RAM 12 stores a program area 12a in which various processing programs for determining the operation of the CPU 10 are stored, various variables used when performing image processing, a table, change point coordinate data to be processed, and the like. A work area 12b as a work memory is provided.
[0019]
The VRAM 14 is an area for expanding display data to be displayed on the display device 22. The display data developed in the VRAM 14 is read by the display control unit 24 and used for display on the display device 22.
[0020]
The ROM 16 is provided with a program area 16a in which various processing programs for determining the operation of the CPU 10 are stored, a data area 16b for storing various data, and the like.
[0021]
The input device 18 is configured by a keyboard, a mouse, or the like, and inputs instructions for the system.
The display device 22 is configured by a liquid crystal display, for example, and performs display under the control of the display control unit 24. The display control unit 24 controls display on the display device 22, reads display data stored in the VRAM 14, and provides the display data on the display device 22.
[0022]
The storage device 26 stores compressed data obtained by encoding image data to be processed, change point coordinate data, image data, and the like. The storage control unit 28 performs input / output control of data and the like for the storage device 26.
[0023]
Next, a data reduction method in the image processing method according to the first embodiment of the present invention will be described.
2 and 3 are flowcharts for explaining the data reduction method of the first embodiment. In the data reduction method of the first embodiment, reduction processing is performed in the main scanning direction based on the coordinate information of the change points of the image data to white and black in the main scanning direction.
[0024]
Step A1 is an initialization process performed before starting the processing of the first line of image data, and is a step of initializing a variable for setting a reduction magnification (SCALEX) and a change point coordinate after scaling. .
[0025]
Step A2 is an initialization process for searching for a change point after reduction. The change point coordinate (REG_SCALE_POS) detected immediately before is set, and a change point detection flag, that is, a change point from a white pixel to a black pixel is detected. This is a step of invalidating the flag (BLACK_FOUND) indicating that the change has occurred and the flag (WHITE_FOUND) indicating that the change point from the black pixel to the white pixel has been detected.
[0026]
Step A3 is a step of multiplying the change point coordinates (CRNT_POS) sequentially read in the raster scanning direction by a reduction ratio (SCALEX) and setting the value as the current change point calculation value (SCALE_POS).
[0027]
Step A4 is a step of obtaining a difference (DIST_POS) between the current change point calculation value (SCALE_POS) and the change point coordinates (REG_SCALE_POS) detected immediately before.
[0028]
Step A5 is a step of determining whether or not the difference (DIST_POS) obtained in Step A4 is greater than zero.
Step A6 is a step of determining whether or not the color (COLOR) of the current change point calculation value is a change point to a black pixel.
[0029]
Step A7 is a step of determining whether or not the change point detection flag (WHITE_FOUND) for the white pixel is valid.
Step A8 is a step of determining whether or not the difference (DIST_POS) is greater than one.
[0030]
Step A9 is a step when a change point from a white pixel to a black pixel is detected. Change point detection processing, that is, a current change point calculation result (SCALE_POS) is set as a change point coordinate from white to black (AVL_SCALE_POSB). Then, the process of determining the change point coordinates (REG_SCALE_POS) determined immediately before as the change point coordinates (AVL_SCALE_POSW) from black to white is executed. In addition, each of the change point detection flags (WHITE_FOUND) and (BLACK_FOUND) indicating that a change point has been detected is enabled (TRUE).
[0031]
Step A10 is a process for detecting the change point to the black pixel and restoring the change point to the white pixel that disappeared in the previous reduction calculation process. The current change point calculation result (SCALE_POS) is changed from white to black. The change point coordinate (AVL_SCALE_POSB) is set, and the change point coordinate (REG_SCALE_POS) +1 determined immediately before is determined as the change point coordinate (AVL_SCALE_POSW) to the white pixel. Also, each change point detection flag (WHITE_FOUND) and (BLACK_FOUND) indicating that a change point has been detected is made valid (TRUE).
[0032]
Step A11 is a step when a change point candidate from a black pixel to a white pixel is detected, and the current change point calculation result (SCALE_POS) is set to the change point coordinate (REG_SCALE_POS) determined immediately before. Further, the change point detection flag (WHITE_FOUND) for the white pixel is validated, and the process returns to the step A3 in order to detect the change point to the next black pixel.
[0033]
Step A12 is a step of invalidating the white change point detection result and invalidating the white change point detection flag (WHITE_FOUND).
Step A13 is a step of detecting the line end.
[0034]
Step A14 is a step when the end of the line is reached during the search for the change point, and the change point coordinate (AVL_SCALE_POSW) to the white pixel is placed on the right side of the line end coordinate after the reduction.
[0035]
The change point coordinates after image reduction for one screen are obtained by repeating the processing from step A2 to step A14 until the line for one screen is completed.
[0036]
Next, the operation of the data reduction process in the first embodiment will be described using a specific example.
FIG. 4 shows a process of calculating the reduced change point coordinates (AVL_SCALE_POSB) (AVL_SCALE_POSW) for the change point coordinate (CRNT_POS) column as input data when the reduction magnification (SCALEX) is 2/3. is there.
[0037]
The target (input data) of the image reduction process is the change point coordinate (CRNT_POS) sequence shown in FIG. 4B, that is, the compressed data of the image pattern shown in FIG. The image pattern represents a bit pattern indicated by the change point coordinates (coordinate positions 0, 1,...).
[0038]
The change point coordinate (CRNT_POS) starts from the change point coordinate to the black pixel, then continues to the change point coordinate from the black pixel to the white pixel, and then alternately arranged until the end of the line. However, the line end value of the change point coordinates (CRNT_POS) is the value of the virtual change point provided on the right side of the line end coordinates of the image pattern.
[0039]
First, the input change point coordinates (CRNT_POS) are multiplied by the reduction ratio (2/3) set in step A1 to obtain the current change point calculation value (SCALE_POS). (Step A3). For example, for a change point coordinate of CRNT_POS = 3 and COLOR = black, a current change point calculation value (SCALE_POS) = 2 is obtained (see FIG. 4C).
[0040]
Next, in step A4, the difference (DIST_POS) between the current change point calculation value (SCALE_POS) and the change point coordinates (REG_SCALE_POS) detected immediately before is obtained. For example, when the current change point calculation value is 4 (second of SCALE_POS, COLOR = white), since the change point coordinate detected immediately before is 2, the difference (DIST_POS) is 2.
[0041]
Next, it is determined whether or not the difference (DIST_POS) between the current change point calculation value (SCALE_POS) and the change point coordinates (REG_SCALE_POS) detected immediately before is greater than 0 (step A5). When the second (SCALE_POS) in FIG. 4C is targeted, DIST_POS> 0.
[0042]
In this case, it is determined whether or not the color (COLOR) of the current change point calculation value is black (step A6). In this example, since COLOR = white, the process proceeds to step A11.
[0043]
In step A11, the change point (SCALE_POS) is stored in the change point coordinates (REG_SCALE_POS) detected immediately before as a change point candidate from the black pixel to the white pixel, and the change point detection flag (WHITE_FOUND) is validated. At this time, it is a change point candidate to the last, and is determined by the next change point calculation result.
[0044]
Here, if the processing has not reached the end of the line, the process returns to the step A3 in order to detect the change point to the next black pixel (step A13).
In this example, the current change point calculation value (SCALE_POS) for the next change point coordinate (CRNT_POS) = 9 is 6, DIST_POS> 0 and COLOR = black, and the change check is performed by processing the previous change point coordinates. Since the output flag (WHITE_FOUND) is valid (steps A5, A6, A7), step A9 is executed.
[0045]
Here, in step A9, since a change point from a white pixel to a black pixel is detected, a change point detection process is executed. That is, the current change point calculation result (SCALE_POS) is the change point coordinate from white to black (AVL_SCALE_POSB), and the change point coordinate from the black pixel detected immediately before to the white pixel (set in step A11) ( REG_SCALE_POS) is determined as the change point coordinates (AVL_SCALE_POSW) from black to white. Further, each change point detection flag (WHITE_FOUND) (BLACK_FOUND) is also enabled (TRUE).
[0046]
Next, the case where the difference (DIST_POS) = 0 between the current change point calculation value (SCALE_POS) obtained in step A4 and the change point coordinates (REG_SCALE_POS) detected immediately before will be described.
[0047]
In the example shown in FIG. 4B, when the change point coordinates (CRNT_POS) is changed from 12 (fourth) to 13 (fifth), the SCALE_POS values are both 8 as shown in FIG. And the condition of DIST_POS = 0 is satisfied.
[0048]
When the change point coordinates (CRNT_POS) is 13, it is determined that DIST_POS> 0, that is, DIST_POS = 0. Here, since WHITE_FOUND = TRUE and COLOR = black, the change point to white detected immediately before is invalidated (step A12).
[0049]
By this processing, when the difference (DIST_POS) = 0 between the current change point calculation value (SCALE_POS) and the change point coordinate (REG_SCALE_POS) detected immediately before, that is, the calculation result indicating both white and black at the same pixel position. When obtained, black pixels are preferentially left in the reduced image pattern.
[0050]
Next, the operation when the end of the line is reached while searching for the change point will be described. In the example of FIG. 4, when the value of the change point coordinate (CRNT_POS) is 22, since DIST_POS> 0 and COLOR = white (steps A5 and A6), processing when a change point candidate to a white pixel is detected (step A11) is executed.
[0051]
At this time, since the change point coordinate (CRNT_POS) is the end of the line (step A13), the line end process is executed without shifting to the process of searching for the change point to the next black pixel (step A14). That is, the white change point coordinates (AVL_SCALE_POSW) are placed on the right side of the line end coordinates after reduction.
[0052]
Thus, the reduced change point coordinates (change point coordinates from white to black (AVL_SCALE_POSB) and change point coordinates from black to white (AVL_SCALE_POSW)) for the change point coordinates (CRNT_POS) column shown in FIG. It is obtained as shown in 4 (d). The image pattern corresponding to the reduced change point coordinate sequence shown in FIG. 4D is as shown in FIG.
[0053]
Next, a process for restoring the change point to the lost white pixel in the reduction calculation process in step A10 will be described with reference to FIG.
FIG. 5 shows a process of calculating the reduced change point coordinates (AVL_SCALE_POSB) (AVL_SCALE_POSW) for the change point coordinate (CRNT_POS) column as input data when the reduction magnification (SCALEX) is 1/3. is there.
[0054]
When the reduction ratio is set to 1/3, when the processing is sequentially performed as described with reference to FIG. 4 for the change point coordinate (CRNT_POS) column shown in FIG. (CRNT_POS) = 12 is processed as follows.
[0055]
First, the change point coordinate (CRNT_POS) = 12 is multiplied by a reduction ratio (1/3) to obtain a current change point calculation value (SCALE_POS) = 4 (COLOR = white) (step A3).
[0056]
In this case, since the difference (DIST_POS) = 1 between the current change point calculation value (SCALE_POS) = 4 and the change point coordinate (REG_SCALE_POS) = 3 detected immediately before, the processing of step A11 is performed by steps A5 and A6. Transition.
[0057]
In step A11, the change point (SCALE_POS) = 4 is stored in the change point coordinates (REG_SCALE_POS) detected immediately before as a change point candidate from the black pixel to the white pixel, and the change point detection flag (WHITE_FOUND) is validated.
[0058]
Next, in the process for the change point coordinates (CRNT_POS) = 13, the current change point calculation value (SCALE_POS) = 4 (COLOR = black). Therefore, in step A4, since the difference (DIST_POS) = 0 between the current change point calculation value (SCALE_POS) = 4 and the change point coordinates (REG_SCALE_POS) = 4 detected immediately before is 0, in step A12, the previous step A11 The change point detection flag (WHITE_FOUND) that was enabled in is invalidated.
[0059]
Also, in the process for the change point coordinates (CRNT_POS) = 14, the current change point calculation value (SCALE_POS) = 4 (COLOR = white), so that the step is the same as the process for the change point coordinates (CRNT_POS) = 13. In A4, the difference (DIST_POS) = 0 between the current change point calculation value (SCALE_POS) = 4 and the change point coordinates (REG_SCALE_POS) = 4 detected immediately before is set.
[0060]
Next, in the process for the change point coordinates (CRNT_POS) = 18, the current change point calculation value (SCALE_POS) = 6 (COLOR = black). Therefore, in step A4, since the difference (DIST_POS) = 2 between the current change point calculation value (SCALE_POS) = 6 and the change point coordinate (REG_SCALE_POS) = 4 detected immediately before, DIST_POS> 1 and COLOR = black The condition is satisfied (steps A5 and A6). Further, in the process for the previous change point coordinates (CRNT_POS), the change point detection flag (WHITE_FOUND) is invalidated in step A12, and the current change point calculation value (SCALE_POS) and the change point coordinates detected immediately before are changed. Since the difference from (REG_SCALE_POS) (DIST_POS) = 2, the process proceeds to step A10 (steps A7 and A8).
[0061]
In step A10, the change point to the white pixel that disappeared in the immediately preceding reduction calculation process is restored. That is, the current change point calculation result (SCALE_POS) is set as the change point coordinate (AVL_SCALE_POSB) from white to black, and the change point coordinate (REG_SCALE_POS) +1 determined immediately before is determined as the change point coordinate (AVL_SCALE_POSW) to the white pixel. To do.
[0062]
Here, since the current change point calculation result (SCALE_POS) = 6, the change point coordinate from white to black (AVL_SCALE_POSB) = 6, while the change point coordinate (REG_SCALE_POS) = 4 determined immediately before is 4. The change point to the white pixel is restored by setting the change point coordinate (AVL_SCALE_POSW) = 5 to the white pixel. Further, the change point detection flag (WHITE_FOUND) (BLACK_FOUND) is made valid (TRUE).
[0063]
Thereafter, the remaining change point coordinates (CRNT_POS) are processed in the same manner as described above.
Thus, the reduced change point coordinates (change point coordinates from white to black (AVL_SCALE_POSB) and change point coordinates from black to white (AVL_SCALE_POSW)) for the change point coordinates (CRNT_POS) column shown in FIG. 5 (d). In FIG. 5D, the change point coordinate from black to white (AVL_SCALE_POSW) = 5 is the restored change point. The image pattern corresponding to the reduced change point coordinate sequence shown in FIG. 5D is as shown in FIG.
[0064]
In this way, when the reduction processing of the image data in the main scanning direction is performed based on the change point coordinate information to white and black, it is not necessary to develop the image data on the working memory, and the data transfer The amount can be reduced and high-speed image processing becomes possible. In particular, in an image including graphics, characters, etc., when the white (blank) area is small, the amount of computation and memory access in the reduction processing are reduced, so that the speed of image processing can be greatly increased.
[0065]
Further, change point coordinates (AVL_SCALE_POSB) (AVL_SCALE_POSW) are generated so that black pixels are preferentially left in the reduced image pattern and the disappearance of white pixels is minimized. However, it is possible to prevent blurring and disappearance of lines constituting figures, characters, etc., and high-quality reduction processing is possible.
[0066]
Next, a data reduction method in the image processing method according to the second embodiment of the present invention will be described with reference to the flowcharts shown in FIGS. As shown in FIG. 8, the data reduction method in the second embodiment is performed in the sub-scanning line direction based on an input change point table in which change point coordinate information of image data to white and black in the main scan direction is stored. On the other hand, the reduction process is performed.
[0067]
In FIG. 8A, based on the change point table for two lines (change point coordinate sequence for each line), a change point table for one line (change point coordinate sequence after reduction) is generated by OR reduction. An example is shown. FIG. 8 (b) is obtained by replacing the change point coordinates shown in FIG. 8 (a) with an image pattern for intuitive understanding.
[0068]
In this embodiment, based on the relative positional relationship of the change points in the change point table A / B, the change point coordinates after OR processing are extracted according to the procedures of the flowcharts shown in FIGS.
[0069]
Step B1 is an initialization process, in which two lines (reading bank and writing bank) of memory areas for storing the reduced change points are secured, and this reduced change point table and reduced change point detection are performed. This is a step to initialize variables to be used.
[0070]
Step B2 is a step of determining whether or not the target change point C1 and the white change point candidate C2 used in the subsequent steps are detected.
Step B3 is a step of detecting the change points C1 and C2, and the smaller change point position to the black pixel in the input change point table and the reading reduction change point table is written as the noticed change point (C1). In this step, the change point to the first white pixel on the right side of the target change point is set as the white change point candidate (C2).
[0071]
Step B4 is a step of determining whether or not the changing point in the changing point table has reached the end of the line.
Step B5 is a step of searching for a change point (CX) whose coordinate value is equal to or greater than the white change point candidate (C2) on the line on the opposite side of the target change point C1.
[0072]
Step B6 is a step for determining whether or not the changing point CX detected in Step B5 satisfies the condition a or the condition c (details of the conditions a and c will be described later with reference to FIGS. 9 and 10).
[0073]
Step B7 is processing when the condition a or the condition c is established, and the white change point candidate C2 is registered in the reduced change point table. Further, the (C1C2_FOUND) flag is invalidated in order to detect the next attention change point C1 and white change point candidate C2.
[0074]
Step B8 is a step of determining whether or not the changing point CX detected in step B5 satisfies the condition b (details of the condition b will be described later with reference to FIG. 11).
[0075]
Step B9 is processing when the condition b is satisfied, and the change point CX is set as the target change point C1, and the change point to the first white pixel on the right side is set as the white change point candidate (C2).
[0076]
Step B10 is processing in cases other than conditions a, b, and c. The change point CX is at a coordinate position exceeding the white change point candidate (C2), and the color of the change point changes to a white pixel. This is the case. In this case, the position of the white change point candidate (C2) is set as the target change point (C1), and the detected change point (CX) is set as the white change point candidate (C2).
[0077]
Steps B11, B12, and B13 determine whether the target change point (C1) or the white change point candidate (C2) is at the end of the line. If it is at the end of the line, the white change point candidate C2 is stored in the reduced change point table. If it is registered and the line end is not reached, the (C1C2_FOUND) flag is validated in order to detect a change point whose coordinate value is equal to or greater than the white change point candidate C2.
[0078]
Steps B14 and B15 are steps for selecting a reduction change point table to be output from the line number information of the input / output image. When outputting, the (CLR_TBL) flag is validated so that the change point table is initialized in step B1.
[0079]
Steps B16 and B17 are steps in which it is determined whether or not the processing for one screen has been completed. If not, the bank of the reduction change point table is switched and the processing in step B1 is repeated.
[0080]
Next, the operation of the data reduction process in the second embodiment will be described.
First, two lines (for reading and writing) are reserved for storing the change point after reduction, and the reduction change point table and variables used for detection of the change point after reduction are initialized (step B1). .
[0081]
Next, it is determined whether or not the target change point (C1) and the white change point candidate (C2) used in the subsequent steps are detected, that is, whether the (C1C2_FOUND) flag is valid (TRUE) (step). B2). The noticeable change point C1 and the white change point candidate C2 are extracted from the change point table A (first line). If not extracted here, the process proceeds to step B3.
[0082]
In step B3, the smaller change point position to the black pixel in the input change point table and the reading reduction change point table is registered in the write reduction change point table as the attention change point (C1). The change point to the first white pixel on the right side of the white point is defined as a white change point candidate (C2).
[0083]
In the example shown in FIG. 8, if the input change point table is the change point table A and the read change point table is the change point table B, the change point table of interest (C1) is 1 (first) in the change point table A. The white change point candidate (C2) is 7 (second change point) on the right side thereof. Also, the noticeable change point (C1) is registered in the write reduction change point table (first change point 1 of the change point table A shown in FIG. 8) in order to be confirmed as the OR reduction result of two lines.
[0084]
Next, if the processing has not reached the end of the line, the coordinate value is white from the line opposite to the line where the target change point (C1) is detected (change point table B which is a change point table for reading). A change point (CX) that is greater than or equal to the change point candidate (C2) is searched (step B5). In the example shown in FIG. 8, 8 (the fifth change point) in the change point table B is the change point (CX).
[0085]
Here, it is determined whether or not the detected change point (CX) satisfies condition a or condition c (step B6).
The condition a means a case where the change point (CX) is at the same position as the white change point candidate (C2) and the color is a white change point. FIG. 9 shows a case where the condition a is satisfied (the fourth change point 7 on the second line is the change point (CX)). Actually, the processing is performed on the change point table, but here, it is shown as an image pattern for easy understanding.
[0086]
The condition c means a case where the change point (CX) is at a coordinate position exceeding the white change point candidate (C2) and the color is a change point to a black pixel. FIG. 10 shows a case where the condition c is satisfied (the fifth change point 8 on the second line is the change point (CX)).
[0087]
If either condition is satisfied, the process proceeds to step B7. In step B7, the white change point candidate C2 is registered in the writing reduction change point table. In the example shown in FIG. 8, since the condition c is satisfied, the change point of the white change point candidate C2, that is, the second change point 7 is registered in the writing reduction change point table. Further, in order to detect the next C1 and C2, the (C1C2_FOUND) flag is invalidated (FALSE), and the process returns to step B2.
[0088]
In step B2, since the (C1C2_FOUND) flag is invalid (FALSE), the process proceeds to step B3 for detecting the next change point (C1) (C2). In the example shown in FIG. 8, the fifth change point 8 of the change point table B, which is the reduction reduction change point table for reading, is the target change point (C1), and the sixth change point 9 of the change point table B is white changed. It is detected as a point candidate C2 (step B3). (In FIGS. 9 and 10, the next change points (C1) and (C2) are represented by (C1 ′) and (C2 ′).)
Next, in step B5, the fourth point of the change point table A of the input change point table is set as a change point (CX) whose coordinate value is equal to or greater than the white change point candidate (C2) on the line opposite to the target change point C1. The change point 10 is detected.
[0089]
In this case, since the change point (CX) does not satisfy both the condition a and the condition c (step B6), the process proceeds to step B8 to determine whether or not the condition b is satisfied.
Condition b means a case where the change point (CX) is at the same position as the white change point candidate (C2) and the color is a change point to black.
[0090]
FIG. 11 shows a case where the condition b is satisfied. Condition b means a case where the change point (CX) is at the same position as the white change point candidate (C2) and the color is a change point to black.
[0091]
In the example shown in FIG. 8, the white change point candidate (C2) (the seventh change point 9 in the change point table B) and the change point (CX) (the third change point 9 in the change point table A) are the same. Since it is in the position, the condition b is satisfied.
[0092]
When the condition b is satisfied, the change point (CX) is set as the target change point (C1), and the change point to the first white pixel on the right side is set as the white change point candidate (C2) (step B9).
[0093]
In the example shown in FIG. 11, the new attention change point is (C1 ′), and the white change point candidate is (C2 ′). In this case, since the white change point candidate (C2) is crushed by the change point to the black of the change point of interest (C1 ′), it is not registered in the reduction change point table.
[0094]
If the condition b is not satisfied, that is, other than the condition a, condition b, and condition c, the position of the white change point candidate (C2) is set as the noticed change point (C1), and the detected change point (CX) is set. A white change point candidate (C2) is set (step B10).
[0095]
FIG. 12 shows another case where none of the conditions a, b, and c are satisfied. In the example of FIG. 12, the new attention change point is (C1 ′) and the white change point candidate is (C2 ′). As in the case of condition b, since the white change point candidate (C2) is collapsed to the change point to black of the change point (C1 ′), it is not registered in the reduced change point table.
[0096]
When the process of step B9 (or B10) ends, it is determined whether the target change point (C1) or the white change point candidate (C2) is the line end (step B11). If it is not the end of the line, the (C1C2_FOUND) flag is set valid (TRUE) to detect a change point whose coordinate value is equal to or greater than the white change point candidate (C2), and the process returns to step B2.
[0097]
On the other hand, if it is the end of the line, the white change point candidate C2 is registered in the write reduction change point table (step B12). Note that Step B12 is also executed when it is determined in Step B4 that the change point in the change point table has reached the end of the line.
[0098]
Next, a reduction change point table to be output is selected from the line number information of the input / output image (step B14). For example, it can be realized according to the DDA carry generation condition. That is, the DDA is operated for each line, and the writing reduction change point table when the DDA carry occurs may be output.
[0099]
When outputting the writing reduction change point table, the flag (CLR_TBL) indicating that the change point table is to be initialized is set valid (TRUE) (step B15). Thereby, the reduction change point table is initialized in step B1.
[0100]
Here, it is determined whether or not the processing for one screen has been completed (step B16). If not, the bank of the reduced change point table is switched, the processing returns to step B1, and the above-described processing is repeated.
[0101]
In this way, when reducing the image data in the sub-scanning direction, the OR reduction change point information is obtained based on the change point table storing the change point coordinate information of each line to white and black. Similarly to the case of the first embodiment, it is not necessary to develop the image data on the working memory, the data transfer amount can be reduced, and high-speed image processing is possible.
[0102]
Next, a data conversion method in the image processing method according to the third embodiment of the present invention will be described with reference to the flowchart shown in FIG. In the data conversion method according to the third embodiment, as shown in FIG. 16, image data is generated on the basis of a change point data sequence composed of change point coordinate information of image data to white and black.
[0103]
Step C1 is a step for executing an initialization process, in which the immediately preceding change point calculation result is initialized.
Step C2 is a step of storing the calculation result for the immediately previous change point coordinates in (BYTELEN_OLD) and obtaining the quotient and remainder obtained by dividing the input change point coordinates by a predetermined value.
[0104]
In step C3, a difference between the byte length (BYTELEN) of the change point coordinates obtained in step C2 and the immediately preceding value (BYTELEN_OLD) is obtained, and this is held in (FILL_NO).
[0105]
Step C4 is a step of determining whether or not (FILL_NO) obtained in Step C3 is 1 or more.
Step C5 is a step of determining whether or not the color of the current change point is black.
[0106]
Steps C6 and C7 are steps for obtaining the fractional part image pattern (BITPAT_REG) by referring to the image conversion table using the byte length fractional value (BITPAT_NO) and the current color (COLOR) as an address, and the current color is black. In this case, (BITPAT_REG) and the output of the image conversion table are ORed and substituted into (BITPAT_REG).
[0107]
On the other hand, if the current color is white, the result of ANDing (BITPAT_REG) and the output of the image conversion table is substituted into (BITPAT_REG).
Step C8 is a step that is executed when (FILL_NO) is 1 or more in the determination of Step C4, and is a step of transferring the fractional part image pattern (BITPAT_REG) generated in Steps C6 and C7 to the output image area. . Also, (BITPAT_REG) is initialized with an image pattern corresponding to (BITPAT_NO) obtained in step C2.
[0108]
Step C9 is a step of transferring a white or black image composed of 1 byte (here, 8 bits) to the output image area for (FILL_NO) -1 times.
[0109]
Steps C10 and C11 are steps for determining line end and one screen end, and are end determinations for sequentially executing processing in the raster scanning direction until change point information for one screen is converted into an image.
[0110]
Next, the operation of the data conversion method according to the third embodiment will be described with reference to specific examples shown in FIGS.
The input change point data shown in FIG. 14B is input data. Image data corresponding to the change point coordinate sequence in FIG. 14B is shown in FIG.
[0111]
First, after initializing the previous change point calculation result, the previous calculation result is stored in (BYTELEN_OLD), and the quotient (byte length (BYTELEN)) obtained by dividing the change point coordinates of the input data by a predetermined value. The remainder (BITPAT_NO) is obtained (steps C1 and C2). In this embodiment, the predetermined value is set to 8, and the byte length (BYTELEN) of the change point coordinates and the remainder (BITPAT_NO) are obtained. That is, the input change point data (CPOS) is shifted to obtain the quotient with POSHIFT = 3, and the remainder is obtained by the logical product with respect to the input change point data (CPOS) with POSMASK = 7.
[0112]
Next, the difference between the byte length (BYTELEN) of the change point coordinates obtained in step C2 and the immediately preceding value (BYTELEN_OLD) is obtained, and this is set as (FILL_NO) (step C3).
[0113]
If (FILL_NO) is 0 (step C4), the process proceeds to step C5. In step C5, it is determined whether or not the color of the current change point is black.
If the color of the current change point is black, an OR operation is performed on the previous fractional image pattern (BITPAT_REG) and the image pattern obtained from the black image conversion table shown in FIG. (BITPAT_REG) is generated (step C6).
[0114]
Further, when the color of the current change point is white, an AND operation is performed on the previous fraction image pattern (BITPAT_REG) and the image pattern obtained from the white image conversion table shown in FIG. , (BITPAT_REG) are generated (step C7).
[0115]
In the present embodiment, the image conversion table accessed by the fraction (BITPAT_NO) is provided with a white change point and a black change point. However, two tables are always required because they are obtained by bit inversion. is not. That is, by inverting the image pattern obtained from one table, it is substituted for the other table. In this embodiment, the table stores an 8-bit image pattern. However, depending on the unit developed in the output image area, the table configuration is 16 bits / 32 bits. If the image pattern stored in the image conversion table is for black, for example, the number of continuous white pixels indicated by the fraction (BITPAT_NO) is followed by the black pixels for the remaining pixels.
[0116]
On the other hand, if it is determined in step C4 that (FILL_NO) obtained in step C3 is 1 or more, the fractional part image pattern (BITPAT_REG) generated in steps C6 and C7 is generated based on the change point data. The final image pattern is transferred to the output image area (step C8). In addition, (BITPAT_REG) is initialized with an image pattern obtained from the image conversion table corresponding to (BITPAT_NO) obtained in step C2 for processing (steps C6 and C7) for the next change point data.
[0117]
Then, the 8-bit white or black image is transferred to the output image area for (FILL_NO) -1 times. That is, when (FILL_NO) is 2 or more, it indicates that the same white or black color is continuously 1 byte or more, so that the necessary number of bytes of white or black data is continuously output. .
[0118]
If the end of the line has not been reached, the process returns to step C2, and the process is repeated for the remaining part of the target line. If the end of the line is reached and the processing for one screen is not completed, the process returns to the initialization process in step C1, and the process for the input change point data of the remaining lines is performed. When the process for all lines is completed, the process ends.
[0119]
In the example shown in FIG. 14, first, the fractional part is calculated until (FILL_NO) becomes 1 or more. In this example, the input change point data (CPOS) is between 5 and 7, and the byte length (BYTELEN) is 0 as shown in FIG.
[0120]
When the input change point data (CPOS) = 5, the fraction (BITPAT_NO) is 5 (change point to a black pixel), so the image pattern (BITPAT_REG) of the fraction part is for black corresponding to (BITPAT_NO) = 5. The image conversion table value (0x07), that is, BITPAT (BITPAT_NO) corresponding to CPOS shown in FIG.
[0121]
When the input change point data (CPOS) = 6, the fraction (BITPAT_NO) is 6, which is a change point to a white pixel, so that the table value (0xfc) obtained from the image conversion table for white (BITPAT_NO) = 6 ) And AND with the previous fractional image pattern (BITPAT_REG) to obtain (BITPAT_REG) (step C7).
[0122]
When (CPOS) = 7, since the color of the change point is black, the image pattern corresponding to (BITPAT_NO) = 7 obtained from the image conversion table for black and the image pattern (BITPAT_REG) of the previous fraction part By taking OR, (BITPAT_REG) is obtained (step C6).
[0123]
When (CPOS) = 9 (change point to a white pixel), since byte length (BYTELEN) = 1, (FILL_NO) = 1 is obtained in step C3. Therefore, the value of (BITPAT_REG) obtained immediately before is transferred to the output image area. Further, the image conversion table for white is referred to from (BITPAT_NO) = 1, and is substituted into (BITPAT_REG) (step C8).
[0124]
Thereafter, the same calculation is possible until (CPOS) = 15. When (CPOS) = 24 at the final change point, the previous byte length (BYTELEN-OLD) = 1, and since the byte length (BYTELEN) = 3, (FILL_NO) = 2. For this reason, in step C8, immediately before (BITPAT_REG) is output, (FILL_NO) -1 byte data, that is, 1-byte black image pattern is output. Depending on the input change point data (image pattern) to be processed, a white image pattern is output here.
[0125]
In this way, it is possible to convert the input change point data composed of the change point coordinate information sequence to white or black in the main scanning direction of the image pattern into image data.
[0126]
Next, an image processing method according to the fourth embodiment of the present invention will be described with reference to the flowchart shown in FIG. In the fourth embodiment, reduced image data is generated from the compressed image data without developing the entire image on the working memory.
[0127]
Step D1 is a step of generating one line of change point coordinate data including change point coordinate information from compressed data to white or black.
Step D2 is a step of generating change point information reduced in the sub-scanning direction based on the change point coordinate data generated in step D1.
[0128]
Step D3 is a step of generating change point information reduced in the main scanning direction based on the change point coordinate data generated in step D2.
Step D4 is a step of generating image data based on the change point information generated in step D2.
[0129]
Next, the data processing operation in the fourth embodiment will be described.
First, change point coordinate data including change point coordinate information for white or black is generated for one line from the compressed image data, and stored in the line buffer (step D1).
[0130]
For example, there are generally MH (Modified Huffman) coding method, MR (Modified READ) coding method and the like as coding methods for binary images. Compressed data (code data) obtained by compressing image data by these encoding methods is encoded according to a predetermined rule, and the change point coordinates to white or black are extracted based on this rule, Change point coordinate data.
[0131]
Next, using the change point coordinate data obtained in step D1, change point information reduced in the sub-scanning direction is generated. Here, the data reduction method described in the second embodiment is used. However, since the reduction in the sub-scanning direction is performed on the change point coordinate information string for two lines, that is, the change point data for two lines, the change point coordinate data for two lines (change point table) in step D1. ) Is executed.
[0132]
Note that step D2 uses the data reduction method described in the second embodiment, and a detailed description thereof is omitted.
Next, reduction processing in the main scanning direction is performed on the change point coordinate data obtained by the reduction processing in the sub-scanning direction in step D2 (step D3). Step D3 First It is assumed that the data reduction method described in the embodiment is used, and detailed description thereof is omitted.
[0133]
Next, the change point coordinate data obtained by the reduction process in the main scanning direction in step D3 is converted into image data. Since the change point coordinate data is reduced in both the main scanning direction and the sub-scanning direction, the original image data can be expanded by generating image data from the change point coordinate data here. Therefore, reduced image data can be obtained. Step D4 Third It is assumed that the data conversion method described in the embodiment is used, and detailed description thereof is omitted.
[0134]
If the process for the code data for one screen is not completed (step D5), the process returns to the process of step D1, and the process described above is executed for the next line. Thereafter, when the process for the code data for one screen is completed, the process ends.
[0135]
In this manner, the reduced image data can be generated from the compressed image data without developing the image data on the working memory. Therefore, the data transfer amount can be reduced, and high-speed image processing can be performed. In particular, in an image including graphics, characters, etc., when the white (blank) area is small, the amount of computation and memory access in the reduction processing are reduced, so that the speed of image processing can be greatly increased.
[0136]
【The invention's effect】
As described above in detail, according to the present invention, it is possible to perform image processing at high speed even with processing combining decompression processing and reduction processing, and to provide a reduction result with little image quality degradation.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a system configuration for realizing an image processing method according to an embodiment of the present invention.
FIG. 2 is a flowchart for explaining a data reduction method according to the first embodiment;
FIG. 3 is a flowchart for explaining a data reduction method according to the first embodiment;
FIG. 4 is a diagram for explaining a process of detecting a change point coordinate after reduction in the first embodiment;
FIG. 5 is a view for explaining processing for restoring a change point to a lost white pixel in the reduction calculation processing in step A10 in the first embodiment;
FIG. 6 is a flowchart for explaining a data reduction method in the image processing method according to the second embodiment.
FIG. 7 is a flowchart for explaining a data reduction method in the image processing method according to the second embodiment.
FIG. 8 is a diagram showing an example of an input change point table to be processed in the second embodiment.
FIG. 9 is a diagram for explaining a condition a in the second embodiment.
FIG. 10 is a diagram for explaining a condition c in the second embodiment.
FIG. 11 is a diagram for explaining a condition b in the second embodiment.
FIG. 12 is a diagram for explaining another case that does not satisfy any of the conditions a, b, and c in the second embodiment.
FIG. 13 is a flowchart for explaining a data conversion method in the image processing method according to the third embodiment.
FIG. 14 is a diagram showing an image generation process for explaining the operation of the data conversion method according to the third embodiment.
FIG. 15 is a diagram showing an example of an image conversion table in the third embodiment.
FIG. 16 is a diagram showing an image generation process for explaining the operation of the data conversion method according to the third embodiment.
FIG. 17 is a flowchart for explaining an image processing method according to the fourth embodiment;
FIG. 18 is a diagram for explaining conventional OR reduction processing;
FIG. 19 is a diagram showing a carry pattern generation process by DDA.
[Explanation of symbols]
10 ... CPU 10 12 ... RAM
14 ... VRAM 16 ... ROM
18 ... Input device 20 ... Input control unit
22 ... Display device 24 ... Display control unit
26 ... Storage device 28 ... Storage controller

Claims (4)

イメージデータの主走査方向における白画素及び黒画素への変化点座標列に対し、縮小倍率に応じた縮小後の変化点座標列を求め、
この求められた変化点座標列中の変化点座標について、それぞれ直前の変化点座標との距離を求め、
前記変化点座標列のそれぞれの変化点座標を、
求められた距離が0より大きく、かつ白画素への変化点座標である場合に、白画素への変化点候補とし、
求められた距離が0より大きくない場合に、直前の変化点座標に対応する白画素への変化点候補を無効とし、
求められた距離が0より大きく、かつ黒画素への変化点座標であり、かつ白画素への変化点候補が存在する場合に、黒画素への変化点座標とすると共に、白画素の変化点候補を白画素への変化点座標とし、
求められた距離が1より大きく、かつ黒画素への変化点座標であり、かつ白画素への変化点候補が存在しない場合に、黒画素への変化点座標とすると共に、直前の変化点座標に所定の座標値を加えた上で白画素への変化点座標とする
ことを特徴とするイメージ縮小方法。
For the change point coordinate sequence to the white pixel and the black pixel in the main scanning direction of the image data, obtain a change point coordinate sequence after reduction according to the reduction magnification,
For each change point coordinate in the obtained change point coordinate sequence, find the distance from the previous change point coordinate,
Each change point coordinates of the transition points coordinate series,
When the calculated distance is greater than 0 and the change point coordinate to the white pixel, the change point candidate to the white pixel is determined,
When the obtained distance is not greater than 0 , the change point candidate to the white pixel corresponding to the immediately previous change point coordinate is invalidated,
When the obtained distance is greater than 0 , the change point coordinate to the black pixel, and the change point candidate to the white pixel exists , the change point coordinate to the black pixel is set as the change point of the white pixel. Let the candidate be the coordinates of the change point to the white pixel,
When the obtained distance is greater than 1 , the change point coordinate to the black pixel, and the change point candidate to the white pixel does not exist , the change point coordinate to the black pixel is set and the previous change point coordinate is set. A method for reducing an image, wherein a predetermined coordinate value is added to a change point coordinate to a white pixel.
イメージデータの主走査方向における白画素及び黒画素への変化点座標列からなる第1変化点テーブルと、前記第1変化テーブルの副走査方向への次のラインの変化点座標列からなる第2変化点テーブルに対し、何れかの変化点テーブル中の黒画素への変化点位置が小さい変化点座標を注目変化点とすると共に変換後の黒画素への変化点座標とし、注目変化点の右側にある最初の白画素への変化点を白変化点候補とし、
注目変化点のある変化点テーブルの反対側の変化点テーブルで、変化点座標値が白変化点候補以上となる変化点を検出し、
検出した変化点が白変化点候補と同じ座標位置にあり、その色が白画素への変化点であった場合、または白変化点候補を越える座標位置にあり、その色が黒画素への変化点であった場合に、白変化点候補を変換後の白画素への変化点座標とし、
検出した変化点が白変化点候補と同じ座標位置にあり、その変化点の色が黒画素への変化点であった場合、この変化点を注目変化点とし、その右側にある最初の白画素への変化点を白変化点候補とし、
検出した変化点が白変化点候補を越える座標位置にあり、その変化点の色が白画素への変化点であった場合、白変化点候補の位置を注目変化点とし、この検出した変化点を白変化点候補とし、
注目変化点または白変化点候補がライン終端であるかを判定し、ライン終端である場合、白変化点候補を変換後の白画素への変化点座標とすることを特徴とするイメージ縮小方法。
A first change point table comprising change point coordinate sequences for white and black pixels in the main scanning direction of image data, and a second change point coordinate sequence for the next line in the sub-scanning direction of the first change table. For the change point table, change point coordinates with small change point positions to black pixels in any of the change point tables are set as the change point coordinates of interest and change point coordinates to the converted black pixels, and to the right of the change point of interest. The change point to the first white pixel in is a white change point candidate,
In the change point table on the opposite side of the change point table with the attention change point, detect the change point where the change point coordinate value is equal to or greater than the white change point candidate,
If the detected change point is at the same coordinate position as the white change point candidate and the color is a change point to a white pixel, or is in a coordinate position that exceeds the white change point candidate, the color changes to a black pixel If it is a point, the white change point candidate is the change point coordinate to the converted white pixel,
If the detected change point is at the same coordinate position as the white change point candidate and the color of the change point is a change point to a black pixel, this change point is set as the change point of interest, and the first white pixel on the right side of the change point Let the change point to be a white change point candidate,
If the detected change point is at a coordinate position that exceeds the white change point candidate and the color of the change point is a change point to a white pixel, the position of the white change point candidate is taken as the change point of interest, and this detected change point As a white change point candidate,
An image reduction method characterized in that it is determined whether a target change point or a white change point candidate is the end of a line, and if it is the end of a line, the white change point candidate is used as a change point coordinate to a converted white pixel.
イメージデータの主走査方向における白画素及び黒画素への変化点座標列から順次読み出され変化点座標のそれぞれを所定の値で除算し商と余り値を求め、
この変化点座標のそれぞれについて求めた商と、この商に対応する変化点座標の直前の変化点座標に対して求めた商との差をそれぞれ求め、
この求めた差の値が0の時に、所定の値に達しない変化点座標に対するイメージパターンを前記余り値に応じて求め、
求めた差の値が1以上の時に、所定の値に達しない変化点座標に対して求めた前記イメージパターンを変換結果のイメージパターンとして出力し、さらに求めた差に応じた白画素または黒画素が連続するイメージパターンを変換結果のイメージパターンとして出力することを特徴とするデータ変換方法。
Obtains the quotient and remainder values by dividing the respective changing point coordinates Ru sequentially read from the change point coordinate strings to white pixels and black pixels in the main scanning direction of the image data by a predetermined value,
Determined and the quotient obtained for each of the coordinates of the transition points, the difference between the quotient obtained for the change point coordinates immediately before the change point coordinates corresponding to the quotient, respectively,
When the value of the calculated difference is zero, determined in accordance with the image pattern on the remainder values with respect to the change point coordinates which does not reach a predetermined value,
When the value of the obtained difference is greater than 1, and an image pattern of the image pattern conversion results obtained for the change point coordinates which does not reach a predetermined value and outputs a white pixel or black depending on the further calculated difference A data conversion method comprising outputting an image pattern in which pixels are continuous as an image pattern of a conversion result.
イメージデータを符号化して得られる圧縮データをもとに、縮小処理を施したイメージを生成するイメージ処理方法において、
圧縮データから白画素及び黒画素への変化点座標列を生成し、
この生成された変化点座標列をもとに請求項2に記載されたイメージ縮小方法により、副走査方向に対して縮小した変化点座標列を生成し、生成した変化点座標列をもとに請求項1に記載されたイメージ縮小方法により、主走査方向に対して縮小した変化点座標列を生成し、この生成した変化点座標列をもとに請求項3に記載されたデータ変換方法により、イメージデータを生成し、以上の処理を1画面分実行することで、圧縮データから縮小後のイメージデータを生成することを特徴とするイメージ処理方法。
In an image processing method for generating a reduced image based on compressed data obtained by encoding image data,
Generate a change point coordinate sequence from compressed data to white and black pixels,
Based on the generated change point coordinate sequence, the image reduction method described in claim 2 generates a change point coordinate sequence reduced in the sub-scanning direction, and based on the generated change point coordinate sequence. A change point coordinate sequence reduced in the main scanning direction is generated by the image reduction method according to claim 1, and the data conversion method according to claim 3 is performed based on the generated change point coordinate sequence. An image processing method characterized by generating image data and generating the reduced image data from the compressed data by executing the above processing for one screen.
JP01603896A 1996-01-31 1996-01-31 Image processing method Expired - Lifetime JP3724868B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01603896A JP3724868B2 (en) 1996-01-31 1996-01-31 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01603896A JP3724868B2 (en) 1996-01-31 1996-01-31 Image processing method

Publications (2)

Publication Number Publication Date
JPH09214752A JPH09214752A (en) 1997-08-15
JP3724868B2 true JP3724868B2 (en) 2005-12-07

Family

ID=11905421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01603896A Expired - Lifetime JP3724868B2 (en) 1996-01-31 1996-01-31 Image processing method

Country Status (1)

Country Link
JP (1) JP3724868B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4609141B2 (en) * 2005-03-25 2011-01-12 富士ゼロックス株式会社 Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JPH09214752A (en) 1997-08-15

Similar Documents

Publication Publication Date Title
JP2921659B2 (en) Apparatus and method for resizing video image
US6064407A (en) Method and apparatus for tiling a block of image data
JP3327621B2 (en) Graphic system and method for performing object sorting and edge calculation
JPS5932029B2 (en) image resizer
JP3586991B2 (en) Texture data reading device and rendering device
US6011566A (en) System and method to display raster images with negligible delay time and reduced memory requirements
JPS61136177A (en) Apparatus for use in calculation of image data
JPH1049665A (en) Device and method for image processing
JP3724868B2 (en) Image processing method
JPH0553909A (en) Cache memory control system for image data processing
JP2817771B2 (en) Image data rotation method and system
Biswas One-dimensional B–B polynomial and Hilbert scan for graylevel image coding
JP3795564B2 (en) Image expansion processing method
JPH06274149A (en) Method and device for varying width of outline font
JPH10198333A (en) Outline character drawing device
Schrack et al. The spatial U-order and some of its mathematical characteristics
US5838297A (en) Method for color image scaling and other geometrical transformations
JP2507812B2 (en) Square root calculation method
JP3211591B2 (en) Image processing device
JPH1173497A (en) Method and device for image processing and storage medium stored with image processing program
JPH0573693A (en) Outline paint out system
JP3108582B2 (en) Thicker text generator
JP3710208B2 (en) Image processing method and apparatus
JPH11224331A (en) Raster image generation device and raster image generation method
JPS62284441A (en) Address control device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050301

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050513

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050920

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

Free format text: PAYMENT UNTIL: 20080930

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090930

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090930

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100930

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100930

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110930

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120930

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120930

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130930

Year of fee payment: 8

EXPY Cancellation because of completion of term