JP2005341142A - Image processor, processing method and program, and recording medium with the program stored - Google Patents

Image processor, processing method and program, and recording medium with the program stored Download PDF

Info

Publication number
JP2005341142A
JP2005341142A JP2004156318A JP2004156318A JP2005341142A JP 2005341142 A JP2005341142 A JP 2005341142A JP 2004156318 A JP2004156318 A JP 2004156318A JP 2004156318 A JP2004156318 A JP 2004156318A JP 2005341142 A JP2005341142 A JP 2005341142A
Authority
JP
Japan
Prior art keywords
data
pixel
gradation
reference point
hue
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
Application number
JP2004156318A
Other languages
Japanese (ja)
Inventor
Nobuhiro Karido
信宏 狩戸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2004156318A priority Critical patent/JP2005341142A/en
Publication of JP2005341142A publication Critical patent/JP2005341142A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor in which bias of dot density is lessened, while suppressing overlapping of dots to be formed, and to provide an image processing method and program, or a recording medium with the program stored thereto. <P>SOLUTION: A difference data calculating section calculates the difference data between a first hue data binarized to predetermined gray scale data outputting a dot at a first gray scale converting section for each pixel and first hue data prior to binarization. Subsequently, a data-adding section processes the difference data thus calculated, through a predetermined filter to produce data where objective pixels for reducing the gray level around a pixel outputting a dot are spread isotropically and adds that data to second hue data. When the second hue data, having an increased/decreased gray level is subjected to gray sale conversion at at a second gray scale converting section, the output position of dot exhibiting proper dispersibility, without overlapping the dots corresponding to first and second hue data are obtained. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、多階調値で表された画像データのハーフトーン処理に関する。詳しくは、出力ドットが複数種類存在するとき、異なる種類のドットの重なりを抑制するハーフトーン処理に関する。   The present invention relates to halftone processing of image data represented by multi-tone values. Specifically, the present invention relates to halftone processing that suppresses overlapping of different types of dots when there are a plurality of types of output dots.

従来から、プリンタなどの画像出力装置は、画素ごとに多値の階調値を有する階調データに対して、ドットの出力の有無を表す2値の値に階調変換処理し、印刷用紙にドットを形成して印刷を行うようにしている。一般には、多値の階調値を2値の値に変換する処理のことをハーフトーン処理と称している。   2. Description of the Related Art Conventionally, an image output device such as a printer performs gradation conversion processing on gradation data having multi-value gradation values for each pixel into binary values indicating the presence / absence of dot output, and prints on a print sheet Printing is performed by forming dots. In general, a process of converting a multi-value gradation value into a binary value is referred to as a halftone process.

このようなハーフトーン処理をカラー画像の画像データに対して行った場合、印刷用紙上で同じ位置あるいは1つの位置の近傍に複数色のドットが形成され、ある領域ではドットが密になり、別のある領域では逆に疎になるなど、ドット密度の偏りが発生する課題があった。例えば、シアン(C)、マゼンタ(M)、イエロー(Y)各色のドットを形成して印刷を行うプリンタにおいて、ハーフトーン処理の対象となる各色の階調データが全て同じであったと仮定した場合、各色同様にハーフトーン処理を行うと、同じ画素の位置に全ての色のドットが形成されてしまうことになる。   When such halftone processing is performed on image data of a color image, dots of a plurality of colors are formed at the same position or in the vicinity of one position on the printing paper. On the other hand, there is a problem that the density of dots is uneven, such as sparse in some areas. For example, in a printer that performs printing by forming dots of cyan (C), magenta (M), and yellow (Y) colors, assuming that the gradation data of each color to be subjected to halftone processing are all the same. If halftone processing is performed in the same manner as each color, dots of all colors are formed at the same pixel position.

このような課題を回避するため、一方の色相のドットが形成された画素位置には多方の色相のドットが形成されないようにする技術が開示されている(例えば特許文献1、特許文献2)。   In order to avoid such a problem, a technique has been disclosed in which dots of various hues are not formed at pixel positions where dots of one hue are formed (for example, Patent Document 1 and Patent Document 2).

特許文献1に開示された技術によれば、例えば一方の色相データとなるマゼンタの階調データを、組織的ディザ法によりハーフトーン処理を行い、ドットを形成する場合の結果値とドットを形成しない場合の結果値に2値化する。そして、この2値化したデータとマゼンタの階調データとの差分値データを他方の色相データとなるシアンの階調データに加算する。その後、誤差拡散の手法を用いてシアンの階調データをハーフトーン処理すると、マゼンタのドットが形成された周辺にはシアンのドットが形成されにくくなるのである。   According to the technique disclosed in Patent Document 1, for example, magenta gradation data serving as one hue data is subjected to halftone processing by a systematic dither method, and the result value and dots are not formed when dots are formed. It binarizes to the result value of the case. Then, the difference value data between the binarized data and the magenta gradation data is added to the cyan gradation data serving as the other hue data. After that, when cyan tone data is halftone processed using an error diffusion technique, it becomes difficult to form cyan dots around magenta dots.

また、特許文献2に開示された技術によれば、例えば一方の色相の階調データを、所定のマトリクスを用いた組織的ディザ法によりハーフトーン処理を行い、ドットを形成するか否かを判断する。そして、ドットを形成すると判断した画素に対応する位置を除いて、他方の色相の階調データを同じマトリクスを用いた組織的ディザ法によりハーフトーン処理することによって、異なる種類のドットが重ならず形成されるのである。   Further, according to the technique disclosed in Patent Document 2, for example, halftone processing is performed on gradation data of one hue by a systematic dither method using a predetermined matrix to determine whether or not to form dots. To do. Then, except for the position corresponding to the pixel determined to form a dot, halftone processing is performed on the other hue gradation data by a systematic dither method using the same matrix so that different types of dots do not overlap. It is formed.

特開平10−81026号公報JP-A-10-81026 特開平10−157167号公報JP-A-10-157167

しかしながら、特許文献1または特許文献2においては、ドットが形成された画素にのみドット重なりの抑制効果を与えているため、上述したドット密度の偏りが発生するという課題が残っていた。つまり、特許文献1では、他方の色相であるシアンの階調データの
ハーフトーン処理を、誤差拡散法を用いて行っているため、ドット重なりの抑制効果があたえられた一画素の誤差データは、誤差拡散マトリクスの係数を配置した方向の画素に拡散され、特定の画素にドットの重なりの抑制効果が強く発生する。この結果、ドットの重なりを防ぐ効果が偏り、ドット密度の偏りが発生する。
However, in Patent Document 1 or Patent Document 2, since the dot overlap suppression effect is given only to the pixels on which dots are formed, the problem that the above-described deviation in dot density occurs remains. In other words, in Patent Document 1, halftone processing of cyan tone data, which is the other hue, is performed using an error diffusion method, and therefore error data of one pixel that has an effect of suppressing dot overlap is It is diffused to the pixels in the direction in which the coefficients of the error diffusion matrix are arranged, and the effect of suppressing dot overlap is strongly generated in specific pixels. As a result, the effect of preventing dot overlap is biased, and the dot density is biased.

また、特許文献2においても、前述したように、一方の色相のドット形成が行われた画素のみにドット抑制効果がとどまるため、他方の色相のドットが隣接する画素に形成されることがあり、この場合ドットが分散せず、特許文献1と同様にドット密度の偏りが発生する。   Also, in Patent Document 2, as described above, since the dot suppression effect remains only in the pixels in which the dot formation of one hue is performed, the dots of the other hue may be formed in adjacent pixels, In this case, the dots are not dispersed, and a deviation in dot density occurs as in Patent Document 1.

本発明の第1の目的は、このような課題を解決するため、形成されるドットの重なりを抑制するとともに、ドット密度の偏りを軽減する画像処理装置、画像処理方法、画像処理プログラム、またはそのプログラムを記録した記録媒体の提供することである。また、本発明の第2の目的は、元の画像データの階調値を失わず、忠実に2値化するハーフトーン処理方法を提供することである。   In order to solve such problems, a first object of the present invention is to provide an image processing apparatus, an image processing method, an image processing program, or an image processing apparatus that suppresses overlapping of formed dots and reduces the unevenness of dot density. It is to provide a recording medium on which a program is recorded. A second object of the present invention is to provide a halftone processing method that faithfully binarizes without losing the gradation value of the original image data.

上記目的を達成する本発明の第1の画像処理装置は、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理装置であって、前記色相データのうち第1の色相データを階調変換する第1の階調変換部と、前記色相データのうち第2の色相データを階調変換する第2の階調変換部と、前記第1の階調変換部が階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出部と、前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算部とを備え、前記第2の階調変換部は、前記加算データを前記第2の色相データとして前記所定の階調データに階調変換することを特徴とする。   The first image processing apparatus of the present invention that achieves the above object provides a predetermined gradation for outputting dots of at least two or more types of hue data having different properties represented by multi-gradation values for each pixel. An image processing apparatus that performs gradation conversion into data, wherein a first gradation conversion unit that performs gradation conversion of first hue data among the hue data, and second hue data among the hue data includes gradation A second gradation conversion unit for conversion; a difference data calculation unit for calculating difference data between the predetermined gradation data converted by the first gradation conversion unit and the first hue data; A data addition unit that performs data processing on the calculated difference data using a predetermined filter and then adds the second difference data to the second hue data to obtain addition data; and the second gradation conversion The unit is configured to use the addition data as the second hue data. Characterized by gradation conversion to the predetermined grayscale data.

かかる第1の画像処理装置によれば、画素ごとに第1の色相データを、第1の階調変換部によってドットを出力する所定の階調データとドットを出力しない所定の階調データとに2値化する。そして2値化した階調データと2値化前の第1の色相データとの差分データを算出する。この差分データは、基本的に全ての画素についての差分データの総和をほぼゼロに保ちつつ、ドットが出力される画素については階調値を減らし、ドットが出力されない画素については階調値を増やすデータ値を有することになる。その後、この差分データを所定のフィルタによって、ドットが出力される画素を中心に階調値を減らす対象の画素を等方的に広げたデータにデータ処理を行ったのち、第2の色相データに加算する。この結果、第2の色相データは、第1の色相データについてドットが出力された画素の位置に対応する所定の画素の階調値が減少し、この減少した階調値分他の画素の階調値が増加した階調値データとなる。そこで、この階調値が増減された第2の色相データを階調変換すれば、第1の色相データに対応するドットと、第2の色相データに対応するドットとが重ならずかつ分散性もよいドットの出力位置を得ることができる。   According to such a first image processing apparatus, the first hue data for each pixel is converted into predetermined gradation data for outputting dots by the first gradation conversion unit and predetermined gradation data for not outputting dots. Binarize. Then, difference data between the binarized gradation data and the first hue data before binarization is calculated. This difference data basically keeps the sum of difference data for all pixels at almost zero, while reducing the gradation value for pixels where dots are output, and increasing the gradation value for pixels where dots are not output. Will have a data value. After that, the difference data is subjected to data processing by using a predetermined filter to data that isotropically expands the target pixel whose gradation value is to be reduced, centering on the pixel where the dot is output, and then converted into the second hue data. to add. As a result, in the second hue data, the gradation value of a predetermined pixel corresponding to the position of the pixel from which the dot is output for the first hue data is reduced, and the gradation level of the other pixels is reduced by this reduced gradation value. The tone value data has an increased tone value. Therefore, if the second hue data whose gradation value has been increased or decreased is subjected to gradation conversion, the dots corresponding to the first hue data and the dots corresponding to the second hue data do not overlap and dispersibility. A good dot output position can be obtained.

また、前記データ加算部は、前記第1の色相データに応じて出力されるドットと前記第2の色相データに応じて出力されるドットとの明度比によって特定されるフィルタ特性を有した前記所定のフィルタを用いることとしてもよい。   Further, the data adding unit has the predetermined filter characteristic having a filter characteristic specified by a lightness ratio between dots output according to the first hue data and dots output according to the second hue data. These filters may be used.

通常、第1の色相データに対応して出力されるドットと第2の色相データに対応して出力されるドットとは明度が異なる。例えば、インクジェットプリンタであれば使用するインクの性質の違いにより、またレーザプリンタであれば使用するトナーの性質の違いにより、実際に印刷用紙上に形成されるドットは明度が異なる。そこで、ドットの明度の比率によって特定されるフィルタ特性を有するフィルタを用いることによって、第2の色相データについて階調値を減らす対象の画素範囲を設定する。この結果、例えば印刷用紙上などの単位面積あたりの明度がほぼ一定に保たれた各色相データに対応するドットを形成することができる。   Usually, the brightness of the dots output corresponding to the first hue data is different from that of the dots output corresponding to the second hue data. For example, the brightness of the dots actually formed on the printing paper differs depending on the difference in the properties of the ink used in the case of an ink jet printer and the difference in the properties of the toner used in the case of a laser printer. Therefore, by using a filter having a filter characteristic specified by the lightness ratio of the dots, a pixel range to which the gradation value is reduced is set for the second hue data. As a result, for example, it is possible to form dots corresponding to each hue data in which the brightness per unit area such as on a printing paper is kept substantially constant.

ここで、前記第2の階調変換部は、誤差拡散の手法を用いて前記第2の色相データを階調変換することとしてもよい。こうすれば、階調値が増減された第2の色相データについて、2値化に伴う階調値の誤差が特定方向に拡散されるものの、基本的に増減された階調値に基づいて2値化処理を行うため、第1の色相データに対応して形成されたドット(以降、単に「第1ドット」)とは重ならない第2の色相データに対応するドット(以降、単に「第2ドット」)を出力することができる。   Here, the second gradation conversion unit may perform gradation conversion on the second hue data using an error diffusion technique. In this way, for the second hue data whose gradation value has been increased or decreased, an error of the gradation value accompanying binarization is diffused in a specific direction, but basically 2 based on the increased or decreased gradation value. In order to perform the value processing, dots corresponding to the second hue data (hereinafter simply referred to as “second”) that do not overlap with the dots formed corresponding to the first hue data (hereinafter simply referred to as “first dot”). Dot ") can be output.

あるいは、前記第2の階調変換部は、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を選択して画素群を順次生成する画素群生成部と、順次生成される前記画素群内の所定の画素に対して、前記所定の階調データを付与するデータ付与部とを備えることとしてもよい。   Alternatively, the second gradation conversion unit generates a pixel group that sequentially generates pixel groups by selecting pixels until the sum of gradation values of the second hue data for each pixel becomes a predetermined threshold value or more. And a data adding unit that applies the predetermined gradation data to predetermined pixels in the pixel group that are sequentially generated.

このような第2の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、階調変換未処理画素を順次選択して画素群(以下、「セル」と呼ぶ)を生成する。そして、生成されるセル内の画素の階調値合計が、所定の閾値以上となったとき、ドットを出力するための所定の階調データをセル内の所定の位置にある画素に付与する。従って、例えば生成されるセルのおおよそ中心となる所定の位置にドットを出力すれば、第1ドットと重ならず、且つドット間距離を保った分散性のよい第2ドットを形成することができる。   According to such a second gradation conversion unit, for pixels having gradation values to be subjected to gradation conversion processing, gradation conversion unprocessed pixels are sequentially selected to form a pixel group (hereinafter referred to as “cell”). Call). Then, when the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold, predetermined gradation data for outputting a dot is given to the pixel at a predetermined position in the cell. Therefore, for example, if a dot is output at a predetermined position that is approximately the center of the generated cell, it is possible to form a second dot with good dispersibility that does not overlap with the first dot and maintains the distance between dots. .

あるいは、前記第2の階調変換部は、画素選択のための第1の基準点に基づいて、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、前記生成された画素群について第2の基準点を決定する基準点決定部と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、前記画素群生成部は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与部は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することとしてもよい。   Alternatively, the second gradation conversion unit may determine, based on the first reference point for pixel selection, until the sum total of gradation values of the second hue data for each pixel is equal to or greater than a predetermined threshold value. A pixel group generation unit that sequentially selects pixels to generate a pixel group, a reference point determination unit that determines a second reference point for the generated pixel group, and the determined second reference point A data adding unit that applies the predetermined gradation data to a pixel, and the pixel group generation unit updates the first reference point and selects the pixel based on the first reference point. The pixel group is generated, and when the sum of gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold, the data adding unit positions the second reference point. The predetermined gradation data may be given to the pixel to be processed.

かかる第2の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、第1の基準点に基づいて階調変換未処理画素を順次選択してセルを生成する。そして、生成されるセル内の画素の階調値合計が所定の閾値以上となったとき、ドットを出力するための所定の階調データをセル内の第2の基準点に位置する画素に付与する。こうすれば、生成するセルの形状を決める基準点と、出力するドットの位置を決める基準点とを分けて設定できるため、セルの形状のみに着目してセルの生成を行うことが可能となる。従って、例えば円形のセルを生成するように第1の基準点を設定することによって、隣接して出力されるドットが重なる確率が減少し、分散性のよいドットを形成することができる。   According to the second gradation conversion unit, for pixels having gradation values to be subjected to gradation conversion processing, a cell is generated by sequentially selecting gradation conversion unprocessed pixels based on the first reference point. To do. When the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold value, predetermined gradation data for outputting a dot is given to the pixel located at the second reference point in the cell. To do. In this way, since the reference point for determining the shape of the cell to be generated and the reference point for determining the position of the dot to be output can be set separately, it becomes possible to generate the cell by paying attention only to the shape of the cell. . Therefore, for example, by setting the first reference point so as to generate a circular cell, the probability that dots that are output adjacently overlap with each other can be reduced, and dots with good dispersibility can be formed.

ここで、前記画素群生成部は、前記画素群における画素ごとの前記第2の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すこととしてもよい。   Here, when the sum total of the gradation values of the second hue data for each pixel in the pixel group exceeds the predetermined threshold, the pixel group generation unit sets the gradation value for the excess to the pixel. It is good also as returning to the pixel selected last by the group production | generation part.

こうすれば、所定の閾値を超えたセルに最後に組み入れられた画素に、所定の閾値を超えた分の階調値を戻しているため、ハーフトーン処理前の色相データの階調値が失われず、また2値化に伴う階調値の誤差が特定方向に拡散されることもない。この結果、前述した課題であるドットの重なりを抑制する効果の偏りを軽減することができる。   In this way, the gradation value of the hue data before the halftone process is lost because the gradation value exceeding the predetermined threshold value is returned to the last pixel incorporated in the cell exceeding the predetermined threshold value. In addition, the gradation value error associated with the binarization is not diffused in a specific direction. As a result, it is possible to reduce the bias of the effect of suppressing the overlapping of dots, which is the problem described above.

さらに、前記画素群生成部は、前記第1の基準点に基づいて選択すべき画素が複数存在するとき、選択する画素をランダムに選択することとしてもよい。こうすれば、生成するセルの形状がランダムになり易く、その結果出力されるドットの位置がバラツクことになり、形成されるドットの分散性が良くなることが期待できる。   Furthermore, the pixel group generation unit may randomly select a pixel to be selected when there are a plurality of pixels to be selected based on the first reference point. In this way, the shape of the cell to be generated is likely to be random, and as a result, the positions of the dots to be output will vary, and it can be expected that the dispersibility of the formed dots will be improved.

また、前記基準点決定部は、前記画素群における画素の位置と画素の階調値とから算出した重心位置を、前記第2の基準点として決定することとしてもよい。こうすれば、生成されるセルについて、2値化前の色相データにおける階調値の分布に対して、ほぼ忠実な位置にドットが出力されることになる。従って、階調値の忠実な再現性と分散性を持ったドットを形成することが可能となる。   The reference point determination unit may determine a center of gravity position calculated from the pixel position and the gradation value of the pixel in the pixel group as the second reference point. In this way, dots are output at positions that are almost faithful to the distribution of gradation values in the hue data before binarization for the generated cells. Therefore, it is possible to form dots having faithful reproducibility and dispersion of gradation values.

また、前記第1の基準点は、前記画素群における画素の位置と、該画素が有する前記第2の色相データの階調値とから算出した重心位置であることとしてもよい。こうすれば、セルの生成処理に際して、例えば、常にセルの重心に最も近い画素を選択してセルに組み入れていくようにすると、生成されるセルの形状はセルの重心を中心としたおおよそ円形状になる。従って、このような円形状のセルに応じて形成されるドットは重ならず、ドットの分散性を良くすることができる。   The first reference point may be a barycentric position calculated from a pixel position in the pixel group and a gradation value of the second hue data included in the pixel. In this way, in the cell generation process, for example, if the pixel closest to the center of gravity of the cell is always selected and incorporated into the cell, the shape of the generated cell is approximately circular around the center of gravity of the cell. become. Therefore, dots formed according to such circular cells do not overlap, and the dot dispersibility can be improved.

さらにここで、本発明の第1の画像処理装置において、前記第1の階調変換部は、画素選択のための第3の基準点に基づいて、画素ごとの前記第1の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、前記生成された画素群について第4の基準点を決定する基準点決定部と、前記決定された第4の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、前記画素群生成部は、前記第3の基準点を更新し、当該第3の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与部は前記生成された画素群における前記第1の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第4の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。   Further, in the first image processing apparatus of the present invention, the first gradation converting unit is configured to calculate the first hue data level for each pixel based on a third reference point for pixel selection. A pixel group generation unit that sequentially selects pixels to generate a pixel group until the sum of the tone values is equal to or greater than a predetermined threshold; a reference point determination unit that determines a fourth reference point for the generated pixel group; A data adding unit that applies the predetermined gradation data to a pixel located at the determined fourth reference point, and the pixel group generation unit updates the third reference point, The pixel group is generated by selecting the pixel based on a reference point of 3, and the data providing unit has a total sum of gradation values of the first hue data in the generated pixel group equal to or greater than the predetermined threshold value. The predetermined gradation is applied to the pixel where the fourth reference point is located. Characterized in that it granted over data.

このような第1の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、階調変換未処理画素を第3基準点に基づいて順次選択して、例えば円形のセルを生成する。そして、生成されるセル内の画素の階調値合計が、所定の閾値以上となったとき、ドットを出力するための所定の階調データを、セル内の第4基準点に位置する画素に付与する。従って、生成される円形のセルのおおよそ中心となる所定の位置にドットを出力するようにすれば、ドット間距離を保った分散性のよい第1ドットを形成することができる。この結果、第1ドットおよび第2ドットともに、分散性のよいドットが形成される確率が高くなる。   According to such a first gradation conversion unit, for pixels having gradation values to be subjected to gradation conversion processing, gradation conversion unprocessed pixels are sequentially selected based on the third reference point, for example, Generate a circular cell. Then, when the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold, predetermined gradation data for outputting dots is assigned to the pixel located at the fourth reference point in the cell. Give. Therefore, if dots are output at a predetermined position that is approximately the center of the generated circular cell, it is possible to form the first dots with good dispersibility while maintaining the distance between the dots. As a result, both the first dot and the second dot have a high probability of forming a highly dispersive dot.

さらに、前記第1の階調変換部における前記画素群生成部は、前記画素群における画素ごとの前記第1の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すこととしてもよい。   Further, the pixel group generation unit in the first gradation conversion unit may include an amount that exceeds when the sum of gradation values of the first hue data for each pixel in the pixel group exceeds the predetermined threshold. The gradation value may be returned to the pixel last selected by the pixel group generation unit.

こうすれば、所定の閾値を超えたセルに最後に組み入れられた画素に、所定の閾値を超えた分の階調値を戻しているため、第1の色相データの階調値が失われずハーフトーン処理される。従って、第1の色相データと2値化された所定の階調データとの差分データの総和はほぼゼロに保たれ、第2の色相データの階調値の総和は、この差分データの加算前後において変化しない。この結果、第2の色相データは元の階調値に充実にハーフトーン処理される。   In this way, since the gradation value that exceeds the predetermined threshold value is returned to the pixel that was last incorporated in the cell that exceeded the predetermined threshold value, the gradation value of the first hue data is not lost. Toned. Therefore, the sum of the difference data between the first hue data and the binarized predetermined gradation data is kept almost zero, and the sum of the gradation values of the second hue data is the same before and after the addition of the difference data. Does not change. As a result, the second hue data is fully halftoned to the original gradation value.

ここで、前記データ加算部が用いる前記所定のフィルタは、前記第1の階調変換部が生成する画素群内の画素数に基づいて特定されるフィルタ特性を有することとしてもよい。   Here, the predetermined filter used by the data adding unit may have a filter characteristic specified based on the number of pixels in the pixel group generated by the first gradation converting unit.

上述した第1の階調変換部によれば、生成されるセル内の画素数は、各画素の階調値が小さい場合は多くなり、各画素の階調値が大きい場合は少なくなる。つまり、セルを構成する画素数が多い場合は形成されるドット間距離が大きく、セルを構成する画素数が少ない場合は形成されるドット間距離が小さくなる。そこで、このようなセルを構成する画素数によって特定されるフィルタ特性を持つフィルタを用いることによって、第2の色相データについて階調値を減らす対象の画素範囲を設定する。この結果、第1ドットの形成密度に合わせて、第2ドットの形成を抑制する範囲を設定することができる。   According to the first gradation conversion unit described above, the number of pixels in the generated cell increases when the gradation value of each pixel is small, and decreases when the gradation value of each pixel is large. That is, the distance between dots formed is large when the number of pixels constituting the cell is large, and the distance between dots formed is small when the number of pixels constituting the cell is small. Therefore, by using a filter having a filter characteristic specified by the number of pixels constituting such a cell, a target pixel range for reducing the gradation value is set for the second hue data. As a result, a range for suppressing the formation of the second dots can be set in accordance with the formation density of the first dots.

本発明の第1の画像処理方法は、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理方法であって、前記色相データのうち第1の色相データを階調変換する第1の階調変換工程と、前記色相データのうち第2の色相データを階調変換する第2の階調変換工程と、前記第1の階調変換工程によって階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出工程と、前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算工程とを備え、前記第2の階調変換工程は、画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成工程と、前記生成された画素群について第2の基準点を決定する基準点決定工程と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与工程とをさらに備え、前記画素群生成工程は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与工程は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。   According to the first image processing method of the present invention, at least two types of hue data having different properties represented by multi-gradation values are converted into predetermined gradation data for outputting dots for each pixel. A first gradation conversion step for gradation-converting the first hue data of the hue data, and a second gradation conversion of the second hue data of the hue data. A gradation conversion step, a difference data calculation step of calculating difference data between the predetermined gradation data subjected to gradation conversion by the first gradation conversion step and the first hue data, and the calculated A data addition step of adding difference data to the second hue data after performing data processing using a predetermined filter and obtaining addition data, wherein the second gradation conversion step includes pixel selection. Based on the first reference point for A pixel group generating step of generating pixels by sequentially selecting pixels until the sum of gradation values of the addition data for each pixel becomes equal to or greater than a predetermined threshold, and a second reference for the generated pixel group A reference point determining step for determining a point; and a data adding step for applying the predetermined gradation data to a pixel located at the determined second reference point, wherein the pixel group generating step includes: Updating one reference point and selecting the pixel based on the first reference point to generate the pixel group, and the data adding step includes a step of calculating the second hue data in the generated pixel group. When the total sum of tone values is equal to or greater than the predetermined threshold value, the predetermined gradation data is given to a pixel where the second reference point is located.

また、本発明の第1の画像処理方法はコンピュータプログラムまたはそのプログラムを記録した記録媒体としてもよい。すなわち、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理プログラムであって、前記色相データのうち第1の色相データを階調変換する第1の階調変換処理と、前記色相データのうち第2の色相データを階調変換する第2の階調変換処理と、前記第1の階調変換処理によって階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出処理と、前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算処理とをコンピュータに実行させ、前記第2の階調変換処理は、画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成処理と、前記生成された画素群について第2の基準点を決定する基準点決定処理と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与処理とをさらに含み、前記画素群生成処理は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与処理は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。また、このプログラムを記録した記録媒体としては、フレキシブルディスクやCD−ROM、ICカード、パンチカードなど、コンピュータが読み取り可能な種々の媒体を利用することができる。   The first image processing method of the present invention may be a computer program or a recording medium on which the program is recorded. That is, an image processing program for gradation-converting at least two types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel, Of the hue data, a first gradation conversion process for gradation conversion of the first hue data, a second gradation conversion process for gradation conversion of the second hue data of the hue data, and the first A difference data calculation process for calculating difference data between the predetermined gradation data subjected to gradation conversion by the gradation conversion process and the first hue data, and the calculated difference data using a predetermined filter. After the data processing is performed, the computer is caused to execute a data addition process for adding the second hue data to obtain the added data, and the second gradation conversion process is performed by the first gradation selection process. Based on reference point In addition, a pixel group generation process for generating pixels by sequentially selecting pixels until the sum of gradation values of the addition data for each pixel is equal to or greater than a predetermined threshold, A reference point determining process for determining a reference point; and a data adding process for adding the predetermined gradation data to a pixel located at the determined second reference point, wherein the pixel group generating process includes: The first reference point is updated, the pixel is selected based on the first reference point, and the pixel group is generated. The data providing process is performed on the second hue data in the generated pixel group. When the total sum of gradation values is equal to or greater than the predetermined threshold, the predetermined gradation data is given to the pixel where the second reference point is located. 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.

次に、上記目的を達成する本発明の第2の画像処理装置は、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理装置であって、前記色相データのうち第1の色相データを階調変換する第1の階調変換部と、前記色相データのうち第2の色相データを階調変換する第2の階調変換部と、前記第1の階調変換部が階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換部と、変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出部と、前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算部とを備え、前記第2の階調変換部は、前記加算データを前記第2の色相データとして前記所定の階調データに階調変換することを特徴とする。   Next, the second image processing apparatus of the present invention that achieves the above object provides at least two types of hue data having different properties represented by multi-tone values for each pixel, for outputting dots. An image processing apparatus that performs gradation conversion into gradation data of the first hue conversion section, wherein a first gradation conversion section that performs gradation conversion of the first hue data of the hue data and second hue data of the hue data A second gradation conversion unit that performs gradation conversion on the pixel, and the predetermined gradation data that has been converted by the first gradation conversion unit using a pixel to which dots are output according to a predetermined profile as a reference point A dot profile conversion unit for converting into distributed data dispersed in surrounding pixels, a difference data calculation unit for calculating difference data between the converted distributed data and the first hue data, and the calculated difference data , The second hue And a data addition unit for obtaining addition data by adding to the data, wherein the second gradation conversion unit converts the addition data into the predetermined gradation data as the second hue data. It is characterized by.

かかる第2の画像処理装置によれば、画素ごとに第1の色相データを、第1の階調変換部によってドットを出力する所定の階調データとドットを出力しない所定の階調データとに2値化する。そして2値化した階調データのうちドットを出力する所定の階調データを、ドットが出力される画素を中心に所定のプロファイルに従って周辺画素に分散する。そして、分散後の所定の階調データと第1の色相データとの差分データを算出し、算出した差分データを第2の色相データに加算する。この差分データは、基本的に全ての画素についての差分データの総和をほぼゼロに保ちつつ、ドットが出力される画素の周辺画素については階調値を減らし、その他の画素については階調値を増やすデータ値を有することになる。その後、この差分データを第2の色相データに加算する。この結果、第2の色相データは、第1の色相データについてドットが出力された画素の位置に対応する所定の画素の階調値が減少し、この減少した階調値分他の画素の階調値が増加した階調値データとなる。そこで、この階調値が増減された第2の色相データを階調変換すれば、第1の色相データに対応するドットと、第2の色相データに対応するドットとが重ならずかつ分散性もよいドットの出力位置を得ることができる。   According to the second image processing apparatus, the first hue data for each pixel is converted into predetermined gradation data for outputting dots by the first gradation conversion unit and predetermined gradation data for not outputting dots. Binarize. Then, predetermined gradation data for outputting dots among the binarized gradation data is distributed to peripheral pixels according to a predetermined profile centering on the pixels to which the dots are output. Then, difference data between the predetermined gradation data after distribution and the first hue data is calculated, and the calculated difference data is added to the second hue data. This difference data basically keeps the sum of the difference data for all the pixels at almost zero, reduces the gradation value for the peripheral pixels of the pixel to which the dot is output, and sets the gradation values for the other pixels. You will have increasing data values. Thereafter, this difference data is added to the second hue data. As a result, in the second hue data, the gradation value of a predetermined pixel corresponding to the position of the pixel from which the dot is output for the first hue data is reduced, and the gradation level of the other pixels is reduced by this reduced gradation value. The tone value data has an increased tone value. Therefore, if the second hue data whose gradation value has been increased or decreased is subjected to gradation conversion, the dots corresponding to the first hue data and the dots corresponding to the second hue data do not overlap and dispersibility. A good dot output position can be obtained.

ここで、前記第2の画像処理装置における前記第2の階調変換部は、誤差拡散の手法を用いて前記第2の色相データを階調変換することとしてもよい。こうすれば、階調値が増減された第2の色相データについて、2値化に伴う階調値の誤差が特定方向に拡散されるものの、基本的に増減された階調値に基づいて2値化処理を行うため、第1ドットとは重ならない第2ドットを出力することができる。   Here, the second gradation conversion unit in the second image processing apparatus may perform gradation conversion on the second hue data using an error diffusion technique. In this way, for the second hue data whose gradation value has been increased or decreased, an error of the gradation value accompanying binarization is diffused in a specific direction, but basically 2 based on the increased or decreased gradation value. Since the digitization process is performed, the second dot that does not overlap the first dot can be output.

あるいは、前記第2の画像処理装置における前記第2の階調変換部は、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を選択して画素群を順次生成する画素群生成部と、順次生成される前記画素群内の所定の画素に対して、前記所定の階調データを付与するデータ付与部とを備えることとしてもよい。   Alternatively, the second gradation conversion unit in the second image processing apparatus selects pixels until the sum of gradation values of the second hue data for each pixel becomes a predetermined threshold value or more. It is good also as providing the pixel group production | generation part which produces | generates a group sequentially, and the data provision part which provides the said predetermined gradation data with respect to the predetermined pixel in the said pixel group produced | generated sequentially.

このような第2の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、階調変換未処理画素を順次選択してセルを生成する。そして、生成されるセル内の画素の階調値合計が、所定の閾値以上となったとき、ドットを出力するための所定の階調データをセル内の所定の位置にある画素に付与する。従って、例えば生成されるセルのおおよそ中心となる所定の位置にドットを出力すれば、第1ドットと重ならず、且つドット間距離を保った分散性のよい第2ドットを形成することができる。   According to such a second gradation conversion unit, a cell is generated by sequentially selecting gradation conversion unprocessed pixels for pixels having gradation values to be subjected to gradation conversion processing. Then, when the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold, predetermined gradation data for outputting a dot is given to the pixel at a predetermined position in the cell. Therefore, for example, if a dot is output at a predetermined position that is approximately the center of the generated cell, it is possible to form a second dot with good dispersibility that does not overlap with the first dot and maintains the distance between dots. .

あるいは、前記第2の画像処理装置における前記第2の階調変換部は、画素選択のための第1の基準点に基づいて、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、前記生成された画素群について第2の基準点を決定する基準点決定部と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、前記画素群生成部は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与部は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することとしてもよい。   Alternatively, the second gradation conversion unit in the second image processing apparatus may calculate a sum of gradation values of the second hue data for each pixel based on a first reference point for pixel selection. A pixel group generation unit that generates pixels by sequentially selecting pixels until a predetermined threshold value is exceeded, a reference point determination unit that determines a second reference point for the generated pixel group, and the determined A data adding unit that applies the predetermined gradation data to a pixel located at a second reference point, and the pixel group generation unit updates the first reference point to the first reference point. The pixel is selected on the basis of the pixel group to generate the pixel group, and when the sum of gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold, The predetermined gradation data is attached to the pixel where the second reference point is located. It is also possible to be.

かかる第2の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、第1の基準点に基づいて階調変換未処理画素を順次選択してセルを生成する。そして、生成されるセル内の画素の階調値合計が所定の閾値以上となったとき、ドットを出力するための所定の階調データをセル内の第2の基準点に位置する画素に付与する。こうすれば、生成するセルの形状を決める基準点と、出力するドットの位置を決める基準点とを分けて設定できるため、セルの形状のみに着目してセルの生成を行うことが可能となる。従って、例えば円形のセルを生成するように第1の基準点を設定することによって、隣接するドットが重なる確率が減少し、分散性のよいドットを形成することができる。   According to the second gradation conversion unit, for pixels having gradation values to be subjected to gradation conversion processing, a cell is generated by sequentially selecting gradation conversion unprocessed pixels based on the first reference point. To do. When the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold value, predetermined gradation data for outputting a dot is given to the pixel located at the second reference point in the cell. To do. In this way, since the reference point for determining the shape of the cell to be generated and the reference point for determining the position of the dot to be output can be set separately, it becomes possible to generate the cell by paying attention only to the shape of the cell. . Therefore, for example, by setting the first reference point so as to generate a circular cell, the probability that adjacent dots overlap can be reduced, and dots with good dispersibility can be formed.

ここで、前記第2の画像処理装置における前記画素群生成部は、前記画素群における画素ごとの前記第2の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すこととしてもよい。   Here, the pixel group generation unit in the second image processing apparatus is configured so that when the total sum of gradation values of the second hue data for each pixel in the pixel group exceeds the predetermined threshold, The gradation value may be returned to the pixel last selected by the pixel group generation unit.

こうすれば、所定の閾値を超えたセルに最後に組み入れられた画素に、所定の閾値を超えた分の階調値を戻しているため、ハーフトーン処理前の色相データの階調値が失われず、また2値化に伴う階調値の誤差が特定方向に拡散されることもない。この結果、前述した課題であるドットの重なりを抑制する効果の偏りを軽減することができる。   In this way, the gradation value of the hue data before the halftone process is lost because the gradation value exceeding the predetermined threshold value is returned to the last pixel incorporated in the cell exceeding the predetermined threshold value. In addition, the gradation value error associated with the binarization is not diffused in a specific direction. As a result, it is possible to reduce the bias of the effect of suppressing the overlapping of dots, which is the problem described above.

さらに、前記第2の画像処理装置における前記画素群生成部は、前記第1の基準点に基づいて選択すべき画素が複数存在するとき、選択する画素をランダムに選択することとしてもよい。こうすれば、生成するセルの形状がランダムになり易く、出力されるドットの位置がバラツクことになり、ドットの分散性が良くなることが期待できる。   Furthermore, the pixel group generation unit in the second image processing device may randomly select a pixel to be selected when there are a plurality of pixels to be selected based on the first reference point. In this way, the shape of the cell to be generated is likely to be random, the positions of the dots to be output will vary, and it can be expected that the dot dispersibility will be improved.

また、前記第2の画像処理装置における前記基準点決定部は、前記画素群における画素の位置と画素の階調値とから算出した重心位置を、前記第2の基準点として決定することとしてもよい。こうすれば、生成されるセルについて、2値化前の色相データにおける階調値の分布に対して、ほぼ忠実な位置にドットが出力されることになる。従って、階調値の忠実な再現性と分散性を持ったドットを形成することが可能となる。   The reference point determination unit in the second image processing apparatus may determine a center of gravity calculated from a pixel position and a pixel gradation value in the pixel group as the second reference point. Good. In this way, dots are output at positions that are almost faithful to the distribution of gradation values in the hue data before binarization for the generated cells. Therefore, it is possible to form dots having faithful reproducibility and dispersion of gradation values.

また、前記第2の画像処理装置における前記第1の基準点は、前記画素群における画素の位置と、該画素が有する前記第2の色相データの階調値とから算出した重心位置であることとしてもよい。こうすれば、セルの生成処理に際して、例えば、常にセルの重心に最も近い画素を選択してセルに組み入れていくようにすると、生成されるセルの形状はセルの重心を中心としたおおよそ円形状になる。従って、このような円形状のセルに応じて形成されるドットは重ならず、ドットの分散性を良くすることができる。   The first reference point in the second image processing apparatus is a barycentric position calculated from the pixel position in the pixel group and the gradation value of the second hue data that the pixel has. It is good. In this way, in the cell generation process, for example, if the pixel closest to the center of gravity of the cell is always selected and incorporated into the cell, the shape of the generated cell is approximately circular around the center of gravity of the cell. become. Therefore, dots formed according to such circular cells do not overlap, and the dot dispersibility can be improved.

さらにここで、本発明の第2の画像処理装置において、前記第1の階調変換部は、画素選択のための第3の基準点に基づいて、画素ごとの前記第1の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、前記生成された画素群について第4の基準点を決定する基準点決定部と、前記決定された第4の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、前記画素群生成部は、前記第3の基準点を更新し、当該第3の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与部は前記生成された画素群における前記第1の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第4の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。   Further, in the second image processing apparatus of the present invention, the first gradation conversion unit is configured to calculate the first hue data level for each pixel based on a third reference point for pixel selection. A pixel group generation unit that sequentially selects pixels to generate a pixel group until the sum of the tone values is equal to or greater than a predetermined threshold; a reference point determination unit that determines a fourth reference point for the generated pixel group; A data adding unit that applies the predetermined gradation data to a pixel located at the determined fourth reference point, and the pixel group generation unit updates the third reference point, The pixel group is generated by selecting the pixel based on a reference point of 3, and the data providing unit has a total sum of gradation values of the first hue data in the generated pixel group equal to or greater than the predetermined threshold value. The predetermined gradation is applied to the pixel where the fourth reference point is located. Characterized in that it granted over data.

かかる第2の画像処理装置における第1の階調変換部によれば、階調変換処理の対象となる階調値を有する画素について、階調変換未処理画素を第3基準点に基づいて順次選択して、例えば円形のセルを生成する。そして、生成されるセル内の画素の階調値合計が、所定の閾値以上となったとき、ドットを出力するための所定の階調データを、セル内の第4基準点に位置する画素に付与する。従って、生成される円形のセルのおおよそ中心となる所定の位置にドットを出力するようにすれば、ドット間距離を保った分散性のよい第1ドットを形成することができる。この結果、第1ドットおよび第2ドットともに、分散性のよいドットを形成することが可能となる。   According to the first gradation conversion unit in the second image processing apparatus, for pixels having gradation values to be subjected to gradation conversion processing, the gradation conversion unprocessed pixels are sequentially set based on the third reference point. For example, a circular cell is generated. Then, when the total gradation value of the pixels in the generated cell is equal to or greater than a predetermined threshold, predetermined gradation data for outputting dots is assigned to the pixel located at the fourth reference point in the cell. Give. Therefore, if dots are output at a predetermined position that is approximately the center of the generated circular cell, it is possible to form the first dots with good dispersibility while maintaining the distance between the dots. As a result, it is possible to form dots with good dispersibility for both the first dots and the second dots.

さらに、前記第2の画像処理装置における前記画素群生成部は、前記画素群における画素ごとの前記第1の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すこととしてもよい。   Further, the pixel group generation unit in the second image processing apparatus, when a sum of gradation values of the first hue data for each pixel in the pixel group exceeds the predetermined threshold, The gradation value may be returned to the pixel last selected by the pixel group generation unit.

こうすれば、所定の閾値を超えたセルに最後に組み入れられた画素に、所定の閾値を超えた分の階調値を戻しているため、第1の色相データの階調値が失われずハーフトーン処理される。従って、第1の色相データと2値化された所定の階調データとの差分データの総和はほぼゼロに保たれ、第2の色相データの階調値の総和は、この差分データの加算前後において変化しない。この結果、第2の色相データは元の階調値に充実にハーフトーン処理される。   In this way, since the gradation value that exceeds the predetermined threshold value is returned to the pixel that was last incorporated in the cell that exceeded the predetermined threshold value, the gradation value of the first hue data is not lost. Toned. Therefore, the sum of the difference data between the first hue data and the binarized predetermined gradation data is kept almost zero, and the sum of the gradation values of the second hue data is the same before and after the addition of the difference data. Does not change. As a result, the second hue data is fully halftoned to the original gradation value.

ここで、前記第2の画像処理装置における前記ドットプロファイル変換部は、前記第2の画像処理装置における前記第1の階調変換部が生成した画素群ごとに、該画素群内の画素数に基づいて特定される前記所定のプロファイルに従って、前記所定の階調データを分散することとしてもよい。   Here, the dot profile conversion unit in the second image processing apparatus sets the number of pixels in the pixel group for each pixel group generated by the first gradation conversion unit in the second image processing apparatus. The predetermined gradation data may be distributed according to the predetermined profile specified on the basis of the predetermined profile.

上述した第1の階調変換部によれば、生成されるセル内の画素数は、各画素の階調値が小さい場合は多くなり、各画素の階調値が大きい場合は少なくなる。つまり、セルを構成する画素数が多い場合は形成されるドット間距離が大きく、セルを構成する画素数が少ない場合は形成されるドット間距離が小さくなる。そこで、このようなセルを構成する画素数によって特定されるプロファイルに従って、第2の色相データについて階調値を減らす対象の画素範囲を設定する。この結果、第1ドットの形成密度に合わせて、第2ドットの形成を抑制する範囲を設定することができる。   According to the first gradation conversion unit described above, the number of pixels in the generated cell increases when the gradation value of each pixel is small, and decreases when the gradation value of each pixel is large. That is, the distance between dots formed is large when the number of pixels constituting the cell is large, and the distance between dots formed is small when the number of pixels constituting the cell is small. Therefore, a target pixel range for reducing the gradation value is set for the second hue data according to a profile specified by the number of pixels constituting such a cell. As a result, a range for suppressing the formation of the second dots can be set in accordance with the formation density of the first dots.

また、本発明の第2の画像処理方法は、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理方法であって、前記色相データのうち第1の色相データを階調変換する第1の階調変換工程と、前記色相データのうち第2の色相データを階調変換する第2の階調変換工程と、前記第1の階調変換工程によって階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換工程と、変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出工程と、前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算工程とを備え、前記第2の階調変換工程は、画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成工程と、前記生成された画素群について第2の基準点を決定する基準点決定工程と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与工程とをさらに備え、前記画素群生成工程は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与工程は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。   Also, the second image processing method of the present invention converts at least two or more types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel. An image processing method for tone conversion, comprising: a first tone conversion step for tone-converting first hue data in the hue data; and a second tone-converting tone for second hue data in the hue data. The predetermined gradation data subjected to gradation conversion in the second gradation conversion process and the first gradation conversion process is distributed to peripheral pixels having a pixel to which a dot is output as a reference point according to a predetermined profile. A dot profile conversion step for converting into distributed data, a difference data calculation step for calculating difference data between the converted distributed data and the first hue data, and the calculated difference data as the second hue De A data adding step for obtaining added data by adding to the data, wherein the second gradation converting step includes a gradation value of the added data for each pixel based on a first reference point for pixel selection. A pixel group generating step of sequentially selecting pixels to generate a pixel group until a total sum of a predetermined threshold or more is reached, a reference point determining step of determining a second reference point for the generated pixel group, A data providing step of assigning the predetermined gradation data to a pixel located at the determined second reference point, wherein the pixel group generation step updates the first reference point to update the first reference point. The pixel group is generated by selecting the pixel based on the reference point, and the data adding step is performed such that a sum total of gradation values of the second hue data in the generated pixel group is not less than the predetermined threshold value. The second reference point is located Characterized by applying the predetermined gradation data.

また、本発明の第2の画像処理方法はコンピュータプログラムまたはそのプログラムを記録した記録媒体としてもよい。すなわち、画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理プログラムであって、前記色相データのうち第1の色相データを階調変換する第1の階調変換処理と、前記色相データのうち第2の色相データを階調変換する第2の階調変換処理と、前記第1の階調変換処理によって階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換処理と、変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出処理と、前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算処理とをコンピュータに実行させ、前記第2の階調変換処理は、画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成処理と、前記生成された画素群について第2の基準点を決定する基準点決定処理と、前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与処理とをさらに含み、前記画素群生成処理は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、前記データ付与処理は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする。また、このプログラムを記録した記録媒体としては、フレキシブルディスクやCD−ROM、ICカード、パンチカードなど、コンピュータが読み取り可能な種々の媒体を利用することができる。   The second image processing method of the present invention may be a computer program or a recording medium on which the program is recorded. That is, an image processing program for gradation-converting at least two types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel, Of the hue data, a first gradation conversion process for gradation conversion of the first hue data, a second gradation conversion process for gradation conversion of the second hue data of the hue data, and the first Dot profile conversion processing for converting the predetermined gradation data subjected to gradation conversion by the gradation conversion processing of the above into distributed data dispersed in peripheral pixels having a pixel output as a reference point according to a predetermined profile; A difference data calculation process for calculating difference data between the converted dispersion data and the first hue data, and the calculated difference data is added to the second hue data to obtain an addition data. And the second gradation conversion process calculates the sum of gradation values of the addition data for each pixel based on the first reference point for pixel selection. A pixel group generation process for generating a pixel group by sequentially selecting pixels until a predetermined threshold value is exceeded, a reference point determination process for determining a second reference point for the generated pixel group, and the determined A data adding process for adding the predetermined gradation data to a pixel located at a second reference point, wherein the pixel group generation process updates the first reference point to the first reference point The pixel group is generated by selecting the pixel based on the image data, and the data adding process is performed when a sum of gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold value. , The pixel where the second reference point is located Characterized by applying the predetermined gradation data. 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.

さらに、本発明の第1または第2の画像処理装置、画像処理方法、画像処理プログラムもしくは記録媒体であって、前記性質の異なる少なくとも2種類以上の色相データは、それぞれ(1)ドットの大きさが異なる出力ドットに対応した色相データ、(2)単位面積当たりの濃度が異なる出力ドットに対応した色相データ、(3)色相が異なる出力ドットに対応した色相データ、(4)光反射率の異なる出力ドットに対応した色相データ、のうち少なくとも1つを満たす色相データであることとしてもよい。   Furthermore, in the first or second image processing apparatus, image processing method, image processing program, or recording medium of the present invention, at least two or more types of hue data having different properties are each (1) the size of a dot. Hue data corresponding to output dots having different hues, (2) hue data corresponding to output dots having different densities per unit area, (3) hue data corresponding to output dots having different hues, and (4) different light reflectances. It may be hue data satisfying at least one of the hue data corresponding to the output dots.

こうすれば、(1)網点方式による階調表示を行う場合のドットを出力するためのハーフトーン処理、(2)濃淡の異なるドットを用いた階調表示を行う場合のドットを出力するためのハーフトーン処理、(3)色の異なるドットを用いた階調表示を行う場合のドットを出力するためのハーフトーン処理、(4)表面の艶が異なるドットを用いた階調表示を行う場合のドットを出力するためのハーフトーン処理の少なくとも1つを満たすハーフトーン処理について、本発明を適用することができる。   In this way, (1) halftone processing for outputting dots when performing gradation display by the halftone dot method, and (2) outputting dots when performing gradation display using dots of different shades. Halftone processing, (3) halftone processing to output dots when performing gradation display using dots of different colors, and (4) gradation display using dots with different surface gloss The present invention can be applied to a halftone process that satisfies at least one of the halftone processes for outputting the dots.

次に、本発明を実施するための最良の形態を説明する。図1は、本発明が適用される画像処理装置を含むシステム全体の一例を示す構成図である。全体として画像入力装置10と、画像処理装置20と、画像出力装置30とから構成される。これらの装置は基本的にコンピュータまたはコンピュータによって制御される装置であり、所定のオペレーティングシステムのもとで所定のプログラムが実行されることによって動作する。   Next, the best mode for carrying out the present invention will be described. FIG. 1 is a configuration diagram showing an example of an entire system including an image processing apparatus to which the present invention is applied. The image input device 10, the image processing device 20, and the image output device 30 are configured as a whole. These devices are basically computers or devices controlled by a computer, and operate by executing a predetermined program under a predetermined operating system.

画像入力装置10は、アプリケーション部11とラスタライズ部12とから構成される。アプリケーション部11は、文字データ、図形データ、ビットマップデータ等の印刷対象となるデータを生成する。例えば、画像入力装置10でワードプロセッサや図形ツールなどのアプリケーションプログラムを使用して、図示しないキーボード等の操作により文字データや図形データなどを生成する。そして生成したこれらのデータを、ラスタライズ部12へ出力する。もとより、画像入力装置10は、図示しないスキャナやデジタルスチルカメラなどの画像データを取得する機器から出力されるデータを受け付け、このデータをアプリケーション部11が生成するデータとしてラスタライズ部12へ出力するものとしても差し支えない。   The image input device 10 includes an application unit 11 and a rasterizing unit 12. The application unit 11 generates data to be printed such as character data, graphic data, and bitmap data. For example, the image input device 10 uses an application program such as a word processor or a graphic tool to generate character data, graphic data, and the like by operating a keyboard (not shown). The generated data is output to the rasterizing unit 12. Of course, the image input apparatus 10 receives data output from a device that acquires image data such as a scanner or a digital still camera (not shown), and outputs this data to the rasterization unit 12 as data generated by the application unit 11. There is no problem.

ラスタライズ部12は、アプリケーション部11から出力された印刷対象のデータを画素ごとに複数種類の色相データに変換して出力する。本実施形態では、R(レッド)、G(グリーン)、B(ブルー)の色毎で、画素ごとに8ビット(計24ビット)の多階調値で表された色相データを出力する。したがって、出力される色相データは、画素ごとに0から255までの256種類の階調値を有することになる。ラスタライズ部12における色相データの生成処理は、実際には画像入力装置10に実装された図示しないドライバによって行われる。こうしてラスタライズ部12から出力される色相データは、画像処理装置20に出力される。   The rasterizing unit 12 converts the print target data output from the application unit 11 into a plurality of types of hue data for each pixel and outputs the data. In the present embodiment, hue data represented by multi-gradation values of 8 bits (24 bits in total) for each pixel is output for each color of R (red), G (green), and B (blue). Therefore, the output hue data has 256 kinds of gradation values from 0 to 255 for each pixel. The hue data generating process in the rasterizing unit 12 is actually performed by a driver (not shown) installed in the image input apparatus 10. The hue data output from the rasterizing unit 12 in this way is output to the image processing apparatus 20.

画像処理装置20は、基本的にコンピュータであり、色変換部21とハーフトーン処理部22とから構成される。画像処理装置20では、画像入力装置10から出力された色相データに対して、色変換処理とハーフトーン処理を行い、所定の階調データDRを画像出力装置30へ出力する処理が行われる。   The image processing apparatus 20 is basically a computer and includes a color conversion unit 21 and a halftone processing unit 22. In the image processing device 20, color conversion processing and halftone processing are performed on the hue data output from the image input device 10, and processing for outputting predetermined gradation data DR to the image output device 30 is performed.

色変換部21は、画像入力装置10から出力される256種類の階調値を有するRGB各8ビット(計24ビット)の色相データを受け取り、画像出力装置30が出力する色成分に合わせて色変換処理を行う。本実施形態では、RGBからCMYの色相データDTに色変換処理を行うものとする。ここで、Cはシアン、Mはマゼンダ、Yはイエローを示す。   The color conversion unit 21 receives hue data of 8 bits for each of RGB (total of 24 bits) having 256 types of gradation values output from the image input device 10, and performs color matching with the color components output by the image output device 30. Perform the conversion process. In the present embodiment, it is assumed that color conversion processing is performed on RGB to CMY hue data DT. Here, C represents cyan, M represents magenta, and Y represents yellow.

ハーフトーン処理部22は、色変換部21から出力されるCMYの色相データDTに対して、所定の閾値を用いて量子化データ(2値あるいは4値などの多値の値)に変換し、変換された量子化データである所定の階調データDRを画像出力装置30に出力する。ハーフトーン処理として、本実施形態では、誤差拡散法による処理、または複数の画素からなるセルを、画素群の重心を用いて構成し、そのセルの重心にドットを生成させる処理(Circular Cell法、以下CC法)を用いる。誤差拡散法及びCC法の具体的な内容は後述する。   The halftone processing unit 22 converts the CMY hue data DT output from the color conversion unit 21 into quantized data (multivalued values such as binary or quaternary values) using a predetermined threshold value, Predetermined gradation data DR that is the converted quantized data is output to the image output device 30. As the halftone processing, in the present embodiment, processing by an error diffusion method, or a cell composed of a plurality of pixels is configured using the center of gravity of a pixel group, and a dot is generated at the center of gravity of the cell (Circular Cell method, Hereinafter, the CC method) is used. Specific contents of the error diffusion method and the CC method will be described later.

画像出力装置30は、パルス幅変調部31と印刷エンジン35とから構成され、印刷エンジン35は、レーザドライバ36とレーザダイオード(LD)37とから構成される。画像出力装置30では、画像処理装置20から出力された所定の階調データDRに従って印刷エンジン35が駆動され、この印刷エンジン35によって印刷用紙等の記録媒体に各色成分のドットが形成され、実際に印刷が行われるのである。   The image output apparatus 30 includes a pulse width modulation unit 31 and a print engine 35. The print engine 35 includes a laser driver 36 and a laser diode (LD) 37. In the image output device 30, the print engine 35 is driven in accordance with the predetermined gradation data DR output from the image processing device 20, and dots of each color component are formed on a recording medium such as print paper by the print engine 35. Printing is performed.

パルス幅変調部31は、ハーフトーン処理部22から出力された所定の階調データDRを入力し、この所定の階調データDRから所定のパルス数とパルス幅をもったレーザ駆動パルスを駆動データとして生成する。そして、この駆動データをレーザドライバ36に出力する。   The pulse width modulation unit 31 receives the predetermined gradation data DR output from the halftone processing unit 22, and uses the predetermined gradation data DR as a drive data for a laser drive pulse having a predetermined number of pulses and a pulse width. Generate as Then, this drive data is output to the laser driver 36.

レーザドライバ36は、入力された駆動データから、レーザダオード37を駆動する制御データを生成し、レーザダイオード37に出力する。レーザダイオード37は、レーザドライバ36から出力された制御データに基づいて駆動され、さらに図示しない感光ドラムや転写ベルトが駆動されて、最終的に印刷用紙等の記録媒体に、パルス幅とパルス数に応じて、所定の色成分のドットが所定の数だけ出力される。こうして、記録媒体に各色のドットが形成され画像入力装置10からのデータが印刷されることになる。   The laser driver 36 generates control data for driving the laser diode 37 from the input drive data, and outputs the control data to the laser diode 37. The laser diode 37 is driven based on the control data output from the laser driver 36, and further, a photosensitive drum and a transfer belt (not shown) are driven, and finally a recording medium such as a printing paper has a pulse width and a pulse number. In response, a predetermined number of dots of a predetermined color component are output. Thus, each color dot is formed on the recording medium, and the data from the image input device 10 is printed.

次に、図2を参照して、本発明が適用される画像処理装置20の具体的なハード構成について説明する。ここで、図1の画像処理装置20を構成する色変換部21、ハーフトーン処理部22は、図2におけるCPU26、RAM27およびROM28に対応する。   Next, a specific hardware configuration of the image processing apparatus 20 to which the present invention is applied will be described with reference to FIG. Here, the color conversion unit 21 and the halftone processing unit 22 constituting the image processing apparatus 20 in FIG. 1 correspond to the CPU 26, the RAM 27, and the ROM 28 in FIG.

画像処理装置20は、全体として、入出力インターフェイス(I/F)25、CPU26、RAM27、ROM28、ハードディスク29とから構成され、それらはバスを介して互いに接続されている。入出力I/F25は、画像入力装置10と画像処理装置20とのインターフェイス及び画像処理装置と画像出力装置のインターフェイスの役割を果たす。入出力I/F25には、所定の伝送方式により伝送された画像入力装置10からのRGBの色相データが入力され、画像処理装置20で処理できるデータに変換される。RGBの色相データは、一旦RAM27に格納される。そして、入出力I/F25から、所定の階調データDRを画像出力装置30に所定の伝送方式を用いて送出する。   As a whole, the image processing apparatus 20 includes an input / output interface (I / F) 25, a CPU 26, a RAM 27, a ROM 28, and a hard disk 29, which are connected to each other via a bus. The input / output I / F 25 serves as an interface between the image input device 10 and the image processing device 20 and an interface between the image processing device and the image output device. The input / output I / F 25 receives the RGB hue data from the image input device 10 transmitted by a predetermined transmission method, and converts it into data that can be processed by the image processing device 20. The RGB hue data is temporarily stored in the RAM 27. Then, the predetermined gradation data DR is sent from the input / output I / F 25 to the image output apparatus 30 using a predetermined transmission method.

CPU26は、バスを介してハードディスク29またはROM28に格納されたプログラムを読み出し、この読み出したプログラムを所定のオペレーティングシステムのもとで実行することによって、画像処理装置20として機能し、所定の処理を実行する。特に、請求項に記載した第1の階調変換部、第2の階調変換部、ドットプロファイル変換部、差分データ算出部、データ加算部として機能し、後述する各実施例におけるハーフトーン処理を実行する。   The CPU 26 reads out a program stored in the hard disk 29 or the ROM 28 via the bus and executes the read program under a predetermined operating system, thereby functioning as the image processing device 20 and executing a predetermined process. To do. In particular, it functions as a first gradation conversion unit, a second gradation conversion unit, a dot profile conversion unit, a difference data calculation unit, and a data addition unit described in the claims, and performs halftone processing in each embodiment described later. Execute.

これらの処理を記録したプログラムは、予めハードディスク29やROM28に格納されていることとしてもよいし、例えばCD−ROMなどのコンピュータが読み取り可能な記録媒体によって外部から供給され、図示しないCD−R/RWドライブを介してハードディスク29に記憶することによって格納されるものとしてもよい。もとより、インターネットなどのネットワーク手段を介して、プログラムを供給するサーバー等にアクセスし、データをダウンロードすることによってハードディスク29に格納されるものとしてもよい。   The program in which these processes are recorded may be stored in advance in the hard disk 29 or the ROM 28, or may be supplied from the outside by a computer-readable recording medium such as a CD-ROM, and is not shown in the figure. It may be stored by being stored in the hard disk 29 via the RW drive. Of course, the program may be stored in the hard disk 29 by accessing a server or the like that supplies a program via network means such as the Internet and downloading data.

RAM27は、CPU26の制御によって実行される各処理のワーキングメモリとして役割を果たし、処理後の各種データを格納する。RAM27の具体的構成等については後述する。   The RAM 27 serves as a working memory for each process executed under the control of the CPU 26, and stores various data after the process. A specific configuration of the RAM 27 will be described later.

次に、以上のように構成された画像処理装置20において行われるハーフトーン処理について、後述する実施例で用いるハーフトーン処理の手法となるCC法と誤差拡散法を先に説明することとし、以降、以下の順序にて説明する。
(A)CC法によるハーフトーン処理
(B)誤差拡散法によるハーフトーン処理
(C)ハーフトーン処理についての第1実施例(フィルタによるデータ処理)
(C1)誤算拡散法を用いたハーフトーン処理
(C2)CC法を用いたハーフトーン処理
(D)ハーフトーン処理についての第2実施例(プロファイルによる分散処理)
(E)変形例
なお、本実施形態では、色変換部21が出力するCMYの色相データDTは、各色8ビットずつの多階調値で表されたデータとなっており、各色“0”から“255”まで256種類の階調値を有するものとする。また本実施形態では、ハーフトーン処理部22にて、各色成分のドットを出力するか否かを制御する量子化処理を行うものとして説明することとし、ハーフトーン処理部22が出力する所定の階調データDRは、C、M、Yそれぞれの色成分について、画素ごとに階調値“0”あるいは階調値“255”に量子化(2値化)された2値化データであるものとする。最終的に、画像出力装置30は、前述したように、出力された所定の階調データ、つまり階調値“255”に量子化された全ての画素に対応してパルス幅とパルス数を生成し、各色成分のドットの出力を制御して印刷を行うのである。
Next, regarding the halftone processing performed in the image processing apparatus 20 configured as described above, the CC method and the error diffusion method, which are halftone processing methods used in the embodiments described later, will be described first. This will be described in the following order.
(A) Halftone processing by CC method (B) Halftone processing by error diffusion method (C) First embodiment of halftone processing (data processing by filter)
(C1) Halftone processing using error calculation diffusion method (C2) Halftone processing using CC method (D) Second embodiment of halftone processing (dispersion processing by profile)
(E) Modification In this embodiment, the CMY hue data DT output from the color conversion unit 21 is data represented by multi-gradation values of 8 bits for each color, and each color “0” is used. It is assumed that there are 256 kinds of gradation values up to “255”. In the present embodiment, the halftone processing unit 22 is described as performing a quantization process for controlling whether or not to output each color component dot, and a predetermined floor output by the halftone processing unit 22 is described. The tone data DR is binary data that is quantized (binarized) to a gradation value “0” or a gradation value “255” for each pixel for each of the C, M, and Y color components. To do. Finally, as described above, the image output device 30 generates the pulse width and the number of pulses corresponding to all the pixels quantized to the output predetermined gradation data, that is, the gradation value “255”. Then, printing is performed by controlling the output of dots of each color component.

(A)CC法によるハーフトーン処理
まず、CC法によるハーフトーン処理について図3のフローチャートと図4および図5の模式図を用いて説明する。この処理が実施されると、まずステップS301にて、ハーフトーン処理つまり階調変換処理の対象となる入力画像を読み込む処理を行う。入力画像は正方形のドットマトリクス状の画素で構成されているものとし、ここでは一例として色成分シアンの色相データを入力画像として読み込むものとする。読み込んだ色相データの一例を図4(a)に示した。例えば、m行n列目の画素(以降(n,m)と表す)には、階調値“50”の色相データが与えられている。
(A) Halftone Processing by CC Method First, halftone processing by the CC method will be described with reference to the flowchart of FIG. 3 and the schematic diagrams of FIGS. When this processing is performed, first, in step S301, processing for reading an input image to be subjected to halftone processing, that is, gradation conversion processing is performed. The input image is assumed to be composed of square dot matrix pixels, and here, as an example, hue data of the color component cyan is read as an input image. An example of the read hue data is shown in FIG. For example, hue data having a gradation value of “50” is given to a pixel in the m-th row and the n-th column (hereinafter referred to as (n, m)).

次にステップS302で、階調変換が未処理である画素(以降、未処理画素)を探索する処理を行い、探索未処理画素が有るか否かを判定する処理を行う。未処理画素の探索は、常に、まず水平方向に探索走査を行い、次に垂直方向へ探索走査を行う。すなわち、未処理画素が存在する場合は、入力画像全体で最も上側にある画素のうち、最も左側にある画素を探索することになる。もとより、階調変換処理の開始時では、1行1列目の画素が探索される。   Next, in step S302, a process for searching for a pixel for which gradation conversion has not been processed (hereinafter, an unprocessed pixel) is performed, and a process for determining whether there is a search unprocessed pixel is performed. In search of unprocessed pixels, search scanning is always performed in the horizontal direction first, and then search scanning is performed in the vertical direction. That is, when there is an unprocessed pixel, the leftmost pixel is searched for among the uppermost pixels in the entire input image. Of course, at the start of the gradation conversion process, the pixel in the first row and first column is searched.

次に、判定の結果、未処理画素が有った場合(YES)、次のステップS304へ進む。一方、判定の結果、未処理画素が無い場合は(NO)、入力画像全体は階調変換されたものとして、2値化データを出力する処理を行い(ステップS303)、階調変換処理ルーチンを終了する。   Next, when there is an unprocessed pixel as a result of the determination (YES), the process proceeds to the next step S304. On the other hand, if there is no unprocessed pixel as a result of the determination (NO), it is assumed that the entire input image has been subjected to gradation conversion, and processing for outputting binarized data is performed (step S303), and the gradation conversion processing routine is executed. finish.

ステップS304では、セルの拡大終了条件が成立するか否かを判定する処理を行う。そして、判定の結果、NOの場合はセルを拡大する処理を行う(ステップS305)。本実施形態では、セル内の画素の階調値合計が閾値“255”未満であることがセルを拡大する条件となる。また、セルの重心から最も近い画素をセルに組み入れることによってセルの拡大を行う。一方、判定の結果、YESの場合はセルの拡大を終了し、ステップS306へ進む。   In step S304, it is determined whether or not a cell expansion end condition is satisfied. If the result of determination is NO, processing for enlarging the cell is performed (step S305). In the present embodiment, a condition for enlarging the cell is that the total gradation value of the pixels in the cell is less than the threshold “255”. Further, the cell is expanded by incorporating the pixel closest to the center of gravity of the cell into the cell. On the other hand, if the result of determination is YES, cell expansion is terminated, and the process proceeds to step S306.

ステップS304およびステップS305での処理について、図4を用いて具体的に説明する。いま、探索した未処理画素が図4(a)の網掛け部で示したm行n列目の画素(n,m)であり、他の画素も全て未処理画素であったとする。このとき、(n,m)1画素のセルCLが生成されたことになる。   The processing in step S304 and step S305 will be specifically described with reference to FIG. Now, assume that the searched unprocessed pixel is the pixel (n, m) in the m-th row and the n-th column indicated by the shaded portion in FIG. 4A, and all the other pixels are also unprocessed pixels. At this time, a cell CL of (n, m) 1 pixel is generated.

次にセルCL内の画素の階調値の合計は“50”となり、“255”未満であるので、セルCLの重心位置を算出する。算出されたセルCLの重心GCの位置は、画素(n,m)の中心になり、図4(b)網掛け部で示したように、算出した重心GCの位置から最も近い未処理画素をセルCLに組み入れる。この場合、(n+1,m)(n,m+1)の2つが重心に最も近い画素として存在する。本実施形態では、このような選択対象となる画素が複数存在する場合はランダムに選択する。ここでは(n+1,m)をセルに組み入れ、セルCLを拡大するものとする。このように選択すべき画素が複数存在するときは、ランダムに画素を選択することにより、同じ形状のセルが連続して生成されにくくなる。この結果、後述するセルの重心に形成されるドットの分散性が向上する。もとより、ランダムとせず、所定の選択順を決めて選択することとしても差し支えない。   Next, since the sum of the gradation values of the pixels in the cell CL is “50”, which is less than “255”, the center of gravity position of the cell CL is calculated. The calculated position of the center of gravity GC of the cell CL is the center of the pixel (n, m), and the unprocessed pixel closest to the calculated position of the center of gravity GC is selected as shown by the shaded portion in FIG. Incorporate into cell CL. In this case, two of (n + 1, m) (n, m + 1) exist as pixels closest to the center of gravity. In the present embodiment, when there are a plurality of such pixels to be selected, they are selected at random. Here, it is assumed that (n + 1, m) is incorporated in the cell and the cell CL is enlarged. When there are a plurality of pixels to be selected in this way, it becomes difficult to continuously generate cells having the same shape by selecting pixels at random. As a result, the dispersibility of dots formed at the center of gravity of the cells described later is improved. Of course, it is possible to select a predetermined selection order without making it random.

次に、拡大したセルCL内(図4(c)の太枠内の部分)の画素の階調値の合計は“100”となり、閾値“255”未満であるので、セル内の画素位置と画素の階調値からセルCLの重心GCの位置を算出する。そして、図4(c)網掛け部で示したように、算出した重心GCの位置から最も近い画素(n,m+1)(n+1,m+1)のうち、同じくランダムに選択し、ここでは(n,m+1)をセルに組み入れ、セルCLを拡大する。   Next, the sum of the gradation values of the pixels in the enlarged cell CL (the portion within the thick frame in FIG. 4C) is “100”, which is less than the threshold value “255”. The position of the center of gravity GC of the cell CL is calculated from the gradation value of the pixel. Then, as shown by the shaded portion in FIG. 4 (c), pixels (n, m + 1) (n + 1, m + 1) closest to the calculated position of the center of gravity GC are selected at random, and here (n, m + 1) is incorporated into the cell and the cell CL is enlarged.

次に、拡大したセルCL内(図4(d)の太枠内の部分)の画素の階調値の合計は“150”となり、閾値“255”未満であるので、セルCL内の画素位置と画素の階調値からセルCLの重心GCの位置を算出する。そして、図4(d)網掛け部で示したように、算出した重心GCの位置から最も近い画素(n+1,m+1)をセルに組み入れ、セルCLを拡大する。   Next, since the sum of the gradation values of the pixels in the enlarged cell CL (the portion within the thick frame in FIG. 4D) is “150”, which is less than the threshold value “255”, the pixel position in the cell CL The position of the center of gravity GC of the cell CL is calculated from the gradation value of the pixel. 4D, the pixel (n + 1, m + 1) closest to the calculated position of the center of gravity GC is incorporated into the cell, and the cell CL is enlarged.

次に、拡大したセルCL内(図4(e)の太枠内の部分)の画素の階調値の合計は“205”となり、閾値“255”未満であるので、セルCL内の画素位置と画素の階調値からセルCLの重心GCの位置を算出する。そして、図4(e)網掛け部で示したように、算出した重心GCの位置から最も近い画素(n+1,m+2)をセルに組み入れ、セルCLを拡大する。   Next, since the sum of the gradation values of the pixels in the enlarged cell CL (the portion within the thick frame in FIG. 4E) is “205”, which is less than the threshold value “255”, the pixel position in the cell CL The position of the center of gravity GC of the cell CL is calculated from the gradation value of the pixel. Then, as shown in FIG. 4E, the pixel (n + 1, m + 2) closest to the calculated position of the center of gravity GC is incorporated into the cell, and the cell CL is enlarged.

次に、拡大したセルCL内(図4(f)の太枠内の部分)の画素の階調値の合計は“255”となり、セルの拡大終了条件を満たすので、セルCLの拡大処理を終了し、ステップS306(図3)に進む。   Next, the sum of the gradation values of the pixels in the enlarged cell CL (the portion within the thick frame in FIG. 4F) is “255”, which satisfies the cell enlargement end condition. The process ends, and the process proceeds to step S306 (FIG. 3).

ステップS306では、セル内の画素の階調値合計が閾値と等しいか否かを判定する処理を行う。判定の結果閾値と等しい場合は(YES)、前述の処理と同様、セル内の画素位置と画素の階調値からセルの重心GCの位置を算出する処理を行う(ステップS307)。そして、算出した重心位置に存在する画素に、閾値と同じ階調値を与える処理を行い(ステップS308)、ステップS302に戻って未処理画素の探索処理以降を繰り返す。   In step S306, a process for determining whether or not the total gradation value of the pixels in the cell is equal to the threshold value is performed. If it is equal to the threshold value as a result of the determination (YES), a process of calculating the position of the center of gravity GC of the cell from the pixel position in the cell and the gradation value of the pixel is performed (step S307). Then, a process of giving the same gradation value as the threshold value to the pixel existing at the calculated center of gravity position is performed (step S308), and the process returns to step S302 to repeat the process of searching for unprocessed pixels.

図4(f)に示したように、ステップS308では、ステップS307によって算出した重心GCの位置に存在する画素(n+1,m+1)に、閾値と同じ階調値“255”を与える。この階調値“255”が与えられた画素の位置にシアンの色相データに対応したドットを形成して画像を印刷するのである。   As shown in FIG. 4F, in step S308, the same gradation value “255” as the threshold value is given to the pixel (n + 1, m + 1) existing at the position of the center of gravity GC calculated in step S307. An image is printed by forming dots corresponding to cyan hue data at the position of the pixel to which the gradation value “255” is given.

一方、ステップS306で判定の結果、閾値と等しくない場合つまり閾値を超える場合は(NO)、閾値を超えた分の階調値である誤差データを無視して、セルの重心を算出する処理を行う(ステップS309)。そして、誤差データを最後にセルに組み入れた画素に戻し(ステップS310)、この誤差データを戻した画素を未処理画素とする処理を行う(ステップS311)。次に、ステップS308に進み、算出した重心位置に存在する画素に、閾値と同じ階調値を与える処理を行う。   On the other hand, if the result of determination in step S306 is not equal to the threshold value, that is, if the threshold value is exceeded (NO), the process of calculating the center of gravity of the cell ignoring the error data that is the gradation value that exceeds the threshold value This is performed (step S309). Then, the error data is returned to the last pixel incorporated in the cell (step S310), and the pixel to which the error data is returned is processed as an unprocessed pixel (step S311). Next, the process proceeds to step S308, and a process of giving the same gradation value as the threshold value to the pixel existing at the calculated center of gravity position is performed.

ステップS309からS311までの処理について、図5を用いて具体的に説明する。図5(a)は、図4(f)にて説明したセルCL1の生成処理に続き、ステップS302にて、所定の走査方法による走査方向に従って画素(n+2,m)が未処理画素として探索された状態を示している。そして図4にて説明した処理と同様に処理を行い、図5(b)では画素(n+2,m+1)を、図5(c)では画素(n+3,m+1)を、図5(d)では画素(n+3,m+2)をセルCL2に組み入れてセルを拡大する。   The processing from step S309 to S311 will be specifically described with reference to FIG. In FIG. 5A, following the generation processing of the cell CL1 described in FIG. 4F, in step S302, the pixel (n + 2, m) is searched as an unprocessed pixel according to the scanning direction by a predetermined scanning method. Shows the state. Then, the same processing as that described in FIG. 4 is performed. In FIG. 5B, the pixel (n + 2, m + 1) is performed. In FIG. 5C, the pixel (n + 3, m + 1) is processed. In FIG. The cell is expanded by incorporating (n + 3, m + 2) into the cell CL2.

図5(e)に示したように、画素(n+3,m+2)がセルCL2に組み入れた時点で、セルCL2内の画素の階調値合計は“265”となり、閾値“255”を超える。そこで、超えた分の誤差データ“10”(=265−255)を無視し、画素(n+3,m+2)が階調値“50”(=60−10)であるとしてセルCL2の重心GC2を算出する。   As shown in FIG. 5E, when the pixel (n + 3, m + 2) is incorporated into the cell CL2, the total gradation value of the pixels in the cell CL2 is “265”, which exceeds the threshold value “255”. Therefore, the excess error data “10” (= 265−255) is ignored, and the center of gravity GC2 of the cell CL2 is calculated assuming that the pixel (n + 3, m + 2) has the gradation value “50” (= 60−10). To do.

そして、図5(f)に示したように、算出した重心GC2の位置に存在する画素(n+3,m+1)に階調値“255”を付与する。このとき、最後にセルCL2に組み入れた画素(n+3,m+2)に誤差データ“10”を戻す。そして、画素(n+3,m+2)を階調値“10”を有する未処理画素とし、セルCL2から除外する。   Then, as shown in FIG. 5F, the gradation value “255” is assigned to the pixel (n + 3, m + 1) existing at the calculated position of the center of gravity GC2. At this time, the error data “10” is returned to the pixel (n + 3, m + 2) last incorporated in the cell CL2. Then, the pixel (n + 3, m + 2) is set as an unprocessed pixel having the gradation value “10” and excluded from the cell CL2.

図3および図4、図5を用いて説明した変換処理が本実施形態におけるCC法の基本的な処理内容である。CC法による階調変換処理によれば、常にセルの重心に最も近い画素を組み入れてセルを生成するため、閾値を付与する画素位置に対してほぼ円形状となるセルを生成する。従って、閾値が付与された画素位置にドットを形成した場合、隣り合うドットが近かったり、あるいは重なったりする確率を減少することでき、分散性のよいドットを形成することができる。   The conversion processing described with reference to FIGS. 3, 4, and 5 is the basic processing content of the CC method in the present embodiment. According to the gradation conversion processing by the CC method, since a cell is always generated by incorporating the pixel closest to the center of gravity of the cell, a cell having a substantially circular shape is generated with respect to a pixel position to which a threshold value is applied. Therefore, when a dot is formed at a pixel position to which a threshold is given, the probability that adjacent dots are close to each other or overlap each other can be reduced, and a dot with good dispersibility can be formed.

また、CC法では、前述したようにセル内の画素の階調値合計が閾値に達するまでセルを拡大するため、階調値が小さい画素が多い入力画像領域では画素数が多いセルが生成され、逆に階調値が大きい画素が多い入力画像領域では画素数が少ないセルが生成される。したがって、生成されたセルを構成する画素数は、入力画像の階調値の大小つまり入力画像の濃淡を表すという特徴がある。   In the CC method, as described above, since the cell is expanded until the total gradation value of the pixels in the cell reaches the threshold value, a cell having a large number of pixels is generated in an input image region having many pixels having small gradation values. Conversely, in the input image area where there are many pixels with large gradation values, cells with a small number of pixels are generated. Therefore, the number of pixels constituting the generated cell is characterized in that it represents the magnitude of the gradation value of the input image, that is, the shade of the input image.

また、CC法による階調変換によれば、誤差データを元の画素に戻すため、入力画像データの歪みが小さくなり、入力画像の階調値に対して比較的忠実に階調変換処理を行うことができる。   Further, according to the gradation conversion by the CC method, the error data is returned to the original pixel, so that distortion of the input image data is reduced, and gradation conversion processing is performed relatively faithfully with respect to the gradation value of the input image. be able to.

次に、CC法による階調変換について、各ハードにおける具体的な処理内容を図3のフローチャートと図2の構成図を参照し、図6〜図8の模式図を用いて説明する。   Next, with regard to gradation conversion by the CC method, specific processing contents in each hardware will be described with reference to the flowchart of FIG. 3 and the configuration diagram of FIG. 2 and the schematic diagrams of FIGS.

まず、CPU26は、ハードディスク29またはROM28に格納されたプログラムを読み出して、入力画像の読み込み処理を開始する(ステップS301)。入力画像の読み込みは、ハードディスク29に格納された色変換処理後の色相データを、RAM27の指定された入力バッファ領域に取り込むことで行う。例えばシアンの色相データはシアン入力バッファ領域に格納され、マゼンタの色相データはマゼンタ入力バッファ領域に格納される。CC法は、全ての色相データについて基本的に同じ処理を行うものであるため、色相データを区別せずに説明することとし、RAM27に用意された入力バッファだけでなく、以降説明する出力バッファやワーキングメモリについてもシアン、マゼンタなどの記載を省略している。この例を図6(a)に示す。もとより、各色相データについての処理データは、それに対応した入力バッファ、ワーキングメモリ、出力バッファの各領域に格納される。   First, the CPU 26 reads a program stored in the hard disk 29 or the ROM 28, and starts an input image reading process (step S301). The input image is read by fetching the hue data after the color conversion process stored in the hard disk 29 into the designated input buffer area of the RAM 27. For example, cyan hue data is stored in the cyan input buffer area, and magenta hue data is stored in the magenta input buffer area. Since the CC method basically performs the same processing for all hue data, the hue data will be described without distinction, and not only the input buffer prepared in the RAM 27 but also the output buffer described below. The description of cyan, magenta, etc. is also omitted for the working memory. An example of this is shown in FIG. Of course, the processing data for each hue data is stored in the corresponding areas of the input buffer, working memory, and output buffer.

RAM27は、図6(a)に示すように、入力バッファ領域271と、ワーキングメモリ領域272と、出力バッファ領域273とから構成される。この入力バッファ領域271は、2次元構造を有しており、例えば上述の入力画像の画素(以降、入力画素)について、(n,m)に位置する入力画素の色相データは、入力バッファ領域の(n,m)のアドレスに格納される。入力画素の位置に対応するように入力バッファ領域271が構成される。実際には、このアドレスには色相データの階調値が格納されることになる。例えば、図4(a)に示すシアンの色相データが入力されると、図6(a)に示すように入力バッファ271に各画素の階調値が格納される。ワーキングメモリ領域272は、重心位置の演算結果と階調値の演算結果が格納され、出力バッファ領域273は入力バッファ271と同様に各入力画素の色相データに対応するように構成される。詳細は後述する。   As illustrated in FIG. 6A, the RAM 27 includes an input buffer area 271, a working memory area 272, and an output buffer area 273. The input buffer area 271 has a two-dimensional structure. For example, for the pixel of the input image (hereinafter referred to as input pixel), the hue data of the input pixel located at (n, m) is stored in the input buffer area. Stored at the address (n, m). An input buffer area 271 is configured to correspond to the position of the input pixel. Actually, the tone value of the hue data is stored at this address. For example, when cyan hue data shown in FIG. 4A is input, the gradation value of each pixel is stored in the input buffer 271 as shown in FIG. The working memory area 272 stores the calculation result of the barycentric position and the calculation result of the gradation value, and the output buffer area 273 is configured to correspond to the hue data of each input pixel like the input buffer 271. Details will be described later.

次いで、CPU26は、セル生成の最初の未処理画素となる初期画素を探索決定して(ステップS302)、決定した初期画素の階調値が閾値より小さいか否かを判断する(ステップS304)。具体的には、ROM28に格納した閾値を読出し、RAM27の入力バッファ271から読み出した初期画素の階調値と比較し、閾値よりも小さい場合はステップS305に移行し、閾値と同じか大きいときはステップS306に移行する。   Next, the CPU 26 searches for and determines an initial pixel that is the first unprocessed pixel in cell generation (step S302), and determines whether or not the gradation value of the determined initial pixel is smaller than a threshold value (step S304). Specifically, the threshold value stored in the ROM 28 is read and compared with the gradation value of the initial pixel read from the input buffer 271 of the RAM 27. If the threshold value is smaller than the threshold value, the process proceeds to step S305. The process proceeds to step S306.

初期画素の決定は、RAM27の入力バッファ271に格納された入力画像データのうち、入力画素の位置で最も上の左側に位置する画素をCPU26が選択する。すなわち、図6(a)に示す例では、(n,m)に対応する位置に位置する画素を初期画素としてCPU26は判断する。以下、説明を簡単にするため、(n,m)=(0,0)として説明する。   For the determination of the initial pixel, the CPU 26 selects the pixel located on the upper left side in the position of the input pixel from the input image data stored in the input buffer 271 of the RAM 27. That is, in the example shown in FIG. 6A, the CPU 26 determines that the pixel located at the position corresponding to (n, m) is the initial pixel. Hereinafter, in order to simplify the description, (n, m) = (0, 0) will be described.

ステップS304で閾値より小さいと判断された場合(YES)、CPU26は、未処理画素の選択を行い、セルを拡大する処理を行う(ステップS305)。ここで未処理画素の選択は、セルの重心を利用して行う。重心を利用して画素の選択を行うことによって、最終的に生成されるセルの形状は円形状となり、その重心にドットを形成させることで、ドット間距離が均一となり、ドットの分散性がよい印刷出力を得ることができるのである。   If it is determined in step S304 that it is smaller than the threshold value (YES), the CPU 26 selects an unprocessed pixel and performs a process of enlarging the cell (step S305). Here, selection of unprocessed pixels is performed using the center of gravity of the cell. By selecting a pixel using the center of gravity, the shape of the cell that is finally generated becomes a circular shape. By forming dots at the center of gravity, the distance between dots is uniform and the dispersibility of the dots is good. A printed output can be obtained.

CPU26は初期画素の位置する画素の階調値と、そのアドレス位置とを読み出し、重心を演算する。CPU26は、具体的に以下の演算式を用いて演算し重心を求める。   The CPU 26 reads the gradation value of the pixel where the initial pixel is located and its address position, and calculates the center of gravity. Specifically, the CPU 26 calculates the center of gravity by calculating using the following calculation expression.

(式1)
重心={{(セルの重心のx座標)×(セル内の画素の階調値合計)}+{(選択した未処理画素のx座標)×(選択した未処理画素の階調値)}}/{(セル内の画素の階調値合計)+(選択した未処理画素の階調値)}
重心={{(セルの重心のy座標)×(セル内の画素の階調値合計)}+{(選択した未処理画素のy座標)×(選択した未処理画素の階調値)}}/{(セル内の画素の階調値合計)+(選択した未処理画素の階調値)}
(x重心、y重心は重心位置の座標)
この演算式はROM28に格納され、ステップS305にてCPU26が読み出して演算を行うことになる。もとより、初期画素の場合は、セルの重心のx、y座標は“0”として演算される。なお、CPU26は、演算した重心位置と、セルを構成する画素数“1”とを、上述したワーキングメモリ領域272のアドレス「x」「y」「gn」にそれぞれ格納する(図6(b)参照)。
(Formula 1)
x centroid = {{(x coordinate of centroid of cell) × (total gradation value of pixels in cell)} + {(x coordinate of selected unprocessed pixel) × (gradation value of selected unprocessed pixel) }} / {(Total gradation value of pixels in cell) + (gradation value of selected unprocessed pixel)}
y centroid = {{(y coordinate of centroid of cell) × (total tone value of pixels in cell)} + {(y coordinate of selected unprocessed pixel) × (gradation value of selected unprocessed pixel) }} / {(Total gradation value of pixels in cell) + (gradation value of selected unprocessed pixel)}
(X center of gravity , y center of gravity are coordinates of the center of gravity)
This arithmetic expression is stored in the ROM 28, and the CPU 26 reads out and performs arithmetic operation in step S305. Of course, in the case of the initial pixel, the x and y coordinates of the center of gravity of the cell are calculated as “0”. The CPU 26 stores the calculated barycentric position and the number of pixels constituting the cell “1” at the addresses “x”, “y”, and “gn” of the working memory area 272 described above (FIG. 6B). reference).

また、CPU26は、ステップS304で初期画素の階調値が閾値より小さいと判断された場合は、初期画素に対応する出力バッファ273に“0”を格納し、ステップS304で初期画素の階調値が閾値以上と判断された場合は、その時点で初期画素に対応する出力バッファ273に“255”を格納する。この画素位置にドットを出力する処理を行うためである。ここでは、選択された初期画素の階調値は閾値より小さいため、図6(b)に示すように、選択した画素に対応するRAM27の出力バッファ273に“0”がCPU26によって格納されることになる。   If it is determined in step S304 that the gradation value of the initial pixel is smaller than the threshold value, the CPU 26 stores “0” in the output buffer 273 corresponding to the initial pixel, and in step S304, the gradation value of the initial pixel. Is determined to be greater than or equal to the threshold, “255” is stored in the output buffer 273 corresponding to the initial pixel at that time. This is because a process of outputting a dot at this pixel position is performed. Here, since the gradation value of the selected initial pixel is smaller than the threshold value, “0” is stored by the CPU 26 in the output buffer 273 of the RAM 27 corresponding to the selected pixel as shown in FIG. become.

続いて、CPU26は、ワーキングメモリ272のアドレス「sum」に初期画素の階調値を格納するとともに、選択した初期画素に対応する入力バッファ271に“−1”を格納する。再度未処理画素の選択で、当該画素を選択されないようにするためである。以降、未処理画素の選択処理と同時もしくは選択処理に先んじて、それまで既に選択されたセルを構成する画素の階調値の合計をワーキングメモリ272のアドレス「sum」に格納し、当該画素に対応する入力バッファ271のアドレスに“−1”を格納する処理を行う。   Subsequently, the CPU 26 stores the gradation value of the initial pixel at the address “sum” of the working memory 272 and stores “−1” in the input buffer 271 corresponding to the selected initial pixel. This is because the pixel is not selected again by selecting the unprocessed pixel. Thereafter, at the same time as the selection process of the unprocessed pixel or prior to the selection process, the sum of the gradation values of the pixels that have already constituted the cell so far is stored at the address “sum” of the working memory 272 and stored in the pixel. A process of storing “−1” in the address of the corresponding input buffer 271 is performed.

なお、CPU26は、入力バッファ271に“−1”を格納させているが、これに限ることはなく、他の負の値でもよい。さらに入力バッファ271と同様の構成のメモリ領域を用意して、選択した画素に対応する位置にフラグを立てて、選択画素が処理済みか否かを判別するようにしてもよい。   The CPU 26 stores “−1” in the input buffer 271. However, the present invention is not limited to this, and other negative values may be used. Further, a memory area having the same configuration as that of the input buffer 271 may be prepared, and a flag may be set at a position corresponding to the selected pixel to determine whether or not the selected pixel has been processed.

未処理画素の選択処理は、ステップS305で演算した重心から最も近い距離にある画素を選択することによって行う。このとき、RAM27の入力バッファの所定位置に格納されている入力画像の階調値から、アドレス(1,0)にある入力画素の階調値か、アドレス(0,1)にある入力画素の階調値が選択される。2つの画素ともアドレス(0,0)から等距離にあるからである。ここで、いずれかの画素を選択する必要があるが、本実施形態ではCPU26がランダムに画素を選択し、ここでは0行1列のアドレス(1,0)にある画素の階調値を選択する。こうしてセルを拡大する処理が行われるのである。   The unprocessed pixel selection process is performed by selecting a pixel closest to the center of gravity calculated in step S305. At this time, the tone value of the input pixel at the address (1, 0) or the tone value of the input pixel at the address (0, 1) from the tone value of the input image stored at a predetermined position of the input buffer of the RAM 27. A tone value is selected. This is because the two pixels are equidistant from the address (0, 0). Here, it is necessary to select one of the pixels, but in this embodiment, the CPU 26 randomly selects a pixel, and here, selects the gradation value of the pixel at the address (1,0) in the 0th row and the first column. To do. Thus, the process of enlarging the cell is performed.

次いで、CPU26は、再びセル内の画素の階調値合計が閾値未満であるか否か判断する(ステップS304)。すなわち、選択した未処理画素の階調値を含めたセル内の画素の階調値合計が閾値“255”未満であるか否かを判断する。具体的には、CPU26は、RAM27のワーキングメモリ272のアドレス「sum」に書き込んだ画素の階調値と、ステップS305で選択した画素の入力バッファ271に格納された階調値とを読出し、その合計を演算して、ROM28に格納された閾値(ここでは“255”の値)とを比較する。例えば図6(c)の例では、ワーキングメモリ272のアドレス「sum」に格納された値“50”と、入力バッファ271のアドレス(1,0)格納されている階調値“50”との合計値は“100”となる。よって合計値は閾値に達しない。   Next, the CPU 26 determines again whether or not the total gradation value of the pixels in the cell is less than the threshold value (step S304). That is, it is determined whether or not the total gradation value of the pixels in the cell including the gradation value of the selected unprocessed pixel is less than the threshold value “255”. Specifically, the CPU 26 reads out the gradation value of the pixel written in the address “sum” of the working memory 272 of the RAM 27 and the gradation value stored in the input buffer 271 of the pixel selected in step S305, The sum is calculated and compared with a threshold value (here, “255”) stored in the ROM 28. For example, in the example of FIG. 6C, the value “50” stored at the address “sum” of the working memory 272 and the gradation value “50” stored at the address (1, 0) of the input buffer 271. The total value is “100”. Therefore, the total value does not reach the threshold value.

階調値の合計が閾値を超えない場合(ステップS304:YES)、CPU26は、再び選択した未処理画素を含めた重心の演算を行う(ステップS305)。具体的なCPU26の演算は、上述した(式1)の演算式を用いて行うことになる。これまで求めた重心のx、y座標は、(0,0)で重心の階調値は“50”、未処理画素のx、y座標は(1,0)で、その階調値は“50”であるので、演算される重心位置は(0.5,0)となる。このステップS305で演算した重心位置は、CPU26の制御によってRAM27のワーキングメモリ272にセルの画素数とともに格納される。ステップS305での前回の処理で、ワーキングメモリ272には初期画素の重心位置および初期画素の画素数が格納されていたが、ここではその位置に上書きして格納する。その格納後の例を図6(c)に示す。   When the sum of the gradation values does not exceed the threshold value (step S304: YES), the CPU 26 calculates the center of gravity including the unprocessed pixel selected again (step S305). The specific calculation of the CPU 26 is performed using the above-described equation (Equation 1). The x and y coordinates of the center of gravity obtained so far are (0, 0), the tone value of the center of gravity is “50”, the x and y coordinates of the unprocessed pixel are (1, 0), and the tone value is “ Since it is 50 ″, the calculated center-of-gravity position is (0.5, 0). The barycentric position calculated in step S305 is stored in the working memory 272 of the RAM 27 together with the number of pixels of the cell under the control of the CPU 26. In the previous processing in step S305, the barycentric position of the initial pixel and the number of pixels of the initial pixel were stored in the working memory 272, but here the position is overwritten and stored. An example after the storage is shown in FIG.

ここで、図6(c)に示されているように、重心位置は必ずしも整数値になるとは限らない。このとき、未処理画素の選択において重心に最も近い画素を選択する方法のほかに、重心が位置する画素に最も近い画素、つまり重心が位置する画素の中心に最も近い画素を選択する方法としてもよい。このようにすると、重心位置は整数値として演算でき、CPU26が処理する計算量の削減が期待できる。   Here, as shown in FIG. 6C, the center-of-gravity position is not necessarily an integer value. At this time, in addition to the method of selecting the pixel closest to the center of gravity in the selection of the unprocessed pixel, the method of selecting the pixel closest to the pixel where the center of gravity is located, that is, the pixel closest to the center of the pixel where the center of gravity is located may be used. Good. In this way, the position of the center of gravity can be calculated as an integer value, and a reduction in the amount of calculation processed by the CPU 26 can be expected.

こうして、ステップS304とS305の処理を繰り返すたびに、CPU26は、ステップS304で演算したセル内の画素の階調値合計が、閾値と等しいか否か判断しながら閾値に達するまでセルを構成していくことができる。また、閾値に達していない場合、上述したようにCPU26は、セルに組み入れた入力画素の位置に対応した出力バッファ273の位置に“0”を格納する。   In this way, each time the processes in steps S304 and S305 are repeated, the CPU 26 configures the cell until the threshold value is reached while determining whether the total gradation value of the pixels in the cell calculated in step S304 is equal to the threshold value. I can go. If the threshold value has not been reached, as described above, the CPU 26 stores “0” in the position of the output buffer 273 corresponding to the position of the input pixel incorporated in the cell.

図7(a)は、未処理画素(1,1)が選択されたときの状態を示したもので、ワーキングメモリ272の「sum」の値と画素(1,1)の階調値との合計値と、ROM28に格納された閾値とをCPU26が読み出して、両者を比較し、まだ閾値に達していないので、画素(1,1)をセルに組み込み、ワーキングメモリ272には重心位置とセルを構成する画素数“4”が、また選択した未処理画素(1,1)に対応する出力バッファ273に“0”がそれぞれ格納されている。   FIG. 7A shows a state when the unprocessed pixel (1, 1) is selected. The “sum” value of the working memory 272 and the gradation value of the pixel (1, 1) are shown. The CPU 26 reads out the total value and the threshold value stored in the ROM 28 and compares them. Since the threshold value has not yet been reached, the pixel (1, 1) is incorporated in the cell, and the working memory 272 stores the position of the center of gravity and the cell. And “0” is stored in the output buffer 273 corresponding to the selected unprocessed pixel (1, 1).

図7(b)は、図7(a)に引き続き行われる処理を示したもので、入力画素(1,2)が重心位置に最も近い画素として選択された状態を示している。このとき、セルの階調値合計が“255”になった状態を示している。すなわち、これまでセルに組み込まれた画素の階調値合計“205”が、RAM27のワーキングメモリ272に格納されるので、その値と画素(1,2)の値との合計値を、閾値と比較することで、CPU26は閾値と等しいと判断する。この場合、CPU26は、セルに組み入れた入力画素(1,2)の位置に対応した出力バッファ273の位置に“0”を格納する。   FIG. 7B shows a process performed subsequently to FIG. 7A and shows a state where the input pixel (1, 2) is selected as the pixel closest to the center of gravity position. At this time, a state is shown in which the sum of the gradation values of the cells is “255”. That is, since the total tone value “205” of the pixels incorporated in the cell is stored in the working memory 272 of the RAM 27, the total value of the value and the value of the pixel (1, 2) is set as the threshold value. By comparing, the CPU 26 determines that it is equal to the threshold value. In this case, the CPU 26 stores “0” at the position of the output buffer 273 corresponding to the position of the input pixel (1, 2) incorporated into the cell.

そして、閾値と等しいとCPU26が判断した場合(ステップS306:YES)、処理はステップS307に移行し(式1)を用いて重心位置を演算し、演算した重心位置とセルの画素数“5”をワーキングメモリ272に格納する。そして、重心に位置する画素に所定の色成分のドットを形成するための処理を行う。具体的には、図7(b)に示したように、RAM27の出力バッファ273の入力画素の位置に対応するアドレス位置にドットの形成をしめす所定の階調データ“255”を、セルを構成する画素数情報(本実施形態では“G5”)とともに書き込む。出力バッファの構造も入力バッファと同様に2次元構造で、入力画素の位置に対応するアドレス空間を有している。重心が位置するアドレスに“255”と“G5”を書き込むことで、その後、実際にその位置に対応する位置にドットを形成することができる。   If the CPU 26 determines that it is equal to the threshold value (step S306: YES), the process proceeds to step S307, the center of gravity position is calculated using (Equation 1), and the calculated center of gravity position and the number of pixels of the cell “5”. Is stored in the working memory 272. Then, a process for forming a dot of a predetermined color component on a pixel located at the center of gravity is performed. Specifically, as shown in FIG. 7B, a predetermined gradation data “255” for forming a dot at an address position corresponding to the position of the input pixel of the output buffer 273 of the RAM 27 is formed into a cell. The number of pixels to be written (in this embodiment, “G5”) is written. The structure of the output buffer is also a two-dimensional structure like the input buffer, and has an address space corresponding to the position of the input pixel. By writing “255” and “G5” at the address where the center of gravity is located, a dot can be actually formed at a position corresponding to that position.

次いで、CPU26は、データ“255”の書き込み処理をトリガーにして新たにセルを生成する処理に移行し、再び未処理画素があるか否か判断する(ステップS302)。すなわち、上述した処理をRAM27の入力バッファ271に書き込まれたすべての階調値に対して行ったか否かで判断し、未処理画素があれば(YES)再び処理はステップS304に移行し、上述の処理を繰り返す。例えば、図7(c)に、引き続いて上述した走査方法に従って、未処理画素(2,0)が探索された状態を示した。すべての画素に対して処理が終了すれば(ステップS302:NO)、CPU26はステップS303に移行し、処理が終了することになる。   Next, the CPU 26 proceeds to a process of generating a new cell with the writing process of the data “255” as a trigger, and determines again whether there is an unprocessed pixel (step S302). That is, it is determined whether or not the above-described processing has been performed for all gradation values written in the input buffer 271 of the RAM 27. If there is an unprocessed pixel (YES), the processing proceeds to step S304 again, and the above-described processing is performed. Repeat the process. For example, FIG. 7C shows a state where the unprocessed pixel (2, 0) is searched for in accordance with the scanning method described above. If the process is completed for all the pixels (step S302: NO), the CPU 26 proceeds to step S303, and the process ends.

一方、ステップS306でセル内の画素の階調値合計が閾値を超える場合(NO)、処理はステップS309に移行し、閾値を超えた場合の重心演算処理を行う。   On the other hand, when the sum of the gradation values of the pixels in the cell exceeds the threshold value in step S306 (NO), the process proceeds to step S309, and a centroid calculation process is performed when the threshold value is exceeded.

図8(a)は、図7にて説明した処理に引き続いて、CPU26の処理が行われた状態を示したもので、入力画素(3,1)がセルに組み入れられたときのRAM27に格納されたデータの様子を示している。次に、図8(b)に示したように、(3,2)に位置する画素が選択されると、セル内の画素の階調値合計の演算結果は“265”になり、閾値“255”を超えることになる。したがって、このような場合(ステップS306:NO)、ステップS309に移行することになる。   FIG. 8A shows a state in which the processing of the CPU 26 is performed subsequent to the processing described in FIG. 7, and is stored in the RAM 27 when the input pixel (3, 1) is incorporated in the cell. Shows the state of the data. Next, as shown in FIG. 8B, when the pixel located at (3, 2) is selected, the calculation result of the total gradation value of the pixels in the cell is “265”, and the threshold value “ Will exceed 255 ". Therefore, in such a case (step S306: NO), the process proceeds to step S309.

ステップS309は、閾値を超える階調値分つまり誤差データを無視してセルの重心を算出する処理を行う。このため、まずCPU26は、閾値からセル内の画素の階調値合計、すなわち閾値からこれまでステップS305で格納したワーキングメモリの階調値を減ずる演算を行う。例えば図8に示す例では、閾値は“255”、ステップS305でこれまで格納した階調値は図8(b)に示したように“205”であるので、CPU26がこれらを読み出して255−205=50の値を演算する。   In step S309, a process of calculating the center of gravity of the cell while ignoring the gradation value exceeding the threshold value, that is, the error data is performed. For this reason, first, the CPU 26 performs an operation of subtracting the total tone value of the pixels in the cell from the threshold value, that is, the tone value of the working memory stored in step S305 so far from the threshold value. For example, in the example shown in FIG. 8, the threshold value is “255”, and the gradation value stored so far in step S305 is “205” as shown in FIG. 8B. A value of 205 = 50 is calculated.

そして、CPU26が、この“50”の値を画素(3,2)の階調値として重心の演算を行うことによって、誤差データが無視されることになる。重心の演算は具体的には、以下の演算式を用いる。   Then, the CPU 26 calculates the center of gravity using the value of “50” as the gradation value of the pixel (3, 2), so that the error data is ignored. Specifically, the following calculation formula is used for the calculation of the center of gravity.

(式2)
重心={{(セルの重心のx座標)×(セル内の画素の階調値合計)}+{(選択した未処理画素のx座標)×(セル内の画素の階調値が閾値となるまでの階調値)}}/{(セル内の画素の階調値合計)+(セル内の画素の階調値が閾値となるまでの階調値)}
重心={{(セルの重心のy座標)×(セル内の画素の階調値合計)}+{(選択した未処理画素のy座標)×(セル内の画素の階調値が閾値となるまでの階調値)}}/{(セル内の画素のレベル値合計)+(セル内の画素の階調値が閾値となるまでの階調値)}
(x重心、y重心は重心位置の座標)
(式1)との違いは、選択した未処理画素の階調値をそのまま用いるのではなく、セルの合計が閾値と同じになるまでの階調値を用いる点が異なる。
(Formula 2)
x centroid = {{(x coordinate of centroid of cell) × (total gradation value of pixels in cell)} + {(x coordinate of selected unprocessed pixel) × (gradation value of pixel in cell is threshold value) Tone value until}}} / {(total tone value of pixels in cell) + (tone value until tone value of pixel in cell becomes threshold)}
y centroid = {{(y coordinate of centroid of cell) × (total tone value of pixels in cell)} + {(y coordinate of selected unprocessed pixel) × (tone value of pixel in cell is threshold) Gradation value until it becomes}}} / {(total level value of pixels in cell) + (gradation value until gradation value of pixel in cell becomes threshold value)}
(X center of gravity , y center of gravity are coordinates of the center of gravity)
The difference from (Expression 1) is that the gradation value of the selected unprocessed pixel is not used as it is, but the gradation value until the sum of the cells becomes equal to the threshold value is used.

この演算式は、(式1)の場合と同様に予めROM28に格納されており、CPU26が本ステップを実行する際にROM28から読み出すことで実行される。ここでは、最終的にステップS305で選択した画素の階調値は、これまで演算した階調値の合計との和をとることで閾値と等しくなるように演算して、それをもとに重心位置を求めることになる。そしてCPU26は、演算した重心位置データを再びRAM27のワーキングメモリ272に書き込む(図8(b)のワーキングメモリ272参照)。   This arithmetic expression is stored in the ROM 28 in advance as in the case of (Expression 1), and is executed by the CPU 26 reading it from the ROM 28 when executing this step. Here, the gradation value of the pixel finally selected in step S305 is calculated to be equal to the threshold value by summing up with the sum of the gradation values calculated so far, and based on that, the center of gravity is calculated. The position will be determined. Then, the CPU 26 writes the calculated gravity center position data in the working memory 272 of the RAM 27 again (see the working memory 272 in FIG. 8B).

また、CPU26は、最終的に選択した画素の元の階調値からステップS309で演算した演算結果を引いた値(誤差データ)を演算して、その値を再びその選択した画素の入力バッファに書き込む(ステップS310)。これにより、当該画素の階調値が、戻しデータとして格納される。図8(c)に示す例では、ステップS309で演算した“50”を最終的に選択した(3,2)の画素の階調値“60”から引いて“10”の値を求め、これをRAM27の入力バッファ271のアドレス(3,2)に再び書き込む(図8(c)の入力バッファ271参照)。   Further, the CPU 26 calculates a value (error data) obtained by subtracting the calculation result calculated in step S309 from the original gradation value of the finally selected pixel, and the value is again input to the input buffer of the selected pixel. Write (step S310). Thereby, the gradation value of the pixel is stored as return data. In the example shown in FIG. 8C, “50” calculated in step S309 is subtracted from the gradation value “60” of the finally selected pixel (3, 2) to obtain the value “10”. Is again written in the address (3, 2) of the input buffer 271 of the RAM 27 (see the input buffer 271 in FIG. 8C).

そして、この画素はセルに組み込まれず、階調変換が未処理であるとして扱い、新たなセルに組み入れられる未処理画素とする処理を行う(ステップS311)。上述したように、誤差データをセル以外の画素に戻すのではなく、誤差データが発生した画素に戻しデータとして再び格納させ、当該画素を未処理画素とすることで、入力画像の階調値に忠実な位置にドットを形成することができる。   Then, this pixel is not incorporated into the cell, and the gradation conversion is treated as unprocessed, and processing is performed to make an unprocessed pixel incorporated into a new cell (step S311). As described above, the error data is not returned to pixels other than the cell, but is returned to the pixel where the error data is generated and stored again, and the pixel is set as an unprocessed pixel. Dots can be formed at faithful positions.

その後処理はステップS308に移行し、上述した処理が繰り返されることになる。ちなみに、CPU26は、重心位置の存在する画素に対応する出力バッファ273に“255”と“G4”を格納させる。これにより、その後の処理で重心位置の存在する画素にドットを形成することができる。   Thereafter, the process proceeds to step S308, and the above-described process is repeated. Incidentally, the CPU 26 stores “255” and “G4” in the output buffer 273 corresponding to the pixel in which the center of gravity exists. Thereby, a dot can be formed in the pixel in which a gravity center position exists by subsequent processing.

以上説明したように、図2に示したハード構成によって、各色相データに対してCC法によるハーフトーン処理が行われる。   As described above, halftone processing by the CC method is performed on each hue data by the hardware configuration shown in FIG.

(B)誤差拡散法によるハーフトーン処理
次に、誤差拡散法によるハーフトーン処理について、図9〜図11を用いて説明する。誤差拡散法は、ドットマトリクス状に配列される入力画像の画素に対して、水平方向(入力画像の画面左から右方向)の主走査を繰り返しつつ走査ラインを垂直方向(入力画像の画面上から下方向)に移動する副走査を実行することにより注目画素を順次走査し、全画素について対象となる色相データを所定の種類の値を有する階調値に階調変換する。このようにして、注目画素を走査していくことにより、図9(a)に示したように、注目画素上方行と下方行は階調変換済み領域と未変換領域とに分かれる。さらに注目画素の左方列と右方列も階調変換済み領域と階調未変換領域とに分かれる。基本的には階調変換した所定の階調値と、階調変換前の元の階調値との差分値、つまり量子化による誤差値(以降、単に「誤差値」)を、注目画素の右方及び下方に割り当てることにより、入力画像全体での階調値の誤差を少なくするのである。
(B) Halftone Processing by Error Diffusion Method Next, halftone processing by the error diffusion method will be described with reference to FIGS. The error diffusion method repeats main scanning in the horizontal direction (from the left to the right of the input image on the screen of the input image) for the pixels of the input image arranged in a dot matrix, while moving the scanning line in the vertical direction (from the top of the input image on the screen). The target pixel is sequentially scanned by executing sub-scanning (downward), and tone conversion is performed on the target hue data for all the pixels to a tone value having a predetermined type of value. By scanning the target pixel in this way, as shown in FIG. 9A, the upper row and the lower row of the target pixel are divided into a gradation-converted region and an unconverted region. Further, the left column and the right column of the pixel of interest are also divided into a tone converted region and a tone non-converted region. Basically, a difference value between a predetermined gradation value after gradation conversion and an original gradation value before gradation conversion, that is, an error value by quantization (hereinafter simply referred to as “error value”) By assigning them to the right and below, the error of the gradation value in the entire input image is reduced.

また、図9(b)〜(d)に示すように、拡散する誤差値の割り当てに際しては、注目画素に対して所定の画素に重み付けをして誤差値を拡散させている。このように所定の画素に重み付けをして拡散することによって、入力画像の階調値の拡散度合いを設定することができる。   Further, as shown in FIGS. 9B to 9D, when assigning the error value to be diffused, the error value is diffused by weighting a predetermined pixel with respect to the target pixel. In this way, by spreading weighted predetermined pixels, it is possible to set the degree of diffusion of the gradation value of the input image.

それでは、誤差拡散法を用いた階調変換処理(2値化)処理について、図10のフローチャートと図11の模式図を用いて説明する。なお本実施形態での誤差値の拡散は、図9(b)の重み付け方法を用いて行うものとしている。注目画素に生じた誤差値を、右隣の画素に2、下の画素に2、右下の画素に1、左下の画素に1の割合で拡散するのである。   Now, the tone conversion process (binarization) process using the error diffusion method will be described with reference to the flowchart of FIG. 10 and the schematic diagram of FIG. Note that the error value diffusion in this embodiment is performed using the weighting method of FIG. The error value generated in the target pixel is diffused at a ratio of 2 to the right adjacent pixel, 2 to the lower pixel, 1 to the lower right pixel, and 1 to the lower left pixel.

この処理において、まず、p行q列目の画素に注目する。そしてこの画素のC,M,Y各色成分の色相データを、例えばシアン(C)成分であればdata_C〔p〕〔q〕と表す。これを、C,M,Yそれぞれの成分について2値化するのであるが、一例として、以下C成分を2値化する処理について説明する。もとより、M,Y成分についても処理は基本的に同じである。なお、p行q列目の画素の2値化によって生じる誤差値を、err〔p〕〔q〕と表す。   In this process, attention is first focused on the pixel in the p-th row and the q-th column. The hue data of the C, M, and Y color components of the pixel is represented as data_C [p] [q] if it is a cyan (C) component, for example. This is binarized for each component of C, M, and Y. As an example, processing for binarizing the C component will be described below. Of course, the processing is basically the same for the M and Y components. Note that an error value generated by binarization of the pixels in the p-th row and the q-th column is represented as err [p] [q].

同じくこの処理において、階調変換処理後のC成分の階調値(pre_C)を以下のように表す。
pre_C〔0〕=0
pre_C〔1〕=255
Similarly, in this process, the gradation value (pre_C) of the C component after the gradation conversion process is expressed as follows.
pre_C [0] = 0
pre_C [1] = 255

また、階調変換処理のために用いる閾値SHは、pre_C〔0〕より大きく、pre_C〔1〕より小さい所定の値に設定する。   The threshold value SH used for the gradation conversion process is set to a predetermined value that is larger than pre_C [0] and smaller than pre_C [1].

図10の処理が開始されると、最初にステップS401にて、注目画素となるp行q列目の画素の色相データdata_C〔p〕〔q〕が閾値SHより小さいか否かを判定する処理を行う。判定の結果、注目する画素のdata_C〔p〕〔q〕の階調値が閾値SHより小さい場合は(YES)、pre_Cの階調値をpre_C〔0〕の値“0”とする(ステップS402)。   When the process of FIG. 10 is started, first, in step S401, a process for determining whether or not the hue data data_C [p] [q] of the pixel in the p-th row and the q-th column as the target pixel is smaller than the threshold value SH. I do. As a result of the determination, if the gradation value of data_C [p] [q] of the pixel of interest is smaller than the threshold value SH (YES), the gradation value of pre_C is set to the value “0” of pre_C [0] (step S402). ).

一方、data_C〔p〕〔q〕の階調値が閾値SHより大きい場合は(NO)、ステップS405にて、data_C〔p〕〔q〕の階調値がpre_C〔1〕の値以下か否かを判定する処理を行う。判定の結果、YESであれば、pre_Cのレベル値をpre_C〔1〕の値“255”とする(ステップS406)。   On the other hand, if the gradation value of data_C [p] [q] is larger than the threshold value SH (NO), whether or not the gradation value of data_C [p] [q] is equal to or less than the value of pre_C [1] in step S405. The process which determines is performed. If the result of determination is YES, the level value of pre_C is set to the value “255” of pre_C [1] (step S406).

基本的に、data_C〔p〕〔q〕は以上の処理によって、“0”か“255”の値のどちらかに階調変換されることになるが、もしいずれにも変換されない場合、すなわちステップS405にて判定の結果NOである場合はデータエラーとして処理を終了する。   Basically, data_C [p] [q] is gradation-converted to either “0” or “255” by the above processing, but if it is not converted to either, that is, step If the determination result is NO in S405, the process ends as a data error.

次に、ステップS402、S406にて“0”か“255”の何れかに設定された階調値pre_Cとdata_C〔p〕〔q〕とからerr〔p〕〔q〕を算出する処理を行う(ステップS407)。そして、次のステップS408にて、算出したerr〔p〕〔q〕を、図9(b)の重み付けに従って所定の画素に拡散する処理を行う。   Next, a process of calculating err [p] [q] from the gradation value pre_C and data_C [p] [q] set to either “0” or “255” in steps S402 and S406 is performed. (Step S407). In the next step S408, the calculated err [p] [q] is diffused to predetermined pixels according to the weighting in FIG. 9B.

以上の処理を、所定の走査順に従って行い、p、qすべて終了したか否かを判定し(ステップS409)、終了していない場合は(NO)p、qを更新し(ステップS410)、順次画素の色相データを階調変換することによって入力画像全ての画素について処理を終了し(YES)、誤差拡散法による階調変換処理を終了する。もとより、入力画像の一行一列目の画素を最初の注目画素とし、その後、前述した主走査および副走査方法に従って注目画素を更新するのである。   The above processing is performed according to a predetermined scanning order, and it is determined whether or not all of p and q have been completed (step S409). If not completed (NO), p and q are updated (step S410), and sequentially. By performing tone conversion on the hue data of the pixels, the processing for all the pixels of the input image is finished (YES), and the tone conversion processing by the error diffusion method is finished. Of course, the pixel in the first row and the first column of the input image is set as the first target pixel, and then the target pixel is updated according to the main scanning and sub-scanning methods described above.

図10のフローチャートで示した処理の様子を、一例として、図11の模式図を用いて説明する。ここでは、図4(a)に示したシアン成分の色相データを所定の閾値“70”を用いて階調変換するものとする。もとより閾値はこれに限るものではなく、前述したように値“0”と“255”との間の値であれば何でもよい。   The process shown in the flowchart of FIG. 10 will be described as an example with reference to the schematic diagram of FIG. Here, it is assumed that tone conversion is performed on the hue data of the cyan component shown in FIG. 4A by using a predetermined threshold “70”. Of course, the threshold value is not limited to this, and may be any value between the values “0” and “255” as described above.

図11(a)太枠部に示したように、p行q列目の画素を注目画素とする。以降、画素を(q,p)というように表記する。閾値“70”との比較によって、図11(b)に示したように、(q,p)は階調値“0”に変換される。そして誤差値“50”(=50−0)を重み付け方法に従って、網掛け部で示したそれぞれの画素(q+1,p)と(q,p+1)に“17”、(q+1,p+1)に“8”の誤差値をそれぞれ拡散する。なお注目画素が入力画像の左端など端部に位置する場合は、誤差値の拡散対象となる画素のうち存在する画素に対して、それぞれの重み付け係数によって誤差値を振り分けて拡散する。従って、存在しない画素に対する重み付け分の階調値は失われる。   As shown in FIG. 11A, the pixel in the p-th row and the q-th column is a pixel of interest. Hereinafter, the pixel is expressed as (q, p). By comparison with the threshold “70”, (q, p) is converted into a gradation value “0” as shown in FIG. Then, according to the weighting method, the error value “50” (= 50−0) is “17” for each pixel (q + 1, p) and (q, p + 1) indicated by the shaded portion, and “8” for (q + 1, p + 1). Each error value is diffused. When the target pixel is located at an end portion such as the left end of the input image, the error value is distributed according to the respective weighting coefficients for the existing pixels among the pixels to be subjected to the error value diffusion. Accordingly, the gradation value corresponding to the weight for the nonexistent pixel is lost.

次に、走査方法に従って(q+1,p)を次の注目画素とし(図11(c)太枠部)、閾値との比較によって(q+1,p)は階調値“0”に変換される(図11(d))。そして誤差値“67”(=67−0)を重み付け方法に従って、図11(c)の網掛け部で示したそれぞれの画素(q+2,p)と(q+1,p+1)に“22”、(q+2,p+1)と(q,p+1)に“11.5”の誤差値をそれぞれ拡散する。   Next, according to the scanning method, (q + 1, p) is set as the next pixel of interest (FIG. 11 (c), thick frame portion), and (q + 1, p) is converted into a gradation value “0” by comparison with a threshold value ( FIG. 11 (d)). Then, according to the weighting method, the error value “67” (= 67-0) is set to “22”, (q + 2) for each pixel (q + 2, p) and (q + 1, p + 1) indicated by the shaded portion in FIG. , P + 1) and (q, p + 1), the error value “11.5” is diffused.

次に、走査方法に従って(q+2,p)を注目画素とし(図11(d)太枠部)、閾値との比較によって(q+2,p)は階調値“255”に変換される(図11(e))。そして誤差値“−183”(=72−255)を重み付け方法に従って、(q+3,p)と(q+2,p+1)に“−61”、(q+3,p+1)と(q+1,p+1)に“−30.5”の誤差値をそれぞれ拡散する。   Next, according to the scanning method, (q + 2, p) is set as a pixel of interest (FIG. 11 (d) thick frame portion), and (q + 2, p) is converted into a gradation value “255” by comparison with a threshold value (FIG. 11). (E)). Then, according to the weighting method, the error value “−183” (= 72−255) is “−61” in (q + 3, p) and (q + 2, p + 1), and “−30” in (q + 3, p + 1) and (q + 1, p + 1). Each error value of .5 "is diffused.

走査方法に従って(q+3,p)が次の注目画素となるが(図11(f)太枠部)、このときは、画素(q+2,p+1)と(q+3,p+1)が重み付け分の誤差値が拡散される対象画素となる(図11(f)網掛け部参照)。このように色相データの変換処理を入力画像の全ての画素について繰り返し実施することによって、対象となる色相データについて階調変換(2値化)処理が行われるのである。   According to the scanning method, (q + 3, p) is the next pixel of interest (FIG. 11 (f), thick frame). At this time, the error value corresponding to the weighting of pixels (q + 2, p + 1) and (q + 3, p + 1) is This is the target pixel to be diffused (see the shaded portion in FIG. 11 (f)). As described above, the hue data conversion process is repeatedly performed for all the pixels of the input image, whereby the gradation conversion (binarization) process is performed on the target hue data.

以上説明したように、誤差拡散法を用いたハーフトーン処理は、量子化に伴って発生する階調値を誤差値として一定の方向に拡散させていくため、端部に位置する画素について一部階調値を失うものの、ほぼ元の階調値を保ちながら階調変換することができる階調変換処理方法である。   As described above, halftone processing using the error diffusion method diffuses the gradation value generated with quantization as an error value in a certain direction. This is a gradation conversion processing method that can perform gradation conversion while maintaining almost the original gradation value, although the gradation value is lost.

なお、誤差拡散法についてのハード構成は、CPU26、ROM28やRAM27の入力バッファ、出力バッファの構成など、前述したCC法による階調変換におけるハード構成と基本的に同じである。また誤差拡散の手法は周知の技術であるため、ハード構成および具体的にCPU26が行う誤算拡散法に基づく制御処理内容についての説明は、ここでは省略する。   The hardware configuration for the error diffusion method is basically the same as the hardware configuration in the gradation conversion by the CC method described above, such as the configuration of the input buffer and output buffer of the CPU 26, ROM 28 and RAM 27. Further, since the error diffusion method is a well-known technique, a description of the hardware configuration and the details of the control processing based on the erroneous calculation diffusion method performed by the CPU 26 is omitted here.

(C)ハーフトーン処理についての第1実施例(フィルタによるデータ処理)
(C1)誤算拡散法を用いたハーフトーン処理
次に、本実施形態におけるハーフトーン処理についての第1実施例を、図12のフローチャートを用いて説明する。第1実施例は、異なる2つの色相を持ったシアン成分とマゼンタ成分の色相データのハーフトーン処理に際して、シアン成分の色相データとその2値化データとの差分データを所定のフィルタにてデータ処理を行ったのち、マゼンタ成分の色相データに加算することによって、互いに重ならず分散性のよいドットを形成するものである。
(C) First embodiment of halftone processing (data processing by filter)
(C1) Halftone Processing Using Error Calculation Diffusion Method Next, a first example of the halftone processing in this embodiment will be described with reference to the flowchart of FIG. In the first embodiment, when halftone processing of hue data of cyan and magenta components having two different hues is performed, the difference data between the hue data of the cyan component and the binarized data is processed by a predetermined filter. Are added to the hue data of the magenta component to form dots that do not overlap each other and have good dispersibility.

この処理が開始されると、まずステップS201にて、入力画像を読み込む処理を行う。具体的には、色変換部21(図1)が出力した色相データDTを入力バッファに取り込むことによって入力画像を読み込む処理を行う。通常、全ての色相データを読み込んで、ドットを出力するためハーフトーン処理を行うが、ここでは説明を容易にするため、均一した階調値を持った色相の異なる2つの色相データであるシアン(C)成分とマゼンタ(M)成分とが、それぞれ入力バッファ271Caと271Maに取り込まれたものとする。均一した階調値“20”のシアン成分の色相データが取り込まれた様子を図13(a)に示した。また、本実施例では、さらに説明の簡便性のため取り込まれたシアン成分、マゼンタ成分とも8×8画素(アドレス(0,0)から(7,7)まで)の色相データであるとして以降説明する。   When this processing is started, first, in step S201, processing for reading an input image is performed. Specifically, the process of reading the input image is performed by taking the hue data DT output from the color conversion unit 21 (FIG. 1) into the input buffer. Normally, all the hue data is read and halftone processing is performed to output dots. However, here, in order to facilitate the explanation, cyan (two hue data having a uniform gradation value and different hues) It is assumed that the component C) and the magenta (M) component are taken into the input buffers 271Ca and 271Ma, respectively. FIG. 13A shows a state in which hue data of a cyan component having a uniform gradation value “20” is captured. Further, in this embodiment, for the sake of simplicity of explanation, both the cyan component and magenta component that have been taken in are assumed to be hue data of 8 × 8 pixels (addresses (0, 0) to (7, 7)). To do.

次に、ステップS202にて、シアン成分の階調値を、誤差拡散法を用いて2値化処理を行う。ここでの2値化処理に際しては、閾値を“45”とし、図9(b)の重み付け方法によって誤差値を拡散し階調変換する。この結果、シアン出力バッファ273Caに、図13(b)に示した2値化データが格納される。   Next, in step S202, the gradation value of the cyan component is binarized using an error diffusion method. In the binarization process here, the threshold value is set to “45”, and the error value is diffused and gradation-converted by the weighting method of FIG. 9B. As a result, the binarized data shown in FIG. 13B is stored in the cyan output buffer 273Ca.

次に、ステップS203にて、シアン成分の差分データの算出処理を行う。差分データは、シアン成分の色相データからシアン成分の2値化データを減算して求める。具体的には、シアン入力バッファ271Caのデータからシアン出力バッファ273Caのデータをマイナス演算して算出する。算出結果は、図13(c)に示したようにシアン出力バッファ273Cbに格納される。   Next, in step S203, calculation processing of difference data of the cyan component is performed. The difference data is obtained by subtracting the binarized data of the cyan component from the hue data of the cyan component. Specifically, the data of the cyan output buffer 273Ca is calculated from the data of the cyan input buffer 271Ca by performing a minus operation. The calculation result is stored in the cyan output buffer 273Cb as shown in FIG.

算出された差分データは、ドットが形成される位置に対応した1画素のみ、階調値を大きく減少させたものになっている。従って、このままこの差分データを以降の処理ステップにてマゼンタに加算すると、前述した特許文献2と同様、一方の色相のドット形成が行われた画素のみにドット抑制効果がとどまるため、他方の色相のドットが隣接する画素に形成されやすく、ドットが分散されにくくなる。そこで、ステップS204にて、シアン成分の差分データを所定のフィルタにてデータ処理を行う。つまり、所定のフィルタマトリックスを用いて、ドットが形成される画素位置周辺にドット抑制効果を分散させる処理を行うのである。   The calculated difference data is obtained by greatly reducing the gradation value of only one pixel corresponding to the position where the dot is formed. Therefore, if this difference data is added to magenta in the subsequent processing steps as it is, the dot suppression effect remains only in the pixels in which the dot formation of one hue has been performed, as in the above-described Patent Document 2, and therefore, Dots are easily formed in adjacent pixels, and the dots are less likely to be dispersed. In step S204, the cyan component difference data is subjected to data processing using a predetermined filter. That is, using a predetermined filter matrix, a process of dispersing the dot suppression effect around the pixel positions where dots are formed is performed.

図14(a)〜(c)に、フィルタマトリックスを例示する。本実施例では、用いるフィルタマトリックスを第1ドットの明度と第2ドットの明度の比率に応じた大きさのマトリックスとする。例えば、第1ドットの明度が高い場合は、図14(c)に例示したような大きいマトリックスを用いる。逆に、第1ドットの明度が低い場合は、図14(a)に例示したような小さいマトリックスを用いる。こうすることで、第1ドットが明度の高いドット、つまりより目立ち易いドットの場合は、第1ドットの位置から遠い位置に第2ドットが形成され、第1ドットが明度の低いドット、つまりより目立ち難いドットの場合は、第1ドットの位置に近い位置に第2ドットが形成される。この結果、印刷紙面上において単位面積あたりの明度を一定に保つ効果を奏することになる。   14A to 14C illustrate filter matrices. In this embodiment, the filter matrix to be used is a matrix having a size corresponding to the ratio of the lightness of the first dots and the lightness of the second dots. For example, when the brightness of the first dot is high, a large matrix as illustrated in FIG. On the other hand, when the brightness of the first dot is low, a small matrix as illustrated in FIG. In this way, when the first dot is a dot with high brightness, that is, a dot that is more conspicuous, the second dot is formed at a position far from the position of the first dot, and the first dot is a dot with low brightness, that is, more In the case of a dot that is not noticeable, the second dot is formed at a position close to the position of the first dot. As a result, there is an effect of keeping the brightness per unit area constant on the printed paper surface.

本実施例では、シアン成分の出力ドットとマゼンタ成分の出力ドットの明度比から、図14(b)に示したフィルタマトリックスが用いられデータ処理が行われるものとする。画像出力装置30が出力するドットの明度比に応じて用いる所定のフィルタマトリックスは、予めROM28またはハードディスク29に格納され、データ処理に際してCPU26が読み出して処理を行う。もとより、出力ドットの明度にかかわらず、所定のフィルタマトリックスを用いることとしても差し支えない。   In this embodiment, it is assumed that the data processing is performed using the filter matrix shown in FIG. 14B from the brightness ratio of the cyan component output dots and the magenta component output dots. A predetermined filter matrix used according to the lightness ratio of dots output by the image output device 30 is stored in advance in the ROM 28 or the hard disk 29, and is read out and processed by the CPU 26 during data processing. Of course, a predetermined filter matrix may be used regardless of the brightness of the output dots.

フィルタマトリックスによるデータ処理について、図15を用いて説明する。図15(a)に示したように、まずシアン出力バッファ273Cbのアドレス(0,0)を注目画素として太枠で示したフィルタマトリックスを用いてデータ処理する。このとき図示したように、フィルタマトリックス上、差分データが格納されたシアン出力バッファ273Cbのアドレスと重ならない部分が発生するが、この部分の階調値は“0”としてデータ処理を行う。データ処理の結果、アドレス(0,0)の階調値は“10”となり、RAM27に用意されたシアン出力バッファ273Ccに格納される。   Data processing using the filter matrix will be described with reference to FIG. As shown in FIG. 15A, first, data processing is performed using a filter matrix indicated by a thick frame with the address (0, 0) of the cyan output buffer 273Cb as a target pixel. At this time, as shown in the figure, a portion that does not overlap with the address of the cyan output buffer 273Cb in which the difference data is stored is generated on the filter matrix, and data processing is performed with the gradation value of this portion set to “0”. As a result of the data processing, the gradation value of the address (0, 0) becomes “10” and is stored in the cyan output buffer 273Cc prepared in the RAM 27.

次に、注目画素はアドレス(1,0)に移り、同じようにデータ処理を行い、階調値“−11”が、シアン出力バッファ273Ccのアドレス(1,0)に格納される。以降、前述の主・副走査の順序に従い、フィルタマトリックスを用いてデータ処理を繰り返し実施する。図15(c)は、データ処理の途中経過を示したもので、アドレス(4,1)が注目画素となったとき、階調値“20”が、シアン出力バッファ273Ccのアドレス(4,1)に格納された状態を示している。   Next, the target pixel moves to the address (1, 0), and data processing is performed in the same manner, and the gradation value “−11” is stored in the address (1, 0) of the cyan output buffer 273Cc. Thereafter, data processing is repeatedly performed using the filter matrix in accordance with the above-described main / sub-scanning order. FIG. 15C shows the progress of data processing. When the address (4, 1) is the target pixel, the gradation value “20” is the address (4, 1) of the cyan output buffer 273Cc. ) Is stored.

全てのアドレスについてデータ処理が終了すると、シアン成分の差分データは、図16(a)に示したシアン出力バッファ273Ccの状態となる。そして、次のステップS205にて、マゼンタ成分にこのデータ処理されたシアン成分の差分データを加算する処理を行う。図16(b)は、シアン成分と同様に、RAM27に用意されたマゼンタ入力バッファ271Maに取り込まれたマゼンタ成分の色相データを示している。本実施例では、マゼンタ成分も均一な階調値“20”を有する色相データであるものとする。加算処理は、シアン出力バッファ273Ccのデータと、マゼンタ入力バッファ271Maのデータとをプラス演算することによって行う。この結果は、RAM27に用意されたマゼンタ入力バッファ271Mbに格納される(図16(c)参照)。   When the data processing is completed for all addresses, the difference data of the cyan component is in the state of the cyan output buffer 273Cc shown in FIG. In the next step S205, processing for adding the difference data of the cyan component subjected to the data processing to the magenta component is performed. FIG. 16B shows the hue data of the magenta component taken into the magenta input buffer 271Ma prepared in the RAM 27, as with the cyan component. In this embodiment, it is assumed that the magenta component is also hue data having a uniform gradation value “20”. The addition process is performed by performing a plus operation on the data in the cyan output buffer 273Cc and the data in the magenta input buffer 271Ma. This result is stored in a magenta input buffer 271Mb prepared in the RAM 27 (see FIG. 16C).

こうして加算されたマゼンタ成分の色相データを、次のステップS206にて2値化処理する。本実施例では、マゼンタ成分の色相データの2値化処理についても、シアン成分と同様、閾値“45”と図9(b)に示した重み付けによる誤差拡散法を用いて2値化処理を行う。   The hue data of the magenta component thus added is binarized in the next step S206. In the present embodiment, the binarization process of the hue data of the magenta component is also performed using the threshold “45” and the error diffusion method based on the weighting shown in FIG. .

ステップS206での2値化処理の結果、マゼンタ出力バッファ273Maは図17(a)に示したようになる。そして、階調値“255”が格納されたアドレスに対応した画素位置にマゼンタ成分に対応する色ドット(単に、マゼンタドット)が形成される。一方、シアン成分に対応する色ドット(単に、シアンドット)は、図17(b)に示したように、シアン出力バッファ273Caに格納された階調値“255”のアドレスに対応した画素位置に形成される。従って、2種類のドットは、図17(c)に示したように形成される。   As a result of the binarization process in step S206, the magenta output buffer 273Ma becomes as shown in FIG. Then, a color dot (simply a magenta dot) corresponding to a magenta component is formed at a pixel position corresponding to an address in which the gradation value “255” is stored. On the other hand, the color dot corresponding to the cyan component (simply cyan dot) is located at the pixel position corresponding to the address of the gradation value “255” stored in the cyan output buffer 273Ca as shown in FIG. It is formed. Accordingly, the two types of dots are formed as shown in FIG.

以上で、誤差拡散法を用いた第1実施例の処理は終了するが、図17(c)から明らかなように、所定のフィルタによるデータ処理を行った本実施例のハーフトーン処理によれば、色相の異なる2種類の色相データについて、形成されるドットは重ならず、かつ分散性もよいことが分かる。仮に、本実施例において、ステップS203からS205の処理を行わず、シアン、マゼンタの色相データを同じ誤算拡散の方法で2値化した場合は、入力データが全く同一であるため、シアン成分もマゼンタ成分も共に図13(b)に示した2値化データとなり、全く同じ画素位置にドットが形成されてしまうことになる。本実施例によれば、ドットが重ならず分散性よく形成されるのである。   Although the processing of the first embodiment using the error diffusion method is completed as described above, as is clear from FIG. 17C, according to the halftone processing of the present embodiment in which data processing using a predetermined filter is performed. It can be seen that, for two types of hue data with different hues, the dots formed do not overlap and have good dispersibility. In this embodiment, if the hue data of cyan and magenta are binarized by the same miscalculation diffusion method without performing the processing of steps S203 to S205, since the input data is exactly the same, the cyan component is also magenta. Both components are the binarized data shown in FIG. 13B, and dots are formed at exactly the same pixel positions. According to this embodiment, dots are formed with good dispersibility without overlapping.

(C2)CC法を用いたハーフトーン処理
図17(c)では、形成されるシアンドットは4個でマゼンタドットは6個となっている。ここで、入力されたそれぞれの色相データの全ての画素の階調値合計は“1280”(=20×8×8)であることから、2値化後の階調値“255”の数は、階調値が保存されている場合は“5”(=INT(1280/255):INTは小数点以下を切り捨てる関数)となり、それぞれ合計5個のドットが形成されるはずである。しかし、2値化処理に誤算拡散法を用いた場合は、前述したように重み付け方法に従って誤差値が画像全体の右側及び下側に拡散していくため、画像の端部において元の画像の階調値が一部失われ、シアン成分の2値化処理の結果、階調値“255”が格納されたアドレス数が4個となって2値化データの階調値が減り、その分マゼンタ成分の階調値が増えることになる。この結果、形成されるシアンドットが減りマゼンタドットが増え、ドット数に差が生じるのである。
(C2) Halftone processing using CC method In FIG. 17C, four cyan dots are formed and six magenta dots are formed. Here, since the sum of the gradation values of all the pixels of each input hue data is “1280” (= 20 × 8 × 8), the number of gradation values “255” after binarization is When the gradation value is stored, “5” (= INT (1280/255): INT is a function for rounding down the decimal point), and a total of five dots should be formed. However, when the miscalculation diffusion method is used for the binarization process, the error value is diffused to the right side and the lower side of the entire image according to the weighting method as described above. A part of the tone value is lost, and as a result of the binarization processing of the cyan component, the number of addresses where the tone value “255” is stored becomes four, and the tone value of the binarized data is reduced. The gradation value of the component increases. As a result, cyan dots to be formed are reduced and magenta dots are increased, resulting in a difference in the number of dots.

(C2)CC法を用いたハーフトーン処理
前述した形成されるドット数の差に鑑み、次にCC法を用いたハーフトーン処理による第1実施例を図12のフローチャートに基づいて説明する。まず、ステップS201にて、図13(a)に示したものと同じシアン成分の階調値が、シアン入力バッファ271Caに格納処理される(図18(a)参照)。これをステップS202(図12)にて、CC法を用いて2値化処理を行うと、図18(b)に示したシアン出力バッファ273Caのデータを得る。図中太枠は生成されたセルを表し、“255”はドットの形成位置を、“G13”および“G11”はセルを構成する画素数をそれぞれ表している。図18(b)に示したように、CC法によれば、階調値が保存されるため、シアンドットは5個形成される。
(C2) Halftone Processing Using CC Method In view of the difference in the number of dots formed as described above, a first embodiment using halftone processing using the CC method will be described with reference to the flowchart of FIG. First, in step S201, the same cyan component tone value as shown in FIG. 13A is stored in the cyan input buffer 271Ca (see FIG. 18A). When this is binarized using the CC method in step S202 (FIG. 12), data of the cyan output buffer 273Ca shown in FIG. 18B is obtained. In the figure, a thick frame represents a generated cell, “255” represents a dot formation position, and “G13” and “G11” represent the number of pixels constituting the cell. As shown in FIG. 18B, according to the CC method, since the gradation value is stored, five cyan dots are formed.

次に、ステップS203にて、シアン成分の差分データを算出処理すると、図18(c)に示したシアン出力バッファ273Cbのデータを得る。次に、ステップS204にて、シアン出力バッファ273Cbのデータを、図14(b)に示した所定のフィルタマトリックスを用いてデータ処理すると、図19(a)に示したシアン出力バッファ273Ccのデータを得る。そしてこのデータを、図19(b)に示したマゼンタ入力バッファ271Maのデータに加算処理を行い(ステップS205)、マゼンタ入力バッファ271Mbに2値化処理の対象となる階調値データを得る(図19(c)参照)。   Next, when the cyan component difference data is calculated in step S203, the data of the cyan output buffer 273Cb shown in FIG. 18C is obtained. Next, when data in the cyan output buffer 273Cb is processed using the predetermined filter matrix shown in FIG. 14B in step S204, the data in the cyan output buffer 273Cc shown in FIG. obtain. Then, this data is added to the data in the magenta input buffer 271Ma shown in FIG. 19B (step S205), and gradation value data to be binarized is obtained in the magenta input buffer 271Mb (FIG. 19). 19 (c)).

次にステップS206にて、マゼンタ入力バッファ271Mbに格納されたマゼンタ成分の階調値を、CC法を用いて2値化処理する。図20(a)に、生成されるセルの様子を太枠線にて示した。そして、CC法による2値化処理のデータは、図20(b)に示したように、マゼンタ出力バッファ273Maの各アドレスに2値化データとして格納される。この結果、シアンドットとマゼンタドットは図20(c)に示したように形成される。   In step S206, the tone value of the magenta component stored in the magenta input buffer 271Mb is binarized using the CC method. FIG. 20A shows the state of the generated cell with a thick frame line. Then, the data of the binarization processing by the CC method is stored as binarized data at each address of the magenta output buffer 273Ma as shown in FIG. As a result, cyan dots and magenta dots are formed as shown in FIG.

以上のように、所定のフィルタマトリックスを用いてデータ処理をおこない、CC法による2値化処理によって、2種類の色相データに対応するドットは重ならず形成される。また、シアンドット数も5個になっている。   As described above, data processing is performed using a predetermined filter matrix, and dots corresponding to two types of hue data are formed without overlapping by binarization processing by the CC method. Also, the number of cyan dots is five.

しかしながら、形成されるマゼンタドットはまだ4個になっていることと、図13(c)に示した誤差拡散法と比較すると、シアンドットとマゼンタドットとの分散性が劣っている。これは、図12のステップS204で、所定のフィルタによるデータ処理を行った際、フィルタマトリックスと入力バッファのアドレスが重ならない位置の階調値を“0”として処理したため、入力バッファの端部のアドレスにおいてシアン成分のプラスの階調値が失われ、その結果、ステップS205にてマイナスの階調値がマゼンタ成分に加算され、マゼンタ成分の階調値を減少させたためである。   However, the number of magenta dots formed is still four, and the dispersibility of cyan dots and magenta dots is inferior compared with the error diffusion method shown in FIG. This is because the gradation value at the position where the filter matrix and the input buffer address do not overlap is processed as “0” when data processing by a predetermined filter is performed in step S204 of FIG. This is because the positive tone value of the cyan component is lost in the address, and as a result, the minus tone value is added to the magenta component in step S205, and the tone value of the magenta component is reduced.

(D)ハーフトーン処理についての第2実施例(プロファイルによる分散処理)
そこで、第2実施例として、差分データをフィルタによってデータ処理を行う方法に替え、2値化データを所定のプロファイルにて分散する方法によって、ドットが重ならず且つ適切なドット数が形成されるCC法を用いた2値化処理方法を説明する。
(D) Second embodiment of halftone processing (distributed processing by profile)
Therefore, as a second embodiment, the dot data is not overlapped and an appropriate number of dots is formed by replacing the difference data with a method of performing data processing using a filter and dispersing binarized data with a predetermined profile. A binarization processing method using the CC method will be described.

第2実施例にて行うハーフトーン処理を図21のフローチャートを用いて説明する。第2実施例は、異なる2つの色相を持ったシアン成分とマゼンタ成分の色相データのハーフトーン処理に際して、シアン成分の2値化データのうち階調値“255”のデータを所定のプロファイルにて分散し、その分散したデータと2値化処理前の色相データとの差分データを、マゼンタ成分の色相データに加算することによって、互いに重ならず分散性のよいドットを形成するものである。   The halftone process performed in the second embodiment will be described with reference to the flowchart of FIG. In the second embodiment, when halftone processing of hue data of cyan and magenta components having two different hues is performed, data of gradation value “255” among binarized data of cyan components is used with a predetermined profile. The difference data between the dispersed data and the hue data before binarization processing is added to the hue data of the magenta component to form dots that do not overlap each other and have good dispersibility.

この処理が開始されると、まずステップS211にて、入力画像を読み込む処理を行う。ここでは、前述した第1実施例と同様、図13(a)に示した色相の異なる2つの色相データであるシアン(C)成分とマゼンタ(M)成分とが、それぞれ入力バッファ271Caと271Maに取り込まれたものとする。   When this process is started, first, in step S211, a process of reading an input image is performed. Here, as in the first embodiment described above, the cyan (C) component and the magenta (M) component, which are two hue data shown in FIG. 13A, are input to the input buffers 271Ca and 271Ma, respectively. Suppose that it was taken in.

次に、ステップS212にて、シアン成分の階調値を、CC法を用いて2値化処理を行う。ここでの処理によって、前述した第1実施例におけるCC法によるシアン成分の階調値の2値化処理と同様に、シアン出力バッファ273Caに、図22(a)に示した2値化データが格納される。   Next, in step S212, the gradation value of the cyan component is binarized using the CC method. By this processing, the binarized data shown in FIG. 22A is stored in the cyan output buffer 273Ca in the same manner as the binarization processing of the cyan component gradation value by the CC method in the first embodiment described above. Stored.

次に、ステップS213にて、シアンドットの階調値“255”を所定のプロファイルにて分散した分散データに変換する処理を行う。具体的には、ドットが形成される画素位置を基準に、階調値“255”を所定のプロファイルに従って周辺画素に分散させる処理を行う。この処理によって、ドットが形成される位置に対応した1画素のみにドット抑制効果を留めず、その周辺にまでドット抑制効果を広げることになるため、形成される第1ドットと第2ドットが分散される。   Next, in step S213, a process of converting the gradation value “255” of the cyan dot into distributed data distributed according to a predetermined profile is performed. Specifically, the gradation value “255” is distributed to the peripheral pixels according to a predetermined profile with reference to the pixel position where the dot is formed. By this processing, the dot suppression effect is not limited to only one pixel corresponding to the position where the dot is formed, and the dot suppression effect is spread to the periphery thereof. Therefore, the formed first dot and second dot are dispersed. Is done.

本実施例では、所定のプロファイルとして、図14(a)〜(c)に示したフィルタマトリックスを用いることとする。もとより、異なるプロファイルを用いても良い。さらに、本実施例では、生成されたセルごとに、セルを構成する画素数にあわせて異なるプロファイルを用いることとする。例えば、セルを構成する画素数が少ない場合は、図14(a)に示したマトリックスを用い、セルを構成する画素数が多い場合は、図14(b)に示したマトリックスを用いることとする。これによって、第2の色相データについて形成される第2ドットのドット位置が、第1の色相データについて形成される第1ドットの密度に応じて遠ざかるため、ドットの分散性が向上することになる。   In this embodiment, the filter matrix shown in FIGS. 14A to 14C is used as the predetermined profile. Of course, different profiles may be used. Furthermore, in this embodiment, for each generated cell, a different profile is used according to the number of pixels constituting the cell. For example, when the number of pixels constituting the cell is small, the matrix shown in FIG. 14A is used, and when the number of pixels constituting the cell is large, the matrix shown in FIG. 14B is used. . As a result, the dot positions of the second dots formed for the second hue data are moved away according to the density of the first dots formed for the first hue data, so that the dot dispersibility is improved. .

具体的に、シアン出力バッファ273Caにおいて、セルを構成する画素数が13個を示す“G13”が格納されたアドレスを基準に、図14(b)に示したプロファイルが適用されることを図22(b)に示し、セルを構成する画素数が11個を示す“G11”が格納されたアドレスを基準に、図14(a)に示したプロファイルが適用されることを図22(c)に示した。図23(a)は、ステップS213にて分散データに変換処理されたシアン出力バッファ273Cbを示している。   Specifically, in the cyan output buffer 273Ca, the profile shown in FIG. 14B is applied with reference to the address where “G13” indicating 13 pixels constituting the cell is stored. FIG. 22 (c) shows that the profile shown in FIG. 14 (a) is applied with reference to the address where “G11” indicating the number of pixels constituting the cell shown in FIG. Indicated. FIG. 23A shows the cyan output buffer 273Cb converted into distributed data in step S213.

次に、ステップS214にてシアン成分の差分データを算出する処理を行う。差分データは、シアン成分の色相データからシアン成分の分散データを減算して求める。具体的には、シアン入力バッファ271Caのデータからシアン出力バッファ273Cbのデータをマイナス演算して算出する。算出結果は、図23(b)に示したようにシアン出力バッファ273Ccに格納される。   Next, in step S214, processing for calculating difference data of the cyan component is performed. The difference data is obtained by subtracting the cyan component dispersion data from the cyan component hue data. Specifically, the data of the cyan output buffer 273Cb is calculated from the data of the cyan input buffer 271Ca by performing a minus operation. The calculation result is stored in the cyan output buffer 273Cc as shown in FIG.

次に、ステップS215にて、マゼンタ成分に算出されたシアン成分の差分データを加算する処理を行う。図23(c)にマゼンタ成分の階調値が格納されたマゼンタ入力バッファ271Maを示す。このデータに、図23(b)に示した差分データを加算する。加算結果を図24(a)に示す。マゼンタ入力バッファ271Mbには加算データが格納され、この加算データに対して、次のステップS216にて、CC法による2値化処理を行う。   Next, in step S215, processing for adding the difference data of the cyan component calculated to the magenta component is performed. FIG. 23C shows the magenta input buffer 271Ma in which the tone values of the magenta component are stored. The difference data shown in FIG. 23B is added to this data. The addition result is shown in FIG. The added data is stored in the magenta input buffer 271Mb, and binarization processing by the CC method is performed on the added data in the next step S216.

ステップS216にて処理された2値化データを、図24(b)に示す。マゼンタ出力バッファ273Maには、5箇所のアドレスに階調値“255”が格納され、5個のマゼンタドットが形成されることがわかる。一方、シアンドットは、図22(a)に示したように、シアン出力バッファ273Caに格納された階調値“255”のアドレスに対応した画素位置に形成される。従って、2種類のドットは、図24(c)に示したように形成される。   The binarized data processed in step S216 is shown in FIG. It can be seen that the magenta output buffer 273Ma stores the gradation value “255” at five addresses and forms five magenta dots. On the other hand, as shown in FIG. 22A, the cyan dot is formed at a pixel position corresponding to the address of the gradation value “255” stored in the cyan output buffer 273Ca. Accordingly, the two types of dots are formed as shown in FIG.

以上で、第2実施例の処理は終了するが、図24(c)から明らかなように、所定のプロファイルによる分散データ変換処理を行った本実施例によれば、色相の異なる2種類の色相データについて、それぞれ入力された色相データの階調値から形成されるべきドット数5個が形成され、かつドットは重ならず、分散性もよいことが分かる。   Although the processing of the second embodiment is completed as described above, as is apparent from FIG. 24C, according to the present embodiment in which the distributed data conversion processing using a predetermined profile is performed, two types of hues having different hues Regarding the data, it can be seen that the number of dots to be formed is formed from the tone values of the input hue data, and the dots do not overlap and have good dispersibility.

以上説明したように、本実施形態における第1実施例および第2実施例によれば、所定のフィルタあるいは所定のプロファイルを用いて、第1の色相データであるシアン成分の階調値から所定の処理によって算出したデータを、第2の色相データであるマゼンタ成分の階調値に加算することによって、第1ドットであるシアンドットが形成された画素位置を中心に、第2ドットであるマゼンタドットの形成に対する抑制効果を広げることができる。この結果、種類の異なる2つのドットは重ならず、また分散性よく形成されることになる。   As described above, according to the first and second examples of the present embodiment, a predetermined filter or a predetermined profile is used to determine a predetermined value from the tone value of the cyan component that is the first hue data. By adding the data calculated by the processing to the tone value of the magenta component that is the second hue data, the magenta dot that is the second dot is centered on the pixel position where the cyan dot that is the first dot is formed. The inhibitory effect on the formation of can be expanded. As a result, two different types of dots do not overlap and are formed with good dispersibility.

なお、第1実施例および第2実施例では、シアン成分を第1の色相データ、マゼンタ成分を第2の色相データとして扱ったが、逆にマゼンタ成分を第1の色相データとしてもよい。また、イエロー成分を含め、3つの色成分のうちの任意の2つの色成分をそれぞれ第1の色相データと第2の色相データとしても差し支えない。さらに、上記実施例では例えば3つの色成分としたが、ブラック成分などを含め画像出力装置30が出力する複数の色成分のうち、任意の2つの色成分をそれぞれ第1の色相データと第2の色相データとすればよい。   In the first and second embodiments, the cyan component is treated as the first hue data and the magenta component is treated as the second hue data. Conversely, the magenta component may be treated as the first hue data. Also, any two of the three color components including the yellow component may be used as the first hue data and the second hue data, respectively. Further, in the above-described embodiment, for example, three color components are used. However, among the plurality of color components output by the image output apparatus 30 including the black component, any two color components are respectively converted into the first hue data and the second Hue data.

また、上記第1実施例および第2実施例では、2つの色相データについてハーフトーン処理する場合を説明しているが、3つ以上の色相データをハーフトーン処理する場合は、2つの色相データについてのハーフトーン処理を繰り返して実施すればよい。つまり、2つの色相データについてのハーフトーン処理結果を1つの色相データについての処理結果と考え、これを第1の色相データとし、3つ目の色相データを第2の色相データとして考えれば2つの色相データの処理方法と全く同様に扱うことが可能である。   In the first and second embodiments described above, the case where halftone processing is performed on two hue data has been described. However, when halftone processing is performed on three or more hue data, two hue data is processed. This halftone process may be repeated. That is, if the halftone processing result for two hue data is considered as the processing result for one hue data, this is considered as the first hue data, and the third hue data is considered as the second hue data, then two It can be handled in exactly the same way as the hue data processing method.

上述したように、第1実施例および第2実施例によれば、ハーフトーン処理(2値化処理)に、階調値を保存して階調変換を行う処理方法である誤差拡散法またはCC法を用いているため、元の入力画像に比較的忠実に2値化することが可能である。特に、CC法では、量子化に伴って発生する選択画素の誤差データを、他の画素に拡散せず元の選択画素に戻すため、入力画像にほぼ忠実に2値化することが可能である。   As described above, according to the first and second embodiments, halftone processing (binarization processing) is an error diffusion method or CC that is a processing method that performs gradation conversion by storing gradation values. Since the method is used, it is possible to binarize relatively faithfully to the original input image. In particular, in the CC method, error data of a selected pixel that occurs due to quantization is returned to the original selected pixel without being diffused to other pixels, so that it can be binarized almost faithfully to the input image. .

また、同じくCC法によるハーフトーン処理によれば、セルの重心に最も近い画素を選択してセルに組み入れていくため、生成されるセルの形状は重心を中心としておおよそ円形状になる。従って、セルの重心に出力されるドットは、セルのほぼ中央の位置となるためドットが重なる確率は低くなり、分散性のよいドットが形成されることが期待できる。   Similarly, according to the halftone process by the CC method, since the pixel closest to the center of gravity of the cell is selected and incorporated into the cell, the shape of the generated cell is approximately circular around the center of gravity. Therefore, since the dot output to the center of gravity of the cell is located at the approximate center of the cell, the probability of overlapping dots is low, and it can be expected that dots with good dispersibility are formed.

以上、本発明の実施形態について第1実施例および第2実施例にて説明したが、本発明はこうした実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施し得ることは勿論である。以下、変形例を挙げて説明する。   The embodiments of the present invention have been described in the first embodiment and the second embodiment. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the spirit of the present invention. Of course, it can be implemented in various forms. Hereinafter, a modification will be described.

(E)変形例
「第1変形例」
前記実施例では、第1の階調変換処理および第2の階調変換処理について、同じハーフトーン処理方法を用いたが、特にこれに限るものではなく、第1変形例として、第1の階調変換処理方法と第2の階調変換処理方法とが異なるハーフトーン処理方法であるものとしてもよい。
(E) Modification “First Modification”
In the above-described embodiment, the same halftone processing method is used for the first gradation conversion processing and the second gradation conversion processing. However, the present invention is not particularly limited to this. The tone conversion processing method and the second tone conversion processing method may be different halftone processing methods.

例えば、第1の階調変換処理を誤差拡散法を用いて行い、第2の階調変換処理をCC法を用いて行うとしてもよいし、またはその逆であってもよい。図25に、第1実施例において第1の階調変換処理をCC法を用いて行ったのち、第2の階調変換処理を誤差拡散法を用いて行う場合を例示する。   For example, the first gradation conversion process may be performed using the error diffusion method, and the second gradation conversion process may be performed using the CC method, or vice versa. FIG. 25 illustrates a case where the first gradation conversion process is performed using the CC method in the first embodiment, and then the second gradation conversion process is performed using the error diffusion method.

図25(a)は、図19(c)に示した第2の階調変換対象データであるマゼンタ出力バッファ271Mbと同じ状態を示している。前記実施例ではこのあとCC法を用いて2値化処理を行ったが、本変形例では、誤差拡散法を用いて2値化処理を行う。比較のために、実施例と同じく、閾値“45”と図9(b)の重み付け方法を用いる。   FIG. 25A shows the same state as the magenta output buffer 271Mb which is the second gradation conversion target data shown in FIG. In the above embodiment, the binarization process is performed using the CC method, but in this modification, the binarization process is performed using the error diffusion method. For comparison, the threshold value “45” and the weighting method shown in FIG.

誤差拡散法を用いた2値化処理の結果、マゼンタ出力バッファ273Maには、図25(b)に示した2値化データが格納される。従って、この場合に形成されるドットは図25(c)に示す通りとなる。   As a result of the binarization process using the error diffusion method, the binarized data shown in FIG. 25B is stored in the magenta output buffer 273Ma. Accordingly, the dots formed in this case are as shown in FIG.

図25(c)から明らかなように、シアンドット、マゼンタドットともに重ならず分散性よく形成される。また、マゼンタドットは5個形成され、シアンドットと同じ数となっている。誤差拡散法を用いた2値化処理においては、閾値の値が小さいほど、ドットを出力させる画素は、走査順で早い画素になるため、以降マイナスの誤差値を拡散させることになる。一方、CC法は前述の説明のようにマイナス誤差値は発生しない。このため、本変形例では、誤差拡散法による2値化処理の結果、CC法に対してマゼンタドットが1個増えたのである。このように、第1の階調変換処理と第2の階調変換処理との間でハーフトーン処理方法を変更することによって、入力画像に忠実に分散性のよいドットを形成することも可能である。   As is apparent from FIG. 25C, both cyan dots and magenta dots are formed with good dispersibility without overlapping. Further, five magenta dots are formed, and the same number as the cyan dots. In the binarization process using the error diffusion method, the smaller the threshold value, the faster the dot output pixel becomes in the scanning order, and hence a negative error value is diffused thereafter. On the other hand, the CC method does not generate a negative error value as described above. For this reason, in this modification, as a result of the binarization processing by the error diffusion method, one magenta dot is added to the CC method. In this way, by changing the halftone processing method between the first gradation conversion process and the second gradation conversion process, it is possible to form dots with good dispersibility faithfully in the input image. is there.

「第2変形例」
また前記実施例では、ハーフトーン処理方法に誤差拡散法またはCC法を用いたが、とくにこれに限るものではなく、その他の処理方法を用いてもよい。例えば、特許文献1または2で用いられている組織的ディザ法を用いてもよい。前記実施例によるハーフトーン処理方法によれば、前述したように第2ドットの形成に対する抑制効果を、第1ドットが形成された画素のみに留めず拡大しているため、ハーフトーン処理に組織的ディザ法を用いた場合でも、ドットの分散性を向上することが可能となる。
"Second modification"
In the above embodiment, the error diffusion method or the CC method is used as the halftone processing method. However, the present invention is not limited to this, and other processing methods may be used. For example, a systematic dither method used in Patent Document 1 or 2 may be used. According to the halftone processing method according to the embodiment, as described above, since the suppression effect on the formation of the second dots is not limited to the pixels on which the first dots are formed, the halftone processing is systematically performed. Even when the dither method is used, the dispersibility of the dots can be improved.

「第3変形例」
さらに、前記実施例では、シアン成分とマゼンタ成分という異なる2つの色相を持った色相データをハーフトーン処理するものとして説明したが、特に色相が異なる色相データに限ることはなく、ドットの大きさが異なる出力ドットに対応した色相データ、または単位面積当たりの濃度が異なる出力ドットに対応した色相データ、もしくは光反射率の異なる出力ドットに対応した色相データなど、性質の異なる色相データであってもよい。
“Third Modification”
Furthermore, in the above embodiment, the hue data having two different hues of the cyan component and the magenta component has been described as halftone processing. However, the present invention is not limited to hue data having different hues, and the dot size is not limited. It may be hue data with different properties such as hue data corresponding to different output dots, hue data corresponding to output dots having different densities per unit area, or hue data corresponding to output dots having different light reflectance. .

通常、インクジェットプリンタやレーザプリンタにおいては、シアンとマゼンタ成分以外に、イエロー、ブラック成分のインクまたはトナーが用意され、シアンドット、マゼンタドット以外にイエロードット、ブラックドットが形成される。またインクジェットプリンタでは、さらに同じ色相のシアンやマゼンタドットであっても濃度の異なる(薄くなる)ライトシアンドットやライトマゼンタドットが形成される場合もある。あるいは形成されるドットの大きさも1種類ではなく複数種類の場合もある。例えばインクジェットプリンタでは各色成分について3種類の大きさのドットを形成したりする場合がある。また、レーザプリンタではドットの大きさで階調を表す方式(網点方式)を採用する場合があり、例えば4ビットでのパルス幅変調により16種類の大きさのドットを形成する場合がある。あるいは、形成されるドット表面の光反射率に違いを持たせて画像を表現することが行われる場合もある。   In general, in an inkjet printer or a laser printer, inks or toners of yellow and black components are prepared in addition to cyan and magenta components, and yellow dots and black dots are formed in addition to cyan dots and magenta dots. In the inkjet printer, light cyan dots and light magenta dots having different densities (thinning) may be formed even with cyan and magenta dots having the same hue. Alternatively, the size of the dots to be formed may be a plurality of types instead of one. For example, an ink jet printer may form three types of dots for each color component. Further, a laser printer may employ a method (halftone dot method) in which gradation is expressed by the size of a dot. For example, 16 types of dots may be formed by pulse width modulation with 4 bits. Alternatively, there are cases where an image is expressed with a difference in the light reflectance of the formed dot surface.

上述したような性質の異なる色相データに対応したドットを同じ印刷媒体上に形成する場合、形成されるドットに対応するそれぞれの色相データについて前記実施例によるハーフトーン処理を行うことで、それぞれのドットが重ならず、分散性良くドットを形成できる。   When dots corresponding to hue data having different properties as described above are formed on the same print medium, each dot data corresponding to the dots to be formed is subjected to the halftone process according to the above embodiment, so that each dot Do not overlap, and dots can be formed with good dispersibility.

「第4変形例」
前記第1実施例では、第1ドットと第2ドットの明度比に基づいて所定のフィルタマトリックスを用いることとしたが、第4変形例として、第1の階調変換処理をCC法を用いて行った場合、生成されたセルを構成する画素数に応じたフィルタ特性、つまりセルを構成する画素数に応じた大きさのマトリックスを持ったフィルタを用いてデータ処理することとしてもよい。
"Fourth modification"
In the first embodiment, a predetermined filter matrix is used based on the brightness ratio between the first dot and the second dot. As a fourth modification, the first gradation conversion process is performed using the CC method. When it is performed, data processing may be performed using a filter having a filter characteristic corresponding to the number of pixels constituting the generated cell, that is, a matrix having a size corresponding to the number of pixels constituting the cell.

例えば、第1の色相データを2値化した2値化データにおいて、生成されたセルごとに、セルを構成する画素数に基づいて特定されるフィルタマトリックスを用い、それぞれのセルに対応して出力されたドットごとに差分データをデータ処理してもよい。あるいは、セルを構成する画素数の平均値に基づいて特定される1つのフィルタマトリックスを用いて差分データをデータ処理することとしても差し支えない。   For example, in the binarized data obtained by binarizing the first hue data, for each generated cell, a filter matrix specified based on the number of pixels constituting the cell is used, and output is performed corresponding to each cell. The difference data may be processed for each dot. Alternatively, the difference data may be data-processed using one filter matrix specified based on the average value of the number of pixels constituting the cell.

こうすれば、第1の色相データについて出力される第1ドットのドット密度(単位面積当たりの形成ドット数)に応じて差分データのデータ処理に用いるフィルタマトリックスが選択されることになる。この結果、例えば、第1ドットのドット密度が高い場合は、図14(a)に例示したような小さいマトリックスを用い、第1ドットのドット密度が低い場合は、図14(c)に例示したような大きいマトリックスを用いることによって、第2の色相データに対応して出力される第2ドットの位置が、第1ドットの密度に応じて遠ざかり、ドットの分散性が向上することになる。   By doing this, the filter matrix used for the data processing of the difference data is selected according to the dot density (number of dots formed per unit area) of the first dots output for the first hue data. As a result, for example, when the dot density of the first dots is high, a small matrix as illustrated in FIG. 14A is used, and when the dot density of the first dots is low, it is illustrated in FIG. By using such a large matrix, the position of the second dots output corresponding to the second hue data is moved away according to the density of the first dots, and the dispersibility of the dots is improved.

「第5変形例」
また、第5変形例として、前記実施形態における画像処理装置は、レーザプリンタにて画像を再生表示するものとして処理を行うようにしたが、本発明はこれに限定されるものでなく、紙などの印刷媒体に、インクを吐出して印刷する方式のプリンタや、インクを熱転写して印刷する方式のプリンタなどといった種々のプリンタのほか、電子写真あるいはディスプレイなどにて画像を再生表示するものとして処理を行うようにしてもよい。
“Fifth Modification”
Further, as a fifth modification, the image processing apparatus in the above embodiment performs processing as an image reproduced and displayed by a laser printer. However, the present invention is not limited to this, and paper or the like is used. In addition to various printers, such as printers that eject ink onto a print medium and printers that print by thermal transfer of ink, images are reproduced and displayed on an electronic photograph or display. May be performed.

「第6変形例」
また、前記実施形態では、画像処理装置20は画像入力装置10と画像出力装置30とから独立した形態であるものとしたが、プリンタやディスプレイなどの画像出力装置30に組み込まれる形態としてもよいし、画像入力装置10に組み込まれるものとしてもよい。あるいは、プリンタやディスプレイなどの画像出力装置が組み込まれたコピー機やコンピュータ機器、ワープロ、ファックス、携帯電話など種々の電子機器に、前記実施形態における画像処理装置が組み込まれて構成されるようにしてもよい。
“Sixth Modification”
In the above embodiment, the image processing device 20 is independent from the image input device 10 and the image output device 30, but may be incorporated into the image output device 30 such as a printer or a display. The image input device 10 may be incorporated. Alternatively, the image processing apparatus according to the above embodiment is incorporated in various electronic devices such as a copier, a computer device, a word processor, a fax machine, and a mobile phone in which an image output device such as a printer or a display is incorporated. Also good.

本発明が適用される一実施形態におけるシステム全体を示す構成図。The block diagram which shows the whole system in one Embodiment with which this invention is applied. 本実施形態での画像処理装置のハード構成を説明する模式図。1 is a schematic diagram illustrating a hardware configuration of an image processing apparatus according to an embodiment. 本実施形態でのCC法によるハーフトーン処理を説明するフローチャート。The flowchart explaining the halftone process by CC method in this embodiment. CC法によるハーフトーン処理内容を説明するための模式図。The schematic diagram for demonstrating the halftone process content by CC method. CC法によるハーフトーン処理内容を説明するための模式図。The schematic diagram for demonstrating the halftone process content by CC method. RAMの構成と格納されるデータの例を説明する説明図。Explanatory drawing explaining the structure of RAM and the example of the data stored. RAMの構成と格納されるデータの例を説明する説明図。Explanatory drawing explaining the structure of RAM and the example of the data stored. RAMの構成と格納されるデータの例を説明する説明図。Explanatory drawing explaining the structure of RAM and the example of the data stored. 誤差拡散法について画素の走査方法と誤差拡散方法を説明する説明図。Explanatory drawing explaining the scanning method and error diffusion method of a pixel about an error diffusion method. 本実施形態での誤差拡散法によるハーフトーン処理を説明するフローチャート。6 is a flowchart for explaining halftone processing by an error diffusion method in the present embodiment. 誤差拡散法によるハーフトーン処理内容を説明するための模式図。The schematic diagram for demonstrating the halftone process content by an error diffusion method. 第1実施例によるハーフトーン処理を説明するフローチャート。The flowchart explaining the halftone process by 1st Example. 誤差拡散法による第1実施例で、RAMに格納されるデータの例を説明する説明図。Explanatory drawing explaining the example of the data stored in RAM in 1st Example by an error diffusion method. 誤差拡散法による第1実施例で、データ処理のために用いるフィルタマトリックスの例。An example of a filter matrix used for data processing in the first embodiment by the error diffusion method. フィルタマトリックスを用いたデータ処理の過程を説明する説明図。Explanatory drawing explaining the process of the data processing using a filter matrix. 誤差拡散法による第1実施例で、RAMに格納されるデータの例を説明する説明図。Explanatory drawing explaining the example of the data stored in RAM in 1st Example by an error diffusion method. 誤差拡散法による第1実施例で、形成されるドットの例を説明する説明図。Explanatory drawing explaining the example of the dot formed in 1st Example by an error diffusion method. CC法による第1実施例で、RAMに格納されるデータの例を説明する説明図。Explanatory drawing explaining the example of the data stored in RAM in 1st Example by CC method. CC法による第1実施例で、RAMに格納されるデータの例を説明する説明図。Explanatory drawing explaining the example of the data stored in RAM in 1st Example by CC method. CC法による第1実施例で、形成されるドットの例を説明する説明図。Explanatory drawing explaining the example of the dot formed in 1st Example by CC method. 第2実施例によるハーフトーン処理を説明するフローチャート。The flowchart explaining the halftone process by 2nd Example. CC法による第2実施例で、用いるプロファイルを説明する説明図。Explanatory drawing explaining the profile used in 2nd Example by CC method. CC法による第2実施例で、RAMに格納されるデータの例を説明する説明図。Explanatory drawing explaining the example of the data stored in RAM in 2nd Example by CC method. CC法による第2実施例で、形成されるドットの例を説明する説明図。Explanatory drawing explaining the example of the dot formed in 2nd Example by CC method. 第1変形例で、形成されるドットの例を説明する説明図。Explanatory drawing explaining the example of the dot formed in the 1st modification.

符号の説明Explanation of symbols

10…画像入力装置、11…アプリケーション部、12…ラスタライズ部、20…画像処理装置、21…色変換部、22…ハーフトーン処理部、25…入出力I/F、26…CPU、27…RAM、28…ROM、29…ハードディスク、30…画像出力装置、31…パルス幅変調部、35…印刷エンジン、36…レーザドライバ、37…レーザダオード(LD)、CL…セル、CL1…セル、CL2…セル、GC…重心、GC2…重心、MG…未処理画素、271…入力バッファ、271Ca…シアン入力バッファ、271Ma…マゼンタ入力バッファ、271Mb…マゼンタ入力バッファ、272…ワーキングメモリ、273…出力バッファ、273Ca…シアン出力バッファ、273Cb…シアン出力バッファ、273Cc…シアン出力バッファ、273Ma…マゼンタ出力バッファ、DT…CMYの色相データ、DR…所定の階調データ、SH…閾値。
DESCRIPTION OF SYMBOLS 10 ... Image input device, 11 ... Application part, 12 ... Rasterization part, 20 ... Image processing apparatus, 21 ... Color conversion part, 22 ... Halftone processing part, 25 ... Input-output I / F, 26 ... CPU, 27 ... RAM 28 ... ROM, 29 ... hard disk, 30 ... image output device, 31 ... pulse width modulator, 35 ... print engine, 36 ... laser driver, 37 ... laser diode (LD), CL ... cell, CL1 ... cell, CL2 ... cell , GC ... centroid, GC2 ... centroid, MG ... unprocessed pixel, 271 ... input buffer, 271Ca ... cyan input buffer, 271Ma ... magenta input buffer, 271Mb ... magenta input buffer, 272 ... working memory, 273 ... output buffer, 273Ca ... Cyan output buffer, 273Cb ... Cyan output buffer, 273Cc ... Cyan output Buffer, 273Ma ... magenta output buffer, DT ... CMY hue data, DR ... predetermined gradation data, SH ... threshold.

Claims (30)

画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理装置であって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換部と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換部と、
前記第1の階調変換部が階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出部と、
前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算部とを備え、
前記第2の階調変換部は、前記加算データを前記第2の色相データとして前記所定の階調データに階調変換することを特徴とする画像処理装置。
An image processing apparatus that performs gradation conversion of at least two or more types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion unit for gradation-converting the first hue data of the hue data;
A second gradation conversion unit for gradation-converting second hue data of the hue data;
A difference data calculation unit for calculating difference data between the predetermined gradation data subjected to gradation conversion by the first gradation conversion unit and the first hue data;
A data adder that performs data processing on the calculated difference data using a predetermined filter and then adds to the second hue data to obtain added data;
The image processing apparatus according to claim 2, wherein the second gradation conversion unit performs gradation conversion of the addition data as the second hue data into the predetermined gradation data.
請求項1に記載の画像処理装置であって、
前記データ加算部は、前記第1の色相データに応じて出力されるドットと前記第2の色相データに応じて出力されるドットとの明度比によって特定されるフィルタ特性を有した前記所定のフィルタを用いることを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The data adding unit includes the predetermined filter having a filter characteristic specified by a lightness ratio between a dot output according to the first hue data and a dot output according to the second hue data. An image processing apparatus using
請求項1または2に記載の画像処理装置であって、
前記第2の階調変換部は、誤差拡散の手法を用いて前記第2の色相データを階調変換することを特徴とする画像処理装置。
The image processing apparatus according to claim 1, wherein:
The image processing apparatus, wherein the second gradation conversion unit performs gradation conversion on the second hue data using an error diffusion technique.
請求項1または2に記載の画像処理装置であって、
前記第2の階調変換部は、
画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を選択して画素群を順次生成する画素群生成部と、
順次生成される前記画素群内の所定の画素に対して、前記所定の階調データを付与するデータ付与部と、
を備えた画像処理装置。
The image processing apparatus according to claim 1, wherein:
The second gradation conversion unit
A pixel group generation unit that sequentially generates pixel groups by selecting pixels until the sum of gradation values of the second hue data for each pixel is equal to or greater than a predetermined threshold;
A data providing unit that assigns the predetermined gradation data to predetermined pixels in the pixel group that are sequentially generated;
An image processing apparatus.
請求項1または2に記載の画像処理装置であって、
前記第2の階調変換部は、
画素選択のための第1の基準点に基づいて、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、
前記生成された画素群について第2の基準点を決定する基準点決定部と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、
前記画素群生成部は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与部は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする画像処理装置。
The image processing apparatus according to claim 1, wherein:
The second gradation conversion unit
Pixels that generate a pixel group by sequentially selecting pixels based on the first reference point for pixel selection until the sum of the gradation values of the second hue data for each pixel is equal to or greater than a predetermined threshold value A group generator;
A reference point determination unit for determining a second reference point for the generated pixel group;
A data providing unit that provides the predetermined gradation data to a pixel located at the determined second reference point;
The pixel group generation unit updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group,
When the sum of gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold value, the data providing unit is arranged at the predetermined floor on the pixel where the second reference point is located. An image processing apparatus characterized by adding tone data.
請求項4または5に記載の画像処理装置であって、
前記画素群生成部は、前記画素群における画素ごとの前記第2の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すことを特徴とする画像処理装置。
The image processing apparatus according to claim 4 or 5, wherein
The pixel group generation unit, when the sum total of the gradation values of the second hue data for each pixel in the pixel group exceeds the predetermined threshold, the pixel group generation unit Returns to the last selected pixel.
請求項5または6に記載の画像処理装置であって、
前記画素群生成部は、前記第1の基準点に基づいて選択すべき画素が複数存在するとき、選択する画素をランダムに選択することを特徴とする画像処理装置。
The image processing apparatus according to claim 5, wherein:
The pixel group generation unit randomly selects a pixel to be selected when there are a plurality of pixels to be selected based on the first reference point.
請求項5ないし7のいずれか一項に記載の画像処理装置であって、
前記基準点決定部は、前記画素群における画素の位置と画素の階調値とから算出した重心位置を、前記第2の基準点として決定することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 5 to 7,
The image processing apparatus, wherein the reference point determination unit determines a centroid position calculated from a pixel position and a pixel gradation value in the pixel group as the second reference point.
請求項5ないし8のいずれか一項に記載の画像処理装置であって、
前記第1の基準点は、前記画素群における画素の位置と、該画素の前記第2の色相データの階調値とから算出した重心位置であることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 5 to 8,
The image processing apparatus according to claim 1, wherein the first reference point is a barycentric position calculated from a pixel position in the pixel group and a gradation value of the second hue data of the pixel.
請求項1ないし9のいずれか一項に記載の画像処理装置であって、
前記第1の階調変換部は
画素選択のための第3の基準点に基づいて、画素ごとの前記第1の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、
前記生成された画素群について第4の基準点を決定する基準点決定部と、
前記決定された第4の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、
前記画素群生成部は、前記第3の基準点を更新し、当該第3の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与部は前記生成された画素群における前記第1の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第4の基準点が位置する画素に前記所定の階調データを付与することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 1 to 9,
The first gradation conversion unit sequentially selects pixels based on a third reference point for pixel selection until the sum of gradation values of the first hue data for each pixel becomes a predetermined threshold value or more. A pixel group generation unit that selects and generates a pixel group;
A reference point determination unit for determining a fourth reference point for the generated pixel group;
A data providing unit that provides the predetermined gradation data to a pixel located at the determined fourth reference point;
The pixel group generation unit updates the third reference point, generates the pixel group by selecting the pixel based on the third reference point,
When the sum of gradation values of the first hue data in the generated pixel group is greater than or equal to the predetermined threshold, the data providing unit is configured to detect the predetermined floor at a pixel where the fourth reference point is located. An image processing apparatus characterized by adding tone data.
請求項10に記載の画像処理装置であって、
前記画素群生成部は、前記画素群における画素ごとの前記第1の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すことを特徴とする画像処理装置。
The image processing apparatus according to claim 10,
The pixel group generation unit, when a total sum of gradation values of the first hue data for each pixel in the pixel group exceeds the predetermined threshold value, the pixel group generation unit displays the gradation value for the excess. Returns to the last selected pixel.
請求項10または11に記載の画像処理装置であって、
前記データ加算部が用いる前記所定のフィルタは、前記第1の階調変換部が生成する画素群内の画素数に基づいて特定されるフィルタ特性を有することを特徴とする画像処理装置。
The image processing apparatus according to claim 10 or 11,
The image processing apparatus, wherein the predetermined filter used by the data adding unit has a filter characteristic specified based on the number of pixels in a pixel group generated by the first gradation conversion unit.
画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理方法であって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換工程と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換工程と、
前記第1の階調変換工程によって階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出工程と、
前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算工程とを備え、
前記第2の階調変換工程は、
画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成工程と、
前記生成された画素群について第2の基準点を決定する基準点決定工程と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与工程とをさらに備え、
前記画素群生成工程は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与工程は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与する
ことを特徴とする画像処理方法。
An image processing method for gradation-converting at least two types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion step for gradation-converting the first hue data of the hue data;
A second gradation conversion step of converting the second hue data among the hue data;
A difference data calculation step of calculating difference data between the predetermined gradation data subjected to gradation conversion by the first gradation conversion step and the first hue data;
A data addition step of adding the second difference data to the second hue data after performing data processing on the calculated difference data using a predetermined filter;
The second gradation conversion step includes
A pixel group generation step of generating a pixel group by sequentially selecting pixels based on a first reference point for pixel selection until the sum of the gradation values of the addition data for each pixel becomes equal to or greater than a predetermined threshold value When,
A reference point determining step for determining a second reference point for the generated pixel group;
A data adding step of adding the predetermined gradation data to the pixel located at the determined second reference point;
The pixel group generation step updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group.
In the data adding step, when the sum of the gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold, the predetermined floor is positioned on the pixel where the second reference point is located. An image processing method characterized by adding tone data.
画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理プログラムであって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換処理と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換処理と、
前記第1の階調変換処理によって階調変換した前記所定の階調データと、前記第1の色相データとの差分データを算出する差分データ算出処理と、
前記算出された差分データを、所定のフィルタを用いてデータ処理を行ったのち、前記第2の色相データに加算して加算データを求めるデータ加算処理とをコンピュータに実行させ、
前記第2の階調変換処理は、
画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成処理と、
前記生成された画素群について第2の基準点を決定する基準点決定処理と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与処理とをさらに含み、
前記画素群生成処理は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与処理は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与する
ことを特徴とするプログラム。
An image processing program that performs gradation conversion of at least two or more types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion process for gradation-converting the first hue data of the hue data;
A second gradation conversion process for gradation-converting second hue data of the hue data;
Difference data calculation processing for calculating difference data between the predetermined gradation data subjected to gradation conversion by the first gradation conversion processing and the first hue data;
After the calculated difference data is subjected to data processing using a predetermined filter, the computer is caused to execute data addition processing for adding to the second hue data to obtain addition data,
The second gradation conversion process includes:
Pixel group generation processing for generating a pixel group by sequentially selecting pixels based on a first reference point for pixel selection until the sum of the gradation values of the addition data for each pixel becomes equal to or greater than a predetermined threshold value When,
A reference point determination process for determining a second reference point for the generated pixel group;
A data providing process for adding the predetermined gradation data to a pixel located at the determined second reference point;
The pixel group generation process updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group.
The data adding process is performed when the sum of the gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold value, and the predetermined floor is positioned on the pixel where the second reference point is located. A program characterized by adding tone data.
請求項14に記載の画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 14 is recorded. 画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理装置であって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換部と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換部と、
前記第1の階調変換部が階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換部と、
変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出部と、
前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算部とを備え、
前記第2の階調変換部は、前記加算データを前記第2の色相データとして前記所定の階調データに階調変換することを特徴とする画像処理装置。
An image processing apparatus that performs gradation conversion of at least two or more types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion unit for gradation-converting the first hue data of the hue data;
A second gradation conversion unit for gradation-converting second hue data of the hue data;
Dot profile conversion that converts the predetermined gradation data that has undergone gradation conversion by the first gradation conversion unit into distributed data that is distributed to peripheral pixels having a pixel to which a dot is output as a reference point according to a predetermined profile And
A difference data calculation unit for calculating difference data between the converted dispersion data and the first hue data;
A data addition unit for adding the calculated difference data to the second hue data to obtain addition data;
The image processing apparatus according to claim 2, wherein the second gradation conversion unit performs gradation conversion of the addition data as the second hue data into the predetermined gradation data.
請求項16に記載の画像処理装置であって、
前記第2の階調変換部は、誤差拡散の手法を用いて前記第2の色相データを階調変換することを特徴とする画像処理装置。
The image processing apparatus according to claim 16,
The image processing apparatus, wherein the second gradation conversion unit performs gradation conversion on the second hue data using an error diffusion technique.
請求項16に記載の画像処理装置であって、
前記第2の階調変換部は、
画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を選択して画素群を順次生成する画素群生成部と、
順次生成される前記画素群内の所定の画素に対して、前記所定の階調データを付与するデータ付与部と、
をさらに備えた画像処理装置。
The image processing apparatus according to claim 16,
The second gradation conversion unit
A pixel group generation unit that sequentially generates pixel groups by selecting pixels until the sum of gradation values of the second hue data for each pixel is equal to or greater than a predetermined threshold;
A data providing unit that assigns the predetermined gradation data to predetermined pixels in the pixel group that are sequentially generated;
An image processing apparatus further comprising:
請求項16に記載の画像処理装置であって、
前記第2の階調変換部は、
画素選択のための第1の基準点に基づいて、画素ごとの前記第2の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、
前記生成された画素群について第2の基準点を決定する基準点決定部と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とをさらに備え、
前記画素群生成部は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与部は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする画像処理装置。
The image processing apparatus according to claim 16,
The second gradation conversion unit
Pixels that generate a pixel group by sequentially selecting pixels based on the first reference point for pixel selection until the sum of the gradation values of the second hue data for each pixel is equal to or greater than a predetermined threshold value A group generator;
A reference point determination unit for determining a second reference point for the generated pixel group;
A data adding unit for adding the predetermined gradation data to the pixel located at the determined second reference point;
The pixel group generation unit updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group,
When the sum of gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold value, the data providing unit is arranged at the predetermined floor on the pixel where the second reference point is located. An image processing apparatus characterized by adding tone data.
請求項18または19に記載の画像処理装置であって、
前記画素群生成部は、前記画素群における画素ごとの前記第2の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すことを特徴とする画像処理装置。
The image processing apparatus according to claim 18 or 19,
The pixel group generation unit, when the sum total of the gradation values of the second hue data for each pixel in the pixel group exceeds the predetermined threshold, the pixel group generation unit Returns to the last selected pixel.
請求項19または20に記載の画像処理装置であって、
前記画素群生成部は、前記第1の基準点に基づいて選択すべき画素が複数存在するとき、選択する画素をランダムに選択することを特徴とする画像処理装置。
The image processing apparatus according to claim 19 or 20,
The pixel group generation unit randomly selects a pixel to be selected when there are a plurality of pixels to be selected based on the first reference point.
請求項19ないし21のいずれか一項に記載の画像処理装置であって、
前記基準点決定部は、前記画素群における画素の位置と画素の階調値とから算出した重心位置を、前記第2の基準点として決定することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 19 to 21,
The image processing apparatus, wherein the reference point determination unit determines a centroid position calculated from a pixel position and a pixel gradation value in the pixel group as the second reference point.
請求項19ないし22のいずれか一項に記載の画像処理装置であって、
前記第1の基準点は、前記画素群における画素の位置と、該画素の前記第2の色相データの階調値とから算出した重心位置であることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 19 to 22,
The image processing apparatus according to claim 1, wherein the first reference point is a barycentric position calculated from a pixel position in the pixel group and a gradation value of the second hue data of the pixel.
請求項16ないし23のいずれか一項に記載の画像処理装置であって、
前記第1の階調変換部は
画素選択のための第3の基準点に基づいて、画素ごとの前記第1の色相データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成部と、
前記生成された画素群について第4の基準点を決定する基準点決定部と、
前記決定された第4の基準点に位置する画素に前記所定の階調データを付与するデータ付与部とを備え、
前記画素群生成部は、前記第3の基準点を更新し、当該第3の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与部は前記生成された画素群における前記第1の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第4の基準点が位置する画素に前記所定の階調データを付与することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 16 to 23, wherein:
The first gradation conversion unit sequentially selects pixels based on a third reference point for pixel selection until the sum of gradation values of the first hue data for each pixel becomes a predetermined threshold value or more. A pixel group generation unit that selects and generates a pixel group;
A reference point determination unit for determining a fourth reference point for the generated pixel group;
A data providing unit that provides the predetermined gradation data to a pixel located at the determined fourth reference point;
The pixel group generation unit updates the third reference point, generates the pixel group by selecting the pixel based on the third reference point,
When the sum of gradation values of the first hue data in the generated pixel group is greater than or equal to the predetermined threshold, the data providing unit is configured to detect the predetermined floor at a pixel where the fourth reference point is located. An image processing apparatus characterized by adding tone data.
請求項24に記載の画像処理装置であって、
前記画素群生成部は、前記画素群における画素ごとの前記第1の色相データの階調値の総和が前記所定の閾値を超えたとき、超えた分の前記階調値を前記画素群生成部が最後に選択した画素に戻すことを特徴とする画像処理装置。
The image processing apparatus according to claim 24, wherein
The pixel group generation unit, when a total sum of gradation values of the first hue data for each pixel in the pixel group exceeds the predetermined threshold value, the pixel group generation unit displays the gradation value for the excess. Returns to the last selected pixel.
請求項24または25に記載の画像処理装置であって、
前記ドットプロファイル変換部は、前記第1の階調変換部が生成した画素群ごとに、該画素群内の画素数に基づいて特定される前記所定のプロファイルに従って、前記所定の階調データを分散することを特徴とする画像処理装置。
The image processing apparatus according to claim 24 or 25, wherein:
The dot profile conversion unit distributes the predetermined gradation data for each pixel group generated by the first gradation conversion unit according to the predetermined profile specified based on the number of pixels in the pixel group. An image processing apparatus.
画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理方法であって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換工程と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換工程と、
前記第1の階調変換工程によって階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換工程と、
変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出工程と、
前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算工程とを備え、
前記第2の階調変換工程は、
画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成工程と、
前記生成された画素群について第2の基準点を決定する基準点決定工程と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与工程とをさらに備え、
前記画素群生成工程は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与工程は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とする画像処理方法。
An image processing method for gradation-converting at least two types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion step for gradation-converting the first hue data of the hue data;
A second gradation conversion step of converting the second hue data among the hue data;
Dot profile conversion for converting the predetermined gradation data subjected to gradation conversion in the first gradation conversion step into distributed data distributed in peripheral pixels having a pixel to which a dot is output as a reference point according to a predetermined profile Process,
A difference data calculation step of calculating difference data between the converted dispersion data and the first hue data;
A data addition step of adding the calculated difference data to the second hue data to obtain addition data;
The second gradation conversion step includes
A pixel group generation step of generating a pixel group by sequentially selecting pixels based on a first reference point for pixel selection until the sum of the gradation values of the addition data for each pixel becomes equal to or greater than a predetermined threshold value When,
A reference point determining step for determining a second reference point for the generated pixel group;
A data adding step of adding the predetermined gradation data to the pixel located at the determined second reference point;
The pixel group generation step updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group.
In the data adding step, when the sum of the gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold, the predetermined floor is positioned on the pixel where the second reference point is located. An image processing method characterized by adding tone data.
画素ごとに、多階調値で表された性質の異なる少なくとも2種類以上の色相データを、ドットを出力するための所定の階調データに階調変換する画像処理プログラムであって、
前記色相データのうち第1の色相データを階調変換する第1の階調変換処理と、
前記色相データのうち第2の色相データを階調変換する第2の階調変換処理と、
前記第1の階調変換処理によって階調変換した前記所定の階調データを、所定のプロファイルに従って、ドットが出力される画素を基準点とする周辺画素に分散した分散データに変換するドットプロファイル変換処理と、
変換された前記分散データと前記第1の色相データとの差分データを算出する差分データ算出処理と、
前記算出された差分データを、前記第2の色相データに加算して加算データを求めるデータ加算処理とをコンピュータに実行させ、
前記第2の階調変換処理は、
画素選択のための第1の基準点に基づいて、画素ごとの前記加算データの階調値の総和が、所定の閾値以上となるまで画素を順次選択して画素群を生成する画素群生成処理と、
前記生成された画素群について第2の基準点を決定する基準点決定処理と、
前記決定された第2の基準点に位置する画素に前記所定の階調データを付与するデータ付与処理とをさらに含み、
前記画素群生成処理は、前記第1の基準点を更新して当該第1の基準点に基づいて前記画素を選択して前記画素群を生成し、
前記データ付与処理は前記生成された画素群における前記第2の色相データの階調値の総和が前記所定の閾値以上となったとき、前記第2の基準点が位置する画素に前記所定の階調データを付与することを特徴とするプログラム。
An image processing program that performs gradation conversion of at least two or more types of hue data having different properties represented by multi-gradation values into predetermined gradation data for outputting dots for each pixel,
A first gradation conversion process for gradation-converting the first hue data of the hue data;
A second gradation conversion process for gradation-converting second hue data of the hue data;
Dot profile conversion that converts the predetermined gradation data that has undergone gradation conversion by the first gradation conversion processing into distributed data that is distributed to peripheral pixels having a pixel to which a dot is output as a reference point according to a predetermined profile Processing,
Difference data calculation processing for calculating difference data between the converted dispersion data and the first hue data;
Causing the computer to execute a data addition process for adding the calculated difference data to the second hue data to obtain addition data;
The second gradation conversion process includes:
Pixel group generation processing for generating a pixel group by sequentially selecting pixels based on a first reference point for pixel selection until the sum of the gradation values of the addition data for each pixel becomes equal to or greater than a predetermined threshold value When,
A reference point determination process for determining a second reference point for the generated pixel group;
A data providing process for adding the predetermined gradation data to a pixel located at the determined second reference point;
The pixel group generation process updates the first reference point, selects the pixel based on the first reference point, and generates the pixel group.
The data adding process is performed when the sum of the gradation values of the second hue data in the generated pixel group is equal to or greater than the predetermined threshold value, and the predetermined floor is positioned on the pixel where the second reference point is located. A program characterized by adding tone data.
請求項28に記載の画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 28 is recorded. 請求項1ないし29のいずれか一項に記載の画像処理装置、画像処理方法、画像処理プログラムないし記録媒体であって、
前記性質の異なる少なくとも2種類以上の色相データは、それぞれ
(1)ドットの大きさが異なる出力ドットに対応した色相データ、
(2)単位面積当たりの濃度が異なる出力ドットに対応した色相データ、
(3)色相が異なる出力ドットに対応した色相データ、
(4)光反射率の異なる出力ドットに対応した色相データ、
のうち少なくとも1つを満たす色相データであることを特徴とする画像処理装置、画像処理方法、画像処理プログラムないし記録媒体。

An image processing apparatus, an image processing method, an image processing program, or a recording medium according to any one of claims 1 to 29,
At least two or more types of hue data having different properties are: (1) hue data corresponding to output dots having different dot sizes;
(2) Hue data corresponding to output dots having different densities per unit area;
(3) Hue data corresponding to output dots with different hues,
(4) Hue data corresponding to output dots having different light reflectivities,
An image processing apparatus, an image processing method, an image processing program, or a recording medium, characterized by being hue data satisfying at least one of them.

JP2004156318A 2004-05-26 2004-05-26 Image processor, processing method and program, and recording medium with the program stored Withdrawn JP2005341142A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004156318A JP2005341142A (en) 2004-05-26 2004-05-26 Image processor, processing method and program, and recording medium with the program stored

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004156318A JP2005341142A (en) 2004-05-26 2004-05-26 Image processor, processing method and program, and recording medium with the program stored

Publications (1)

Publication Number Publication Date
JP2005341142A true JP2005341142A (en) 2005-12-08

Family

ID=35494205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004156318A Withdrawn JP2005341142A (en) 2004-05-26 2004-05-26 Image processor, processing method and program, and recording medium with the program stored

Country Status (1)

Country Link
JP (1) JP2005341142A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007333889A (en) * 2006-06-13 2007-12-27 Canon Inc Image forming apparatus and image forming method
JP2011109636A (en) * 2009-10-21 2011-06-02 Kyocera Mita Corp Electronic apparatus, and image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007333889A (en) * 2006-06-13 2007-12-27 Canon Inc Image forming apparatus and image forming method
JP2011109636A (en) * 2009-10-21 2011-06-02 Kyocera Mita Corp Electronic apparatus, and image processing program

Similar Documents

Publication Publication Date Title
JP4165570B2 (en) Image processing apparatus, image processing method, and image processing program
JP2000333010A (en) Gradation dependent type error spread half tone processing method
JP4605782B2 (en) Laser printing device using dual halftone
JP6639247B2 (en) Image processing apparatus, image processing method, and program
JP7005314B2 (en) Image processing equipment, image processing methods, and programs
US7474441B2 (en) Image processing device, method, program and recording medium recording the program
US7315398B2 (en) Multi-level error diffusion with color image data
JP4742871B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the program
JP2005341142A (en) Image processor, processing method and program, and recording medium with the program stored
US10404892B2 (en) Image forming apparatus for outputting a halftone image and image forming method
JP5678501B2 (en) Image processing apparatus and image processing method
JP2020082694A (en) Dither matrix generation device and generation method, and image processing device, image processing method, and program using the dither matrix
JP2012165192A (en) Printer and printing method
JP4337670B2 (en) Image processing apparatus, image processing method, and program
JP6907034B2 (en) Image processing equipment, image processing methods and programs
JP2007194688A (en) Image processor, image processing method, image processing program and recording medium with the program recorded thereon
JP2005117642A (en) Halftoning method, image processor, image processing method, and program
JP2005318402A (en) Image processing device, method and program, and recording medium recorded with program
JP2005311414A (en) Apparatus, method and program for image processing and recording medium recording this program
JP2006005634A (en) Device, method, and program for image processing, and recording medium where the program is recorded
JP2006025217A (en) Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program
JP3896982B2 (en) Image processing apparatus, method, program, and recording medium recording the program
JP2001069349A (en) Picture processing method, picture processor and recording medium
JP4492723B2 (en) Image processing apparatus, image processing method, and image processing program
JP3928576B2 (en) Image processing apparatus, method, program, and recording medium recording the program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070807