JP3549475B2 - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP3549475B2
JP3549475B2 JP2000286586A JP2000286586A JP3549475B2 JP 3549475 B2 JP3549475 B2 JP 3549475B2 JP 2000286586 A JP2000286586 A JP 2000286586A JP 2000286586 A JP2000286586 A JP 2000286586A JP 3549475 B2 JP3549475 B2 JP 3549475B2
Authority
JP
Japan
Prior art keywords
black
white
data
error
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2000286586A
Other languages
Japanese (ja)
Other versions
JP2001111831A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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
Priority claimed from JP28902491A external-priority patent/JP3157870B2/en
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2000286586A priority Critical patent/JP3549475B2/en
Publication of JP2001111831A publication Critical patent/JP2001111831A/en
Application granted granted Critical
Publication of JP3549475B2 publication Critical patent/JP3549475B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は画像処理方式に関し、特に、誤差拡散方式により中間調画像を処理する画像処理方式に関する。
【0002】
【従来の技術】
近時、情報化社会にあって、画像データを取り扱う装置が多くなっている。このような画像データを取り扱う装置においては、スキャナ等で読み取った画素データを2値画信号に変換する画像処理装置を必要としている。また、近時、画像処理装置の取り扱う画像としては、文字等の白黒の2値画像だけでなく、写真等の中間調の画像をも取り扱うようになっている。
そこで、従来、中間調画像の処理方法としては、多値画素データの画素毎のレベルを所定の複数のスレッシュ値が設定されたマトリクスデータと比較し、該比較結果に基づいて2値化処理し、出力2値画素データを出力して中間調画像を表現するディザ方式と、多値画素データの画素毎に量子化処理した出力画素データと入力画素データとの2値化誤差を周辺画素データに拡散した結果を所定の設定されたスレッシュ値に基づいて2値化処理し、出力2値画素データを出力して中間調画像を表現する誤差拡散方式があるが、ディザ方式に比べて階調性と解像度の両立を図った誤差拡散方式が注目されている。
【0003】
【発明が解決しようとする課題】
しかしながら、このような従来の誤差拡散方式にあっては、入力画素データが全黒レベルあるいは全白レベルのとき、2値化誤差は発生しないにもかかわらず、それまでの画素データの累積誤差が保存されて、2値化のスレッシュ値を常に一定とした場合、誤差拡散特有のテクスチャ(誤差拡散が充分でないときに発生する画像の尾引き現象)が発生し、これを取り除くため、2値化のスレッシュ値を周期的に変化させる方法があるが、黒地付近で白点を発生させ、白地付近で黒点を発生させ易く、出力画像がボケた画像になり易いという問題があった。
【0004】
また、従来の例えば、特開平1−284172号公報に記載された画像処理装置により実行される誤差拡散処理においては、2値化誤差を重み付け演算により求めるときに発生する誤差の余り分(小数点以下)を相関する次の画素データに加算して補正し、補正した画素データを一定のスレッシュ値により2値化処理して入力画像濃度と出力画像濃度を保存して画像を再現する処理が行われているが、この装置の場合も上記のような誤差拡散特有のテクスチャを取り除くことはできない。
【0005】
そこで本発明は、誤差拡散処理を行うときは、画素毎に全黒か全白かを判別したとき、スレッシュ値を全黒データに対しては、全白レベルに、全白データに対しては、全黒レベルに設定した画素データを処理画素毎に周期的に変化させたスレッシュ値で2値化処理することにより、黒地中の白点の発生や白地中の黒点の発生を抑えて、中間調画像のコントラストを向上させる画像処理方式を提供することを目的とする。
【0006】
【課題を解決するための手段】
請求項1記載の発明は、ライン毎に入力される多値画素データの画素毎に量子化処理した出力画素データと入力画素データとの誤差を周辺画素データに拡散した結果を所定の設定されたスレッシュ値に基づいて2値化処理して出力2値画素データを出力する画像処理方式において、前記入力される多値画素データの画素毎に全黒か全白かを判別する全黒全白判別手段を設け、前記全黒全白判別手段によって全黒でも全白でもないと判別したとき、前記スレッシュ値を周期的に変化させるとともに、前記全黒全白判別手段によって全黒あるいは全白と判別したとき、前記スレッシュ値を、全黒データに対しては全白レベルに設定し、全白データに対しては全黒レベルに設定することを特徴とし、
請求項記載の発明は、前記全黒全白判別手段における判別を全黒か全白か一方のみ行うことを特徴としている。
【0007】
【作用】
【0008】
【0009】
【0010】
【0011】
【0012】
【0013】
請求項記載の発明では、ライン毎に入力される多値画素データの画素毎に量子化処理した出力画素データと入力画素データとの誤差を周辺画素データに拡散した結果を所定の設定されたスレッシュ値に基づいて2値化処理して出力2値画素データを出力する画像処理方式において、前記入力される多値画素データの画素毎に全黒か全白かを判別する全黒全白判別手段が設けられ、前記全黒全白判別手段によって全黒でも全白でもないと判別されたとき、前記スレッシュ値が周期的に変化させられるとともに、前記全黒全白判別手段によって全黒あるいは全白と判別されたとき、前記スレッシュ値が、全黒データに対しては全白レベルに設定され、全白データに対しては全黒レベルに設定される。
【0014】
したがって、全黒、全白データに応じて2値化スレッシュ値を変化させているので累積誤差を保存しつつ中間調画像のコントラストを向上させることができる。
【0015】
請求項記載の発明では、前記全黒全白判別手段における判別は全黒か全白か一方のみ行われる。
【0016】
【実施例】
以下、本発明を実施例に基づいて具体的に説明する。
【0017】
図1〜図4は、画像処理装置を適用したファクシミリ装置の一実施例を示す図である。
【0018】
図1は、ファクシミリ装置1のブロック図であり、ファクシミリ装置1は、イメージセンサ2、A/D変換器3、タイミングコントローラ4、RAM5及びデジタル画像処理部6等から構成されている。
【0019】
イメージセンサ2は、原稿からの反射光を電気信号に変換して所定のアナログ信号をA/D変換器3に出力し、A/D変換器3は、イメージセンサ2から入力されるアナログ信号を所定のデジタル信号に変換してデジタル画像処理部4に出力する。
【0020】
タイミングコントローラ4は、各部の動作タイミングを制御する制御信号を各部に出力し、RAM(Random Access Memory)5は、各種参照用データを保持、更新し、後述する誤差拡散処理に必要な誤差データを保持、更新する。
【0021】
デジタル画像処理部6は、図2に示すように、誤差演算部7、濃度補正部8、2値化部9、2値化誤差生成部10及びラッチ部11から構成されており、全体として誤差拡散処理部を構成する。
【0022】
誤差演算部7は、RAM5に保持された前回の2値化誤差データにより現画素に対する誤差量を演算し、その演算結果を濃度補正部8に出力する。
【0023】
濃度補正部8は、誤差演算部7から入力される誤差量演算結果をA/D変換器3から入力される読取データ(デジタル信号)に加算し、その濃度補正データを2値化部9と2値化誤差演算部10に出力する。
【0024】
2値化部9は、濃度補正部8から入力される濃度補正データを入力される所定のスレッシュ値により2値化して2値化データを2値化誤差生成部10と図外に出力する。
【0025】
2値化誤差演算部10は、濃度差補正部8から入力される濃度補正データにより2値化部9から入力される2値化データに応じて該画素における2値化誤差を演算してラッチ部11に出力する。
【0026】
ラッチ部11は、2値化誤差生成部10から入力された2値化誤差データの出力タイミングを調整してRAM5と誤差演算部7に出力する。
【0027】
次に、作用を説明する。
【0028】
イメージセンサ2で読み取られた原稿画像の1ライン分のアナログ信号は、A/D変換器3でデジタル信号に変換されてデジタル画像処理部6に出力され、デジタル画像処理部6内で1ラインの画素毎に誤差拡散処理が行われる。この誤差拡散処理に際して使用する誤差拡散フィルタの一例を図3に示す。図3(a)は、現画素*とその周辺画素の配分比を示し、図3(b)は、現画素濃度の誤差データを示している。
【0029】
いま、現画素濃度am,nに対する補正後濃度a´m,nとすると、次式の演算が行われる。
a´m,n=am,n+(2εm,n−1+2εm−1,n+εm−1,n−1+εm−1,n+1)/6
【0030】
すなわち、2値化誤差生成部10で求められてRAM4に保持された前ラインの前画素の誤差データに基づいて現画素am,nに対する誤差量が誤差演算部7で演算され、その誤差量が濃度補正部8で現画素am,nに所定の割合で加算されて濃度補正が行われて補正後濃度データa´m,nが求められた後、この補正後濃度データa´m,nが、2値化部9で2値化処理される。
【0031】
ここで、補正後濃度データa´m,nによる2値化信号をadm,n、2値化のスレッシュレベルをTHとすると、
a´m,n≧THの時、adm,n=1,εm,n=(a´m,n−M)
a´m,n<THの時、adm,n=0,εm,n=a´m,n
但し、εm,n:現画素濃度am,nに対する2値化誤差
M:階調数
(a´m,n−M):a´m,nの補数
となり、いま、階調数Mが16段階で、全黒レベルを15、全白レベルを0とし、a´m,n=11、TH=8とすると、adm,n=1(黒)、εm,n=11−15=−4となる。すなわち、濃度11の画素を黒(15)に2値化したことで入出力画素間に(−4)の濃度差(誤差)が発生し、この誤差分を順次後の画素に拡散して清算していく。なお、εm,nは、2値化誤差生成部10で演算されてラッチ部11を介して所定タイミングでRAM5に転送される。
【0032】
しかし、2値化の際のスレッシュ値を一定にすると、スレッシュ値付近の濃度の画素では誤差が拡散しきれずに尾引き(テクスチャ)現象が発生するが、この現象は、スレッシュ値を画素毎に周期的に変化させることで取り除くことができる。
【0033】
また、ディザ処理部も共用する画像処理装置の場合は、ディザ用のスレッシュ値設定レジスタを共用することで画像処理装置のハード/ソフトの負担を軽減することができる。図4にスレッシュ値設定レジスタを共用する画像処理装置21の構成例を示す。
【0034】
図4において、画像処理装置21は、マルチプレクサ22、スレッシュ値レジスタ23、システム制御部24及び比較器25から構成されており、マルチプレクサ22により図外でディザ処理されて入力されるディザ画素信号と誤差拡散処理されて入力される誤差拡散画素信号のうち一方が選択されて比較器25に出力され、画素毎のスレッシュ値がセットされたスレッシュ値レジスタ(データテーブル)23からスレッシュ値が比較器25に出力されると、比較器25で入力されたスレッシュ値に基づいてディザ画素信号あるいは誤差拡散画素信号が2値化処理されて2値データとして出力される。システム制御部24では、これら各部の動作が制御されるとともに、スレッシュ値レジスタ23から読み出すスレッシュ値が指示される。
【0035】
また、いま、読み取られた読取データの画素濃度が全黒レベル(15)で、累積誤差が(−6)、スレッシュ値を6〜10の範囲で変化させたとすると、濃度補正後のデータは、9となるからスレッシュ値が6〜9に変化するときには、2値化出力は、1(黒)、2値化生成誤差は、15−9=6として保存される。この状態が続き、スレッシュ値が10に設定されると、2値化出力は、0(白)となり、入力データが全黒レベルにもかかわらず、出力側では、全白として出力されてしまう。また、スレッシュ値を変化させない場合でも、黒地部の周辺で白点が発生し易くなり、画像のコントラストがボケてしまう印象を与えることがある。
【0036】
このような画像のボケをなくすため、請求項1、2記載の発明の画像処理方式を適用する画像処理装置の一実施例を図6〜9に示す。
【0037】
図6は、誤差拡散処理機能を有する画像処理装置31の要部ブロック図であり、上記図2に示した画像処理装置と同一の構成部分には、同一番号を符して説明を省略する。
【0038】
図6において、全黒/全白判定部(全黒全白判別手段)32は、読取データが全黒か全白かを判定し、例えば、(1,0)全黒、(0,1)全白、(0,0)非全黒、全白という信号を2値化誤差生成部9と2値化部11に出力する。
【0039】
システム制御部33は、各部の動作を制御するとともに、2値化部11へ2値化用のスレッシュ値データを入力する。
【0040】
次に、作用を説明する。
【0041】
全黒/全白判定部32から(1,0)全黒、(0,1)全白、(0,0)非全黒、全白という信号が2値化誤差生成部9及び2値化部11に出力されると、全黒あるいは全白のとき、2値化誤差が“0”とされ、2値化部11では、全黒あるいは全白が検出されると、システム制御部33から入力されるスレッシュ値にかかわらず2値化データを黒又は白として出力される。この2値化出力は、2値化後のデータを変換してもよいし、スレッシュレベルを全黒データに対して全白レベルに設定し、全白データに対して全黒レベルに設定してもよい。
【0042】
また、全黒、全白時の補正は、累積誤差が小さいときには、行わないようにすることもできる。すなわち、上記累積誤差が(−5)以上のときは、6〜10のスレッシュ値にかかることはない。また、これら全黒、全白の判定は、どちらか一方の判定だけを行うようにしてもよい。
【0043】
これらの全黒、全白の判定を処理するための具体的な回路構成例を図6〜8に示す。
【0044】
図6は、図5の2値化誤差生成部9に適用される論理回路構成を示しており、全黒、全白の入力に応じて濃度補正部8から入力される複数画素分の濃度データの2値化誤差がそれぞれ演算されて、図外のRAM5と誤差演算部6に出力される。
【0045】
図7は、図5の2値化部11に適用される論理回路構成を示しており、システム制御部33から入力されるスレッシュ値ではなく、全黒/全白判定部32から入力される全黒、全白データで濃度補正部8から入力される濃度データが比較されて2値化処理されて2値化データが出力される。
【0046】
図8は、図5の2値化部11に適用されるスレッシュ値を変化させる部分の論理回路構成を示しており、全黒/全白判定部32から入力される全黒、全白データに応じてシステム制御部33から入力されるスレッシュ値が選択されてスレッシュ値が出力され、図外の2値化部11内で2値化演算が行われる。
【0047】
図9は、画像処理装置31における上記全黒、全白の判定処理に伴う2値化処理手順のフローチャートを示している。
【0048】
図9において、全黒/全白判定部32から入力されるデータが全黒か全白かを判別し(ステップSl)、全黒か全白のときは、一例の処理では、2値化誤差を“0”とし(ステップS2)、他の一例の処理では、累積誤差に応じてスレッシュ値を変換して(ステップS3)2値化処理し(ステップS4)、2値化誤差を演算し(ステップS5)、請求項記載の発明に基づく処理では、2値化誤差にかかわらず黒又は白の2値データに変更して(ステップS6)2値化誤差を演算する(ステップS7)。
【0049】
また、ステップSlで全黒でも全白でもないときは、濃度補正演算を行って補正後濃度データを求め(ステップS8)、補正後濃度データをシステム制御部33から入力されるスレッシュ値で2値化処理して2値データを出力するとともに、補正後濃度データで2値化誤差を演算する(ステップS10)。
【0050】
したがって、全黒または全白の画素データが入力された場合の2値化誤差を“0”とすることで中間調画像のコントラストを向上させることができ、全黒または全白の画素データが入力された場合に累積誤差量に応じて2値化誤差を“0”に設定しているので、2値化のスレッシュ値を周期的に変化させても黒地中の白点や白地中の黒点の発生をなくすことができ、全黒、全白データに応じて2値化データに変換しているので、累積誤差を保存しつつ中間調画像のコントラストを向上させることができる。
【0051】
また、2値化誤差を演算する際に端数分を丸める場合があるが、この端数を“0”に近付く方向に丸めるようにすれば、誤差の整数化を早めることができ、画質の向上を図ることができる。また、2値化誤差を演算する際に2の補数で演算した結果が、負の値となった場合は、端数の丸めを行った後に、“1”を加算することにより、誤差の整数化を早めて画質の向上を図ることができる。
【0052】
例えば、−11÷2=−5.5となった場合、00101(2の補数)を1ビットシフトさせて0010(−6)にプラス1して(−5)に補正する。
【0053】
したがって、誤差演算の端数分を“0”に近づく方向に整数化させているので、誤差の整数化が早くメリハリのある中間調画像を再現することができる。
【0054】
【発明の効果】
【0055】
【0056】
【0057】
請求項記載の発明によれば、ライン毎に入力される多値画素データの画素毎に量子化処理した出力画素データと入力画素データとの誤差を周辺画素データに拡散した結果を所定の設定されたスレッシュ値に基づいて2値化処理して出力2値画素データを出力する画像処理方式において、前記入力される多値画素データの画素毎に全黒か全白かを判別する全黒全白判別手段を設け、前記全黒全白判別手段によって全黒でも全白でもないと判別したとき、前記スレッシュ値を周期的に変化させるとともに、前記全黒全白判別手段によって全黒あるいは全白と判別したとき、前記スレッシュ値を、全黒データに対しては全白レベルに設定し、全白データに対しては全黒レベルに設定するので、全黒、全白データに応じて2値化スレッシュ値を変化させているので累積誤差を保存しつつ中間調画像のコントラストを向上させることができる。
【0058】
請求項記載の発明によれば、全黒全白判別手段における判別は全黒か全白か一方のみ行われてもよい。
【図面の簡単な説明】
【図1】画像処理装置を適用したファクシミリ装置のブロック図
【図2】図1のデジタル画像処理部のブロック図
【図3】図2のデジタル画像処理部で誤差拡散処理の際に使用される誤差拡散フィルタ
の一例を示す図
【図4】画像処理装置のブロック図
【図5】請求項1、2記載の発明による画像処理装置の要部ブロック図
【図6】図5の2値化誤差生成部に適用される論理回路構成を示す図
【図7】図5の2値化部に適用される論理回路構成を示す図
【図8】図5の2値化部に適用されるスレッシュ値を変化させる部分の論理回路構成を示す図
【図9】請求項1、2記載の発明による誤差拡散処理のフローチャート
【符号の説明】
1 ファクシミリ装置
5 RAM
6 デジタル画像処理部
7 誤差演算部
8 濃度補正部
9 2値化部
10 2値化誤差生成部
21 画像処理装置
22 マルチプレクサ
23 スレッシュ値レジスタ
24 システム制御部
25 比較器
31 画像処理装置
32 全黒/全白判定部
33 システム制御部
[0001]
[Industrial applications]
The present invention relates to an image processing method, and more particularly, to an image processing method for processing a halftone image by an error diffusion method.
[0002]
[Prior art]
2. Description of the Related Art Recently, in an information society, devices handling image data are increasing. In an apparatus that handles such image data, an image processing apparatus that converts pixel data read by a scanner or the like into a binary image signal is required. Recently, the image processing apparatus handles not only monochrome binary images such as characters but also halftone images such as photographs.
Therefore, conventionally, as a processing method of a halftone image, a level of each pixel of multi-valued pixel data is compared with matrix data in which a plurality of predetermined threshold values are set, and binarization processing is performed based on the comparison result. A dither method for outputting binary pixel data to represent a halftone image, and converting a binary error between output pixel data quantized for each pixel of multi-valued pixel data and input pixel data into peripheral pixel data. There is an error diffusion method in which a result of the diffusion is binarized based on a predetermined set threshold value, and output binary pixel data is output to express a halftone image. Attention has been focused on an error diffusion method that achieves a balance between resolution and resolution.
[0003]
[Problems to be solved by the invention]
However, in such a conventional error diffusion method, when the input pixel data is at an all black level or an all white level, the accumulated error of the pixel data up to that point does not occur even though the binarization error does not occur. If the threshold value of the binarization is always kept constant and stored, a texture peculiar to error diffusion (an image trailing phenomenon that occurs when error diffusion is not sufficient) occurs. However, there is a problem that a white point is generated near a black background, a black point is easily generated near a white background, and an output image is easily blurred.
[0004]
In a conventional error diffusion process performed by an image processing apparatus described in, for example, Japanese Patent Application Laid-Open No. 1-284172, the remainder (following the decimal point) of an error generated when a binarization error is obtained by weighting calculation ) Is added to the next pixel data to be correlated, corrected, the corrected pixel data is binarized by a certain threshold value, and the input image density and the output image density are stored to reproduce the image. However, this apparatus cannot remove the above-described texture unique to error diffusion.
[0005]
The present invention is, when performing the error diffusion processing, when it is determined whether the all-black or all white for each pixel, a threshold value for the all-black data, the all white level with respect to the total white data Is to reduce the occurrence of white points in a black background and the occurrence of black points in a white background by binarizing pixel data set to all black levels with a threshold value periodically changed for each processing pixel, It is an object of the present invention to provide an image processing method for improving the contrast of a halftone image.
[0006]
[Means for Solving the Problems]
According to the first aspect of the present invention, a result obtained by diffusing an error between input pixel data and output pixel data quantized for each pixel of multi-valued pixel data input for each line into peripheral pixel data is set to a predetermined value. In an image processing method for performing binarization processing based on a threshold value and outputting output binary pixel data, an all-black / all-white determination for determining whether all pixels of the input multi-valued pixel data are all black or all white means provided, when it is determined that neither all white at all black by previous SL all black all white determining means, said thresh values with periodically changing, and full black or all-white by the all black all white determining means When determined, the threshold value is set to an all-white level for all black data, and set to an all-black level for all white data,
The invention according to claim 2 is characterized in that the determination by the all-black / all-white determining means is performed only for either all black or all white.
[0007]
[Action]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
According to the first aspect of the present invention, a result of diffusing an error between output pixel data quantized for each pixel of multi-valued pixel data input for each line and input pixel data into peripheral pixel data is set to a predetermined value. In an image processing method for performing binarization processing based on a threshold value and outputting output binary pixel data, an all-black / all-white determination for determining whether all pixels of the input multi-valued pixel data are all black or all white Means is provided, and when it is determined by the all-black / all-white discriminating means that the image is neither all black nor all-white, the threshold value is periodically changed, and the all black or all-white discriminating means is used. When determined to be white, the threshold value is set to an all-white level for all-black data and to an all-black level for all-white data.
[0014]
Therefore, since the binarized threshold value is changed according to the all-black and all-white data, the contrast of the halftone image can be improved while keeping the accumulated error.
[0015]
According to the second aspect of the present invention, the determination by the all-black / all-white determining means is performed only for all black or all white.
[0016]
【Example】
Hereinafter, the present invention will be specifically described based on examples.
[0017]
FIGS. 1 to 4 are diagrams showing an embodiment of a facsimile apparatus to which an image processing apparatus is applied.
[0018]
FIG. 1 is a block diagram of the facsimile apparatus 1. The facsimile apparatus 1 includes an image sensor 2, an A / D converter 3, a timing controller 4, a RAM 5, a digital image processing unit 6, and the like.
[0019]
The image sensor 2 converts reflected light from the document into an electric signal and outputs a predetermined analog signal to the A / D converter 3. The A / D converter 3 converts the analog signal input from the image sensor 2 into an electric signal. The signal is converted into a predetermined digital signal and output to the digital image processing unit 4.
[0020]
The timing controller 4 outputs a control signal for controlling the operation timing of each section to each section, and a RAM (Random Access Memory) 5 holds and updates various reference data, and stores error data necessary for error diffusion processing described later. Retain and update.
[0021]
As shown in FIG. 2, the digital image processing unit 6 includes an error calculation unit 7, a density correction unit 8, a binarization unit 9, a binarization error generation unit 10, and a latch unit 11. A diffusion processing unit is configured.
[0022]
The error calculator 7 calculates an error amount for the current pixel based on the previous binarized error data held in the RAM 5 and outputs the calculation result to the density corrector 8.
[0023]
The density correction unit 8 adds the error amount calculation result input from the error calculation unit 7 to the read data (digital signal) input from the A / D converter 3, and converts the density correction data into a binarization unit 9. The output is output to the binarization error calculator 10.
[0024]
The binarization unit 9 binarizes the density correction data input from the density correction unit 8 with a predetermined threshold value input, and outputs the binarized data to the binarization error generation unit 10 outside the figure.
[0025]
The binarization error calculation unit 10 calculates a binarization error in the pixel according to the binarization data input from the binarization unit 9 based on the density correction data input from the density difference correction unit 8 and latches it. Output to the unit 11.
[0026]
The latch unit 11 adjusts the output timing of the binarized error data input from the binarized error generation unit 10 and outputs the adjusted data to the RAM 5 and the error calculation unit 7.
[0027]
Next, the operation will be described.
[0028]
An analog signal for one line of the original image read by the image sensor 2 is converted into a digital signal by the A / D converter 3 and output to the digital image processing unit 6, where one line of the analog image is output. An error diffusion process is performed for each pixel. FIG. 3 shows an example of an error diffusion filter used in the error diffusion processing. FIG. 3A shows the distribution ratio of the current pixel * and its surrounding pixels, and FIG. 3B shows error data of the current pixel density.
[0029]
Now, the current pixel density a m, after correction for n concentration a'm, when the n, the following calculation is performed.
a ′ m, n = am , n + (2εm , n−1 + 2εm −1, n + εm −1, n−1 + εm −1, n + 1 ) / 6
[0030]
That is, an error amount for the current pixel am , n is calculated by the error calculation unit 7 based on the error data of the previous pixel of the previous line obtained in the binarization error generation unit 10 and held in the RAM 4, and the error amount is calculated. Is added to the current pixels am , n at a predetermined ratio by the density correction unit 8 to perform density correction to obtain corrected density data a ′ m, n. Then , the corrected density data a ′ m, n is binarized by the binarization unit 9.
[0031]
Here , assuming that the binarized signal based on the corrected density data a ′ m, n is ad m, n and the threshold level of the binarization is TH,
When a ′ m, n ≧ TH, ad m, n = 1, ε m, n = (a ′ m, n −M)
When a ′ m, n <TH, ad m, n = 0, ε m, n = a ′ m, n
Here, ε m, n : binarization error M with respect to current pixel density am , n : gradation number (a ′ m, n −M): complement of a ′ m, n , and gradation number M is now If the total black level is 15, the total white level is 0, and a ′ m, n = 11 and TH = 8 in 16 steps, ad m, n = 1 (black), ε m, n = 11−15 = -4. That is, the binarization of the pixel having the density of 11 into black (15) causes a density difference (error) of (-4) between the input and output pixels, and this error is sequentially diffused to the subsequent pixels for liquidation. I will do it. Note that ε m, n is calculated by the binarization error generation unit 10 and transferred to the RAM 5 at a predetermined timing via the latch unit 11.
[0032]
However, if the threshold value at the time of binarization is made constant, a pixel having a density near the threshold value cannot fully diffuse an error and a tailing (texture) phenomenon occurs. It can be removed by changing it periodically.
[0033]
Further, in the case of an image processing apparatus that also shares a dither processing unit, the load on hardware / software of the image processing apparatus can be reduced by sharing a threshold value setting register for dither. FIG. 4 shows a configuration example of the image processing apparatus 21 sharing the threshold value setting register.
[0034]
4, the image processing device 21 includes a multiplexer 22, a threshold value register 23, a system control unit 24, and a comparator 25. The dither pixel signal input after being dither-processed by the multiplexer 22 out of the figure is input. One of the error-diffusion pixel signals input after being subjected to the diffusion process is selected and output to the comparator 25, and the threshold value is sent to the comparator 25 from a threshold value register (data table) 23 in which a threshold value for each pixel is set. When output, the dither pixel signal or the error diffusion pixel signal is binarized based on the threshold value input by the comparator 25 and output as binary data. The system control unit 24 controls the operations of these units and specifies a threshold value to be read from the threshold value register 23.
[0035]
Now, assuming that the pixel density of the read data is all black level (15), the accumulated error is (-6), and the threshold value is changed in the range of 6 to 10, the data after density correction is When the threshold value changes from 6 to 9, the binarized output is stored as 1 (black) and the binarization generation error is 15-9 = 6. When this state continues and the threshold value is set to 10, the binarized output becomes 0 (white), and the output side is output as all white even though the input data is all black. Further, even when the threshold value is not changed, a white point is likely to be generated around a black background portion, giving an impression that the contrast of an image is blurred.
[0036]
FIGS. 6 to 9 show an embodiment of an image processing apparatus to which the image processing method according to the first and second aspects of the present invention is applied in order to eliminate such image blurring.
[0037]
FIG. 6 is a block diagram of a main part of the image processing apparatus 31 having the error diffusion processing function. The same components as those of the image processing apparatus shown in FIG.
[0038]
In FIG. 6, an all-black / all-white determining unit (all-black and all-white determining unit) 32 determines whether the read data is all black or all white. For example, (1, 0) all black, (0, 1) A signal of all white, (0,0) non-all black, and all white is output to the binarization error generator 9 and the binarizer 11.
[0039]
The system control unit 33 controls the operation of each unit and inputs threshold value data for binarization to the binarization unit 11.
[0040]
Next, the operation will be described.
[0041]
A signal of (1,0) all black, (0,1) all white, (0,0) non-all black, and all white is sent from the all black / all white determination unit 32 to the binarization error generation unit 9 and the binarization signal. When output to the unit 11, the binarization error is set to “0” in the case of all black or all white. When the binarization unit 11 detects all black or all white, the system control unit 33 outputs The binarized data is output as black or white regardless of the input threshold value. This binarized output may be obtained by converting the data after binarization, or by setting the threshold level to an all white level for all black data and to an all black level for all white data. Is also good.
[0042]
In addition, the correction for all black and all white may not be performed when the accumulated error is small. That is, when the cumulative error is equal to or more than (-5), the threshold value of 6 to 10 is not applied. Further, the determination of all black and all white may be performed by only one of the determinations.
[0043]
6 to 8 show specific circuit configuration examples for processing the determination of all black and all white.
[0044]
FIG. 6 shows a logic circuit configuration applied to the binarization error generation unit 9 of FIG. 5, and the density data of a plurality of pixels input from the density correction unit 8 in response to the input of all black and all white. Are calculated and output to the RAM 5 and the error calculator 6 (not shown).
[0045]
FIG. 7 shows a logic circuit configuration applied to the binarization unit 11 of FIG. 5. The logic circuit configuration is not a threshold value input from the system control unit 33 but a total value input from the all black / all white determination unit 32. The density data input from the density correction unit 8 is compared with the black and all white data, and is binarized to output binarized data.
[0046]
FIG. 8 shows a logical circuit configuration of a portion that changes the threshold value applied to the binarization unit 11 in FIG. 5, and converts all-black and all-white data input from the all-black / all-white determination unit 32. In response, the threshold value input from system control unit 33 is selected, the threshold value is output, and a binarization operation is performed in binarization unit 11 (not shown).
[0047]
FIG. 9 shows a flowchart of a binarization processing procedure involved in the above all black and all white determination processing in the image processing apparatus 31.
[0048]
9, data input from the full black / all-white judgment unit 32 determines whether all black or all white (step Sl), when the all-black or all-white, in the processing of one example, the binarization error Is set to "0" (step S2). In another example of the process, the threshold value is converted according to the accumulated error (step S3), the binarization process is performed (step S4), and the binarization error is calculated (step S4). In step S5), in the processing according to the first aspect of the invention, the binary data is changed to black or white binary data regardless of the binary error (step S6), and the binary error is calculated (step S7).
[0049]
If it is not all black or all white in step Sl, density correction calculation is performed to obtain corrected density data (step S8), and the corrected density data is converted into a binary value by a threshold value input from the system control unit 33. The binarization process is performed to output binary data, and a binarization error is calculated using the corrected density data (step S10).
[0050]
Therefore, the contrast of the halftone image can be improved by setting the binarization error to “0” when the all-black or all-white pixel data is input, and the all-black or all-white pixel data is input. In this case, the binarization error is set to “0” according to the accumulated error amount. Therefore, even if the threshold value of the binarization is periodically changed, the white point in the black background or the black point in the white background is not changed. Since the occurrence can be eliminated and the data is converted into the binary data according to the all black and all white data, the contrast of the halftone image can be improved while keeping the accumulated error.
[0051]
In addition, when calculating a binarization error, a fraction may be rounded in some cases. If the fraction is rounded in a direction approaching “0”, the conversion of the error into an integer can be expedited, and the image quality can be improved. Can be planned. In addition, when the result of the two's complement operation when calculating the binarization error becomes a negative value, the error is converted to an integer by adding "1" after rounding the fraction. , And the image quality can be improved.
[0052]
For example, when −11 ÷ 2 = −5.5, 00101 (two's complement) is shifted by 1 bit, and 0010 (−6) is increased by 1 to be corrected to (−5).
[0053]
Therefore, since the fraction of the error calculation is converted to an integer in a direction approaching "0", the conversion of the error into an integer is quick and a sharp halftone image can be reproduced.
[0054]
【The invention's effect】
[0055]
[0056]
[0057]
According to the first aspect of the present invention, a result obtained by diffusing an error between output pixel data quantized for each pixel of multi-valued pixel data input for each line and input pixel data to peripheral pixel data is set to a predetermined value. In an image processing method for performing binarization processing based on the threshold value thus obtained and outputting output binary pixel data, it is possible to determine whether each pixel of the input multi-valued pixel data is all black or all white. A white discriminating means is provided, and when it is judged by the all-black and all-white discriminating means that neither the black nor the all-white, the threshold value is periodically changed and the all-black or all-white discriminating means is used. When the threshold value is determined, the threshold value is set to an all-white level for all-black data and to an all-black level for all-white data. Change threshold value Since thereby it is possible to improve the contrast of the halftone image while preserving the accumulated error.
[0058]
According to the second aspect of the present invention, the determination by the all-black / all-white determination means may be performed for only one of all black and all white.
[Brief description of the drawings]
FIG. 1 is a block diagram of a facsimile apparatus to which an image processing device is applied. FIG. 2 is a block diagram of a digital image processing unit in FIG. 1. FIG. 3 is used in the digital image processing unit in FIG. block diagram of Figure 4 shows an image processing apparatus showing an example of an error diffusion filter [5] binarization error of claim 1, 2 main block diagram of an image processing apparatus according to the invention described [6] 5 FIG. 7 is a diagram showing a logic circuit configuration applied to a generation unit; FIG. 7 is a diagram showing a logic circuit configuration applied to a binarization unit in FIG. 5; FIG. 8 is a threshold value applied to the binarization unit in FIG. FIG. 9 is a diagram showing a logic circuit configuration of a part for changing the error. FIG. 9 is a flowchart of an error diffusion process according to the inventions described in claims 1 and 2.
1 Facsimile machine 5 RAM
Reference Signs List 6 digital image processing unit 7 error calculation unit 8 density correction unit 9 binarization unit 10 binarization error generation unit 21 image processing device 22 multiplexer 23 threshold value register 24 system control unit 25 comparator 31 image processing device 32 All white determination unit 33 System control unit

Claims (2)

ライン毎に入力される多値画素データの画素毎に量子化処理した出力画素データと入力画素データとの誤差を周辺画素データに拡散した結果を所定の設定されたスレッシュ値に基づいて2値化処理して出力2値画素データを出力する画像処理方式において、
前記入力される多値画素データの画素毎に全黒か全白かを判別する全黒全白判別手段を設け、
前記全黒全白判別手段によって全黒でも全白でもないと判別したとき、前記スレッシュ値を周期的に変化させるとともに、前記全黒全白判別手段によって全黒あるいは全白と判別したとき、前記スレッシュ値を、全黒データに対しては全白レベルに設定し、全白データに対しては全黒レベルに設定することを特徴とする画像処理方式。
A result obtained by diffusing an error between output pixel data, which is quantized for each pixel of the multi-valued pixel data input for each line, and input pixel data into peripheral pixel data is binarized based on a predetermined threshold value. In an image processing method of processing and outputting output binary pixel data,
All-black all-white discriminating means for discriminating all black or all white for each pixel of the input multi-valued pixel data is provided,
When it is determined by the all-black-all-white discriminating means that neither all black nor all-white, the threshold value is periodically changed, and when it is discriminated as all black or all-white by the all-black all-white discriminating means, An image processing method characterized in that a threshold value is set to an all white level for all black data and to an all black level for all white data .
前記全黒全白判別手段における判別を全黒か全白か一方のみ行うことを特徴とする請求項1に記載の画像処理方式。2. The image processing method according to claim 1, wherein the determination by the all-black / all-white determination means is performed only for one of all black and all white.
JP2000286586A 1991-11-06 2000-09-21 Image processing method Expired - Lifetime JP3549475B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000286586A JP3549475B2 (en) 1991-11-06 2000-09-21 Image processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP28902491A JP3157870B2 (en) 1991-11-06 1991-11-06 Image processing method
JP2000286586A JP3549475B2 (en) 1991-11-06 2000-09-21 Image processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP28902491A Division JP3157870B2 (en) 1991-11-06 1991-11-06 Image processing method

Publications (2)

Publication Number Publication Date
JP2001111831A JP2001111831A (en) 2001-04-20
JP3549475B2 true JP3549475B2 (en) 2004-08-04

Family

ID=32929534

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000286586A Expired - Lifetime JP3549475B2 (en) 1991-11-06 2000-09-21 Image processing method

Country Status (1)

Country Link
JP (1) JP3549475B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8009327B2 (en) 2002-07-11 2011-08-30 Canon Kabushiki Kaisha Method and apparatus for image processing

Also Published As

Publication number Publication date
JP2001111831A (en) 2001-04-20

Similar Documents

Publication Publication Date Title
JPH05199413A (en) Picture processor
EP0781034B1 (en) Image processing apparatus and method
US6356361B1 (en) Image processing apparatus and method for processing gradation image data using error diffusion
US7286268B2 (en) Image processing apparatus capable of preventing pseudo contour
JP3549475B2 (en) Image processing method
JP2801195B2 (en) Image processing device
JP3157870B2 (en) Image processing method
JPH10313407A (en) Image processing unit
JP2755307B2 (en) Image processing device
JP2882531B2 (en) Image processing device
JP2001136389A (en) Picture processor
JP2570890B2 (en) Image processing device
JP2644491B2 (en) Image processing device
JP2900907B2 (en) Image processing device
JP3679260B2 (en) Image processing device
JPH0197066A (en) Picture processing method
JPH0795408A (en) Picture processor
JP2644492B2 (en) Image processing device
JPH05260303A (en) Density processing method
JP2001211323A (en) Image processing apparatus
JP2000050069A (en) Picture binarization method and device
JPH11136510A (en) Image processor
JPH03186065A (en) Picture processor
JPH0778830B2 (en) Image signal processor
JPH0955850A (en) Pseudo halftone image processor

Legal Events

Date Code Title Description
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: 20040420

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040420

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090430

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100430

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100430

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110430

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120430

Year of fee payment: 8

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120430

Year of fee payment: 8