Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4050822B2 - Image scaling processing apparatus and image scaling processing method - Google Patents
[go: Go Back, main page]

JP4050822B2 - Image scaling processing apparatus and image scaling processing method - Google Patents

Image scaling processing apparatus and image scaling processing method Download PDF

Info

Publication number
JP4050822B2
JP4050822B2 JP13184798A JP13184798A JP4050822B2 JP 4050822 B2 JP4050822 B2 JP 4050822B2 JP 13184798 A JP13184798 A JP 13184798A JP 13184798 A JP13184798 A JP 13184798A JP 4050822 B2 JP4050822 B2 JP 4050822B2
Authority
JP
Japan
Prior art keywords
pixel
pixels
output
image
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP13184798A
Other languages
Japanese (ja)
Other versions
JPH11331568A (en
Inventor
文子 輿水
真一 佐藤
義和 内藤
Original Assignee
パナソニック コミュニケーションズ株式会社
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 パナソニック コミュニケーションズ株式会社 filed Critical パナソニック コミュニケーションズ株式会社
Priority to JP13184798A priority Critical patent/JP4050822B2/en
Publication of JPH11331568A publication Critical patent/JPH11331568A/en
Application granted granted Critical
Publication of JP4050822B2 publication Critical patent/JP4050822B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、ファクシミリ、スキャナ、ディジタルコピーなどのディジタルデータの画像処理装置に関し、特に、文字や線画を含む画像を任意の倍率で拡大する画像変倍処理装置及び画像変倍処理方法に関する。
【0002】
【従来の技術】
従来の2値化された画像の拡大及び縮小機能を有する画像変倍処理装置において、例えば、特開平6−164896号又は特開平6−253140号に開示されているように、縮小時には縮小率に応じた間隔で間引き処理を行なう一方、拡大時には整数倍拡大を行った後に縮小と同じ処理により拡大率に応じた周期の間引き処理を行なう。これにより、任意倍率の拡大縮小処理を行っている。また、主走査方向及び副走査方向に4倍拡大を行なうとき、一旦出力された2倍拡大の画像データを再入力して、同じ回路を通して4倍拡大の画像データを得ている。
【0003】
【発明が解決しようとする課題】
しかし、上述の従来技術の構成では、拡大時に2倍より小さい拡大率の場合、平滑化処理(スムージング)によって凹凸を少なくした2倍拡大の画像を、画像データに関わりなく周期的に間引き処理を行なうため、最終的な出力画像は凹凸に戻ってしまう。
【0006】
本発明は、かかる点に鑑みてなされたものであり、第1に、画像データを任意の倍率で拡大するにあたり高速行うことができ、第2に、画像データを任意の倍率で拡大するにあたり凸凹の少ない滑らかな画像を得ることができる画像変倍処理装置及び画像変倍処理方法を提供することを目的とする。
【0007】
【課題を解決するための手段】
本発明は、上述の課題を解決するため、以下の構成を備えたものである。
【0008】
請求項1記載の画像変倍処理装置に関する発明は、画像データのうち注目画素を含む参照エリアを複数の画素配置パターンと比較し前記参照エリアと一致する画素配置パターンを判定するパターンマッチ部と、複数の画素で構成され互いに前記画素の配置が異なる複数の画素ブロックを予め記憶する記憶部と、前記複数の画素ブロックの中から前記参照エリアと一致する画素配置パターンに対応する画素ブロックを選択する画素出力部と、画像の拡大率に応じた線密度変換前の注目画素に対応する線密度変換後の画素の位置と線密度変換前の注目画素に隣接する隣接画素に対応する線密度変換後の画素の位置との差に応じた数の画素を前記画素出力部が選択した画素ブロックより選択して出力する出力画素選択部を具備する構成を採る。
【0009】
この構成により、画素出力部が、記憶部に記憶した複数の画素ブロックの中から、パターンマッチ部で判定した画素配置パターンに対応する画素ブロックを選択し、出力画素選択部が、拡大率に応じた数の画素を画素ブロックより選択して出力するため、画像データを任意の倍率で拡大するにあたり処理が高速化すると共に回路が簡略化する。
【0012】
請求項記載の発明は、請求項1記載の画像変倍処理装置の発明において、出力画素選択部は、画素出力部が選択した画素ブロックが隅部に注目画素の反転画素を有する場合、線密度変換前の画像において前記隅部と逆対角線上に位置する隣接画素を参照して、参照した画素が全て注目画素と異なる画素データである場合前記隅部を含む画素を画素ブロックから選択して出力し、参照した画素が注目画素と同じ画素データを含む場合前記隅部を除く画素を画素ブロックから選択して出力することを特徴とする構成を採る。
【0013】
この構成により、出力画素選択部は、拡大及び平滑化された画素ブロックからより小さい画素を選択して出力するに際し、線密度変換前の画像の隣接画素を参照するため、単に周期的な間引きを行うよりも、出力画像、特に文字部分での凹凸が少なくなる。
【0014】
請求項3記載の画像変倍処理方法に関する発明は、画像データのうち注目画素を含む参照エリアを複数の画素配置パターンと比較し前記参照エリアと一致する画素配置パターンを判定し、複数の画素で構成され互いに前記画素の配置が異なる予め記憶された複数の画素ブロックの中から前記参照エリアと一致する画素配置パターンに対応する画素ブロックを選択し、画像の拡大率に応じた線密度変換前の注目画素に対応する線密度変換後の画素の位置と線密度変換前の注目画素に隣接する隣接画素に対応する線密度変換後の画素の位置との差に応じた数の画素を選択された画素ブロックより選択して出力する方法を採る。
【0015】
この方法により、複数の画素ブロックを予め用意し、参照エリアと一致する画素配置パターンに対応する画素ブロックを前記複数の画素ブロックの中から選択し、画像の拡大率に応じた数の画素を選択された画素ブロックより選択するため、画像データを任意の倍率で拡大するにあたり処理を迅速に行なえる。
【0018】
請求項記載の発明は、請求項記載の画像変倍処理方法の発明において、選択した画素ブロックが隅部に注目画素の反転画素を有する場合、線密度変換前の画像において前記隅部と逆対角線上に位置する隣接画素を参照して、参照した画素が全て注目画素と異なる画素データである場合前記隅部を含む画素を画素ブロックから選択して出力し、参照した画素が注目画素と同じ画素データを含む場合前記隅部を除く画素を画素ブロックから選択して出力する方法を採る。
【0019】
この方法により、画素ブロックから小さい画素を選択して出力するのに、線密度変換前の画像の隣接画素を参照するため、単に周期的な間引きを行うよりも、出力画像、特に文字部分での凹凸が少なくなる。
【0030】
【発明の実施の形態】
以下、本発明の実施の形態1、2について図面を参照にして説明する。
【0031】
(実施の形態1)
図1は、本発明の実施の形態1に係る画像変倍処理装置の概略を示すブロック図である。
【0032】
画像入力回路1は、端子aから入力される2値画像データを複数ライン分記憶し、各回路に必要な画像データを与える。
【0033】
パターンマッチ回路2は、画像入力回路1より、注目画素を中心とした5×5画素の画像データ(以下、参照エリアという)を得て、この参照エリアを予め定義された5×5画素の画素配置パターンと比較し、比較結果に対応したデータを出力する。より詳細には、パターンマッチ回路2は、複数の画素配置パターンを記憶すると共に、各画素配置パターンに注目画素を2倍にした場合に2×2画素出力回路5から出力すべき2×2画素を対応づけて記憶している。
【0034】
倍率演算回路3は、端子bから入力される主走査方向倍率と、端子cから入力される副走査方向倍率を得て、出力画素のアドレス位置を算出すると共に、4倍拡大処理が必要か否かの判断も行なう。ここで、4倍拡大とは、主走査方向又は副走査方向の少なくともいずれか一方を4倍拡大することをいう。
【0035】
構成画素選択回路4は、2×2画素出力回路5、2×2画素記憶部6、4倍画素選択回路7及び変換テーブル8で構成されている。
【0036】
2×2画素出力回路5は、パターンマッチ回路2から出力されたデータ又は4倍画素選択回路7から出力されたデータに従って、2×2画素記憶部6に記憶した2×2画素を選択出力する。2×2画素記憶部6は、図2に示すように、注目画素及びその反転画素で構成した14個の2×2画素の画素ブロック(a)〜(n)を記憶している。図2中、白地の画素は注目画素と同じ画像データを示し、ハッチングが付された画素は注目画素とは異なる画素データを示す。
【0037】
4倍画素選択回路7は、倍率演算回路3が4倍拡大処理を要求した場合に、2×2画素出力回路5が出力した画素ブロックに対応する2×4画素、4×2画素又は4×4画素(以下、4倍画素という)を、画像入力回路1から得た元画像を参照し、かつ、変換テーブル8に従って選択する。ここで、4倍画素選択回路7は、画素ブロックの画素データそのものではなく、画素ブロックの種別データを得る。4倍画素選択回路7は、4倍画素を構成する複数の2×2画素の種別データを2×2画素出力回路5に送信する。
【0038】
変換テーブル8は、画素ブロック(a)〜(n)の夫々について、4倍画素に変換した場合に4倍画素を構成する画素ブロックの種別データを対応づけている。
【0039】
出力画素選択回路9は、倍率演算回路3でのアドレス算出の結果及び4倍拡大処理の要否判断の結果に従って必要な画素を出力する。具体的には、1×1画素が必要な場合には、画像入力回路1より注目画素の画像データを受け取り、そのまま出力する。また、2×1画素又は1×2画素が必要な場合には画素ブロックから2×1画素又は1×2画素を切り出して出力する。また、2×2画素が必要な場合には、2×2画素出力回路5からの出力をそのまま出力する。さらに、4倍画素が必要な場合には4倍画素選択回路7に従って2×2画素出力回路5が出力した複数の画素ブロックを出力する。
以下、上述のような構成からなる画像変倍処理装置の動作を図3に沿って説明する。図3は上記実施の形態1にかかる画像変倍処理装置の動作フロー図である。
【0040】
工程(以下、STという)301において、倍率演算回路3が、主走査方向倍率及び副走査方向倍率に基づいて、アドレス位置決定を行なう。アドレス位置決定においては、まず、線密度変換後の出力画像の座標上において元画像の注目画素の中心点が置かれる画素のアドレス(以下、中核アドレスという)を算出する。この中核アドレスを含む2×2画素分のアドレスに、注目画素を拡大及び平滑化した2×2画素のデータを書き込む。
【0041】
しかし、倍率によっては2×2画素分のアドレスの空きがない場合が生じる。この場合には、1×1画素、2×1画素又は1×2画素分のアドレスを割り当てる必要がある。割り当ての決定は、元画像において注目画素の1ライン上の画素の中核アドレスと注目画素の中核アドレスとの差α、及び、1画素前の画素の中核アドレスと注目画素の中核アドレスとの差βをそれぞれ求め、α×β画素分のアドレスを注目画素に割り当てる。
【0042】
図4は、元画素A〜Dを1.5倍拡大する場合の出力画像の座標を示す模式図である。図4中太線は元画像のマトリックスを示し、細線は線密度変換後の出力画像のマトリクスを示す。図4において、出力画像の1画素の1辺lを100H(ヘキサ)とすると、元画素の1画素の一辺Lは180Hとなる。この出力画像の座標上において、元画像の画素Aの中心点OAは、出力画像のアドレス(x、y)に置かれる。従って、画素Aの中核アドレスを(x、y)とする。この画素Aの1ライン上の画素の中核アドレスは(x、y−2)であり、その差αは2である。一方、画素Aの1画素前の画素の中核アドレスは(x−2、y)であり、その差βは2である。従って、画素Aには2×2画素分のアドレスが割り当てられる。
【0043】
また画素Bについてみると、画素Bの中核アドレスは(x+1、y)である。この画素Bの1ライン上の画素の中核アドレスは(x+1、y−2)であり、その差αは2である。一方、画素Bの1画素前の画素Aの中核アドレスは(x、y)であり、その差βは1である。従って、画素Aには2×1画素分のアドレスが割り当てられる。同様に、画素Cには1×2画素分のアドレスが割り当てられ、画素Dには1×1画素分のアドレスが割り当てられる。
【0044】
図5は、アドレス算出処理の過程を概念的に示す模式図である。元画素の画素A〜Dは、拡大及び平滑化により2×2画素の画素ブロックに変換される。変換された2×2画素は、アドレス算出及び割り当てで決定したアドレスに書き込まれる。
【0045】
ST302において、画像入力部1より注目画素を中心とする5×5画素の参照エリアをパターンマッチ回路2に入力する。
【0046】
ST303において、参照エリアと予め定義された5×5画素の画素配置パターンとを比較して、パターンマッチ処理を行なう(ST302)。すなわち、パターンマッチ回路2は、参照エリアに一致する画素配置パターンを判定し、この画素配置パターンに対応づけられた画素ブロックの種別データを出力する。
【0047】
ST304において、2×2画素出力回路5は、パターンマッチ回路2が出力した画素ブロックの種別データに従って、図2に示す14種類の画素ブロック(a)〜(n)のデータから該当するものを選択し出力する。
【0048】
ST305において、出力画素選択回路9は、アドレス位置決定の結果、必要な出力画素が4倍画素か否かを判定する。出力画素が4倍画素であった場合(Yes)、ST306において、4倍画像選択回路7が2×2画素出力回路5から出力された画素ブロックを元にして、4倍画素を得るのに必要な画素ブロックを選択する。例えば、主走査方向の倍率2.0倍、副走査方向の倍率4.0倍で2×2画素出力回路5の出力が2×2画素(a)であったとき、元画像データを参照した上で、図2に示す2×2画素(h)及び(n)又は(a)及び(n)の組み合わせを選択する。また、2×2画素出力回路5の出力が2×2画素(g)であったときは、2×2画素(c)及び(k)又は(b)及び(j)の組み合わせを選択する。
【0049】
ST307においては、4倍画素選択回路7が出力した画素ブロックの種別データに該当する画素ブロックの組み合わせを出力する。
【0050】
一方、ST305において、アドレス位置決定の結果、必要な出力画素が4倍画素でない(No)と判断した場合、ST308において、必要な出力画素が1×2画素又は2×1画素か否かを判定する。出力画素が1×2画素又は2×1画素であった場合(Yes)、ST309において、出力画素選択回路9は、2×2画素出力回路5が出力した画素ブロックから1×2画素又は2×1画素を選択する。この2×1画素又は2×1画素を切り出すにあたり、画素ブロックのうち1ヶ所が注目画素と異なる画像データを有する場合には周辺画素を参照する。
【0051】
図6は、上記実施の形態1に係る画像変倍処理装置における出力画素選択回路9による1×2画素又は2×1画素の切り出し手順を示す概略図である。図6に示すように、出力画素選択回路9は、画素ブロック601の元になった注目画素602を中心として3×3画素の参照エリア603を画像入力部1より得る。画素ブロック601が右上隅又は左下隅に注目画素と異なる画素データ(以下、反転画素データという)、言い換えれば画像データが変更された画素を有するとき(601a、601b)、参照エリア603で反転画素データと逆対角線上でかつ注目画素602に隣接する参照画素604、607を参照して、画素ブロック601a、601bから切り出す1×2画素608又は2×1画素609を決定する。
【0052】
同様に、画素ブロック601が左上隅又は右下隅に反転画素データを有するとき(601c、601d)、参照エリア603で反転画素データと逆対角線上でかつ注目画素602に隣接する参照画素605、606を参照して、画素ブロック601c、601dから切り出す1×2画素608又は2×1画素609を決定する。
【0053】
例えば、図7に示すように、注目画素701が黒画素(B)であり、拡大及び平滑化した画素ブロック702が左上隅に白画素(W)703を有するときに2×1画素を切り出す場合を例に挙げて説明する。白画素703と逆対角線上にあり注目画素701に隣接する2つの参照画素704及び705が両方とも白画素である場合には、画素ブロック702から左側の2×1画素706を切り出す。
【0054】
一方、白画素703と逆対角線上にあり注目画素701に隣接する2つの参照画素704及び705のいずれか一方が黒画素である場合には、画素ブロック702から左側の2×1画素707を切り出す。
【0055】
ST308において、アドレス位置決定の結果、必要な出力画素が1×2画素又は2×1画素でない(No)と判断した場合、ST310において、出力画像が1×1画素であるか否か判定する。出力画像が1×1画素である場合(Yes)、ST311において、出力画素選択回路9は、画像入力部1より注目画素と同じ画素データを得て、出力する。
【0056】
ST310において、アドレス位置決定の結果、必要な出力画素が1×1画素でない(No)と判断した場合、ST312において、出力画素選択回路9は、2×2画素出力回路5からの画素ブロックをそのまま出力する。
【0057】
以上説明したように、上記実施の形態1に係る画像変倍処理装置によれば、上記ST303及びST304では、2×2画素出力回路5が、2×2画素記憶部6に記憶された複数の画素ブロックの中から、パターンマッチ回路2で判定した画素配置パターンに対応する画素ブロックを選択して出力するため、注目画素を2倍して得た2×2画素を平滑化する場合に比べて、処理が高速化すると共に回路を簡略化できる。
【0058】
上記ST306及びST307では、2×2画素出力回路5が出力した平滑化後の画素ブロックを4倍画素に変換するに際して、従来のように4倍拡大の画像データを再入力する必要がないので、中間処理用の1ページ分のページメモリが不要である。また、予め用意した画素ブロックを使って4倍画素を組み立てるので、従来2倍画素をさらに2倍して4倍画素を生成していた場合に比べて、処理が高速になると共に回路の構成を簡素化できる。
【0059】
また、上記ST309では、拡大及び平滑化された2×2画素から1×2画素及び2×1画素を切り出す際、元画像の周辺画素を参照するため、単に周期的な間引きを行うよりも、出力画像、特に文字部分での凹凸を少なくすることができる。
【0060】
(実施の形態2)
以下、本発明の実施の形態2に係る画像変倍処理装置について図面を参照して説明する。
【0061】
図8は、上記実施の形態2に係る画像変倍処理装置の全体ブロック図である。
【0062】
画像入力部81は、端子aから入力される2値画像データを複数ライン分記憶し、各回路に必要な画像データを与える。
【0063】
アドレス算出回路82は、端子bから入力される主走査方向倍率と、端子cから入力される副走査方向倍率を得て、出力画素のアドレス位置を算出する。
【0064】
画素位置判定回路83は、アドレス算出回路82の結果を得て縮小後の一画素となる画素ブロックの縮小対象画素群(元画像を縮小した場合に一画素となる複数の画素)における注目画素の位置を判定する。画素位置判定回路83は、判定した注目画素の位置情報を、細線判定回路84及び間引処理回路85に送る。
【0065】
細線判定回路84は、注目画素が細線を構成する画素に含まれるか否か判定する回路である。細線は例えば1〜4画素幅の線をいう。具体的には、細線判定回路84は、画像入力部81から注目画素を含む8×8画素の参照エリアを得て、この参照エリアを予め用意した8×8画素の画素配置パターンと比較し、参照エリアが画素配置パターンに一致した場合に注目画素が細線を構成すると判定する。この細線判定回路84は、画素位置判定回路83で得た注目画素の位置情報によって画素配置パターンを変更する。従って、細線判定に画素位置を考慮に入れている。言い換えれば、細線判定回路84は画像位置に応じて細線判定を行なう。細線判定回路84は、各注目画素について細線判定を行ない、その結果を間引処理回路85及び記憶部86に送る。
【0066】
間引処理回路85は、注目画素を間引くべきか否か判定する回路である。間引処理回路85は、判定にあたり、画素位置判定回路83で得た注目画素の画素位置、細線判定回路84で得た注目画素の細線情報を参照する。さらに、間引処理回路85は、記憶部86より、出力画像において1ライン前の確定した画素(以下、前ライン確定画素という)の画素データ及び細線情報、並びに、当該注目画素処理時における出力画素の1画素前の画素(以下、1画素前候補画素という)の画素データ及び細線情報を参照する。また、間引処理回路85は、処理中の縮小対象画素群の画素(以下、縮小対象画素群候補画素という)の画素データ及び細線情報も参照する。また、間引処理回路85は、画像入力部81から得た注目画素を含む8×8画素の参照エリア及び画素配置パターンを比較したパターンマッチの結果も参照することができる。
【0067】
記憶部86は、前ライン確定画素、1画素前候補画素及び縮小対象画素群候補画素の画像データ及び細線情報を夫々記憶するメモリである。
【0068】
以下、上記構成からなる画像変倍処理装置の動作を動作フロー図に沿って説明する。図9は、上記実施の形態2に係る画像変倍処理装置の動作フロー図である。
【0069】
ST901において、アドレス算出回路82が、主走査方向及び副走査方向の倍率により注目画素のアドレス位置を算出する。
【0070】
ST902において、画素位置判定回路83は、算出したアドレス位置に基づいて、注目画素が縮小対象画素群の中でどの位置にあたるかを判定する。
【0071】
ST903において、細線判定回路84は、細線を構成している画素に含まれるか否かを判定する。以下、この細線判定の手順について詳細に説明する。細線判定回路84は、画像入力部81より注目画素を含む8×8画素の参照エリアを得る。この参照エリアを、予め用意した画素配置パターンと比較し、参照エリアが画素配置パターンに一致した場合、注目画素が細線を構成する画素に含まれると判定する。この判定において、細線判定回路84は、画素位置判定回路83が判定した縮小対象画素群の中での位置(以下、画素位置という)、及び、前ライン確定画素又は1画素前候補画素の情報を考慮に入れる。
【0072】
図10(A)及び図10(B)は、細線判定回路84による細線判定に用いる画素配置パターンを示す説明図である。
【0073】
まず、図10(A)を参照する。細線判定回路84は、画素配置パターン103、112を用いてパターンマッチを行う。画素配置パターン103において、105は注目画素を示し、106は黒画素を示し、107は白画素を示し、108はいずれか1つが白画素であることを示す。これにより、パターンマッチの結果、注目画素を含む参照エリアが、画素配置パターン103または112いずれか一方に一致した場合、細線判定回路84は、注目画素を白細線と判定する。
【0074】
また、図10(B)を参照して、1画素前候補画素を参照する場合について説明する。図中101は判定条件を示す。この場合、注目画素の画素位置が、4×4画素の縮小対象画素群102の中で座標(0、1)、(0、2)、(0、3)のいずれかであり、かつ、1画素前候補画素が白画素(W)であり、かつ、細線情報が白細線である場合、細線判定回路84は、画素配置パターン104を用いてパターンマッチを行う。パターンマッチの結果、注目画素を含む参照エリアが、画素配置パターン104に一致した場合、細線判定回路84は、注目画素を白細線候補と判定する。
【0075】
次に、図10(C)を参照して、前ライン確定画素を参照する場合について説明する。図中109は判定条件を示す。この場合、注目画素の画素位置が、4×4画素の縮小対象画素群110の中で座標(1、0)、(2、0)、(3、0)のいずれかであり、かつ、前ライン確定画素が白画素(W)である場合、細線判定回路84は、画素配置パターン113を用いてパターンマッチを行う。パターンマッチの結果、注目画素を含む参照エリアが、画素配置パターン113に一致した場合、細線判定回路84は、注目画素を白細線候補と判定する。
【0076】
また、細線判定回路84は、図10(B),(C)である場合、注目画素の細線情報を白細線候補とする。これは細線幅上に複数の縮小対象画素群が存在する場合に、後述の間引き処理で縮小画素が黒画素を優先とすると細線の繋ぎ目に凹凸や途切れが生じるのを防ぐためである。
【0077】
上記実施の形態2では、黒細線を1、白細線を4、白細線候補を5、細線なしを0で夫々表す。細線判定回路84は、これらの判定結果を間引処理回路85に送信する。
【0078】
上記細線判定では、参照エリアとして8×8画素を用い、注目画素の座標を(4、4)としているため、4画素幅の細線を判定するとき、細線の下端又は右端で判定せざるを得ない。しかしながら、細線を構成する画素の全てで細線判定することが可能である。しかし、この場合、より多くの画素配置パターンが必要になる。
【0079】
ST904において、間引処理回路85は、注目画素の間引き処理を行なう。この間引き処理において、以下の情報のうち少なくとも2つに基づいて、注目画素を間引くか否か、言い換えれば、注目画素のデータでそれまでの同一縮小対象画素群の候補画素のデータを重ね書きするか否かを総合的に判定する。
(i) 処理中の注目画素(以下、処理中画素という)の画素データ:d[3][3]
(ii)処理中画素の細線情報:wtpt
(iii)同一縮小対象画素群の候補画素(以下、画素群候補画素という)の画素データ:xpt[0]
(iv)画素群候補画素の細線情報:xpt[3]
(v)前ライン確定画素の画素データ:adkp
(vi) 1画素前候補画素の画素データ:adxt
(vii)処理中画素のx方向及びy方向の出力アドレス:xt0[0],yt0[0]
(viii)処理中画素の右隣の画素のx方向出力アドレス:nextx
(ix)処理中画素の下の画素のy方向出力アドレス:nexty
(x)縮小画素群の処理における前ラインまでの処理結果:ad[yt0[0]][xt0[0]]
さらに特定の場合には、予め用意した画素配置データとのパターンマッチにより間引き判定を行なう。
【0080】
以下、間引き処理をさらに詳細に説明する。
【0081】
間引き処理は、第1に、重ね書きの方向によって大きく分けられる。
【0082】
(I)x方向の重ね書きに関する処理
x方向の重ね書きとは、X方向の縮小における処理のことをいう。
【0083】
画素群候補画素の画素データと処理中画素の画素データとが一致する場合、画素データの変更がない。細線情報は、黒細線(1)、白細線(4)、白細線候補(5)、細線なし(0)の優先順位で重ね書きを行なう。
【0084】
画素群候補画素の画素データと処理中画素の画素データとが一致しない場合、図11(A)及び図11(B)に示すテーブルに従って判断を行なう。すなわち、図11(A)に示すテーブルは、処理中画素の画素データが白画素(W)で、かつ、画素群候補画素の画素データが黒画素(B)である場合の判断基準を示す。ここで、列は処理中画素の細線情報(wtpt)の種別(0、4又は5)を示し、行は画素群候補画素の細線情報(xpt[3])の種別(0、1、4、5)を示す。図11(A)のテーブルにおいて、Bは黒画素を活かす、すなわち重ね書きを行なわないことを示す。またWは白画素とする、すなわち重ね書きを行なうことを示す。また、*1は、1画素前候補画素の画素データ(adxt)が白画素のとき重ね書きを行なわず、1画素前候補画素の画素データ(adxt)が黒画素のとき重ね書きを行なうことを示す。また、*2は処理中画素のx方向出力アドレス(xt0[0])が処理中画素の次の画素のx方向出力アドレス(nextx)とが一致しないとき、すなわち縮小対象群の中での画素位置が右端である場合、重ね書きを行なうことを示している。また、−は存在しないデータであることを示す。
【0085】
一方、図11(B)に示すテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。図11(B)のテーブルにおいて、Bは黒画素とする、すなわち重ね書きを行なうことを示す。またWは白画素を活かす、すなわち重ね書きを行なわないことを示す。また、*1は、1画素前候補画素の画素データ(adxt)が白画素のとき重ね書きを行ない、前ライン確定画素の画素データ(adxt)が黒画素のとき重ね書きを行なわないことを示す。また、−は存在しないデータであることを示す。
【0086】
また、5画素以上連続する白画素が縮小されて黒でつぶれないようにするために以下の特殊処理を行なう。
【0087】
特殊処理は、図12(A)に示すように、以下の条件に適合する場合に行なう。
(1)処理中画素の縮小対象画素群の中の画素位置のx方向アドレス(xcnt)が、2又は3であること、
(2)処理中画素のx方向出力アドレス(xt0[0])が処理中画素の次の画素のx方向出力アドレス(nextx)とが一致しないこと
(3)1画素前候補画素の画素データ(adxt)が黒画素であること、
(4)画素群候補画素の画素データ(xpt[0])が白画素であること、
(5)画素群候補画素の細線情報(xpt[3])が細線なし(0)であること、及び、
(6)パターンマッチにより参照画素が図12(B)に示す画素配置パターンに一致したこと。
【0088】
この場合、図12(C)に示すテーブルに従って判断を行なう。すなわち、このテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。ここで、Bは黒画素とする、すなわち重ね書きを行なうことを示す。またWは白画素を活かす、すなわち重ね書きを行なわないことを示す。また、*1は、前ライン確定画素の画素データ(adxt)が白画素のとき重ね書きを行ない、1画素前候補画素の画素データ(adxt)が黒画素のとき重ね書きを行なわないことを示す。また、−は存在しないデータであることを示す。
【0089】
以上説明した判断に従って重ね書きを行なう際に細線情報も重ね書きする。
【0090】
(II)y方向の重ね書きに関する処理
y方向の重ね書きとは、y方向の縮小における処理のことをいう。
【0091】
画素群候補画素の画素データと処理中画素の画素データとが一致する場合、(I)と同様に、画素データの変更がない。細線情報は、黒細線(1)、白細線(4)、白細線候補(5)、細線なし(0)の優先順位で重ね書きを行なう。
【0092】
画素群候補画素の画素データと処理中画素の画素データとが一致しない場合、図13(A)及び図13(B)に示すテーブルに従って判断を行なう。すなわち、図13(A)に示すテーブルは、処理中画素の画素データが白画素(W)で、かつ、画素群候補画素の画素データが黒画素(B)である場合の判断基準を示す。ここで、列は処理中画素の細線情報(wtpt)の種別(0、4又は5)を示し、行は画素群候補画素の細線情報(xpt[3])の種別(0、1、4、5)を示す。図13(A)のテーブルにおいて、Bは黒画素を活かす、すなわち重ね書きを行なわないことを示す。またWは白画素とする、すなわち重ね書きを行なうことを示す。また、*3は、前ライン確定画素の画素データ(adkp)が白画素のとき重ね書きを行なわず、前ライン確定画素の画素データ(adkp)が黒画素のとき重ね書きを行なうことを示す。また、*4は処理中画素のy方向出力アドレス(yt0[0])が処理中画素の下の画素のy方向出力アドレス(nexty)とが一致しないとき、すなわち縮小対象群の中での画素位置が下端である場合、重ね書きを行なうことを示している。また、−は存在しないデータであることを示す。
【0093】
一方、図13(B)に示すテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。図13(B)のテーブルにおいて、Bは黒画素とする、すなわち重ね書きを行なうことを示す。またWは白画素を活かす、すなわち重ね書きを行なわないことを示す。また、*3は、前ライン確定画素の画素データ(adkp)が白画素のとき重ね書きを行ない、前ライン確定画素の画素データ(adkp)が黒画素のとき重ね書きを行なわないことを示す。また、−は存在しないデータであることを示す。
【0094】
また、5画素以上連続する白画素が縮小されて黒でつぶれないようにするために以下の特殊処理を行なう。
【0095】
特殊処理は、図14(A)に示すように、以下の条件に適合する場合に行なう。
(1)処理中画素の縮小対象画素群の中の画素位置のy方向アドレス(ycnt)が、2又は3であること、
(2)処理中画素のy方向出力アドレス(yt0[0])が処理中画素の下の画素のy方向出力アドレス(nexty)とが一致しないこと
(3)1ライン前確定画素の画素データ(adkp)が黒画素であること、
(4)縮小画素群の処理における前ラインまでの処理結果(ad[yt0[0]][xt0[0]])が白画素(W)であること、
(5)画素群候補画素の画素データ(xpt[0])が白画素であること、
(6)画素群候補画素の細線情報(xpt[3])が細線なし(0)であること、及び、
(7)パターンマッチにより参照画素が図14(B)に示す画素配置パターンに一致したこと。
【0096】
この場合、図14(C)に示すテーブルに従って判断を行なう。すなわち、このテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。ここで、Bは黒画素とする、すなわち重ね書きを行なうことを示す。またWは白画素を活かす、すなわち重ね書きを行なわないことを示す。また、*5は、前ライン確定画素の画素データ(adkp)が白画素のとき重ね書きを行ない、前ライン確定画素の画素データ(adkp)が黒画素のとき重ね書きを行なわないことを示す。また、−は存在しないデータであることを示す。
【0097】
以上説明した判断に従って重ね書きを行なう際に細線情報も重ね書きする。
【0098】
(III)x、y方向の重ね書きに関する処理
x、y方向の重ね書きとは、x方向及びy方向の縮小における処理ことをいう。
【0099】
画素群候補画素の画素データと処理中画素の画素データとが一致する場合、(I)、(II)と同様に、画素データの変更がない。細線情報は、黒細線(1)、白細線(4)、白細線候補(5)、細線なし(0)の優先順位で重ね書きを行なう。
【0100】
画素群候補画素の画素データと処理中画素の画素データとが一致しない場合、図15(A)及び図15(B)に示すテーブルに従って判断を行なう。すなわち、図15(A)に示すテーブルは、処理中画素の画素データが白画素(W)で、かつ、画素群候補画素の画素データが黒画素(B)である場合の判断基準を示す。ここで、列は処理中画素の細線情報(wtpt)の種別(0、4又は5)を示し、行は画素群候補画素の細線情報(xpt[3])の種別(0、1、4、5)を示す。図15(A)のテーブルにおいて、Bは黒画素を活かす、すなわち重ね書きを行なわないことを示す。またWは白画素とする、すなわち重ね書きを行なうことを示す。また、*5は、1画素前候補画素の画素データ(adxt)が白画素のとき重ね書きを行ない、1画素前候補画素の画素データ(adxt)が黒画素のとき重ね書きを行わないことを示す。また、*6は処理中画素のy方向出力アドレス(yt0[0])が処理中画素の下の画素のy方向出力アドレス(nexty)とが一致しないとき、又は、処理中画素のx方向出力アドレス(xt0[0])が処理中画素の右端の画素のx方向出力アドレス(nextx)とが一致しないとき、すなわち縮小対象群の中での画素位置が下端又は右端である場合、重ね書きを行うとを示している。また、−は存在しないデータであることを示す。
【0101】
一方、図15(B)に示すテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。図15(B)のテーブルにおいて、Bは黒画素とする、すなわち重ね書きを行うことを示す。またWは白画素を活かす、すなわち重ね書きを行わないことを示す。また、*5は、1画素前候補画素の画素データ(adxt)が白画素のとき重ね書きを行ない、1画素前候補画素の画素データ(adxt)が黒画素のとき重ね書きを行わないことを示す。また、−は存在しないデータであることを示す。
【0102】
また、5画素以上連続する白画素が縮小されて黒でつぶれないようにするために以下の特殊処理を行う。
【0103】
特殊処理は、図16に示すように、以下の条件に適合する場合に行う。
・第1条件
(1)処理中画素の縮小対象画素群の中の画素位置のy方向アドレス(ycnt)が、2又は3であること、
(2)処理中画素のy方向出力アドレス(yt0[0])が処理中画素の下の画素のy方向出力アドレス(nexty)とが一致しないこと
(3)1ライン前確定画素の画素データ(adkp)が黒画素であること、
(4)縮小画素群の処理における前ラインまでの処理結果(ad[yt0[0]][xt0[0]])が白画素(W)であること、
(5)画素群候補画素の画素データ(xpt[0])が白画素であること、
(6)画素群候補画素の細線情報(xpt[3])が細線なし(0)であること、及び、
(7)パターンマッチにより参照画素が図16中に示す画素配置パターン1601に一致したこと。
【0104】
・第2条件
(1)処理中画素の縮小対象画素群の中の画素位置のx方向アドレス(xcnt)が、2又は3であること、
(2)処理中画素のx方向出力アドレス(xt0[0])が処理中画素の下の画素のx方向出力アドレス(nextx)とが一致しないこと
(3)1画素前候補画素の画素情報(adxt)が黒画素(B)であること、
(4)画素群候補画素の画素データ(xpt[0])が白画素であること、
(5)画素群候補画素の細線情報(xpt[3])が細線なし(0)であること、及び、
(6)パターンマッチにより参照画素が図16中に示す画素配置パターン1602に一致したこと。
【0105】
上記第1条件又は第2条件に適合する場合、図17に示すテーブルに従って判断を行なう。すなわち、このテーブルは、処理中画素の画素データが黒画素(B)で、かつ、画素群候補画素の画素データが白画素(W)である場合の判断基準を示す。ここで、Bは黒画素とする、すなわち重ね書きを行うことを示す。またWは白画素を活かす、すなわち重ね書きを行なわないことを示す。また、*7は、1画素前候補画素の画素データ(adxt)が白画素のとき重ね書きを行ない、1画素前候補画素の画素データ(adxt)が黒画素のとき重ね書きを行わないことを示す。また、−は存在しないデータであることを示す。
【0106】
以上説明した判断に従って重ね書きを行なう際に細線情報も重ね書きする。
【0107】
上述の(I)〜(III)の判断に結果に従って間引き処理が行われる。主走査方向に沿って1ライン毎に上記間引き処理が行なわれ、図8に示す間引処理回路85から縮小画像が出力される。
【0108】
以上説明したように、上記実施の形態2に係る画像変倍処理装置によれば、細線判定回路84により注目画素の細線情報を得て、間引処理回路85により、細線情報を参照して注目画素を間引くか否かを判定する。これにより、縮小画像で細線が消失するのを防止できる。
【0109】
さらに、間引き処理回路85は、少なくとも1ライン前確定画素の画素データ若しくは細線情報又は1画素前候補画素の画素データ若しくは細線情報又は縮小対象画素群の1ライン前までの候補画素の画素データ若しくは細線情報を参照して、注目画素を間引くか否かを判定するため、縮小後の画素の周辺画素を考慮して、より確実に縮小画像で細線が消失するのを防止できる。
【0110】
さらに、処理中画素の縮小対象画素群の中の画素位置、縮小後に1画素になる縮小対象画素群の候補画素の画素データ若しくは細線情報、又は、パターンマッチの結果を条件に付加して、注目画素を間引くか否かを判定することにより、5画素以上連続する白画素が縮小されて黒でつぶれるのを防止し、さらに確実に縮小画像で細線が消失するのを防止できる。
【0111】
また、細線判定において1〜4画素幅の細線を認識しているため、0.25〜1.0の縮小処理に対応することができる。
なお、上記実施の形態1、2で用いたパターンマッチのための画素配置パターンは、実際に使用するものの一部に過ぎず、また、一例に過ぎず様々な画素配置パターンを目的に応じて使用することができる。
【0112】
【発明の効果】
以上説明したように、本発明によれば、第1に、画像データを任意の倍率で拡大するにあたり高速行うことができる。第2に、画像データを任意の倍率で拡大するにあたり凸凹の少ない滑らかな画像を得ることができる
【図面の簡単な説明】
【図1】本発明の実施の形態1に係る画像変倍処理装置の概略を示すブロック図
【図2】上記実施の形態1に係る画像変倍処理装置が有する複数の2×2画素を示す図
【図3】上記実施の形態1にかかる画像変倍処理装置の動作フロー図
【図4】上記実施の形態1において元画素A〜Dを1.5倍拡大する場合の出力画像の座標を示す模式図
【図5】上記実施の形態1におけるアドレス算出処理の過程を概念的に示す模式図
【図6】上記実施の形態1に係る画像変倍処理装置における出力画素選択回路による1×2画素又は2×1画素の選択手順を示す概略図
【図7】上記実施の形態1において拡大及び平滑化した2×2画素から2×1画素を選択出力する場合を例示する概略図
【図8】本発明の実施の形態2に係る画像変倍処理装置の全体ブロック図
【図9】上記実施の形態2に係る画像変倍処理装置の動作フロー図
【図10】(A)〜(C)は上記実施の形態2に係る画像変倍処理装置の細線判定回路による細線判定に用いる画素配置パターンを示す説明図
【図11】(A)及び(B)は上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件のテーブルを示す説明図
【図12】(A)〜(C)は上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件を示す説明図
【図13】(A)及び(B)は上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件のテーブルを示す説明図
【図14】(A)〜(C)は上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件を示す説明図
【図15】(A)及び(B)は上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件のテーブルを示す説明図
【図16】上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件を示す説明図
【図17】上記実施の形態2に係る画像変倍処理装置の間引処理回路の判断条件のテーブルを示す説明図
【符号の説明】
1 画像入力回路
2 パターンマッチ回路
3 倍率演算回路
4 構成画素選択回路
5 2×2画素出力回路
6 2×2画素記憶部
7 4倍画素選択演算回路
8 変換テーブル
9 出力画素選択回路
81 画像入力回路
82 アドレス算出回路
83 画素位置判定回路
84 細線判定回路
85 間引処理回路
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to an image processing apparatus for digital data such as a facsimile, a scanner, and a digital copy. In particular, an image including characters and line drawings is enlarged at an arbitrary magnification.LargeThe present invention relates to an image scaling processing apparatus and an image scaling processing method.
[0002]
[Prior art]
In a conventional image scaling processing apparatus having a binarized image enlargement and reduction function, for example, as disclosed in JP-A-6-164896 or JP-A-6-253140, the reduction rate is reduced. While the thinning process is performed at an appropriate interval, the enlargement is performed by integer multiple enlargement, and then the thinning process according to the enlargement ratio is performed by the same process as the reduction. Thereby, an enlargement / reduction process at an arbitrary magnification is performed. In addition, when performing 4 times enlargement in the main scanning direction and the sub-scanning direction, the image data that has been once outputted twice is input again, and image data that is 4 times enlarged is obtained through the same circuit.
[0003]
[Problems to be solved by the invention]
However, in the above-described configuration of the related art, when the enlargement ratio is smaller than 2 times at the time of enlargement, a double enlargement image in which unevenness is reduced by smoothing processing (smoothing) is periodically thinned regardless of the image data. As a result, the final output image returns to irregularities.
[0006]
  The present invention has been made in view of such a point. First, a high speed is required for enlarging image data at an arbitrary magnification.InSecondly, it is possible to obtain a smooth image with less unevenness when enlarging the image data at an arbitrary magnification.wearAn object of the present invention is to provide an image scaling processing apparatus and an image scaling processing method.
[0007]
[Means for Solving the Problems]
The present invention has the following configuration in order to solve the above-described problems.
[0008]
  The invention related to the image scaling processing device according to claim 1, a pattern matching unit that compares a reference area including a target pixel in image data with a plurality of pixel arrangement patterns and determines a pixel arrangement pattern that matches the reference area; A storage unit configured to store in advance a plurality of pixel blocks configured by a plurality of pixels and having different pixel arrangements, and selecting a pixel block corresponding to a pixel arrangement pattern matching the reference area from the plurality of pixel blocks After the line density conversion corresponding to the pixel output unit, the position of the pixel after the line density conversion corresponding to the target pixel before the line density conversion according to the magnification ratio of the image, and the adjacent pixel adjacent to the target pixel before the line density conversion Depending on the difference between the pixel position ofNumber of pixelsIs selected from the pixel block selected by the pixel output unit and is output.
[0009]
  With this configuration, the pixel output unit selects a pixel block corresponding to the pixel arrangement pattern determined by the pattern matching unit from the plurality of pixel blocks stored in the storage unit, and the output pixel selection unit responds to the enlargement ratio. TheNumber of pixelsIs selected from the pixel block and output, the processing speed is increased and the circuit is simplified when the image data is enlarged at an arbitrary magnification.
[0012]
  Claim2The described invention is claimed.1In the invention of the image scaling processing apparatus described inThe output pixel selectorPixel output sectionChoiceIf the pixel block has an inverted pixel of the target pixel at the corner,Before line density conversionLocated on the opposite diagonal to the corner in the imageadjacentSee pixelIf all the referenced pixels are pixel data different from the pixel of interest, the pixel including the corner is selected and output from the pixel block, and if the referenced pixel includes the same pixel data as the pixel of interest, the pixel excluding the corner Select from the pixel block and outputThe structure characterized by this is taken.
[0013]
  With this configuration, the output pixel selection unit selects a smaller pixel from the enlarged and smoothed pixel block.Select and outputOn the occasionBefore line density conversionImageadjacentSince the pixels are referred to, the unevenness in the output image, particularly in the character portion, is reduced rather than simply performing periodic thinning.
[0014]
  The invention relating to the image scaling processing method according to claim 3 compares a reference area including the target pixel in the image data with a plurality of pixel arrangement patterns, determines a pixel arrangement pattern that matches the reference area, and includes a plurality of pixels. A pixel block corresponding to the pixel arrangement pattern that matches the reference area is selected from a plurality of pre-stored pixel blocks that are configured and have different pixel arrangements, and before the line density conversion according to the enlargement ratio of the image. According to the difference between the position of the pixel after linear density conversion corresponding to the target pixel and the position of the pixel after linear density conversion corresponding to the adjacent pixel adjacent to the target pixel before linear density conversionNumber of pixelsIs selected from the selected pixel block and output.
[0015]
  By this method, a plurality of pixel blocks are prepared in advance, a pixel block corresponding to a pixel arrangement pattern that matches the reference area is selected from the plurality of pixel blocks, and the image is enlarged according to the enlargement ratio of the image.Number of pixelsIs selected from the selected pixel block, the processing can be quickly performed when the image data is enlarged at an arbitrary magnification.
[0018]
  Claim4The described invention is claimed.3In the image scaling processing method described above, when the selected pixel block has an inverted pixel of the pixel of interest at the corner,Before line density conversionLocated on the opposite diagonal to the corner in the imageadjacentSee pixelIf all the referenced pixels are pixel data different from the pixel of interest, the pixel including the corner is selected and output from the pixel block, and if the referenced pixel includes the same pixel data as the pixel of interest, the pixel excluding the corner To select and output from a pixel blockTake.
[0019]
  thisMethodAllows small pixels from the pixel blockSelect to outputHowever,Before line density conversionImageadjacentSince the pixels are referred to, the unevenness in the output image, particularly in the character portion, is reduced rather than simply performing periodic thinning.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments 1 and 2 of the present invention will be described below with reference to the drawings.
[0031]
(Embodiment 1)
FIG. 1 is a block diagram showing an outline of an image scaling processing apparatus according to Embodiment 1 of the present invention.
[0032]
The image input circuit 1 stores binary image data input from a terminal a for a plurality of lines, and provides necessary image data to each circuit.
[0033]
The pattern match circuit 2 obtains 5 × 5 pixel image data (hereinafter referred to as a reference area) centered on the pixel of interest from the image input circuit 1, and this reference area is a pixel of 5 × 5 pixels defined in advance. Compare with the arrangement pattern and output data corresponding to the comparison result. More specifically, the pattern matching circuit 2 stores a plurality of pixel arrangement patterns and 2 × 2 pixels to be output from the 2 × 2 pixel output circuit 5 when the pixel of interest is doubled in each pixel arrangement pattern. Are stored in association with each other.
[0034]
The magnification calculation circuit 3 obtains the main scanning direction magnification inputted from the terminal b and the sub-scanning direction magnification inputted from the terminal c, calculates the address position of the output pixel, and whether or not the 4 × enlargement processing is necessary. Judgment is also made. Here, 4 times enlargement means enlarging at least one of the main scanning direction and the sub-scanning direction 4 times.
[0035]
The constituent pixel selection circuit 4 includes a 2 × 2 pixel output circuit 5, a 2 × 2 pixel storage unit 6, a quadruple pixel selection circuit 7 and a conversion table 8.
[0036]
The 2 × 2 pixel output circuit 5 selectively outputs 2 × 2 pixels stored in the 2 × 2 pixel storage unit 6 in accordance with the data output from the pattern matching circuit 2 or the data output from the quadruple pixel selection circuit 7. . As shown in FIG. 2, the 2 × 2 pixel storage unit 6 stores 14 2 × 2 pixel block (a) to (n) composed of the target pixel and its inverted pixel. In FIG. 2, white pixels indicate the same image data as the target pixel, and hatched pixels indicate pixel data different from the target pixel.
[0037]
The 4 × pixel selection circuit 7 receives 2 × 4 pixels, 4 × 2 pixels, or 4 × corresponding to the pixel block output by the 2 × 2 pixel output circuit 5 when the magnification calculation circuit 3 requests 4 × enlargement processing. Four pixels (hereinafter referred to as “four times pixels”) are selected according to the conversion table 8 with reference to the original image obtained from the image input circuit 1. Here, the quadruple pixel selection circuit 7 obtains pixel block type data, not pixel block pixel data itself. The 4 × pixel selection circuit 7 transmits a plurality of 2 × 2 pixel type data constituting the 4 × pixel to the 2 × 2 pixel output circuit 5.
[0038]
The conversion table 8 associates the type data of the pixel blocks constituting the quadruple pixel when the pixel blocks (a) to (n) are converted into the quadruple pixel.
[0039]
The output pixel selection circuit 9 outputs necessary pixels according to the result of the address calculation in the magnification calculation circuit 3 and the result of the necessity determination of the 4 × enlargement process. Specifically, when 1 × 1 pixel is required, the image data of the target pixel is received from the image input circuit 1 and output as it is. When 2 × 1 pixels or 1 × 2 pixels are required, 2 × 1 pixels or 1 × 2 pixels are cut out from the pixel block and output. When 2 × 2 pixels are required, the output from the 2 × 2 pixel output circuit 5 is output as it is. Further, when a 4 × pixel is required, a plurality of pixel blocks output from the 2 × 2 pixel output circuit 5 are output according to the 4 × pixel selection circuit 7.
Hereinafter, the operation of the image scaling processing apparatus having the above-described configuration will be described with reference to FIG. FIG. 3 is an operation flowchart of the image scaling processing apparatus according to the first embodiment.
[0040]
In step (hereinafter referred to as ST) 301, the magnification calculation circuit 3 determines an address position based on the main scanning direction magnification and the sub scanning direction magnification. In determining the address position, first, the address (hereinafter referred to as a core address) of a pixel where the center point of the target pixel of the original image is placed on the coordinates of the output image after the line density conversion is calculated. Data of 2 × 2 pixels obtained by enlarging and smoothing the pixel of interest is written at an address of 2 × 2 pixels including the core address.
[0041]
However, depending on the magnification, there may be a case where there is no empty address for 2 × 2 pixels. In this case, it is necessary to assign addresses for 1 × 1 pixel, 2 × 1 pixel, or 1 × 2 pixel. The allocation is determined by determining the difference α between the core address of the pixel on one line of the target pixel and the core address of the target pixel in the original image, and the difference β between the core address of the previous pixel and the core address of the target pixel. Are respectively assigned, and an address corresponding to α × β pixels is assigned to the target pixel.
[0042]
FIG. 4 is a schematic diagram showing the coordinates of the output image when the original pixels A to D are enlarged 1.5 times. In FIG. 4, the thick line indicates the matrix of the original image, and the thin line indicates the matrix of the output image after the line density conversion. In FIG. 4, when one side l of one pixel of the output image is 100H (hexa), one side L of one pixel of the original pixel is 180H. On the coordinates of the output image, the center point OA of the pixel A of the original image is placed at the address (x, y) of the output image. Therefore, the core address of the pixel A is (x, y). The core address of the pixel on one line of the pixel A is (x, y−2), and the difference α is 2. On the other hand, the core address of the pixel one pixel before the pixel A is (x−2, y), and the difference β is 2. Accordingly, an address for 2 × 2 pixels is assigned to the pixel A.
[0043]
Further, regarding the pixel B, the core address of the pixel B is (x + 1, y). The core address of the pixel on one line of the pixel B is (x + 1, y−2), and the difference α is 2. On the other hand, the core address of the pixel A one pixel before the pixel B is (x, y), and the difference β is 1. Therefore, an address for 2 × 1 pixels is assigned to the pixel A. Similarly, an address for 1 × 2 pixels is assigned to the pixel C, and an address for 1 × 1 pixel is assigned to the pixel D.
[0044]
FIG. 5 is a schematic diagram conceptually showing the process of the address calculation process. The original pixels A to D are converted into 2 × 2 pixel blocks by enlargement and smoothing. The converted 2 × 2 pixels are written at addresses determined by address calculation and assignment.
[0045]
In ST <b> 302, a reference area of 5 × 5 pixels centered on the target pixel is input to the pattern matching circuit 2 from the image input unit 1.
[0046]
In ST303, the reference area is compared with a predefined pixel arrangement pattern of 5 × 5 pixels, and pattern matching processing is performed (ST302). That is, the pattern matching circuit 2 determines a pixel arrangement pattern that matches the reference area, and outputs pixel block type data associated with the pixel arrangement pattern.
[0047]
In ST304, the 2 × 2 pixel output circuit 5 selects the corresponding one of the 14 types of pixel blocks (a) to (n) shown in FIG. 2 according to the pixel block type data output from the pattern match circuit 2. And output.
[0048]
In ST305, the output pixel selection circuit 9 determines whether the required output pixel is a quadruple pixel as a result of the address position determination. If the output pixel is a 4 × pixel (Yes), it is necessary for the 4 × image selection circuit 7 to obtain a 4 × pixel based on the pixel block output from the 2 × 2 pixel output circuit 5 in ST306. A correct pixel block is selected. For example, when the output of the 2 × 2 pixel output circuit 5 is 2 × 2 pixels (a) at a magnification of 2.0 × in the main scanning direction and 4.0 × in the sub scanning direction, the original image data is referred to. Above, the 2 × 2 pixels (h) and (n) or the combination of (a) and (n) shown in FIG. 2 are selected. When the output of the 2 × 2 pixel output circuit 5 is 2 × 2 pixels (g), a combination of 2 × 2 pixels (c) and (k) or (b) and (j) is selected.
[0049]
In ST307, a combination of pixel blocks corresponding to the pixel block type data output by the quadruple pixel selection circuit 7 is output.
[0050]
On the other hand, if it is determined in ST305 that the required output pixel is not a quadruple pixel (No) as a result of address position determination, it is determined in ST308 whether the required output pixel is a 1 × 2 pixel or a 2 × 1 pixel. To do. When the output pixel is 1 × 2 pixel or 2 × 1 pixel (Yes), in ST309, the output pixel selection circuit 9 outputs 1 × 2 pixel or 2 × from the pixel block output by the 2 × 2 pixel output circuit 5 One pixel is selected. When the 2 × 1 pixel or 2 × 1 pixel is cut out, if one place in the pixel block has image data different from the target pixel, the peripheral pixels are referred to.
[0051]
FIG. 6 is a schematic diagram illustrating a 1 × 2 pixel or 2 × 1 pixel cutout procedure by the output pixel selection circuit 9 in the image scaling processing device according to the first embodiment. As shown in FIG. 6, the output pixel selection circuit 9 obtains a reference area 603 of 3 × 3 pixels from the image input unit 1 around the target pixel 602 that is the basis of the pixel block 601. When the pixel block 601 has pixel data different from the pixel of interest (hereinafter referred to as inverted pixel data) in the upper right corner or lower left corner, in other words, pixel data whose image data has been changed (601a, 601b), the inverted pixel data in the reference area 603 The 1 × 2 pixel 608 or 2 × 1 pixel 609 cut out from the pixel blocks 601a and 601b is determined with reference to the reference pixels 604 and 607 on the opposite diagonal line and adjacent to the target pixel 602.
[0052]
Similarly, when the pixel block 601 has inverted pixel data at the upper left corner or the lower right corner (601c, 601d), reference pixels 605, 606 adjacent to the target pixel 602 on the opposite diagonal line to the inverted pixel data in the reference area 603 are displayed. With reference to this, the 1 × 2 pixel 608 or the 2 × 1 pixel 609 cut out from the pixel blocks 601c and 601d is determined.
[0053]
For example, as shown in FIG. 7, when the target pixel 701 is a black pixel (B) and the enlarged and smoothed pixel block 702 has a white pixel (W) 703 in the upper left corner, 2 × 1 pixels are cut out Will be described as an example. When the two reference pixels 704 and 705 that are on the opposite diagonal line to the white pixel 703 and are adjacent to the target pixel 701 are both white pixels, the 2 × 1 pixel 706 on the left side is cut out from the pixel block 702.
[0054]
On the other hand, when one of the two reference pixels 704 and 705 that are on the opposite diagonal line to the white pixel 703 and adjacent to the target pixel 701 is a black pixel, the left 2 × 1 pixel 707 is cut out from the pixel block 702. .
[0055]
If it is determined in ST308 that the required output pixel is not 1 × 2 pixel or 2 × 1 pixel (No) as a result of address position determination, it is determined in ST310 whether the output image is 1 × 1 pixel. When the output image is 1 × 1 pixel (Yes), in ST311, the output pixel selection circuit 9 obtains the same pixel data as the target pixel from the image input unit 1 and outputs it.
[0056]
If it is determined in ST310 that the required output pixel is not 1 × 1 pixel (No) as a result of the address position determination, in ST312, the output pixel selection circuit 9 uses the pixel block from the 2 × 2 pixel output circuit 5 as it is. Output.
[0057]
As described above, according to the image scaling processing device according to the first embodiment, in ST303 and ST304, the 2 × 2 pixel output circuit 5 includes a plurality of pixels stored in the 2 × 2 pixel storage unit 6. Since the pixel block corresponding to the pixel arrangement pattern determined by the pattern matching circuit 2 is selected and output from the pixel blocks, compared with the case of smoothing 2 × 2 pixels obtained by doubling the target pixel The processing can be speeded up and the circuit can be simplified.
[0058]
In the above ST306 and ST307, when the pixel block after smoothing output from the 2 × 2 pixel output circuit 5 is converted to 4 × pixels, it is not necessary to re-input the 4 × enlarged image data as in the prior art. A page memory for one page for intermediate processing is not required. In addition, since a 4 × pixel is assembled using a pixel block prepared in advance, the processing speed is increased and the circuit configuration is increased as compared with the conventional case where a 2 × pixel is further doubled to generate a 4 × pixel. It can be simplified.
[0059]
In ST309, when cutting out 1 × 2 pixels and 2 × 1 pixels from the enlarged and smoothed 2 × 2 pixels, the peripheral pixels of the original image are referred to. Therefore, rather than simply performing periodic thinning out, Unevenness in the output image, particularly the character portion can be reduced.
[0060]
(Embodiment 2)
Hereinafter, an image scaling processing device according to Embodiment 2 of the present invention will be described with reference to the drawings.
[0061]
FIG. 8 is an overall block diagram of the image scaling processing device according to the second embodiment.
[0062]
The image input unit 81 stores binary image data input from the terminal a for a plurality of lines and provides necessary image data to each circuit.
[0063]
The address calculation circuit 82 obtains the main scanning direction magnification input from the terminal b and the sub-scanning direction magnification input from the terminal c, and calculates the address position of the output pixel.
[0064]
  The pixel position determination circuit 83 obtains the result of the address calculation circuit 82 and reduces the pixel group to be reduced in the pixel block that becomes one pixel after reduction.(Multiple pixels that become one pixel when the original image is reduced)The position of the target pixel in is determined. The pixel position determination circuit 83 sends the determined position information of the target pixel to the thin line determination circuit 84 and the thinning processing circuit 85.
[0065]
The thin line determination circuit 84 is a circuit that determines whether or not the target pixel is included in the pixels forming the thin line. A thin line refers to a line having a width of 1 to 4 pixels, for example. Specifically, the thin line determination circuit 84 obtains an 8 × 8 pixel reference area including the target pixel from the image input unit 81, compares the reference area with a previously prepared 8 × 8 pixel pixel arrangement pattern, When the reference area matches the pixel arrangement pattern, it is determined that the target pixel forms a thin line. The thin line determination circuit 84 changes the pixel arrangement pattern according to the position information of the target pixel obtained by the pixel position determination circuit 83. Therefore, the pixel position is taken into consideration in the fine line determination. In other words, the fine line determination circuit 84 performs fine line determination according to the image position. The fine line determination circuit 84 performs fine line determination for each pixel of interest, and sends the result to the thinning processing circuit 85 and the storage unit 86.
[0066]
The thinning processing circuit 85 is a circuit that determines whether or not the target pixel should be thinned out. In the determination, the thinning processing circuit 85 refers to the pixel position of the target pixel obtained by the pixel position determination circuit 83 and the thin line information of the target pixel obtained by the thin line determination circuit 84. Further, the thinning processing circuit 85 receives, from the storage unit 86, pixel data and thin line information of a pixel determined one line before in the output image (hereinafter referred to as a previous line determined pixel), and an output pixel at the time of the target pixel processing. The pixel data and thin line information of the pixel one pixel before (hereinafter referred to as one pixel previous candidate pixel) are referred to. The thinning processing circuit 85 also refers to pixel data and thin line information of pixels of the reduction target pixel group being processed (hereinafter referred to as reduction target pixel group candidate pixels). The thinning-out processing circuit 85 can also refer to the pattern matching result obtained by comparing the 8 × 8 pixel reference area including the target pixel obtained from the image input unit 81 and the pixel arrangement pattern.
[0067]
The storage unit 86 is a memory that stores image data and thin line information of the previous line determination pixel, the previous pixel candidate pixel, and the reduction target pixel group candidate pixel, respectively.
[0068]
Hereinafter, the operation of the image scaling processing apparatus having the above configuration will be described with reference to an operation flowchart. FIG. 9 is an operation flowchart of the image scaling processing device according to the second embodiment.
[0069]
In ST901, the address calculation circuit 82 calculates the address position of the target pixel based on the magnification in the main scanning direction and the sub-scanning direction.
[0070]
In ST902, the pixel position determination circuit 83 determines which position in the reduction target pixel group the target pixel corresponds to based on the calculated address position.
[0071]
In ST903, the fine line determination circuit 84 determines whether or not it is included in the pixels constituting the fine line. Hereinafter, the procedure for determining the thin line will be described in detail. The thin line determination circuit 84 obtains an 8 × 8 pixel reference area including the target pixel from the image input unit 81. This reference area is compared with a pixel arrangement pattern prepared in advance, and when the reference area matches the pixel arrangement pattern, it is determined that the pixel of interest is included in the pixels constituting the thin line. In this determination, the thin line determination circuit 84 obtains information on the position in the reduction target pixel group determined by the pixel position determination circuit 83 (hereinafter referred to as a pixel position) and information on the previous line determined pixel or one previous pixel candidate pixel. Take into consideration.
[0072]
10A and 10B are explanatory diagrams showing pixel arrangement patterns used for fine line determination by the fine line determination circuit 84. FIG.
[0073]
First, reference is made to FIG. The thin line determination circuit 84 performs pattern matching using the pixel arrangement patterns 103 and 112. In the pixel arrangement pattern 103, 105 indicates a target pixel, 106 indicates a black pixel, 107 indicates a white pixel, and 108 indicates that any one is a white pixel. As a result, if the reference area including the target pixel matches either one of the pixel arrangement patterns 103 or 112 as a result of pattern matching, the thin line determination circuit 84 determines the target pixel as a white thin line.
[0074]
In addition, referring to FIG. 10B, a case of referring to the previous pixel candidate pixel will be described. In the figure, reference numeral 101 denotes a determination condition. In this case, the pixel position of the target pixel is one of coordinates (0, 1), (0, 2), (0, 3) in the 4 × 4 pixel reduction target pixel group 102, and 1 When the pre-pixel candidate pixel is a white pixel (W) and the thin line information is a white thin line, the thin line determination circuit 84 performs pattern matching using the pixel arrangement pattern 104. As a result of pattern matching, when the reference area including the target pixel matches the pixel arrangement pattern 104, the thin line determination circuit 84 determines the target pixel as a white thin line candidate.
[0075]
Next, with reference to FIG. 10C, a case where the previous line determined pixel is referred to will be described. In the figure, 109 indicates a determination condition. In this case, the pixel position of the target pixel is one of the coordinates (1, 0), (2, 0), (3, 0) in the 4 × 4 pixel reduction target pixel group 110, and the previous When the line determination pixel is a white pixel (W), the thin line determination circuit 84 performs pattern matching using the pixel arrangement pattern 113. As a result of pattern matching, when the reference area including the target pixel matches the pixel arrangement pattern 113, the thin line determination circuit 84 determines the target pixel as a white thin line candidate.
[0076]
Further, in the case of FIGS. 10B and 10C, the thin line determination circuit 84 sets the thin line information of the target pixel as a white thin line candidate. This is to prevent irregularities and discontinuities at the joints of the thin lines when priority is given to black pixels as the reduction pixels in the thinning process described later when there are a plurality of reduction target pixel groups on the thin line width.
[0077]
In the second embodiment, the black thin line is represented by 1, the white thin line is represented by 4, the white thin line candidate is represented by 5, and no thin line is represented by 0. The thin line determination circuit 84 transmits these determination results to the thinning processing circuit 85.
[0078]
In the above thin line determination, 8 × 8 pixels are used as the reference area, and the coordinates of the pixel of interest are (4, 4). Therefore, when determining a thin line with a width of 4 pixels, it must be determined at the lower end or the right end of the thin line. Absent. However, it is possible to make a fine line determination with all the pixels constituting the thin line. However, in this case, more pixel arrangement patterns are required.
[0079]
In ST904, the thinning processing circuit 85 performs thinning processing on the target pixel. In this thinning-out process, based on at least two of the following information, whether or not the pixel of interest is thinned out, in other words, the data of the candidate pixel of the same reduction target pixel group up to that point is overwritten with the data of the pixel of interest. Whether or not is comprehensively determined.
(i) Pixel data of the pixel of interest being processed (hereinafter referred to as the pixel being processed): d [3] [3]
(ii) Thin line information of pixel being processed: wtpt
(iii) Pixel data of candidate pixels of the same reduction target pixel group (hereinafter referred to as pixel group candidate pixels): xpt [0]
(iv) Pixel group candidate pixel fine line information: xpt [3]
(v) Pixel data of the previous line determined pixel: adkp
(vi) Pixel data of the previous pixel candidate: adxt
(vii) Output address in the x direction and y direction of the pixel being processed: xt0 [0], yt0 [0]
(viii) x-direction output address of the pixel right next to the pixel being processed: nextx
(ix) Y-direction output address of the pixel below the pixel being processed: nexty
(x) Processing result up to previous line in processing of reduced pixel group: ad [yt0 [0]] [xt0 [0]]
Further, in a specific case, the thinning determination is performed by pattern matching with pixel arrangement data prepared in advance.
[0080]
Hereinafter, the thinning process will be described in more detail.
[0081]
First, the thinning-out process is roughly divided according to the direction of overwriting.
[0082]
(I) Processing related to overwriting in the x direction
Overwriting in the x direction refers to processing in the reduction in the X direction.
[0083]
When the pixel data of the pixel group candidate pixel matches the pixel data of the pixel being processed, the pixel data is not changed. The fine line information is overwritten in the priority order of black fine line (1), white fine line (4), white fine line candidate (5), and no fine line (0).
[0084]
If the pixel data of the pixel group candidate pixel and the pixel data of the pixel being processed do not match, a determination is made according to the tables shown in FIGS. 11 (A) and 11 (B). That is, the table shown in FIG. 11A shows a criterion for determination when the pixel data of the pixel being processed is a white pixel (W) and the pixel data of the pixel group candidate pixel is a black pixel (B). Here, the column indicates the type (0, 4 or 5) of the thin line information (wtpt) of the pixel being processed, and the row indicates the type (0, 1, 4, or 4) of the thin line information (xpt [3]) of the pixel group candidate pixel. 5). In the table of FIG. 11A, B indicates that black pixels are utilized, that is, overwriting is not performed. W indicates a white pixel, that is, overwriting is performed. Also,*1Indicates that overwriting is not performed when the pixel data (adxt) of the previous pixel candidate pixel is a white pixel, and overwriting is performed when the pixel data (adxt) of the previous pixel candidate pixel is a black pixel. Also,*2When the x-direction output address (xt0 [0]) of the pixel being processed does not match the x-direction output address (nextx) of the next pixel being processed, that is, the pixel position in the reduction target group is at the right end. In some cases, this indicates overwriting. Further,-indicates that the data does not exist.
[0085]
On the other hand, the table shown in FIG. 11B shows criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). In the table of FIG. 11B, B indicates black pixels, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*1Indicates that overwriting is performed when the pixel data (adxt) of the previous pixel candidate pixel is a white pixel, and overwriting is not performed when the pixel data (adxt) of the previous line determined pixel is a black pixel. Further,-indicates that the data does not exist.
[0086]
In addition, the following special processing is performed in order to reduce white pixels that are continuous for 5 pixels or more so that they are not crushed with black.
[0087]
The special processing is performed when the following conditions are met, as shown in FIG.
(1) The x-direction address (xcnt) of the pixel position in the reduction target pixel group of the pixel being processed is 2 or 3.
(2) The x-direction output address (xt0 [0]) of the pixel being processed does not match the x-direction output address (nextx) of the next pixel after the pixel being processed.
(3) The pixel data (adxt) of the previous candidate pixel is a black pixel,
(4) The pixel data (xpt [0]) of the pixel group candidate pixel is a white pixel,
(5) The fine line information (xpt [3]) of the pixel group candidate pixel is no fine line (0), and
(6) The reference pixel matches the pixel arrangement pattern shown in FIG.
[0088]
In this case, the determination is made according to the table shown in FIG. That is, this table shows the criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). Here, B indicates a black pixel, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*1Indicates that overwriting is performed when the pixel data (adxt) of the previous line determined pixel is a white pixel, and overwriting is not performed when the pixel data (adxt) of the previous pixel candidate pixel is a black pixel. Further,-indicates that the data does not exist.
[0089]
The thin line information is also overwritten when overwriting is performed in accordance with the determination described above.
[0090]
(II) Processing related to overwriting in the y direction
Overwriting in the y direction refers to processing in the reduction in the y direction.
[0091]
When the pixel data of the pixel group candidate pixel matches the pixel data of the pixel being processed, the pixel data is not changed as in (I). The fine line information is overwritten in the priority order of black fine line (1), white fine line (4), white fine line candidate (5), and no fine line (0).
[0092]
When the pixel data of the pixel group candidate pixel and the pixel data of the pixel being processed do not match, determination is performed according to the tables shown in FIGS. 13 (A) and 13 (B). That is, the table shown in FIG. 13A shows the determination criteria when the pixel data of the pixel being processed is a white pixel (W) and the pixel data of the pixel group candidate pixel is a black pixel (B). Here, the column indicates the type (0, 4 or 5) of the thin line information (wtpt) of the pixel being processed, and the row indicates the type (0, 1, 4, or 4) of the thin line information (xpt [3]) of the pixel group candidate pixel. 5). In the table of FIG. 13A, B indicates that black pixels are utilized, that is, overwriting is not performed. W indicates a white pixel, that is, overwriting is performed. Also,*ThreeIndicates that overwriting is not performed when the pixel data (adkp) of the previous line determined pixel is a white pixel, and overwriting is performed when the pixel data (adkp) of the previous line determined pixel is a black pixel. Also,*FourWhen the y-direction output address (yt0 [0]) of the pixel being processed does not match the y-direction output address (nexty) of the pixel below the pixel being processed, that is, the pixel position in the reduction target group is at the lower end. In some cases, this indicates overwriting. Further,-indicates that the data does not exist.
[0093]
On the other hand, the table shown in FIG. 13B shows criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). In the table of FIG. 13B, B indicates black pixels, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*ThreeIndicates that overwriting is performed when the pixel data (adkp) of the previous line determined pixel is a white pixel, and overwriting is not performed when the pixel data (adkp) of the previous line determined pixel is a black pixel. Further,-indicates that the data does not exist.
[0094]
In addition, the following special processing is performed in order to reduce white pixels that are continuous for 5 pixels or more so that they are not crushed with black.
[0095]
The special processing is performed when the following conditions are satisfied, as shown in FIG.
(1) The y-direction address (ycnt) of the pixel position in the reduction target pixel group of the pixel being processed is 2 or 3.
(2) The y-direction output address (yt0 [0]) of the pixel being processed does not match the y-direction output address (nexty) of the pixel below the pixel being processed
(3) The pixel data (adkp) of the determined pixel one line before is a black pixel,
(4) The processing result (ad [yt0 [0]] [xt0 [0]]) up to the previous line in the processing of the reduced pixel group is a white pixel (W),
(5) The pixel data (xpt [0]) of the pixel group candidate pixel is a white pixel,
(6) The thin line information (xpt [3]) of the pixel group candidate pixel is no thin line (0), and
(7) The reference pixel matches the pixel arrangement pattern shown in FIG.
[0096]
In this case, the determination is made according to the table shown in FIG. That is, this table shows the criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). Here, B indicates a black pixel, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*FiveIndicates that overwriting is performed when the pixel data (adkp) of the previous line determined pixel is a white pixel, and overwriting is not performed when the pixel data (adkp) of the previous line determined pixel is a black pixel. Further,-indicates that the data does not exist.
[0097]
The thin line information is also overwritten when overwriting is performed in accordance with the determination described above.
[0098]
(III) Processing related to overwriting in the x and y directions
Overwriting in the x and y directions refers to processing in the reduction in the x and y directions.
[0099]
When the pixel data of the pixel group candidate pixel matches the pixel data of the pixel being processed, the pixel data is not changed, as in (I) and (II). The fine line information is overwritten in the priority order of black fine line (1), white fine line (4), white fine line candidate (5), and no fine line (0).
[0100]
If the pixel data of the pixel group candidate pixel and the pixel data of the pixel being processed do not match, determination is performed according to the tables shown in FIGS. 15 (A) and 15 (B). That is, the table shown in FIG. 15A shows the determination criteria when the pixel data of the pixel being processed is a white pixel (W) and the pixel data of the pixel group candidate pixel is a black pixel (B). Here, the column indicates the type (0, 4 or 5) of the thin line information (wtpt) of the pixel being processed, and the row indicates the type (0, 1, 4, or 4) of the thin line information (xpt [3]) of the pixel group candidate pixel. 5). In the table of FIG. 15A, B indicates that black pixels are utilized, that is, overwriting is not performed. W indicates a white pixel, that is, overwriting is performed. Also,*FiveIndicates that overwriting is performed when the pixel data (adxt) of the previous pixel candidate pixel is a white pixel, and overwriting is not performed when the pixel data (adxt) of the previous pixel candidate pixel is a black pixel. Also,*6Indicates that the y-direction output address (yt0 [0]) of the pixel being processed does not match the y-direction output address (nexty) of the pixel below the pixel being processed, or the x-direction output address (xt0 [ 0]) indicates that overwriting is performed when the x-direction output address (nextx) of the rightmost pixel of the pixel being processed does not match, that is, when the pixel position in the reduction target group is the lower end or the right end. ing. Further,-indicates that the data does not exist.
[0101]
On the other hand, the table shown in FIG. 15B shows criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). In the table of FIG. 15B, B indicates black pixels, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*FiveIndicates that overwriting is performed when the pixel data (adxt) of the previous pixel candidate pixel is a white pixel, and overwriting is not performed when the pixel data (adxt) of the previous pixel candidate pixel is a black pixel. Further,-indicates that the data does not exist.
[0102]
In addition, the following special processing is performed in order to reduce white pixels that are continuous for five or more pixels so that they are not crushed with black.
[0103]
The special processing is performed when the following conditions are satisfied as shown in FIG.
・ First condition
(1) The y-direction address (ycnt) of the pixel position in the reduction target pixel group of the pixel being processed is 2 or 3.
(2) The y-direction output address (yt0 [0]) of the pixel being processed does not match the y-direction output address (nexty) of the pixel below the pixel being processed
(3) The pixel data (adkp) of the determined pixel one line before is a black pixel,
(4) The processing result (ad [yt0 [0]] [xt0 [0]]) up to the previous line in the processing of the reduced pixel group is a white pixel (W),
(5) The pixel data (xpt [0]) of the pixel group candidate pixel is a white pixel,
(6) The thin line information (xpt [3]) of the pixel group candidate pixel is no thin line (0), and
(7) The reference pixel matches the pixel arrangement pattern 1601 shown in FIG. 16 by pattern matching.
[0104]
・ Second condition
(1) The x-direction address (xcnt) of the pixel position in the reduction target pixel group of the pixel being processed is 2 or 3.
(2) The x-direction output address (xt0 [0]) of the pixel being processed does not match the x-direction output address (nextx) of the pixel below the pixel being processed
(3) The pixel information (adxt) of the previous pixel candidate pixel is a black pixel (B),
(4) The pixel data (xpt [0]) of the pixel group candidate pixel is a white pixel,
(5) The fine line information (xpt [3]) of the pixel group candidate pixel is no fine line (0), and
(6) The reference pixel matches the pixel arrangement pattern 1602 shown in FIG. 16 by pattern matching.
[0105]
When the first condition or the second condition is satisfied, the determination is made according to the table shown in FIG. That is, this table shows the criteria for determination when the pixel data of the pixel being processed is a black pixel (B) and the pixel data of the pixel group candidate pixel is a white pixel (W). Here, B represents a black pixel, that is, overwriting is performed. W indicates that white pixels are utilized, that is, overwriting is not performed. Also,*7Indicates that overwriting is performed when the pixel data (adxt) of the previous pixel candidate pixel is a white pixel, and overwriting is not performed when the pixel data (adxt) of the previous pixel candidate pixel is a black pixel. Further,-indicates that the data does not exist.
[0106]
The thin line information is also overwritten when overwriting is performed in accordance with the determination described above.
[0107]
The thinning-out process is performed according to the results of the determinations (I) to (III) described above. The above thinning process is performed for each line along the main scanning direction, and a reduced image is output from the thinning processing circuit 85 shown in FIG.
[0108]
As described above, according to the image scaling processing device according to the second embodiment, the thin line determination circuit 84 obtains the thin line information of the pixel of interest, and the thinning processing circuit 85 refers to the thin line information for attention. It is determined whether or not to thin out pixels. This can prevent the thin line from disappearing in the reduced image.
[0109]
Further, the thinning-out processing circuit 85 at least pixel data or thin line information of the one-line-before determined pixel, pixel data or thin-line information of the one-pixel-before candidate pixel, or pixel data or thin-line of the candidate pixel up to one line before the reduction target pixel group Since it is determined whether or not the target pixel is thinned out by referring to the information, it is possible to more reliably prevent the thin line from disappearing in the reduced image in consideration of the peripheral pixels of the reduced pixel.
[0110]
In addition, the pixel position in the reduction target pixel group of the pixel being processed, the pixel data or thin line information of the candidate pixel of the reduction target pixel group that becomes one pixel after reduction, or the result of pattern matching is added as a condition, and attention is paid. By determining whether or not to thin out pixels, it is possible to prevent white pixels that are continuous for five or more pixels from being reduced and crushed with black, and more reliably to prevent the thin line from disappearing in the reduced image.
[0111]
Further, since the fine line having a width of 1 to 4 pixels is recognized in the fine line determination, the reduction process of 0.25 to 1.0 can be handled.
The pixel arrangement pattern for pattern matching used in the first and second embodiments is only part of what is actually used, and is merely an example, and various pixel arrangement patterns are used according to the purpose. can do.
[0112]
【The invention's effect】
  As described above, according to the present invention, first, a high speed is required for enlarging image data at an arbitrary magnification.InIt can be carried out. Secondly, a smooth image with little unevenness can be obtained when the image data is enlarged at an arbitrary magnification..
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of an image scaling processing apparatus according to Embodiment 1 of the present invention.
FIG. 2 is a diagram showing a plurality of 2 × 2 pixels included in the image scaling processing device according to the first embodiment.
FIG. 3 is an operation flowchart of the image scaling processing device according to the first embodiment;
FIG. 4 is a schematic diagram showing coordinates of an output image when the original pixels A to D are enlarged 1.5 times in the first embodiment.
FIG. 5 is a schematic diagram conceptually showing a process of address calculation processing in the first embodiment.
FIG. 6 is a schematic diagram showing a selection procedure of 1 × 2 pixels or 2 × 1 pixels by an output pixel selection circuit in the image scaling processing device according to the first embodiment.
7 is a schematic diagram exemplifying a case where 2 × 1 pixels are selectively output from 2 × 2 pixels enlarged and smoothed in the first embodiment. FIG.
FIG. 8 is an overall block diagram of an image scaling processing apparatus according to Embodiment 2 of the present invention.
FIG. 9 is an operation flowchart of the image scaling processing device according to the second embodiment.
FIGS. 10A to 10C are explanatory diagrams showing pixel arrangement patterns used for fine line determination by the fine line determination circuit of the image scaling processing device according to the second embodiment.
FIGS. 11A and 11B are explanatory diagrams showing a table of determination conditions of a thinning-out processing circuit of the image scaling processing device according to the second embodiment; FIGS.
FIGS. 12A to 12C are explanatory diagrams illustrating determination conditions of a thinning processing circuit of the image scaling processing device according to the second embodiment.
FIGS. 13A and 13B are explanatory diagrams showing a table of determination conditions of the thinning-out processing circuit of the image scaling processing device according to the second embodiment. FIGS.
FIGS. 14A to 14C are explanatory diagrams illustrating determination conditions of a thinning processing circuit of the image scaling processing device according to the second embodiment.
FIGS. 15A and 15B are explanatory diagrams showing a table of determination conditions of the thinning processing circuit of the image scaling processing device according to the second embodiment; FIGS.
FIG. 16 is an explanatory diagram showing determination conditions of the thinning processing circuit of the image scaling processing device according to the second embodiment;
FIG. 17 is an explanatory diagram illustrating a determination condition table of a thinning-out processing circuit according to the second embodiment.
[Explanation of symbols]
1 Image input circuit
2 Pattern match circuit
3 Magnification calculation circuit
4. Component pixel selection circuit
5 2 × 2 pixel output circuit
6 2 × 2 pixel storage
7 4x pixel selection arithmetic circuit
8 Conversion table
9 Output pixel selection circuit
81 Image input circuit
82 Address calculation circuit
83 Pixel position determination circuit
84 Fine line determination circuit
85 Thinning processing circuit

Claims (4)

画像データのうち注目画素を含む参照エリアを複数の画素配置パターンと比較し前記参照エリアと一致する画素配置パターンを判定するパターンマッチ部と、複数の画素で構成され互いに前記画素の配置が異なる複数の画素ブロックを予め記憶する記憶部と、前記複数の画素ブロックの中から前記参照エリアと一致する画素配置パターンに対応する画素ブロックを選択する画素出力部と、画像の拡大率に応じた線密度変換前の注目画素に対応する線密度変換後の画素の位置と線密度変換前の注目画素に隣接する隣接画素に対応する線密度変換後の画素の位置との差に応じた数の画素を前記画素出力部が選択した画素ブロックより選択して出力する出力画素選択部を具備することを特徴とする画像変倍処理装置。A pattern matching unit that compares a reference area including a target pixel in image data with a plurality of pixel arrangement patterns and determines a pixel arrangement pattern that matches the reference area, and a plurality of pixels that are different in arrangement of the pixels from each other. A pixel unit that stores in advance a pixel block, a pixel output unit that selects a pixel block corresponding to a pixel arrangement pattern that matches the reference area from the plurality of pixel blocks, and a line density that corresponds to an image enlargement ratio The number of pixels corresponding to the difference between the position of the pixel after linear density conversion corresponding to the target pixel before conversion and the position of the pixel after linear density conversion corresponding to the adjacent pixel adjacent to the target pixel before linear density conversion An image scaling processing apparatus comprising: an output pixel selection unit that selects and outputs a pixel block selected by the pixel output unit. 前記出力画素選択部は、前記画素出力部が選択した画素ブロックが隅部に注目画素の反転画素を有する場合、線密度変換前の画像において前記隅部と逆対角線上に位置する隣接画素を参照して、参照した画素が全て注目画素と異なる画素データである場合前記隅部を含む画素を画素ブロックから選択して出力し、参照した画素が注目画素と同じ画素データを含む場合前記隅部を除く画素を画素ブロックから選択して出力することを特徴とする請求項1記載の画像変倍処理装置。  When the pixel block selected by the pixel output unit has an inverted pixel of the target pixel at a corner, the output pixel selection unit refers to an adjacent pixel located on a diagonal opposite to the corner in the image before the line density conversion If all the referenced pixels are pixel data different from the target pixel, the pixel including the corner is selected from the pixel block and output, and if the referenced pixel includes the same pixel data as the target pixel, the corner is 2. The image scaling processing apparatus according to claim 1, wherein a pixel other than the pixel block is selected and output. 画像データのうち注目画素を含む参照エリアを複数の画素配置パターンと比較し前記参照エリアと一致する画素配置パターンを判定し、複数の画素で構成され互いに前記画素の配置が異なる予め記憶された複数の画素ブロックの中から前記参照エリアと一致する画素配置パターンに対応する画素ブロックを選択し、画像の拡大率に応じた線密度変換前の注目画素に対応する線密度変換後の画素の位置と線密度変換前の注目画素に隣接する隣接画素に対応する線密度変換後の画素の位置との差に応じた数の画素を選択された画素ブロックより選択して出力することを特徴とする画像変倍処理方法。A reference area including the target pixel in the image data is compared with a plurality of pixel arrangement patterns, a pixel arrangement pattern matching the reference area is determined, and a plurality of pre-stored plural pixels configured by a plurality of pixels and having different pixel arrangements from each other The pixel block corresponding to the pixel arrangement pattern that matches the reference area is selected from among the pixel blocks, and the position of the pixel after the line density conversion corresponding to the target pixel before the line density conversion according to the magnification ratio of the image, and An image characterized by selecting and outputting a number of pixels from a selected pixel block according to a difference from a position of a pixel after linear density conversion corresponding to an adjacent pixel adjacent to a target pixel before linear density conversion. Scaling method. 選択した画素ブロックが隅部に注目画素の反転画素を有する場合、線密度変換前の画像において前記隅部と逆対角線上に位置する隣接画素を参照して、参照した画素が全て注目画素と異なる画素データである場合前記隅部を含む画素を画素ブロックから選択して出力し、参照した画素が注目画素と同じ画素データを含む場合前記隅部を除く画素を画素ブロックから選択して出力することを特徴とする請求項1記載の画像変倍処理方法。  If the selected pixel block has an inverted pixel of the target pixel at the corner, all the referenced pixels are different from the target pixel with reference to the adjacent pixel located on the opposite diagonal line to the corner in the image before the line density conversion When pixel data is selected, the pixel including the corner is selected from the pixel block and output. When the referenced pixel includes the same pixel data as the pixel of interest, the pixel other than the corner is selected and output from the pixel block. The image scaling processing method according to claim 1.
JP13184798A 1998-05-14 1998-05-14 Image scaling processing apparatus and image scaling processing method Expired - Fee Related JP4050822B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13184798A JP4050822B2 (en) 1998-05-14 1998-05-14 Image scaling processing apparatus and image scaling processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13184798A JP4050822B2 (en) 1998-05-14 1998-05-14 Image scaling processing apparatus and image scaling processing method

Publications (2)

Publication Number Publication Date
JPH11331568A JPH11331568A (en) 1999-11-30
JP4050822B2 true JP4050822B2 (en) 2008-02-20

Family

ID=15067510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13184798A Expired - Fee Related JP4050822B2 (en) 1998-05-14 1998-05-14 Image scaling processing apparatus and image scaling processing method

Country Status (1)

Country Link
JP (1) JP4050822B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3676948B2 (en) * 1999-07-07 2005-07-27 アルプス電気株式会社 Pixel number conversion circuit and image display apparatus using the same

Also Published As

Publication number Publication date
JPH11331568A (en) 1999-11-30

Similar Documents

Publication Publication Date Title
KR920001801B1 (en) Image Magnification Method and Device
US7574071B2 (en) Method and apparatus for resizing images
JPH05334427A (en) Image scaling method
JP4050822B2 (en) Image scaling processing apparatus and image scaling processing method
EP0844783A2 (en) Image processing device performing the conversion of gradation values by means of error diffusion method
JP2885999B2 (en) Image processing apparatus and method
JP2899304B2 (en) Dither image scaling processor
JP3880156B2 (en) Image processing device
JP3597423B2 (en) Image scaling device and image scaling method
JP3318248B2 (en) Image quality improvement device and recording medium
JPH07221976A (en) Smoothing enlargement processing method for binary image data
JP3304240B2 (en) Image processing device
JP2687366B2 (en) Image reading device
JP3742227B2 (en) Image data binarization processing circuit and method
US20010016070A1 (en) Object extraction device, object extraction method, and recording media for storing an object extraction program
JP2001230929A (en) Binary image reduction processing method and apparatus
JP3290867B2 (en) Multi-value data conversion device and multi-value data conversion method
JP3760634B2 (en) Image processing apparatus, image processing method, and recording medium
JP3571506B2 (en) Image processing apparatus and recording medium recording image processing program
JP2002290734A (en) Image processing method
JP2857260B2 (en) Judgment method of rectangular area
JP3452460B2 (en) Image reduction method and apparatus, and storage medium storing program
JPS63102474A (en) Image signal processing device
JPS6118388B2 (en)
JPH10341334A (en) Image magnification method, device therefor and storage medium recording program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070508

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070706

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071130

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101207

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101207

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111207

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111207

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121207

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees