JP2015167307A - Printer, printing data generation device and method therefor, and printing data generation program - Google Patents

Printer, printing data generation device and method therefor, and printing data generation program Download PDF

Info

Publication number
JP2015167307A
JP2015167307A JP2014041098A JP2014041098A JP2015167307A JP 2015167307 A JP2015167307 A JP 2015167307A JP 2014041098 A JP2014041098 A JP 2014041098A JP 2014041098 A JP2014041098 A JP 2014041098A JP 2015167307 A JP2015167307 A JP 2015167307A
Authority
JP
Japan
Prior art keywords
data
value
threshold value
error diffusion
threshold
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
JP2014041098A
Other languages
Japanese (ja)
Other versions
JP2015167307A5 (en
JP6221838B2 (en
Inventor
明生 山▲崎▼
Akio Yamazaki
明生 山▲崎▼
角谷 繁明
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 JP2014041098A priority Critical patent/JP6221838B2/en
Publication of JP2015167307A publication Critical patent/JP2015167307A/en
Publication of JP2015167307A5 publication Critical patent/JP2015167307A5/ja
Application granted granted Critical
Publication of JP6221838B2 publication Critical patent/JP6221838B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To achieve printing of high quality by suppressing a singular dot pattern from being generated in image processing employing both a dither method and an error diffusion method in combination.SOLUTION: A data gradation value as a gradation value of input image is compared with one of a plurality of thresholds and when the data gradation value is equal to or larger than the threshold, a threshold for error diffusion method as a threshold used to determine whether dots are formed by an error diffusion method is set to a low threshold smaller than a high threshold set when the data gradation value is less than the threshold. The threshold for error diffusion method which is thus set is used to generate dot data representing whether dots are formed by the error diffusion method. At this time, a low threshold is determined according to the data gradation value, and has a downward convex singular part within a predetermined gradation range. Consequently, a singular dot pattern is prevented from being generated within the specific gradation range.

Description

本発明は、画像データを用いて印刷する技術および印刷用データを生成する技術に関する。   The present invention relates to a technique for printing using image data and a technique for generating printing data.

多階調の画像データを、階調数の少ないドットデータにより印刷するハーフトーン処理としては、階調数変換をした場合の濃度誤差を周辺の画素に配分する誤差拡散法や、分散性のよい閾値配置がなされたディザマスクを用いてドットデータを生成する組織的ディザ法などが知られている。ブルーノイズ特性を付与されたディザマスクを用いたり、ベイヤー型ディザマスクを用いたりする場合、ドット配置の分散性は良好なものとなり、階調変化が比較的小さいデータが2次元的な広がりを持っている画像の再現性に優れる。また、こうした組織的ディザ法は、ディザマスクにおける閾値の配置に特定の特性を与えることで、ドットの形成を制御できるという利点がある。   For halftone processing that prints multi-tone image data using dot data with a small number of gradations, an error diffusion method that distributes density errors to the surrounding pixels when the number of gradations is converted, and good dispersibility A systematic dither method for generating dot data using a dither mask with a threshold arrangement is known. When using a dither mask with blue noise characteristics or a Bayer-type dither mask, the dispersibility of the dot arrangement is good, and data with relatively small gradation changes has a two-dimensional spread. Excellent image reproducibility. In addition, such a systematic dither method has an advantage that dot formation can be controlled by giving a specific characteristic to the arrangement of threshold values in the dither mask.

例えば、下記特許文献1に示す手法は、双方向印字を行なう場合の往動時のドット形成の判断に用いるディザマスクと、復動時のドット形成の判断に用いるディザマスクとを独立に作成する。それぞれのディザマスクにブルーノイズ特性を付与することで、双方印字位置のドット形成位置のズレに対して画質低下の少ない印刷を可能としている。   For example, the technique disclosed in Patent Document 1 below independently creates a dither mask used for determination of dot formation at the time of forward movement when performing bidirectional printing and a dither mask used for determination of dot formation at the time of backward movement. . By imparting a blue noise characteristic to each dither mask, it is possible to perform printing with little image quality deterioration with respect to the deviation of the dot formation position between the two printing positions.

こうしたディザ法と誤差拡散法との利点を共に生かす技術を、出願人は、提案している(下記特許文献2参照)。この技術では、着目している画素の階調値をまずディザマスクを構成する閾値と比較し、その比較結果によって、誤差拡散法に用いる閾値を異ならせ、かつその閾値を着目画素の階調値により変化させる。   The applicant has proposed a technique that takes advantage of both the dither method and the error diffusion method (see Patent Document 2 below). In this technique, the tone value of the pixel of interest is first compared with the threshold value constituting the dither mask, the threshold value used in the error diffusion method is made different depending on the comparison result, and the threshold value is set to the tone value of the pixel of interest. To change.

特開2007−15359号公報JP 2007-15359 A 特開2011ー66594号公報JP 2011-66594 A 特許第3360391公報Japanese Patent No. 3360391

かかる手法は、生成させるドットデータに、誤差拡散法とディザ法のそれぞれの特長が反映される度合いを、コントロールすることができる優れたものであり、その応用範囲は広い。出願人は、この手法を更に改良し、階調値によらず、特異なテクスチャが生じることがなく、印刷された画像の品質を一層高めることができた。本発明の手法を用いれば、画像データの特定の階調値で、誤差拡散法の影響による特異なテクスチャの発生という課題を解決することができる。また、従来の画像処理や印刷においては、装置の小型化や、低コスト化、省資源化、製造の容易化、使い勝手の向上等が望まれてもいた。   This method is excellent in that it can control the degree to which the characteristics of the error diffusion method and the dither method are reflected in the dot data to be generated, and its application range is wide. The applicant has further improved this method, and it has been possible to further improve the quality of the printed image without generating a unique texture regardless of the gradation value. By using the method of the present invention, it is possible to solve the problem of generation of a specific texture due to the influence of the error diffusion method at a specific gradation value of image data. Further, in conventional image processing and printing, it has been desired to reduce the size of the apparatus, to reduce the cost, to save resources, to facilitate manufacturing, and to improve usability.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態として実現することが可能である。   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つと、前記入力された画像データの階調値であるデータ階調値とを比較する比較部と、前記データ階調値を、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値と比較することにより、前記ドットデータを生成する誤差拡散部とを備えて良い。ここで、誤差拡散法用閾値は、前記比較部の比較結果が、前記データ階調値が前記閾値以上の場合には、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定される。前記低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有してよい。 (1) As one embodiment of the present invention, a printing apparatus that prints image data representing a predetermined image is provided. The printing apparatus uses an input unit that inputs the image data, a halftone processing unit that generates dot data indicating the presence or absence of dot formation based on the image data, and the generated dot data. A printing unit that prints the image. The halftone processing unit compares one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data, and the data gradation value is converted into a dot in the error diffusion method. An error diffusion unit that generates the dot data by comparing with an error diffusion threshold value that is a threshold value used for determining the presence or absence of formation may be provided. Here, the threshold value for error diffusion method is a high threshold value set when the comparison result of the comparison unit is less than the threshold value when the data tone value is greater than or equal to the threshold value. Set to a lower low threshold. The lower threshold value may be determined according to the data gradation value, and may have a singular part protruding downward in a predetermined gradation range.

この印刷装置では、低位閾値を、前記データ階調値に応じて定め、かつ所定の階調範囲で下に凸の特異部を有するものとすることにより、誤差拡散法により特定の階調で特異なテクスチャが発生することを抑制できる。   In this printing apparatus, the low threshold value is determined according to the data gradation value, and has a singular part that protrudes downward in a predetermined gradation range, so that it is singular at a specific gradation by the error diffusion method. Generation of textures can be suppressed.

(2)こうした印刷装置において、前記高位閾値を、前記データ階調値に応じて定め、かつ前記所定の階調範囲で上に凸の特異部を有するものとしてよい。こうすれば、特異なテクスチャの発生を更に抑制することができる。 (2) In such a printing apparatus, the high threshold value may be determined according to the data gradation value, and may have a singular part that protrudes upward in the predetermined gradation range. In this way, the generation of unique texture can be further suppressed.

(3)前記複数の閾値は、組織的ディザ法に用いるディザマスクとして用意されてよい。こうすれば、ディザ法による影響を強めた場合に、組織的ディザ法よるドットデータの生成に近い特性のドットデータを得ることができる。 (3) The plurality of threshold values may be prepared as a dither mask used for a systematic dither method. In this way, when the influence of the dither method is strengthened, it is possible to obtain dot data having characteristics close to the generation of dot data by the systematic dither method.

(4)前記ディザマスクは、ブルーノイズ特性を有するものとしてよい。こうすれば、ディザ法による影響の下で生成されるドットデータにブルーノイズ特性に近い特性を付与することができる。 (4) The dither mask may have a blue noise characteristic. In this way, it is possible to give a characteristic close to the blue noise characteristic to the dot data generated under the influence of the dither method.

(5)前記低位閾値は、前記データ階調値が、予め定めた値以下では、前記データ階調値の最小値未満の値に設定されてよい。こうすれば、低位閾値を用いて誤差拡散法によるドット形成の有無を判断すると、必ずドットが形成されることになり、ドットデータの特性をディザ法による特性に一致させることができる。 (5) The lower threshold value may be set to a value less than the minimum value of the data gradation value when the data gradation value is equal to or less than a predetermined value. In this way, when the presence or absence of dot formation by the error diffusion method is determined using the lower threshold value, dots are always formed, and the characteristics of the dot data can be matched with the characteristics by the dither method.

(6)前記ハーフトーン処理部は、前記データ階調値が、前記所定の値を含む所定の範囲において、前記データ階調値が前記閾値以上の場合には、前記誤差拡散部による処理に代えて、前記比較部の比較結果に基づいて、前記ドットデータを生成するものとして良い。こうすれば、誤差拡散処理の一部を省略でき、処理の負担を軽減することができる。 (6) When the data tone value is equal to or greater than the threshold value in the predetermined range including the predetermined value, the halftone processing unit replaces the processing by the error diffusion unit. The dot data may be generated based on the comparison result of the comparison unit. In this way, part of the error diffusion process can be omitted, and the processing burden can be reduced.

(7)前記特異部は、前記データ階調値の最大階調数に対して整数比の関係となる階調値を少なくとも1つ含むものとしてよい。誤差拡散法による特異なテクスチャは、データ階調値の最大階調数に対して整数比の関係となる階調値の付近で生じやすいことが知られているからである。 (7) The singular part may include at least one gradation value having an integer ratio with respect to the maximum number of gradations of the data gradation value. This is because it is known that a peculiar texture by the error diffusion method is likely to occur in the vicinity of a gradation value having a relation of an integer ratio with respect to the maximum gradation number of the data gradation value.

(8)本発明は、所定の画像を表す画像データの印刷用データを生成する印刷用データ生成装置として実施することができる。かかる印刷用データ生成装置は、前記画像データを入力する入力部と、前記画像データに基づいて、ドットの形成の有無を表すドットデータを生成するハーフトーン処理部と、を備えて良い。前記ハーフトーン処理部は、複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較する比較部と、前記データ階調値を、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値と比較することにより、前記ドットデータを生成する誤差拡散部とを備えて良い。前記誤差拡散法用閾値は、前記比較部の比較結果が、前記データ階調値が前記閾値以上の場合には、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定されて良い。低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有してよい。 (8) The present invention can be implemented as a print data generation device that generates print data for image data representing a predetermined image. Such a printing data generation apparatus may include an input unit that inputs the image data, and a halftone processing unit that generates dot data representing the presence or absence of dot formation based on the image data. The halftone processing unit compares one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data, and the data gradation value is converted into a dot in the error diffusion method. An error diffusion unit that generates the dot data by comparing with an error diffusion threshold value that is a threshold value used for determining the presence or absence of formation may be provided. The threshold value for error diffusion method is smaller than a high threshold value set when the data gradation value is less than the threshold value when the comparison result of the comparison unit is greater than or equal to the threshold value. It may be set to a low threshold. The low threshold value may be determined according to the data gradation value, and may have a singular part protruding downward in a predetermined gradation range.

かかる印刷用データ生成装置では、低位閾値を、前記データ階調値に応じて定め、かつ所定の階調範囲で下に凸の特異部を有するものとすることにより、誤差拡散法により特定の階調で特異なテクスチャが発生することを抑制するデータを生成することができる。   In such a printing data generation apparatus, a low threshold is determined according to the data gradation value, and has a singular portion that protrudes downward in a predetermined gradation range. It is possible to generate data that suppresses the occurrence of a unique texture in the tone.

(9)本発明は、この他、方法やプログラムとしても実施可能である。例えば、所定の画像を表す画像データの印刷用データを生成する方法としても実施できる。この方法は、前記画像データを入力し、複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較し、前記比較により、前記データ階調値が前記閾値未満の場合には、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値を、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定し、該設定した前記誤差拡散法用閾値を用いて、前記誤差拡散法により、前記ドット形成の有無を表すドットデータを生成して良い。ここで、低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有するものとしてよい。かかる印刷用データの生成方法によっても、前述の印刷装置と同様の作用効果を奏することができる。 (9) The present invention can also be implemented as a method or a program. For example, it can be implemented as a method for generating print data of image data representing a predetermined image. In this method, the image data is input, one of a plurality of threshold values is compared with a data gradation value that is a gradation value of the input image data, and the data gradation value is determined by the comparison. If the threshold value is less than the threshold value, an error diffusion method threshold value, which is a threshold value used to determine whether or not to form dots in the error diffusion method, A threshold value may be set, and dot data representing the presence or absence of the dot formation may be generated by the error diffusion method using the set threshold value for the error diffusion method. Here, the lower threshold value may be determined according to the data gradation value, and may have a singular part that protrudes downward in a predetermined gradation range. Also by this printing data generation method, the same operational effects as those of the printing apparatus described above can be obtained.

(10)また、所定の画像を表す画像データの印刷用データを生成するための印刷用データ生成プログラムとして実施することもできる。このプログラムは、前記画像データを入力する機能と、複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較する機能と、前記比較により、前記データ階調値が前記閾値以上の場合には、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値を、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定する機能と、該設定した前記誤差拡散法用閾値を用いて、前記誤差拡散法により、前記ドットの形成の有無を表すドットデータを生成する機能と、をコンピューターに実現させて良い。ここで、低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有するものとしてよい。かかるプログラムをコンピュータに実行させた場合、上記方法と同様の作用効果を得ることができる。 (10) The present invention can also be implemented as a print data generation program for generating print data of image data representing a predetermined image. The program includes a function for inputting the image data, a function for comparing one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data, and the data scale by the comparison. When the tone value is equal to or greater than the threshold value, an error diffusion method threshold value, which is a threshold value used to determine whether or not dots are formed in the error diffusion method, is set to a high level set when the data tone value is less than the threshold value. A function for setting a lower threshold value smaller than a threshold value and a function for generating dot data indicating the presence or absence of dot formation by the error diffusion method using the set error diffusion method threshold value are realized in a computer. You can let it. Here, the lower threshold value may be determined according to the data gradation value, and may have a singular part that protrudes downward in a predetermined gradation range. When such a program is executed by a computer, the same effects as the above method can be obtained.

本発明は、印刷装置や画像データ生成装置以外の種々の形態で実現することも可能である。例えば、印刷装置の製造方法や印刷装置の制御方法、その制御方法を実現するコンピュータプログラム、そのコンピュータプログラムを記録した一時的でない記録媒体等の形態で実現することができる。   The present invention can also be realized in various forms other than the printing apparatus and the image data generation apparatus. For example, the present invention can be realized in the form of a printing apparatus manufacturing method, a printing apparatus control method, a computer program for realizing the control method, a non-temporary recording medium on which the computer program is recorded, and the like.

実施例の画像処理装置を示す概略構成図。1 is a schematic configuration diagram illustrating an image processing apparatus according to an embodiment. プリンター20における印刷処理の流れを示すフローチャート。4 is a flowchart showing a flow of printing processing in the printer 20. 第1実施形態におけるハーフトーン処理を例示するフローチャート。6 is a flowchart illustrating halftone processing according to the first embodiment. 実施態様で用いるディザマスク61を例示する説明図。Explanatory drawing which illustrates the dither mask 61 used in the embodiment. 実施態様で用いるディザマスク61が備えるノイズ特性を例示する説明図。Explanatory drawing which illustrates the noise characteristic with which the dither mask 61 used in the embodiment is provided. 第1実施形態における高域側閾値THe_Hおよび低域側閾値THe_Lと注目画素データDnとの関係を示すグラフ。The graph which shows the relationship between high frequency side threshold value THe_H and low frequency side threshold value THe_L in 1st Embodiment, and attention pixel data Dn. 誤差拡散範囲と重み付けを例示する説明図。Explanatory drawing which illustrates error diffusion range and weighting. 第1実施形態により生成されたドットデータの粒状性を示すグラフ。The graph which shows the granularity of the dot data produced | generated by 1st Embodiment. 比較例における高位閾値THe_と低位閾値THe_Lの一例を示すグラフ。The graph which shows an example of the high threshold value THe_ and the low threshold value THe_L in a comparative example. 比較例におけるドットデータの粒状性を示すグラフ。The graph which shows the granularity of the dot data in a comparative example. 第2実施形態におけるハーフトーン処理を例示するフローチャート。9 is a flowchart illustrating halftone processing according to the second embodiment.

A.第1実施形態:
本発明の第1実施形態について説明する。
A−1.装置構成:
図1は、本発明の印刷装置の第1実施形態としてのプリンター20の概略構成図である。プリンター20は、いわゆるラインプリンターであり、後述する4色のインクを用いるインクジェットプリンターである。図示するように、プリンター20は、紙送りモータ74によって紙送りローラ75を駆動して印刷媒体Pを搬送する機構と、印刷媒体Pに対向する位置に設けられた印刷ヘッド90を駆動してインクの吐出及びドット形成を行なう機構と、を備える。更にプリンター20は、これらの紙送りモータ74、印刷ヘッド90及び操作パネル99との間で、信号のやり取りを司る制御ユニット30を備える。本実施形態では、紙送りローラ75は、プラテンを兼ねているが、プラテンは紙送りローラと別体としても良い。この場合には、表面が平らな平プラテンとしても良い。また、紙送りローラ75は、印刷ヘッド90の上流・下流にそれぞれ設けても良い。
A. First embodiment:
A first embodiment of the present invention will be described.
A-1. Device configuration:
FIG. 1 is a schematic configuration diagram of a printer 20 as a first embodiment of a printing apparatus according to the present invention. The printer 20 is a so-called line printer, and is an ink jet printer that uses four color inks described later. As shown in the figure, the printer 20 drives a paper feed roller 75 by a paper feed motor 74 and conveys the print medium P, and a print head 90 provided at a position facing the print medium P to drive ink. And a mechanism for performing dot formation and dot formation. Further, the printer 20 includes a control unit 30 that controls exchange of signals with the paper feed motor 74, the print head 90, and the operation panel 99. In this embodiment, the paper feed roller 75 also serves as a platen, but the platen may be separated from the paper feed roller. In this case, a flat platen with a flat surface may be used. Further, the paper feed roller 75 may be provided upstream and downstream of the print head 90, respectively.

印刷ヘッド90には、カラーインクとして、シアンインクC、マゼンタインクM、イエロインクY、ブラックインクKを吐出可能な多数のノズルNzが、印刷媒体Pの幅方向に亘っても受けられている。これら複数のノズルの1つ1つには、アクチュエータとしての図示しないピエゾ素子が設けられている。ピエゾ素子は、ドットデータに対応したデータ信号DDと、駆動信号DSとにより、駆動される。なお、ノズルNzからのインクを吐出させるアクチュエータとしては、ピエゾ素子に限らず、インクの突沸を利用して吐出を行なうヒータタイプのものや、レーザを用いたものなど、種々の構成を採用することができる。もとより、インクドットの形成は、インクジェットに限らず、インクリボンを用いた熱転写や熱昇華型、感光ドラムに潜像を形成する方式、あるいは印刷用のヘッドを印刷媒体の幅方向に往復動させつつノズルからインクを吐出するシリアルプリンターなど、種々の方式を採用可能である。   The print head 90 also receives a number of nozzles Nz capable of ejecting cyan ink C, magenta ink M, yellow ink Y, and black ink K as color inks across the width of the print medium P. Each of the plurality of nozzles is provided with a piezoelectric element (not shown) as an actuator. The piezo element is driven by a data signal DD corresponding to dot data and a drive signal DS. The actuator that ejects ink from the nozzle Nz is not limited to a piezo element, and various configurations such as a heater type that ejects ink by using the bumping of ink, and those that use a laser are adopted. Can do. Of course, the formation of ink dots is not limited to ink-jet, but thermal transfer or thermal sublimation using an ink ribbon, a method of forming a latent image on a photosensitive drum, or a print head while reciprocating in the width direction of a print medium. Various systems such as a serial printer that ejects ink from nozzles can be employed.

この印刷ヘッド90には、各色インクをそれぞれ収容したカラーインク用のインクカートリッジ82〜85から、インクの供給管92ないし95を介して、各色インクが供給される。なお、インク色としては、上述したCMYKに加えて、ライトシアンインクLc、ライトマゼンタインクLmなどを用いるものとしてもよい。もとより赤、青、緑などの特色インクを用いることや、ゴールド、パールホワイト、などのいわゆるメタリックインクを用いるものとしても良い。更には、白黒印刷用のインクシステムを備えたもののであっても良い。   Each color ink is supplied to the print head 90 from the ink cartridges 82 to 85 for the color inks containing the respective color inks via ink supply pipes 92 to 95. As the ink color, in addition to the above-described CMYK, light cyan ink Lc, light magenta ink Lm, or the like may be used. Of course, special color inks such as red, blue, and green, or so-called metallic inks such as gold and pearl white may be used. Further, it may be provided with an ink system for monochrome printing.

制御ユニット30は、CPU40や、ROM51、RAM52、EEPROM60を備え、これらがバスで相互に接続された構成を備える。制御ユニット30は、ROM51やEEPROM60に記憶されたプログラムをRAM52に展開し、実行することにより、プリンター20の動作全般を制御するほか、入力部41、ハーフトーン処理部42、印刷部46としても機能する。ハーフトーン処理部42の機能は、比較部43、誤差拡散部44としての機能を含んでいる。   The control unit 30 includes a CPU 40, a ROM 51, a RAM 52, and an EEPROM 60, and these are connected to each other via a bus. The control unit 30 develops a program stored in the ROM 51 or the EEPROM 60 in the RAM 52 and executes it to control the overall operation of the printer 20, and also functions as the input unit 41, halftone processing unit 42, and printing unit 46. To do. The functions of the halftone processing unit 42 include functions as a comparison unit 43 and an error diffusion unit 44.

印刷部46は、印刷ヘッド90を駆動するための回路であり、ドットデータに対応した信号DDと、複数のピエゾ素子を一度に駆動するための駆動信号DSとを、印刷ヘッド90に出力する。ピエゾ素子は、CMYKの色毎にグループ化されており、図示しないラッチに保持されるドットデータに対応する信号DDと、所定のタイミングで出力される駆動信号DSとにより、グループ毎に駆動される。信号DDがオン(ドットデータが値1)の場合に、駆動信号DSが与えられると、ピエゾ素子は伸長し、図示しないインク室内のインクを加圧して、ノズルNzからインク滴を吐出させるのである。なお、本実施形態のプリンター20では、ラインプリンターであることから、各色ノズルは、印刷媒体Pの送り方向に所定ピッチずつずれて配置されている。また、同色のインク用のノズルも、印刷媒体幅方向の解像度を高くするために、一つおきに印刷媒体送り方向にずれた、いわゆる千鳥配列とされている。したがって、印刷媒体Pの送り方向における同じ位置にドットを形成する場合のノズルの駆動タイミングは、それぞれ異なっている。このため、後述するように、形成しようとする画像の階調データを処理して得られたドットデータを、ノズル配置に合わせたものとする並び替え処理を行なっている。こうした印刷部の処理を含む各機能部の処理の詳細については、図2、図3のフローチャートを参照して、後述する。   The printing unit 46 is a circuit for driving the print head 90, and outputs a signal DD corresponding to dot data and a drive signal DS for driving a plurality of piezo elements at a time to the print head 90. Piezo elements are grouped for each color of CMYK, and are driven for each group by a signal DD corresponding to dot data held in a latch (not shown) and a drive signal DS output at a predetermined timing. . When the signal DD is on (dot data is 1) and the drive signal DS is given, the piezo element expands, pressurizes ink in an ink chamber (not shown), and ejects ink droplets from the nozzle Nz. . Since the printer 20 of the present embodiment is a line printer, the color nozzles are arranged with a predetermined pitch shifted in the feeding direction of the print medium P. In addition, the nozzles for the same color ink are also arranged in a so-called staggered arrangement in which every other nozzle is displaced in the print medium feeding direction in order to increase the resolution in the print medium width direction. Accordingly, the nozzle drive timings when dots are formed at the same position in the feeding direction of the print medium P are different. For this reason, as will be described later, rearrangement processing is performed in which the dot data obtained by processing the gradation data of the image to be formed is adapted to the nozzle arrangement. Details of processing of each functional unit including processing of the printing unit will be described later with reference to the flowcharts of FIGS.

EEPROM60には、ディザマスク61と、誤差拡散閾値テーブル62とが記憶されている。ディザマスク61は、後述するハーフトーン処理において用いるものであり、図4に一部を例示するように、横(x:印刷媒体幅方向)256×縦(y:印刷媒体送り方向)64の大きさを有する。このディザマスク61は、複数の閾値THn_dが配列されたものである。この閾値THn_dは、本実施形態では、1〜255までの値をとる。各閾値THn_dは、この閾値との比較により形成されるドットの空間周波数が、いわゆるブルーノイズ特性となるように配置されている。   In the EEPROM 60, a dither mask 61 and an error diffusion threshold table 62 are stored. The dither mask 61 is used in halftone processing to be described later, and has a size of horizontal (x: print medium width direction) 256 × vertical (y: print medium feed direction) 64, as partly illustrated in FIG. Have The dither mask 61 has a plurality of threshold values THn_d arranged. This threshold value THn_d takes a value from 1 to 255 in this embodiment. Each threshold value THn_d is arranged so that the spatial frequency of dots formed by comparison with this threshold value has a so-called blue noise characteristic.

図5は、こうしたディザマスク61が備えるノイズ特性を例示する説明図である。図には、ブルーノイズ特性およびグリーンノイズ特性を有するディザマスクの各画素に設定されている閾値の空間周波数特性を概念的に例示した。ディザマスクにおけるブルーノイズ特性は、1周期の長さが2画素付近の高い周波数領域に最も大きな周波数成分を有するものとなっている。これは、高周波領域において感度が低いという人間の視覚特性を考慮して、高周波領域に最も大きな周波数成分が発生するように閾値の格納位置が調整されていることを意味する。こうしたブルーノイズ特性を備えたディザマスクを用いてドットを発生させると、ドットの分散性に優れた画像が得られる。   FIG. 5 is an explanatory diagram illustrating the noise characteristics provided in such a dither mask 61. The figure conceptually illustrates the spatial frequency characteristics of the threshold values set for each pixel of the dither mask having blue noise characteristics and green noise characteristics. The blue noise characteristic in the dither mask has the largest frequency component in the high frequency region where the length of one cycle is near two pixels. This means that the storage position of the threshold is adjusted so that the largest frequency component is generated in the high frequency region in consideration of the human visual characteristic that the sensitivity is low in the high frequency region. When dots are generated using a dither mask having such blue noise characteristics, an image having excellent dot dispersibility can be obtained.

図5には、さらに、グリーンノイズ特性を破線の曲線として例示している。図示されているように、グリーンノイズ特性は、ブルーノイズ特性よりやや低周波側に最も大きな周波数成分を有するもので、画素サイズが十分に小さければグリーンノイズ特性でも粒状感の感じられない良好な画像が得られる。ディザマスク61は、こうしたブルーノイズ特性やグリーンノイズ特性などの所定の空間周波数特性を有するものとされている。   FIG. 5 further illustrates the green noise characteristic as a dashed curve. As shown in the figure, the green noise characteristic has the largest frequency component slightly on the low frequency side than the blue noise characteristic, and if the pixel size is sufficiently small, a good image that does not feel graininess even with the green noise characteristic is shown. Is obtained. The dither mask 61 has predetermined spatial frequency characteristics such as blue noise characteristics and green noise characteristics.

更に、本実施形態においては、ディザマスク61は、次のドット形成特性を有している。すなわち、双方向印刷におけるキャリッジ80の往動で形成されるドット群のドットパターンと、復動で形成されるドット群のドットパターンと、これらを併せた全体のドット群のドットパターンいずれもが、ブルーノイズ特性に近い特性を有している。かかる技術は、例えば、特許文献1や特開2007−15359号公報に記載されている。なお、ディザマスク61の大きさや特性は任意であり、本実施例以外の大きさや特性のものを採用することができる。例えば、組織的ディザ法を実現するために64×32以上の大きさを持つものとしても良いし、網点に近い特性を実現するドット集中型のディザマスクであっても良い。   Furthermore, in this embodiment, the dither mask 61 has the following dot formation characteristics. That is, both the dot pattern of the dot group formed by the forward movement of the carriage 80 in the bidirectional printing, the dot pattern of the dot group formed by the backward movement, and the dot pattern of the entire dot group that combines them, It has characteristics close to blue noise characteristics. Such a technique is described in, for example, Patent Document 1 and Japanese Patent Application Laid-Open No. 2007-15359. Note that the size and characteristics of the dither mask 61 are arbitrary, and those having a size and characteristics other than the present embodiment can be adopted. For example, it may have a size of 64 × 32 or more in order to realize a systematic dither method, or may be a dot concentration type dither mask that realizes characteristics close to halftone dots.

EEPROM60に記憶された誤差拡散閾値テーブル62は、誤差拡散法におけるドットのON/OFFの判断に用いる高位閾値および低位閾値が記憶されたテーブルである。これらの閾値の役割については、後で詳述する。   The error diffusion threshold value table 62 stored in the EEPROM 60 is a table in which a high threshold value and a low threshold value used for determination of dot ON / OFF in the error diffusion method are stored. The role of these threshold values will be described in detail later.

制御ユニット30には、メモリカードスロット98が接続されており、メモリカードスロット98に挿入したメモリカードMCから画像データORGを読み込んで入力することができる。本実施例においては、メモリカードMCから入力する画像データORGは、レッド(R)、グリーン(G)、ブルー(B)の3色の色成分からなるデータである。   A memory card slot 98 is connected to the control unit 30, and image data ORG can be read and input from the memory card MC inserted into the memory card slot 98. In this embodiment, the image data ORG input from the memory card MC is data composed of three color components of red (R), green (G), and blue (B).

以上のようなハードウェア構成を有するプリンター20は、紙送りモータ74を駆動することによって、印刷媒体Pをその送り方向に移動させつつ、印刷ヘッド90を駆動して、各色インクドットを、印刷媒体P上の形成する。制御ユニット30は、印刷媒体Pの紙送りに合わせて、印刷データに基づいて適切なタイミングでノズルを駆動することにより、印刷媒体P上の適切な位置に適切な色のインクドットを形成する。こうすることによって、プリンター20は、印刷媒体P上にメモリカードMCから入力したカラー画像を印刷することが可能となっている。   The printer 20 having the hardware configuration as described above drives the print head 90 by moving the print medium P in the feed direction by driving the paper feed motor 74, so that each color ink dot is printed on the print medium. Form on P. The control unit 30 forms ink dots of appropriate colors at appropriate positions on the print medium P by driving the nozzles at appropriate timing based on the print data in accordance with the paper feed of the print medium P. By doing so, the printer 20 can print the color image input from the memory card MC on the print medium P.

A−2.印刷処理:
プリンター20における印刷処理について説明する。図2は、プリンター20における印刷処理の流れを示すフローチャートである。ここでの印刷処理は、ユーザが操作パネル99等を用いて、メモリカードMCに記憶された所定の画像の印刷指示操作を行なうことで開始される。印刷処理を開始すると、CPU40は、まず、入力部41の処理として、メモリカードスロット98を介してメモリカードMCから印刷対象であるRGB形式の画像データORGを読み込んで入力する(ステップS110)。
A-2. Printing process:
A printing process in the printer 20 will be described. FIG. 2 is a flowchart showing the flow of printing processing in the printer 20. The printing process here is started when the user performs an instruction to print a predetermined image stored in the memory card MC using the operation panel 99 or the like. When printing processing is started, the CPU 40 first reads and inputs RGB format image data ORG to be printed from the memory card MC via the memory card slot 98 as processing of the input unit 41 (step S110).

画像データORGを入力すると、CPU40は、EEPROM60に記憶されたルックアップテーブル(図示せず)を参照して、画像データORGについて、RGB形式をCMYKLcLm形式に色変換する(ステップS120)。   When the image data ORG is input, the CPU 40 refers to a look-up table (not shown) stored in the EEPROM 60 and performs color conversion from RGB format to CMYKLcLm format for the image data ORG (step S120).

色変換処理を行なうと、CPU40は、ハーフトーン処理部42の処理として、画像データを各色のドットのON/OFFを画素毎に定めたドットデータに変換するハーフトーン処理を行なう(ステップS130)。ここでのハーフトーン処理の詳細については後述する。なお、本明細書では、「ハーフトーン処理」は、ドットのON/OFFの2値化処理に限らず、大小ドットや大中小ドットなどのON/OFFなど、多値化処理を含んだ階調数変換(低減)処理一般を意味している。また、ステップS130に供する画像データは、解像度変換処理やスムージング処理などの画像処理が施されたものであってもよい。   When the color conversion process is performed, the CPU 40 performs a halftone process in which the image data is converted into dot data in which ON / OFF of dots of each color is determined for each pixel as a process of the halftone processing unit 42 (step S130). Details of the halftone process will be described later. In this specification, “halftone processing” is not limited to dot ON / OFF binarization processing, but is a gradation including multi-value processing such as ON / OFF of large and small dots, large, medium, and small dots. This means general number conversion (reduction) processing. Further, the image data provided to step S130 may be subjected to image processing such as resolution conversion processing or smoothing processing.

ハーフトーン処理を行なうと、CPU40は、プリンター20のノズル配置や紙送り量などに合わせて、印刷ヘッド90の各ノズルを同時に駆動するドットパターンデータに並び替える並び替え処理を行なう(ステップS150)。並び替え処理は、上述したように、ハーフトーン処理(ステップS130)により得られたドットデータを、印刷ヘッド90におけるノズルNzの配置に合わせて並び替える処理である。並び替え処理を(ステップS150)を行なった後、CPU40は、印刷部46の処理として、印刷ヘッド90、モータ74等を駆動して、印刷を実行する(ステップS160)。   When the halftone process is performed, the CPU 40 performs a rearrangement process for rearranging the dot pattern data for simultaneously driving the nozzles of the print head 90 in accordance with the nozzle arrangement of the printer 20 and the paper feed amount (step S150). As described above, the rearrangement process is a process of rearranging the dot data obtained by the halftone process (step S130) according to the arrangement of the nozzles Nz in the print head 90. After performing the rearrangement process (step S150), the CPU 40 drives the print head 90, the motor 74, etc. as a process of the printing unit 46, and executes printing (step S160).

A−3.ハーフトーン処理の詳細:
上述したハーフトーン処理(ステップS130)の詳細について図3を用いて説明する。図示するように、この処理が開始されると、CPU40は、まず、ステップS120で色変換処理が行なわれた画像データについて、注目画素位置の座標データn(x,y)と、注目画素データDnとを取得する(ステップS131)。注目画素位置は、画像の原点(左上)からスタートし、以下の処理が繰り返される毎に、主走査方向(x方向)に1画素ずつ移動する。注目画素位置が画像の主走査方向右端に至ると、副走査方向(y方向)に1つ移動し、再度x方向左端から主走査方向に移動する。以下の説明では、注目画素位置の座標データをn(x,y)として表すものとするが、注目画素位置を示す添え字として用いるときは、直接(x,y)として表記する。
A-3. Details of halftoning:
Details of the above-described halftone process (step S130) will be described with reference to FIG. As shown in the figure, when this process is started, the CPU 40 first sets the coordinate data n (x, y) of the target pixel position and the target pixel data Dn for the image data subjected to the color conversion process in step S120. Are acquired (step S131). The target pixel position starts from the origin (upper left) of the image, and moves one pixel at a time in the main scanning direction (x direction) each time the following processing is repeated. When the target pixel position reaches the right end in the main scanning direction of the image, it moves by one in the sub-scanning direction (y direction), and again moves from the left end in the x direction in the main scanning direction. In the following description, the coordinate data of the target pixel position is expressed as n (x, y), but when used as a subscript indicating the target pixel position, it is expressed directly as (x, y).

注目画素位置の座標データn(x,y)と注目画素データDnとを取得すると、CPU40は、比較部43の処理として、仮ディザ処理を行なう(ステップS132)。ここでの仮ディザ処理とは、注目画素データDnの階調値と、EEPROM60に記憶されたディザマスク61を構成する複数の閾値のうちの、注目画素の座標(x,y)に対応する閾値THn_dの値との大小関係を比較する処理である。この処理は、形式的には、通常行なわれるディザ法によるドットのON/OFF判断の処理と同一の処理である。通常のディザ法では、注目画素データDnの階調値が閾値THn_dの値以上である場合には、ドットをONにすると判断し、注目画素データDnの階調値が閾値THn_dの値未満である場合には、ドットをOFFにすると判断する。これに対して、本実施例の仮ディザ処理は、後述する誤差拡散法によってドットのON/OFFを決定するための前処理、具体的には、誤差拡散法の閾値を決定するための処理である点が相違している。   When the coordinate data n (x, y) of the target pixel position and the target pixel data Dn are acquired, the CPU 40 performs a temporary dither process as the process of the comparison unit 43 (step S132). The temporary dither processing here is a threshold value corresponding to the coordinate (x, y) of the target pixel among the plurality of threshold values constituting the dither mask 61 stored in the EEPROM 60 and the gradation value of the target pixel data Dn. This is a process of comparing the magnitude relationship with the value of THn_d. This processing is formally the same as the processing for determining dot ON / OFF by the dither method that is normally performed. In the normal dither method, when the gradation value of the target pixel data Dn is equal to or greater than the threshold value THn_d, it is determined that the dot is turned on, and the gradation value of the target pixel data Dn is less than the threshold value THn_d. In this case, it is determined that the dot is turned off. On the other hand, the temporary dither processing of the present embodiment is a pre-processing for determining dot ON / OFF by an error diffusion method described later, specifically, a process for determining a threshold value of the error diffusion method. There are some differences.

仮ディザ処理の結果、注目画素データDnの階調値が閾値THn_dの値以上であれば(ステップS132:YES)、誤差拡散法に用いる閾値THeを低位閾値THe_Lに設定する(ステップS133)。一方、注目画素データDnの階調値が閾値THn_dの値未満であれば(ステップS132:NO)、誤差拡散法に用いる閾値THeを高位閾値THe_Hに設定する(ステップS134)。このように、本実施例においては、誤差拡散法に用いる閾値THe(以下、単に閾値THeとも呼ぶ)を仮ディザ処理の結果に基づいて変化させる構成としている。かかる閾値THeの設定は、EEPROM60に記憶された誤差拡散閾値テーブル62を参照して行なわれる。   If the gradation value of the target pixel data Dn is greater than or equal to the threshold value THn_d as a result of the temporary dither processing (step S132: YES), the threshold value THe used for the error diffusion method is set to the lower threshold value THe_L (step S133). On the other hand, if the gradation value of the target pixel data Dn is less than the threshold value THn_d (step S132: NO), the threshold value THe used for the error diffusion method is set to the high threshold value THe_H (step S134). As described above, in this embodiment, the threshold value THe used in the error diffusion method (hereinafter also simply referred to as the threshold value THe) is changed based on the result of the temporary dither process. The threshold THe is set with reference to the error diffusion threshold table 62 stored in the EEPROM 60.

誤差拡散閾値テーブル62の一例をグラフとして図6に示す。図示するように、誤差拡散閾値テーブル62では、注目画素データDn(ここでは0〜255)と、低位閾値THe_L及び高位閾値THe_Hとが、それぞれ対応付けられている。図6に示す例では、低位閾値THe_Lは、高位閾値THe_Hより小さな値に設定されており、階調値51および170を極小値としてその前後の所定の階調範囲で下に凸の関係を備える。この下に凸の部分が、特異部に相当する。他方、高位閾値THe_Hは、注目画素データDnの階調値に応じて全体としては増加する特性を有するものの、階調値51および170を極大値としてその前後の所定の階調範囲で上に凸の関係を備える。低位閾値THe_Lと高位閾値THe_Hとが、図6に示す特性を有する意義については、比較例との比較を通して、後で説明する。   An example of the error diffusion threshold table 62 is shown as a graph in FIG. As shown in the figure, in the error diffusion threshold table 62, the pixel-of-interest data Dn (here, 0 to 255) is associated with the lower threshold THE_L and the higher threshold THe_H. In the example shown in FIG. 6, the low threshold value THe_L is set to a value smaller than the high threshold value THe_H, and the gradation values 51 and 170 are minimal values, and have a convex relationship downward in a predetermined gradation range before and after that. . The downwardly convex part corresponds to a singular part. On the other hand, the high threshold THe_H has a characteristic of increasing as a whole in accordance with the gradation value of the target pixel data Dn. However, the gradation values 51 and 170 are set to the maximum value and protrude upward in a predetermined gradation range before and after that. With the relationship. The significance of the low threshold value THe_L and the high threshold value THe_H having the characteristics shown in FIG. 6 will be described later through a comparison with a comparative example.

CPU40は、誤差拡散閾値テーブル62を参照して、高位閾値THe_Hまたは低位閾値THe_Lを取得し、ステップS133またはS134での設定に用いている。本実施例では、誤差拡散閾値テーブル62を参照することにより、階調値に応じた高位閾値THe_H及び低位閾値THe_Lを設定する構成としたが、関数により求めてもよい。   The CPU 40 refers to the error diffusion threshold table 62, acquires the high threshold THe_H or the low threshold THe_L, and uses it for the setting in step S133 or S134. In this embodiment, the high threshold THe_H and the low threshold THe_L corresponding to the gradation value are set by referring to the error diffusion threshold table 62, but it may be obtained by a function.

上述した図3のステップS133またはS134において、誤差拡散閾値テーブル62を参照して閾値THeを設定すると、CPU40は、注目画素データDnの階調値に、別途用意した誤差バッファに記憶された拡散誤差Ednを加算する(ステップS135)。拡散誤差Ednは、後述するステップS139において算出されるものであり、その内容は後述する。   In step S133 or S134 of FIG. 3 described above, when the threshold value THe is set with reference to the error diffusion threshold value table 62, the CPU 40 sets the diffusion error stored in the separately prepared error buffer to the gradation value of the target pixel data Dn. Edn is added (step S135). The diffusion error Edn is calculated in step S139 described later, and the content thereof will be described later.

注目画素データDnの階調値に拡散誤差Ednを加算すると、CPU40は、拡散誤差Ednを加算した注目画素データDnの階調値(以下、補正データとも呼ぶ)と、ステップS133またはステップS134で設定した閾値THeとを比較する(ステップS136)。その結果、補正データ(Dn+Edn)が閾値THe以上であれば(ステップS136:YES)、注目画素のドットデータをON(ドットを形成する)に決定する(ステップS137)。他方、拡散誤差Ednを加算した注目画素データDnの階調値が閾値THe未満であれば(ステップS136:NO)、注目画素のドットデータをOFF(ドットを形成しない)に決定する(ステップS138)。   When the diffusion error Edn is added to the gradation value of the pixel-of-interest data Dn, the CPU 40 sets the gradation value of the pixel-of-interest data Dn added with the diffusion error Edn (hereinafter also referred to as correction data) in step S133 or step S134. The threshold value THe is compared (step S136). As a result, if the correction data (Dn + Edn) is greater than or equal to the threshold value THe (step S136: YES), the dot data of the pixel of interest is determined to be ON (form a dot) (step S137). On the other hand, if the gradation value of the target pixel data Dn to which the diffusion error Edn is added is less than the threshold value THe (step S136: NO), the dot data of the target pixel is determined to be OFF (no dot is formed) (step S138). .

ドットのON/OFFを決定すると、CPU40は、2値化誤差Enと拡散誤差Ednとを算出する(ステップS139)。2値化誤差Enとは、補正データとドットのON/OFF結果実現される階調値RSLT(ここでは値255または0)との差分である。数式で表せば、次式(1)として表される。
En={Dn(x,y)+Edn(x,y)}−RSLT(255 or 0) … (1)
一般にドットが形成されなければ2値化誤差Enは正の値になり、ドットが形成されれば2値化誤差は負の値となる。
When the dot ON / OFF is determined, the CPU 40 calculates a binarization error En and a diffusion error Edn (step S139). The binarization error En is a difference between the correction data and the gradation value RSLT (here, value 255 or 0) realized as a result of dot ON / OFF. If expressed by an equation, it is expressed as the following equation (1).
En = {Dn (x, y) + Edn (x, y)} − RSLT (255 or 0) (1)
Generally, if no dot is formed, the binarization error En is a positive value, and if a dot is formed, the binarization error is a negative value.

この結果、以下に説明する誤差拡散の処理により、2値化の処理によってドットが形成されればその周辺の画素ではドットが形成されにくくなり、ドットが形成されなければその周辺の画素ではドットが形成されやすくなる。誤差拡散は、以下の式(2)により拡散誤差Ednを求めて、着目画素において発生した誤差を周辺の画素の配分する処理である。配分された誤差は累積され、上記ステップS135において注目画素データDnの階調値に加算される。本実施形態では、図7に(A)として示したように、2値化誤差Enを、ドットのON/OFFが未決定の周辺画素である4つの画素配分している。即ち、注目画素の右隣の画素に対して7/16、左下の画素に対して3/16、下の画素に対して5/16、右下の画素に対して1/16の割合で、拡散誤差Ednとして配分するものとした。こうして算出された拡散誤差Ednは、RAM52に用意された誤差バッファに格納される。
Edn(x+1,Y )=Edn(x+1,y )+En×(7/16)
Edn(x−1,Y+1)=Edn(x−1,y+1)+En×(3/16)
Edn(x ,Y+1)=Edn(x ,y+1)+En×(5/16)
Edn(x+1,Y+1)=Edn(x+1,y+1)+En×(1/16)
… (2)
As a result, if dots are formed by the binarization process by the error diffusion process described below, dots are less likely to be formed in the surrounding pixels, and if dots are not formed, dots are not formed in the surrounding pixels. It becomes easier to form. Error diffusion is a process of obtaining a diffusion error Edn by the following equation (2) and allocating errors generated in the pixel of interest to surrounding pixels. The distributed errors are accumulated and added to the gradation value of the target pixel data Dn in step S135. In the present embodiment, as shown as (A) in FIG. 7, the binarization error En is distributed to four pixels that are peripheral pixels whose dot ON / OFF is undetermined. That is, 7/16 for the pixel right next to the target pixel, 3/16 for the lower left pixel, 5/16 for the lower pixel, and 1/16 for the lower right pixel, The diffusion error Edn was distributed. The diffusion error Edn calculated in this way is stored in an error buffer prepared in the RAM 52.
Edn (x + 1, Y) = Edn (x + 1, y) + En × (7/16)
Edn (x-1, Y + 1) = Edn (x-1, y + 1) + En * (3/16)
Edn (x, Y + 1) = Edn (x, y + 1) + En × (5/16)
Edn (x + 1, Y + 1) = Edn (x + 1, y + 1) + En × (1/16)
(2)

かかるステップS135〜S139の処理は、誤差拡散法によるハーフトーン処理であり、誤差拡散部44の処理として実行される。誤差拡散法については、周知の技術であるため、詳細な説明は省略するが、各画像データの量子化誤差を周囲の画像データに所定の配分比率で加算しながら、各画像データと所定の閾値とを比較して各画像データを量子化する手法である。上述の例では、ステップS135〜S139は、ドットのON/OFFのみを決定する2値化処理としたが、大ドット及び小ドットのON/OFFを決定するなど、多値化処理を行なってもよい。   The processing in steps S135 to S139 is halftone processing by an error diffusion method, and is executed as processing by the error diffusion unit 44. Since the error diffusion method is a well-known technique, a detailed description thereof is omitted, but each image data and a predetermined threshold are added while adding the quantization error of each image data to the surrounding image data at a predetermined distribution ratio. And quantizing each image data. In the above example, steps S135 to S139 are binarization processing that determines only ON / OFF of dots, but even if multilevel processing such as determination of ON / OFF of large dots and small dots is performed. Good.

2値化誤差En及び拡散誤差Ednを算出すると、CPU40は、全画素についての上記の処理が完了したかを判断し(ステップS140)、全画素についての処理が終了するまで、注目画素位置(x,y)をインクリメントしつつ、上記ステップS131〜S139の処理を繰り返す。こうして、ステップS130のハーフトーン処理は終了する。   After calculating the binarization error En and the diffusion error Edn, the CPU 40 determines whether or not the above processing has been completed for all the pixels (step S140), and the pixel position of interest (x , Y) is incremented, and the processes in steps S131 to S139 are repeated. Thus, the halftone process in step S130 is completed.

A−4.第1実施形態の効果:
かかるハーフトーン処理を実施する効果について、以下に説明する。上述したように、ステップS132〜S134の処理においては、注目画素データDnの階調値が閾値THn_dの値以上であれば、誤差拡散法に用いる閾値THeは、低位閾値THe_Lに設定される。他方、注目画素データDnの階調値が閾値THn_dの値未満であれば、閾値THeは、高位閾値THe_Hに設定される。
A-4. Effects of the first embodiment:
The effect of performing such halftone processing will be described below. As described above, in the processing of steps S132 to S134, if the gradation value of the target pixel data Dn is equal to or greater than the threshold value THn_d, the threshold value THe used for the error diffusion method is set to the lower threshold value THe_L. On the other hand, if the tone value of the target pixel data Dn is less than the threshold value THn_d, the threshold value THe is set to the high threshold value THe_H.

この結果、誤差拡散法によるドットデータの生成結果は、ディザマスク61を用いた判定結果が強く反映されたものになることが了解される。特に、高位閾値THe_H、低位閾値THe_Lが図6のように定められているので、ドットの形成は次のように行なわれる。   As a result, it is understood that the determination result using the dither mask 61 strongly reflects the dot data generation result by the error diffusion method. In particular, since the high threshold THe_H and the low threshold THe_L are determined as shown in FIG. 6, dot formation is performed as follows.

(1)仮ディザの判定により、高位閾値THe_Hまたは低位閾値THe_Lが誤差拡散用の閾値THeとして設定された場合には、図3、ステップS136での判断は、大部分、仮ディザでの判断(ステップS132)と同じものとなるから、仮ディザの判定結果と強い相関を持ってドットが形成されることになる。つまりドットデータは、ディザマスクの特性を持ったものとなる。
(2)誤差拡散法により周辺の画素におけるドット形成の結果(拡散誤差Edn)が着目画素の画素データに加算されているから、ステップS132における仮ディザの判定結果と、ステップS136での誤差拡散法での判定結果とは必ずしも一致せず、幾分かは誤差拡散法により、ドットが形成されなかったり、形成されたりして、元の画像の濃度に、形成される画像の濃度を一致させるような修正が行なわれる。このため、ディザマスクの特性が反映したドット形成(1)を基本としつつ、適宜、誤差拡散法によるドット形成の修正が行なわれることになる。
(1) When the high threshold value THe_H or the low threshold value THe_L is set as the error diffusion threshold value THe by the temporary dither determination, the determination in step S136 in FIG. Since this is the same as step S132), dots are formed with a strong correlation with the temporary dither determination result. That is, the dot data has dither mask characteristics.
(2) Since the dot formation result (diffusion error Edn) in the surrounding pixels is added to the pixel data of the target pixel by the error diffusion method, the provisional dither determination result in step S132 and the error diffusion method in step S136 The result does not necessarily agree with the result of determination, and some dots are not formed or formed by the error diffusion method so that the density of the formed image matches the density of the original image. Corrections are made. For this reason, the dot formation correction by the error diffusion method is appropriately performed based on the dot formation (1) reflecting the characteristics of the dither mask.

(3)更に、第1実施形態では、図6に示したように、低位閾値THe_Lは、階調値51,170をそれぞれ極小値とする下に凸の形状となるような特性が付与されている。つまり、階調値51,170の付近では、低位閾値THe_Lが、全体の特性に対して低い値とされ、上記(1)(2)によるドット形成の割合からみれば、この階調値の近傍では、仮ディザの判定結果が「YES」となったときには、誤差拡散の影響を考慮しても、一層ドットが形成され易いものとなっている。なお、低位閾値THe_Lのこうした特性に合わせて、高位閾値THe_Hには逆の特性が付与されているから、仮ディザの判定結果が「NO」となったときには、誤差拡散の影響を考慮しても、一層ドットが形成されにくいものとなっている。 (3) Furthermore, in the first embodiment, as shown in FIG. 6, the low threshold value THe_L is given a characteristic that has a downward convex shape with the gradation values 51 and 170 being the minimum values. Yes. That is, in the vicinity of the gradation values 51 and 170, the low threshold value THe_L is set to a low value with respect to the overall characteristics, and in the vicinity of the gradation values in view of the ratio of dot formation according to the above (1) and (2). Then, when the determination result of the temporary dither is “YES”, it is easier to form dots even if the influence of error diffusion is taken into consideration. In addition, since the reverse characteristic is given to the high threshold value THe_H in accordance with such a characteristic of the low threshold value THe_L, when the determination result of the temporary dither becomes “NO”, the influence of error diffusion is taken into consideration. Further, dots are more difficult to be formed.

第1実施形態においては、図6に示した特性の低位閾値THe_Lおよび高位閾値THe_Hを用いることで、図8に示したように、印刷使用とする画像の広い階調範囲に亘って、粒状性に優れた画質の印刷を行なうことができる。図8は、印刷ヘッド90のノズルピッチにずれがある場合とずれがない場合(精密にアライメントされた場合)とにおける粒状性をプロットしたグラフである。図示するように、第1実施形態では、ずれがある場合もない場合も、広い階調範囲に亘って、粒状性が十分に抑制されていることが分かる。   In the first embodiment, by using the low threshold THe_L and the high threshold THe_H having the characteristics shown in FIG. 6, as shown in FIG. 8, the graininess is extended over a wide gradation range of an image to be used for printing. Printing with excellent image quality. FIG. 8 is a graph in which the graininess is plotted when there is a deviation in the nozzle pitch of the print head 90 and when there is no deviation (when precisely aligned). As shown in the figure, in the first embodiment, it can be seen that the graininess is sufficiently suppressed over a wide gradation range whether or not there is a shift.

これに対して、図9は、低位閾値THe_Lおよび高位閾値THe_Hを階調値51,170付近の極値を持たないように設定した例を示している。この低位閾値THe_Lおよび高位閾値THe_Hを用いて、図3に示したハーフトーン処理を実施すると、その場合に得られた画像の粒状性は、図10に示したものとなった。図10に示した例では、印刷ヘッド90のノズルの配置にずれがあると、画像の階調値が51および170の近傍で、粒状性が大きく悪化していた。そこでこの点を更に詳しく調べてみると、階調値51および170の近傍では、特異なドットパターンが発生し、粒状性が悪化していることが分かった。特異なドットパータンとは、階調値51もしはく階調値170の均一な画像を印刷したとき、濃度誤差(Edn)によるドットの発生にある程度の規則性が生まれるために生じるパターンである。   On the other hand, FIG. 9 shows an example in which the lower threshold THe_L and the higher threshold THe_H are set so as not to have extreme values near the gradation values 51 and 170. When the halftone processing shown in FIG. 3 is performed using the low threshold THe_L and the high threshold THe_H, the granularity of the image obtained in that case is as shown in FIG. In the example shown in FIG. 10, when there is a deviation in the nozzle arrangement of the print head 90, the graininess is greatly deteriorated in the vicinity of the gradation values 51 and 170 of the image. Therefore, when this point was examined in more detail, it was found that a unique dot pattern was generated in the vicinity of the gradation values 51 and 170, and the graininess deteriorated. The peculiar dot pattern is a pattern that is generated because a certain degree of regularity is generated in the generation of dots due to density error (Edn) when a uniform image having the gradation value 51 or the gradation value 170 is printed.

こうした特異なドットパターンは、図10に示した例のように、階調値の最大値(画像データを8ビットで表現しているので、ここでは階調値255)の整数分の1、あるいは単純な整数比の階調付近で発生しやすいことが経験的に知られている。図10に示した例では、
51=255/5
170=255×(2/3)
である。もとより、こうした特異なパターンが発生する階調値は、この例に限らず、画像データの取り得る階調範囲や、誤差拡散範囲やその割合(図7参照)、低位閾値THe_Lおよび高位閾値THe_Hの特性などによって異なる。したがって、プリンター20にまず所定の設定を行なって各階調値のペタパターンの印刷を行ない、その粒状性を測定し、特異なパターンの発生により粒状性が圧壊している特異点が見い出された場合、その階調値またはその近傍の階調値を境地とするように、低位閾値THe_Lおよび高位閾値THe_Hを修正すれば良い。
Such a peculiar dot pattern is, as in the example shown in FIG. 10, an integral number of the maximum value of gradation values (the gradation value is 255 here because the image data is expressed by 8 bits), or It is empirically known that it is likely to occur in the vicinity of a simple integer ratio gradation. In the example shown in FIG.
51 = 255/5
170 = 255 × (2/3)
It is. Of course, the gradation values at which such a unique pattern is generated are not limited to this example, but the gradation range that the image data can take, the error diffusion range and its ratio (see FIG. 7), the low threshold THe_L, and the high threshold THEe_H. It depends on characteristics. Therefore, when the printer 20 first performs a predetermined setting, prints a peta pattern of each gradation value, measures its graininess, and finds a singular point where the graininess is collapsed due to the occurrence of a unique pattern The low threshold value THe_L and the high threshold value THe_H may be corrected so that the gradation value or a gradation value in the vicinity thereof is used as a boundary.

こうして図6に示したような低位閾値THe_Lおよび高位閾値THe_Hを決定して、画像の印刷を行なえば、特異なドットパターンの発生を抑制することができる。このとき、図3に示したハーフトーン処理は、処理している対象が線図や文字であるか写真画像のような自然画像であるかといった判断は一切していない。仮に線図の領域からそのまま自然画像の領域に移行したり、自然画像の中に線画や文字が存在したりしても、同じハーフトーン処理(図3)を実施する。その結果、線画や文字の領域でも自然画像の領域でも、特異なドットパターンの発生のない、高画質の画像を形成することができる。   In this way, when the low threshold THe_L and the high threshold THe_H as shown in FIG. 6 are determined and the image is printed, the generation of a unique dot pattern can be suppressed. At this time, the halftone process shown in FIG. 3 does not make any judgment as to whether the object being processed is a diagram, a character, or a natural image such as a photographic image. The same halftone process (FIG. 3) is performed even if the area of the diagram is shifted to the area of the natural image as it is, or a line drawing or character exists in the natural image. As a result, it is possible to form a high-quality image without occurrence of a peculiar dot pattern in either a line drawing or character area or a natural image area.

また、本実施形態では、誤差拡散法の際に用いる閾値(高位閾値THe_H)として、図6に示すように、着目画素データの階調値に応じて増加する値を用いているため、特許文献3に記載されているように、尾引などの現象を生じることがない。更に、図7に示した誤差拡散範囲を、着目画素データの階調値に応じて切り替える処理を行なえば、更に画質の向上が期待できる。拡散範囲を切替ながら誤差拡散を行なう手法は、公知の技術であるため、詳しい説明は省略するが、入力階調値と2値化結果の組み合わせに応じて誤差拡散範囲を切り替えると、種々の効果を奏する。例えば、低階調値でドットONになった時のみ広い範囲に誤差拡散すれば、低階調領域の粒状性を改善し、ドットの非所望な連続、いわゆるワームの発生を抑制することができる。   In the present embodiment, as a threshold value (high threshold value THe_H) used in the error diffusion method, as shown in FIG. 6, a value that increases according to the gradation value of the pixel data of interest is used. As described in 3, the phenomenon such as tailing does not occur. Furthermore, if the error diffusion range shown in FIG. 7 is switched according to the gradation value of the pixel data of interest, further improvement in image quality can be expected. Since the technique of performing error diffusion while switching the diffusion range is a known technique, a detailed description is omitted. However, when the error diffusion range is switched according to the combination of the input gradation value and the binarization result, various effects are obtained. Play. For example, if error diffusion is performed over a wide range only when a dot is turned on at a low gradation value, the granularity of the low gradation region can be improved and the occurrence of undesired continuation of dots, so-called worms can be suppressed. .

A−5.変形例:
第1実施形態では、高位閾値THe_Hと低位閾値THe_Lとを図6に示したように設定したが、両者の設定値はこれに限られないことは勿論である。低位閾値THe_Lは、もっと小さな値に設定しても良く、場合によっては、画素データが取り得る階調範囲の最小値より更に小さな値としても良い。また下に凸の特性を持つ領域は、1つの場合もあれば、3つ以上の場合もあり得る。同様に、高位閾値THe_Hにおいて上に凸の特性を持つ領域が、1つの場合、あるいは3つ以上となる場合もあり得る。なお、低位閾値THe_Lおよび高位閾値THe_Hの下上に凸の特性を持つ階調値範囲は、通常は対応しているが、必ずしも同一の階調範囲にする必要はなく、完全にずれていても差し支えない。
A-5. Variation:
In the first embodiment, the high threshold THe_H and the low threshold THe_L are set as shown in FIG. 6, but it goes without saying that the setting values of both are not limited thereto. The lower threshold value THe_L may be set to a smaller value, or may be set to a value smaller than the minimum value of the gradation range that can be taken by the pixel data depending on the case. Further, there may be one region having three or more downward convex characteristics, and there may be three or more regions. Similarly, there may be one region or three or more regions having upwardly convex characteristics in the high threshold THe_H. Note that tone value ranges having convex characteristics below the lower threshold value THe_L and the higher threshold value THe_H usually correspond, but it is not always necessary to have the same tone range, and even if they are completely deviated. There is no problem.

第1実施形態では、誤差拡散による誤差の拡散範囲は、図7に示したように、着目画素の周辺4画素としたが、これより広いまたは狭い範囲としても差し支えない。また、注目画素の階調値に応じて、拡散の判定を変更するものとしても良い。例えば、階調値が小さいほど、広い範囲に拡散するものとすることも、低階調域での粒状性を改善する上で好適である。また、図7(B)に示したように、誤差拡散する差異の重み付けの総和を値1以下とすることも望ましい。図7(B)に示した例では、着目画素で生じた濃度誤差は、周辺の4つの画素に6/16,2/16,4/16,1/16の割合で拡散され、その総和は、生じた誤差の13/16とされている。この結果、誤差拡散により生じた濃度誤差が周辺の画素に与える影響が緩和されることになる。   In the first embodiment, the error diffusion range by error diffusion is four pixels around the pixel of interest as shown in FIG. 7, but it may be wider or narrower than this. The determination of diffusion may be changed according to the tone value of the target pixel. For example, it is also preferable to improve the granularity in the low gradation region by decreasing the gradation value so that the diffusion is performed over a wide range. Further, as shown in FIG. 7B, it is also desirable to set the sum of the weights of differences for error diffusion to a value of 1 or less. In the example shown in FIG. 7B, the density error generated in the pixel of interest is diffused to the surrounding four pixels at a ratio of 6/16, 2/16, 4/16, 1/16, and the sum is The generated error is 13/16. As a result, the influence of density errors caused by error diffusion on surrounding pixels is alleviated.

B.第2実施形態:
次に本発明の第2実施形態について説明する。第2実施形態のプリンター20は、第1実施形態と同一のハードウェア構成を備え、同一の印刷処理(図2)を実行する。第2実施形態のプリンター20が第1実施形態と異なるのは、そのハーフトーン処理である。第2実施形態のプリンター20が実行するハーフトーン処理を図11に示した。第2実施形態のプリンター20が実行するハーフトーン処理は、第1実施形態と比べて、以下に説明するステップS431,S432のみ異なり、他のステップS433ないしS440は、第1実施形態のステップS133ないしS140と同一である。
B. Second embodiment:
Next, a second embodiment of the present invention will be described. The printer 20 of the second embodiment has the same hardware configuration as that of the first embodiment, and executes the same printing process (FIG. 2). The printer 20 of the second embodiment is different from the first embodiment in the halftone process. FIG. 11 shows halftone processing executed by the printer 20 of the second embodiment. The halftone process executed by the printer 20 of the second embodiment is different from the first embodiment only in steps S431 and S432 described below, and the other steps S433 to S440 are the same as steps S133 to S133 of the first embodiment. This is the same as S140.

第2実施形態では、ハーフトーン処理を開始すると、まずCPU40は、注目画素位置の座標データn(x,y)と、注目画素データDnとを取得し、注目画素データDnの階調値に所定の係数αdr(0<αdr≦1)を乗算した値Dn′を求める処理を行なう(ステップS431)。こうして算出されたデータは、注目画素データDnの階調値に関連する階調値であることから、関連データDn’(Dn’=Dn×αdr)ともいう。本実施例では、係数α=0.9とした。   In the second embodiment, when halftone processing is started, first, the CPU 40 acquires the coordinate data n (x, y) of the target pixel position and the target pixel data Dn, and sets the gradation value of the target pixel data Dn as a predetermined value. The value Dn ′ obtained by multiplying the coefficient αdr (0 <αdr ≦ 1) is obtained (step S431). Since the data calculated in this way is a gradation value related to the gradation value of the target pixel data Dn, it is also referred to as related data Dn ′ (Dn ′ = Dn × αdr). In this embodiment, the coefficient α = 0.9.

関連データDn’を算出すると、CPU40は、比較部43の処理として、仮ディザ処理を行なう(ステップS432)。図3に示したステップS132の仮ディザ処理との違いは、注目画素データDnの階調値と、ディザマスク61の閾値THn_dとを比較する代わりに、関連データDn’と閾値THn_dとを比較する点である。   When the related data Dn ′ is calculated, the CPU 40 performs a temporary dither process as the process of the comparison unit 43 (step S432). The difference from the temporary dither processing in step S132 shown in FIG. 3 is that instead of comparing the gradation value of the target pixel data Dn and the threshold value THn_d of the dither mask 61, the related data Dn ′ and the threshold value THn_d are compared. Is a point.

その結果、関連データDn’が閾値THn_dの値以上であれば(ステップS432:YES)、誤差拡散法に用いる閾値THeを低位閾値THe_Lに設定する(ステップS433)。一方、関連データDn’が閾値THn_dの値未満であれば(ステップS432:NO)、誤差拡散法に用いる閾値THeを高位閾値THe_Hに設定する(ステップS434)。このとき設定され。高位閾値THe_Hと低位閾値THe_Lは、第1実施形態の図6に例示したものと同一の閾値を用いる。また、以降の誤差拡散法の処理(ステップS435〜S439)は、第1実施例と同様であるため、説明を省略する。なお、誤差拡散法のドットのON/OFF判断は、関連データDn’ではなく、注目画素データDnの階調値を用いて行なう。   As a result, if the related data Dn ′ is equal to or greater than the threshold value THn_d (step S432: YES), the threshold value THe used for the error diffusion method is set to the lower threshold value THe_L (step S433). On the other hand, if the related data Dn ′ is less than the threshold THn_d (step S432: NO), the threshold THe used for the error diffusion method is set to the high threshold THe_H (step S434). Set at this time. As the high threshold THe_H and the low threshold THe_L, the same thresholds as illustrated in FIG. 6 of the first embodiment are used. Further, the subsequent error diffusion processing (steps S435 to S439) is the same as that of the first embodiment, and thus the description thereof is omitted. Note that the error diffusion method dot ON / OFF determination is performed using the gradation value of the target pixel data Dn, not the related data Dn ′.

本実施形態では、係数αdr=0.9としているので、仮ディザの判断によりドットを発生すると判断する割合が、第1実施形態等で説明した通常の判断の90%に抑えられる。この結果、不足する10%は誤差拡散法での判断(ステップS436)で発生させることになる。このようにすれば、ディザによる判断で発生させるドットと、それを補完する形で誤差拡散法による判断で発生させるドットとの比率を、任意に設定することができる。しかも、低位閾値THe_Lおよび高位閾値THe_Hは、図6に示したように、所定の階調範囲で、下上に凸の特性を有しているので、特定の階調範囲で特異なドットパターンを発生することがない。このため、第1実施形態で示したように、線画や文字、あるいは自然画像を高位品質で印刷することができる。   In the present embodiment, since the coefficient αdr is 0.9, the ratio at which it is determined that a dot is generated by the temporary dither determination is suppressed to 90% of the normal determination described in the first embodiment and the like. As a result, the deficient 10% is generated by the determination by the error diffusion method (step S436). In this way, it is possible to arbitrarily set the ratio between the dots generated by the dither determination and the dots generated by the error diffusion method complementing the dot. In addition, as shown in FIG. 6, the low threshold THe_L and the high threshold THe_H have a downwardly convex characteristic in a predetermined gradation range, so that a unique dot pattern is generated in a specific gradation range. It does not occur. For this reason, as shown in the first embodiment, line drawings, characters, or natural images can be printed with high quality.

第2実施形態では、係数αdrは、0から1.0の間で任意に設定できるので、ディザによる判断で発生するドットと誤差拡散法による判断で発生するドットとの合計を適正に設定することが可能である。例えば、係数αdr=1とすると、第1実施形態と同一となるが、ディザによる判断で発生するドットにプラスする形で誤差拡散法によるドットが発生する。従って、この場合には、本来の画像の濃度と比べると、若干多めにドットが形成される場合がある。これに対して、第2実施例のように、係数αdrを0.9のように、1.0より若干小さな値にすると、仮ディザの判断により発生するドットがやや少なくなっているので、足りない分を必要十分なだけ誤差拡散法による判断で発生させることができる。トータルで発生するドットにより表現される階調を、元の画像の階調に、より一致させることが可能となる。   In the second embodiment, since the coefficient αdr can be arbitrarily set between 0 and 1.0, the sum of the dots generated by the dither determination and the dots generated by the error diffusion method should be set appropriately. Is possible. For example, if the coefficient αdr = 1, it is the same as in the first embodiment, but dots by the error diffusion method are generated in addition to the dots generated by the dither determination. Therefore, in this case, there are cases where dots are formed slightly more than the original image density. On the other hand, if the coefficient αdr is set to a value slightly smaller than 1.0, such as 0.9 as in the second embodiment, the number of dots generated by the provisional dither determination is slightly less. The necessary amount can be generated by judgment based on the error diffusion method. It is possible to make the gradation expressed by the dots generated in total more closely match the gradation of the original image.

更に、この係数αdrを、着目画素データDnの関数にすれば、画像の階調値に応じて、ディザにより発生されるドットの割合を任意の比率に設定することも可能である。係数αdrのデフォルト値を1としておき、ドットの発生が割合が高いと判断される階調値があれば、着目画素データのその階調付近で、係数αdrを、少し小さくすれば、ドット発生の割合をより均一にすることができる。なお、階調値に応じて係数αdrを変化させる場合には、漸増・漸減させて、ドット発生の割合が滑らかに変化するようにすれば、一層好ましい。   Furthermore, if the coefficient αdr is a function of the target pixel data Dn, it is possible to set the ratio of dots generated by dithering to an arbitrary ratio according to the gradation value of the image. If the default value of the coefficient αdr is set to 1 and there is a gradation value for which it is determined that the occurrence of dots is high, if the coefficient αdr is slightly reduced in the vicinity of the gradation of the pixel data of interest, dot generation will occur. The ratio can be made more uniform. In the case where the coefficient αdr is changed according to the gradation value, it is more preferable to gradually increase or decrease the coefficient αdr so that the dot generation rate changes smoothly.

C.変形例:
C−1.変形例1:
以上の実施形態では、ディザマスクとして、誤差拡散と特性が似ているブルーノイズマスクを用いたが、ベイヤー型ディザなどの、規則パターンを持つドット分散型の組織的ディザを用いてもよい。この場合は、「線が消失する場合がある。」というベイヤー型ディザ最大の課題が解決できる。また、網点ディザや、グリーンノイズマスクなどのドット集中型ディザを用いても、網点ピッチで線がとぎれとぎれになる、などの問題が解消できて有用である。2次元的な広がりを持つ通常部はベイヤーや網点、グリーンノイズマスクなどのディザパターンでありながら、細線部では誤差拡散法が働いて、細線が消失したり分断されたりせずに再現できるハーフトーンが実現できるからである。
C. Variation:
C-1. Modification 1:
In the above embodiment, a blue noise mask similar in characteristics to error diffusion is used as the dither mask. However, a dot dispersion type systematic dither having a regular pattern such as a Bayer type dither may be used. In this case, the biggest problem with Bayer-type dithering that “lines may disappear” can be solved. In addition, even when dot-concentrated dither such as halftone dot dither or green noise mask is used, problems such as broken lines at halftone dot pitches can be solved and useful. The normal part with a two-dimensional spread is a dither pattern such as a Bayer, halftone dot, green noise mask, etc., but the error diffusion method works in the fine line part, and it can be reproduced without the fine line disappearing or being divided. This is because a tone can be realized.

C−2.変形例2:
第2実施形態において、着目画素データDnに乗算する係数αdrを、着目画素データDnの関数にする際、ルックアップテーブルを参照して、係数αdrを求めるものとしても良い。こうすれば、係数αdrを自由に設定することができる。画像の階調値に応じて変えるだけでなく、画像の種類(線画か自然画像か等)を判断して変更するようにしても良い。インク色毎に、係数αdrを設定するものとしても良い。こうすれば、カラー印刷において、インク毎に、ディザにより発生するドットと誤差拡散により発生するドットとの比率を変更することができる。更に、インク滴が大中小など複数種類発生できるプリンターにおいて、階調値から各種類のドットの発生率をルックアップテーブルなどにより求めてからハーフトーン処理する構成を採用した場合、ドットの種類毎に、係数αdrを設定するものとしても良い。
C-2. Modification 2:
In the second embodiment, when the coefficient αdr multiplied by the pixel-of-interest data Dn is used as a function of the pixel-of-interest data Dn, the coefficient αdr may be obtained by referring to a lookup table. In this way, the coefficient αdr can be set freely. In addition to changing according to the gradation value of the image, the type of image (line image or natural image, etc.) may be determined and changed. The coefficient αdr may be set for each ink color. In this way, in color printing, the ratio of dots generated by dithering and dots generated by error diffusion can be changed for each ink. In addition, in printers that can generate multiple types of ink droplets, such as large, medium, and small, if a configuration that uses halftone processing after determining the occurrence rate of each type of dot from the gradation value using a lookup table, etc. is used for each type of dot The coefficient αdr may be set.

C−3.変形例3:
誤差拡散法の適用に際して、誤差拡散範囲を、着目画素データDnによって適宜変更するだけでなく、例えば仮ディザの判断結果によって変更しても良い。あるいは、ドットが形成されるとされた場合の結果値RSLTを、仮ディザの判断結果によって変更するものとしても良い。仮ディザの判断結果によって、ドットONと判断された場合に、ドットが形成される場合の結果値RSLTを255より大きな値にすれば、配分される拡散誤差が大きくなり、周辺でのドットの発生が抑制され、トータルでのドット数が過剰になることを防ぐことができる。
C-3. Modification 3:
When applying the error diffusion method, the error diffusion range may be changed depending on the target pixel data Dn as appropriate, for example, depending on the judgment result of the temporary dither. Alternatively, the result value RSLT when the dot is formed may be changed according to the determination result of the temporary dither. If the result value RSLT when the dot is formed is set to a value larger than 255 when it is determined that the dot is ON based on the determination result of the temporary dither, the distributed diffusion error increases, and the generation of dots in the vicinity Is suppressed, and the total number of dots can be prevented from becoming excessive.

C−4.変形例4:
上記実施形態では、特定の階調範囲に関して、少なくとも低位閾値THe_Lに下に凸の特性を持たせたが、これに加えて、この特定の階調範囲において、誤差拡散用階調値THeまたは画素データDnににノイズを加えても良い。ノイズを加えることにより、特定のドットバターンを生じにくくさせることができるからである。なお、このノイズの大きさを、低位閾値THe_Lの下に凸の特性に合わせて、階調値に依存した値とし、低位閾値THe_Lを図9に例示したように、下に凸の特性を有しない特性としても良い。このような特性のノイズを加えることは、所定の階調範囲において、低位閾値THe_Lに下に凸の特性を付与することと略等価だからである。
C-4. Modification 4:
In the above-described embodiment, at least the lower threshold value THe_L has a downward convex characteristic with respect to a specific gradation range. In addition, in this specific gradation range, the error diffusion gradation value THe or the pixel Noise may be added to the data Dn. This is because it is possible to make it difficult to generate a specific dot pattern by adding noise. The magnitude of this noise is set to a value depending on the gradation value in accordance with the convex characteristic below the low threshold THe_L, and the low threshold THe_L has a convex characteristic below as illustrated in FIG. It may be a characteristic that does not. This is because adding noise having such characteristics is substantially equivalent to imparting a downward convex characteristic to the lower threshold THe_L in a predetermined gradation range.

C−5.変形例5:
上記実施形態では、印刷装置として、ラインプリンタータイプのインクジェットプリンター20を用いたが、他の形式のプリンター、例えば印刷ヘッドが印刷媒体の幅方向に移動しながらドットを形成するシリアルプリンター、レーザープリンターのようなページプリンターなどとして実現しても良い。また、カラープリンターに限られず、モノクロ印刷の用プリンターとして実現しても良い。更に、インクジェットタイプに限られず、熱昇華型プリンターやドットインパクト型など、種々のタイプのプリンターにも適用可能である。インクジェットプリンターにあっては、インクの吐出をピエゾなどの電歪素子によるものの他、ヒーターを用いたインクの突沸によるもの(いわゆるバブルジェット(登録商標)方式)なども採用可能である。
C-5. Modification 5:
In the above-described embodiment, the line printer type inkjet printer 20 is used as the printing apparatus. However, other types of printers, such as serial printers and laser printers that form dots while the print head moves in the width direction of the print medium, are used. It may be realized as a page printer. Further, the printer is not limited to a color printer, and may be realized as a printer for monochrome printing. Furthermore, the present invention is not limited to the ink jet type, and can be applied to various types of printers such as a thermal sublimation type printer and a dot impact type. In an ink jet printer, ink ejection by an electrostrictive element such as a piezo, ink ejection by using a heater (so-called bubble jet (registered trademark) system), or the like can be employed.

また、画像処理のみを行なう画像処理装置に適用することも差し支えない。図3、図11などに例示したハーフトーン処理は、コンピューターで実行される専用のアプリケーションプログラムとして実現しても良いし、RiPなど専用の装置において実施しても良い。あるいは、コンピュータとプリンターとを接続して用いるものとし、プリンタードライバ内で画像処理の一部または全部を実行するものとして良い。更には、ネットワーク上に、こうした画像処理を行なう専用のサーバを置き、他のコンピューターやプリンターからの要求に応じて、画像データを処理する形態で運用しても差し支えない。   Further, the present invention may be applied to an image processing apparatus that performs only image processing. The halftone processing illustrated in FIGS. 3 and 11 may be realized as a dedicated application program executed by a computer, or may be performed in a dedicated device such as RiP. Alternatively, a computer and a printer may be connected and used, and part or all of the image processing may be executed within the printer driver. Furthermore, a dedicated server for performing such image processing may be placed on the network, and the image data may be processed in response to a request from another computer or printer.

本発明は、上述の実施形態や実施例、変形例に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態、実施例、変形例中の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行なうことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。   The present invention is not limited to the above-described embodiments, examples, and modifications, and can be realized with various configurations without departing from the spirit thereof. For example, the technical features in the embodiments, examples, and 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 above-described 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…制御ユニット
40…CPU
41…入力部
42…ハーフトーン処理部
43…比較部
44…誤差拡散部
46…印刷部
51…ROM
52…RAM
60…EEPROM
61…ディザマスク
62…誤差拡散閾値テーブル
74…紙送りモータ
75…プラテン
82〜85…インクカートリッジ
90…印刷ヘッド
92〜95…供給管
98…メモリカードスロット
99…操作パネル
P…印刷媒体
MC…メモリカード
20 ... Printer 30 ... Control unit 40 ... CPU
DESCRIPTION OF SYMBOLS 41 ... Input part 42 ... Halftone processing part 43 ... Comparison part 44 ... Error diffusion part 46 ... Printing part 51 ... ROM
52 ... RAM
60 ... EEPROM
61 ... Dither mask 62 ... Error diffusion threshold table 74 ... Paper feed motor 75 ... Platen 82-85 ... Ink cartridge 90 ... Print head 92-95 ... Supply pipe 98 ... Memory card slot 99 ... Operation panel P ... Printing medium MC ... Memory card

Claims (10)

所定の画像を表す画像データの印刷を行う印刷装置であって、
前記画像データを入力する入力部と、
前記画像データに基づいて、ドットの形成の有無を表すドットデータを生成するハーフトーン処理部と、
前記生成されたドットデータを用いて、前記画像の印刷を行う印刷部と
を備え、
前記ハーフトーン処理部は、
複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較する比較部と、
前記データ階調値を、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値と比較することにより、前記ドットデータを生成する誤差拡散部と
を備え、
前記誤差拡散法用閾値は、前記比較部の比較結果が、前記データ階調値が前記閾値以上の場合には、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定され、
前記低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有する
印刷装置。
A printing apparatus for printing image data representing a predetermined image,
An input unit for inputting the image data;
A halftone processing unit for generating dot data representing the presence or absence of dot formation based on the image data;
A printing unit that prints the image using the generated dot data; and
The halftone processing unit
A comparison unit that compares one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data;
An error diffusion unit that generates the dot data by comparing the data gradation value with a threshold value for error diffusion method, which is a threshold value used to determine whether or not dots are formed in the error diffusion method,
The threshold value for error diffusion method is smaller than a high threshold value set when the data gradation value is less than the threshold value when the comparison result of the comparison unit is greater than or equal to the threshold value. Set to the low threshold,
The lower threshold is determined according to the data gradation value, and has a singular portion that protrudes downward in a predetermined gradation range.
前記高位閾値は、前記データ階調値に応じて定められ、かつ前記所定の階調範囲で上に凸の特異部を有する請求項1記載の印刷装置。   The printing apparatus according to claim 1, wherein the high threshold value is determined according to the data gradation value, and has a singular portion that is convex upward in the predetermined gradation range. 前記複数の閾値は、組織的ディザ法に用いるディザマスクとして用意される請求項1または請求項2に記載の印刷装置。   The printing apparatus according to claim 1, wherein the plurality of threshold values are prepared as a dither mask used for a systematic dither method. 前記ディザマスクは、ブルーノイズ特性を有する請求項1から請求項3のいずれか一項記載の印刷装置。   The printing apparatus according to claim 1, wherein the dither mask has a blue noise characteristic. 前記特異部は、前記データ階調値の取り得る階調範囲において、複数箇所存在する請求項1から請求項4のいずれか一項に記載の印刷装置。   The printing apparatus according to any one of claims 1 to 4, wherein the singular part is present in a plurality of locations in a gradation range that the data gradation value can take. 前記低位閾値は、前記データ階調値が、予め定めた値以下では、前記データ階調値の最小値未満の値に設定された請求項1から請求項5のいずれか一項に記載の印刷装置。   The printing according to any one of claims 1 to 5, wherein the low threshold is set to a value less than a minimum value of the data gradation value when the data gradation value is equal to or less than a predetermined value. apparatus. 前記特異部は、前記データ階調値の最大階調数に対して整数比の関係となる階調値を少なくとも1つ含む請求項1から請求項6のいずれか一項に記載の印刷装置。   The printing apparatus according to claim 1, wherein the singular part includes at least one gradation value having an integer ratio relationship with respect to the maximum number of gradations of the data gradation value. 所定の画像を表す画像データの印刷用データを生成する印刷用データ生成装置であって、
前記画像データを入力する入力部と、
前記画像データに基づいて、ドットの形成の有無を表すドットデータを生成するハーフトーン処理部と、
を備え、
前記ハーフトーン処理部は、
複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較する比較部と、
前記データ階調値を、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値と比較することにより、前記ドットデータを生成する誤差拡散部と
を備え、
前記誤差拡散法用閾値は、前記比較部の比較結果が、前記データ階調値が前記閾値以上の場合には、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定され、
前記低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有する
印刷用データ生成装置。
A print data generation device that generates print data of image data representing a predetermined image,
An input unit for inputting the image data;
A halftone processing unit for generating dot data representing the presence or absence of dot formation based on the image data;
With
The halftone processing unit
A comparison unit that compares one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data;
An error diffusion unit that generates the dot data by comparing the data gradation value with a threshold value for error diffusion method, which is a threshold value used to determine whether or not dots are formed in the error diffusion method,
The threshold value for error diffusion method is smaller than a high threshold value set when the data gradation value is less than the threshold value when the comparison result of the comparison unit is greater than or equal to the threshold value. Set to the low threshold,
The low threshold value is determined according to the data gradation value, and has a singular part that protrudes downward in a predetermined gradation range.
所定の画像を表す画像データの印刷用データを生成する方法であって、
前記画像データを入力し、
複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較し、
前記比較により、前記データ階調値が前記閾値以上の場合には、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値を、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定し、
該設定した前記誤差拡散法用閾値を用いて、前記誤差拡散法により、前記ドット形成の有無を表すドットデータを生成し、
前記低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有する
印刷用データの生成方法。
A method for generating print data of image data representing a predetermined image,
Input the image data,
Comparing one of a plurality of threshold values with a data gradation value which is a gradation value of the input image data;
As a result of the comparison, when the data tone value is equal to or greater than the threshold value, an error diffusion method threshold value, which is a threshold value used to determine whether or not to form dots in the error diffusion method, is set, and the data tone value is less than the threshold value. Set to a lower threshold that is lower than the higher threshold set in some cases,
Using the set error diffusion method threshold, the error diffusion method generates dot data indicating the presence or absence of the dot formation,
The low threshold value is determined in accordance with the data gradation value, and the printing data generation method has a singular part protruding downward in a predetermined gradation range.
所定の画像を表す画像データの印刷用データを生成するための印刷用データ生成プログラムであって、
前記画像データを入力する機能と、
複数の閾値の1つと、前記入力された画像データの階調値であるデータ階調値とを比較する機能と、
前記比較により、前記データ階調値が前記閾値以上の場合には、誤差拡散法におけるドット形成の有無の判断に用いる閾値である誤差拡散法用閾値を、前記データ階調値が前記閾値未満である場合に設定される高位閾値より小さな低位閾値に設定する機能と、
該設定した前記誤差拡散法用閾値を用いて、前記誤差拡散法により、前記ドットの形成の有無を表すドットデータを生成する機能と、
をコンピューターに実現させ、
前記低位閾値は、前記データ階調値に応じて定められ、かつ所定の階調範囲で下に凸の特異部を有する
印刷用データ生成プログラム。
A print data generation program for generating print data of image data representing a predetermined image,
A function of inputting the image data;
A function of comparing one of a plurality of threshold values with a data gradation value that is a gradation value of the input image data;
As a result of the comparison, when the data tone value is equal to or greater than the threshold value, an error diffusion method threshold value, which is a threshold value used to determine whether or not to form dots in the error diffusion method, A function for setting a lower threshold value that is smaller than the higher threshold value set in some cases;
A function of generating dot data indicating the presence or absence of the dot formation by the error diffusion method using the set threshold value for the error diffusion method;
To the computer,
The low-order threshold value is determined according to the data gradation value, and has a singular part that protrudes downward in a predetermined gradation range.
JP2014041098A 2014-03-04 2014-03-04 Printing apparatus, printing data generation apparatus and method, and printing data generation program Active JP6221838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014041098A JP6221838B2 (en) 2014-03-04 2014-03-04 Printing apparatus, printing data generation apparatus and method, and printing data generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014041098A JP6221838B2 (en) 2014-03-04 2014-03-04 Printing apparatus, printing data generation apparatus and method, and printing data generation program

Publications (3)

Publication Number Publication Date
JP2015167307A true JP2015167307A (en) 2015-09-24
JP2015167307A5 JP2015167307A5 (en) 2017-03-16
JP6221838B2 JP6221838B2 (en) 2017-11-01

Family

ID=54258004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014041098A Active JP6221838B2 (en) 2014-03-04 2014-03-04 Printing apparatus, printing data generation apparatus and method, and printing data generation program

Country Status (1)

Country Link
JP (1) JP6221838B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002185785A (en) * 2000-12-12 2002-06-28 Ricoh Co Ltd Image processing method and device, recording medium
JP2011066594A (en) * 2009-09-16 2011-03-31 Seiko Epson Corp Printing apparatus, printing data generating apparatus, printing method and program thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002185785A (en) * 2000-12-12 2002-06-28 Ricoh Co Ltd Image processing method and device, recording medium
JP2011066594A (en) * 2009-09-16 2011-03-31 Seiko Epson Corp Printing apparatus, printing data generating apparatus, printing method and program thereof

Also Published As

Publication number Publication date
JP6221838B2 (en) 2017-11-01

Similar Documents

Publication Publication Date Title
US20080259361A1 (en) High quality halftone process
JP6587552B2 (en) Image processing apparatus and image processing method
JP6256108B2 (en) Printing apparatus, printing data generation apparatus and method, and printing data generation program
US8363251B2 (en) Image forming apparatus, print data generation method and computer program for forming an image with halftone processing that uses constraint data
US8253974B2 (en) Image forming apparatus, image processing apparatus, and control method therefor
JP5505048B2 (en) Printing device, printing method, print data generation program
JP5053903B2 (en) Image processing apparatus and method
JP5994919B2 (en) Printing apparatus, printing method, and computer program
JP6175914B2 (en) Printing apparatus, printing method, and image processing apparatus
JP6175915B2 (en) Printing apparatus, printing method, program, and image processing apparatus
US8976416B2 (en) Image processing apparatus and method thereof
US20160173724A1 (en) Printing apparatus, printing method, program, and image processing apparatus
JP5521337B2 (en) Printing apparatus, printing method, computer program, and recording medium
US20120062636A1 (en) Image processing apparatus and image processing method
JP6221838B2 (en) Printing apparatus, printing data generation apparatus and method, and printing data generation program
JP7242272B2 (en) Dither matrix generation device, generation method, image processing device using dither matrix, image processing method, and program
JP5979261B2 (en) Printing apparatus and printing method
JP5171321B2 (en) Image processing apparatus and image processing method
JP7159789B2 (en) Recording control device, recording device and recording control method
JP2010017975A (en) Image forming apparatus, and its controller and computer program
JP2006205717A (en) Printer, printing program, printing method, image processor, image processing program, image processing method and recording medium having the programs recorded
JP2020192784A (en) Image processing device, printing method and printing device
JP2016163080A (en) Printing device, printing method, image processing apparatus and computer program
JP5341467B2 (en) Image processing apparatus and image processing method
JP2006248131A (en) Image processor, image forming apparatus, image processing method and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170207

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170831

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170918

R150 Certificate of patent or registration of utility model

Ref document number: 6221838

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150