JP2006287474A - Image processor and image processing program - Google Patents
Image processor and image processing program Download PDFInfo
- Publication number
- JP2006287474A JP2006287474A JP2005103023A JP2005103023A JP2006287474A JP 2006287474 A JP2006287474 A JP 2006287474A JP 2005103023 A JP2005103023 A JP 2005103023A JP 2005103023 A JP2005103023 A JP 2005103023A JP 2006287474 A JP2006287474 A JP 2006287474A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- value
- error
- target pixel
- calculated
- 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.)
- Pending
Links
- 238000004364 calculation method Methods 0.000 claims abstract description 68
- 238000009792 diffusion process Methods 0.000 claims abstract description 38
- 238000013139 quantization Methods 0.000 claims abstract description 36
- 239000011159 matrix material Substances 0.000 claims abstract description 27
- 230000001186 cumulative effect Effects 0.000 claims description 26
- 238000001514 detection method Methods 0.000 abstract description 13
- 230000003044 adaptive effect Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/403—Edge-driven scaling
Abstract
Description
本発明は、画像データに対して疑似階調のための画像処理を行う画像処理装置及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program for performing image processing for pseudo gradation on image data.
従来、多くの画像形成装置においては、限られた出力階調でより多くの階調を疑似的に表現するために誤差拡散処理や、ディザ処理等の画像処理を画像データに対して行っている。誤差拡散処理及びディザ処理はそれぞれ、処理対象の画像の特性、すなわち文字領域であるか、写真領域であるかによって適不適があるため、画像の領域によって、誤差拡散処理及びディザ処理を切り替えて画像処理を行う方法も提案されている。 2. Description of the Related Art Conventionally, in many image forming apparatuses, image processing such as error diffusion processing or dither processing is performed on image data in order to express more gradations with limited output gradations. . Each of the error diffusion processing and dither processing is inappropriate depending on the characteristics of the image to be processed, that is, whether it is a character region or a photographic region. Therefore, the error diffusion processing and dither processing are switched depending on the image region. A method of performing processing has also been proposed.
例えば、周期的に変動する閾値からなる閾値マトリクスを用いて画素を量子化し、その画素に対して予め検出したエッジ量(この画素がエッジ付近にある度合いを表す量)に応じて誤差の量を制御する画像処理装置(第1従来技術)や、画像データがディザ法及び誤差拡散法のいずれに適するかの度合いである適合度を画像の輝度値を基に求め、適合度に基づき変動又は固定の閾値を決定すると共に、適合度に応じた係数を誤差拡散マトリクスの各係数に乗じて誤差拡散マトリクスサイズを制御する画像処理装置(第2従来技術)がある。 For example, a pixel is quantized using a threshold matrix composed of periodically varying thresholds, and the amount of error is set according to the edge amount detected in advance for the pixel (the amount representing the degree of proximity of the pixel to the edge). The image processing device to be controlled (first prior art) and the degree of suitability, which is the degree to which the image data is suitable for the dither method or the error diffusion method, are obtained based on the luminance value of the image, and are varied or fixed based on the suitability. There is an image processing apparatus (second prior art) that determines the threshold value and controls the error diffusion matrix size by multiplying each coefficient of the error diffusion matrix by a coefficient corresponding to the degree of fitness.
また、下記特許文献1には、誤差拡散法の弱点を補うことを目的として、周期的に振動する閾値からなる閾値マトリクス内の閾値に予め検出したエッジ量に応じた係数を乗じて、閾値変化の振動幅を制御すると共に、複数の閾値マトリクスを相対的に半位相シフトさせることによりディザスクリーンの角度を可変にする画像処理装置が記載されている。
しかしながら、上記第1従来技術の画像処理装置の場合には、誤差拡散に用いる誤差の量を制御(動的に変更)しているため、注目画素のエッジ量ではなく、既に処理された画素のエッジ量に基づいて注目画素に適用される誤差量が決定されるので、誤差の適用にタイムラグが発生してしまう。上記第2従来技術の場合には、誤差拡散マトリクスの全係数に対して適合度を乗じるため、回路規模が大きくなってしまう。また、上記特許文献1に記載の画像処理装置の場合には、誤差に対する制御を行わないため、ディザスクリーンの集中度が低くなってしまう。
However, in the case of the image processing apparatus of the first prior art, since the amount of error used for error diffusion is controlled (dynamically changed), not the edge amount of the pixel of interest but the pixel already processed. Since the error amount applied to the target pixel is determined based on the edge amount, a time lag occurs in applying the error. In the case of the second prior art, the circuit scale becomes large because all the coefficients of the error diffusion matrix are multiplied by the fitness. Further, in the case of the image processing apparatus described in
本発明は、上記問題点に鑑みて成されたもので、誤差の適用にタイムラグを発生させず、ディザスクリーンの集中度を高め、回路を大きくすることなく、誤差拡散処理とディザ処理とを切り替える際に境界部の不連続を発生させず、文字領域の解像度と写真領域の階調性とを両立させ、誤差拡散独特の縞模様の発生を抑制する画像処理装置及び画像処理プログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and does not cause a time lag in applying errors, increases the concentration of dither screens, and switches between error diffusion processing and dither processing without increasing the circuit size. To provide an image processing apparatus and an image processing program that do not cause a discontinuity in the boundary portion, achieve both the resolution of the character area and the gradation of the photographic area, and suppress the occurrence of a stripe pattern peculiar to error diffusion With the goal.
請求項1に係る画像処理装置は、画像処理を行う画像データ内の処理対象画素である注目画素が、エッジ付近の画素である可能性の度合いを表すエッジレベルを算出するエッジレベル算出手段と、前記注目画素の画素値が高濃度又は低濃度に近いか、中間濃度に近いかを表す輝度レベルを算出する輝度レベル算出手段と、前記エッジレベル算出手段により算出された前記注目画素のエッジレベルと、前記輝度レベル算出手段により算出された前記注目画素の輝度レベルとを用いて所定の演算を行うことにより、その注目画素がディザ処理と誤差拡散処理とのいずれに、より適するかの割合を表す適合度を算出する適合度算出手段と、前記適合度算出手段により算出された適合度が、ディザ処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を、予め定められた閾値マトリクスの、当該注目画素に対応する要素の値に設定し、前記適合度が誤差拡散処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を予め定められた値に設定し、前記適合度がディザ処理にも誤差拡散処理にも完全には適合しない値である場合には、当該注目画素に対する閾値を、前記閾値マトリクスの当該注目画素に対応する要素の値と、前記予め定められた値との間で前記適合度の示す割合に基づいて設定する閾値生成手段と、誤差の加えられた前記注目画素に対して、前記閾値生成手段により生成された閾値を用いて量子化を行う量子化手段と、前記量子化手段による量子化後の注目画素の値と、量子化前の注目画素の値との差分を誤差として算出する誤差算出手段と、前記注目画素に対して誤差を加算する予め定められた1つ以上の画素について算出された前記誤差を、前記1つ以上の画素について予め定められた重みを付けて足し合わせて累積誤差を算出する累積誤差算出手段と、前記累積誤差算出手段により算出された累積誤差と、当該注目画素について算出された前記適合度とを乗じた結果を、当該注目画素の値に加算する誤差加算手段とを備え、前記誤差加算手段により算出された値は、前記量子化手段により量子化が行われる、誤差の加えられた注目画素の画素値であるものである。
The image processing apparatus according to
この構成によれば、注目画素に対してエッジレベルと輝度レベルとがそれぞれエッジレベル算出手段及び輝度レベル算出手段により求められ、求められたエッジレベルと輝度レベルとに応じて適合度が適合度算出手段により算出され、この適合度を用いて、ディザ処理に用いる閾値マトリクスの値が注目画素に合わせて閾値生成手段により生成され、この閾値マトリクスを用いて量子化手段によりディザ処理が注目画素に施されて画像処理後の画素データが生成される。一方、注目画素のもとの値とディザ処理後の画像データとの誤差が誤差算出手段により求められ、他の画素が注目画素となったときには、誤差算出手段により求められた、新たに注目画素となった画素以外の所定の画素に関する誤差が累積誤差算出手段により累積され、誤差加算手段によりこの累積誤差が新たな注目画素に加算された後、量子化手段により量子化に用いられる。 According to this configuration, the edge level and the luminance level for the target pixel are obtained by the edge level calculation unit and the luminance level calculation unit, respectively, and the fitness is calculated according to the obtained edge level and luminance level. The threshold matrix value used for dither processing is generated by the threshold generation unit in accordance with the target pixel using the degree of matching, and the dither processing is performed on the target pixel by the quantization unit using the threshold matrix. Thus, pixel data after image processing is generated. On the other hand, when the error between the original value of the target pixel and the image data after the dither processing is obtained by the error calculation unit and another pixel becomes the target pixel, the new target pixel obtained by the error calculation unit is obtained. An error relating to a predetermined pixel other than the pixel that has become is accumulated by the accumulated error calculating means, and this accumulated error is added to a new pixel of interest by the error adding means, and then used for quantization by the quantizing means.
請求項2に係る画像処理装置は、請求項1に記載の画像処理装置であって、前記エッジレベル算出手段は、下記の式(A)を用いてエッジレベルを算出する。 An image processing apparatus according to a second aspect is the image processing apparatus according to the first aspect, wherein the edge level calculating means calculates an edge level using the following equation (A).
(max−min)÷画素値定義範囲の最大値・・・(A)
ただし、maxは、前記注目画素の位置に対して予め定められた複数の画素位置の画素の画素値の最大値、minは、前記注目画素の位置に対して予め定められた複数の画素位置の画素の画素値の最小値である。
(Max−min) ÷ maximum value of pixel value definition range (A)
However, max is the maximum value of the pixel values of a plurality of pixel positions predetermined with respect to the position of the target pixel, and min is a plurality of pixel positions predetermined with respect to the position of the target pixel. This is the minimum pixel value of the pixel.
請求項3に係る画像処理装置は、請求項1又は2に記載の画像処理装置であって、前記輝度レベル算出手段は、下記の式(B)を用いて輝度レベルを算出するものである。 An image processing apparatus according to a third aspect is the image processing apparatus according to the first or second aspect, wherein the luminance level calculation means calculates a luminance level using the following equation (B).
|注目画素の画素値−画素値定義範囲の中央値|÷画素値定義範囲の中央値・・・(B) | Pixel value of target pixel-median value of pixel value definition range | ÷ median value of pixel value definition range (B)
請求項4に係る画像処理装置は、請求項2又は3に記載の画像処理装置であって、前記適合度算出手段は、前記エッジレベル算出手段により算出された前記エッジレベルと、前記輝度レベル算出手段により算出された前記輝度レベルとのいずれか大きい方を前記適合度として算出するものである。
The image processing device according to
請求項5に係る画像処理装置は、請求項2又は3に記載の画像処理装置であって、前記適合度算出手段は、前記エッジレベル算出手段により算出された前記エッジレベルと、前記輝度レベル算出手段により算出された前記輝度レベルとを乗じた値を前記適合度として算出するものである。
The image processing device according to
請求項6に係る画像処理プログラムは、画像処理を行う画像データ内の処理対象画素である注目画素が、エッジ付近の画素である可能性の度合いを表すエッジレベルを算出するエッジレベル算出手段と、前記注目画素の画素値が高濃度又は低濃度に近いか、中間濃度に近いかを表す輝度レベルを算出する輝度レベル算出手段と、前記エッジレベル算出手段により算出された前記注目画素のエッジレベルと、前記輝度レベル算出手段により算出された前記注目画素の輝度レベルとを用いて所定の演算を行うことにより、その注目画素がディザ処理と誤差拡散処理とのいずれに、より適するかの割合を表す適合度を算出する適合度算出手段と、前記適合度算出手段により算出された適合度が、ディザ処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を、予め定められた閾値マトリクスの、当該注目画素に対応する要素の値に設定し、前記適合度が誤差拡散処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を予め定められた値に設定し、前記適合度がディザ処理にも誤差拡散処理にも完全には適合しない値である場合には、当該注目画素に対する閾値を、前記閾値マトリクスの当該注目画素に対応する要素の値と、前記予め定められた値との間で前記適合度の示す割合に基づいて設定する閾値生成手段と、誤差の加えられた前記注目画素に対して、前記閾値生成手段により生成された閾値を用いて量子化を行う量子化手段と、前記量子化手段による量子化後の注目画素の値と、量子化前の注目画素の値との差分を誤差として算出する誤差算出手段と、前記注目画素に対して誤差を加算する予め定められた1つ以上の画素について算出された前記誤差を、前記1つ以上の画素について予め定められた重みを付けて足し合わせて累積誤差を算出する累積誤差算出手段と、前記累積誤差算出手段により算出された累積誤差と、当該注目画素について算出された前記適合度とを乗じた結果を、当該注目画素の値に加算する誤差加算手段とを備え、前記誤差加算手段により算出された値は、前記量子化手段により量子化が行われる、誤差の加えられた注目画素の画素値であるようにコンピュータを機能させるものである。
An image processing program according to
請求項1〜6のいずれかに記載の発明によれば、累積誤差に対して適合度を乗じることにより、注目画素の適合度に応じた誤差の制御を行うため誤差拡散のタイムラグを発生させることなく、累積誤差量を制御することにより、ディザスクリーンの集中度を高め、累積誤差の合計値に適合度を乗じることにより、回路規模を抑制し、かつ、誤差拡散処理とディザ処理を切り替える際に境界部の不連続を発生させず、文字領域の解像度と写真領域の階調性を両立させ、誤差拡散独特の縞模様の発生を抑制できる。
According to the invention described in any one of
以下、本発明に係る実施形態を図面に基づいて説明する。図1は、本発明の一実施形態に係る画像形成装置に備えられる画像処理装置の機能構成を示すブロック図である。画像処理装置1は、限られた出力階調でより多くの階調を疑似的に表現する疑似階調処理を画像データに対して行うもので、例えば記録紙やディスプレイ等に画像を出力する画像出力装置(画像形成装置を含む。)に備えられる。画像処理装置1は、例えばハードウェア回路として実装される。
Embodiments according to the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a functional configuration of an image processing apparatus provided in an image forming apparatus according to an embodiment of the present invention. The
複合機2は、プリンタ機能等を備える複写機で、機能構成として、画像データ取得部21、画像処理装置1、及び印刷部22を備える。画像データ取得部21は、当該複合機2の原稿載置部に載置された原稿から画像を読み取ったり、当該複合機2にネットワーク等により接続されたPC等からの画像データを受信することにより画像データを取得するものである。画像データ取得部21は、所定の順序(例えば走査順序)で1画素ずつのデータを画像処理装置1に入力する。印刷部22は、画像処理装置1で画像処理の終了した画像データを1画素ずつ取得し、例えば記録紙にこの画像を印刷する。
The
画像処理装置1は、エッジレベル検出部11、輝度レベル検出部12、階調処理適合度算出部13、信号遅延部14、及び画像処理部15を備える。画像処理部15は、ディザ閾値生成部151、量子化部152、発生誤差記憶部153、及び累積誤差算出部154を備える。エッジレベル検出部11及び信号遅延部14には、処理対象の画像データの画素の画素値が1画素ずつ所定の順序(例えば走査順)で順次入力される。画像処理装置1は、この入力された画素を注目画素として処理を行う。本実施形態においては、画素値は0〜255の256階調とする。
The
エッジレベル検出部11は、注目画素がエッジ付近の画素である可能性の度合いを表すエッジレベルを算出するものである。エッジレベル検出部11は、0〜1の間の値でエッジレベルを表し、注目画素がエッジ付近にある可能性の高い場合には1に近い値となり、その可能性が低い場合には0に近い値となるようにエッジレベルを算出する。エッジレベル検出部11は、注目画素の画素位置に対する所定の画素位置の画素(例えば注目画素を中心とした3×3画素)に基づいて例えば下記の式(A)により注目画素のエッジレベルを算出する。
The edge
(3×3画素領域のmax値−3×3画素領域のmin値)÷255・・・(A)
ここで、3×3画素領域のmax値は、上記3×3画素の各画素値のうちで最も大きいもの、3×3画素領域のmin値は、上記3×3画素の各画素値のうちで最も小さいもの、255は、画素値の定義における最大の画素値である。
(Max value of 3 × 3 pixel region−3 × min value of 3 pixel region) ÷ 255 (A)
Here, the maximum value of the 3 × 3 pixel region is the largest among the pixel values of the 3 × 3 pixels, and the min value of the 3 × 3 pixel region is the pixel value of the 3 × 3 pixels. And 255 is the maximum pixel value in the definition of the pixel value.
輝度レベル検出部12は、注目画素の濃度が中間濃度付近であるか高濃度及び低濃度付近であるかの度合いを表す輝度レベルを算出するものである。輝度レベル検出部12は、0〜1の間の値で輝度レベルを表し、注目画素の画素値が高濃度及び低濃度である場合には1に近い値となり、中間濃度である場合には0に近い値となるように輝度レベルを算出する。輝度レベル検出部12は、画素値に基づいて例えば下記の式(B)により注目画素の輝度レベルを算出する。
The luminance
|注目画素の画素値−127|÷128・・・(B)
ここで、127は、画素値の定義における中央値である。本実施形態においては、実際の中央値(127.5)に隣接する画素値(127及び128)のいずれを用いてもよい。128は、上記中央値に隣接する画素値の大きい方である。
| Pixel value of the pixel of interest −127 | ÷ 128 (B)
Here, 127 is a median value in the definition of the pixel value. In the present embodiment, any of the pixel values (127 and 128) adjacent to the actual median value (127.5) may be used. 128 is the larger pixel value adjacent to the median.
階調処理適合度算出部13は、エッジレベルと輝度レベルとを基に、注目画素がディザ処理に適するか誤差拡散処理に適するかの度合い(適合度)を算出するものである。階調処理適合度算出部13は、0〜1の間の値で適合度を表し、誤差拡散処理により適する場合には1に近い値、ディザ処理により適する場合には0に近い値となるように適合度を算出する。エッジ部分の画素や高濃度及び低濃度の画素は誤差拡散処理に適し、エッジ以外の部分の画素や中間濃度の画素はディザ処理に適するため、階調処理適合度算出部13は、エッジ部分の画素や高濃度及び低濃度の画素に対しては適合度が1に近い値、エッジ以外の部分の画素や中間濃度の画素に対しては適合度が0に近い値になるように算出する。これには、例えば(イ)エッジレベル及び輝度レベルの大きい方の値を適合度としたり、(ロ)エッジレベルと輝度レベルとを乗じた値を適合度とする。また、エッジレベル又は/及び輝度レベルにLUT(ルックアップテーブル)や演算器を用いて変換を施した値に対して、上記(イ)又は(ロ)を行ったり、上記(イ)又は(ロ)を行った後の値にLUT(ルックアップテーブル)や演算器を用いて変換を施したものを適合度としてもよい。
The gradation
ディザ閾値生成部151は、当該注目画素に適用する閾値を、予め記憶する閾値マトリクスから生成するものである。閾値マトリクスは、ディザ処理において各画素に適用する閾値を画素の位置関係に基づきマトリクスとして保持したもので、それぞれ異なる閾値をマトリクス要素として有するものである。ディザ処理により注目画素は、その画素位置に基づく所定の(閾値マトリクスの)要素(閾値)を用いて二値化される。ディザ閾値生成部151は、予め定められた閾値マトリクス(図2(1)参照)を記憶しておき、この閾値マトリクスの当該注目画素に対応する要素(例えば、図2(1)において太枠で囲んだ要素)の値から画素値(階調)の中央値(127)を減算し(図2(2)参照)、1から適合度を減じた値をこの減算結果に乗じ(図2(3)参照)、更にこの乗算結果に上記中央値(127)を加算して(図2(4)参照)、当該注目画素用の閾値を算出する。図2は、画像処理装置1による1画素分(注目画素)の画像処理の処理の流れの例を、適合度が0.75の場合の注目画素について示した図である。図2のマトリクス(1)から(4)までがディザ閾値生成部151による閾値生成の流れを示している。適合度が1に近い場合には、閾値は上記中央値に近づき、適合度が0に近い場合には、閾値は上記予め定められた閾値マトリクスの対応する要素の値に近づく。
The dither threshold
量子化部152は、当該注目画素を上記閾値を用いて量子化(二値化)するものである。量子化部152は、後述する累積誤差に適合度を乗じた値(図2(5)参照)に注目画素の画素値を加算した誤差の加わった注目画素(図2(6)参照)の画素値を累積誤差加算部155から受信すると共に、当該注目画素用の閾値(図2(4)参照)をディザ閾値生成部151から受信し、当該閾値に基づき上記注目画素の画素値を二値化(例えば0又は255)し(図2(7)参照)、画像処理装置1から出力する。
The
発生誤差記憶部153は、量子化前のデータと量子化後のデータとの差分を誤差として算出し、当該注目画素の誤差として記憶するものである。発生誤差記憶部153は、量子化部152の生成した量子化後の画素値(図2(7)参照)と、誤差の加わった注目画素の画素値(図2(6)参照)との差分を誤差(図2(8)参照)として記憶する。
The generated
累積誤差算出部154は、既に求められた各画素の誤差を用いて、当該注目画素の画素値に加える誤差値を算出するものである。累積誤差算出部154は、当該注目画素に加える誤差の寄与元となる画素の位置及びその寄与率について予め定めた、予め累積誤差算出部154に記憶されている誤差拡散マトリクスに基づき、誤差拡散マトリクスの要素である画素位置の画素について先に求められた誤差値を、上記寄与率に基づいて加え合わせた累積誤差を算出し、当該注目画素の適合度をこの累積誤差に掛け合わせた値を累積誤差加算部155に送信する。
The accumulated
累積誤差加算部155は、累積誤差算出部154から受信した、適合度が掛け合わされた累積誤差に、信号遅延部14から受信した注目画素の画素値を加算して、誤差が加わった注目画素の画素値を生成する。
The cumulative
信号遅延部14は、量子化部152に入力される閾値が、同時期に量子化部152に入力される(誤差の加わった)注目画素に対応するものとなるように、当該画像処理装置1に入力された画素データ(画素値)をエッジレベル検出部11及び輝度レベル検出部12に入力するタイミングから遅延させて累積誤差加算部155に入力するものである。
The
このように本実施形態においては、注目画素に対してエッジレベルと輝度レベルとを求め、求めたエッジレベルと輝度レベルとに応じて適合度を算出し、この適合度を用いて、ディザ処理に用いる閾値マトリクスの値を変動させると共に、誤差拡散処理に用いる累積誤差の値を変動させ、ディザ処理をより強く行うか誤差拡散処理をより強く行うかを制御するようにしたので、誤差の適用にタイムラグを発生させず、ディザスクリーンの集中度を高め、回路を大きくすることなく、誤差拡散処理とディザ処理を切り替える際に境界部の不連続を発生させず、文字領域の解像度と写真領域の階調性を両立させ、誤差拡散独特の縞模様の発生を抑制することができる。 As described above, in the present embodiment, the edge level and the luminance level are obtained for the target pixel, the fitness is calculated according to the obtained edge level and the luminance level, and the dither processing is performed using the fitness. In addition to changing the value of the threshold matrix to be used and changing the value of the accumulated error used for error diffusion processing, the dither processing is more strongly controlled or the error diffusion processing is more strongly controlled. There is no time lag, the concentration of the dither screen is increased, the circuit is not enlarged, the boundary between the error diffusion process and the dither process is not generated when switching between the error diffusion process and the dither process, the resolution of the character area and the level of the photo area It is possible to balance the tonality and to suppress the occurrence of stripe patterns peculiar to error diffusion.
なお、本発明は、上記実施形態のものに限定されるものではなく、以下に述べる態様を採用することができる。上記実施形態においては、256階調の画像データを2階調に変換して疑似的に元の階調を表現するものであったが、本発明は上記階調数に限定されるものではなく、元の階調より少ない階調で元の階調を疑似的に再現するものであればよい。 In addition, this invention is not limited to the thing of the said embodiment, The aspect described below can be employ | adopted. In the above embodiment, the image data of 256 gradations is converted to 2 gradations to express the original gradation in a pseudo manner, but the present invention is not limited to the above number of gradations. Any original that reproduces the original gradation with fewer gradations than the original gradation may be used.
上記実施形態は、画像処理装置1をハードウェア回路として実装した例について説明したが、画像処理装置1をコンピュータプログラムとして実装してもよい。
In the above embodiment, the example in which the
1 画像処理装置
11 エッジレベル検出部(エッジレベル算出手段)
12 輝度レベル検出部(輝度レベル算出手段)
13 階調処理適合度算出部(適合度算出手段)
151 ディザ閾値生成部(閾値生成手段)
152 量子化部(量子化手段)
153 発生誤差記憶部(誤差算出手段)
154 累積誤差算出部(累積誤差算出手段)
155 累積誤差加算部(誤差加算手段)
DESCRIPTION OF
12 Luminance level detection unit (luminance level calculation means)
13 Gradation processing suitability calculation unit (fitness calculation means)
151 Dither threshold value generator (threshold value generator)
152 Quantization unit (quantization means)
153 Generation error storage unit (error calculation means)
154 Cumulative error calculation unit (cumulative error calculation means)
155 Cumulative error adding unit (error adding means)
Claims (6)
前記注目画素の画素値が高濃度又は低濃度に近いか、中間濃度に近いかを表す輝度レベルを算出する輝度レベル算出手段と、
前記エッジレベル算出手段により算出された前記注目画素のエッジレベルと、前記輝度レベル算出手段により算出された前記注目画素の輝度レベルとを用いて所定の演算を行うことにより、その注目画素がディザ処理と誤差拡散処理とのいずれに、より適するかの割合を表す適合度を算出する適合度算出手段と、
前記適合度算出手段により算出された適合度が、ディザ処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を、予め定められた閾値マトリクスの、当該注目画素に対応する要素の値に設定し、前記適合度が誤差拡散処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を予め定められた値に設定し、前記適合度がディザ処理にも誤差拡散処理にも完全には適合しない値である場合には、当該注目画素に対する閾値を、前記閾値マトリクスの当該注目画素に対応する要素の値と、前記予め定められた値との間で前記適合度の示す割合に基づいて設定する閾値生成手段と、
誤差の加えられた前記注目画素に対して、前記閾値生成手段により生成された閾値を用いて量子化を行う量子化手段と、
前記量子化手段による量子化後の注目画素の値と、量子化前の注目画素の値との差分を誤差として算出する誤差算出手段と、
前記注目画素に対して誤差を加算する予め定められた1つ以上の画素について算出された前記誤差を、前記1つ以上の画素について予め定められた重みを付けて足し合わせて累積誤差を算出する累積誤差算出手段と、
前記累積誤差算出手段により算出された累積誤差と、当該注目画素について算出された前記適合度とを乗じた結果を、当該注目画素の値に加算する誤差加算手段と
を備え、
前記誤差加算手段により算出された値は、前記量子化手段により量子化が行われる、誤差の加えられた注目画素の画素値である画像処理装置。 Edge level calculation means for calculating an edge level representing the degree of possibility that the target pixel in the image data for image processing is a pixel near the edge;
A luminance level calculation means for calculating a luminance level indicating whether the pixel value of the pixel of interest is high density or low density, or intermediate density;
The target pixel is dithered by performing a predetermined calculation using the edge level of the target pixel calculated by the edge level calculation unit and the luminance level of the target pixel calculated by the luminance level calculation unit. And a fitness level calculation means for calculating a fitness level that represents a ratio that is more suitable for the error diffusion process,
When the fitness calculated by the fitness calculation means is a value indicating that it is completely compatible with dither processing, the threshold for the pixel of interest corresponds to the pixel of interest in a predetermined threshold matrix. If the value of the matching is a value indicating that the degree of matching is completely compatible with the error diffusion process, a threshold value for the target pixel is set to a predetermined value, and the degree of matching is dithered. When the value is not completely compatible with the processing and the error diffusion processing, the threshold value for the target pixel is set to the value of the element corresponding to the target pixel of the threshold value matrix and the predetermined value. Threshold generation means for setting based on the ratio indicated by the fitness between
Quantization means for performing quantization on the target pixel to which an error has been added, using a threshold value generated by the threshold value generation means;
An error calculating means for calculating a difference between the value of the target pixel after quantization by the quantization means and the value of the target pixel before quantization as an error;
A cumulative error is calculated by adding the error calculated for one or more predetermined pixels for adding an error to the pixel of interest and adding a predetermined weight for the one or more pixels. A cumulative error calculating means;
Error addition means for adding the result of multiplying the cumulative error calculated by the cumulative error calculation means and the fitness calculated for the pixel of interest to the value of the pixel of interest;
The value calculated by the error adding unit is an image processing apparatus that is a pixel value of a target pixel to which an error is added, which is quantized by the quantization unit.
(max−min)÷画素値定義範囲の最大値・・・(A)
ただし、maxは、前記注目画素の位置に対して予め定められた複数の画素位置の画素の画素値の最大値、minは、前記注目画素の位置に対して予め定められた複数の画素位置の画素の画素値の最小値である。 The image processing apparatus according to claim 1, wherein the edge level calculation unit calculates an edge level using the following equation (A).
(Max−min) ÷ maximum value of pixel value definition range (A)
However, max is the maximum value of the pixel values of a plurality of pixel positions predetermined with respect to the position of the target pixel, and min is a plurality of pixel positions predetermined with respect to the position of the target pixel. This is the minimum pixel value of the pixel.
|注目画素の画素値−画素値定義範囲の中央値|÷画素値定義範囲の中央値・・・(B) The image processing apparatus according to claim 1, wherein the luminance level calculation unit calculates a luminance level using the following equation (B).
| Pixel value of target pixel-median value of pixel value definition range | ÷ median value of pixel value definition range (B)
前記注目画素の画素値が高濃度又は低濃度に近いか、中間濃度に近いかを表す輝度レベルを算出する輝度レベル算出手段と、
前記エッジレベル算出手段により算出された前記注目画素のエッジレベルと、前記輝度レベル算出手段により算出された前記注目画素の輝度レベルとを用いて所定の演算を行うことにより、その注目画素がディザ処理と誤差拡散処理とのいずれに、より適するかの割合を表す適合度を算出する適合度算出手段と、
前記適合度算出手段により算出された適合度が、ディザ処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を、予め定められた閾値マトリクスの、当該注目画素に対応する要素の値に設定し、前記適合度が誤差拡散処理に完全に適合することを示す値である場合には、当該注目画素に対する閾値を予め定められた値に設定し、前記適合度がディザ処理にも誤差拡散処理にも完全には適合しない値である場合には、当該注目画素に対する閾値を、前記閾値マトリクスの当該注目画素に対応する要素の値と、前記予め定められた値との間で前記適合度の示す割合に基づいて設定する閾値生成手段と、
誤差の加えられた前記注目画素に対して、前記閾値生成手段により生成された閾値を用いて量子化を行う量子化手段と、
前記量子化手段による量子化後の注目画素の値と、量子化前の注目画素の値との差分を誤差として算出する誤差算出手段と、
前記注目画素に対して誤差を加算する予め定められた1つ以上の画素について算出された前記誤差を、前記1つ以上の画素について予め定められた重みを付けて足し合わせて累積誤差を算出する累積誤差算出手段と、
前記累積誤差算出手段により算出された累積誤差と、当該注目画素について算出された前記適合度とを乗じた結果を、当該注目画素の値に加算する誤差加算手段と
を備え、
前記誤差加算手段により算出された値は、前記量子化手段により量子化が行われる、誤差の加えられた注目画素の画素値であるようにコンピュータを機能させる画像処理プログラム。 Edge level calculation means for calculating an edge level representing the degree of possibility that the target pixel in the image data for image processing is a pixel near the edge;
A luminance level calculation means for calculating a luminance level indicating whether the pixel value of the pixel of interest is high density or low density, or intermediate density;
The target pixel is dithered by performing a predetermined calculation using the edge level of the target pixel calculated by the edge level calculation unit and the luminance level of the target pixel calculated by the luminance level calculation unit. And a fitness level calculation means for calculating a fitness level that represents a ratio that is more suitable for the error diffusion process,
When the fitness calculated by the fitness calculation means is a value indicating that it is completely compatible with dither processing, the threshold for the pixel of interest corresponds to the pixel of interest in a predetermined threshold matrix. If the value of the matching is a value indicating that the degree of matching is completely compatible with the error diffusion process, a threshold value for the target pixel is set to a predetermined value, and the degree of matching is dithered. When the value is not completely compatible with the processing and the error diffusion processing, the threshold value for the target pixel is set to the value of the element corresponding to the target pixel of the threshold value matrix and the predetermined value. Threshold generation means for setting based on the ratio indicated by the fitness between
Quantization means for performing quantization on the target pixel to which an error has been added, using a threshold value generated by the threshold value generation means;
An error calculating means for calculating a difference between the value of the target pixel after quantization by the quantization means and the value of the target pixel before quantization as an error;
A cumulative error is calculated by adding the error calculated for one or more predetermined pixels for adding an error to the pixel of interest and adding a predetermined weight for the one or more pixels. A cumulative error calculating means;
Error addition means for adding the result of multiplying the cumulative error calculated by the cumulative error calculation means and the fitness calculated for the pixel of interest to the value of the pixel of interest;
An image processing program for causing a computer to function so that a value calculated by the error adding unit is a pixel value of a target pixel to which an error is added, which is quantized by the quantization unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005103023A JP2006287474A (en) | 2005-03-31 | 2005-03-31 | Image processor and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005103023A JP2006287474A (en) | 2005-03-31 | 2005-03-31 | Image processor and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006287474A true JP2006287474A (en) | 2006-10-19 |
Family
ID=37408919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005103023A Pending JP2006287474A (en) | 2005-03-31 | 2005-03-31 | Image processor and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006287474A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8259357B2 (en) | 2007-03-09 | 2012-09-04 | Sharp Kabushiki Kaisha | Image processing apparatus, image forming apparatus, image processing method, and computer readable recording medium |
JP2012204968A (en) * | 2011-03-24 | 2012-10-22 | Seiko Epson Corp | Image processing device, printing device, image processing method, and image processing program |
JP2012204967A (en) * | 2011-03-24 | 2012-10-22 | Seiko Epson Corp | Image processing device, printing device, image processing method, and image processing program |
JP5230816B2 (en) * | 2009-09-28 | 2013-07-10 | 株式会社ミマキエンジニアリング | Program, image processing apparatus, and image processing method |
JP2014220664A (en) * | 2013-05-08 | 2014-11-20 | キヤノン株式会社 | Image processing apparatus and image processing method |
-
2005
- 2005-03-31 JP JP2005103023A patent/JP2006287474A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8259357B2 (en) | 2007-03-09 | 2012-09-04 | Sharp Kabushiki Kaisha | Image processing apparatus, image forming apparatus, image processing method, and computer readable recording medium |
JP5230816B2 (en) * | 2009-09-28 | 2013-07-10 | 株式会社ミマキエンジニアリング | Program, image processing apparatus, and image processing method |
JP2012204968A (en) * | 2011-03-24 | 2012-10-22 | Seiko Epson Corp | Image processing device, printing device, image processing method, and image processing program |
JP2012204967A (en) * | 2011-03-24 | 2012-10-22 | Seiko Epson Corp | Image processing device, printing device, image processing method, and image processing program |
JP2014220664A (en) * | 2013-05-08 | 2014-11-20 | キヤノン株式会社 | Image processing apparatus and image processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4902837B2 (en) | How to convert to monochrome image | |
EP2339823B1 (en) | Image processing apparatus and image processing method | |
JP2008206182A (en) | Rendering image utilizing adaptive error diffusion | |
US8917419B2 (en) | Image processing apparatus and control method thereof | |
JP2005210731A (en) | Method for creating halftones from plural pixels, and method and system for processing halftones | |
JP5534787B2 (en) | Image processing apparatus and image processing method | |
JP2006065834A (en) | Image processing device and image processing method | |
JP2006287474A (en) | Image processor and image processing program | |
JP6613115B2 (en) | Image processing apparatus, image processing method, and program | |
JPH1084478A (en) | Input image conversion method and pixel value quantization method | |
JP5573451B2 (en) | Image processing apparatus and image processing method | |
JP4618333B2 (en) | Image forming apparatus, gradation correction method, and gradation correction program | |
KR100484141B1 (en) | Image binary-coded apparatus and method thereof | |
JP2018036343A (en) | Image processing apparatus, image forming apparatus, image forming system and image processing method | |
JP4134909B2 (en) | Dither pattern generation device, dither pattern generation method, and dither pattern generation program | |
KR20050081532A (en) | Image binary-coding method based on local characteristics | |
JP2006231867A (en) | Image processor and image processing method | |
JP7250508B2 (en) | Image processing device, image processing method, and program | |
JP2005039483A (en) | Apparatus and method for image processing, and program for making computer execute the method | |
JP2006311241A (en) | Image processor | |
JP6342762B2 (en) | Missing pixel interpolator | |
JP2006270656A (en) | Apparatus and method for image processing | |
JP2004336161A (en) | Method and program for image processing | |
JP2020102767A (en) | Image processing device, image processing method, and program | |
JP2003116001A (en) | Image processor, image processing method, image forming equipment and image forming method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080118 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080129 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080603 |