JP2018056832A - Image processing device, image processing method, and computer program - Google Patents

Image processing device, image processing method, and computer program Download PDF

Info

Publication number
JP2018056832A
JP2018056832A JP2016191464A JP2016191464A JP2018056832A JP 2018056832 A JP2018056832 A JP 2018056832A JP 2016191464 A JP2016191464 A JP 2016191464A JP 2016191464 A JP2016191464 A JP 2016191464A JP 2018056832 A JP2018056832 A JP 2018056832A
Authority
JP
Japan
Prior art keywords
value
gradation value
error
target pixel
input
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.)
Granted
Application number
JP2016191464A
Other languages
Japanese (ja)
Other versions
JP6759938B2 (en
JP2018056832A5 (en
Inventor
角谷 繁明
Shigeaki Sumiya
繁明 角谷
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2016191464A priority Critical patent/JP6759938B2/en
Publication of JP2018056832A publication Critical patent/JP2018056832A/en
Publication of JP2018056832A5 publication Critical patent/JP2018056832A5/ja
Application granted granted Critical
Publication of JP6759938B2 publication Critical patent/JP6759938B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Ink Jet (AREA)
  • Particle Formation And Scattering Control In Inkjet Printers (AREA)
  • Color, Gradation (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce an influence on image quality deterioration while obtaining an effect of edge enhancement of thin lines and characters having low density.SOLUTION: An image processing device generating dot data of an output gradation value from image data of an input gradation value of an ink color, comprises a halftone processing section executing halftone processing by an error diffusion method by using a correction gradation value and a threshold value of a target pixel of the image data. The correction gradation value can be obtained by adding an error diffused from a pixel having been subjected to the halftone processing to an input gradation value of the target pixel. When diffusing an error between the correction gradation value and the output gradation value to a peripheral pixel, the halftone processing section doses not diffuse a part of the error and discards it when the input gradation value of the target pixel is at least zero. The threshold value when the input gradation value of the target pixel is included in a predetermined low gradation value range is smaller than a central value of a gradation value range which the input gradation value of the target pixel can take, and is a value equal to the input gradation value of the target pixel or more.SELECTED DRAWING: Figure 1

Description

本発明は、ハーフトーン処理技術に関する。   The present invention relates to a halftone processing technique.

従来、多階調のインク色の画像データを各インク色のドットのオン/オフデータに変換する、いわゆるハーフトーン技術として、誤差拡散法が知られている。誤差拡散法では、各画素の入力階調値に各画素の周辺画素から拡散された誤差を加えて得られた補正階調値を閾値と比較して、補正階調値が閾値よりも大きい場合にドットをオンとし、補正階調値が閾値よりも小さい場合にドットをオフとする、二値化処理を行う。そして、二値化処理時に生じた誤差(各画素の補正階調値とドットのオンまたはオフを示す出力階調値との誤差)を、周辺画素のうち、まだ二値化していない画素に拡散することを、注目画素を順次変更しながら行う。誤差拡散法によれば、高解像度を維持しつつ、連続的な階調制御が可能である。特許文献1には、ある画素の入力階調値が所定値より小さい場合には、二値化に用いる閾値として、階調中央値よりも小さい値を閾値として設定し、入力階調値が大きいときには、閾値として階調中央値よりも大きい値を閾値として設定することにより、二値化によって生じる誤差の蓄積を解消し、いわゆる遅延や尾引きといった不具合を抑制する技術が開示されている。   Conventionally, an error diffusion method is known as a so-called halftone technique for converting multi-tone ink color image data into on / off data of each ink color dot. In the error diffusion method, the corrected gradation value obtained by adding the error diffused from the surrounding pixels of each pixel to the input gradation value of each pixel is compared with the threshold value, and the corrected gradation value is larger than the threshold value. In the binarization process, the dots are turned on and the dots are turned off when the correction gradation value is smaller than the threshold value. Then, an error (an error between the correction gradation value of each pixel and an output gradation value indicating ON / OFF of a dot) generated in the binarization process is diffused to pixels that have not been binarized among the peripheral pixels. This is performed while sequentially changing the target pixel. According to the error diffusion method, continuous tone control is possible while maintaining high resolution. In Patent Document 1, when an input gradation value of a certain pixel is smaller than a predetermined value, a threshold value used for binarization is set as a threshold value that is smaller than the gradation center value, and the input gradation value is large. In some cases, a technique is disclosed in which accumulation of errors caused by binarization is eliminated and a problem such as so-called delay and tailing is suppressed by setting a threshold value larger than the median gradation value as the threshold value.

特許第3360391号公報Japanese Patent No. 3360391

例えばCADデータのような白色の背景に低濃度の細線を含む画像に対して、特許文献1の図7に記載の、補正階調値と出力階調値との誤差の平均値がほぼゼロとなるように閾値を最適化した誤差拡散法を適用すると、細線部分では、入力階調値が小さいために、二値化に用いる閾値は、階調中央値よりも小さくなる。このため、細線の濃度が低い場合でも細線が途切れたり、消失することが抑制される。細線の濃度がさらに低い場合は、それでも細線が途切れたり、消失する場合があるが、それらを改善するために特許文献1の図7に記載の最適閾値よりも小さな閾値とした過補正状態とする手法も提示されており、文字・線主体のCAD用途などにおいて非常に有効である。しかしながら、文字・線と写真が混在する画像に極端な過補正状態を適用すると、文字・線以外の部分に対するエッジ強調が過多となる。また、文字部分に十分なエッジ強調効果を持たせようとして、閾値を小さくし過ぎると、特許文献1に示す尾引き等の画質劣化が生じてしまう。そこで、白色の背景の画像において、低濃度の細線のエッジ強調の効果を得つつ、画質劣化への影響を低減する技術が望まれている。   For example, for an image including a low density thin line on a white background such as CAD data, the average value of errors between the correction gradation value and the output gradation value described in FIG. When the error diffusion method with the threshold optimized is applied, the input gradation value is small in the thin line portion, and therefore the threshold used for binarization becomes smaller than the gradation central value. For this reason, even when the concentration of the fine line is low, the fine line is prevented from being interrupted or disappearing. If the density of the fine lines is even lower, the fine lines may still be interrupted or disappear, but in order to improve them, an overcorrected state is set to a threshold value smaller than the optimum threshold value described in FIG. A technique is also presented, which is very effective in character / line-based CAD applications. However, when an extreme overcorrection state is applied to an image in which characters / lines and photographs are mixed, edge enhancement is excessive for portions other than characters / lines. Further, if the threshold value is made too small in order to give the character portion a sufficient edge enhancement effect, image quality degradation such as tailing described in Patent Document 1 will occur. Therefore, there is a demand for a technique for reducing the influence on image quality degradation while obtaining the edge enhancement effect of a low-density thin line in a white background image.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態として実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms.

(1)本発明の一実施形態によれば、画像処理装置が提供される。この画像処理装置は、インク色の入力階調値から成る画像データから、印刷装置におけるドット形成の有無に対応する出力階調値から成るドットデータを生成する画像処理装置であって、前記画像データを構成する複数画素を順番に注目画素として特定して、前記注目画素の前記入力階調値を補正した補正階調値と閾値とを用いて誤差拡散法によりドット形成の有無を決定するハーフトーン処理を実行するハーフトーン処理部を備え;前記補正階調値は、前記ハーフトーン処理を実行済みの画素から前記注目画素に拡散された誤差を前記注目画素の前記入力階調値に加えて得られ;前記ハーフトーン処理部は、前記補正階調値と、前記出力階調値と、の誤差を、前記注目画素の周辺の前記ハーフトーン処理を未実行の複数の周辺画素に拡散する際に、前記注目画素の前記入力階調値が少なくともゼロの場合には、前記誤差の一部を拡散せずに棄却し;前記閾値は、前記注目画素の前記入力階調値に応じて定められており;前記注目画素の前記入力階調値が予め定められた低階調値範囲に含まれている場合の前記閾値は、前記注目画素の前記入力階調値が取り得る階調値範囲の中央値よりも小さく、かつ、前記注目画素の前記入力階調値以上の値である。   (1) According to an embodiment of the present invention, an image processing apparatus is provided. This image processing apparatus is an image processing apparatus for generating dot data composed of output gradation values corresponding to the presence or absence of dot formation in a printing apparatus from image data composed of input gradation values of ink colors. A halftone that sequentially identifies a plurality of pixels constituting the pixel as a target pixel, and determines dot formation by an error diffusion method using a corrected gradation value obtained by correcting the input gradation value of the target pixel and a threshold value A correction tone value obtained by adding an error diffused from the pixel on which the halftone process has been performed to the target pixel to the input tone value of the target pixel. The halftone processing unit diffuses an error between the corrected gradation value and the output gradation value to a plurality of peripheral pixels that have not performed the halftone processing around the target pixel. When the input tone value of the target pixel is at least zero, a part of the error is rejected without being diffused; the threshold is determined according to the input tone value of the target pixel. The threshold value when the input gradation value of the pixel of interest is included in a predetermined low gradation value range is the gradation value range that the input gradation value of the pixel of interest can take And a value equal to or greater than the input gradation value of the target pixel.

この形態の画像処理装置によれば、ハーフトーン処理において、注目画素の補正階調値と、ドット形成の有無に対応する出力階調値と、の誤差を周辺画素に拡散する際に、注目画素の入力階調値が少なくともゼロの場合には、誤差の一部を周辺画素に拡散せずに棄却するので、誤差の一部は周辺画素に拡散されず、誤差拡散のたびに誤差の一部が消失していくことにより、誤差をそのまま周辺画素に拡散する構成と比べて、小さな画素間隔で蓄積誤差を消失させ、蓄積誤差が周辺画素の画像に影響を与えることを抑制できる。したがって、或る画素の補正階調値が閾値を超えて「ドット形成有り」と決定された場合に生じるマイナス誤差を、小さな画素間隔で消失させることができる。一方で誤差の消失効果は、プラス誤差の場合にも発生する。したがって、マイナス誤差の消失速度が早まるのとは逆に、プラス誤差の蓄積により、「ドット形成有り」と決定されるまでの画素間隔は、大きくなる。すなわち、「ドット形成有り」の画素が発生する間隔は、前者の効果が大きくなれば短くなり、後者の効果が大きければ長くなる。   According to the image processing apparatus of this aspect, in the halftone process, when the error between the corrected gradation value of the target pixel and the output gradation value corresponding to the presence / absence of dot formation is diffused to the peripheral pixels, the target pixel When the input tone value of is at least zero, a part of the error is rejected without being diffused to the surrounding pixels. Since the error disappears, the accumulation error disappears at a small pixel interval compared to the configuration in which the error is diffused as it is to the surrounding pixels, and the influence of the accumulation error on the image of the surrounding pixels can be suppressed. Therefore, a negative error that occurs when the correction gradation value of a certain pixel exceeds the threshold and is determined to be “with dot formation” can be eliminated at a small pixel interval. On the other hand, the error disappearance effect also occurs in the case of a plus error. Therefore, on the contrary to the speed of disappearance of the minus error, the pixel interval until it is determined that “dot formation is present” increases due to the accumulation of the plus error. In other words, the interval at which the “dot formed” pixel occurs becomes shorter when the former effect becomes larger, and becomes longer when the latter effect becomes larger.

しかし、この形態の画像処理装置によれば、注目画素の入力階調値が低階調値範囲に含まれている場合の閾値を、入力階調値が取り得る階調値範囲の中央値よりも小さくしているので、閾値が入力階調値の取り得る階調値範囲の中央値である場合に比べて、小さな補正階調値で「ドット形成有り」と決定され、絶対値のより大きなマイナス誤差が発生する。このため、マイナス誤差がゼロからプラスに転じて閾値に達するまでにおいて、誤差がマイナスとなる区間は、閾値が入力階調値の取り得る階調値範囲の中央値である場合に比べて長くなり、誤差がプラスとなる区間は、閾値が入力階調値の取り得る階調値範囲の中央値である場合に比べて短くなる。このため、マイナス誤差の消失速度が早まる効果が発生する区間が長くなり、プラス誤差の蓄積速度が遅くなる効果が発生する区間が短くなる。これにより、トータルではマイナス誤差の消失速度が早まる効果が勝る結果となり、「ドット形成有り」と判断される画素間隔が短くなるため、「ドット形成有り」と決定し易くできる。この効果は、閾値を小さくするほど大きくなる。単に閾値を小さくするだけでもドット発生を早めてエッジを強調する効果を得られるが、この形態の画像処理装置では、背景が白地の場合にその効果をさらに大きくできることになる。例えば、特許文献1の図6に記載の式(DATA×7+128)/8で得られる閾値を用いると、エッジ強調効果をさらに高められる。上記特許文献1の図7に記載の最適閾値からは多少ずれが生じるが、尾引きなどの画質劣化は問題とならないレベルに抑えられる。したがって、CADデータのような白色の背景に低濃度の細線を含む画像において、細線が途切れたり消失したりすることを抑制できる。   However, according to the image processing apparatus of this embodiment, the threshold value when the input tone value of the target pixel is included in the low tone value range is set to be greater than the median value of the tone value range that the input tone value can take. Therefore, compared to the case where the threshold value is the median value of the gradation value range that the input gradation value can take, it is determined that “dot formation is present” with a small correction gradation value, and the absolute value is larger. Negative error occurs. For this reason, before the negative error changes from zero to positive and reaches the threshold value, the interval where the error is negative becomes longer than when the threshold value is the median value of the gradation value range that the input gradation value can take. The interval in which the error is positive is shorter than when the threshold value is the median value of the gradation value range that the input gradation value can take. For this reason, the interval in which the effect of increasing the disappearance rate of the minus error occurs becomes longer, and the interval in which the effect of reducing the accumulation rate of the plus error becomes shorter. As a result, the effect of accelerating the disappearance speed of the minus error is superior in total, and the pixel interval determined to be “with dot formation” is shortened, so that it is easy to determine “with dot formation”. This effect increases as the threshold value decreases. Even if the threshold value is simply reduced, the effect of enhancing the edge by increasing the dot generation can be obtained. However, with this type of image processing apparatus, the effect can be further increased when the background is white. For example, the edge enhancement effect can be further enhanced by using a threshold value obtained by the equation (DATA × 7 + 128) / 8 described in FIG. Although there is a slight deviation from the optimum threshold value described in FIG. 7 of Patent Document 1, image quality degradation such as tailing is suppressed to a level that does not cause a problem. Therefore, in an image including a low density fine line on a white background such as CAD data, it is possible to suppress the fine line from being interrupted or disappearing.

以上のことから、この形態の画像処理装置によれば、CAD等で多用される白色の背景の画像において、低濃度の細線や文字のエッジ強調の効果を得つつ、白色の背景以外の部分に対する過度なエッジ強調に起因する画質劣化への影響を低減することができる。   As described above, according to the image processing apparatus of this embodiment, in the white background image frequently used in CAD or the like, the effect of emphasizing the low-density thin line and the character edge is obtained, and the portion other than the white background is obtained. It is possible to reduce the influence on image quality degradation caused by excessive edge enhancement.

(2)上記形態の画像処理装置において、前記補正階調値と前記出力階調値との誤差のうち、棄却されずに前記複数の周辺画素に拡散される誤差の値を、拡散誤差量とし;前記補正階調値と前記出力階調値との誤差と、前記拡散誤差量と、の差を、棄却誤差量とし;前記棄却誤差量/(前記補正階調値と前記出力階調値との誤差)を、棄却率としたときに;前記注目画素の前記入力階調値がゼロの場合の前記棄却率は、前記注目画素の前記入力階調値が予め定められた中間階調値範囲における前記棄却率の最小値よりも大きくてもよい。
この形態の画像処理装置によれば、注目画素の入力階調値がゼロの場合の棄却率は、注目画素の入力階調値が中間階調値範囲における棄却率の最小値よりも大きいので、入力階調値がゼロの場合には、入力階調値が中間階調値範囲にある場合に比べて、周辺画素に拡散する誤差の絶対値が小さくなる。このため、誤差拡散のたびに消失していく誤差の量(絶対値)が、入力階調値が中間階調値にある場合と比べて大きくなるので、小さな画素間隔で蓄積誤差を消失させることができる。
(2) In the image processing apparatus of the above aspect, a value of an error that is diffused to the plurality of peripheral pixels without being rejected among errors between the corrected gradation value and the output gradation value is defined as a diffusion error amount. A difference between the error between the correction gradation value and the output gradation value and the diffusion error amount is set as a rejection error amount; the rejection error amount / (the correction gradation value and the output gradation value Is the rejection rate; the rejection rate when the input tone value of the pixel of interest is zero is an intermediate tone value range in which the input tone value of the pixel of interest is predetermined. It may be larger than the minimum value of the rejection rate.
According to the image processing apparatus of this aspect, since the rejection rate when the input tone value of the target pixel is zero, the input tone value of the target pixel is larger than the minimum value of the rejection rate in the intermediate tone value range, When the input gradation value is zero, the absolute value of the error diffusing to the surrounding pixels is smaller than when the input gradation value is in the intermediate gradation value range. For this reason, the amount of error (absolute value) that disappears each time error diffusion becomes larger than when the input gradation value is at the intermediate gradation value, so that the accumulation error is eliminated at a small pixel interval. Can do.

(3)上記形態の画像処理装置において、前記注目画素の前記入力階調値が前記低階調値範囲に含まれている場合の前記閾値は、前記補正階調値と前記出力階調値との誤差の平均値がゼロとなるように設定された閾値の値以下の値であってもよい。
この形態の画像処理装置によれば、注目画素の入力階調値が低階調値範囲に含まれている場合の閾値は、補正階調値と出力階調値との誤差の平均値がゼロとなるように設定された閾値以下の値であるので、例えば、上記特許文献1の図7に記載の閾値のような注目画素の入力階調値に応じて最適化した閾値を用いることができ、白色の背景の画像における低濃度の細線や文字のような低階調値範囲に含まれる場合であっても、尾引きなどの画質劣化の発生を抑制できる。
(3) In the image processing apparatus of the above aspect, the threshold value when the input gradation value of the target pixel is included in the low gradation value range is the correction gradation value and the output gradation value. It may be a value equal to or less than a threshold value set so that the average value of the errors is zero.
According to the image processing apparatus of this aspect, the average value of the error between the corrected gradation value and the output gradation value is zero when the input gradation value of the target pixel is included in the low gradation value range. Therefore, for example, a threshold optimized according to the input tone value of the target pixel such as the threshold described in FIG. 7 of Patent Document 1 can be used. Even when the image is included in a low gradation value range such as a low-density thin line or a character in a white background image, the occurrence of image quality degradation such as tailing can be suppressed.

(4)上記形態の画像処理装置において、前記ハーフトーン処理部は、前記誤差を前記複数の周辺画素に拡散する際に、前記誤差に重み値を掛け合わせて得られる値を拡散し;前記ハーフトーン処理部は、前記複数の周辺画素に対してそれぞれ前記重み値が対応づけられている誤差拡散マトリックスを参照して、前記誤差に対して前記重み値を乗じることにより、前記複数の周辺画素にそれぞれ拡散すべき誤差を算出する誤差算出部を有し;前記注目画素の前記入力階調値がゼロの場合に予め設定されている前記誤差拡散マトリックスにおいて、前記重み値の合計値は、1よりも小さい値であってもよい。
この形態の画像処理装置によれば、注目画素の入力階調値がゼロの場合の重み値の合計値が1よりも小さな値であるので、注目画素の入力階調値がゼロの場合に誤差の一部を複数の周辺画素に拡散せずに棄却させることを容易に実現できる。したがって、ハーフトーン処理を短時間で実行できる、或いは、かかる処理に要する負荷を軽減できる。また、入力階調値がゼロの場合の重み値の合計値を1より小さな値とすることにより、エッジ強調の効果を高めることができる。このため、重み値の合計値を1よりもわずかに小さくする場合、例えば、重み値の合計値を0.99とする場合であっても、その差がわかるレベルでのエッジ強調の効果を容易に得ることができる。
(4) In the image processing apparatus of the above aspect, the halftone processing unit diffuses a value obtained by multiplying the error by a weight value when diffusing the error to the plurality of peripheral pixels; The tone processing unit refers to an error diffusion matrix in which the weight values are associated with the plurality of peripheral pixels, respectively, and multiplies the error by the weight value to thereby calculate the plurality of peripheral pixels. An error calculation unit that calculates an error to be diffused; in the error diffusion matrix set in advance when the input tone value of the target pixel is zero, the total value of the weight values is 1 May be a small value.
According to the image processing apparatus of this aspect, since the total value of the weight values when the input tone value of the target pixel is zero is a value smaller than 1, an error occurs when the input tone value of the target pixel is zero. It is possible to easily realize that a part of the image is rejected without being diffused to a plurality of peripheral pixels. Therefore, halftone processing can be executed in a short time, or the load required for such processing can be reduced. Further, by making the total value of the weight values when the input gradation value is zero smaller than 1, the edge enhancement effect can be enhanced. For this reason, when the total value of the weight values is made slightly smaller than 1, for example, even when the total value of the weight values is set to 0.99, the effect of edge enhancement at a level where the difference can be easily understood. Can get to.

本発明は、種々の形態で実現することも可能である。例えば、画像処理装置を適用した印刷装置、かかる印刷装置を制御する印刷制御装置、これらの装置や方法を実現するためのコンピュータープログラム、かかるコンピュータープログラムを記録した記録媒体等の形態で実現できる。また、印刷装置に限られず、任意の液体噴射装置として実現できる。   The present invention can be realized in various forms. For example, the present invention can be realized in the form of a printing apparatus to which the image processing apparatus is applied, a printing control apparatus that controls the printing apparatus, a computer program for realizing these apparatuses and methods, a recording medium on which such a computer program is recorded, and the like. Further, the present invention is not limited to a printing apparatus, and can be realized as an arbitrary liquid ejecting apparatus.

上述した本発明の各形態の有する複数の構成要素はすべてが必須のものではなく、上述の課題の一部又は全部を解決するため、あるいは、本明細書に記載された効果の一部又は全部を達成するために、適宜、前記複数の構成要素の一部の構成要素について、その変更、削除、新たな他の構成要素との差し替え、限定内容の一部削除を行うことが可能である。また、上述の課題の一部又は全部を解決するため、あるいは、本明細書に記載された効果の一部又は全部を達成するために、上述した本発明の一形態に含まれる技術的特徴の一部又は全部を上述した本発明の他の形態に含まれる技術的特徴の一部又は全部と組み合わせて、本発明の独立した一形態とすることも可能である。   A plurality of constituent elements of each aspect of the present invention described above are not indispensable, and some or all of the effects described in the present specification are to be solved to solve part or all of the above-described problems. In order to achieve the above, it is possible to appropriately change, delete, replace with another new component, and partially delete the limited contents of some of the plurality of components. In order to solve part or all of the above-described problems or to achieve part or all of the effects described in this specification, technical features included in one embodiment of the present invention described above. A part or all of the technical features included in the other aspects of the present invention described above may be combined to form an independent form of the present invention.

本発明の一実施形態としての画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus as an embodiment of the present invention. 印刷処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a printing process. 4つのインク色C、M、Y、Kのうちの1つの色成分のハーフトーン処理(ステップS110)の詳細手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of the halftone process (step S110) of one color component of four ink colors C, M, Y, and K. 注目画素の入力階調値と閾値との関係を模式的に示す説明図である。It is explanatory drawing which shows typically the relationship between the input gradation value of a focused pixel, and a threshold value. 第1誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of a 1st error diffusion matrix. 第2誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of a 2nd error diffusion matrix. 変形例1における第1の態様の第1誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of the 1st error diffusion matrix of the 1st aspect in the modification 1. 変形例1における第1の態様の第2誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of the 2nd error diffusion matrix of the 1st aspect in the modification 1. 変形例1における第2の態様の第1誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of the 1st error diffusion matrix of the 2nd aspect in the modification 1. 変形例1における第2の態様の第2誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of the 2nd error diffusion matrix of the 2nd aspect in the modification 1. 変形例1における第3の態様の第2誤差拡散マトリックスの一例を示す説明図である。It is explanatory drawing which shows an example of the 2nd error diffusion matrix of the 3rd aspect in the modification 1.

A.実施形態:
A1.画像処理装置の構成:
図1は、本発明の一実施形態としての画像処理装置100の構成を示すブロック図である。画像処理装置100は、印刷装置200で印刷される画像の画像処理を行い、画像処理後の印刷用画像データを印刷装置200に送信する。本実施形態では、画像処理装置100は、パーソナルコンピューターにより構成されている。画像処理装置100において動作するオペレ−ティグシステムには、アプリケーション20と、プリンタードライバー30とが組み込まれている。印刷装置200は、4色のインク、具体的には、C(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック)のインクを吐出するインクジェットプリンターとして構成されている。印刷装置200は、一般的なインクジェットプリンターと同様な構成であるため、その詳細な説明は省略する。
A. Embodiment:
A1. Configuration of image processing device:
FIG. 1 is a block diagram showing a configuration of an image processing apparatus 100 as an embodiment of the present invention. The image processing apparatus 100 performs image processing on an image printed by the printing apparatus 200, and transmits image data for printing after image processing to the printing apparatus 200. In the present embodiment, the image processing apparatus 100 is configured by a personal computer. An operating system that operates in the image processing apparatus 100 includes an application 20 and a printer driver 30. The printing apparatus 200 is configured as an ink jet printer that ejects four colors of ink, specifically, C (cyan), M (magenta), Y (yellow), and K (black) inks. Since the printing apparatus 200 has the same configuration as a general inkjet printer, a detailed description thereof is omitted.

プリンタードライバー30は、解像度変換部31と、色変換部32と、ハーフトーン処理部33と、印刷データ出力部35と、を備える。   The printer driver 30 includes a resolution conversion unit 31, a color conversion unit 32, a halftone processing unit 33, and a print data output unit 35.

解像度変換部31は、入力画像の解像度を印刷解像度に変換する機能を有する。入力画像は、例えば、アプリケーション20により生成された画像や図示しない入力インターフェイスから受信した画像が該当する。本実施形態では、入力画像は、いずれもレッド(R)、グリーン(G)、ブルー(B)の色成分から成る入力階調値で表現されている。本実施形態では、入力画像の階調値範囲は、0〜255である。   The resolution conversion unit 31 has a function of converting the resolution of the input image into the print resolution. The input image corresponds to, for example, an image generated by the application 20 or an image received from an input interface (not shown). In the present embodiment, the input image is represented by input gradation values composed of red (R), green (G), and blue (B) color components. In the present embodiment, the gradation value range of the input image is 0 to 255.

色変換部32は、入力画像の画像データをインク色C、M、Y、Kの入力階調値から成る画像データに変換する機能を有する。本実施形態では、画像データの入力階調値範囲は、0〜255である。なお、画像データの入力階調値範囲は、0〜255に限らず、0〜128など任意の範囲であってもよい。色変換部32は、予め用意されている色変換テーブル36を参照して上記色変換を行う。   The color conversion unit 32 has a function of converting image data of an input image into image data composed of input gradation values of ink colors C, M, Y, and K. In the present embodiment, the input gradation value range of the image data is 0 to 255. The input gradation value range of the image data is not limited to 0 to 255, and may be an arbitrary range such as 0 to 128. The color conversion unit 32 performs the color conversion with reference to a color conversion table 36 prepared in advance.

ハーフトーン処理部33は、画像データの各色の256階調(段階)の入力階調値を、各色のドットの形成の有無に対応する出力階調値、換言すると、ドット形成有り(255)とドット形成無し(0)の2階調の階調値に変換する、ハーフトーン処理を各インク色の色成分ごとに独立して実行する。本実施形態では、ハーフトーン処理は、いわゆる誤差拡散法により実行される。色成分Cのハーフトーン処理を例に説明すると、誤差拡散法では、色成分Cの画像データを構成する複数の画素を順番に注目画素として特定し、注目画素の補正階調値と出力階調値との誤差を、複数の周辺画素に拡散しつつ、注目画素におけるドット形成の有無を決定する。本実施形態において、「補正階調値」とは、入力階調値を補正した階調値であり、ハーフトーン処理を実行済みの画素から注目画素に拡散された誤差を注目画素の入力階調値に加えることにより得られる階調値である。また、「周辺画素」とは、注目画素の周辺の画素であり、ハーフトーン処理を未実行の画素である複数の画素を意味する。   The halftone processing unit 33 sets the input gradation value of 256 gradations (steps) of each color of the image data to an output gradation value corresponding to the presence or absence of formation of dots of each color, in other words, dot formation present (255). A halftone process for converting to a gradation value of two gradations without dot formation (0) is performed independently for each color component of each ink color. In the present embodiment, the halftone process is executed by a so-called error diffusion method. The halftone process of the color component C will be described as an example. In the error diffusion method, a plurality of pixels constituting the image data of the color component C are specified as the target pixel in order, and the correction gradation value and the output gradation of the target pixel are specified. The presence / absence of dot formation in the target pixel is determined while diffusing an error from the value to a plurality of peripheral pixels. In the present embodiment, the “corrected gradation value” is a gradation value obtained by correcting an input gradation value, and an error diffused from a pixel that has been subjected to halftone processing to a target pixel is defined as an input gradation of the target pixel. It is a gradation value obtained by adding to the value. Further, “peripheral pixels” are pixels around the pixel of interest, and mean a plurality of pixels that have not been subjected to halftone processing.

ハーフトーン処理部33は、誤差算出部34を有する。誤差算出部34は、注目画素の補正階調値と出力階調値との誤差を複数の周辺画素にそれぞれ拡散する際の拡散すべき誤差を、算出する。拡散すべき誤差は、周辺画素に対してそれぞれの重み値が対応づけられている誤差拡散マトリックスを参照して算出する。誤差拡散マトリックスは、画像処理装置100内のメモリー40に格納されている。本実施形態では、誤差拡散マトリックスとして、注目画素の色成分Cの画像データの入力階調値がゼロでない場合と、注目画素の色成分Cの画像データの入力階調値がゼロの場合とについて、それぞれ異なる誤差拡散マトリックスが予め設定されている。誤差算出部34は、注目画素の色成分Cの画像データの入力階調値がゼロでない場合には、第1誤差拡散マトリックス37を参照し、注目画素の色成分Cの画像データの入力階調値がゼロの場合には、第2誤差拡散マトリックス38を参照する。第1誤差拡散マトリックス37および第2誤差拡散マトリックス38についての詳細な説明は、後述するが、第2誤差拡散マトリックス38を用いたいのは、注目画素が白色データの場合である。以上説明した色成分Cのハーフトーン処理と同様の処理を、残りの色成分M、Y、Kのそれぞれに対しても同様に行う。   The halftone processing unit 33 includes an error calculation unit 34. The error calculation unit 34 calculates an error to be diffused when diffusing an error between the correction gradation value of the target pixel and the output gradation value to each of a plurality of peripheral pixels. The error to be diffused is calculated with reference to an error diffusion matrix in which respective weight values are associated with surrounding pixels. The error diffusion matrix is stored in the memory 40 in the image processing apparatus 100. In the present embodiment, as the error diffusion matrix, the case where the input tone value of the image data of the color component C of the target pixel is not zero and the case where the input tone value of the image data of the color component C of the target pixel is zero. Different error diffusion matrices are set in advance. When the input tone value of the image data of the color component C of the target pixel is not zero, the error calculation unit 34 refers to the first error diffusion matrix 37 and inputs the input tone of the image data of the color component C of the target pixel. If the value is zero, the second error diffusion matrix 38 is referred to. Although the detailed description of the first error diffusion matrix 37 and the second error diffusion matrix 38 will be described later, the second error diffusion matrix 38 is used when the target pixel is white data. The same processing as the halftone processing of the color component C described above is performed similarly for each of the remaining color components M, Y, and K.

印刷データ出力部35は、ハーフトーン処理部33による処理後のデータ、つまり、各インク色C、M、Y、Kのドットの形成の有無を示すデータ(以下、「ハーフトーンデータ」と呼ぶ)をラスタライズし、印刷制御用のコマンドを含む印刷データを生成し、印刷装置200に送信する。印刷データ出力部35は、ハーフトーンデータをラスタライズする際、各画素のドットを、印刷装置200における図示しないキャリッジの往動時および複動時のいずれにおいて形成するかを決定する。   The print data output unit 35 is data after processing by the halftone processing unit 33, that is, data indicating whether or not each ink color C, M, Y, K is formed (hereinafter referred to as “halftone data”). Is rasterized, print data including a print control command is generated, and transmitted to the printing apparatus 200. When the halftone data is rasterized, the print data output unit 35 determines whether the dot of each pixel is formed when the carriage (not shown) in the printing apparatus 200 moves forward or double.

プリンタードライバー30は、上述した各処理部31〜35が有する機能を実現するためのプログラムに相当する。プリンタードライバー30は、コンピューターが読み取り可能な記録媒体に記録された形態で供給される。このような記録媒体としては、たとえばDVD、フラッシュメモリ、コンピューターの内部記憶装置(RAMやROMなどのメモリ)および外部記憶装置等の、データを一時的ではなく固定可能であり且つコンピューターが読み取り可能な種々の媒体を利用できる。   The printer driver 30 corresponds to a program for realizing the functions of the processing units 31 to 35 described above. The printer driver 30 is supplied in a form recorded on a computer-readable recording medium. As such a recording medium, for example, data such as a DVD, a flash memory, an internal storage device of a computer (memory such as RAM and ROM), and an external storage device can be fixed, not temporarily, and can be read by a computer. Various media can be used.

A2.印刷処理:
図2は、画像処理装置100および印刷装置200により実行される印刷処理の処理手順を示すフローチャートである。図2に示すように、ユーザーが画像処理装置100において印刷対象画像を指定して印刷指示を行なうと、印刷処理が実行される。解像度変換部31は、指定された印刷対象画像に対して、解像度変換処理を実行する(ステップS100)。具体的には、解像度変換部31は、印刷対象画像の解像度を印刷媒体Pに印刷する際の解像度に変換する。
A2. Printing process:
FIG. 2 is a flowchart illustrating a processing procedure of print processing executed by the image processing apparatus 100 and the printing apparatus 200. As shown in FIG. 2, when the user designates a print target image and issues a print instruction in the image processing apparatus 100, the print process is executed. The resolution conversion unit 31 performs a resolution conversion process on the designated print target image (step S100). Specifically, the resolution conversion unit 31 converts the resolution of the image to be printed into the resolution for printing on the print medium P.

色変換部32は、色変換処理を実行し、入力画像データをインク色の入力階調値から成る画像データに変換する(ステップS105)。   The color conversion unit 32 executes a color conversion process, and converts the input image data into image data composed of input gradation values of ink colors (step S105).

ハーフトーン処理部33は、第1誤差拡散マトリックス37および第2誤差拡散マトリックス38を用いて、各インク色の色成分ごとにハーフトーン処理を実行する(ステップS110)。ハーフトーン処理の詳細については、後述する。   The halftone processing unit 33 performs halftone processing for each color component of each ink color using the first error diffusion matrix 37 and the second error diffusion matrix 38 (step S110). Details of the halftone process will be described later.

印刷データ出力部35は、ハーフトーンデータを用いて印刷データ出力処理を実行する(ステップS115)。具体的には、印刷データ出力部35は、ハーフトーン処理後の画像データに対して、ラスタライズ処理を実行し、処理後のデータ(印刷データ)を印刷装置200に出力する。印刷装置200では、印刷データ出力部35から印刷データを受信すると、印刷データに含まれる制御コマンドに従って、印刷対象画像を印刷媒体Pに印刷する(ステップS120)。   The print data output unit 35 executes print data output processing using the halftone data (step S115). Specifically, the print data output unit 35 performs a rasterization process on the image data after the halftone process, and outputs the processed data (print data) to the printing apparatus 200. In the printing apparatus 200, when the print data is received from the print data output unit 35, the print target image is printed on the print medium P in accordance with the control command included in the print data (step S120).

A3.ハーフトーン処理:
図3は、4つのインク色C、M、Y、Kのうちの1つの色成分のハーフトーン処理(ステップS110)の詳細手順を示すフローチャートである。上述のように、ハーフトーン処理は、色変換部32による色変換処理(ステップS105)の完了後に色変換部32からインク色C、M、Y、Kの各色成分の画像データを受信すると開始される。インク色C、M、Y、Kの各色成分のハーフトーン処理は独立して実行可能であり、図3に示すハーフトーン処理部をインク色の数だけ用意して4色同時に並列して実行してもよいし、例えば、1ライン単位や、1画面単位で1色ずつ順番に実行してもよい。以降の説明では、色成分Cのハーフトーン処理を例に説明する。
A3. Halftone processing:
FIG. 3 is a flowchart showing a detailed procedure of halftone processing (step S110) for one color component of the four ink colors C, M, Y, and K. As described above, the halftone process is started when image data of each color component of ink colors C, M, Y, and K is received from the color conversion unit 32 after the color conversion process (step S105) by the color conversion unit 32 is completed. The The halftone processing of each color component of ink colors C, M, Y, and K can be executed independently, and the halftone processing section shown in FIG. 3 is prepared for the number of ink colors and executed simultaneously in parallel for four colors. Alternatively, for example, one color may be executed in order for each line or for each screen. In the following description, the halftone process of the color component C will be described as an example.

ハーフトーン処理は、色成分Cの画像データを構成する複数画素を予め定められた順番で1画素ずつ注目画素として特定し、ドットデータを生成する処理である。具体的には、色成分Cの画像データの左上隅の画素から開始して、右方向に1つずつ移動し、右端に達した場合には1段下の左端の画素に移動することを繰り返しながら、順次注目画素を特定し、ドットデータを生成する処理である。   The halftone process is a process for generating dot data by specifying a plurality of pixels constituting the color component C image data as pixels of interest one by one in a predetermined order. Specifically, starting from the pixel at the upper left corner of the image data of the color component C, it moves one by one in the right direction, and when it reaches the right end, it moves repeatedly to the pixel at the left end one step below. In this process, the target pixel is sequentially identified and dot data is generated.

ハーフトーン処理部33は、色成分Cの画像データの全画素の処理が完了したか否かを判定する(ステップS205)。このとき、ハーフトーン処理部33は、注目画素の位置が色成分Cの画像データの終端に達しているか否かにより判定する。注目画素の位置が色成分Cの画像データの終端に達している場合には、全画素の処理が完了したと判定し(ステップS205:YES)、1色分のハーフトーン処理を終了する。全画素の処理が完了していないと判定した場合(ステップS205:NO)、次の画素を注目画素として特定する(ステップS210)。   The halftone processing unit 33 determines whether or not the processing of all the pixels of the image data of the color component C has been completed (step S205). At this time, the halftone processing unit 33 determines whether the position of the target pixel has reached the end of the image data of the color component C. When the position of the target pixel has reached the end of the image data of the color component C, it is determined that the processing for all the pixels has been completed (step S205: YES), and the halftone process for one color is ended. When it is determined that the processing for all the pixels has not been completed (step S205: NO), the next pixel is specified as the target pixel (step S210).

ステップS210実行後、ハーフトーン処理部33は、注目画素の補正階調値が閾値より小さいか否かを判定する(ステップS215)。本実施形態では、閾値は、入力階調値の値に応じて予め設定されている。   After executing step S210, the halftone processing unit 33 determines whether or not the corrected gradation value of the target pixel is smaller than the threshold value (step S215). In the present embodiment, the threshold value is set in advance according to the value of the input gradation value.

図4は、注目画素の入力階調値と閾値との関係を模式的に示す説明図である。図4において、縦軸は閾値を示し、横軸は注目画素の入力階調値(0〜255)を示す。図4では、注目画素の入力階調値が取り得る階調値範囲のほぼ中央値の128を閾値とした場合を破線で表している。図4は、上述の特許文献1(特許第3360391号公報)の図7に相当する。この閾値は、補正階調値と出力階調値との誤差の平均値がゼロとなる値であり、入力階調値に応じて最適化した閾値となっている。このような閾値は、特許文献1に記載の技術を適用することにより得ることができる。なお、「平均値がゼロ」とは、平均値がちょうどゼロである場合に加えて、例えば、誤差がプラスマイナス10の範囲にある場合をも含む広い概念を意味する。図4に示すように、注目画素の入力階調値が予め定められた低階調値範囲に含まれている場合の閾値は、注目画素の入力階調値が取り得る階調値範囲のほぼ中央値(128)よりも小さい。   FIG. 4 is an explanatory diagram schematically showing the relationship between the input tone value of the target pixel and the threshold value. In FIG. 4, the vertical axis represents the threshold value, and the horizontal axis represents the input tone value (0 to 255) of the target pixel. In FIG. 4, the case where the threshold value is approximately the center value 128 of the gradation value range that can be taken by the input gradation value of the target pixel is indicated by a broken line. FIG. 4 corresponds to FIG. 7 of Patent Document 1 (Japanese Patent No. 3360391) described above. This threshold value is a value at which the average error between the corrected gradation value and the output gradation value becomes zero, and is a threshold value optimized according to the input gradation value. Such a threshold value can be obtained by applying the technique described in Patent Document 1. Note that “average value is zero” means a wide concept including, for example, the case where the error is in the range of plus or minus 10 in addition to the case where the average value is exactly zero. As shown in FIG. 4, the threshold value when the input gradation value of the target pixel is included in the predetermined low gradation value range is approximately the gradation value range that can be taken by the input gradation value of the target pixel. Less than median (128).

本実施形態において、「低階調値範囲」とは、例えば、CAD図面のような白色の背景における低濃度の細線部分といった用途において、注目画素の入力階調値の取り得る値(0〜255)に対して6%〜25%に相当する範囲である。階調値が同一であっても、インクの濃度や、ドットサイズが異なると、出力される線の濃度は様々であるため、「低階調値範囲」として適宜最適な階調値範囲が設定される。   In the present embodiment, the “low gradation value range” means, for example, a value (0 to 255) that can be taken by the input gradation value of the target pixel in an application such as a low-density thin line portion on a white background such as a CAD drawing. ) In a range corresponding to 6% to 25%. Even if the tone value is the same, if the ink density or dot size is different, the output line density varies, so the optimum tone value range is set as the “low tone value range”. Is done.

図3に示すステップS215において、ハーフトーン処理部33は、注目画素の補正階調値が図4に示す閾値より小さいか否かを判定する。注目画素の補正階調値が閾値以上であると判定した場合(ステップS215:NO)、注目画素のドットをONと決定する(ステップS220)。このとき、注目画素の出力階調値は、255に設定される。   In step S215 shown in FIG. 3, the halftone processing unit 33 determines whether or not the corrected gradation value of the target pixel is smaller than the threshold value shown in FIG. If it is determined that the correction gradation value of the target pixel is equal to or greater than the threshold (step S215: NO), the dot of the target pixel is determined to be ON (step S220). At this time, the output gradation value of the target pixel is set to 255.

ステップS220実行後、ハーフトーン処理部33は、注目画素の入力階調値がゼロか否かを判定する(ステップS230)。ハーフトーン処理部33は、注目画素の入力階調値がゼロでないと判定した場合(ステップS230:NO)、注目画素の補正階調値と、出力階調値と、の誤差を周辺画素に拡散する(ステップS235)。このとき、誤差算出部34は、周辺画素にそれぞれ拡散すべき誤差を以下のようにして算出する。   After executing step S220, the halftone processing unit 33 determines whether or not the input tone value of the target pixel is zero (step S230). When the halftone processing unit 33 determines that the input tone value of the target pixel is not zero (step S230: NO), the error between the corrected tone value of the target pixel and the output tone value is diffused to surrounding pixels. (Step S235). At this time, the error calculation unit 34 calculates the error to be diffused to the surrounding pixels as follows.

図5は、第1誤差拡散マトリックス37の一例を示す説明図である。第1誤差拡散マトリックス37は、注目画素の入力階調値がゼロでない場合(ステップS230:NO)の誤差拡散(ステップS235)において用いられる。図5において、各マスは1画素を表し、斜線のマスは、注目画素を表している。図5に示すように、第1誤差拡散マトリックス37では、注目画素において生じた誤差を注目画素の周辺10画素に拡散する。注目画素の右隣の画素の重み値は、3/16と設定されている。さらにその右隣の画素の重み値は、1/16と設定されている。注目画素の1段下の画素の重み値は、左端から順に、1/16、2/16、3/16、2/16、1/16と、それぞれ設定されている。さらにその1段下の画素の重み値は、左端から順に、1/16、1/16、1/16と、それぞれ設定されている。第1誤差拡散マトリックス37では、重み値の合計値が16/16、すなわち1となるように、それぞれの重み値が設定されている。したがって、注目画素の入力階調値がゼロでない場合は、注目画素において生じた誤差は棄却されずにそのまま周辺画素へ拡散されることとなる。誤差算出部34は、注目画素で生じた誤差に対してそれぞれの周辺画素に対して対応づけられている重み値を乗じることにより拡散すべき誤差を算出する。   FIG. 5 is an explanatory diagram showing an example of the first error diffusion matrix 37. The first error diffusion matrix 37 is used in error diffusion (step S235) when the input gradation value of the target pixel is not zero (step S230: NO). In FIG. 5, each square represents one pixel, and the hatched square represents a target pixel. As shown in FIG. 5, in the first error diffusion matrix 37, an error generated in the target pixel is diffused to 10 pixels around the target pixel. The weight value of the pixel on the right side of the target pixel is set to 3/16. Furthermore, the weight value of the right adjacent pixel is set to 1/16. The weight values of the pixels one step below the target pixel are set to 1/16, 2/16, 3/16, 2/16, and 1/16, respectively, in order from the left end. Furthermore, the weight values of the pixels one level below are set to 1/16, 1/16, and 1/16, respectively, in order from the left end. In the first error diffusion matrix 37, the respective weight values are set so that the total weight value is 16/16, that is, 1. Therefore, when the input gradation value of the target pixel is not zero, the error generated in the target pixel is diffused as it is to the surrounding pixels without being rejected. The error calculation unit 34 calculates an error to be diffused by multiplying an error generated in the target pixel by a weight value associated with each peripheral pixel.

ハーフトーン処理部33は、誤差算出部34による拡散すべき誤差の算出が完了すると、周辺画素の入力階調値に拡散すべき誤差を加えて周辺画素における補正階調値とし、ステップS235は完了する。ただし、各画素には複数の周辺画素から誤差が拡散されるため、補正階調値は、すべての周辺画素からの誤差拡散が完了した段階で確定される。ステップS235の実行後、図3に示すように、ステップS205に戻る。   When the calculation of the error to be diffused by the error calculation unit 34 is completed, the halftone processing unit 33 adds the error to be diffused to the input tone value of the peripheral pixel to obtain a corrected tone value for the peripheral pixel, and step S235 is completed. To do. However, since errors are diffused from a plurality of peripheral pixels to each pixel, the correction gradation value is determined when error diffusion from all the peripheral pixels is completed. After step S235 is executed, the process returns to step S205 as shown in FIG.

上述のステップS215において、注目画素の補正階調値が閾値より小さいと判定された場合(ステップS215:YES)、ハーフトーン処理部33は、注目画素のドットをOFFと決定する(ステップS225)。このとき、注目画素の出力階調値は、0に設定される。   When it is determined in step S215 described above that the corrected gradation value of the target pixel is smaller than the threshold (step S215: YES), the halftone processing unit 33 determines that the dot of the target pixel is OFF (step S225). At this time, the output gradation value of the target pixel is set to zero.

ステップS225の実行後、上述のステップS220の実行後と同様に、注目画素の入力階調値がゼロか否かが判定される(ステップS230)。ハーフトーン処理部33は、注目画素の入力階調値がゼロであると判定した場合(ステップS230:YES)、注目画素の補正階調値と、出力階調値との誤差の一部を棄却し、残りを周辺画素に拡散する(ステップS240)。具体的には、注目画素の補正階調値と、出力階調値との誤差よりも絶対値の小さな値を拡散する。このとき、誤差算出部34は、注目画素の入力階調値がゼロでないと判定した場合、つまりステップS235の実行時とは異なり、後述の第2誤差拡散マトリックス38を参照して周辺画素にそれぞれ拡散すべき誤差を算出する。そして、ハーフトーン処理部33は、ステップS235と同様に、周辺画素の入力階調値に拡散すべき誤差を加え、周辺画素における補正階調値とし、ステップS240は完了する。   After execution of step S225, it is determined whether or not the input gradation value of the pixel of interest is zero in the same manner as after execution of step S220 described above (step S230). If the halftone processing unit 33 determines that the input tone value of the target pixel is zero (step S230: YES), the halftone processing unit 33 rejects part of the error between the corrected tone value of the target pixel and the output tone value. Then, the rest is diffused to surrounding pixels (step S240). Specifically, a value whose absolute value is smaller than the error between the corrected gradation value of the target pixel and the output gradation value is diffused. At this time, when the error calculation unit 34 determines that the input gradation value of the target pixel is not zero, that is, unlike the execution of step S235, the error calculation unit 34 refers to the second error diffusion matrix 38 described later to each of the peripheral pixels. Calculate the error to be diffused. Then, as in step S235, the halftone processing unit 33 adds an error to be diffused to the input gradation value of the peripheral pixel to obtain a corrected gradation value in the peripheral pixel, and step S240 is completed.

図6は、第2誤差拡散マトリックス38の一例を示す説明図である。図6では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第2誤差拡散マトリックス38は、注目画素の入力階調値がゼロである場合に用いられる。第2誤差拡散マトリックス38は、注目画素の右隣の画素の重み値として2/16が設定されている点において、第1誤差拡散マトリックス37と異なる。第2誤差拡散マトリックス38のその他の構成は、第1誤差拡散マトリックス37と同様である。第2誤差拡散マトリックス38において周辺画素それぞれに対応づけられている重み値の合計値は、15/16であり、1より小さい値である。したがって、注目画素の周辺の10画素に拡散される誤差の合計値は、注目画素で生じた誤差よりも絶対値が小さくなる。このため、誤差拡散のたびに誤差の一部が消失していく。   FIG. 6 is an explanatory diagram showing an example of the second error diffusion matrix 38. In FIG. 6, as in FIG. 5, each square represents one pixel, and the hatched square represents the target pixel. The second error diffusion matrix 38 is used when the input gradation value of the target pixel is zero. The second error diffusion matrix 38 is different from the first error diffusion matrix 37 in that 2/16 is set as the weight value of the pixel on the right of the target pixel. Other configurations of the second error diffusion matrix 38 are the same as those of the first error diffusion matrix 37. In the second error diffusion matrix 38, the total value of the weight values associated with the surrounding pixels is 15/16, which is a value smaller than 1. Therefore, the total value of the errors diffused to the 10 pixels around the target pixel has a smaller absolute value than the error generated in the target pixel. For this reason, a part of the error disappears at every error diffusion.

図3に示すように、ステップS240の実行後、上述のステップS235の実行後と同様に、ステップS205に戻り、色成分Cの画像データの全画素についてのハーフトーン処理が完了するまで、上述のステップS205〜ステップS240の処理が繰り返し実行される。色成分Cの画像データについてのハーフトーン処理が完了すると、残りの色成分M、Y、Kのそれぞれの画像データについても、色成分Cと同様にハーフトーン処理が実行される。   As shown in FIG. 3, after step S240 is executed, the process returns to step S205 in the same manner as after step S235 described above, and the above-described halftone processing is completed for all the pixels of the image data of the color component C. Steps S205 to S240 are repeatedly executed. When the halftone process for the image data of the color component C is completed, the halftone process is executed for each of the remaining color components M, Y, and K as with the color component C.

A4.本実施形態におけるハーフトーン処理の効果:
上述したハーフトーン処理によれば、注目画素の補正階調値と、出力階調値と、の誤差を、複数の周辺画素に拡散する際に、注目画素の入力階調値がゼロの場合には、誤差の一部を棄却して誤差よりも絶対値の小さな値を周辺画素に拡散するので、誤差の一部は周辺画素に拡散されず、誤差拡散のたびに誤差の一部が消失していくことにより、誤差をそのまま周辺画素に拡散する構成と比べて、小さな画素間隔で蓄積誤差を消失させることができる。このため、ハーフトーン処理結果が「ドット形成有り(255)」と決定された場合に生じるマイナス誤差を、小さな画素間隔で消失させることができる。一方で誤差の消失効果は、プラス誤差の場合にも発生する。したがって、マイナス誤差の消失速度が早まるのとは逆に、プラス誤差の蓄積により、「ドット形成有り」と決定されるまでの画素間隔は、大きくなる。
A4. Effects of halftone processing in this embodiment:
According to the halftone process described above, when the error between the correction gradation value of the target pixel and the output gradation value is diffused to a plurality of peripheral pixels, the input gradation value of the target pixel is zero. Rejects part of the error and diffuses a value that is smaller in absolute value than the error to surrounding pixels, so that part of the error is not diffused to the surrounding pixels and part of the error disappears each time the error is diffused By doing so, it is possible to eliminate the accumulated error at a small pixel interval as compared with the configuration in which the error is diffused as it is to the peripheral pixels. For this reason, it is possible to eliminate a minus error that occurs when the halftone processing result is determined to be “with dot formation (255)” at a small pixel interval. On the other hand, the error disappearance effect also occurs in the case of a plus error. Therefore, on the contrary to the speed of disappearance of the minus error, the pixel interval until it is determined that “dot formation is present” increases due to the accumulation of the plus error.

しかし、注目画素の入力階調値が低階調値範囲に含まれている場合には、閾値を、入力階調値範囲の中央値よりも小さくしているので、閾値が入力階調値範囲の中央値である場合に比べて、小さな補正階調値で「ドット形成有り」と決定され、絶対値のより大きなマイナス誤差が発生する。このため、マイナス誤差がゼロからプラスに転じて閾値に達するまでにおいて、誤差がマイナスとなる区間は、閾値を入力階調値範囲の中央値とした場合に比べて長くなり、誤差がプラスとなる区間は、閾値を入力階調値範囲の中央値とした場合に比べて短くなる。このため、マイナス誤差の消失速度が早まる効果が発生する区間が長くなり、プラス誤差の蓄積速度が遅くなる効果が発生する区間が短くなる。これにより、トータルではマイナス誤差の消失速度が早まる効果が勝る結果となり、「ドット形成有り」と判断される画素間隔が短くなるため、「ドット形成有り」と決定し易くできる。   However, when the input tone value of the target pixel is included in the low tone value range, the threshold value is smaller than the median value of the input tone value range, so the threshold value is within the input tone value range. As compared with the case of the median value of, it is determined that “dot formation is present” with a small correction gradation value, and a larger minus error of the absolute value occurs. For this reason, before the minus error changes from zero to plus and reaches the threshold value, the interval in which the error is minus is longer than when the threshold value is the median value of the input gradation value range, and the error is plus. The interval is shorter than when the threshold value is the median value of the input tone value range. For this reason, the interval in which the effect of increasing the disappearance rate of the minus error occurs becomes longer, and the interval in which the effect of reducing the accumulation rate of the plus error becomes shorter. As a result, the effect of accelerating the disappearance speed of the minus error is superior in total, and the pixel interval determined to be “with dot formation” is shortened, so that it is easy to determine “with dot formation”.

以上説明した、本実施形態の画像処理装置によれば、ハーフトーン処理において、注目画素の入力階調値がゼロの場合には、拡散すべき誤差を算出する際に、重み値の合計値が1よりも小さな値が設定された第2誤差拡散マトリックス38を用いることにより、注目画素で生じた誤差の一部を棄却して、誤差よりも絶対値の小さな値を複数の周辺画素に拡散させるので、誤差の一部は周辺画素に拡散されず、誤差拡散のたびに誤差の一部が消失していく。したがって、マイナス誤差をそのまま周辺画素に拡散する構成と比べて、小さな画素間隔で蓄積誤差を消失させ、蓄積誤差が周辺画素の画像に影響を与えることを抑制でき、白色の背景に低濃度の細線を含む画像において、細線が途切れたり消失したりすることを抑制できる。加えて、プラス誤差の一部が消失することによる「ドット形成有り」と決定され難くなることは、閾値を入力階調値が取り得る階調値範囲の中央値よりも小さな値とすることにより抑制できる。   According to the image processing apparatus of the present embodiment described above, in the halftone process, when the input gradation value of the target pixel is zero, the total weight value is calculated when calculating the error to be diffused. By using the second error diffusion matrix 38 in which a value smaller than 1 is used, a part of the error generated in the target pixel is rejected, and a value having an absolute value smaller than the error is diffused to a plurality of peripheral pixels. Therefore, a part of the error is not diffused to the surrounding pixels, and a part of the error disappears every time the error is diffused. Therefore, compared to a configuration in which a minus error is diffused as it is to the surrounding pixels, the accumulation error disappears at a small pixel interval, and it is possible to suppress the accumulation error from affecting the image of the surrounding pixels. It is possible to suppress the thin line from being interrupted or disappearing in an image including. In addition, it is difficult to determine that “dot formation is present” due to the disappearance of a part of the plus error because the threshold value is set to a value smaller than the median value of the gradation value range that the input gradation value can take. Can be suppressed.

加えて、閾値は、補正階調値と出力階調値との誤差の平均値がゼロとなるように設定された閾値の値でもあるため、低濃度の細線や文字のような入力階調値が低階調値範囲に含まれる場合であっても、尾引きなどの画質劣化の発生を抑制できる。したがって、白色の背景の画像において、低濃度の細線や文字のエッジ強調の効果を得つつ、白色の背景以外の部分に対する過度なエッジ強調に起因する画質劣化への影響を低減することができる。   In addition, the threshold value is also a threshold value set so that the average value of the error between the correction gradation value and the output gradation value is zero, so that the input gradation value such as a low-density thin line or a character is used. Can be suppressed even if it is included in the low gradation value range. Therefore, in the white background image, it is possible to reduce the influence on the image quality degradation due to excessive edge enhancement on the portion other than the white background while obtaining the effect of edge enhancement of the low density fine lines and characters.

B.変形例:
B1.変形例1:
上記実施形態では、注目画素で生じた誤差を周辺10画素に拡散する第1誤差拡散マトリックス37および第2誤差拡散マトリックス38を用いていたが、本発明はこれに限定されない。
B. Variations:
B1. Modification 1:
In the above embodiment, the first error diffusion matrix 37 and the second error diffusion matrix 38 that diffuse the error generated in the target pixel to the surrounding 10 pixels are used, but the present invention is not limited to this.

図7は、変形例1における第1の態様の第1誤差拡散マトリックス37aの一例を示す説明図である。図7では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第1誤差拡散マトリックス37aは、注目画素において生じた誤差を注目画素の周辺4画素に拡散する点において、第1誤差拡散マトリックス37と異なる。図7に示すように、注目画素の右隣の画素の重み値は、7/16と設定されている。注目画素の左下の画素の重み値は3/16と、真下の画素の重み値は5/16と、右下の画素の重み値は1/16と、それぞれ設定されている。第1誤差拡散マトリックス37aでは、第1誤差拡散マトリックス37と同様、重み値の合計値が16/16、すなわち1となるように、それぞれの重み値が設定されている。   FIG. 7 is an explanatory diagram showing an example of the first error diffusion matrix 37a of the first mode in the first modification. In FIG. 7, as in FIG. 5, each square represents one pixel, and the hatched square represents a target pixel. The first error diffusion matrix 37a is different from the first error diffusion matrix 37 in that an error generated in the target pixel is diffused to four pixels around the target pixel. As shown in FIG. 7, the weight value of the pixel on the right of the target pixel is set to 7/16. The weight value of the lower left pixel of the target pixel is set to 3/16, the weight value of the pixel immediately below is set to 5/16, and the weight value of the lower right pixel is set to 1/16. In the first error diffusion matrix 37a, like the first error diffusion matrix 37, the respective weight values are set so that the total value of the weight values is 16/16, that is, 1.

図8は、変形例1における第1の態様の第2誤差拡散マトリックス38aの一例を示す説明図である。図8では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第2誤差拡散マトリックス38aは、注目画素の右隣の画素の重み値として6/16が設定されている点において、変形例1における第1の態様の第1誤差拡散マトリックス37aと異なる。第2誤差拡散マトリックス38aのその他の構成は、変形例1における第1の態様の第1誤差拡散マトリックス37aと同様である。第2誤差拡散マトリックス38aにおいて周辺画素それぞれに対応づけられている重み値の合計値は、15/16であり、1より小さい値である。   FIG. 8 is an explanatory diagram showing an example of the second error diffusion matrix 38a of the first mode in the first modification. In FIG. 8, as in FIG. 5, each square represents one pixel, and the hatched square represents the target pixel. The second error diffusion matrix 38a is different from the first error diffusion matrix 37a of the first mode in Modification 1 in that 6/16 is set as the weight value of the pixel on the right of the target pixel. Other configurations of the second error diffusion matrix 38a are the same as those of the first error diffusion matrix 37a of the first mode in the first modification. In the second error diffusion matrix 38a, the total value of the weight values associated with the surrounding pixels is 15/16, which is a value smaller than 1.

図9は、変形例1における第2の態様の第1誤差拡散マトリックス37bの一例を示す説明図である。図9では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第1誤差拡散マトリックス37bは、注目画素において生じた誤差を注目画素の周辺12画素に拡散する点において、第1誤差拡散マトリックス37と異なる。図9に示すように、注目画素の右隣の画素の重み値は、7/48と設定されている。さらにその右隣の画素の重み値は、5/48と設定されている。注目画素の1段下の画素の重み値は、左端から順に、3/48、4/48、7/48、5/48、3/48と、それぞれ設定されている。さらにその1段下の画素の重み値は、左端から順に、1/48、3/48、6/48、3/48、1/48と、それぞれ設定されている。第1誤差拡散マトリックス37bでは、重み値の合計値が48/48、すなわち1となるように、それぞれの重み値が設定されている。   FIG. 9 is an explanatory diagram showing an example of the first error diffusion matrix 37b of the second mode in the first modification. In FIG. 9, as in FIG. 5, each square represents one pixel, and the hatched square represents a target pixel. The first error diffusion matrix 37b is different from the first error diffusion matrix 37 in that an error generated in the target pixel is diffused to 12 pixels around the target pixel. As shown in FIG. 9, the weight value of the pixel on the right of the target pixel is set to 7/48. Furthermore, the weight value of the right adjacent pixel is set to 5/48. The weight values of the pixels one step below the target pixel are set to 3/48, 4/48, 7/48, 5/48, and 3/48, respectively, from the left end. Further, the weight values of the pixels one step below are set to 1/48, 3/48, 6/48, 3/48, and 1/48 in order from the left end. In the first error diffusion matrix 37b, the respective weight values are set so that the total weight value is 48/48, that is, 1.

図10は、変形例1における第2の態様の第2誤差拡散マトリックス38bの一例を示す説明図である。図10では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第2誤差拡散マトリックス38bは、注目画素の2段下の画素の重み値として4/48が設定されている点において、変形例1における第2の態様の第1誤差拡散マトリックス37bと異なる。第2誤差拡散マトリックス38bのその他の構成は、変形例1における第2の態様の第1誤差拡散マトリックス37bと同様である。第2誤差拡散マトリックス38bにおいて周辺画素それぞれに対応づけられている重み値の合計値は、46/48であり、1より小さい値である。   FIG. 10 is an explanatory diagram showing an example of the second error diffusion matrix 38b of the second mode in the first modification. In FIG. 10, as in FIG. 5, each square represents one pixel, and the hatched square represents the target pixel. The second error diffusion matrix 38b is different from the first error diffusion matrix 37b of the second mode in Modification 1 in that 4/48 is set as the weight value of the pixel two steps below the target pixel. Other configurations of the second error diffusion matrix 38b are the same as those of the first error diffusion matrix 37b of the second mode in the first modification. In the second error diffusion matrix 38b, the total value of the weight values associated with the surrounding pixels is 46/48, which is a value smaller than 1.

図11は、変形例1における第3の態様の第2誤差拡散マトリックス38cの一例を示す説明図である。図11では、図5と同様に、各マスは1画素を表し、斜線のマスは、注目画素を表している。第2誤差拡散マトリックス38cは、注目画素の右隣の画素の重み値として7/16が設定されている点と、注目画素の右下の画素の重み値として1/32が設定されている点とにおいて、変形例1における第1の態様の第2誤差拡散マトリックス38aと異なる。第2誤差拡散マトリックス38cのその他の構成は、第2誤差拡散マトリックス38aと同様である。第2誤差拡散マトリックス38cにおいて周辺画素それぞれに対応づけられている重み値の合計値は、31/32であり、1より小さい値である。   FIG. 11 is an explanatory diagram showing an example of the second error diffusion matrix 38c of the third mode in the first modification. In FIG. 11, as in FIG. 5, each square represents one pixel, and the hatched square represents the target pixel. In the second error diffusion matrix 38c, 7/16 is set as the weight value of the pixel adjacent to the right of the target pixel, and 1/32 is set as the weight value of the lower right pixel of the target pixel. Are different from the second error diffusion matrix 38a of the first mode in the first modification. Other configurations of the second error diffusion matrix 38c are the same as those of the second error diffusion matrix 38a. In the second error diffusion matrix 38c, the total weight value associated with each of the surrounding pixels is 31/32, which is a value smaller than 1.

上述の各態様のように、注目画素の入力階調値がゼロである場合に用いられる第2誤差拡散マトリックスにおいて周辺画素それぞれに対応付けられている重み値の合計が1より小さい値となる構成であれば、注目画素において生じた誤差は、任意の数の周辺画素に誤差を拡散してもよいし、それぞれの周辺画素に対応づけられている重み値は任意の値であってもよい。このような構成においても、上記実施形態と同様の効果を生ずる。加えて、変形例1における第1の態様および第2の態様のように、誤差をより広範囲の周辺画素に拡散する誤差拡散マトリックスを用いる場合には、注目画素において生じた誤差をより早く低減させることができる。   A configuration in which the sum of the weight values associated with each of the surrounding pixels in the second error diffusion matrix used when the input tone value of the target pixel is zero as in each of the above-described aspects is a value smaller than 1. If so, the error generated in the target pixel may be diffused to an arbitrary number of peripheral pixels, and the weight value associated with each peripheral pixel may be an arbitrary value. Even in such a configuration, an effect similar to that of the above embodiment is produced. In addition, when an error diffusion matrix that diffuses an error to a wider range of neighboring pixels is used as in the first and second aspects of the first modification, the error generated in the target pixel is reduced more quickly. be able to.

B2.変形例2:
上記実施形態では、誤差算出部34は、注目画素の入力階調値がゼロの場合と入力階調値がゼロでない場合とで、それぞれ異なる誤差拡散マトリックスを参照していたが、本発明はこれに限定されない。例えば、注目画素の入力階調値がゼロの場合においても、注目画素の入力階調値がゼロでない場合の誤差拡散マトリックス(第1誤差拡散マトリックス37、37a、37b)を参照してもよい。この場合、誤差算出部34は、誤差に対して、誤差拡散マトリックスにおいて対応付けられた重み値を乗じることにより得られた各値に対して、それぞれ1よりも小さな所定値を掛け合わせて拡散すべき誤差として算出してもよい。この構成においても、拡散される誤差の合計値(絶対値)は、注目画素で生じた誤差(絶対値)よりも小さくなるので、上記実施形態と同様の効果を奏し得る。すなわち一般には、注目画素の入力階調値が少なくともゼロの場合には、誤差の一部を拡散せずに棄却する任意の構成を、本発明に適用できる。
B2. Modification 2:
In the above-described embodiment, the error calculation unit 34 refers to different error diffusion matrices depending on whether the input tone value of the target pixel is zero or the input tone value is not zero. It is not limited to. For example, even when the input tone value of the target pixel is zero, the error diffusion matrix (first error diffusion matrix 37, 37a, 37b) when the input tone value of the target pixel is not zero may be referred to. In this case, the error calculation unit 34 multiplies each value obtained by multiplying the error by the weight value associated with the error diffusion matrix by a predetermined value smaller than 1, and diffuses the error. It may be calculated as a power error. Even in this configuration, since the total value (absolute value) of the diffused errors is smaller than the error (absolute value) generated in the target pixel, the same effect as in the above embodiment can be obtained. That is, generally, when the input tone value of the target pixel is at least zero, any configuration that rejects part of the error without diffusing can be applied to the present invention.

B3.変形例3:
上記実施形態において、注目画素の入力階調値がゼロの場合についてのみ、第2誤差拡散マトリックス38が予め設定されていたが、本発明はこれに限定されない。注目画素の入力階調値がゼロの場合に限らず、ゼロよりも大きく、かつ、比較的小さな階調値である場合にも、第2誤差拡散マトリックス38が設定されていてもよい。これにより、低濃度細線を強調したい白い背景の範囲を、やや広げることができる。すなわち、一般には、注目画素の入力階調値がゼロの場合に、重み値の合計値が1よりも小さい値が対応づけられている誤差拡散マトリックスが予め設定されている構成であれば、上記実施形態と同様の効果を奏する。
B3. Modification 3:
In the above embodiment, the second error diffusion matrix 38 is preset only when the input tone value of the target pixel is zero, but the present invention is not limited to this. The second error diffusion matrix 38 may be set not only when the input gradation value of the target pixel is zero but also when the gradation value is larger than zero and relatively small. Thereby, the range of the white background which wants to emphasize a low concentration thin line can be expanded a little. That is, in general, when the input tone value of the target pixel is zero, if the error diffusion matrix in which the total value of the weight values is associated with a value smaller than 1 is set in advance, The same effect as the embodiment is achieved.

また、注目画素の入力階調値が最高濃度のデータに対応する、最大入力階調値の場合にも、第2誤差拡散マトリックス38が設定されていてもよい。このとき、最大入力階調値に対応する閾値は、入力階調値範囲の中央値よりも大きく設定する。これにより、例えば、黒を背景とした黒よりも少し濃度が低い細線等の再現性を改善できる。この効果が生じる原理は、本発明における白と黒との論理を反転させることにより説明できる。また、注目画素の入力階調値が最大入力階調値である場合に設定する第2誤差拡散マトリックスは、重み値の合計値が1より小さい値となる構成であれば、周辺画素それぞれに対応付けられている重み値や、誤差の拡散範囲が第2誤差拡散マトリックス38とは異なる誤差拡散マトリックスであってもよい。   The second error diffusion matrix 38 may also be set when the input tone value of the target pixel is the maximum input tone value corresponding to the data with the highest density. At this time, the threshold value corresponding to the maximum input gradation value is set larger than the median value of the input gradation value range. Thereby, for example, the reproducibility of a fine line having a slightly lower density than black with a black background can be improved. The principle of this effect can be explained by inverting the logic of white and black in the present invention. Further, the second error diffusion matrix set when the input tone value of the target pixel is the maximum input tone value corresponds to each of the surrounding pixels as long as the total weight value is smaller than 1. An error diffusion matrix in which the attached weight value and the error diffusion range are different from those of the second error diffusion matrix 38 may be used.

上述のように、注目画素の入力階調値がゼロよりも大きく、かつ、比較的小さな階調値である場合においても、第2誤差拡散マトリックス38を用いることにより、注目画素で生じた誤差を周辺画素に拡散する際に、誤差の一部を拡散せずに棄却することができ、上記実施形態と同様の効果を奏する。   As described above, even when the input gradation value of the pixel of interest is larger than zero and has a relatively small gradation value, the error generated in the pixel of interest can be reduced by using the second error diffusion matrix 38. When diffusing to surrounding pixels, part of the error can be rejected without diffusing, and the same effect as in the above embodiment can be obtained.

B4.変形例4:
上記実施形態において、画像処理装置100の機能の少なくとも一部を印刷装置200が有していてもよい。また、画像処理装置100の機能のすべてを印刷装置200が有する構成、例えば、印刷装置200が画像処理装置100を備える構成であってもよい。これらの構成においても、実施形態と同様の効果を奏する。
B4. Modification 4:
In the above embodiment, the printing apparatus 200 may have at least part of the functions of the image processing apparatus 100. Further, the configuration in which the printing apparatus 200 has all the functions of the image processing apparatus 100, for example, the configuration in which the printing apparatus 200 includes the image processing apparatus 100 may be used. Also in these structures, there exists an effect similar to embodiment.

B5.変形例5:
上記実施形態では、印刷装置200は、4色のインク(シアン、マゼンタ、イエロー、ブラック)により印刷を行うインクジェットプリンターであったが、本発明はこれに限定されない。例えば、使用するインクの数は、上記と異なっていてもよい。具体的には、上述の4色のインクに加えて、ライトグレー、ライトシアン、ライトマゼンタの3色のインクを含む7色であってよい。これらの構成においても、上記実施形態と同様の効果を奏する。
B5. Modification 5:
In the above embodiment, the printing apparatus 200 is an ink jet printer that performs printing with four colors of ink (cyan, magenta, yellow, and black), but the present invention is not limited to this. For example, the number of inks used may be different from the above. Specifically, in addition to the above-described four colors of ink, there may be seven colors including three colors of light gray, light cyan, and light magenta. Also in these structures, there exists an effect similar to the said embodiment.

B6.変形例6:
上記実施形態では、「入力階調値がゼロである場合」を画像データの各インク色C、M、Y、Kの色成分ごとにそれぞれ判断していたが、本発明はこれに限定されない。例えば、画像データの各インク色C、M、Y、Kのすべての色成分の入力階調値がゼロである場合であってもよい。色成分ごとに入力階調値がゼロであるか否かをそれぞれ判断する場合は、すべての色成分の入力階調値がゼロであるとは限らないので、背景が白以外の場合でもインク色によっては、本発明のエッジ強調効果が発生する場合があったが、すべての色成分の入力階調値がゼロである場合に限定すれば、本発明のエッジ強調効果を背景が白の場合に限定できる。
B6. Modification 6:
In the above embodiment, “when the input gradation value is zero” is determined for each color component of each ink color C, M, Y, K of the image data, but the present invention is not limited to this. For example, the input gradation values of all the color components of the ink colors C, M, Y, and K of the image data may be zero. When determining whether or not the input tone value is zero for each color component, the input tone values for all color components are not necessarily zero, so the ink color can be used even when the background is other than white. In some cases, the edge enhancement effect of the present invention may occur. However, if the input tone values of all the color components are zero, the edge enhancement effect of the present invention is effective when the background is white. Can be limited.

また、インク色の入力階調値から成る画像データに変換する前のRGBから成る入力画像の画像データの段階で判断してもよい。この場合、R、G、Bの3つの色成分がすべて最大階調値の場合に、CMYKのすべての色成分の入力階調値がゼロとなることが予めわかっていれば、RGBから成る入力画像の画像データの段階でインク色の入力階調値から成る画像データの入力階調値がゼロとなると判断できる。   Alternatively, the determination may be made at the stage of image data of an input image composed of RGB before being converted into image data composed of input gradation values of ink colors. In this case, if it is known in advance that the input gradation values of all the CMYK color components are zero when all of the three color components R, G, and B have the maximum gradation value, the input composed of RGB is performed. It can be determined that the input gradation value of the image data including the input gradation value of the ink color becomes zero at the image data stage of the image.

このほかにも、必ずしもインク色の入力階調値から成る画像データの全インク色に本発明を適用する必要はない。例えば、K成分のみに本発明を適用してもよい。また、入力画像の画像データがモノクロデータで、それをKインクのみで出力する場合に本発明を適用してもよい。また、印刷装置200が、例えば、ライトグレー、ライトシアン、ライトマゼンタの3色の低濃度インクを含む7色のインクにより印刷を行う場合、本発明で強調したい低濃度の細線では、主に低濃度のインクが用いられることになるので、低濃度のインクに限定して本発明を適用してもよい。これらの構成においても、上記実施形態と同様の効果を奏する。   In addition to this, it is not always necessary to apply the present invention to all ink colors of image data composed of input gradation values of ink colors. For example, the present invention may be applied only to the K component. Further, the present invention may be applied when the image data of the input image is monochrome data and is output only with K ink. In addition, when the printing apparatus 200 performs printing with, for example, seven color inks including three low density inks of light gray, light cyan, and light magenta, the low density thin line that is to be emphasized in the present invention is mainly low density. Therefore, the present invention may be applied only to low-density ink. Also in these structures, there exists an effect similar to the said embodiment.

B7.変形例7:
上記実施形態では、入力階調値がゼロでない場合に注目画素において生じた誤差の一部を棄却していなかった、換言すると、入力階調値がゼロでない場合における誤差の棄却率はゼロであったが、本発明はこれに限定されない。例えば、入力階調値がゼロの場合の棄却率が、入力階調値がゼロでない場合における棄却率の最小値よりも大きくなるような構成であれば、入力階調値がゼロでない場合における棄却率はゼロに限らず、任意の値であってもよい。ここで、上述の「棄却率」とは、以下の値を意味する。すなわち、補正階調値と出力階調値との誤差のうち、棄却されずに周辺画素に拡散される誤差の値を「拡散誤差量」とし、補正階調値と出力階調値との誤差と、拡散誤差量と、の差を、「棄却誤差量」としたときに、棄却誤差量/(補正階調値と出力階調値との誤差)によって表される値を意味する。
B7. Modification 7:
In the above embodiment, a part of the error generated in the target pixel is not rejected when the input tone value is not zero. In other words, the error rejection rate when the input tone value is not zero is zero. However, the present invention is not limited to this. For example, if the rejection rate when the input tone value is zero is larger than the minimum rejection rate when the input tone value is not zero, the rejection rate when the input tone value is not zero. The rate is not limited to zero and may be any value. Here, the above-mentioned “rejection rate” means the following values. In other words, among the errors between the corrected gradation value and the output gradation value, the error value that is diffused to the surrounding pixels without being rejected is defined as the “diffuse error amount”, and the error between the corrected gradation value and the output gradation value And the difference between the diffusion error amount and the “rejection error amount” means a value represented by the rejection error amount / (error between the corrected gradation value and the output gradation value).

また、「入力階調値がゼロでない場合」としては、入力階調値が中間階調値範囲にある場合や、入力階調値がゼロ付近の場合(例えば、入力階調値が1から中間階調値範囲までの場合)等が挙げられる。本変形例において、「中間階調値」とは、注目画素の入力階調値の取り得る値(0〜255)に対して25%〜75%に相当する範囲の階調値(64〜192)である。以下、入力階調値がゼロの場合の棄却率が、入力階調値がゼロでない場合における棄却率の最小値よりも大きくなるような構成の一例を説明する。   In addition, as “when the input gradation value is not zero”, when the input gradation value is in the intermediate gradation value range or when the input gradation value is near zero (for example, the input gradation value is between 1 and intermediate) And the like up to the gradation value range). In this modification, the “intermediate gradation value” means a gradation value (64 to 192) in a range corresponding to 25% to 75% with respect to a value (0 to 255) that the input gradation value of the target pixel can take. ). Hereinafter, an example of a configuration in which the rejection rate when the input tone value is zero is larger than the minimum value of the rejection rate when the input tone value is not zero will be described.

上記実施形態において、入力階調値がゼロでない場合に各周辺画素に拡散すべき誤差は、注目画素で生じた誤差に対して、図5に示す、重み値の合計値が1である第1誤差拡散マトリックス37で対応づけられている各重み値を乗じて得られた値としていたが、さらにこの値に対して小数点第3位以下の値を切り捨てる。この小数点第3位以下の値を切り捨てる処理は、画質への影響を無視できる範囲で誤差拡散処理を簡略化して、ハーフトーン処理に要する時間を削減することを目的とした処理である。この小数点第3位以下の値を切り捨てる処理により、拡散すべき誤差、すなわち、注目画素で生じた誤差は、結果的にその一部が棄却されることとなる。なお、注目画素で生じた誤差が負数である場合には、小数点第3位以下の値を切り捨てる際に絶対値が小さくなるように切り捨て処理を行う。   In the above embodiment, when the input gradation value is not zero, the error to be diffused to each peripheral pixel is the first in which the total value of the weight values shown in FIG. Although the value obtained by multiplying each weight value associated with the error diffusion matrix 37 is obtained, the value below the third decimal point is further rounded down. The process of truncating the value after the third decimal place is a process aimed at simplifying the error diffusion process within a range in which the influence on the image quality can be ignored and reducing the time required for the halftone process. By the process of rounding down the values after the third decimal place, a part of the error to be diffused, that is, the error generated in the target pixel is eventually discarded. When the error generated in the pixel of interest is a negative number, the truncation process is performed so that the absolute value becomes smaller when the value after the third decimal place is rounded down.

このように少数点第3位以下を切り捨てることにより、棄却誤差量の絶対値は、最大でも1画素につき0.01未満となる。このため、第1誤差拡散マトリックス37を使用して合計10個の周辺画素に誤差を拡散した場合、10画素全体での棄却誤差量の絶対値は、0.1未満となる。ここで、棄却率は、上述のように棄却誤差量/(補正階調値と出力階調値との誤差)により得られるので、棄却率は、分母の値(補正階調値と出力階調値との誤差)に反比例する。また、分母の値は、補正階調値に応じて変動する。このため、棄却率は一定ではなく、注目画素ごとに変動する。そして、分母の値が1という非常に小さな値の場合でも、棄却率は、0.1=10%以下と期待されるので、通常の場合、棄却率は、その半分の5%程度と期待される。このため、棄却率の最小値は、通常の場合の5%よりもさらに小さな値である。   In this way, by truncating the third decimal place or less, the absolute value of the rejection error amount is less than 0.01 per pixel at the maximum. For this reason, when the error is diffused to a total of 10 peripheral pixels using the first error diffusion matrix 37, the absolute value of the amount of rejection error in the entire 10 pixels is less than 0.1. Here, since the rejection rate is obtained by the amount of rejection error / (error between the corrected gradation value and the output gradation value) as described above, the rejection rate is the denominator value (corrected gradation value and output gradation value). Inversely proportional to the value). Further, the value of the denominator varies according to the correction gradation value. For this reason, the rejection rate is not constant and varies for each pixel of interest. And even if the denominator value is a very small value of 1, the rejection rate is expected to be 0.1 = 10% or less, so in the normal case, the rejection rate is expected to be about 5%, half of that. The For this reason, the minimum value of the rejection rate is a value smaller than 5% in the normal case.

一方、図6に示す、入力階調値がゼロの場合に設定されている第2誤差拡散マトリックス38において、重み値の合計値は、15/16である。したがって、棄却率は、1/16、すなわち、6.25%となる。この棄却率は、上述した通常の場合の棄却率5%よりも大きいので、5%よりもさらに小さな棄却率の最小値よりも大きい。このように、上述した構成によれば、入力階調値がゼロの場合の棄却率が、入力階調値がゼロでない場合における棄却率の最小値よりも大きくできる。   On the other hand, in the second error diffusion matrix 38 set when the input gradation value is zero, as shown in FIG. 6, the total value of the weight values is 15/16. Therefore, the rejection rate is 1/16, that is, 6.25%. Since this rejection rate is larger than the rejection rate of 5% in the normal case described above, it is larger than the minimum value of the rejection rate smaller than 5%. Thus, according to the configuration described above, the rejection rate when the input tone value is zero can be made larger than the minimum value of the rejection rate when the input tone value is not zero.

なお、上述の構成においても、入力階調値が中間階調値範囲内の或る画素での棄却率が、6.25%よりも大きくなる場合もあり得る。しかし、この場合であっても、同じ入力階調値の他の画素を含めた棄却率の最小値が、6.25%よりも小さくなっているので、画像全体として見た場合には、実施形態と同様な効果を得ることができる。   Even in the above-described configuration, the rejection rate at a certain pixel whose input gradation value is within the intermediate gradation value range may be larger than 6.25%. However, even in this case, the minimum rejection rate including other pixels with the same input gradation value is smaller than 6.25%. The same effect as the form can be obtained.

以上説明した変形例7の構成によれば、入力階調値がゼロでない場合に誤差の棄却が発生していても、入力階調値がゼロの場合の棄却率を、入力階調値がゼロでない場合の棄却率の最小値よりも大きくすることにより、上記実施形態と同様の効果を奏する。   According to the configuration of the modified example 7 described above, even when an error is rejected when the input tone value is not zero, the rejection rate when the input tone value is zero is set to zero. By making it larger than the minimum value of the rejection rate when it is not, the same effect as the above-described embodiment is obtained.

B8.変形例8:
上記変形例7において、入力階調値がゼロ付近の棄却率は、入力階調値が中間階調値範囲にある場合における棄却率と同じであったが、本発明はこれに限定されない。例えば、入力階調値がゼロ付近(例えば、入力階調値が1〜3の範囲)の棄却率は、入力階調値が中間階調値範囲にある場合における棄却率と違ってもよいし、入力階調値がゼロの場合の棄却率と同じでもよい。このような構成にすれば、入力階調値がゼロの場合だけでなく、入力階調値がゼロ付近の場合にも、棄却率に応じたエッジ強調の効果を得ることが可能となる。
B8. Modification 8:
In the modification example 7, the rejection rate when the input gradation value is near zero is the same as the rejection rate when the input gradation value is in the intermediate gradation value range, but the present invention is not limited to this. For example, the rejection rate when the input gradation value is near zero (for example, the range where the input gradation value is 1 to 3) may be different from the rejection rate when the input gradation value is in the intermediate gradation value range. The rejection rate when the input gradation value is zero may be the same. With such a configuration, it is possible to obtain an edge enhancement effect according to the rejection rate not only when the input gradation value is zero but also when the input gradation value is near zero.

B9.変形例9:
上記実施形態において、入力階調値がゼロでない場合と入力階調値がゼロの場合とで、それぞれ異なる誤差拡散マトリックスが予め設定されていたが、本発明はこれに限定されない。例えば、入力階調値がゼロでない場合にも、入力階調値がゼロ付近などでは入力階調値がゼロの場合と同じ誤差拡散マトリックス(第2誤差拡散マトリックス38)が設定されていてもよい。すなわち一般には、入力階調値がゼロの場合に、重み値の合計値が1よりも小さい値が対応づけられた誤差拡散マトリックスが予め設定されている構成であれば、上記実施形態と同様の効果を奏する。
B9. Modification 9:
In the above embodiment, different error diffusion matrices are set in advance depending on whether the input gradation value is not zero or the input gradation value is zero, but the present invention is not limited to this. For example, even when the input tone value is not zero, the same error diffusion matrix (second error diffusion matrix 38) as when the input tone value is zero may be set when the input tone value is near zero. . That is, in general, when the input gradation value is zero, if an error diffusion matrix in which a total value of weight values is associated with a value smaller than 1 is preset, the same as in the above embodiment There is an effect.

B10.変形例10:
実施形態および変形例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。また、本発明の機能の一部または全部がソフトウェアで実現される場合には、そのソフトウェア(コンピュータープログラム)は、コンピューター読み取り可能な記録媒体に格納された形で提供することができる。この発明において、「コンピューター読み取り可能な記録媒体」とは、フレキシブルディスクやCD−ROMのような携帯型の記録媒体に限らず、各種のRAMやROM等のコンピューター内の内部記憶装置や、ハードディスク等のコンピューターに固定されている外部記憶装置も含んでいる。すなわち、「コンピューター読み取り可能な記録媒体」とは、データを一時的ではなく固定可能な任意の記録媒体を含む広い意味を有している。
B10. Modification 10:
In the embodiment and the modification, a part of the configuration realized by hardware may be replaced by software, and conversely, a part of the configuration realized by software may be replaced by hardware. Good. In addition, when part or all of the functions of the present invention are realized by software, the software (computer program) can be provided in a form stored in a computer-readable recording medium. In the present invention, the “computer-readable recording medium” is not limited to a portable recording medium such as a flexible disk or a CD-ROM, but an internal storage device in a computer such as various RAMs and ROMs, a hard disk, etc. It also includes an external storage device fixed to the computer. That is, the “computer-readable recording medium” has a broad meaning including an arbitrary recording medium in which data can be fixed instead of temporarily.

本発明は、上述の実施形態および変形例に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態、変形例中の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。   The present invention is not limited to the above-described embodiments and modifications, and can be realized with various configurations without departing from the spirit of the present invention. For example, the technical features in the embodiments and the modifications corresponding to the technical features in each embodiment described in the summary section of the invention are to solve some or all of the above-described problems, or In order to achieve part or all of the effects, replacement or combination can be performed as appropriate. Further, if the technical feature is not described as essential in the present specification, it can be deleted as appropriate.

20…アプリケーション、30…プリンタードライバー、31…解像度変換部、32…色変換部、33…ハーフトーン処理部、34…誤差算出部、35…印刷データ出力部、36…色変換テーブル、37…第1誤差拡散マトリックス、37a…第1誤差拡散マトリックス、37b…第1誤差拡散マトリックス、38…第2誤差拡散マトリックス、38a…第2誤差拡散マトリックス、38b…第2誤差拡散マトリックス、38c…第2誤差拡散マトリックス、40…メモリー、100…画像処理装置、200…印刷装置、P…印刷媒体     DESCRIPTION OF SYMBOLS 20 ... Application, 30 ... Printer driver, 31 ... Resolution conversion part, 32 ... Color conversion part, 33 ... Halftone processing part, 34 ... Error calculation part, 35 ... Print data output part, 36 ... Color conversion table, 37 ... 1st 1 error diffusion matrix, 37a ... first error diffusion matrix, 37b ... first error diffusion matrix, 38 ... second error diffusion matrix, 38a ... second error diffusion matrix, 38b ... second error diffusion matrix, 38c ... second error Diffusion matrix 40 ... Memory 100 ... Image processing device 200 ... Printing device P ... Print medium

Claims (6)

インク色の入力階調値から成る画像データから、印刷装置におけるドット形成の有無に対応する出力階調値から成るドットデータを生成する画像処理装置であって、
前記画像データを構成する複数画素を順番に注目画素として特定して、前記注目画素の前記入力階調値を補正した補正階調値と閾値とを用いて誤差拡散法によりドット形成の有無を決定するハーフトーン処理を実行するハーフトーン処理部を備え、
前記補正階調値は、前記ハーフトーン処理を実行済みの画素から前記注目画素に拡散された誤差を前記注目画素の前記入力階調値に加えて得られ、
前記ハーフトーン処理部は、前記補正階調値と、前記出力階調値と、の誤差を、前記注目画素の周辺の前記ハーフトーン処理を未実行の複数の周辺画素に拡散する際に、前記注目画素の前記入力階調値が少なくともゼロの場合には、前記誤差の一部を拡散せずに棄却し、
前記閾値は、前記注目画素の前記入力階調値に応じて定められており、
前記注目画素の前記入力階調値が予め定められた低階調値範囲に含まれている場合の前記閾値は、前記注目画素の前記入力階調値が取り得る階調値範囲の中央値よりも小さく、かつ、前記注目画素の前記入力階調値以上の値である、
画像処理装置。
An image processing apparatus that generates dot data composed of output gradation values corresponding to the presence or absence of dot formation in a printing apparatus from image data composed of input gradation values of ink colors,
A plurality of pixels constituting the image data are identified as target pixels in order, and the presence / absence of dot formation is determined by an error diffusion method using a corrected gradation value obtained by correcting the input gradation value of the target pixel and a threshold value. A halftone processing unit for executing halftone processing,
The corrected gradation value is obtained by adding an error diffused from the pixel on which the halftone process has been performed to the target pixel to the input gradation value of the target pixel,
The halftone processing unit, when diffusing the error between the corrected gradation value and the output gradation value to a plurality of peripheral pixels that have not been subjected to the halftone processing around the target pixel, If the input tone value of the pixel of interest is at least zero, reject part of the error without diffusing,
The threshold value is determined according to the input gradation value of the target pixel,
The threshold value when the input gradation value of the target pixel is included in a predetermined low gradation value range is a median value of the gradation value range that the input gradation value of the target pixel can take. Is smaller than the input gradation value of the target pixel,
Image processing device.
請求項1に記載の画像処理装置において、
前記補正階調値と前記出力階調値との誤差のうち、棄却されずに前記複数の周辺画素に拡散される誤差の値を、拡散誤差量とし、
前記補正階調値と前記出力階調値との誤差と、前記拡散誤差量と、の差を、棄却誤差量とし、
前記棄却誤差量/(前記補正階調値と前記出力階調値との誤差)を、棄却率としたときに、
前記注目画素の前記入力階調値がゼロの場合の前記棄却率は、前記注目画素の前記入力階調値が予め定められた中間階調値範囲における前記棄却率の最小値よりも大きい、
画像処理装置。
The image processing apparatus according to claim 1.
Of the error between the corrected gradation value and the output gradation value, the error value diffused to the plurality of surrounding pixels without being rejected is defined as a diffusion error amount.
The difference between the error of the corrected gradation value and the output gradation value and the diffusion error amount is a rejection error amount,
When the rejection error amount / (error between the corrected gradation value and the output gradation value) is a rejection rate,
The rejection rate when the input tone value of the pixel of interest is zero is greater than the minimum value of the rejection rate in the intermediate tone value range in which the input tone value of the pixel of interest is predetermined.
Image processing device.
請求項1または請求項2に記載の画像処理装置において、
前記注目画素の前記入力階調値が前記低階調値範囲に含まれている場合の前記閾値は、前記補正階調値と前記出力階調値との誤差の平均値がゼロとなるように設定された閾値の値以下の値である、
画像処理装置。
The image processing apparatus according to claim 1 or 2,
The threshold value when the input gradation value of the target pixel is included in the low gradation value range is such that an average value of errors between the correction gradation value and the output gradation value is zero. The value is less than or equal to the set threshold value.
Image processing device.
請求項1から請求項3までのいずれか一項に記載の画像処理装置において、
前記ハーフトーン処理部は、前記誤差を前記複数の周辺画素に拡散する際に、前記誤差に重み値を掛け合わせて得られる値を拡散し、
前記ハーフトーン処理部は、前記複数の周辺画素に対してそれぞれ前記重み値が対応づけられている誤差拡散マトリックスを参照して、前記誤差に対して前記重み値を乗じることにより、前記複数の周辺画素にそれぞれ拡散すべき誤差を算出する誤差算出部を有し、
前記注目画素の前記入力階調値がゼロの場合に予め設定されている前記誤差拡散マトリックスにおいて、前記重み値の合計値は、1よりも小さい値である、
画像処理装置。
In the image processing device according to any one of claims 1 to 3,
The halftone processing unit diffuses a value obtained by multiplying the error by a weight value when diffusing the error to the plurality of surrounding pixels.
The halftone processing unit refers to an error diffusion matrix in which the weight value is associated with each of the plurality of peripheral pixels, and multiplies the error by the weight value to thereby calculate the plurality of peripheral pixels. An error calculation unit that calculates an error to be diffused to each pixel;
In the error diffusion matrix set in advance when the input gradation value of the target pixel is zero, the total value of the weight values is a value smaller than 1.
Image processing device.
インク色の入力階調値から成る画像データから、印刷装置におけるドット形成の有無に対応する出力階調値から成るドットデータを生成する画像処理方法であって、
(a)前記画像データを構成する複数画素を順番に注目画素として特定して、前記注目画素の前記入力階調値を補正した補正階調値と前記注目画素の前記入力階調値に応じて定められた閾値とを用いて誤差拡散法によりドット形成の有無を決定するハーフトーン処理を実行するハーフトーン処理工程を備え、
前記注目画素の前記入力階調値が予め定められた低階調値範囲に含まれている場合の前記閾値は、前記注目画素の前記入力階調値が取り得る階調値範囲の中央値よりも小さく、かつ、前記注目画素の前記入力階調値以上の値に設定されており、
前記工程(a)は、
(a1)前記ハーフトーン処理を実行済みの画素から前記注目画素に拡散された誤差を前記注目画素の前記入力階調値に加えることにより前記補正階調値を得る工程と、
(a2)前記補正階調値と、前記出力階調値と、の誤差を、前記注目画素の周辺の前記ハーフトーン処理を未実行の複数の周辺画素に拡散する際に、前記注目画素の前記入力階調値が少なくともゼロの場合には、前記誤差の一部を拡散せずに棄却する工程と、
を含む、
画像処理方法。
An image processing method for generating dot data composed of output gradation values corresponding to the presence or absence of dot formation in a printing apparatus from image data composed of input gradation values of ink colors,
(A) A plurality of pixels constituting the image data are identified as target pixels in order, and the corrected gradation value obtained by correcting the input gradation value of the target pixel and the input gradation value of the target pixel A halftone processing step for executing halftone processing for determining the presence or absence of dot formation by an error diffusion method using a predetermined threshold value,
The threshold value when the input gradation value of the target pixel is included in a predetermined low gradation value range is a median value of the gradation value range that the input gradation value of the target pixel can take. And is set to a value equal to or greater than the input gradation value of the target pixel,
The step (a)
(A1) obtaining the corrected gradation value by adding an error diffused from the pixel on which the halftone processing has been performed to the target pixel to the input gradation value of the target pixel;
(A2) When diffusing an error between the corrected gradation value and the output gradation value to a plurality of peripheral pixels that have not been subjected to the halftone processing around the target pixel, the error of the target pixel If the input tone value is at least zero, rejecting part of the error without diffusing;
including,
Image processing method.
インク色の入力階調値から成る画像データから、印刷装置におけるドット形成の有無に対応する出力階調値から成るドットデータを生成する画像処理を実現するためのコンピュータープログラムであって、
前記画像データを構成する複数画素を順番に注目画素として特定して、前記注目画素の前記入力階調値を補正した補正階調値と前記注目画素の前記入力階調値に応じて定められた閾値とを用いて誤差拡散法によりドット形成の有無を決定するハーフトーン処理を実行するハーフトーン機能をコンピューターに実現させ、
前記注目画素の前記入力階調値が予め定められた低階調値範囲に含まれている場合の前記閾値は、前記注目画素の前記入力階調値が取り得る階調値範囲の中央値よりも小さく、かつ、前記注目画素の前記入力階調値以上の値に設定されており、
前記ハーフトーン機能は、
前記ハーフトーン処理を実行済みの画素から前記注目画素に拡散された誤差を前記注目画素の前記入力階調値に加えることにより前記補正階調値を得る機能と、
前記補正階調値と、前記出力階調値と、の誤差を、前記注目画素の周辺の前記ハーフトーン処理を未実行の複数の周辺画素に拡散する際に、前記注目画素の前記入力階調値が少なくともゼロの場合には、前記誤差の一部を拡散せずに棄却する機能と、
を含む、
プログラム。
A computer program for realizing image processing for generating dot data composed of output gradation values corresponding to the presence or absence of dot formation in a printing apparatus from image data composed of input gradation values of ink colors,
A plurality of pixels constituting the image data are identified as target pixels in order, and are determined according to a corrected gradation value obtained by correcting the input gradation value of the target pixel and the input gradation value of the target pixel. The computer realizes a halftone function that executes halftone processing that determines the presence or absence of dot formation by the error diffusion method using a threshold value,
The threshold value when the input gradation value of the target pixel is included in a predetermined low gradation value range is a median value of the gradation value range that the input gradation value of the target pixel can take. And is set to a value equal to or greater than the input gradation value of the target pixel,
The halftone function is
A function of obtaining the corrected gradation value by adding an error diffused from the pixel on which the halftone processing has been performed to the target pixel to the input gradation value of the target pixel;
When the error between the corrected gradation value and the output gradation value is diffused to a plurality of peripheral pixels that have not been subjected to the halftone processing around the target pixel, the input gradation of the target pixel If the value is at least zero, a function to reject part of the error without diffusing;
including,
program.
JP2016191464A 2016-09-29 2016-09-29 Image processing equipment, image processing methods, and computer programs Active JP6759938B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016191464A JP6759938B2 (en) 2016-09-29 2016-09-29 Image processing equipment, image processing methods, and computer programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016191464A JP6759938B2 (en) 2016-09-29 2016-09-29 Image processing equipment, image processing methods, and computer programs

Publications (3)

Publication Number Publication Date
JP2018056832A true JP2018056832A (en) 2018-04-05
JP2018056832A5 JP2018056832A5 (en) 2019-08-22
JP6759938B2 JP6759938B2 (en) 2020-09-23

Family

ID=61837209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016191464A Active JP6759938B2 (en) 2016-09-29 2016-09-29 Image processing equipment, image processing methods, and computer programs

Country Status (1)

Country Link
JP (1) JP6759938B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07111591A (en) * 1993-06-24 1995-04-25 Seiko Epson Corp Image processing device
JPH08307680A (en) * 1995-05-12 1996-11-22 Seiko Epson Corp Image processing unit
JP2006005901A (en) * 2004-05-18 2006-01-05 Sharp Corp Image processing device, image forming device, image processing method, program, and storage medium
JP2007006271A (en) * 2005-06-24 2007-01-11 Seiko Epson Corp Image processing apparatus for binarization process, and image processing program
JP2015167306A (en) * 2014-03-04 2015-09-24 セイコーエプソン株式会社 Printer, printing data generation device and method therefor, and printing data generation program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07111591A (en) * 1993-06-24 1995-04-25 Seiko Epson Corp Image processing device
JPH08307680A (en) * 1995-05-12 1996-11-22 Seiko Epson Corp Image processing unit
JP2006005901A (en) * 2004-05-18 2006-01-05 Sharp Corp Image processing device, image forming device, image processing method, program, and storage medium
JP2007006271A (en) * 2005-06-24 2007-01-11 Seiko Epson Corp Image processing apparatus for binarization process, and image processing program
JP2015167306A (en) * 2014-03-04 2015-09-24 セイコーエプソン株式会社 Printer, printing data generation device and method therefor, and printing data generation program

Also Published As

Publication number Publication date
JP6759938B2 (en) 2020-09-23

Similar Documents

Publication Publication Date Title
US7554697B2 (en) Image forming apparatus, image forming method, and image forming program
US8363251B2 (en) Image forming apparatus, print data generation method and computer program for forming an image with halftone processing that uses constraint data
US8094954B2 (en) Image processing apparatus, image processing method and image processing program that performs a level conversion on multilevel input image data
US20060098045A1 (en) Image forming apparatus, image forming method and image forming program
CN110012193B (en) Image processing apparatus and control method thereof
US8724174B2 (en) Image processing apparatus, image forming apparatus, image processing method, and computer-readable medium
JP6252003B2 (en) Printing apparatus, printing method, image processing apparatus, and program
JP2011259121A (en) Image processing apparatus and program
US9147140B2 (en) Image processing apparatus, method, and product for converting image data into fewer gradations based on total value of pixels in a group except for a detected pixel having a specific value
JP2014236460A (en) Printing device, printing method, program, and image processing device
US20220358777A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium storing program
US8941880B2 (en) Image processing apparatus, image processing method, and program
JP6759938B2 (en) Image processing equipment, image processing methods, and computer programs
JP2005252710A (en) Image processing apparatus, image processing method, and image processing program
JP2006211351A (en) Image processing method, and image processor
US11084299B2 (en) Printing system, image processing apparatus, and print method
JP2013059938A (en) Apparatus, method and program for processing image
JP5871760B2 (en) Image processing apparatus, printing apparatus, image processing method, and program
JP2005053147A (en) Edge processing for inkjet printing
JP2005252911A (en) Image processing method and image processor
JP2015051610A (en) Image forming apparatus and image processing method in image forming apparatus
US20240037895A1 (en) Storage medium, image processing apparatus, and image processing method
JP2014176982A (en) Image processing device, image forming apparatus, image processing method, and program
US10389910B2 (en) Image processing apparatus, image processing method, and storage medium
JP2009135637A (en) Image processor, image processing method and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190710

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200519

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200714

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200817

R150 Certificate of patent or registration of utility model

Ref document number: 6759938

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150