JP3565402B2 - Image processing apparatus, image processing method, and recording medium recording image processing program - Google Patents

Image processing apparatus, image processing method, and recording medium recording image processing program Download PDF

Info

Publication number
JP3565402B2
JP3565402B2 JP15059598A JP15059598A JP3565402B2 JP 3565402 B2 JP3565402 B2 JP 3565402B2 JP 15059598 A JP15059598 A JP 15059598A JP 15059598 A JP15059598 A JP 15059598A JP 3565402 B2 JP3565402 B2 JP 3565402B2
Authority
JP
Japan
Prior art keywords
matrix
error
dither
error diffusion
diffusion
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
JP15059598A
Other languages
Japanese (ja)
Other versions
JPH11331588A (en
Inventor
透 清水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP15059598A priority Critical patent/JP3565402B2/en
Publication of JPH11331588A publication Critical patent/JPH11331588A/en
Application granted granted Critical
Publication of JP3565402B2 publication Critical patent/JP3565402B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理技術に関し、特に、プリンタ出力のためのハーフトーン処理を行う画像処理装置に適用して好適な装置、画像処理方法および該装置を構成するコンピュータで実行するプログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
例えば1670万色のフルカラーデジタル画像データ等の高階調データを、インクジェットプリンタ等の低階調出力の能力しか持たない出力装置に出力させるために用いる画像処理技術であるハーフトーン処理として、誤差拡散法とディザ法が知られている。どちらの手法も一長一短あり、どのように使い分けるかで、画質に大きな差がでてくる。
【0003】
両手法を、同一画面上で用いる従来の方式として、例えば特開平6−253133号公報には、画像入力端子から入力された画像データとこの入力画像データを2値化したときの出力画像データとの誤差データを周辺画素の画素データへ拡散することにより2値化を行う誤差拡散処理手段と、誤差拡散処理手段と並列に配設され入力画像データに対してディザ処理するディザ処理手段と、入力画像データの信号レベルが閾値TH1以下かあるいは閾値TH2(TH1<TH2)よりも高い場合には入力画像データをディザ処理するディザ処理手段の出力を選択し、入力画像データの信号レベルがTH1より大きくかつTH2以下である場合、誤差拡散処理手段の出力を選択する選択手段を備えた画像処理装置が提案されている。すなわち特に濃度が高い領域と特に低い領域にはディザ処理手段、それ以外には誤差拡散処理手段を用いるというようにハーフトーン手法を切り換える方式が提案されている。
【0004】
また、例えば特開平10−56568号公報には、グレースケール画像デー
タの濃度が所定値よりも小さいか大きいかを比較してハーフトーン画像データ化手段と誤差拡散法からディザマトリクス法に切り替える手段と、誤差拡散法とディザマトリクス法のハーフトーン画像データ化出力が異なる領域を判定する手段と、領域判定結果に基づいてハーフトーン画像化処理に関するプロセスを切り換える手段を有するとともに、切り換え濃度またはその近傍において誤差拡散法により生成したハーフトーン画像データを基に所定のルールに従って生成したパターンをディザマトリクス法の閾値マトリクスとして用いる画像処理装置が提案されている。この方式は、誤差拡散法とディザ法の切り換え近傍の濃度での処理に、誤差拡散法の出力に似た結果が得られる特殊なディザマトリクスを用い、誤差も蓄積させておくようにしたものである。
【0005】
【発明が解決しようとする課題】
しかしながら、上記した従来の方式においては、同一画像内で誤差拡散法とディザ法という2種類のハーフトーン処理を用いると、その切り換え近傍での不連続性により、画質劣化が生ずる、という問題点を有している。
【0006】
その対策として、例えば上記特開平10−56568号公報等には、切り換え近傍の濃度での処理に、誤差拡散法の出力に似た結果が得られる特殊なディザマトリクスを用い、さらに誤差も蓄積させておく方法が提案されてはいるものの、各種問題点を有しており、この方法は実用上不十分なものである。
【0007】
その第1の問題点は、ディザ法で誤差を蓄積させておくだけでは、誤差拡散法とディザ法の不連続性を十分には吸収しきれない、ということである。
【0008】
その第2の問題点は、特に濃度が高い領域と特に低い領域では、同じディザマトリクスを広範囲に用いることによる周期性により、画質劣化が生ずる、ということである。
【0009】
その第3の問題点は、誤差拡散法の出力に似た結果が得られる特殊なディザマトリクスを新たに設計しなくてはならず、その設計が容易ではない、ということである。
【0010】
さらに第4の問題点は、全体的に暗いまたは明るいような画像では、誤差拡散法とディザ法を切り換える濃度を再設定しないと、良好なハーフトーン画像が得られない、ということである。
【0011】
第5の問題点は、誤差拡散法とディザ法を切り換えるため、処理手順が複雑になる、ということである。
【0012】
したがって本発明は、上記問題点に鑑みてなされたものであって、その目的は、同一画像中にディザ法と誤差拡散法を用いて高画質化を図りつつ、簡要な処理で切り換え近傍での不連続性を回避可能とした画像処理装置を提供することにある。
【0013】
【課題を解決するための手段】
上記目的を達成するために、本発明の画像処理装置は、その概略を述べれば、誤差拡散処理における拡散誤差マトリクスと閾値を、画像がディザ法に適するか誤差拡散方法に適するかの度合いにより変動させるようにしたものである。
【0014】
より詳細には、本発明は、好ましくは、画像がディザ法に適するか誤差拡散
方法に適するかの度合いを求める手段と、閾値をディザ法に近い近傍ではディザマトリクスに類似する形で変動させ、かつ誤差拡散法に近い近傍では一定値になるように設定する手段と、拡散誤差マトリクスをディザ法に近い近傍ではマトリクスサイズ(分散させる範囲)を小さくマトリクスの要素(分散させる度合い)も小さくしかつ誤差拡散法に近い近傍ではマトリクスサイズ(分散させる範囲)を大きくマトリクスの要素(分散させる度合い)も大きくする手段と、前記2つの手段により決定された拡散誤差マトリクスと閾値により誤差拡散処理を行う手段を備える。
【0015】
【発明の実施の形態】
まず本発明の動作原理について説明する。本発明においては、画像がディザ法に適するか誤差拡散方法に適するかの度合いを求める手段(図1のハーフトーン処理適合度算出部1)により求められた度合いが、閾値を設定する手段(図1の閾値設定部2)と、拡散誤差マトリクスを設定する手段(図1の拡散誤差マトリクス設定部3)に送られ、それぞれ閾値と拡散誤差マトリクスが設定される。誤差拡散処理を行う手段(図1の適応ハーフトーン処理部4)では、設定された閾値と拡散誤差マトリクスを用いて誤差拡散処理を行う。
【0016】
閾値を設定する手段と拡散誤差マトリクスを設定する手段における、閾値と拡散誤差マトリクスの設定基準により、ディザ法に適する度合いが大きい画像領域では、閾値がディザマトリクスに類似する形となり、かつ拡散誤差マトリクスはマトリクスサイズ(分散させる範囲)を小さくマトリクスの要素(分散させる度合い)も小さくなることで、ハーフトーン処理がディザ法に近くなる。
【0017】
また、誤差拡散法に適する度合いが大きい画像領域では、閾値がディザマトリクス的なばらついた状態から一定値に近くなり、かつ拡散誤差マトリクスがはマトリクスサイズ(分散させる範囲)を大きくマトリクスの要素(分散させる度合い)も大きくなることで、ハーフトーン処理が誤差拡散法に近くなる。
【0018】
以上により、同一画像内で誤差拡散法とディザ法という2種類のハーフトーン処理を用いる場合の、切り換え部分での不連続性による画質劣化を防止する。
【0019】
本発明の実施の形態について詳細に説明する。図1は、本発明の一実施の形態の構成を示す図である。
【0020】
図1を参照すると、本発明の一実施の形態は、ハーフトーン処理適合度計算部1と、閾値設定部2と、拡散誤差マトリクス設定部3と、適応ハーフトーン処理部4とを備えている。
【0021】
ハーフトーン処理適合度計算部1では、画像データの値を基に、その画像がディザ法に適するか誤差拡散方法に適するかの度合い(「ハーフトーン適合度」という)を求める。このハーフトーン適合度は、画像がディザ法に適するほど小さく誤差拡散法に適するほど大きくなる。
【0022】
閾値設定部2は、閾値を、ハーフトーン適合度が小さいほどディザマトリクスに類似する形で変動させ、かつ、ハーフトーン適合度が大きいほど一定値になるように設定する。
【0023】
拡散誤差マトリクス設定部3では、拡散誤差マトリクスを、ハーフトーン適合度が小さいほどマトリクスサイズ(分散させる範囲)を小さくマトリクスの要素(分散させる度合い)も小さくし、かつハーフトーン適合度が大きいほどマトリクスサイズ(分散させる範囲)を大きくマトリクスの要素(分散させる度合い)も大きくなるように設定する。
【0024】
適応ハーフトーン処理部4では、閾値設定部2と、拡散誤差マトリクス設定部3が決定した閾値と拡散誤差マトリクスを用いて誤差拡散処理を行う。
【0025】
次に、図1を用いて、本発明の一実施の形態の動作について詳細に説明する。
【0026】
ハーフトーン処理適合度計算部1は、送られてきた画像データの値を基に、その画像がディザ法に適するほど小さく誤差拡散法に適するほど大きくなるハーフトーン適合度Hdgiを算出し、閾値設定部2と拡散誤差マトリクス設定部3に送る。
【0027】
閾値設定部2は、ハーフトーン処理適合度計算部1から受け取ったハーフトーン適合度を基に、閾値が、ハーフトーン適合度が小さいほどディザマトリクスに類似する形で変動し、かつハーフトーン適合度が大きいほど一定値になるように設定し、閾値THiを適応ハーフトーン処理部4に送る。
【0028】
拡散誤差マトリクス設定部3では、ハーフトーン処理適合度計算部1から受け取ったハーフトーン適合度を基に、拡散誤差マトリクスを、ハーフトーン適合度が小さいほどマトリクスサイズ(分散させる範囲)を小さくマトリクスの要素(分散させる度合い)も小さくし、ハーフトーン適合度が大きいほどマトリクスサイズ(分散させる範囲)を大きくマトリクスの要素(分散させる度合い)も大きくなるように設定し、拡散誤差マトリクスを適応ハーフトーン処理部4に送る。
【0029】
適応ハーフトーン処理部4では、閾値設定部2と拡散誤差マトリクス設定部3で決定された閾値と拡散誤差マトリクスを用いて誤差拡散処理を行う。
【0030】
なお、ハーフトーン処理適合度算出部1、閾値設定部2、拡散誤差マトリクス設定部3、適応ハーフトーン処理部4は、画像処理装置を構成するコンピュータ(プロセッサ)上で実行されるプログラム(画像処理プログラム)によってその処理を実現することができる。
【0031】
次に本発明の一実施の形態の作用効果について説明する。
【0032】
本実施の形態では、ハーフトーン処理適合度計算部1が算出したハーフトーン適合度を基に、閾値設定部2と拡散誤差マトリクス設定部3が、適応ハーフトーン処理部4でのハーフトーン処理(誤差拡散処理)が、対象となる画像がディザ法に適するならディザに近くなるように、かつ誤差拡散法に適するなら誤差拡散法に近くなるように、閾値と拡散誤差マトリクスを算出するように構成したことにより、同一画像内で誤差拡散法とディザ法という2種類のハーフトーン処理を用いる場合でも、切り換え近傍での不連続性による画質劣化を防止することが可能である。
【0033】
【実施例】
次に、上記した本発明の実施の形態についてさらに詳細に説明すべく具体的な実施例について図面を参照して詳細に説明する。本実施例の画像処理装置は、256階調の画像データを2階調にハーフトーン処理するものである。
【0034】
図1を参照すると、ハーフトーン処理適合度計算部1では、X座標x、Y座標yの画像データの輝度値Dx,y(0〜255)を基に、ハーフトーン適合度Hdgx,yを算出する。その算出基準は以下の考えに基づく。
【0035】
画像の輝度が極端に明るい、もしくは極端に暗い部分においてはディザ法が適しており、それ以外の部分は誤差拡散が適する。ただし、ディザ法においてもドットの並びが均一にならないように、誤差拡散的にドットが散らばった方が良好な画像となる。
また誤差拡散法においても、演算量を少なくなるような拡散誤差マトリクスが望ましい。
【0036】
本実施例では、Hdgx,yは以下の式(1)で算出されることとする。
【0037】

Figure 0003565402
【0038】
閾値設定部2は、ハーフトーン適合度Hdgx,yと輝度値Dx,yから、閾値THx,yを算出する。その算出基準は以下の考えに基づく。
【0039】
THx,yは、Hdgx,yが小さいほど基準閾値Tx,yを中心としてディザマトリクスM(i,j)に類似する形で変動し、かつHdgx,yが大きいほど基準閾値Tx,y(一定の閾値)となるように設定する。
【0040】
基準閾値Tx,yは、一定となる範囲を除いて、輝度値Dx,yが大きい時には大きく、小さい時には小さくなるように設定する。
【0041】
基準閾値をTx,yを輝度値Dx,yに基づいて変動させる理由は、誤差拡散処理における、高明度領域の黒ドット出現と低明度領域の白ドット出現の遅れを回避するためである。
【0042】
本実施例では、閾値THx,yは以下の式(2)で算出するものとする。
【0043】
Figure 0003565402
【0044】
Figure 0003565402
【0045】
M(i,j) = ((0,32,8,40),(48,16,56,24) ,(12,44,4,36),(60,28,52,20))…(4)
【0046】
ただし、%はモジェラ(余剰)演算子で、A%Bは、AをBで除算した余りを表す。また、M(i,j)は、通常の4X4のベイヤー型ディザマトリクスである。
【0047】
拡散誤差マトリクス設定部3では、ハーフトーン適合度Hdgx,yから拡散誤差マトリクスWx,yを算出する。その算出基準は以下の考えに基づく。
【0048】
ハーフトーン適合度Hdgx,yが小さいほどマトリクスの要素Wx,y(分散させる度合い)小さくし、かつHdgx,yが大きいほどマトリクスの要素(分散させる度合い)大きくなるように設定する。
【0049】
本実施例では、Wx,y は、通常の誤差拡散で多く用いられているJarvis,Judice and Ninkeの拡散誤差マトリクスWJJNx,yをHdgx,yで重み付けして、その要素が0.3以下は0とすることで算出することとする。ハーフトーン適合度Hdgx,yが小さくなるにつれ、マトリクスの周辺の要素から0になり、要素が0となるいうことは、分散させないということなので、マトリクスサイズが小さくなることになる。
【0050】
Figure 0003565402
【0051】
Figure 0003565402
【0052】
適応ハーフトーン処理部4では、閾値THx,yと拡散誤差マトリクスと、
今までにハーフトーン処理を行った結果の誤差Ex,yを用いて、画像データDx,yにハ
ーフトーン処理を行い、ハーフトーン画像(2値化)データD’x,yを算出する。演算は
、閾値がマトリクスとなっていて、拡散誤差マトリクスが固定でない点以外、通常の誤差
拡散法と同様である。すなわち、本実施例では、D’x,yは以下の式(7)〜(9)で算出
される。で算出される。
【0053】
Figure 0003565402
【0054】
DMx,y = Dx,y + 1/ΣijWJJNi,j × Σij(wi,j×Ei,j) …(8)
【0055】
Ex,y = D’x,y − Dx,y …(9)
【0056】
次に本実施例の作用効果について説明する。
【0057】
本実施例では、画像データの輝度値を基にハーフトーン適合度を求め、閾値と拡散誤差マトリクスを修正することで、ディザ法が適する領域ではディザ法に近いハーフトーン処理を行い、誤差拡散法が適する領域では高明度領域の黒ドット出現と低明度領域の白ドット出現の遅れを回避できる誤差拡散法に近いハーフトーン処理を実現することが可能となる。これにより、同一画像上でディザ法と誤差拡散法を用いて両手法の利点を生かしたハーフトーン処理を行う場合に、境界部に不連続性による画質劣化をなすくすことができる。
【0058】
【発明の効果】
以上説明したように、本発明によれば、同一画像上でディザ法と誤差拡散法を用いて両手法の利点を生かしたハーフトーン処理を行う場合に、境界部に不連続性による画質劣化が見られず、画質を向上する、という効果を奏する。
【0059】
その理由は、本発明においては、ディザ法が適する領域ではディザ法に近いハーフトーン処理を行い、誤差拡散法が適する領域では誤差拡散法に近いハーフトーン処理を行う、ように構成したためである。
【図面の簡単な説明】
【図1】本発明の一実施の形態の構成を示すブロック図である。
【符号の説明】
1 ハーフトーン処理適合度計算部
2 閾値設定部
3 拡散誤差マトリクス設定部
4 適応ハーフトーン処理部[0001]
TECHNICAL FIELD OF THE INVENTION
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing technique, and in particular, an apparatus suitable for being applied to an image processing apparatus that performs halftone processing for printer output, an image processing method, and a recording recording a program executed by a computer configuring the apparatus. Media related.
[0002]
[Prior art]
For example, an error diffusion method is used as halftone processing, which is an image processing technique used to output high gradation data such as full color digital image data of 16.7 million colors to an output device having only low gradation output capability such as an ink jet printer. And the dither method is known. Both methods have their advantages and disadvantages, and there is a great difference in image quality depending on how they are used properly.
[0003]
As a conventional method in which both methods are used on the same screen, for example, JP-A-6-253133 discloses an image data input from an image input terminal and output image data obtained by binarizing the input image data. Error diffusion processing means for performing binarization by diffusing the error data into pixel data of peripheral pixels, dither processing means arranged in parallel with the error diffusion processing means for dithering input image data, When the signal level of the image data is equal to or less than the threshold value TH1 or higher than the threshold value TH2 (TH1 <TH2), the output of the dither processing means for dithering the input image data is selected, and the signal level of the input image data is larger than TH1. An image processing apparatus having a selection unit for selecting an output of the error diffusion processing unit when the difference is equal to or less than TH2 has been proposed. In other words, a method has been proposed in which the halftone method is switched such that dither processing means is used in an area having a particularly high density and an area particularly low in density, and an error diffusion processing means is used in other areas.
[0004]
Also, for example, Japanese Patent Application Laid-Open No. H10-56568 discloses a halftone image data conversion unit that compares whether the density of grayscale image data is smaller or larger than a predetermined value and a unit that switches from the error diffusion method to the dither matrix method. Means for determining an area where the halftone image data output of the error diffusion method and the dither matrix method are different, and means for switching a process relating to the halftone imaging processing based on the area determination result. 2. Description of the Related Art An image processing apparatus using a pattern generated according to a predetermined rule based on halftone image data generated by an error diffusion method as a threshold matrix of a dither matrix method has been proposed. In this method, a special dither matrix that can obtain a result similar to the output of the error diffusion method is used for processing at a density near the switching between the error diffusion method and the dither method, and errors are accumulated. is there.
[0005]
[Problems to be solved by the invention]
However, the conventional method described above has a problem in that if two types of halftone processing, that is, an error diffusion method and a dither method, are used in the same image, image quality is deteriorated due to discontinuity near the switching. Have.
[0006]
As a countermeasure, for example, in Japanese Patent Application Laid-Open No. Hei 10-56568, a special dither matrix that can obtain a result similar to the output of the error diffusion method is used for processing at a density near the switching, and errors are further accumulated. Although a method has been proposed, it has various problems, and this method is not practically sufficient.
[0007]
The first problem is that the discontinuity between the error diffusion method and the dither method cannot be sufficiently absorbed only by accumulating errors by the dither method.
[0008]
The second problem is that the image quality is deteriorated due to the periodicity caused by using the same dither matrix in a wide range, particularly in a high density area and a particularly low density area.
[0009]
The third problem is that a special dither matrix that can obtain a result similar to the output of the error diffusion method must be newly designed, and the design is not easy.
[0010]
A fourth problem is that a good halftone image cannot be obtained unless the density for switching between the error diffusion method and the dither method is reset for an image that is entirely dark or bright.
[0011]
The fifth problem is that the processing procedure is complicated because the error diffusion method and the dither method are switched.
[0012]
Therefore, the present invention has been made in view of the above problems, and has as its object to achieve high image quality using the dither method and the error diffusion method in the same image, and to perform simple processing in the vicinity of switching using a simple process. An object of the present invention is to provide an image processing device capable of avoiding discontinuity.
[0013]
[Means for Solving the Problems]
In order to achieve the above object, the image processing apparatus of the present invention, in brief, varies a diffusion error matrix and a threshold in an error diffusion process depending on whether an image is suitable for a dither method or an error diffusion method. It is intended to be.
[0014]
More specifically, the present invention preferably provides means for determining the degree to which an image is suitable for the dither method or the error diffusion method, and changing the threshold value in the vicinity of the dither method in a manner similar to the dither matrix, A means for setting a constant value near the error diffusion method, and a matrix size (range to be dispersed) and a matrix element (degree of dispersion) small near the diffusion error matrix near the dither method; Means for increasing the matrix size (range to be dispersed) in the vicinity close to the error diffusion method and for increasing the elements of the matrix (degree of dispersion), and means for performing error diffusion processing using a diffusion error matrix and a threshold determined by the two means. Is provided.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
First, the operation principle of the present invention will be described. In the present invention, the degree obtained by the means for determining whether the image is suitable for the dither method or the error diffusion method (halftone processing suitability calculating unit 1 in FIG. 1) is used as a means for setting a threshold (see FIG. 1). 1 and a means for setting a diffusion error matrix (diffusion error matrix setting section 3 in FIG. 1) to set a threshold and a diffusion error matrix, respectively. The means for performing the error diffusion process (the adaptive halftone processing unit 4 in FIG. 1) performs the error diffusion process using the set threshold value and the diffusion error matrix.
[0016]
According to the threshold and the diffusion error matrix setting criterion in the means for setting the threshold and the diffusion error matrix, in an image region where the degree of suitability for the dither method is large, the threshold has a form similar to the dither matrix, and the diffusion error matrix Since the matrix size (dispersion range) is small and the matrix elements (degree of dispersion) are also small, the halftone processing is close to the dither method.
[0017]
Further, in an image region having a high degree of suitability for the error diffusion method, the threshold value becomes close to a constant value from a dither matrix-like variation state, and the diffusion error matrix has a large matrix size (dispersion range) and a large matrix element (variance). The degree of halftone processing becomes closer to the error diffusion method.
[0018]
As described above, when two types of halftone processing, that is, the error diffusion method and the dither method, are used in the same image, the image quality is prevented from being deteriorated due to the discontinuity at the switching portion .
[0019]
An embodiment of the present invention will be described in detail. FIG. 1 is a diagram showing a configuration of an embodiment of the present invention.
[0020]
Referring to FIG. 1, one embodiment of the present invention includes a halftone processing adaptability calculating unit 1, a threshold setting unit 2, a diffusion error matrix setting unit 3, and an adaptive halftone processing unit 4. .
[0021]
The halftone processing suitability calculating unit 1 determines the degree of suitability of the image for the dither method or the error diffusion method (referred to as “halftone suitability”) based on the value of the image data. The halftone conformity is small as the image is suitable for the dither method and is large as the image is suitable for the error diffusion method.
[0022]
The threshold setting unit 2 sets the threshold such that the smaller the halftone suitability is, the more the threshold value is changed in a manner similar to the dither matrix, and the threshold is set to a constant value as the halftone suitability is larger .
[0023]
The diffusion error matrix setting unit 3 sets the diffusion error matrix such that the smaller the halftone compatibility, the smaller the matrix size (range to be dispersed) and the smaller the matrix element (degree of dispersion), and the larger the halftone compatibility, the smaller the matrix. The size (the range to be dispersed) is set to be large and the elements of the matrix (the degree of dispersion) are also large.
[0024]
The adaptive halftone processing unit 4 performs an error diffusion process using the threshold value determined by the threshold value setting unit 2 and the diffusion error matrix determined by the diffusion error matrix setting unit 3.
[0025]
Next, the operation of the embodiment of the present invention will be described in detail with reference to FIG.
[0026]
The halftone processing suitability calculating unit 1 calculates a halftone suitability Hdgi based on the value of the sent image data so that the image is small enough to be suitable for the dither method and large enough to be suitable for the error diffusion method, and the threshold value is set. It is sent to the section 2 and the diffusion error matrix setting section 3.
[0027]
The threshold value setting unit 2 changes the threshold value based on the halftone matching degree received from the halftone processing matching degree calculating unit 1 in a manner similar to the dither matrix as the halftone matching degree decreases, and Is set to be a constant value as is larger , and the threshold value THi is sent to the adaptive halftone processing unit 4.
[0028]
The diffusion error matrix setting unit 3 sets the diffusion error matrix based on the halftone matching degree received from the halftone processing matching degree calculation unit 1 such that the smaller the halftone matching degree, the smaller the matrix size (range to be dispersed). The element (degree of dispersion) is reduced, and the matrix size (range to be dispersed) is set to be larger as the degree of halftone conformity is larger , and the element of the matrix (degree of dispersion) is also increased. Send to Part 4.
[0029]
The adaptive halftone processing unit 4 performs an error diffusion process using the threshold and the diffusion error matrix determined by the threshold setting unit 2 and the diffusion error matrix setting unit 3.
[0030]
It should be noted that the halftone processing suitability calculating section 1, threshold setting section 2, diffusion error matrix setting section 3, and adaptive halftone processing section 4 are programs (image processing) executed on a computer (processor) constituting the image processing apparatus. Program) can realize the processing.
[0031]
Next, the operation and effect of the embodiment of the present invention will be described.
[0032]
In the present embodiment, the threshold setting unit 2 and the diffusion error matrix setting unit 3 use the halftone processing (4) in the adaptive halftone processing unit 4 based on the halftone compatibility calculated by the halftone processing compatibility calculation unit 1. Error diffusion processing) calculates a threshold value and a diffusion error matrix so that the target image is close to dither if the image is suitable for the dither method, and is close to the error diffusion method if the image is suitable for the error diffusion method. Thus, even when two types of halftone processing, the error diffusion method and the dither method, are used in the same image, it is possible to prevent image quality deterioration due to discontinuity near switching.
[0033]
【Example】
Next, specific examples will be described in detail with reference to the drawings in order to explain the above-described embodiments of the present invention in further detail. The image processing apparatus according to the present embodiment performs halftone processing on image data of 256 gradations into two gradations.
[0034]
Referring to FIG. 1, the halftone processing adaptability calculating unit 1 calculates a halftone adaptability Hdgx, y based on the luminance values Dx, y (0 to 255) of the image data at the X coordinate x and the Y coordinate y. I do. The calculation standard is based on the following idea.
[0035]
The dither method is suitable for a part where the luminance of the image is extremely bright or extremely dark, and the error diffusion is suitable for the other part. However, even in the dither method, a better image is obtained when the dots are scattered by error diffusion so that the arrangement of the dots is not uniform.
Also in the error diffusion method, a diffusion error matrix that reduces the amount of calculation is desirable.
[0036]
In the present embodiment, Hdgx, y is calculated by the following equation (1).
[0037]
Figure 0003565402
[0038]
The threshold setting unit 2 calculates a threshold THx, y from the halftone conformity Hdgx, y and the luminance value Dx, y. The calculation standard is based on the following idea.
[0039]
THx, y is, Hdgx, y is small enough reference threshold Tx, vary in a manner similar around the y the dither matrix M (i, j), and Hdgx, y becomes larger as the reference threshold Tx, y (constant (Threshold).
[0040]
The reference threshold value Tx, y is set to be large when the luminance value Dx, y is large and to be small when the luminance value Dx, y is small , except for a range in which the reference value is constant .
[0041]
The reason for changing the reference threshold value Tx, y based on the luminance value Dx, y is to avoid a delay between the appearance of black dots in the high brightness area and the appearance of white dots in the low brightness area in the error diffusion processing.
[0042]
In this embodiment, the threshold value THx, y is calculated by the following equation (2).
[0043]
Figure 0003565402
[0044]
Figure 0003565402
[0045]
M (i, j) = ((0,32,8,40), (48,16,56,24), (12,44,4,36), (60,28,52,20)) ... ( Four)
[0046]
Here,% is a Mojera (surplus) operator, and A% B represents a remainder obtained by dividing A by B. M (i, j) is a normal 4 × 4 Bayer dither matrix.
[0047]
The diffusion error matrix setting unit 3 calculates a diffusion error matrix Wx, y from the halftone conformity Hdgx, y. The calculation standard is based on the following idea.
[0048]
The matrix elements Wx, y (degree of dispersion) are set to be smaller as the halftone matching degree Hdgx, y is smaller, and the matrix elements (degree of dispersion) are set to be larger as Hdgx, y is larger .
[0049]
In this embodiment, the diffusion error matrix WJJNx, y of Jarvis, Judice and Ninke, which is frequently used in ordinary error diffusion, is weighted by Hdgx, y. It will be calculated by doing. As the halftone matching degree Hdgx, y decreases, the peripheral elements of the matrix become 0, and the fact that the elements become 0 means that they are not dispersed, so the matrix size becomes smaller.
[0050]
Figure 0003565402
[0051]
Figure 0003565402
[0052]
In the adaptive halftone processing unit 4, the threshold value THx, y and the diffusion error matrix
The halftone processing is performed on the image data Dx, y using the error Ex, y resulting from the halftone processing performed so far to calculate halftone image (binarized) data D′ x, y. The calculation is the same as the normal error diffusion method except that the threshold value is a matrix and the diffusion error matrix is not fixed. That is, in the present embodiment, D'x, y is calculated by the following equations (7) to (9). Is calculated.
[0053]
Figure 0003565402
[0054]
DMx, y = Dx, y + 1 / ΣijWJJNi, j × Σij (wi, j × Ei, j) (8)
[0055]
Ex, y = D'x, y-Dx, y ... (9)
[0056]
Next, the operation and effect of this embodiment will be described.
[0057]
In the present embodiment, the halftone conformity is calculated based on the luminance value of the image data, and the threshold and the diffusion error matrix are corrected. In a region where is suitable, it is possible to realize a halftone process close to an error diffusion method that can avoid a delay between the appearance of black dots in a high brightness region and the appearance of white dots in a low brightness region. Accordingly, when performing halftone processing utilizing the advantages of both methods using the dither method and the error diffusion method on the same image, it is possible to reduce image quality deterioration due to discontinuity at the boundary.
[0058]
【The invention's effect】
As described above, according to the present invention, when performing halftone processing using the advantages of both methods using the dither method and the error diffusion method on the same image, image quality degradation due to discontinuity at the boundary portion is reduced. This has the effect of improving image quality without being seen.
[0059]
The reason is that, in the present invention, halftone processing close to the dither method is performed in a region suitable for the dither method, and halftone processing close to the error diffusion method is performed in the region suitable for the error diffusion method.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.
[Explanation of symbols]
Reference Signs List 1 halftone processing adaptability calculating unit 2 threshold setting unit 3 diffusion error matrix setting unit 4 adaptive halftone processing unit

Claims (4)

画像データがディザ法に適するか誤差拡散方法に適するかの度合いである適合度画像データの輝度値に基づいて求める適合度算出手段と、前記適合度に基づき、ディザ法に適する濃度領域では適合度がディザ法に近いほど閾値をディザマトリクスに類似する形で変動させると共に、誤差拡散法に適する濃度領域では基準閾値となるように設定する閾値設定手段と、前記適合度に基づいて拡散誤差マトリクスの計算を行い、ディザ法に適する濃度領域ではディザ法に近いほどマトリクスの要素を小さくし、且つ誤差拡散法に適する濃度領域では誤差拡散方法に近いほどマトリクスの要素を大きくし、マトリクスの要素が所定値以下の場合はマトリクスの要素を実質0とすることでマトリクスサイズが小さくなるようマトリクスサイズを変更する拡散誤差マトリクス手段と、前記閾値設定手段と前記拡散誤差マトリクス手段によりそれぞれ決定された前記閾値と拡散誤差マトリクスにより画像データの誤差拡散処理を行う手段と、を備えたことを特徴とする画像処理装置。A goodness-of-fit calculating means for obtaining a goodness of fit, which is a degree of whether the image data is suitable for the dither method or the error diffusion method, based on the luminance value of the image data; and a good fit in a density region suitable for the dither method based on the goodness. A threshold value changing unit that sets the threshold value to be closer to the dither method in a manner similar to the dither matrix, and sets a reference threshold value in a density region suitable for the error diffusion method; and a diffusion error matrix based on the fitness. In the density region suitable for the dither method, the element of the matrix is made smaller as it is closer to the dither method, and in the density region suitable for the error diffusion method, the element of the matrix is made larger as it is closer to the error diffusion method. If the value is equal to or smaller than a predetermined value, the matrix size is changed so that the matrix size is reduced by making the matrix elements substantially zero. The image processing apparatus comprising: the diffusion error matrix means, further comprising a means for performing error diffusion processing for the image data by the threshold value and diffusion error matrix determined respectively by the diffusion error matrix means and the threshold value setting means . 前記閾値設定手段は、前記適合度が誤差拡散方法に近いほど前記閾値を基準閾値となるように設定し、前記基準閾値が画素データの輝度値の大小に応じてその値が可変されることを特徴とする請求項1記載の画像処理装置。The threshold value setting means sets the threshold value to be a reference threshold value as the degree of matching is closer to the error diffusion method, and that the reference threshold value is changed according to the magnitude of the luminance value of the pixel data. The image processing apparatus according to claim 1, wherein: (a)画像がディザ法に適するか誤差拡散方法に適するかの度合いである適合度画像データの輝度値に基づいて求める処理、(b)ディザ法に適する濃度領域では適合度がディザ法に近いほど閾値をディザマトリクスに類似する形で変動させると共に、誤差拡散法に適する濃度領域では基準閾値となるように設定する処理、(c)前記適合度に基づいて拡散誤差マトリクスの計算を行い、ディザ法に適する濃度領域ではディザ法に近いほどマトリクスの要素を小さくし、且つ誤差拡散法に適する濃度領域では誤差拡散方法に近いほどマトリクスの要素を大きくし、マトリクスの要素が所定値以下の場合はマトリクスの要素を実質0とすることでマトリクスサイズが小さくなるようマトリクスサイズを変更する処理、(d)前記(b)及び(c)の処理により決定された閾値と拡散誤差マトリクスにより画像の誤差拡散処理を行う処理、の上記(a)〜(d)の各処理をコンピュータ上で実行させるためのプログラムを記憶した記憶媒体。(A) a process of obtaining a degree of conformity, which is a degree of whether an image is suitable for a dither method or an error diffusion method , based on a luminance value of image data ; and (b) a degree of conformity to a dither method in a density region suitable for the dither method. The closer the threshold is, the more the threshold is varied in a manner similar to the dither matrix, and the processing is set to be a reference threshold in a density region suitable for the error diffusion method. (C) The diffusion error matrix is calculated based on the fitness. In the density region suitable for the dither method, the matrix element is made smaller as it is closer to the dither method, and in the density region suitable for the error diffusion method, the matrix element is made larger as it is closer to the error diffusion method, and the matrix element is smaller than a predetermined value. processing for changing the matrix size as the matrix size decreases by the elements of the matrix virtually zero, (d) the (b) and ( Processing process for performing error diffusion processing of the image by the determined threshold value and diffusion error matrix by a), the (a) storage medium storing a program for executing each processing on a computer ~ (d). (a)画像データがディザ法に適するか誤差拡散方法に適するかの度合いである適合度画像データの輝度値に基づいて求める工程と、(b)前記適合度に基づき、ディザ法に適する濃度領域では適合度がディザ法に近いほど閾値をディザマトリクスに類似する形で変動させると共に、誤差拡散法に適する濃度領域では基準閾値となるように設定する工程と、(c)前記適合度に基づいて拡散誤差マトリクスの計算を行い、ディザ法に適する濃度領域ではディザ法に近いほどマトリクスの要素を小さくし、且つ誤差拡散法に適する濃度領域では誤差拡散方法に近いほどマトリクスの要素を大きくし、マトリクスの要素が所定値以下の場合はマトリクスの要素を実質0とすることでマトリクスサイズが小さくなるようマトリクスサイズを変更する工程と、(d)前記(b)及び(c)の工程により決定された閾値と拡散誤差マトリクスから、画像の誤差拡散処理を行う工程と、を含むことを特徴とする画像処理方法。(A) a step of determining a degree of conformity, which is a degree of whether the image data is suitable for the dither method or an error diffusion method , based on the luminance value of the image data; and (b) a density suitable for the dither method based on the degree of conformity. together fit the area varied in a manner similar to dither matrix the closer the dither method threshold, and setting so that the suitable concentration region in the reference threshold in the error diffusion method, based on the goodness of fit (c) In the density region suitable for the dither method, the matrix element is reduced as the dither method is closer, and in the density region suitable for the error diffusion method, the matrix element is increased as the error diffusion method is closer. If the elements of the matrix are equal to or smaller than a predetermined value, the matrix elements are changed to substantially zero by changing the elements of the matrix to substantially zero. Process and an image processing method characterized by including, from a determined threshold diffusion error matrix, and performing error diffusion processing of the image by the steps of; (d) (b) and (c).
JP15059598A 1998-05-14 1998-05-14 Image processing apparatus, image processing method, and recording medium recording image processing program Expired - Lifetime JP3565402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15059598A JP3565402B2 (en) 1998-05-14 1998-05-14 Image processing apparatus, image processing method, and recording medium recording image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15059598A JP3565402B2 (en) 1998-05-14 1998-05-14 Image processing apparatus, image processing method, and recording medium recording image processing program

Publications (2)

Publication Number Publication Date
JPH11331588A JPH11331588A (en) 1999-11-30
JP3565402B2 true JP3565402B2 (en) 2004-09-15

Family

ID=15500325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15059598A Expired - Lifetime JP3565402B2 (en) 1998-05-14 1998-05-14 Image processing apparatus, image processing method, and recording medium recording image processing program

Country Status (1)

Country Link
JP (1) JP3565402B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4775909B2 (en) * 2007-03-14 2011-09-21 株式会社リコー Image processing apparatus, image processing method, program, recording medium, and image forming apparatus

Also Published As

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

Similar Documents

Publication Publication Date Title
JP5334402B2 (en) Display apparatus and method for improving flicker of video
US8155474B2 (en) Method, medium, and system compensating shadow areas
JP2005269639A (en) Method and system for converting color image to gray scale image, gray scale image, method for improving conversion from color to gray scale, and edge emphasizing method
JP2006238412A (en) Brightness level converting apparatus, brightness level converting method, solid-state image pickup apparatus, brightness level converting program, and recording medium
US8050515B2 (en) Image processing circuit and method thereof for enhancing text displaying
JPH11220632A (en) Picture processor and picture processing method and medium for recording picture processing control program
EP0781034B1 (en) Image processing apparatus and method
US5715073A (en) Processing by separate stages monochrome digital images to provide halftone color images
JPH10214339A (en) Picture filtering method
US7268919B2 (en) Image data processing apparatus, method, and program that diffuses gradiation error for each pixel in target block
US8279489B2 (en) Image processing apparatus and control method thereof for converting multilevel image data to binary data using an error diffusion method
JP2001189862A (en) Image processing method and image processing device
JP3565402B2 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
JPH06215128A (en) Picture processor
JP3874658B2 (en) Contrast correction circuit
JPH0863596A (en) Method and system for diffusion of error as well as generation method of error value
JP4404457B2 (en) Halftoning method, halftoning apparatus, and computer-readable recording medium on which halftoning program is recorded
JP5297897B2 (en) Image signal processing device
US20040218220A1 (en) Enhanced error diffusion
JPH10269352A (en) Image processor and method
KR20050081532A (en) Image binary-coding method based on local characteristics
JP2001052157A (en) Device and method for processing image
JP2004260835A (en) Image processor, image processing method, and medium recording image processing control program
JP3912063B2 (en) Detection method of image shading unevenness
KR100268336B1 (en) Error diffusion method using variable threshold value

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040428

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040428

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040603

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090618

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100618

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100618

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110618

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110618

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120618

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130618

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140618

Year of fee payment: 10

EXPY Cancellation because of completion of term