JP2006025217A - Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program - Google Patents
Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program Download PDFInfo
- Publication number
- JP2006025217A JP2006025217A JP2004201881A JP2004201881A JP2006025217A JP 2006025217 A JP2006025217 A JP 2006025217A JP 2004201881 A JP2004201881 A JP 2004201881A JP 2004201881 A JP2004201881 A JP 2004201881A JP 2006025217 A JP2006025217 A JP 2006025217A
- Authority
- JP
- Japan
- Prior art keywords
- gradation
- pixel
- data
- value
- image processing
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、複数の濃度をもつドットを打ち出すことのできるプリンタなどの画像出力装置において、入力画像の階調データを、所定の手法にて階調変換することによって、画像出力装置の出力画像に特異パターンが発生することを抑え、優れた画質の画像を生成する画像処理技術に関する。 In an image output apparatus such as a printer capable of ejecting dots having a plurality of densities, the present invention converts the gradation data of an input image into a output image of the image output apparatus by performing gradation conversion by a predetermined method. The present invention relates to an image processing technique that suppresses occurrence of a peculiar pattern and generates an image with excellent image quality.
従来より、レーザープリンタやインクジェットプリンタなど画像出力装置では、入力画像の階調データを画素ごとに所定の閾値で2値化を行なっていた。2値化することによって階調値が付与された画素の位置には、所定の大きさのドットを形成して印刷用紙に印刷するようにして、出力画像が出力される。ここで、多値の階調データを、2値化した階調データに変換する処理のことをハーフトーン処理と一般に称している。 Conventionally, in an image output device such as a laser printer or an ink jet printer, gradation data of an input image is binarized with a predetermined threshold value for each pixel. An output image is output by forming dots of a predetermined size at the position of the pixel to which the gradation value is given by binarization and printing on the printing paper. Here, the process of converting multi-value gradation data into binarized gradation data is generally referred to as halftone processing.
近年、インクの濃淡およびドットの大小を変化させることにより複数の濃度をもつドットを形成することのできるインクジェットプリンタが現れてきている。そこで、特許文献1には、ハーフトーン処理を適切に行い複数の濃度のドットを生成する為に、濃い濃度のドットの処理については組織的ディザによるハーフトーン処理を行い、入力画像の階調データとの誤差データを最も淡い濃度をもつドットで打つ技術が開示されている。また、この時の淡い濃度をもつドットの処理については、誤差拡散法によるハーフトーン処理が用いられている。
In recent years, ink jet printers that can form dots having a plurality of densities by changing the density of ink and the size of dots have appeared. Therefore, in
誤差拡散法によるハーフトーン処理については、形成するドットの位置によって、例えば出力画像のドットが鎖状につながるなど、入力画像には存在しなかった特異パターンが出力画像に発生することがある。そこで、このような特異パターンの発生を抑えるため、例えば、ドットのつながりを少なくする技術が特許文献2に提案されている。特許文献2では、入力画像の画素について、階調データの階調値合計が閾値に達するまで所定のテーブルにより画素を次々に探索・選択するようにして、セルの生成を行い、セルの中央付近の位置にドットを形成する技術が開示されている。
In the halftone processing by the error diffusion method, a specific pattern that does not exist in the input image may occur in the output image, for example, the dots of the output image are connected in a chain depending on the positions of the dots to be formed. In order to suppress the occurrence of such a unique pattern, for example,
特許文献1では、複数の濃度(濃淡)をもつドットを打つことのできるインクジェットプリンタについて、組織的ディザにより生じた誤差データを誤差拡散法を用いて拡散している。しかし、誤差拡散法によると、例えば、特許文献1の図17にみられるような重みをつけて誤差を伝播させるため、伝播方向が特定の方向に偏ってしまう。また、この重みの分布を変化させるといった処理は行っていないので、常に一定の方向に伝播することになる。したがって、特許文献1にある技術では、誤差拡散法による量子化に伴って生ずる画素値の差分を同じ方向に拡散することにより、量子化ノイズが増幅されて特異パターンが生じてしまうという課題があった。
In
また、特許文献2におけるハーフトーン処理では、誤差拡散法における特異パターンの発生を抑えるため、セルを構成する画素の探索を所定の探索順を記録したテーブルを用いて行う方法が提案されている。しかし、例えば、特許文献2の図4に示される画素の探索順では、決まって画素の右側の画素から選択するので、テーブル内で左側に存在する画素は、左隣の画素を用いてセルを生成したときに既に処理済みとなっている場合が多く、結果的に生成されるセルが歪んだ形(例えば三日月型)となってしまう。かかる形状のセルでは、セルの中央付近がそのセルの外側に位置することもある。このようなセルについては、セルの中央付近の位置にドットを形成させると、隣のセルのドットと重なってしまうため、出力ドットの偏りが発生し、結果的に特異パターンを発生させてしまうという課題があった。
In addition, in the halftone processing in
また、特許文献2では、同じ形状のセルが連続することに起因して出力画像に生じる規則的なパターンを防ぐため、画素の探索順を記録したテーブルを複数用意し、使用するテーブルを、セル毎に順にまたはランダムに切り替え、セルの形状を不規則にする処理も提案されている。しかしながら、かかる処理は、複数のテーブルを用意するために処理負荷が大きく、処理速度が遅くなってしまうという課題があった。また、例えば、入力画像がおおよそ同じ濃度の階調データであるような場合は、探索順をランダムにしてもほぼ同じ形状のセルが生成されてしまうこともあり、結果的に規則的な特異パターンを生じてしまうという課題もあった。
Further, in
本発明は、このような課題の少なくとも一部を解決し、複数の濃度をもつドットから特異パターンの発生を抑えた出力画像を取得する画像処理装置、印刷装置、画像処理方法、画像処理プログラム、またはそのプログラムを記録した記録媒体を提供することを目的とする。 The present invention solves at least a part of such problems, and an image processing apparatus, a printing apparatus, an image processing method, an image processing program for acquiring an output image in which generation of a specific pattern is suppressed from dots having a plurality of densities, Another object is to provide a recording medium on which the program is recorded.
上記課題を解決するために、本発明では、画素ごとに、P(Pは2以上の整数)種類の階調値のうちいずれかの値をもつ入力データに階調変換を行う画像処理装置であって、入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換手段と、画素ごとに、第1の階調変換手段により取得した階調データと入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換手段と、を備えたことを要旨とする。 In order to solve the above-described problem, the present invention provides an image processing apparatus that performs gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel. The first gradation conversion for converting the gradation value of the input data into gradation data consisting of Q (Q <P, Q is an integer of 2 or more) types of gradation values for each pixel. M, which is an error between the first gradation conversion means for obtaining gradation data and the gradation data obtained by the first gradation conversion means and the input data for each pixel (M is 2 With respect to error data consisting of the above (integer) types of gradation numbers, new pixels are selected one after another until the sum of gradation values becomes equal to or greater than a threshold value, and a pixel group is generated. And second gradation conversion means for providing N (N is an integer of 2 or more) kinds of gradation values. And effect.
この構成によれば、P種類の階調数からなる入力データからQ(Q<P)種類の階調値からなる階調データを取得しており、より少ない階調数で表現された階調値に変換すること(第1の階調変換)によって、入力画像の階調データにバラツキを与える。そして、バラツキが与えられた階調データと入力データとの間の誤差分である誤差データについて、画素ごとに第2の階調変換処理を行うことにより、階調データの階調値の総和が閾値以上となるまで、階調データの新たな画素を次々に選択して画素群(以下、「セル」と呼ぶ)を生成する。そして、生成したセル内の画素の階調値合計が閾値以上となったセルの所定画素に、N種類の階調値を付与する。こうすることによって、セルに組み入れる画素の選択に際して、選択順をセルごとに変更しなくても画素の選択順がバラツクことになるため、生成されるセルの形状は不規則となり、誤差データにバラツキを与えることができる。すなわち、階調データおよび誤差データの画素値に基づいて取得する出力画像は、第1の階調変換により階調データにバラツキを与えると共に、その誤差である誤差データに第2の階調変換を行うことで、第1の階調変換後の階調データと、第2の階調変換後の誤差データとを合わせることにより取得される。したがって、入力データに対する誤差が低減すると共に、誤差データを適切にバラツキを与えた処理を行うことで特異パターンの発生を抑えた視覚的に快適な出力画像を得ることができる。このようにして、Q種類の階調数をもつ階調データと、N種類の階調値をもつ誤差データとから、P種類の階調値をもつ入力データを再現しながら視覚的に快適な出力画像を得ることができる。 According to this configuration, gradation data composed of Q (Q <P) types of gradation values is acquired from input data composed of P types of gradations, and gradations expressed with a smaller number of gradations are obtained. By converting to a value (first gradation conversion), the gradation data of the input image is varied. Then, by performing the second gradation conversion process for each pixel on the error data that is an error between the gradation data to which the variation is given and the input data, the sum of the gradation values of the gradation data is obtained. Until the threshold value is exceeded, new pixels of the gradation data are selected one after another to generate a pixel group (hereinafter referred to as “cell”). Then, N types of gradation values are assigned to predetermined pixels of the cell in which the total gradation value of the pixels in the generated cell is equal to or greater than the threshold value. In this way, when selecting the pixels to be incorporated into the cell, the pixel selection order varies even if the selection order is not changed for each cell. Therefore, the shape of the generated cell becomes irregular and the error data varies. Can be given. In other words, the output image acquired based on the pixel values of the gradation data and the error data gives a variation in the gradation data by the first gradation conversion, and performs the second gradation conversion on the error data that is the error. By performing, it is acquired by combining the gradation data after the first gradation conversion and the error data after the second gradation conversion. Therefore, an error with respect to input data is reduced, and a visually comfortable output image in which the occurrence of a peculiar pattern is suppressed can be obtained by performing processing in which error data is appropriately varied. In this manner, visually comfortable input data having P types of gradation values is reproduced from gradation data having Q types of gradation numbers and error data having N types of gradation values. An output image can be obtained.
ここで、入力データのもつ階調値を複数の階調値に分割し、それぞれの階調値を有する複数の階調データを取得する階調値分割手段を、更に備え、第1の階調変換手段は、分割した複数の階調データに第1の階調変換を行い、第2の階調変換手段は、複数の階調データと入力データとの間の誤差分である誤差データに対して第2の階調変換を行うことが好ましい。 Here, the first gradation is further provided with gradation value dividing means for dividing the gradation value of the input data into a plurality of gradation values and acquiring a plurality of gradation data having the respective gradation values. The conversion means performs first gradation conversion on the plurality of divided gradation data, and the second gradation conversion means applies error data which is an error between the plurality of gradation data and the input data. It is preferable to perform the second gradation conversion.
このようにすれば、複数の階調データおよび誤差データの画素値に基づいて、出力画像を得ることができる。なお、異なる階調値をもつようにして複数の階調値を取得することがより望ましい。こうすれば、異なる階調値をもつ階調データおよび誤差データを組み合わせることにより、より多くの階調値を表現し、視覚的に快適な出力画像を得ることができる。例えば、複数の階調データをそれぞれ異なる濃度をもつドットに対応させれば、複数のドットを組み合わせて用いることにより、単独のドットを用いた場合に比べて表現できる階調値を増やしながら視覚的に快適な画像を得ることができる。 In this way, an output image can be obtained based on the pixel values of the plurality of gradation data and error data. It is more desirable to acquire a plurality of gradation values so as to have different gradation values. In this way, it is possible to express more gradation values and obtain a visually comfortable output image by combining gradation data having different gradation values and error data. For example, if a plurality of gradation data are associated with dots having different densities, the combination of a plurality of dots makes it possible to increase the number of gradation values that can be expressed compared to the case where a single dot is used. A comfortable image can be obtained.
ここで、第2の階調変換手段は、生成した画素群の重心位置から最も近い画素を新たに選択するようにして、画素群を生成し、画素群の重心位置に基づいて決定した画素にN種類の階調値を付与することが好ましい。 Here, the second gradation converting unit generates a pixel group by newly selecting a pixel closest to the centroid position of the generated pixel group, and determines the pixel determined based on the centroid position of the pixel group. It is preferable to provide N kinds of gradation values.
このようにすれば、セルの生成処理に際して、常にセルの重心に最も近い画素を選択してセルに組み入れていくため、生成されるセルの形状はセルの重心を中心としておおよそ円形状になる。そして、その円のおおよそ中心位置に階調値を付与することとなる。したがって、例えば、画素ごとに均一な階調値をもつデータに対して第2の階調変換を行い階調値を付与する場合、階調値が付与された画素間の距離がほぼ均一となる。このように、階調値の分散性が良くなるので、快適な出力画像を得ることができる。 In this way, in the cell generation process, the pixel closest to the center of gravity of the cell is always selected and incorporated into the cell, so the shape of the generated cell is approximately circular with the center of gravity of the cell as the center. Then, a gradation value is given to the approximate center position of the circle. Therefore, for example, when the second gradation conversion is performed on the data having a uniform gradation value for each pixel and the gradation value is given, the distance between the pixels to which the gradation value is given becomes almost uniform. . As described above, since the dispersibility of gradation values is improved, a comfortable output image can be obtained.
ここで、誤差データのもつ階調値の符号を画素ごとに判断し、符号が負である画素には符号が正となる画素から正の階調値を移動することにより、当該画素のもつ負の階調値を相殺した誤差データを取得する階調値移動手段を、更に備え、第2の階調変換手段は、負の階調値を相殺した誤差データに対して、第2の階調変換を行うことが好ましい。 Here, the sign of the gradation value of the error data is determined for each pixel, and the negative sign of the pixel is determined by moving the positive gradation value from the pixel having the positive sign to the pixel having the negative sign. Gradation value moving means for acquiring error data that cancels out the gradation value of the second gradation conversion means, and the second gradation conversion means applies the second gradation to the error data that cancels out the negative gradation value. Conversion is preferably performed.
このようにすれば、第1の変換手段による処理後の階調成分データと、入力データとの差分値を有する誤差データについて、符号が負である画素に対して符号が正である画素から階調値を移動して、負の階調値を相殺することで、正の階調値を有した誤差データに対して第2の階調変換をおこなうことができる。ここで、第2の階調変換に際し、セル内に負の階調値があった場合、負の階調値をもつ画素の影響によりセル内の画素の重心はセルの外側に位置し、セル外に階調値が付与される可能性がある。このような場合、他のセルの内側にドットを形成させることになり、他のセルにより生成されるドットと重なってしまう可能性が高まるので、出力ドットに偏りが発生し、結果的に特異パターンを発生することとなる。そこで、階調値移動手段が誤差データの負値を相殺することにより、セル外部の画素に階調値が与えられることを防ぐことができる。したがって、ドット間距離の再現性・ドットの分散性が向上した第2の階調変換が行なわれることになるので、快適な出力画像を得ることができる。なお、正の階調値を有する画素を選択する際には、負の階調値を有する画素より最も近い正の階調値を有する画素を選択するようにして処理するとよい。 In this way, with respect to the error data having a difference value between the gradation component data processed by the first conversion means and the input data, the pixel having a positive sign with respect to the pixel having a negative sign is divided from the pixel having the positive sign. By moving the tone value and canceling the negative tone value, the second tone conversion can be performed on the error data having the positive tone value. Here, when there is a negative gradation value in the cell at the time of the second gradation conversion, the center of gravity of the pixel in the cell is located outside the cell due to the influence of the pixel having the negative gradation value. There is a possibility that a gradation value is given outside. In such a case, dots are formed inside other cells, which increases the possibility of overlapping with dots generated by other cells, resulting in biased output dots, resulting in unique patterns. Will be generated. Therefore, it is possible to prevent the gradation value from being given to the pixel outside the cell by the gradation value moving means canceling out the negative value of the error data. Therefore, the second gradation conversion with improved reproducibility of dot distance and dot dispersibility is performed, so that a comfortable output image can be obtained. Note that when selecting a pixel having a positive gradation value, it is preferable to perform processing by selecting a pixel having a positive gradation value closest to a pixel having a negative gradation value.
ここで、第2の階調変換手段は、画素選択のための第1の基準点を設定し、第1の基準点に基づいて、画素ごとの階調値の総和が閾値以上となるまでM種類の階調値を有する画素を選択するようにして画素群を生成し、生成した画素群に基づいて第2の基準点を決定し、第2の基準点に基づいて決定した画素にN種類の階調値を付与することが好ましい。 Here, the second gradation conversion means sets a first reference point for pixel selection, and M based on the first reference point until the sum of gradation values for each pixel becomes equal to or greater than a threshold value. A pixel group is generated by selecting pixels having different gradation values, a second reference point is determined based on the generated pixel group, and N types of pixels are determined based on the second reference point. It is preferable to give the gradation value of.
このようにすれば、セルの生成に際してセルに組み入れる画素を選択するための基準点と、生成したセルに形成するドットの位置を決定する基準点とを区別することになる。例えば、組み入れる画素をセルの形状によって特定される基準点を用いて選択し、セル内の各画素の階調値とは無関係にセルを生成することができる。したがって、セルの形状のみに着目して、組み入れる画素を選択することができる。また、画素の階調値に無関係に処理を行うので、誤差データが負値を持っていた場合であっても、負値の相殺を行うことなく、セル内に階調値を与えるようにして処理を行うことができる。 In this way, a reference point for selecting a pixel to be incorporated into the cell when generating the cell is distinguished from a reference point for determining the position of the dot formed in the generated cell. For example, a pixel to be incorporated can be selected using a reference point specified by the shape of the cell, and a cell can be generated regardless of the gradation value of each pixel in the cell. Therefore, it is possible to select a pixel to be incorporated by paying attention only to the shape of the cell. In addition, since the process is performed regardless of the gradation value of the pixel, even if the error data has a negative value, the gradation value is given in the cell without canceling the negative value. Processing can be performed.
ここで、第2の階調変換手段は、第1の基準点を、画素を所定の回数選択するごとに更新させるとしてもよい。 Here, the second gradation conversion means may update the first reference point every time a pixel is selected a predetermined number of times.
このようにすれば、例えば、生成されるセルが第1の基準点を固定にした場合よりも円状に形成される可能性が高くなり、ドット間距離が均一に保たれ快適な出力画像を得ることが可能となる。 In this way, for example, the generated cells are more likely to be formed in a circular shape than when the first reference point is fixed, and a comfortable output image with a uniform inter-dot distance is maintained. Can be obtained.
ここで、第1の基準点は、選択した画素の位置から演算した中心位置であり、第2の基準点は、画素群の画素の位置と階調値とから演算した重心位置であることが好ましい。 Here, the first reference point is a center position calculated from the position of the selected pixel, and the second reference point is a center of gravity position calculated from the pixel position of the pixel group and the gradation value. preferable.
このようにすれば、画素群に組み入れる画素の選択を各画素の位置を基準に演算すればよく、重心を演算する場合に比べて計算処理に関する処理負荷を軽減できる。また形成するドットの位置は、生成したセルの重心とするため、入力画像の階調データに忠実なドットをセル内に形成することができる。 In this way, selection of pixels to be incorporated into the pixel group may be calculated based on the position of each pixel, and the processing load related to calculation processing can be reduced as compared with the case where the center of gravity is calculated. Further, since the position of the dot to be formed is the center of gravity of the generated cell, it is possible to form a dot faithful to the gradation data of the input image in the cell.
ここで、第1の基準点は、選択した画素の位置から演算した中心位置であり、第2の基準点は、画素群の画素の位置から演算した中心位置であることが好ましい。 Here, it is preferable that the first reference point is a center position calculated from the position of the selected pixel, and the second reference point is a center position calculated from the position of the pixel of the pixel group.
このようにすれば、例えば、画素選択に用いる基準点およびドットを形成させるための基準点を決定する処理に際して、両方とも画素の階調値を含めた演算を行う必要がなくなるので、計算量を少なくして装置全体の処理効率を上げることができる。 In this way, for example, in the process of determining the reference point used for pixel selection and the reference point for forming the dot, it is not necessary to perform an operation including the gradation value of the pixel. The processing efficiency of the entire apparatus can be increased by reducing the number.
ここで、第2の階調変換手段は、新たな画素を選択し続け、生成した画素群における階調値の総和が閾値を超えたとき、階調値と閾値とを差分した階調値を、最後に選択した画素に戻すことが好ましい。 Here, the second gradation converting means continues to select new pixels, and when the sum of the gradation values in the generated pixel group exceeds the threshold value, the gradation value obtained by subtracting the gradation value from the threshold value is obtained. It is preferable to return to the last selected pixel.
このようにすれば、閾値を超えたセルに最後に組み入れられた画素に、閾値を超えた分の階調値を戻しているため、誤差データの階調値を第2の階調変換処理の途中で失われることがなく、元の画像とほぼ同じ位置に階調値が残るため、誤差データおよび入力データに忠実なドットを形成させることができる。 In this way, since the gradation value exceeding the threshold value is returned to the last pixel incorporated in the cell exceeding the threshold value, the gradation value of the error data is converted into the second gradation conversion process. Since the gradation value remains at almost the same position as the original image without being lost in the middle, dots that are faithful to the error data and the input data can be formed.
ここで、第1の階調変換手段は、組織的ディザ法、誤差拡散法または平均誤差最小法のうちのいずれかによる階調変換を行うことが好ましい。 Here, it is preferable that the first gradation conversion means performs gradation conversion by any one of a systematic dither method, an error diffusion method, and an average error minimum method.
このようにすれば、例えば、入力画像がおおよそ同じ濃度を表す階調値からなる入力データであるような場合、入力画像の入力データの階調値を所定の階調値に変換することによって増減することができる。この結果、階調データおよび誤差データがバラツクことになり、その後行われる第2の階調変換において、セルごとに画素の選択順を変更しなくても、ほぼ同じ形状のセルが生成される確率が減少する。したがって、セル形状がバラツクことによって第2の階調変換を行った誤差データに特異パターンが生じ難くなり、視覚的に快適な出力画像が得られる。 In this way, for example, when the input image is input data composed of gradation values representing approximately the same density, the gradation value of the input data of the input image is increased or decreased by converting it to a predetermined gradation value. can do. As a result, gradation data and error data vary, and in the second gradation conversion performed thereafter, the probability that cells having substantially the same shape are generated without changing the pixel selection order for each cell. Decrease. Therefore, a singular pattern is unlikely to occur in the error data subjected to the second gradation conversion due to the variation in the cell shape, and a visually comfortable output image can be obtained.
ここで、本発明は、上述した画像処理装置を備え、印刷媒体上に複数のドットを形成することにより画像を印刷する印刷装置において、複数の階調データに対応して、濃度および大きさの少なくとも一方の異なるドットを形成することにより印刷を行うことを特徴とする印刷装置としてもよい。 Here, the present invention provides the above-described image processing apparatus, and in a printing apparatus that prints an image by forming a plurality of dots on a print medium, density and size corresponding to a plurality of gradation data. It is good also as a printing apparatus characterized by printing by forming at least one different dot.
このようにすれば、いわゆるインクジェットプリンタにおいて、複数の階調データに対応して、濃度および大きさの少なくとも一方の異なるドットを形成することができる。したがって、複数の階調データの階調値に対応して複数の異なるドットを生成して印刷を行うことを考えると、第1の階調変換を行なった階調値に対応するドットを生成し、入力データに対する誤差を、新たにドットを生成することにより低減することができる。また、この誤差の補正においては、特異パターンの発生を抑えた誤差データに対応してドットを生成することができる。以上のことから、階調値の再現性が優れると共に、視覚的に快適な出力画像を印刷することができる。 In this way, in a so-called ink jet printer, it is possible to form dots having at least one different density and size corresponding to a plurality of gradation data. Therefore, considering that printing is performed by generating a plurality of different dots corresponding to the gradation values of the plurality of gradation data, the dots corresponding to the gradation values subjected to the first gradation conversion are generated. The error with respect to the input data can be reduced by generating a new dot. Further, in this error correction, it is possible to generate dots corresponding to error data in which the generation of unique patterns is suppressed. From the above, it is possible to print an output image that is excellent in gradation value reproducibility and visually comfortable.
また、上記目的を達成する本発明の画像処理方法は、画素ごとに、P(Pは2以上の整数)種類の階調値のうちいずれかの値をもつ入力データに階調変換を行う画像処理方法であって、入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換ステップと、画素ごとに、第1の階調変換手段により取得した階調データと入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換ステップと、を備えたことを特徴とする。 The image processing method of the present invention that achieves the above object is an image that performs gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel. A first method for converting gradation values of input data into gradation data composed of gradation values of Q types (Q <P, Q is an integer of 2 or more) for each pixel. A first gradation conversion step that performs gradation conversion and acquires gradation data, and M (M), which is an error between the gradation data acquired by the first gradation conversion means and the input data, for each pixel. M is an integer greater than or equal to 2) For error data consisting of the number of types of gradations, new pixels are selected one after another until the sum of gradation values is equal to or greater than a threshold value, and a pixel group is generated. A second gradation conversion step of assigning N (N is an integer of 2 or more) kinds of gradation values to the pixels of , Characterized by comprising a.
この構成によれば、第1の階調変換により入力データにバラツキを与え、第1の変換処理による誤差分である誤差データに対して第2の変換処理を行う。第2の変換処理では、画素の選択に際して選択順をセルごとに変更しなくても、同じような形状のセルが連続して生成される確率が減少するため、特異パターンの発生を抑えた誤差データを得ることができる。そして、Q種類の階調値からなる第1の階調変換後の階調データと誤差データとからなる階調データを取得することができる。したがって、こうして得られた階調データより、視覚的に快適な出力画像を得ることができる。 According to this configuration, the input data is varied by the first gradation conversion, and the second conversion process is performed on the error data that is an error component of the first conversion process. In the second conversion process, even if the selection order is not changed for each cell when selecting a pixel, the probability that cells having the same shape are continuously generated decreases, so that an error that suppresses the occurrence of a singular pattern is suppressed. Data can be obtained. Then, it is possible to acquire gradation data composed of gradation data after the first gradation conversion composed of Q kinds of gradation values and error data. Therefore, a visually comfortable output image can be obtained from the gradation data thus obtained.
また、本発明はコンピュータプログラムまたはそのプログラムを記録した記録媒体としてもよい。すなわち、画素ごとに、P(Pは2以上の整数)種類の階調値のうちいずれかの値をもつ入力データに階調変換を行う画像処理プログラムであって、コンピュータを、入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換手段、画素ごとに、第1の階調変換手段により取得した階調データと入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換手段、として機能させることを特徴とする。また、このプログラムを記録した記録媒体としては、フレキシブルディスクやCD−ROM、ICカード、パンチカードなど、コンピュータが読み取り可能な種々の媒体を利用することができる。 Further, the present invention may be a computer program or a recording medium recording the program. That is, an image processing program that performs gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel, the computer having the input data Gradation data is obtained by performing first gradation conversion for converting gradation values into gradation data consisting of Q (Q <P, Q is an integer of 2 or more) types of gradation values for each pixel. The first gradation converting means for each pixel, M (M is an integer of 2 or more) types of gradations, which are errors between the gradation data acquired by the first gradation converting means and the input data. With respect to error data consisting of numbers, new pixels are selected one after another until the sum of gradation values is equal to or greater than a threshold value, and a pixel group is generated. Among the pixel groups, N (N is 2 or more) for a predetermined pixel (Integer) of the second gradation conversion means for assigning various gradation values. To. As a recording medium on which the program is recorded, various computer-readable media such as a flexible disk, a CD-ROM, an IC card, and a punch card can be used.
以下、本発明を具体化した本実施形態について図面に従って説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本実施形態のシステム全体を示す構成図である。図1に示すように、本システムは、大別してホストコンピュータ10と、画像出力装置20とから構成されている。
FIG. 1 is a configuration diagram showing the entire system of this embodiment. As shown in FIG. 1, this system is roughly composed of a
ホストコンピュータ10は、アプリケーション部11とラスタライズ部12とから構成される。アプリケーション部11は、文字データ、図形データ、ビットマップデータ等の印刷対象となる出力画像用のデータを生成する。例えば、ホストコンピュータ10でワードプロセッサや図形ツールなどのアプリケーションプログラムを使用してキーボード等の操作により文字データや図形データなどを生成する。そして生成したこれらのデータを、ラスタライズ部12に出力する。このようにして、上述したデータを印刷する対象として、以下に述べる処理を行うこととなる。もっとも、ホストコンピュータ10は、スキャナなどの画像入力装置(図示せず)から出力されるデータを受け付け、このデータをアプリケーション部11が生成するデータとしてラスタライズ部12へ出力するものとしてもよい。
The
ラスタライズ部12は、アプリケーション部11から出力された印刷対象のデータを画素ごと(又はドットごと)に8ビットの階調データに変換する。本実施形態では、R(レッド)、G(グリーン)、B(ブルー)の各色、画素ごとに8ビットの階調データを出力する。したがって、出力される階調データは、画素ごとに0から255までの256種類の値(階調値)を有することになる。実際には、ラスタライズ部12における階調データの生成処理は、ホストコンピュータ10に実装されたドライバによって行われている。ラスタライズ部12により生成された階調データは、画像出力装置20に出力される。
The rasterizing
画像出力装置(印刷装置)20は、全体として画像処理部30と印刷エンジン40とから構成されている。画像処理部30では、ホストコンピュータ10から出力された階調データに対して処理を行い、処理後のデータが印刷エンジン40に出力され、この印刷エンジン40にて実際に印刷用紙等の記録媒体への印刷が行われる。
The image output device (printing device) 20 includes an
ここで、印刷エンジンは、ドット状のインクを記録媒体に吐出するようにして印刷を行うが、本実施形態にある印刷エンジン40は、吐出するドットについて、濃淡・大小の選択を行うことができる。すなわち、印刷エンジン40は、濃大ドット・濃小ドット・淡大ドット・淡小ドットの4種類のドットを吐出することができる(詳細は後述する)。
Here, the print engine performs printing by ejecting dot-like ink onto a recording medium. However, the
画像処理部30は、ラスタライズ部からのRGBデータからCMYKデータを取得する色補正・色変換部31と、各色の階調データを複数の階調データに分割する階調値分割部33と、分割した各階調データに対応して濃大・濃小・淡大ドットを生成するドット生成部34と、生成したドットの誤差について負値を補正する負値補正部35と、淡小ドットを生成する淡小ドット生成部36と、から構成されている。このように、本実施形態に係る画像処理部30は、RGBデータからなる入力に対して、濃大・濃小・淡大・淡小ドットの4種類のドットを生成するものである。なお、画像処理部30でいう生成とは、各ドットごとにドットのオンオフを決定することを示している。実際には、各ドットはここで決定されたドットのオンオフ情報にしたがって、印刷ヘッド42により印刷紙などの記録媒体に吐出されるようにしてドットが生成される。
The
色補正・色変換部31は、ホストコンピュータ10より入力される256種類の階調値を有するRGB各8ビット(計24ビット)の階調データを受け取り、印刷エンジン40にて実際に印刷された印刷物が良好な色を表現できるように、色補正表32を用いてRGBの階調データの色補正処理を行う。その後、補正したRGBの階調データを、RGBからCMYKに色変換処理を行う。ここで、Cはシアン、Mはマゼンタ、Yはイエロー、Kはブラックを示している。もっとも、なお、このCMYKの階調データを、階調値分割部33に入力されるデータであることから、以下では入力階調データ(入力データ)Diと呼ぶこととする。
The color correction /
階調値分割部(階調値分割手段)33は、色補正及び色変換部31から出力される入力階調データDiの各階調値を分割し、濃大・濃小・淡大ドットのそれぞれに与えられるレベル値を決定する。そして、入力階調データDiの階調値に対応して、レベル値を有したレベルデータDlを取得する。ここで、レベル値とは次に行う濃大・濃小・淡大ドットの生成処理において用いるため、後述する図7のテーブルを用いて求められる値である。この処理を階調値分割処理と呼ぶ。
A gradation value dividing unit (gradation value dividing means) 33 divides each gradation value of the input gradation data Di output from the color correction and
ドット生成部(第1の階調変換手段)34は、階調値分割部33から出力される濃大・濃小・淡大ドットの各レベル値に対して、組織的ディザ法による階調変換処理を行い、2値化した量子化データDoを生成する。この2値化した量子化データDoは、濃大・濃小・淡大ドットの各ドットを生成するか否かに対応したデータである。すなわち、ドット生成部34では、画素ごとに階調値に対してディザマトリクスを閾値とする判定を行い、各ドットのオンオフを決定する。
The dot generation unit (first gradation conversion means) 34 performs gradation conversion by a systematic dither method for each level value of the large, dark, and light large dots output from the gradation
負値補正部(階調値移動手段)35は、ドット生成部34から出力される量子化データDoと各ドットのもつ濃度に基づいて、濃大・濃小・淡大ドットにより表現される濃度と、入力階調データDiの階調値との差分値を演算し、差分階調データ(誤差データ)Ddを取得する。そして、差分階調データDdの負の階調値について、正の階調値をもつ画素から階調値を移動することにより負の階調値を相殺する負値の補正処理を行う。
The negative value correction unit (tone value moving unit) 35 is a density expressed by the large, small, and light large dots based on the quantization data Do output from the
淡小ドット生成部(第2の階調値変換手段)36は、負値の補正処理を行った差分階調データDdに対して、差分値を所定の階調値を閾値として得られる量子化データDoに変換し、その量子化データDoを出力する。ここで、2値化した量子化データDoは、淡小ドットを生成するか否かに対応している。本実施形態では、淡小ドット生成処理として、複数の画素の重心GCに基づいてセルCLを構成し、セル内部の画素の重心GCにドットを生成させる処理(Circular Cell法、以下CC法)を用いる。CC法の具体的な内容については後述する。
そして、以上のようにして生成した濃大・濃小・淡大・淡小ドットのオンオフに対応する量子化データDoから駆動データを生成し、印刷エンジン40に出力する。
The light small dot generation unit (second gradation value conversion means) 36 quantizes the difference gradation data Dd subjected to the negative value correction processing, with the difference value being obtained with a predetermined gradation value as a threshold value. It converts to data Do and outputs the quantized data Do. Here, the binarized quantized data Do corresponds to whether or not to generate light small dots. In the present embodiment, as the light small dot generation process, a process of forming a cell CL based on the center of gravity GC of a plurality of pixels and generating a dot on the center of gravity GC of the pixel inside the cell (Circular Cell method, hereinafter referred to as CC method) is performed. Use. Specific contents of the CC method will be described later.
Then, drive data is generated from the quantized data Do corresponding to ON / OFF of the large / dark / light large / light small dots generated as described above, and is output to the
印刷エンジン40は、ヘッド駆動部41と印刷ヘッド42とから構成される。ヘッド駆動部41は、画像処理部30より入力される駆動データから、印刷ヘッド42を駆動する制御データを生成し、印刷ヘッド42に出力する。印刷ヘッド42は、ヘッド駆動部41から出力された制御データに基づいて駆動され、さらに図示しない印刷ヘッド走査機構や用紙搬送機構が駆動されて、実際に印刷用紙等の記録媒体にホストコンピュータ10からのデータが印刷されることになる。
The
次に、図2および図3を参照して、印刷ヘッド42について説明する。
図2は印刷ヘッド42のノズル面を示した図である。このように、印刷ヘッド42は、K(ブラック)、C1(シアン)、C2(ライトシアン)、M1(マゼンタ)、M2(ライトマゼンタ)、Y(イエロー)の各色のヘッドから構成されており、各色のヘッドを並べるようにして、1つのヘッドユニットを構成している。そして、各印刷ヘッド42のノズル面は、矩形状の形状を有しており、その長辺方向には千鳥状に配列するようにして32個のノズルNzが並んでいる。また、図示しないが、この各ノズルNz群には、各々に対応してインクカードリッジを備えるようにしており、インクカードリッジが装着されると、各色インクカードリッジのインク供給口と対応する色のノズルNzとが連通する。こうして、ノズルNzは、インクカードリッジからのインクの供給を受けることができるようになる。また、印刷ヘッド42は、シアンおよびマゼンタの各色については、それぞれ濃淡2種類のノズルNzを別々に有している。したがって、シアンまたはマゼンタのインクを吐出する際には、使用するノズルNzを使い分けることによって、濃淡2種類のインク(ドット)を吐出することができる。
Next, the
FIG. 2 is a view showing the nozzle surface of the
図3は、図2に示した印刷ヘッド42の内部の概略構成を示すとともに、インクをドット状に打ち出す様子を示した説明図である。図3(a)に見られるように、各印刷ヘッド42は、ノズルNzと、インク室Tiと、ピエゾ素子PEとを備えている。インク室Tiは、上述したようにインクカードリッジのインク供給口(図示せず)に通じており、インクカードリッジよりインクの供給を受けて、インクが充填した状態となっている。また、インク室Tiの、1側面の外部にあたる位置には電歪素子の1種であって応答性に優れたピエゾ素子PEが配置されている。ピエゾ素子PEは、周知のように電圧を印加することにより結晶構造が歪み、高速に電気−機械エネルギーの変換を行うことができる。ピエゾ素子PEに電圧を印加すると、図3(b)に示すように、ピエゾ素子PE自体が伸長して、印刷ヘッド42のインク室Tiを押圧する。押圧されたインク室Tiの内部では、ピエゾ素子PEに接した壁面が変形し、インク室Tiの容積変化を生じることにより、インク室Tiに内在するインクはインク室Tiの外部へと押し出される。このようにして、ノズルNzへ達したインクは、ノズル先端から外部へ排出されるようにして、ドット状のインクが吐出される。以上のようにして、印刷ヘッド42は、ピエゾ素子PEを駆動させて伸縮させることによりドット状のインクを吐出して印刷を行うことができる。
FIG. 3 is an explanatory diagram showing a schematic configuration of the inside of the
ここで、ピエゾ素子PEの変位量は、印加する電圧を大小することにより自在に調整することができる。したがって、ピエゾ素子PEに印加する電圧を調整することにより、インク室Tiの容積変化量を変化させ、ノズルNzより吐出されるインク量を変化させることができる。このように、ドットのインク量を調節することにより、ノズルNzから吐出されるインクのドットの大きさ(ドット径)を制御することができる。本実施形態では、ピエゾ素子PEに印加する電圧を調整することによって、大小2種類のドットを作り出すようにしている。もっとも、ピエゾ素子PEに印加する電圧を制御することによって、大・中・小、またはより多数の大きさの異なるドットを作り出すこともできる。 Here, the amount of displacement of the piezo element PE can be freely adjusted by increasing or decreasing the applied voltage. Therefore, by adjusting the voltage applied to the piezo element PE, it is possible to change the volume change amount of the ink chamber Ti and change the ink amount ejected from the nozzle Nz. Thus, by adjusting the ink amount of dots, the size (dot diameter) of the dots of ink ejected from the nozzles Nz can be controlled. In the present embodiment, two types of large and small dots are created by adjusting the voltage applied to the piezo element PE. However, by controlling the voltage applied to the piezo element PE, large, medium, small, or a larger number of different dots can be created.
以上に説明したように、本実施形態に係る印刷ヘッド42は、シアン・マゼンタのインクについて、2種類のインク濃度をもちながら、2種類の大きさをもつドットを作り出すことができる。そして、これらの組み合わせを行うことも考慮すると、印刷ヘッド42は合計4つの種類のドットを作り出すことができる。そこで、濃度についての濃淡と、大きさについての大小を組み合わせて、それぞれのドットを「濃大ドット」、「濃小ドット」、「淡大ドット」および「淡小ドット」と以下に呼ぶこととする。また、濃大ドットを印刷物に対して形成した場合は、印刷物上に表される濃度が最も大きくなり、淡小ドットを形成した場合に、印刷物上に表される濃度が最も小さくなる。このように、印刷されたドットを巨視的に見てみると、印刷物上に4種類の濃度をもつドットを生成することができるといえる。したがって、濃大・濃小・淡大・淡小ドットのことを異なる濃度を有したドットと表現している。また、イエローおよびブラックのインクについては、濃度の薄いインクをもっていないので、ドットの大小のみが異なるドットを生成することができる。なお、以下の説明では、濃大・濃小・淡大・淡小ドットを生成する場合について、説明しているが、イエローおよびブラックについては、同様の手法により大・小ドットを生成するように処理を行うとよい。もっとも、イエローおよびブラックについても、濃淡2種類のインクを用いる構成とすることもできる。
As described above, the
次に、図4を参照して、画像出力装置20の具体的構成について説明する。ここで、図1の画像出力装置20のうち、色補正及び色変換部31、階調値分割部33、ドット生成部34、負値補正部35および淡小ドット生成部36は、図2におけるCPU22、ハードディスク23、ROM24、及びRAM25に対応する。
Next, a specific configuration of the
画像出力装置20は、全体として、入力インターフェース(I/F)21、CPU22、ハードディスク23、ROM24、RAM25、印刷エンジン40とから構成され、それらはバスを介して互いに接続されている。入力I/F21は、ホストコンピュータ10と画像出力装置20とのインターフェースの役割を果たしている。入力I/F21には、所定の伝送方式により伝送されたホストコンピュータ10からのRGB階調データが入力され、画像出力装置20で処理できるデータに変換される。RGB階調データは、一旦RAM25に格納される。
As a whole, the
CPU22は、バスを介して、入力I/F21、ハードディスク23、ROM24、RAM25、印刷エンジン40それぞれと接続され、ハードディスク23またはROM24に格納されたプログラムを読み出して、後述する階調値分割処理、ドット生成処理、淡小ドット生成処理等の各種処理を行う。これらの処理を記録したプログラムは、予めハードディスク23やROM24に格納されていることとしてもよいし、例えばCD−ROMなどのコンピュータが読み取り可能な記録媒体によって外部から供給され、図示しないCD−R/RWドライブを介して画像出力装置20に備えられたハードディスク23に記憶することによって格納されるものとしてもよい。もっとも、インターネットなどのネットワーク手段を介して、プログラムを供給するサーバー等にアクセスし、データをダウンロードすることによって格納されるものとしてもよい。
The
RAM25は、CPU22の制御によって実行される各処理のワーキングメモリとして役割を果たし、処理後の各種データを格納する。そして、印刷エンジン40のヘッド駆動部41を駆動するための駆動データも格納する。RAM25の記憶領域のうち所定の領域には、各種データを格納するためのバッファ領域が設けられている。
The
印刷エンジン40は、図1の印刷エンジンと同様の構成であり、CPU22の制御によりRAM25に格納された駆動データを入力し、上述した印刷処理を行うことになる。
The
次に、以上のように構成された画像出力装置20が行う具体的な処理を説明する前に、画像処理部30における各処理によって、ホストコンピュータ10が出力した階調データがどのように変換されるのかを図5を用いて説明する。図5において、まず、色補正・色変換部31には、ホストコンピュータ10が出力したR,G,Bの階調データRi,Gi,Biが入力される。Ri,Gi,Biの階調データはそれぞれ256階調すなわち0から255までの256種類の階調値を有する階調データである。色補正・色変換部31は、色補正表32を用いてRi,Gi,Biのデータの色補正処理を行うと共に、R,G,BからC(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック)への色変換処理を行う。色変換処理は通常所定の色変換表(図示せず)を用いて行われる。本実施形態では、色変換に際して用いる色変換表のCMYKの階調データは、各色8ビットずつの階調データとなっており、色補正及び色変換部31が出力する階調データCc,Mc,Yc,Kcは、0から255まで256種類の階調値を有する階調データである。
Next, before describing specific processing performed by the
次に、以上で述べた画像出力装置20の行う処理全体を示すプログラムのフローチャートを図6に示し、説明する。なお、このプログラムは、画像出力装置20内部に備わるRAM25に格納され、所定のオペレーションシステムの下で、CPU22が実行する。プログラムが実行されると、画像出力装置20の各構成要素が動作し、それぞれの機能を果たすことができる。なお、図6のプログラムのうち、ステップS10は色補正・色変換部31が、ステップS20は階調値分割部33、ステップS30はドット生成部34が、ステップS40は負値補正部が、ステップS50は淡小ドット発生部35が、それぞれ行う処理に相当する。
Next, a flowchart of a program showing the entire processing performed by the
図6に示される画像処理ルーチンを開始すると、まず、ステップS10において、色補正・色変換部31は、ホストコンピュータ10より出力された画像データ(RGBデータ)を取得し、色補正表32に基づいて、個別の印刷エンジン40のドット出力特性に対応した色補正を行う(色補正処理)。このとき、実際には、ホストコンピュータ10から入力I/F21を介してRAM25に取り込むことで画像データの読み込みを行っている。また、このステップでは、インクジェットプリンタのCMYK各インクの特性に合わせて、色補正を行った画像データに対してRGBデータからCMYKデータへの色座標変換の処理(色変換処理)も行っている。色変換処理は通常所定の色変換表(図示せず)を用いて行われる。したがって、ここでは、入力した画像データをC(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック)の各色について、8ビット(256階調)で表現された入力階調値および画素ごとに入力階調値を有する入力階調データDiを取得し、RAM25の所定のバッファ領域に格納される。
When the image processing routine shown in FIG. 6 is started, first, in
次に、ステップS20では、この色補正処理および色変換処理により得られた入力階調データDiに対して、CPU22を中心とした階調値分割部33が、階調値分割処理を行う。以下、階調値分割処理について説明する。階調値分割処理では、与えられた入力階調データDiから、印刷ヘッド42が作り出すことのできる4種類のドットのうち、最も濃度の低い淡小ドットを除いた濃大・濃小・淡大ドットについて、レベルデータDlを取得する。図7は、入力階調データDiの階調値に対応して、濃大・濃小・淡大ドットのレベル値および記録率の関係を示した図である。ここで、記録率とは、プリンタの記録解像度に対する、ノズルNzから吐出したドットにより白色の記録媒体(例えば印刷紙)にドットを記録した割合を示す値である。したがって、記録媒体の全面がドットにより覆われた状態では、記録率100%となる。また、この記録率を0から255の階調数に対応させた値がレベル値であり、入力階調データDiに対応する多数の画素にこのレベル値を有したデータをレベルデータDlと呼んでいる。実際には、この階調値分割処理は、ROM24またはハードディスク23に記憶された図7の関係を示したテーブルを読み出して参照することにより行われている。なお、図7にあるテーブルは、インク濃度・ドットの大きさなどを考慮し、入力された所定の階調値を各ドットにより適切に表現できるように実験的に求められた値である。本実施形態では、こうして求めたレベルデータを、濃大・濃小・淡大ドットを生成するか否か(すなわち、ドットのオンオフ)を判定するために用いている。
Next, in step S20, the gradation
このように、階調値分割処理では、入力階調データDiの入力階調値に基づいて、図7のテーブルを参照することにより、濃大・濃小・淡大ドットの記録率を求めている。ここで、実際には、記録率に対応して、256階調で表現したレベル値を取得し、RAM25の所定のバッファ領域に記憶するようにしている。例えば、入力階調データDiのある画素の階調値が“63”であった場合には、濃大ドットの記録率は0%であり、これに対応するレベル値として“0”がRAM25のバッファ領域に記憶される。入力階調データDiのある画素の階調値が“191”であった場合には、濃大ドットの記録率は70%となり、これに対応するレベル値“179”が記憶される(図7参照)。同様にして、階調値“191”に対する濃小ドットおよび淡大ドットについてのレベル値が記憶される。
As described above, in the gradation value dividing process, the recording rate of the large, dark, and light large dots is obtained by referring to the table of FIG. 7 based on the input gradation value of the input gradation data Di. Yes. Here, in practice, a level value expressed in 256 gradations corresponding to the recording rate is acquired and stored in a predetermined buffer area of the
次に、ステップS30では、CPU22を中心としたドット生成部34が、ドット生成処理を行う。
図8は、ドット生成処理の処理の流れを示したフローチャートである。このフローチャートにしたがって、ドット生成処理の説明を行う。始めに、ドット発生処理を開始すると、ステップS100において、CPU22は、レベルデータDlを構成する画素から、1つの画素を選択して注目画素とする処理を行う。ドット生成処理は、階調値分割処理により求められた各画素のレベル値について行うが、レベル値を構成する画素ごとに判定を行うので、このステップにおいて、処理を行う画素(注目画素)を選択する。以下、この注目画素について処理を行う。
Next, in step S30, the
FIG. 8 is a flowchart showing the flow of the dot generation process. The dot generation process will be described according to this flowchart. First, when the dot generation process is started, in step S100, the
次に、ステップS105では、CPU22は、注目画素に対応するレベル値を取得する。ここでは、階調値分割処理により求められRAM25に記憶されている濃大・濃小・淡大ドットのレベル値から、注目画素に対応する濃大・濃小・淡大ドットそれぞれについてのレベル値を取得して、RAM25に記憶する。
Next, in step S105, the
次に、ステップS110では、CPU22は、濃大ドットをオンにするか否かを判定する。ここでは、ステップS105で取得した濃大ドットのレベル値が、所定の閾値より大きいか否かを判定することにより濃大ドットのオンオフを決定する。なお、この処理の閾値としては、閾値に空間的なバラツキを与えたディザマトリクスを用いることによって、組織的ディザ法による判定を行っている。
Next, in step S110, the
ディザマトリクスを用いたステップS110の処理について図9を用いて以下に説明する。図9は、濃大ドットのレベルデータDlに対して、ディザマトリクスを用いて、濃大ドットのオンオフを判定する動作を示している。図上段には、この説明で用いる入力階調データDiを4×4のマトリクス上に示している。この入力階調データDiに対して、上述した階調値分割処理を行うことにより、図中段左に示したレベルデータDlが取得されていることとして、以下にステップS110の処理について説明する。処理の対象となるレベルデータDlを4×4のマトリクス上に示し、図中段右には、このレベルデータDlに対応して、4×4のマトリクスからなるディザマトリクスを示している。上述したように、ドット生成処理は画素ごとに行うものとして、ステップS100で設定した注目画素はこのマトリクスのいずれかに相当する。ここで、例えば、注目画素が、マトリクスの左上の画素(n,m)について考える。図9中段左によると、この画素のレベル値は“75”、ディザマトリクスの値は“1”となっている。レベル値が、閾値としてのディザマトリクスの値より大きいかを判定し、レベルデータDlの値が大きいときには、濃大ドットをオンすると判定する。レベル値が閾値より小さいときには、ドットをオフすると判定する。したがって、図9の例では、画素(n,m)のレベル値“75”は、ディザマトリクスの閾値“1”より大きいので、濃大ドットがオンであると判定される。このように、注目画素ごとに、ドットがオンであるかオフであるかを判定し、レベルデータDlのすべての画素について、注目画素と設定し判定することにより、図9下段に示されるように、ドットのオンオフを示すマトリクスが得られる。このようにして、濃大ドットのオンオフを決定することができる。 The process of step S110 using the dither matrix will be described below with reference to FIG. FIG. 9 shows an operation for determining whether or not a dark dot is on or off using a dither matrix with respect to the dark dot level data Dl. In the upper part of the figure, the input gradation data Di used in this description is shown on a 4 × 4 matrix. Assuming that the level data Dl shown on the left in the drawing is obtained by performing the above-described gradation value division processing on the input gradation data Di, the processing in step S110 will be described below. The level data D1 to be processed is shown on a 4 × 4 matrix, and a dither matrix composed of a 4 × 4 matrix is shown on the right side of the figure corresponding to the level data D1. As described above, it is assumed that the dot generation process is performed for each pixel, and the target pixel set in step S100 corresponds to one of the matrices. Here, for example, consider the pixel (n, m) at the upper left of the matrix as the target pixel. According to the middle left of FIG. 9, the level value of this pixel is “75”, and the value of the dither matrix is “1”. It is determined whether the level value is larger than the value of the dither matrix as a threshold value. When the value of the level data Dl is large, it is determined that the dark dot is turned on. When the level value is smaller than the threshold value, it is determined that the dot is turned off. Therefore, in the example of FIG. 9, the level value “75” of the pixel (n, m) is larger than the threshold value “1” of the dither matrix, so it is determined that the dark dot is on. In this way, for each pixel of interest, it is determined whether the dot is on or off, and all the pixels in the level data Dl are set as pixels of interest and determined, as shown in the lower part of FIG. , A matrix indicating dot on / off is obtained. In this way, it is possible to determine on / off of the large dots.
なお、ここでは、説明の便宜のため、レベルデータDlおよびディザマトリクスを4×4のマトリクスとしているが、実際には、レベルデータDlは、入力階調データDiに対応した行数・列数からなるマトリクスで表され、ディザマトリクスとしては16×16のマトリクスを用いている。したがって、レベルデータDlに比べて小さいサイズからなるディザマトリクスは、レベルデータDlのマトリクスを16×16の領域ごとに区切って、それぞれの領域に対してディザマトリクスを対応させるようにして、閾値を取得する。なお、ディザマトリクスのサイズは16×16に限られず、64×64または256×256の大域的マトリクス(ブルーノイズマトリクスなど)を用いてもよい。ステップS110では、以上に述べた処理を画素ごとに行い、注目画素の濃小ドットがオンになった場合(Yes)、ステップS115に進む。注目画素の濃小ドットがオフになった場合(No)、ステップS120に進む。 Here, for convenience of explanation, the level data D1 and the dither matrix are a 4 × 4 matrix. However, in actuality, the level data D1 is calculated from the number of rows and the number of columns corresponding to the input gradation data Di. A 16 × 16 matrix is used as the dither matrix. Therefore, a dither matrix having a size smaller than that of the level data Dl is obtained by dividing the matrix of the level data Dl into 16 × 16 areas and corresponding the dither matrix to each area. To do. The size of the dither matrix is not limited to 16 × 16, and a 64 × 64 or 256 × 256 global matrix (such as a blue noise matrix) may be used. In step S110, the processing described above is performed for each pixel. When the dark dot of the target pixel is turned on (Yes), the process proceeds to step S115. When the dark dot of the target pixel is turned off (No), the process proceeds to step S120.
ステップS115では、CPU22は、ステップS110において注目画素に対してオンになった濃大ドットに対応する結果値RVを取得し、RAM25に記憶する。ここで、結果値RVとは、その注目画素の濃度に相当する値(濃度評価値)であり、ドットがオン、すなわち、注目画素にドットを形成した場合、その画素の濃度に対応した値のことをいう。ここでいう濃度とは、ドットを記録媒体に形成したときの画素の実際の濃度のことをいい、インク濃度のことではない。なお、濃度評価値の値は実験的に求められた値であり、例えば、濃大ドットについては255の濃度評価値が与えられている。濃小・淡大・淡小ドットのそれぞれについても、異なる濃度評価値が設定されている。ステップS115の処理を終えると、次は、ステップS145へ進む。
In step S115, the
ステップS120では、CPU22は、濃小ドットをオンにするか否かを判定する。ここでは、RAM25に記憶された濃小ドットのレベルデータDlより注目画素に対応する濃小ドットのレベル値を取得し、このレベル値が所定の閾値より大きいか否かを判定することにより濃小ドットのオン・オフ判定を行う。このときの、ドットの判定を行う閾値としては、マトリクスの各閾値に濃大ドット用のディザマトリクスとは異なる閾値が付与されている濃小ドット用のディザマトリクス(図示なし)を用いて行う。注目画素の濃大ドットがオンになった場合(Yes)、ステップS125に進む。注目画素の濃大ドットがオフになった場合(No)、ステップS130に進む。
In step S120, the
ステップS125では、CPU22は、ステップS120において注目画素に対してオンになった濃小ドットに対応する結果値RVを取得し、RAM25に記憶する。次は、ステップS145へ進む。
In step S125, the
ステップS130では、CPU22は、淡大ドットをオンにするか否かを判定する。ここでは、RAM25に記憶された淡大ドットのレベルデータDlより注目画素に対応する淡大ドットのレベル値を取得し、このレベル値が所定の閾値より大きいか否かを判定することにより淡大ドットのオンオフ判定を行う。このときの、ドットの判定を行う閾値としては、淡大ドット用のディザマトリクスを用いて行う。注目画素の淡大ドットがオンになった場合(Yes)、ステップS135に進む。注目画素の淡大ドットがオフになった場合(No)、ステップS140に進む。
In step S130, the
ステップS135では、CPU22は、ステップS130において注目画素に対してオンになった淡大ドットに対応する結果値RVを取得し、RAM25に記憶する。次は、ステップS145へ進む。
In step S135, the
ステップS140では、CPU22は、ステップS110、S120およびS130において、濃大・濃小・淡大ドットのいずれもがオンになっていない、すなわち、記録媒体上に何らドットが形成されていないので、結果値RVとして0を設定し、RAM25に記憶する。次は、ステップS145へ進む。
In step S140, the
ステップS145では、CPU22は、入力階調データDiの注目画素の階調値と、結果値RVとの差分を演算し、差分階調データDdとしてRAM25に記憶する。ここでは、所定の濃度をもつ濃大・濃小・淡大ドットの形成がオンオフいずれかで行われることにより生じる誤差を求め、後述する淡小ドットの処理においてこの誤差を解消せんとするために、この誤差分を差分階調データDdとして取得している。この差分階調データDdを取得する処理について、図10を用いて説明する。ここでは、図10上段右側に示した入力階調データDiに対して、ステップS110〜130の処理によって、図10上段左側に示したように各ドットが形成された場合について、差分階調データDdを求める処理を説明する図である。このとき、濃大・濃小・淡大ドットの各ドットに対応した結果値RVとして、濃度評価値が与えられている。図10中段の結果値RVを示すマトリクスでは、例えば、濃度評価値として、濃大ドットが“255”、濃小ドットが“160”、淡小ドットが“120”とした場合について示している。したがって、これらのドットの生成状態に対応して、各ドットを濃度評価値で置き換えるようにして、図10中段に示す結果値RVのマトリクスが得られる。ここで、ドットの形成については、濃大・濃小・淡大ドットにより離散的な階調を表現しているに過ぎない。すなわち、結果値RVは、3つのドットに相当するときとドットを生成しないときの、4つの離散的な値しかとることができない。したがって、結果値RVと入力階調データDiとの間には、量子化誤差が存在することとなるので、この誤差分を差分階調データDd(図10下段)として取得するのである。そして、この差分階調データDdに対して、淡小ドット生成部36が後述する淡小処理を行うことにより、この誤差を解消することになる。以上のようにして、この差分階調データDdを求める処理を終えると、次に、ステップS150へ進む。
In step S145, the
ステップS150では、CPU22は、入力階調データDiの全ての画素についてドット生成処理を行ったか否かを判断する。既に全ての画素について、処理を行っていた場合(Yes)、ドット生成処理を終了する。既に全ての画素について、処理を行っていない場合(No)、ステップS100に戻り、新たな画素を注目画素に設定する。
In step S150, the
次に、図6の処理に戻り、ステップS40において負値の補正処理を行う。図12は負値の補正処理について処理の流れを示したフローチャートである。また、図11は、図10下段に求めた差分階調データDdに対して負値の補正処理を行う処理を説明するための図である。以下、このフローチャートに従って、負値の補正処理の説明を行う。 Next, returning to the process of FIG. 6, a negative value correction process is performed in step S40. FIG. 12 is a flowchart showing the flow of the negative value correction process. FIG. 11 is a diagram for explaining a process of performing a negative value correction process on the difference gradation data Dd obtained in the lower part of FIG. The negative value correction process will be described below according to this flowchart.
負値の補正処理を開始すると、始めに、ステップS200では、CPU22は、ステップS145においてRAM25に記憶された差分階調データDdを読み込み、取得する。
When the negative value correction process is started, first, in step S200, the
次に、ステップS210では、CPU22は、差分階調データDdの各画素から負の画素を探索し、負の画素があるか否かを判断する。本実施形態では、差分階調データDdの左上の画素から右上のラインに沿って探索し(主走査)、1ライン分の探索を終えると、次に、1画素分下に位置するラインについて左から右に探索する。このように、次々に、下方向のラインを探索するようにして(副走査)、差分階調データDdの負の画素を探索する。例えば、図11(a)の差分階調データDdを探索すると、まず、左上に位置する画素(n,m)から順に探索することになる。探索を行うと、画素(n+1,m)が負の階調値を有しているので、負値補正手段35は、画素(n+1,m)を選択し、注目画素とする(図11(b)の網掛けした画素)。負の画素がある場合、注目画素に設定し、ステップS220に進む。差分階調データDdの全ての画素について負の画素がなかった場合、負値の補正処理を終了する。
Next, in step S210, the
ステップS220では、CPU22は、ステップS210で選択した注目画素から最も近くに位置する正の階調値をもつ画素を探索する。探索して、正の画素があった場合には、対象画素として選択される。なお、注目画素から等距離に複数の正の画素があった場合には、ここでは複数の画素を同時に対象画素に選択して処理を行うようにする。したがって、図11(a)の画素(n+1,m)に対しては、最も近い正の階調値をもつ画素として、画素(n,m)および画素(n+2,m)が選択される(図11(b)の太線で覆われた領域の画素)。
In step S220, the
次に、ステップS230では、ステップ220の探索において、正の階調値をもつ画素があったか否かをCPU22が判断する。正の画素があった場合には(Yes)、ステップS240へ進む。正の画素がなかった場合には(No)、ステップS210に戻り新たに注目画素を設定する。
Next, in step S230, the
次に、ステップS240では、CPU22は、負の階調値をもつ注目画素に、正の階調値をもつ対象画素からどれだけの階調値を移動すればよいかを示した階調値補正量sおよび階調値移動量tを算出する。ここで、階調値の移動に際し、移動しすぎることにより正の階調値をもつ対象画素が、逆に負の階調値に転じることがないように、且つ、注目画素の負の階調値を解消するだけの階調値を移動するようにする。すなわち、注目画素の階調値が−a(aは正の整数)、対象画素がb(bは正の整数)の階調値を有していた場合、階調値補正量sおよび階調値移動量tは、以下の式で与えられる。
s=a …(1)
t=a (a≦b) …(2)
t=b (a>b) …(3)
Next, in step S240, the
s = a (1)
t = a (a ≦ b) (2)
t = b (a> b) (3)
また、ステップS220で注目画素より等距離に複数の対象画素が選択された場合は、ステップS240において複数の画素を選択して各画素から等量の階調値を移動するように階調値移動量を設定すればよい。例えば、図11(b)を例にとると、注目画素(m,n)の画素値“−30”に対して、対象画素(n,m)および(n+2,m)からそれぞれ“15”の階調値を移動すればよいので、階調値移動量tとしてはそれぞれの画素に対して“15”を設定する。このとき、階調値を移動後の画素(n+1,m)、画素(n,m)、画素(n+2,m)の画素値はそれぞれ、“0”、“35”、“35”となり、注目画素の負の階調値が解消される(図11(c))。また、複数の対象画素から階調値を移動する際にも、対象画素が、逆に負の階調値に転じることがないようにして行う。すなわち、対象画素の数をk、それらの階調値をb(i)(iは、対象画素を示すk以下の整数)とすると、階調値移動量tは以下の式で与えられる。
t=a/k (a/k≦Min(b(i))) …(4)
t=Min(b(i)) (a/k>Min(b(i))) …(5)
If a plurality of target pixels are selected at the same distance from the target pixel in step S220, the gradation value is moved so that the plurality of pixels are selected in step S240 and an equal amount of gradation value is moved from each pixel. What is necessary is just to set quantity. For example, taking FIG. 11B as an example, for the pixel value “−30” of the target pixel (m, n), “15” from the target pixels (n, m) and (n + 2, m) respectively. Since the gradation value has only to be moved, the gradation value movement amount t is set to “15” for each pixel. At this time, the pixel values of the pixel (n + 1, m), the pixel (n, m), and the pixel (n + 2, m) after moving the gradation value are “0”, “35”, and “35”, respectively. The negative gradation value of the pixel is eliminated (FIG. 11 (c)). In addition, when the gradation value is moved from a plurality of target pixels, the target pixel is not changed to a negative gradation value. That is, assuming that the number of target pixels is k and their tone values are b (i) (i is an integer equal to or less than k indicating the target pixel), the tone value movement amount t is given by the following equation.
t = a / k (a / k ≦ Min (b (i))) (4)
t = Min (b (i)) (a / k> Min (b (i))) (5)
次に、ステップS250では、CPU22は、階調値移動量tに相当する階調値を対象画素から注目画素に移動させる。すなわち、対象画素の階調値を階調値移動量tだけ減算し、注目画素の階調値を階調値移動量tだけ加算する。これを各対象画素に対して行う。実際には、このとき、RAM25のバッファ領域に記憶された差分階調データDdにおいて、注目画素および対象画素に対応する値に階調値移動後の値を記憶する。なお、複数の対象画素がある場合には、各対象画素についても同様にして階調値を移動する処理を行う。
Next, in step S250, the
次に、ステップS260では、階調値補正量sから対象画素の数kだけ階調値移動量tを減算し、階調値移動後の注目画素の階調値を計算する。 Next, in step S260, the gradation value movement amount t is subtracted from the gradation value correction amount s by the number k of the target pixels, and the gradation value of the target pixel after the gradation value movement is calculated.
次に、ステップS270では、ステップS260で求めた階調値補正量sが0であるか否かをCPU22が判断する。階調値補正量sが0でなかった場合(No)、さらに階調値を移動する必要があるので、ステップS220へ戻り、正の階調値をもつ他の対象画素を探索する。階調値補正量sが0となった場合(Yes)、注目画素の階調値は負値が補正されて“0”となっているので、次にステップS210へ戻り、新たな注目画素を設定する。
Next, in step S270, the
このように、負の階調値をもつ画素を注目画素に選択し、これを解消するように最も近い画素の正の階調値を移動させる処理を、繰り返し行い差分階調データDdから負の階調値をもつ画素をなくするようにする。例えば、図11において、図11(b)〜図11(e)に示すように、注目画素を画素(n+1,m)、画素(n+1,m+1)、画素(n+3,m+2)と、負の階調値をもつ画素を次々に注目画素に選択して、上述した操作を繰り返し行い、注目画素の負の階調値を解消するようにしている。したがって、この処理を終えると、最終的に図11(f)に示すように、負の階調値は補正され、0以上の階調値をもつ差分階調データDdが得られる。 As described above, a pixel having a negative gradation value is selected as a target pixel, and the process of moving the positive gradation value of the nearest pixel is repeatedly performed so as to eliminate the negative gradation value. Pixels having gradation values are eliminated. For example, in FIG. 11, as shown in FIGS. 11B to 11E, the target pixel is a pixel (n + 1, m), a pixel (n + 1, m + 1), a pixel (n + 3, m + 2), and a negative floor. Pixels having tone values are successively selected as the target pixel, and the above-described operation is repeated to eliminate the negative tone value of the target pixel. Therefore, when this process is finished, finally, as shown in FIG. 11F, the negative gradation value is corrected, and differential gradation data Dd having a gradation value of 0 or more is obtained.
ここで、入力階調データDiの値と濃大・濃小・淡大ドットの各ディザマトリクスの閾値との大小関係によっては、全体として正の階調値の絶対値より負の階調値の絶対値が大きい差分階調データDdが得られる可能性がある。こうした場合に、負値の補正処理を行うと、処理の途中で正の階調値をもつ画素がなくなり、負の階調値をもつ画素の画素値を解消できなくなる状況が発生する可能性がある。こうした場合は、差分階調データDdに正の階調値がなくなり負の階調値を残したまま処理を終了する。差分階調データDdが全体として負に偏っていることは、濃大・濃小・淡大ドットを生成したことによる階調値が、入力階調データDiの階調値より既に大きくなっていることを意味しているので、後述する淡小ドット生成処理により淡小ドットを新たに生成する必要がなくなる。したがって、差分階調データDdに負の階調値のみを残すことによって、淡小ドットが生成しないようにするとよい。 Here, depending on the magnitude relationship between the value of the input tone data Di and the threshold value of each of the dither matrixes of dark, dark, and light large dots, the overall negative tone value is larger than the absolute value of the positive tone value. There is a possibility that differential gradation data Dd having a large absolute value may be obtained. In such a case, if a negative value correction process is performed, there is a possibility that a pixel having a positive gradation value disappears in the middle of the process and a pixel value of a pixel having a negative gradation value cannot be eliminated. is there. In such a case, the process is terminated while the differential gradation data Dd has no positive gradation value and a negative gradation value remains. The fact that the difference gradation data Dd is negatively biased as a whole indicates that the gradation values resulting from the generation of dark, dark, and light large dots are already larger than the gradation values of the input gradation data Di. This means that it is not necessary to newly generate a light small dot by a light small dot generation process described later. Therefore, it is preferable to prevent generation of small light dots by leaving only negative gradation values in the difference gradation data Dd.
次に、図6の処理に戻り、ステップS50において淡小ドット生成処理を行う。
淡小ドット生成処理では、ステップS40で得られた正の階調値をもつ差分階調データDdに基づき、淡小ドット生成部36が、CC法を用いて淡小ドットを生成する処理を行う。図14は、淡小ドット生成処理における処理の流れを示したフローチャートである。図13は、淡小ドット生成処理を行う処理例を示した図である。以下、このフローチャートに従って、図13の例を交えて淡小ドット生成処理の説明を行う。
Next, returning to the process of FIG. 6, a light small dot generation process is performed in step S50.
In the light small dot generation process, the light small
なお、淡小ドット生成処理では、RAM25上の記憶領域上に、差分階調データDdの全画素ごとに、処理が行われたか否かを記憶するバッファ領域を設けている。例えば、淡小ドット生成処理が行われていない画素(未処理画素)に対応するバッファ領域には“0”を示すビットが割り当てられ、淡小ドット生成処理が行われた画素(処理済画素)に対応するバッファ領域には“1”を示すビットを割り当てる。このようにして、いずれの画素について淡小処理済みであるかの判別は、RAM25のバッファ領域を参照することによって都度行い、処理済みの画素に対して更に処理を行うことがないようにしている。
In the light small dot generation process, a buffer area is provided on the storage area on the
まず、淡小ドット生成処理を開始すると、ステップS300では、CPU22は、RAM25のバッファ領域より負値の補正処理後の差分階調データDdの読み込みを行う。ここで、図13(a)には、図10下段で得られた差分階調データDdに対して負値の補正処理を行った差分階調データDdが示されている。以下、この差分階調データDdに対して淡小ドット生成処理を行う場合について説明する。
First, when the light small dot generation process is started, in step S300, the
次に、ステップS310では、CPU22は、セル生成の最初の未処理画素となる画素を探索し、初期画素に決定する。このとき、ドット生成処理において、探索した順と同様に、差分階調データDdの左上から主走査方向(X方向)に探索した後、副走査方向に1ラインずらして再び主走査方向の探索を行い、これを繰り返すようにして探索する。実際には、RAM25のバッファ領域を参照して、差分階調データDdの画素のうち未処理画素であることを示す“0”が格納されている画素を探索する。なお、このとき、階調値が“0”である画素は、重心の計算に寄与することがないので、以下に述べる処理を行うことなく処理済みの画素であるとして、バッファ領域に処理済画素であることを示す“1”のビットを格納する。したがって、図13の例では、図13(a)において、画素(n,m)が階調値“0”であるので、この次に探索される画素(n+1,m)を初期画素に設定する(図13(b)の網掛けした画素)。未処理画素がある場合(Yes)は、この未処理画素を初期画素に設定し、RAM25のバッファ領域にその階調値と処理済画素であることを示す“1”を記憶して、ステップS320に進む。未処理画素がない場合(No)はステップS390に進む。
Next, in step S310, the
次に、ステップS320ではセルCL内の画素の階調値の合計が閾値より小さいか否かをCPU22が判断する。ただし、ステップS310より処理が移行した場合には、初期画素のみをセルCL内の画素として判断を行う。具体的には、ROM24に格納した淡小ドット用の閾値を読出し、セルCL内の画素の階調値と比較することにより処理を行う。なお、図13の例では、この淡小ドットを生成する閾値として、淡小ドットの濃度評価値である階調値“75”を用いている。ステップS320において、セルCL内の画素の階調値の合計が閾値よりも小さい場合(No)はステップS330に進み、閾値と同じまたは大きい場合(Yes)はステップS340に進む。
Next, in step S320, the
ステップS330では、ステップS320で閾値より小さいと判断された場合(YES)について、CPU22は、新たな未処理画素をセルCLに組み入れて、セルCLを拡大する処理を行う。ここで、本実施形態の未処理画素の選択には、セルCLの重心GCを利用して、重心GCより最も近い画素を選択することとしている。重心GCを利用して画素の選択を行うことによって、最終的に生成されるセルCLの形状は円状となり、その重心GCにドットを形成させることで、ドット間距離が適切な値となり、視覚的に快適な印刷出力を得ることができる。
In step S330, if it is determined in step S320 that the threshold value is smaller than the threshold value (YES), the
CPU22は、RAM25のバッファ領域より初期画素の位置する画素の階調値と座標とを読み出し、新たな未処理画素を組み入れたときのセル内の画素の重心GCを演算する。CPU22は、具体的には、以下の演算式によりセルCLの重心GCを求める。ここで、xGC,yGCは重心GCのそれぞれx,y座標である。
The
xGC={{(セルCLの重心GCのx座標)×(セル内の画素の階調値合計)}
+{(選択した未処理画素のx座標)×(選択した未処理画素の階調値)}}
/{(セル内の画素の階調値合計)+(選択した未処理画素の階調値)} …(6)
yGC={{(セルCLの重心GCのy座標)×(セル内の画素の階調値合計)}
+{(選択した未処理画素のy座標)×(選択した未処理画素の階調値)}}
/{(セル内の画素の階調値合計)+(選択した未処理画素の階調値)} …(7)
この演算式はROM24に格納され、ステップS330においてCPU22が読み出して演算を行うことになる。もっとも、初期画素の場合は、セルCLの重心GCのxy座標は共に0として演算される。
x GC = {{(x coordinate of the center of gravity GC of the cell CL) × (total gradation value of pixels in the cell)}
+ {(X coordinate of selected unprocessed pixel) × (tone value of selected unprocessed pixel)}}
/ {(Total gradation value of pixels in cell) + (gradation value of selected unprocessed pixel)} (6)
y GC = {{(y coordinate of center of gravity GC of cell CL) × (total gradation value of pixels in cell)}
+ {(Y coordinate of selected unprocessed pixel) × (tone value of selected unprocessed pixel)}}
/ {(Total gradation value of pixels in cell) + (gradation value of selected unprocessed pixel)} (7)
This arithmetic expression is stored in the
また、式(6)および(7)により求められるセルCLの重心GCおよびセルCL内の画素の階調値合計は、新たな未処理画素を組み入れるたび算出し、最新の値をRAM25に記憶する。こうすることによって、新たな未処理画素を組み入れたとき式(6)および(7)において、重心GCおよび階調値合計を計算する必要がなくなり、RAM25から直接取得するので処理の高速化を図ることができる。そして、セルを拡大する処理を終えると、セルCL内の画素に対応するRAM25のバッファ領域に、処理済画素であることを示す“1”を格納する。
Further, the center of gravity GC of the cell CL and the sum of the gradation values of the pixels in the cell CL obtained by the equations (6) and (7) are calculated each time a new unprocessed pixel is incorporated, and the latest value is stored in the
以上に述べたように、未処理画素を選択して新たにセルCLに組み入れる処理(ステップS330)は、セルCL内の画素の重心GCから最も近い距離にある画素を選択することによって行っている。しかし、重心GCから等距離に複数の画素が存在する可能性がある。こうした場合、いずれかの画素を選択する必要が生じるが、本実施形態では初期画素の走査方向に従ってCPU22が画素を選択して、セルCLを拡大するようにしている。
As described above, the process of selecting an unprocessed pixel and newly incorporating it into the cell CL (step S330) is performed by selecting a pixel closest to the center of gravity GC of the pixel in the cell CL. . However, there may be a plurality of pixels equidistant from the center of gravity GC. In such a case, it is necessary to select one of the pixels, but in this embodiment, the
次に、ステップS330を経てステップS320へ至っている場合、CPU22は、再びセルCL内の画素の階調値の合計が閾値を超えているか否かを判断する。すなわち、新たに選択した未処理画素の階調値を含めたセルCL内の画素の階調値合計が、所定の閾値未満であるか否かを判断する。閾値を超えていない場合は再びステップS330に進み、新たな未処理画素をセルCLに組み入れる処理を行う。閾値を超えている場合、ステップS340へ進む。
Next, when the process reaches step S320 via step S330, the
このように、ステップS320とS330の処理を繰り返すたびに、CPU22は、ステップS330で演算したセルCL内にある画素の階調値の合計が、閾値と等しいか否か判断しながら閾値に達するまでセルCLを拡大していくことになる。
In this way, each time the processes in steps S320 and S330 are repeated, the
ステップS340では、セル内にある画素の階調値の合計が閾値に等しいか否かをCPU22が判断する。上述したように、RAM25に記憶されている値を参照することにより階調値の合計を取得し、閾値に等しい場合(Yes)、ステップS350へ進む。階調値の合計が閾値に等しくない場合(No)、ステップS360へ進む。
In step S340, the
ステップS350では、式(6)および式(7)を用いて重心GCの位置を算出する。すなわち、CPU22は、再び選択した未処理画素を含めセルCL内の画素について、重心GCの演算を行う。具体的なCPU22の演算は、上述した式(6)および式(7)の演算式をROM24より読み出して、行うことになる。そして、このステップS350で演算した重心GCの位置は、CPU22の制御によってRAM25のバッファ領域に記憶されたセルCLの階調値の合計とともに格納される。そして、重心GCに位置する画素に所定の大きさのドットを形成するための処理を行う。このとき、生成するドットは、ステップS320およびS330で用いた閾値と同等の値を付与することとし、例えば、図13の例では“75”の階調値(淡小ドットの濃度評価値)を閾値として、閾値と同等の値“75”を付与することとしている。ステップS350の処理を終えるとステップS380へ進む。
In step S350, the position of the center of gravity GC is calculated using Expression (6) and Expression (7). That is, the
ステップS360では、閾値を超える階調値分を無視してセルCLの重心GCを算出する処理を行う。このためまず、CPU22は、これまでステップS320で求めたセルCL内の階調値合計から閾値を引く演算を行う。この演算値を「戻り値」と呼ぶ。
In step S360, a process of calculating the center of gravity GC of the cell CL is performed ignoring the gradation value exceeding the threshold value. Therefore, first, the
このときの重心GCの演算は具体的には、以下の演算式により行われる。 Specifically, the calculation of the center of gravity GC at this time is performed by the following arithmetic expression.
xGC={{(セルCLの重心GCのx座標)×(セル内の画素の階調値合計)}
−{(最後に選択した未処理画素のx座標)×(ステップS360の演算値)}}
/{(セル内の画素の階調値合計)−(ステップS360の演算値)} …(8)
yGC={{(セルCLの重心GCのy座標)×(セル内の画素の階調値合計)}
−{(最後に選択した未処理画素のy座標)×(ステップS360の演算値)}}
/{(セル内の画素の階調値合計)−(ステップS360の演算値)} …(9)
式(6)、式(7)とは異なり、セル内にある画素の階調値をそのまま用いるのではなく、階調値の過剰分である戻り値を引くことでセルCL内の階調値の合計が閾値と同じになるようにしている。
x GC = {{(x coordinate of the center of gravity GC of the cell CL) × (total gradation value of pixels in the cell)}
-{(X coordinate of the last selected unprocessed pixel) × (calculated value of step S360)}}
/ {(Total gradation value of pixels in cell) − (calculated value of step S360)} (8)
y GC = {{(y coordinate of center of gravity GC of cell CL) × (total gradation value of pixels in cell)}
-{(Y coordinate of the last selected unprocessed pixel) × (calculated value of step S360)}}
/ {(Total gradation value of pixels in cell) − (calculated value of step S360)} (9)
Unlike the equations (6) and (7), the gradation value in the cell CL is not obtained by using the gradation value of the pixel in the cell as it is, but by subtracting the return value that is an excess of the gradation value. So that the total is equal to the threshold.
この演算式は、式(6)、式(7)の場合と同様に予めROM24に格納されており、CPU22が本ステップを実行する際にROM24から読み出すことによって実行される。ここでは、最終的にステップS330で選択した画素の階調値は、これまで演算した階調値の合計との和をとることで閾値と等しくなるように演算して、それをもとに重心位置を求めることになる。そしてCPU22は、演算した重心GCの位置データを再びRAM25のバッファ領域に書き込む。
This arithmetic expression is stored in advance in the
次に、ステップS370では、CPU22は、ステップS360で演算した戻り値を再び、最後にセルCLに選択した画素の階調値を表すバッファ領域に書き込む。これにより、戻り値が当該画素の階調値に格納される。図13(b)に示す例では、閾値は“75”であり、ステップS320でこれまで格納した階調値は、座標(n+1,m)について見ると、“51+62=113”であるので、CPU22がこれより閾値を減算して“113−75=38”の値が戻り値になる。この値分の階調値は、座標(n+1,m)を初期画素とするドット生成に寄与することなく、下の座標の画素(n+1,m+1)に戻される。なお、このとき、階調値を戻された画素(n+1,m+1)は、RAM25のバッファ領域には“0”が付与されて、戻り値の階調をもつ未処理画素として扱われる。すなわち、階調値を戻された画素は、有効な階調値を有しているので、再びステップS310〜S330の処理の対象とするのである。このように、戻り値は、戻り値を発生した元の画素に再び格納することで、入力階調データDiの階調値に忠実なドット分布を形成することができる。
Next, in step S370, the
ステップS380では、CPU22は淡小ドットのドット出力位置を決定する。上述した処理が繰り返されることにより決定された淡小ドットの位置は、セルCL内の画素の重心GCとなっているので、その座標には、端数を有する値となる。しかし、以上の処理でいう画素とは、印刷エンジン40がドットを生成する最小単位を示したものであるので、この最小単位より小さな単位でドットの座標を制御することができない。そこで、実際に淡小ドットを生成する座標を決定するため、端数を有した座標を最も近い整数値に変換を行い、淡小ドットのドット出力位置を決定する。例えば、図13(e)では、淡小ドットの座標は、画素の中心からずれた位置にあるのに対し、実際に生成される淡小ドットは図13(f)のように、各画素の中心に位置するように変換する。具体的には、CPU22は、重心位置の存在する画素に対応するRAM25のバッファ領域に淡小ドットがオンであることを示す“1”を格納することにより行なわれる。これによりCPU22は、RAM25のバッファ領域を参照して、画素ごとに淡小ドットのオンオフ情報を取得し、印刷エンジン40の動作を制御することにより、淡小ドットがオンとなっている画素にドットをうつことができる。また、ステップS380では、CPU22がRAM25に記憶されている濃大・濃小・淡大ドットの生成状況を参照して、淡小ドットが重なり合うときには、本来生成する画素の周辺の画素のうち、濃大・濃小・淡大ドットが生成されていない画素に淡小ドットを生成するようにする。
In step S380, the
ステップS380におけるドットの生成が終了すると、次に、ステップS310へ戻り、再び未処理画素を探索し、ステップS310において、差分階調データDdに未処理画素がなくすべての画素に対して処理が終了した場合(No)、ステップS390に進む。 When the dot generation in step S380 is completed, the process returns to step S310 to search for an unprocessed pixel again. In step S310, there is no unprocessed pixel in the difference gradation data Dd, and the process is completed for all pixels. If yes (No), the process proceeds to step S390.
ステップS390では、CPU22は、淡小ドット生成処理において生成した淡小ドットおよび、ドット生成処理によって生成した濃大・濃小・淡大ドットのデータを合わせて、ドットのオンオフを表した量子化データDoとして、印刷エンジン40に出力する。ステップ390を終えると、淡小ドット生成処理を終了する。
In step S390, the
次に、図15を用いて、濃大・濃小・淡大ドット、淡小ドットを重ね合わせて印刷をした場合の最終的に得られる印刷物について説明する。図15では、上段左側に、ドット生成処理により生成された濃大・濃小・淡大ドットの分布を示している。そして、上段右側には、淡小ドット生成処理により生成された淡小ドットの分布を示している。なお、図15で求められている差分階調データDdについて負値補正処理および淡小ドット生成処理を行って得られたものを表している。このようなドット配列が生成されている場合、この2つのドット配列を重ね合わせると図15中段に示すようなドット配列が得られる。このように、入力階調データDi(図9参照)に対して、その階調を4種類のドットを適切に配置し、階調性を再現したドット配列を得ることができる。したがって、こうしたドット配列からなる出力データを、印刷エンジン40が印刷して得られる印刷物は、階調再現性に優れたものとなる。
Next, with reference to FIG. 15, a printed matter finally obtained when printing is performed by superimposing dark / dark / light large dots and light small dots will be described. In FIG. 15, the distribution of large / dark / light large dots generated by the dot generation process is shown on the upper left side. On the upper right side, the distribution of light small dots generated by the light small dot generation process is shown. Note that the difference gradation data Dd obtained in FIG. 15 is obtained by performing a negative value correction process and a light small dot generation process. When such a dot array is generated, a dot array as shown in the middle of FIG. 15 is obtained by superimposing these two dot arrays. As described above, it is possible to obtain a dot arrangement in which gradation is reproduced by appropriately arranging four types of dots for the input gradation data Di (see FIG. 9). Therefore, the printed matter obtained by printing the output data having such a dot arrangement by the
なお、図15中段にある座標(n+2,m+1)には、淡大ドットと淡小ドットが重なって配置されている。このような場合、ドットが重なり合うために、各ドットは本来発揮すると推定されただけの濃度が発揮されないことが考えられる。すなわち、各ドットに対して設定された濃度評価値の値はドットが単独で生成された場合の濃度を示しているので、こうしたドット同士が重なり合う場合には、推定したとおりの濃度とならない。例えば、淡小ドットが濃大ドットに重ねて生成されたときでは、淡小ドットは濃大ドットの濃度に飲み込まれ、再現される濃度にほとんど寄与しなくなる。したがって、こうした場合には、淡小ドット生成処理のステップS380において、CPU22がRAM25に記憶されている濃大・濃小・淡大ドットの生成状況を参照するようにして、ドット同士が重なり合わないように淡小ドットを生成するようにする(図15下段参照)。こうすることにより、濃度について、入力階調データDiに対する濃度の総量を維持することになるので、元のデータを忠実に再現することができる。
Note that the light large dots and the light small dots are overlapped at the coordinates (n + 2, m + 1) in the middle of FIG. In such a case, since the dots overlap, it is considered that the density that is estimated to be exhibited by each dot is not exhibited. That is, the value of the density evaluation value set for each dot indicates the density when the dots are generated independently. Therefore, when such dots overlap, the density does not become as estimated. For example, when a light small dot is generated by being superimposed on a dark dot, the light small dot is swallowed by the dark dot density and hardly contributes to the reproduced density. Therefore, in such a case, in step S380 of the light small dot generation process, the
以上に説明したように、本実施形態によれば、入力階調データDiに対して組織的ディザ法によるドット生成処理を行い、各色成分の階調データにバラツキを与えて濃大・濃小・淡大ドットを生成している。そして、濃大・濃小・淡大ドットからなる階調値と入力階調データDiとの誤差分である差分階調データDdに対して、CC法による淡小ドット生成処理を行うことにより淡小ドットのオンオフを決定している。このように、淡小ドット生成処理を行うことによって、ドット生成処理の誤差を解消し、入力階調データDiの階調値を忠実に再現すると共に、特異パターンの発生することがない階調データを取得することができる。 As described above, according to the present embodiment, the dot generation processing by the systematic dither method is performed on the input gradation data Di, and the gradation data of each color component is given a variation, thereby increasing the density, Light dots are generated. Then, light small dot generation processing by the CC method is performed on the difference gradation data Dd that is an error between the gradation value composed of dark, dark, and light large dots and the input gradation data Di. Determines whether small dots are on or off. As described above, by performing the light small dot generation process, the error of the dot generation process is eliminated, the gradation value of the input gradation data Di is faithfully reproduced, and the gradation data in which no unique pattern is generated. Can be obtained.
また、淡小ドット生成処理において、セルCLに負の階調値をもつ画素が含まれていた場合、負の階調値をもつ画素の影響によりセルの外側に重心GCが位置する可能性が高くなる。このような場合、他のセルの内側にドットを形成させることになり、他のセルにより生成されるドットと重なってしまう可能性が高まるので、出力ドットに偏りが発生し、結果的に特異パターンを発生することとなる。例えば、ドット生成処理後の差分階調データが、初期画素として“−75”の階調値をもつ画素(n,m)と、“150”の階調値を有する画素(n+1,m)と、からセルCLが生成されている場合、重心GCは画素(n+2,m)の中心に位置し、セルCL外に階調値が付与されることになる。また、階調値の合計を負値の階調値が相殺するので、閾値以上の階調値をもつセルが不当に大きくなることもありうる。本実施形態によれば、負値の補正処理を行った差分階調データDdを用いて、淡小ドット生成処理を行っているので、負の階調値を含めたセルCLが生成される可能性が低減する。すなわち、セルCLの内部に重心GCが位置し、セルCLの内部に淡小ドットが形成される可能性が高くなる。したがって、ドット間距離の再現性・ドットの分散性が向上した快適な出力画像を得ることができる。 In addition, in the light small dot generation process, if the cell CL includes a pixel having a negative gradation value, the center of gravity GC may be located outside the cell due to the influence of the pixel having the negative gradation value. Get higher. In such a case, dots are formed inside other cells, which increases the possibility of overlapping with dots generated by other cells, resulting in biased output dots, resulting in unique patterns. Will be generated. For example, the difference grayscale data after the dot generation processing includes pixels (n, m) having a grayscale value of “−75” as initial pixels and pixels (n + 1, m) having a grayscale value of “150”. , The center of gravity GC is located at the center of the pixel (n + 2, m), and a gradation value is given outside the cell CL. In addition, since the negative gradation value cancels out the total gradation value, a cell having a gradation value equal to or greater than the threshold value may be unduly large. According to the present embodiment, since the light small dot generation process is performed using the difference gradation data Dd subjected to the negative value correction process, the cell CL including the negative gradation value can be generated. Decrease. That is, the center of gravity GC is located inside the cell CL, and the possibility that a small small dot is formed inside the cell CL increases. Therefore, it is possible to obtain a comfortable output image with improved dot distance reproducibility and dot dispersibility.
以上に述べた前記実施形態によれば、以下の効果が得られる。
(1)淡小ドット生成処理によれば、ドット生成処理で生じ得る濃大・濃小・淡大ドットの量子化誤差(差分階調データDd)を補正するように淡小ドットを生成することができるため、入力画像の階調に忠実な出力画像を得ることができる。
(2)淡小ドット生成処理として、セル内の画素の重心GCにドットを生成するCC法を用いたことにより生成する淡小ドットに偏りを生じることがない。したがって、入力画像には存在しない周期的あるいは規則的なパターンや、ドットの偏りに起因した特異パターンなどの発生を抑えた、視覚的に快適な出力画像を得ることができる。
(3)負値の補正処理を行うことにより、淡小ドット生成処理に用いる差分データに負の値がなくなるように補正を行っている。こうすることによって、淡小ドット生成処理においてセル内の画素の重心GC位置にドットを生成する際に、負の階調値をもつ画素の影響により、重心位置がセルCLの外部となる可能性が低減する。したがって、セルCLの内部の適切な重心GC位置に淡小ドットが生成される可能性が高まり、淡小ドット間距離の再現性・ドットの分散性のよい視覚的に快適な出力画像を得ることができる。
(4)画像処理部30を備えた画像出力装置としたことにより、ホストコンピュータ10など外部からのRGBデータ入力に対して、適切にドットを生成して優れた画質をもつ出力画像を容易に得ることができる。
According to the embodiment described above, the following effects can be obtained.
(1) According to the light small dot generation process, the light small dot is generated so as to correct the quantization error (difference gradation data Dd) of the dark, dark, and light large dots that may occur in the dot generation process. Therefore, an output image faithful to the gradation of the input image can be obtained.
(2) As the light small dot generation process, there is no bias in the light small dots generated by using the CC method for generating dots at the center of gravity GC of the pixels in the cell. Therefore, it is possible to obtain a visually comfortable output image in which generation of a periodic or regular pattern that does not exist in the input image or a peculiar pattern due to the deviation of dots is suppressed.
(3) By performing a negative value correction process, the difference data used for the light small dot generation process is corrected so that there is no negative value. In this way, when a dot is generated at the barycentric position GC of the pixel in the cell in the light small dot generation process, the barycentric position may be outside the cell CL due to the influence of the pixel having a negative gradation value. Is reduced. Therefore, the possibility that a small dot is generated at an appropriate center of gravity GC inside the cell CL is increased, and a visually comfortable output image with good reproducibility of the distance between the light and small dots and good dot dispersion is obtained. Can do.
(4) By using the image output device including the
以上、本発明の一実施形態を説明したが、本発明はこうした実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施することもできる。以下、変形例を挙げて説明する。 Although one embodiment of the present invention has been described above, the present invention is not limited to such an embodiment, and can be implemented in various forms without departing from the spirit of the present invention. Hereinafter, a modification will be described.
(変形例1)次に本発明の第1の変形例について説明する。前記実施形態では、セルCLを構成する画素を選択するための基準点を重心位置として、毎回画素選択時に更新するようにしていたが、第1変形例では、画素選択の基準点を、画素の階調値には関係なく、画素の座標位置を利用した中心位置とする。これにより、毎回重心位置を計算することがなく、他の処理を含めた全体の処理速度を上げることができる。 (Modification 1) Next, a first modification of the present invention will be described. In the above-described embodiment, the reference point for selecting the pixel constituting the cell CL is used as the center of gravity position, and is updated every time the pixel is selected. However, in the first modification, the reference point for pixel selection is Regardless of the gradation value, the center position using the coordinate position of the pixel is used. This makes it possible to increase the overall processing speed including other processes without calculating the center of gravity position every time.
第1の変形例を図16を用いて説明する。ここでは、淡小ドット生成処理を行うにあたって、セルCLに新しい未探索画素を組み入れる際に、階調値を利用した重心位置ではなく、その座標位置を利用した中心位置(第1の基準点)から近い画素を選択するようにする。 A first modification will be described with reference to FIG. Here, when the light small dot generation process is performed, when a new unsearched pixel is incorporated into the cell CL, the center position (first reference point) using the coordinate position, not the center position using the gradation value. A pixel close to is selected.
ここで、画素の位置座標を(x,y)と表すとすると、中心位置の座標は以下の式により求められる(以下の式でNはセル内の画素数、iはセル内の画素を示す数字である)。
x=Σixi/N …(10)
y=Σiyi/N …(11)
Here, assuming that the position coordinates of a pixel are represented as (x, y), the coordinates of the center position can be obtained by the following expression (where N is the number of pixels in the cell and i is the pixel in the cell). Number).
x = Σ i x i / N ... (10)
y = Σ i y i / N (11)
以下、差分階調データDdとして図16(a)に示す階調値をもつ場合について説明する。図16(a)は、説明を簡単にするために縦3画素、横4画素分の画像データが入力されたときの差分階調データDdの例を示しているが、実際には、より大きなサイズの1フレーム分の画像データが入力されることとなる。なお、このとき、ドットを生成する閾値としては“255”としている。 Hereinafter, a case where the differential gradation data Dd has the gradation values shown in FIG. FIG. 16A shows an example of the differential gradation data Dd when image data for 3 pixels in the vertical direction and 4 pixels in the horizontal direction is input for the sake of simplicity. The image data for one frame of the size is input. At this time, the threshold for generating dots is set to “255”.
図16(a)の差分階調データDdについて淡小ドット生成処理を行うものとする。処理では、まず、CPU22が初期画素の探索・選択を行うが、前記実施形態と同様に所定の走査方法として、未処理画素のうち最も上の最も左側にある画素を探索して選択する。これは、最終的に生成されるセルCLが1画像中斜め方向に傾いて配置される確率が高くなり、ドットが斜め方向に打たれ知覚されにくくするためでもある。図16(a)の例では、(n,m)の位置の画素を初期画素として選択する。
It is assumed that the light small dot generation process is performed on the difference gradation data Dd in FIG. In the processing, first, the
そして、初期画素をセルCLに組み入れ、その中心位置を式(10)および(11)を用いて演算すると図16(b)に示す位置に中心位置SCが位置することになる。次に、その中心位置SCから最も近い位置に位置する未処理画素を選択することになるが、かかる画素が複数ある場合には、前記実施形態等と同様に所定の走査方法により選択する。図16(b)に示す例では、中心位置SCに最も近い位置は(n+1,m)と(n,m+1)の2つ存在するが、ここでは(n+1,m)を選択することになる。 Then, when the initial pixel is incorporated in the cell CL and the center position is calculated using the equations (10) and (11), the center position SC is located at the position shown in FIG. Next, an unprocessed pixel located closest to the center position SC is selected. When there are a plurality of such pixels, they are selected by a predetermined scanning method as in the above-described embodiment. In the example shown in FIG. 16B, there are two positions (n + 1, m) and (n, m + 1) that are closest to the center position SC. Here, (n + 1, m) is selected.
次に、図16(c)に示すように選択した未処理画素MGをセルCLに組み入れ、セルCLの拡大処理を行う際、未処理画素を選択するための基準点(第1の基準点)すなわち中心位置を演算すると、図16(c)に示したように、SCの位置となる。セルCLの階調値合計は、この時点で“100”であるのでさらに未処理画素を選択することになる。本変形例では閾値を“255”とすると、この値になるまで未処理画素を選択することにする。 Next, as shown in FIG. 16C, the selected unprocessed pixel MG is incorporated into the cell CL, and a reference point (first reference point) for selecting the unprocessed pixel when performing the enlargement process of the cell CL. That is, when the center position is calculated, the SC position is obtained as shown in FIG. Since the total gradation value of the cell CL is “100” at this time, an unprocessed pixel is further selected. In this modification, when the threshold is “255”, unprocessed pixels are selected until this value is reached.
この基準となる中心位置SCから最も近い画素を選択することになるが、図16(c)に示す例では、画素(n,m+1)および画素(n+1,m+1)の2つの画素が存在することになる。この場合、走査方法に従って選択し、(n,m+1)の画素を未処理画素として選択することになる。 The pixel closest to the reference center position SC is selected, but in the example shown in FIG. 16C, there are two pixels, pixel (n, m + 1) and pixel (n + 1, m + 1). become. In this case, the selection is made according to the scanning method, and the (n, m + 1) pixel is selected as an unprocessed pixel.
そして、図16(d)に示すように選択した未処理画素をセルCLに組み入れ、その中心位置を式(10)および式(11)を用いて演算すると、位置SCに位置することになる。この時点でのセルCLの階調値合計は“165”となり、閾値に達しないのでさらに未処理画素を選択することになる。中心位置SCから最も近い距離にある画素は、(n+1,m+1)に位置する画素であるので、この画素を未処理画素として選択する。 Then, as shown in FIG. 16D, when the selected unprocessed pixel is incorporated into the cell CL and its center position is calculated using the equations (10) and (11), it is located at the position SC. At this time, the total gradation value of the cell CL is “165”, and since the threshold value is not reached, an unprocessed pixel is further selected. Since the pixel closest to the center position SC is the pixel located at (n + 1, m + 1), this pixel is selected as an unprocessed pixel.
次いで、選択した未処理画素MGをセルCLに組み入れ、その中心位置SCを式(10)および式(11)を用いて演算すると、図16(e)に示す位置にすることになる。この時点でのセルCLの階調値の合計は“215”で、閾値に達しない。よって、未処理画素を選択する。中心位置SCから最も近い位置にある未処理画素は、画素(n,m+2)、画素(n+1,m+2)、画素(n+2,m)、画素(n+2,m+1)の4つの画素があるが、所定の走査方法に従って(n+2,m)に位置する画素を選択することになる。 Next, when the selected unprocessed pixel MG is incorporated into the cell CL and the center position SC is calculated using the equations (10) and (11), the position shown in FIG. At this time, the sum of the gradation values of the cell CL is “215”, which does not reach the threshold value. Therefore, an unprocessed pixel is selected. There are four unprocessed pixels closest to the center position SC: pixel (n, m + 2), pixel (n + 1, m + 2), pixel (n + 2, m), and pixel (n + 2, m + 1). The pixel located at (n + 2, m) is selected according to the scanning method.
そして、選択した未処理画素をセルCLに組み入れることになるが、未処理画素を組み入れたとき生成されるセルCLの階調値の合計は“265”となり、閾値を超えてしまう。この場合も前記実施形態と同様に、閾値に達する分の階調値分をセルCLに組み入れ、この未処理画素に残りのレベル値分(誤差データ)を戻して以後当該画素が未処理画素として選択されるようにする。前記実施形態と同様に、入力画像の階調データに忠実なドットを生成させるためである。ここでは、(n+2,m)に位置する画素に対して“10”を戻り値として与えることになる(図16(f)参照)。 Then, the selected unprocessed pixel is incorporated into the cell CL. However, the total gradation value of the cell CL generated when the unprocessed pixel is incorporated is “265”, which exceeds the threshold value. In this case as well, as in the above embodiment, the gradation value corresponding to the threshold value is incorporated into the cell CL, the remaining level value (error data) is returned to the unprocessed pixel, and the pixel is subsequently set as an unprocessed pixel. To be selected. This is to generate dots that are faithful to the gradation data of the input image, as in the above embodiment. Here, “10” is given as a return value to the pixel located at (n + 2, m) (see FIG. 16F).
次いで、ここまで構成したセルCLは、セルCLの階調値合計が閾値に達したので、セルCLの重心GC位置にドットを生成させるための処理を行う。重心GC位置の演算は、前記実施形態の式(4)および式(5)と同様に演算することにより行われる。 Next, since the total gradation value of the cell CL has reached the threshold value, the cell CL configured so far performs a process for generating a dot at the center of gravity GC position of the cell CL. The calculation of the center of gravity GC position is performed by calculating in the same manner as Expressions (4) and (5) of the above embodiment.
前記実施形態と同様に、毎回重心GC位置を計算すると、式(4)や式(5)の処理演算が多くなるが、画素選択のための基準点を中心位置として演算し、最後に淡小ドットを生成するときに重心GCを演算することで、演算量を減らすことができるとともに、セルCLが円状に成長してドット間距離を保ち視覚的に快適なドット出力を得ることができる。 As in the previous embodiment, when the center of gravity GC position is calculated every time, the processing calculations of Expression (4) and Expression (5) increase, but the calculation is performed with the reference point for pixel selection as the center position, and finally the lightness is small. By calculating the center of gravity GC when generating dots, the amount of calculation can be reduced, and the cell CL can grow in a circle to maintain a dot-to-dot distance and obtain a visually comfortable dot output.
(変形例2)また、第2の変形例として、淡小ドットを生成するときに、セルCLの重心位置を演算せずに、第1変形例において、未処理画素の選択に用いたセルCLの中心位置(第1の基準点)にある画素の位置(第2の基準点)にドットを生成させるようにしてもよい。こうすれば、淡小ドットを生成するときに、重心GCの計算を行う必要がないので、演算量を減らすことができる。この場合、中心位置が複数の画素の間に位置することも考えられるが、かかる場合には、例えば走査方法と同じ優先順序に従ってセルCL内のいずれか1つの画素を選択するようにしてもよい。あるいは、ランダムに選択したり、所定のテーブルを用いて複数の画素からいずれか1つの画素を選択したりするようにしてもよい。 (Modification 2) As a second modification, the cell CL used for selecting the unprocessed pixel in the first modification is not calculated when the light dot is generated without calculating the center of gravity position of the cell CL. Alternatively, a dot may be generated at the pixel position (second reference point) at the center position (first reference point). In this way, it is not necessary to calculate the center of gravity GC when generating light small dots, so that the amount of calculation can be reduced. In this case, the central position may be located between a plurality of pixels. In such a case, for example, any one pixel in the cell CL may be selected according to the same priority order as the scanning method. . Or you may make it select at random or select any one pixel from several pixels using a predetermined | prescribed table.
(変形例3)さらに、第3の変形例として、画素選択のための基準点(第1の基準点)を毎回更新するのではなく、1回おきに更新したり、2回おきに更新したり、予め回数を決めてその回数のときに更新するようにしてもよい。1回おきに更新する例を、図17を用いて説明する。 (Modification 3) Further, as a third modification, the reference point for pixel selection (first reference point) is not updated every time, but is updated every second time or every second time. Alternatively, the number of times may be determined in advance and updated when the number is reached. An example of updating every other time will be described with reference to FIG.
図16のときと同様に差分階調データDdが図17(a)のように与えられた場合で説明することにする。図16(b)と同様に、初期画素を選択してその中心位置SCを演算すると図17(b)に示す位置となる。そして、未処理画素MGを基準点(中心位置SC)から最も近い画素を選択すると(n+1,m)に位置する画素となる。 As in the case of FIG. 16, the case where the differential gradation data Dd is given as shown in FIG. 17A will be described. Similarly to FIG. 16B, when the initial pixel is selected and its center position SC is calculated, the position shown in FIG. 17B is obtained. When a pixel closest to the unprocessed pixel MG from the reference point (center position SC) is selected, the pixel is located at (n + 1, m).
次いで、選択した未処理画素をセルCLに組み入れるが、次に選択する未処理画素は、セルCLから演算した中心位置SCに基づいて選択するのではなく、組み入れる前の中心位置SCに基づいて選択する。この時点で基準点を更新しないようにする。図17(c)に示すように中心位置SCから最も近い画素は(n,m+1)となりこの画素を未処理画素MGとして選択する。 Next, the selected unprocessed pixel is incorporated into the cell CL, but the next unprocessed pixel to be selected is not selected based on the center position SC calculated from the cell CL, but is selected based on the center position SC before incorporation. To do. Do not update the reference point at this point. As shown in FIG. 17C, the pixel closest to the center position SC is (n, m + 1), and this pixel is selected as the unprocessed pixel MG.
次いで、選択した未処理画素MGを組み入れたセルCLは図17(d)のようになる。そして、1回おきに基準点を更新するようにするので、この時点で構成したセルCLの中心位置SCを演算すると図17(d)に示す位置に中心位置SCが移動することになる。 Next, the cell CL incorporating the selected unprocessed pixel MG is as shown in FIG. Since the reference point is updated every other time, if the center position SC of the cell CL configured at this time is calculated, the center position SC moves to the position shown in FIG.
次いで、この更新した中心位置を基準にして、この位置から最も近い未処理画素MGを選択してその画素をセルCLに組み入れると図17(e)に示すようになる。そして、基準点を更新せず、1つ前に演算した中心位置SCから最も近い画素を未処理画素MGとして選択((n+2,m)の位置の画素を選択)して、セルCLを構成する。 Next, with reference to the updated center position, the unprocessed pixel MG closest to this position is selected and incorporated into the cell CL as shown in FIG. Then, without updating the reference point, the pixel closest to the previously calculated center position SC is selected as the unprocessed pixel MG (the pixel at the position (n + 2, m) is selected), and the cell CL is configured. .
図16の例と同様に、この選択した画素を組み入れたセルCL内の画素の階調値合計は閾値を超えるので、超える分を戻り値として、選択した画素に戻す。そして、淡小ドット生成のための重心GC位置を演算すると図17(f)に示した位置GCになり、この位置にドットを生成させるようにする。そして、基準点を更新させると、図17(f)に示した位置に基準点SCが移動することになる。 As in the example of FIG. 16, since the total gradation value of the pixels in the cell CL incorporating the selected pixel exceeds the threshold value, the excess is returned to the selected pixel as a return value. Then, when the center of gravity GC position for generating light small dots is calculated, the position GC shown in FIG. 17F is obtained, and dots are generated at this position. When the reference point is updated, the reference point SC moves to the position shown in FIG.
このように毎回、画素選択の基準点(第1の基準点)を更新するのではなく、1回おきに更新することでさらに演算量を減らすことができ、他の処理を含めた画像処理装置全体の処理速度の向上を図ることができる。さらに、初期画素の選択から4回目の未処理画素選択のときに基準点を更新し、さらにそれから3回目、2回目と減算し、当該回数となるときに更新することとしてもよい。 In this way, instead of updating the reference point (first reference point) for pixel selection every time, the amount of calculation can be further reduced by updating every other time, and an image processing apparatus including other processing The overall processing speed can be improved. Furthermore, the reference point may be updated when the unprocessed pixel is selected for the fourth time from the selection of the initial pixel, and then subtracted from the third and second times, and updated when the number of times is reached.
(変形例4)前記実施形態では、ドット生成処理において、組織的ディザ法を用いたドットの判定を行うことによって量子化データDoを生成した。第4の変形例としては、組織的ディザ法に替えて、このドット生成処理として、誤差拡散法または平均誤差最小法を用いても良い。組織的ディザ法を用いた場合と同様に入力階調データにバラツキを与える効果を得ることができる。 (Modification 4) In the above embodiment, in the dot generation process, the quantized data Do is generated by determining dots using the systematic dither method. As a fourth modification, an error diffusion method or an average error minimum method may be used as the dot generation processing instead of the systematic dither method. As in the case of using the systematic dither method, it is possible to obtain the effect of giving variation to the input gradation data.
(変形例5)前記実施形態では、負値の補正処理を行った際に、処理の途中で、差分階調データDdに正の階調値がなくなり負の階調値のみが残った場合には、これ以降の負値の補正処理を行わないこととした。しかし、第5の変形例として、このような場合は、差分階調データDdの正の階調値が残るように、ディザマトリクスの閾値を変化させても良い。このようにすれば、例えば、濃大ドットのディザマトリクスの各閾値を若干大きくすることにより、濃大ドットの生成する数を抑えることができる。濃大ドットが生成されなくなった分の階調値はより濃度の低い濃小ドット・淡大ドットの生成に割り当てられる。こうすることによって、差分階調データDdにより多くの正の階調値が残ることとなり、淡小ドットを生成することによって、ドットの生成による誤差である差分階調データDdを確実かつ適正に補正することができる。したがって、元の入力階調データDiを忠実に再現した出力画像を得ることができる。 (Modification 5) In the above embodiment, when the negative value correction process is performed, the difference gradation data Dd has no positive gradation value and only the negative gradation value remains during the process. Will not perform the negative value correction process thereafter. However, as a fifth modification, in such a case, the threshold value of the dither matrix may be changed so that the positive gradation value of the difference gradation data Dd remains. In this way, for example, the number of dark dots generated can be suppressed by slightly increasing the threshold values of the dark dot dither matrix. The gradation value corresponding to the generation of dark dots is assigned to the generation of dark dots and light large dots with lower density. By doing so, many positive tone values remain in the difference tone data Dd, and by generating light small dots, the difference tone data Dd, which is an error due to dot generation, is corrected reliably and appropriately. can do. Therefore, an output image that faithfully reproduces the original input gradation data Di can be obtained.
(変形例6)前記実施形態では、淡小ドット生成処理を行う際に、重心GCより最も近い画素が複数あった場合、探索順にしたがって選択するようにした。しかし、画素の選択方法はこれだけではなく、複数の画素のうちいずれかをランダムに選択するようにしても良いし、未処理画素を選択した場合の新たな重心GC位置がより初期画素の位置に近くなるように画素を選択するとしても良い。このようにすれば、セルCLの形状が円形に近づくことになるので、生成される淡小ドットに偏りがなく、特異パターンのない出力画像を得ることができる。 (Modification 6) In the above embodiment, when there are a plurality of pixels closest to the center of gravity GC when performing the light small dot generation process, the selection is made according to the search order. However, the pixel selection method is not limited to this, and any one of a plurality of pixels may be selected at random, or the new center of gravity GC position when an unprocessed pixel is selected becomes the position of the initial pixel. The pixels may be selected so that they are close to each other. In this way, since the shape of the cell CL approaches a circular shape, the generated light small dots are not biased and an output image without a specific pattern can be obtained.
(変形例7)前記実施形態では、濃大・濃小・淡大ドットについて組織的ディザ法によるドット生成を行い、その誤差分(差分階調データDd)を、補正するようにCC法によって淡小ドットの量子化データDoを作成したが、処理の対象とするドットはこのパターンに限られるものではない。例えば、濃大・濃小・淡大・淡小ドットについて組織的ディザ法によるドット生成を行い、その誤差分(差分階調データDd)を補正するようにCC法により更に淡小ドットを生成するようにしても良い。また、始めに、濃大・濃小ドットについて、組織的ディザ法による判定を行い、その誤差をCC法により淡大ドットを生成するようにしておおまかに補正し、更に残った誤差を淡小ドットにより処理するとしてもよい。 (Modification 7) In the above-described embodiment, dot generation by the systematic dither method is performed for dark, dark, and light large dots, and the error (difference gradation data Dd) is lightly corrected by the CC method so as to be corrected. Although the small dot quantization data Do has been created, the dots to be processed are not limited to this pattern. For example, dots are generated by a systematic dither method for dark, dark, light, and light dots, and light and light dots are further generated by the CC method so as to correct the error (difference gradation data Dd). You may do it. First, the dark / dark dots are determined by the systematic dither method, and the error is roughly corrected by generating light large dots by the CC method, and the remaining errors are further corrected by light dots. May be processed.
(変形例8)前記実施形態では、ハーフトーン処理によって、“0”と“255”の2種類の階調値に階調変換した。これは、以降のドットを形成する処理において、階調値“255”に対応した大きさのドットを打つことを想定したためである。第8の変形例としては、複数種類の大きさのドットを打つこととし、その複数種類の大きさのドットに対応した複数の種類の階調値に階調変換するものとしても良い。また、同様にインクの濃度についても複数種類の濃度のドットを打つこととし、複数種類の階調値に階調変換するものとしても良い。 (Modification 8) In the above-described embodiment, gradation conversion is performed into two kinds of gradation values “0” and “255” by halftone processing. This is because it is assumed that dots having a size corresponding to the gradation value “255” are hit in the subsequent dot forming process. As an eighth modification, dots of a plurality of types of sizes may be hit, and tone conversion may be performed to a plurality of types of tone values corresponding to the plurality of types of sizes of dots. Similarly, with respect to the ink density, dots of a plurality of types of density may be applied, and gradation conversion may be performed to a plurality of types of gradation values.
(変形例9)前記実施形態では、画像処理部30および印刷エンジン40を有する画像出力装置20とした。第9の変形例として、色補正・色変換処理、階調値分割処理、ドット生成処理、負値補正処理、淡小ドット生成処理を行う画像処理部を備えた印刷装置としても良い。このようにすれば、ホストコンピュータ10からの入力を印刷装置が直接処理することにより容易に出力画像を得ることができる。
(Modification 9) In the above embodiment, the
(変形例10)また、第10の変形例として、前記実施形態における画像処理装置は、インクジェットプリンタにて構成するようにしたが、本発明はこれに限定されるものでなく、ドットの大小または濃淡を打ち分けることができる機器に適用することができる。したがって、例えば、レーザープリンタやサーマルプリンタなど種々のプリンタや電子写真などにて構成するようにしてもよい。あるいは、このようなプリンタなどの機能が組み込まれたコピー機やコンピュータ、ワープロ、ファックスなど種々の機器において本発明の画像処理装置を構成するようにしてもよい。 (Modification 10) As a tenth modification, the image processing apparatus in the above embodiment is configured by an ink jet printer. However, the present invention is not limited to this. The present invention can be applied to a device that can distinguish light and shade. Therefore, for example, various printers such as laser printers and thermal printers, electrophotography, and the like may be used. Alternatively, the image processing apparatus of the present invention may be configured in various apparatuses such as a copier, a computer, a word processor, and a fax machine in which such a function as a printer is incorporated.
10…ホストコンピュータ、11…アプリケーション部、12…ラスタライズ部、20…画像出力装置、21…入力I/F、22…CPU、23…ハードディスク、24…ROM、25…RAM、30…画像処理装置としての画像処理部、31…色補正・色変換部、32…色補正表、33…階調値分割部、34…第1の階調変換手段としてのドット生成部、35…階調値移動手段としての負値補正部、36…第2の階調変換手段としての淡小ドット生成部、40…印刷エンジン、41…ヘッド駆動部、42…印刷ヘッド、Nz…ノズル、PE…ピエゾ素子、Ti…インク室、Di…入力データとしての入力階調データ、Dd…誤差データとしての差分階調データ、Do…量子化データ、RV…結果値、CL…画素群としてのセル、GC…重心、SC…中心位置、s…階調値補正量、t…階調値移動量、xGC…重心のx座標、yGC…重心のy座標。
DESCRIPTION OF
Claims (14)
前記入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換手段と、
画素ごとに、前記第1の階調変換手段により取得した前記階調データと前記入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、前記画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換手段と、を備えたことを特徴とする画像処理装置。 An image processing apparatus that performs gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel,
First gradation conversion is performed on the gradation value of the input data, which is converted into gradation data composed of Q (Q <P, Q is an integer of 2 or more) kinds of gradation values for each pixel, First gradation converting means for acquiring gradation data;
Error data consisting of M (M is an integer of 2 or more) types of gradations, which is an error between the gradation data acquired by the first gradation conversion means and the input data for each pixel. Then, new pixels are selected one after another until the sum of the gradation values becomes equal to or greater than the threshold value, and a pixel group is generated. N (N is an integer of 2 or more) types of predetermined pixels in the pixel group An image processing apparatus comprising: a second gradation conversion unit that assigns gradation values.
前記入力データのもつ階調値を複数の階調値に分割し、それぞれの階調値を有する複数の階調データを取得する階調値分割手段を、更に備え、
前記第1の階調変換手段は、分割した前記複数の階調データに第1の階調変換を行い、
前記第2の階調変換手段は、前記複数の階調データと前記入力データとの間の誤差分である誤差データに対して第2の階調変換を行うことを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
A gradation value dividing means for dividing the gradation value of the input data into a plurality of gradation values and obtaining a plurality of gradation data having the respective gradation values;
The first gradation converting means performs first gradation conversion on the plurality of divided gradation data,
The image processing apparatus according to claim 2, wherein the second gradation conversion unit performs second gradation conversion on error data that is an error between the plurality of gradation data and the input data.
前記第2の階調変換手段は、生成した画素群の重心位置から最も近い画素を新たに選択するようにして、前記画素群を生成し、前記画素群の重心位置に基づいて決定した画素にN種類の階調値を付与することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The second gradation converting unit generates the pixel group by newly selecting a pixel closest to the centroid position of the generated pixel group, and determines the pixel determined based on the centroid position of the pixel group. An image processing apparatus characterized by providing N kinds of gradation values.
前記誤差データのもつ階調値の符号を画素ごとに判断し、符号が負である画素には符号が正となる画素から正の階調値を移動することにより、当該画素のもつ負の階調値を相殺した誤差データを取得する階調値移動手段を、更に備え、
前記第2の階調変換手段は、前記負の階調値を相殺した誤差データに対して、第2の階調変換を行うことを特徴とする画像処理装置。 The image processing apparatus according to claim 3.
The sign of the gradation value possessed by the error data is judged for each pixel, and the negative gradation of the pixel is moved by moving the positive gradation value from the pixel having the sign positive to the pixel having the sign negative. A gradation value moving means for acquiring error data that cancels the tone value;
The image processing apparatus according to claim 2, wherein the second gradation conversion unit performs second gradation conversion on error data in which the negative gradation value is canceled.
前記第2の階調変換手段は、画素選択のための第1の基準点を設定し、
第1の基準点に基づいて、画素ごとの階調値の総和が閾値以上となるまで前記M種類の階調値を有する画素を選択するようにして画素群を生成し、
生成した画素群に基づいて第2の基準点を決定し、
前記第2の基準点に基づいて決定した画素に前記N種類の階調値を付与することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The second gradation converting means sets a first reference point for pixel selection;
Based on the first reference point, a pixel group is generated by selecting pixels having the M kinds of gradation values until the sum of gradation values for each pixel is equal to or greater than a threshold value,
Determining a second reference point based on the generated pixel group;
An image processing apparatus, wherein the N kinds of gradation values are assigned to a pixel determined based on the second reference point.
前記第2の階調変換手段は、前記第1の基準点を、前記画素を所定の回数選択するごとに更新させることを特徴とする画像処理装置。 The image processing apparatus according to claim 5.
The image processing apparatus according to claim 2, wherein the second gradation conversion unit updates the first reference point every time the pixel is selected a predetermined number of times.
前記第1の基準点は、前記選択した画素の位置から演算した中心位置であり、前記第2の基準点は、前記画素群の画素の位置と階調値とから演算した重心位置であることを特徴とする画像処理装置。 The image processing apparatus according to claim 5 or 6,
The first reference point is a center position calculated from the position of the selected pixel, and the second reference point is a barycentric position calculated from the pixel position and the gradation value of the pixel group. An image processing apparatus.
前記第1の基準点は、前記選択した画素の位置から演算した中心位置であり、前記第2の基準点は、前記画素群の画素の位置から演算した中心位置であることを特徴とする画像処理装置。 The image processing apparatus according to claim 5 or 6,
The first reference point is a center position calculated from the position of the selected pixel, and the second reference point is a center position calculated from the pixel position of the pixel group. Processing equipment.
前記第2の階調変換手段は、新たな画素を選択し続け、生成した前記画素群における階調値の総和が前記閾値を超えたとき、前記階調値と閾値とを差分した階調値を、最後に選択した前記画素に戻すことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 8,
The second gradation converting means continues to select new pixels, and when the sum of the gradation values in the generated pixel group exceeds the threshold value, a gradation value obtained by subtracting the gradation value from the threshold value Is returned to the last selected pixel.
前記第1の階調変換手段は、組織的ディザ法、誤差拡散法または平均誤差最小法のうちのいずれかによる階調変換を行うことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 9,
The image processing apparatus according to claim 1, wherein the first gradation converting means performs gradation conversion by any one of a systematic dither method, an error diffusion method, and an average error minimum method.
前記複数の階調データに対応して、濃度および大きさの少なくとも一方の異なるドットを形成することにより印刷を行うことを特徴とする印刷装置。 A printing apparatus comprising the image processing apparatus according to claim 1 and printing an image by forming a plurality of dots on a print medium.
A printing apparatus that performs printing by forming dots having at least one of density and size corresponding to the plurality of gradation data.
前記入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換ステップと、
画素ごとに、前記第1の階調変換手段により取得した前記階調データと前記入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、前記画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換ステップと、を備えたことを特徴とする画像処理方法。 An image processing method for performing gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel,
First gradation conversion is performed on the gradation value of the input data, which is converted into gradation data composed of Q (Q <P, Q is an integer of 2 or more) kinds of gradation values for each pixel, A first gradation conversion step for obtaining gradation data;
Error data consisting of M (M is an integer of 2 or more) types of gradations, which is an error between the gradation data acquired by the first gradation conversion means and the input data for each pixel. Then, new pixels are selected one after another until the sum of the gradation values becomes equal to or greater than the threshold value, and a pixel group is generated. Among the pixel groups, N (N is an integer of 2 or more) types of predetermined pixels. An image processing method comprising: a second gradation conversion step for assigning gradation values.
コンピュータを、
前記入力データのもつ階調値に対して、画素ごとにQ(Q<P、Qは2以上の整数)種類の階調値からなる階調データに変換する第1の階調変換を行い、階調データを取得する第1の階調変換手段、
画素ごとに、前記第1の階調変換手段により取得した前記階調データと前記入力データとの間の誤差分であるM(Mは2以上の整数)種類の階調数からなる誤差データについて、階調値の総和が閾値以上となるまで新たな画素を次々に選択して画素群を生成し、前記画素群のうち、所定の画素に対してN(Nは2以上の整数)種類の階調値を付与する第2の階調変換手段、として機能させることを特徴とする画像処理プログラム。 An image processing program for performing gradation conversion on input data having any one of P (P is an integer of 2 or more) kinds of gradation values for each pixel,
Computer
First gradation conversion is performed on the gradation value of the input data, which is converted into gradation data composed of Q (Q <P, Q is an integer of 2 or more) kinds of gradation values for each pixel, First gradation conversion means for obtaining gradation data;
Error data consisting of M (M is an integer of 2 or more) types of gradations, which is an error between the gradation data acquired by the first gradation conversion means and the input data for each pixel. Then, new pixels are selected one after another until the sum of the gradation values becomes equal to or greater than the threshold value, and a pixel group is generated. N (N is an integer of 2 or more) types of predetermined pixels in the pixel group An image processing program that functions as a second gradation conversion unit that assigns gradation values.
A computer-readable recording medium on which the image processing program according to claim 13 is recorded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004201881A JP2006025217A (en) | 2004-07-08 | 2004-07-08 | Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004201881A JP2006025217A (en) | 2004-07-08 | 2004-07-08 | Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006025217A true JP2006025217A (en) | 2006-01-26 |
Family
ID=35798164
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004201881A Withdrawn JP2006025217A (en) | 2004-07-08 | 2004-07-08 | Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006025217A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010137536A (en) * | 2008-11-12 | 2010-06-24 | Seiko Epson Corp | Printer, and printing method |
-
2004
- 2004-07-08 JP JP2004201881A patent/JP2006025217A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010137536A (en) * | 2008-11-12 | 2010-06-24 | Seiko Epson Corp | Printer, and printing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4419947B2 (en) | Printing apparatus, printing apparatus control program, printing apparatus control method, printing data generation apparatus, printing data generation program, and printing data generation method | |
JP6639247B2 (en) | Image processing apparatus, image processing method, and program | |
JP2006306023A (en) | Printing device, printing program, printing method and image processor, image processing program, image processing method and recording medium recording the above program | |
JP2007083704A (en) | Printing device, printing program, printing method and image processing device, image processing program, image processing method, and recording medium on which program is recorded | |
US20120274949A1 (en) | Inkjet printing apparatus and print data generating method | |
US7433083B2 (en) | Halftone-image processing device | |
JP4479663B2 (en) | Image processing apparatus, image processing method, and image processing program for halftone processing using fixed cells | |
US20050046903A1 (en) | Image processing device, image processing method and image processing program | |
JP7242272B2 (en) | Dither matrix generation device, generation method, image processing device using dither matrix, image processing method, and program | |
JP2006025217A (en) | Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program | |
JP2006212907A (en) | Printing apparatus, printing program, printing method and image processing apparatus, image processing program, image processing method, and recording medium recorded with the same | |
JP2008153914A (en) | Dither matrix generator, dither matrix generation program, dither matrix generation method, printer, printer control program, printer control method, image processor, image processing program, image processing method and recording medium having the program recorded thereon | |
JP3951953B2 (en) | Printing apparatus, image processing apparatus, printing method, image processing method, and program | |
JP7183057B2 (en) | Image processing device, image processing method, program | |
JP7341904B2 (en) | Image processing device and image processing method | |
JP2005341142A (en) | Image processor, processing method and program, and recording medium with the program stored | |
JP7191665B2 (en) | Image processing device, image processing method and program | |
JP2019029769A (en) | Dither matrix creation method, program, and information processing unit | |
JP4561543B2 (en) | Image processing apparatus, image processing method, and program | |
JP4274102B2 (en) | Image processing apparatus, image processing method, image processing program, and recording medium recording the program | |
JP4337670B2 (en) | Image processing apparatus, image processing method, and program | |
JP2004015614A (en) | Image processing apparatus and method therefor | |
JP2006205717A (en) | Printer, printing program, printing method, image processor, image processing program, image processing method and recording medium having the programs recorded | |
JP2007015397A (en) | Printing device, printing device control program, printing device control method, printing data generating device, printing data generating program, and printing data generating method | |
JP2007129695A (en) | Printer, printing program, printing method, image processing apparatus, image processing program, image processing method, recording medium with the programs recorded thereon, and display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20070403 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20071002 |