Nothing Special   »   [go: up one dir, main page]

JP2008067259A - Image processing apparatus, image output device, image processing method, image processing program, and recording medium with the program recorded thereon - Google Patents

Image processing apparatus, image output device, image processing method, image processing program, and recording medium with the program recorded thereon Download PDF

Info

Publication number
JP2008067259A
JP2008067259A JP2006245169A JP2006245169A JP2008067259A JP 2008067259 A JP2008067259 A JP 2008067259A JP 2006245169 A JP2006245169 A JP 2006245169A JP 2006245169 A JP2006245169 A JP 2006245169A JP 2008067259 A JP2008067259 A JP 2008067259A
Authority
JP
Japan
Prior art keywords
pixel group
pixel
gradation value
output
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006245169A
Other languages
Japanese (ja)
Other versions
JP4702234B2 (en
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 JP2006245169A priority Critical patent/JP4702234B2/en
Publication of JP2008067259A publication Critical patent/JP2008067259A/en
Application granted granted Critical
Publication of JP4702234B2 publication Critical patent/JP4702234B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color, Gradation (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus, image forming apparatus, image output device, image processing method, image processing program, and recording medium with the program thereon in which halftone processing improved in edge reproducibility can be performed at high speed. <P>SOLUTION: A halftone processing unit 320 comprises a basic cell setting section 321 for dividing an image region of input image data into basic cells each including a predetermined region; an edge discriminating section 323 for discriminating whether a basic cell includes an edge regarding a gradation value change or not; a small cell setting section 325 which successively takes pixels into each small cell until a gradation value total within the small cell reaches a predetermined target gradation value, and divides a basic cell discriminated to include an edge into small cells; and a gradation value imparting section 326 which imparts an output gradation value to a pixel based on a position of the center of gravity of the gradation value within the cell for each pixel group of the basic cell discriminated not to include an edge and the small cell. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

ハーフトーン処理を行う画像処理装置、画像出力装置、画像処理方法、画像処理プログラム、およびそのプログラムを記録した記録媒体に関する。   The present invention relates to an image processing apparatus that performs halftone processing, an image output apparatus, an image processing method, an image processing program, and a recording medium on which the program is recorded.

従来、プリンタなどでは、各画素ごとに多値の階調数で表現されるビットマップ形式の入力画像データを、ドットに対応する階調数(例えば、ドットの有無に対応する2値)の網点で表現した出力画像データに変換し、出力画像データに従ってドットを形成することにより印刷を行っている。このとき、多値の階調データを網点データに変換する量子化処理をハーフトーン処理という。ハーフトーン処理の代表的な例としては、ディザ法や誤差拡散法などがある。   2. Description of the Related Art Conventionally, in a printer or the like, a bitmap format input image data expressed by a multi-value gradation number for each pixel is converted into a network having a gradation number corresponding to a dot (for example, binary corresponding to the presence or absence of a dot). Printing is performed by converting to output image data expressed by dots and forming dots according to the output image data. At this time, the quantization processing for converting multi-value gradation data into halftone data is called halftone processing. Typical examples of halftone processing include a dither method and an error diffusion method.

また、ハーフトーン処理の一手法として、入力画像データの画像領域を、複数の画素の集まりから構成される画素群(以下、「セル」ともいう)に分割して、セルごとに出力階調値を付与する方法も知られている。   Also, as one method of halftone processing, the image area of the input image data is divided into pixel groups (hereinafter also referred to as “cells”) composed of a collection of a plurality of pixels, and the output gradation value for each cell. A method of imparting is also known.

例えば、特許文献1には、入力画像データの画像領域に、予め決められた形状のセルを設定し、セル内の階調値の重心位置に近い画素から順番にセル内の階調値合計に対応する数の画素に出力階調値を付与し、出力階調値に応じてドットを形成することによってドットサイズ制御を行う技術が開示されている。このように、ドットサイズ制御に加えて、重心位置によるドット位置制御を行うハーフトーン処理方法を、以下、「AAM法(Advanced AM法)」という。   For example, in Patent Document 1, a cell having a predetermined shape is set in an image area of input image data, and the gradation value in the cell is summed in order from a pixel close to the gravity center position of the gradation value in the cell. A technique is disclosed in which dot size control is performed by assigning output gradation values to a corresponding number of pixels and forming dots in accordance with the output gradation values. A halftone processing method that performs dot position control based on the center of gravity in addition to dot size control is hereinafter referred to as “AAM method (Advanced AM method)”.

また、特許文献2には、セル内の階調値合計が所定の目標階調値に達するまで、セル内階調値の重心位置に近い画素を次々に取り込んでセルを拡大し、拡大したセルの重心位置に出力階調値を付与する技術が開示されている。この出力階調値に応じてドットを形成すれば、重心位置から略円形状にセルが拡大して、拡大したセルの重心位置にドットが形成されるため、ドット間距離のばらつきを抑えることが可能である。したがって、ドット分散性の良い、画質に優れた画像を得ることができる。このときのハーフトーン処理方法を、以下、「CC法(Circular Cell法)」という。   Further, in Patent Document 2, pixels that are close to the centroid position of the in-cell tone value are successively taken in until the total tone value in the cell reaches a predetermined target tone value, and the cell is enlarged. A technique for giving an output gradation value to the position of the center of gravity is disclosed. If dots are formed according to this output gradation value, the cells are enlarged from the center of gravity to a substantially circular shape, and dots are formed at the center of gravity of the enlarged cells, thereby suppressing variations in inter-dot distance. Is possible. Therefore, it is possible to obtain an image with good dot dispersibility and excellent image quality. The halftone processing method at this time is hereinafter referred to as “CC method (Circular Cell method)”.

国際公開第2005/109851号パンフレットInternational Publication No. 2005/109851 Pamphlet 特開2004−363639号公報Japanese Patent Laid-Open No. 2004-363639

しかしながら、特許文献1に記載のAAM法によれば、セル形状が予め決められており、セルの重心にドットが形成されるので、画像出力時の解像性は一定である。このため、階調値が急激に変化するエッジ部分を適切な解像性で再現することは困難であり、エッジの再現性が低下するという課題がある。   However, according to the AAM method described in Patent Document 1, since the cell shape is determined in advance and dots are formed at the center of gravity of the cell, the resolution at the time of image output is constant. For this reason, it is difficult to reproduce the edge portion where the gradation value changes rapidly with an appropriate resolution, and there is a problem that the reproducibility of the edge is lowered.

また、特許文献2に記載のCC法によれば、セルに新たな画素を取り込んでセルを拡大するたびに階調値合計や重心位置の更新演算を行うため、処理に要する時間が長くなってしまうという課題がある。   In addition, according to the CC method described in Patent Document 2, the time required for processing becomes longer because the gradation value sum and the gravity center position are updated every time a new pixel is taken into the cell and the cell is enlarged. There is a problem of end.

そこで、本発明は、エッジ再現性に優れたハーフトーン処理を高速に行うことができる画像処理装置、画像出力装置、画像処理方法、画像処理プログラム、およびそのプログラムを記録した記録媒体を提供することを目的とする。   Accordingly, the present invention provides an image processing apparatus, an image output apparatus, an image processing method, an image processing program, and a recording medium on which the program is recorded, which can perform halftone processing with excellent edge reproducibility at high speed. With the goal.

上記目的を達成する本発明の画像処理装置は、多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換する画像処理装置であって、入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定部と、第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定部と、エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定部と、エッジを含んでいないと判定された第1の画素群および第2の画素群の各画素群に対して、画素群内の階調値の重心位置に基づく画素に出力階調値を付与する階調値付与部と、を備えることを特徴とする。   An image processing apparatus according to the present invention that achieves the above object is configured of a plurality of pixels, and input image data having a gradation value for each pixel is converted into two or more levels according to an output gradation value given to each pixel. Is a first pixel group setting unit that sets a plurality of first pixel groups by dividing an image area of input image data into predetermined areas. And an edge determination unit that determines whether or not the first pixel group includes an edge related to a gradation value change, and an image area of the first pixel group that is determined to include an edge, A second pixel group setting unit that sets the second pixel group, and a first pixel group and a second pixel group that are determined not to include an edge. A tone value that gives an output tone value to a pixel based on the barycentric position of the tone value Characterized in that it comprises a given unit.

この構成によれば、入力画像データの画像領域を区画して、予め決められた領域の第1の画素群を設定し、エッジを含んでいない第1の画素群については、第1の画素群の重心位置に基づく画素に出力階調値が付与される。一方、エッジを含む第1の画素群はさらに区画して複数の第2の画素群を設定し、第2の画素群の重心位置に基づく画素に出力階調値が付与される。第2の画素群は区画する前の第1の画素群より小さくなるので、入力画像データの画像領域のうちエッジを含む領域について、出力階調値が付与される画素間の距離が小さくなり、解像性が高まる。したがって、特許文献1に記載の技術に比べても、エッジの再現性に優れた出力画像データを得ることができる。また、エッジを含んでいない画像領域については、予め決められた領域に区画して第1の画素群を設定するようにしているので、第1の画素群を設定するために要する演算量は少ない。以上のことから、本発明によれば、エッジの再現性に優れたハーフトーン処理を高速に行うことが可能となる。   According to this configuration, the first pixel group of the predetermined area is set by dividing the image area of the input image data, and the first pixel group is set for the first pixel group that does not include the edge. An output gradation value is assigned to the pixel based on the barycentric position. On the other hand, the first pixel group including the edge is further divided to set a plurality of second pixel groups, and an output gradation value is given to the pixel based on the barycentric position of the second pixel group. Since the second pixel group is smaller than the first pixel group before partitioning, the distance between the pixels to which the output gradation value is given is reduced for the area including the edge in the image area of the input image data, Increases resolution. Therefore, output image data excellent in edge reproducibility can be obtained as compared with the technique described in Patent Document 1. In addition, since the first pixel group is set by dividing the image area that does not include the edge into a predetermined area, the amount of calculation required to set the first pixel group is small. . From the above, according to the present invention, halftone processing with excellent edge reproducibility can be performed at high speed.

例えば、本発明の画像処理装置により得られた出力画像データを用いて、出力階調値に応じてドットを形成するようにすれば、画質に優れた画像を出力することができる。   For example, if dots are formed according to the output gradation value using the output image data obtained by the image processing apparatus of the present invention, an image with excellent image quality can be output.

また、本発明の画像処理装置において、第2の画素群設定部は、エッジを含むと判定された第1の画素群の画像領域において、第2の画素群内の階調値合計が所定の目標階調値に達するまで第2の画素群に画素を次々に取り込んで、第2の画素群を設定することが好ましい。   Further, in the image processing device of the present invention, the second pixel group setting unit has a predetermined total tone value in the second pixel group in the image area of the first pixel group determined to include an edge. It is preferable to set the second pixel group by successively taking pixels into the second pixel group until the target gradation value is reached.

この構成によれば、第2の画素群には所定の目標階調値分の画素を取り込むことにより、第2の画素群の大きさのばらつきが抑えられ、出力階調値が付与される画素間の距離のばらつきが抑制される。したがって、エッジを含む画像領域について出力階調値が付与される画素位置の分散性が向上し、エッジの再現性により優れたハーフトーン処理を行うことができる。   According to this configuration, by taking in pixels for a predetermined target gradation value in the second pixel group, variation in the size of the second pixel group is suppressed, and a pixel to which an output gradation value is given. Variation in the distance between them is suppressed. Therefore, the dispersibility of the pixel position to which the output gradation value is given for the image area including the edge is improved, and halftone processing that is superior in edge reproducibility can be performed.

なお、目標階調値は、ドット形成が安定しやすいドットサイズに対応する値に設定することが望ましい。このようにすれば、ドット形成が安定し、階調安定性により優れた画像を出力することができる。   The target gradation value is desirably set to a value corresponding to a dot size at which dot formation is easy to stabilize. In this way, dot formation is stable, and an image with superior gradation stability can be output.

また、本発明の画像処理装置において、第2の画素群設定部は、第2の画素群への取り込みが未処理の画素のうち、第2の画素群内の階調値の重心位置に最も近い画素を取り込むことが好ましい。   In the image processing apparatus of the present invention, the second pixel group setting unit is located at the center of gravity of the gradation value in the second pixel group, among the pixels that have not yet been captured into the second pixel group. It is preferable to capture near pixels.

この構成によれば、第2の画素群内の階調値の重心位置に近い画素を取り込むことにより、第2の画素群は重心位置から略円形状に拡大する可能性が高くなるので、出力階調値が付与される画素間の距離のばらつきが抑制される。したがって、エッジの再現性により優れたハーフトーン処理を行うことができる。   According to this configuration, since the second pixel group is likely to expand from the centroid position to a substantially circular shape by capturing pixels close to the centroid position of the gradation value in the second pixel group, the output Variation in distance between pixels to which gradation values are applied is suppressed. Therefore, it is possible to perform halftone processing that is more excellent in edge reproducibility.

また、本発明の画像処理装置において、第2の画素群設定部は、第2の画素群に画素を取り込む際、当該第2の画素群を含む第1の画素群内のうち第2の画素群への取り込みが未処理の画素、および出力階調値の付与が未処理の第1の画素群に含まれる画素のうち、第2の画素群内の階調値の重心位置に最も近い画素を取り込むことが好ましい。   In the image processing device of the present invention, when the second pixel group setting unit captures a pixel in the second pixel group, the second pixel group in the first pixel group including the second pixel group. Among the pixels included in the first pixel group that have not been processed into the group and that have not been processed to give the output gradation value, the pixel that is closest to the gravity center position of the gradation value in the second pixel group Is preferably incorporated.

この構成によれば、重心位置に近ければ隣接する第1の画素群からも画素を取り込むので、特に第1の画素群間の境界部分において、第2の画素群の形状に偏りが生じる可能性が低くなる。これにより、出力階調値が付与される画素の位置についての偏りが抑制されるので、エッジの再現性により優れたハーフトーン処理を行うことができる。   According to this configuration, if the pixel is close to the position of the center of gravity, the pixels are also taken in from the adjacent first pixel group. Therefore, there is a possibility that the shape of the second pixel group may be biased particularly at the boundary portion between the first pixel groups. Becomes lower. As a result, the bias with respect to the position of the pixel to which the output gradation value is applied is suppressed, so that it is possible to perform halftone processing that is superior in edge reproducibility.

また、本発明の画像処理装置において、第1の画素群内の階調値合計が所定の閾値より小さいハイライト領域であるか否かを判定するハイライト判定部と、ハイライト領域と判定された第1の画素群については、当該第1の画素群内の階調値合計が所定の目標階調値に達するまで周辺の画素を次々に取り込んで、第1の画素群を拡大する画素群拡大部と、をさらに備えることが好ましい。   In the image processing apparatus of the present invention, a highlight determination unit that determines whether or not the total tone value in the first pixel group is a highlight region that is smaller than a predetermined threshold, and a highlight region is determined. As for the first pixel group, the neighboring pixel groups are successively taken in until the total gradation value in the first pixel group reaches a predetermined target gradation value, and the first pixel group is expanded. It is preferable to further include an enlarged portion.

この構成によれば、ハイライト領域と判定された第1の画素群に対しては、目標階調値に達するまで周辺の画素を取り込んで、第1の画素群を拡大するので、目標階調値に対応した出力階調値を付与することができる。これにより、階調値の小さいハイライト領域についても、目標階調値に対応した出力階調値を有する出力画像データを得ることができる。この出力画像データによれば、ハイライト領域の階調安定性に優れた画像を出力することが可能となる。   According to this configuration, for the first pixel group determined to be the highlight area, the surrounding pixels are captured until the target gradation value is reached, and the first pixel group is enlarged, so that the target gradation An output gradation value corresponding to the value can be assigned. Accordingly, output image data having an output gradation value corresponding to the target gradation value can be obtained even in a highlight region having a small gradation value. According to this output image data, it is possible to output an image having excellent gradation stability in the highlight region.

また、本発明の画像処理装置において、画素群拡大部は、ハイライト領域と判定された第1の画素群に画素を取り込む際、当該第1の画素群に隣接する第1の画素群の画素のうち、ハイライト領域と判定された第1の画素群内の階調値の重心位置に最も近い画素を取り込むことが好ましい。   In the image processing apparatus of the present invention, when the pixel group enlargement unit captures a pixel in the first pixel group determined to be the highlight region, the pixel of the first pixel group adjacent to the first pixel group. Among them, it is preferable to capture the pixel closest to the center of gravity position of the gradation value in the first pixel group determined as the highlight region.

この構成によれば、第1の画素群内の階調値の重心位置に近い画素を、隣接する第1の画素群から取り込むことにより、第1の画素群は重心位置から略円形状に拡大する可能性が高くなるので、各第1の画素群において、出力階調値が付与される画素間の距離のばらつきが抑制される。したがって、ハイライト領域の画質により優れたハーフトーン処理を行うことができる。   According to this configuration, the first pixel group is enlarged from the centroid position to a substantially circular shape by taking in the pixels close to the centroid position of the gradation value in the first pixel group from the adjacent first pixel group. Therefore, in each first pixel group, the variation in the distance between the pixels to which the output gradation value is given is suppressed. Therefore, it is possible to perform halftone processing that is superior to the image quality in the highlight area.

また、本発明の画像処理装置において、階調値付与部は、エッジを含んでいないと判定された第1の画素群および第2の画素群の各画素群に対して、画素群内の階調値の重心位置に基づく画素に当該画素群内の階調値合計に応じた出力階調値を付与することが好ましい。   In the image processing apparatus according to the present invention, the gradation value assigning unit is configured to store a level in the pixel group for each of the first pixel group and the second pixel group determined not to include an edge. It is preferable to give an output gradation value corresponding to the total gradation value in the pixel group to the pixel based on the barycentric position of the tone value.

この構成によれば、画素群内の階調値合計に応じた出力階調値が画素群の重心位置に付与されるので、入力画像データの階調再現性に優れたハーフトーン処理を行うことができる。   According to this configuration, since the output gradation value corresponding to the total gradation value in the pixel group is given to the barycentric position of the pixel group, halftone processing with excellent gradation reproducibility of the input image data is performed. Can do.

また、本発明の画像処理装置において、階調値付与部は、画素群内の階調値合計が1画素に付与できる出力階調値の最大値を超えている場合、当該画素群内の階調値の重心位置から近い画素より順番に出力階調値を付与するようにして、画素群内の階調値合計に対応する分の出力階調値を画素群に対して付与することが好ましい。   Further, in the image processing apparatus of the present invention, the gradation value assigning unit, when the sum of the gradation values in the pixel group exceeds the maximum output gradation value that can be assigned to one pixel, Preferably, output gradation values are assigned in order from pixels closer to the center of gravity of the tone value, and output gradation values corresponding to the total gradation value in the pixel group are assigned to the pixel group. .

この構成によれば、画素群内の階調値合計が1画素に付与できる出力階調値の最大値を超えていても、画素群内の階調値の重心位置に近い画素から順番に出力階調値を付与することにより、画素群には、入力画像データの階調値合計に対応する分の出力階調値が付与される。したがって、入力画像データの階調再現性に優れたハーフトーン処理を行うことができる。   According to this configuration, even if the total tone value in the pixel group exceeds the maximum output tone value that can be given to one pixel, the pixels are output in order from the pixel closest to the center of gravity of the tone value in the pixel group. By assigning gradation values, output gradation values corresponding to the total gradation value of the input image data are assigned to the pixel group. Therefore, it is possible to perform halftone processing with excellent gradation reproducibility of input image data.

また、本発明の画像処理装置において、第2の画素群設定部は、入力画像データの階調値が取りうる最大値を有する画素については、第2の画素群に取り込むことなく、階調値付与部は、入力画像データの階調値が最大値の画素に対して出力階調値の最大値を付与することが好ましい。   Further, in the image processing apparatus of the present invention, the second pixel group setting unit does not capture the pixel having the maximum value that the gradation value of the input image data can take, without taking it into the second pixel group. The assigning unit preferably assigns the maximum output gradation value to the pixel having the maximum gradation value of the input image data.

この構成によれば、最大値を有する入力画像データの画素については、その最大値を出力画像データに付与して、最大値の階調値を引き継ぐようにしているので、ハーフトーン処理によって入力画像データの最大値が、出力画像データの最大値より小さい値に変換されることがなくなる。したがって、入力画像データにおける最大値を有する領域について再現性に優れたハーフトーン処理を行うことができる。例えば、入力画像データにおいて、テキストなどの2値で表現された部分については、画像出力時に確実にドットが形成されるようになるので、文字などのテキストについて視認性に優れた画像を出力することが可能になる。   According to this configuration, for the pixel of the input image data having the maximum value, the maximum value is assigned to the output image data so that the gradation value of the maximum value is taken over. The maximum value of data is not converted to a value smaller than the maximum value of output image data. Therefore, it is possible to perform halftone processing with excellent reproducibility for the region having the maximum value in the input image data. For example, in the input image data, for a portion expressed by binary values such as text, dots are surely formed at the time of image output, so an image with excellent visibility for text such as characters should be output. Is possible.

また、本発明の画像処理装置において、エッジ判定部は、第1の画素群内に含まれる階調値の最大値と最小値との差に基づき、エッジを含んでいるか否かを判定することが好ましい。   In the image processing apparatus of the present invention, the edge determination unit determines whether an edge is included based on a difference between the maximum value and the minimum value of the gradation values included in the first pixel group. Is preferred.

この構成によれば、エッジを含んでいるか否かの判定を、階調値の最大値と最小値との差に基づく簡易な処理で行うことができるので、エッジ判定を伴うハーフトーン処理をより高速に行うことができる。   According to this configuration, since it is possible to determine whether an edge is included or not by a simple process based on the difference between the maximum value and the minimum value of the gradation value, the halftone process with the edge determination is further performed. It can be done at high speed.

また、本発明の画像処理装置において、第2の画素群設定部は、エッジを含むと判定された第1の画素群のうち、互いに隣接する画素群については、互いに隣接する第1の画素群を合わせた画像領域に対して、第2の画素群内の階調値合計が目標階調値に達するまで第2の画素群に画素を次々に取り込んで、第2の画素群を設定することが好ましい。   Further, in the image processing device of the present invention, the second pixel group setting unit includes the first pixel group adjacent to each other for the pixel groups adjacent to each other among the first pixel groups determined to include the edge. For the image area combined, the pixels are successively taken into the second pixel group until the total gradation value in the second pixel group reaches the target gradation value, and the second pixel group is set. Is preferred.

この構成によれば、エッジを含むと判定された第1の画素群のうち、互いに隣接する画素群については、互いに隣接する第1の画素群を合わせた画像領域を第2の画素群に区画して、第2の画素群ごとに出力階調値を付与することにより、エッジの再現性に優れたハーフトーン処理を高速に行うことが可能となる。   According to this configuration, for the pixel groups adjacent to each other among the first pixel groups determined to include the edge, the image area obtained by combining the first pixel groups adjacent to each other is divided into the second pixel groups. Thus, by giving an output gradation value to each second pixel group, halftone processing with excellent edge reproducibility can be performed at high speed.

また、本発明の画像処理装置において、出力画像データから、画素ごとにK(Kは正の整数)段階のドットを形成するためのパルス幅信号を生成可能なパルス幅変調部をさらに備え、階調値付与部は、出力階調値を付与された画素の集合が、重心位置から拡大する方向を示す拡大方向情報を生成し、パルス幅変調部は、拡大方向情報を参照して、出力階調値が付与された画素内において重心位置側を起点とするパルス幅信号を生成することが好ましい。   The image processing apparatus according to the present invention further includes a pulse width modulation unit capable of generating a pulse width signal for forming K (K is a positive integer) level dot for each pixel from the output image data. The tone value assigning unit generates enlargement direction information indicating a direction in which the set of pixels to which the output tone value is assigned is enlarged from the center of gravity position, and the pulse width modulation unit refers to the enlargement direction information, It is preferable to generate a pulse width signal starting from the position of the center of gravity in the pixel to which the tone value is given.

この構成によれば、新たに生成するパルス幅信号は、隣接する画素に生成されたパルス幅信号と繋がりやすくなるので、このパルス幅信号に応じてドットを形成すると、ドットが孤立する可能性が低くなる。したがって、K段階のドットにより階調再現性を高めながら、ドット形成がより安定し、階調安定性により優れた画像を得ることができる。   According to this configuration, a newly generated pulse width signal is easily connected to a pulse width signal generated in an adjacent pixel. Therefore, when dots are formed according to the pulse width signal, there is a possibility that the dots are isolated. Lower. Accordingly, it is possible to obtain an image with more stable dot formation and improved gradation stability while improving gradation reproducibility with K-stage dots.

また、本発明のもうひとつの態様は、多数の画素により構成され、各画素に階調値を有する入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定部と、第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定部と、エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定部と、エッジを含んでいないと判定された第1の画素群および第2の画素群の各画素群に対して、画素群内の階調値の重心位置に基づく画素に出力階調値を付与する階調値付与部と、出力階調値が付与された画素にドットを形成することにより、画像を出力する画像出力部と、を備えることを特徴とする。   According to another aspect of the present invention, a plurality of first pixels are formed by dividing an image area of input image data, which is configured by a large number of pixels and each pixel has a gradation value, into predetermined areas. A first pixel group setting unit that sets a group, an edge determination unit that determines whether or not the first pixel group includes an edge relating to a gradation value change, and a first pixel that is determined to include an edge A second pixel group setting unit for setting a plurality of second pixel groups by dividing an image area of the pixel group, and a first pixel group and a second pixel group determined not to include an edge For each pixel group, a tone value giving unit that gives an output tone value to a pixel based on the barycentric position of the tone value in the pixel group, and a dot is formed in the pixel to which the output tone value is given And an image output unit for outputting an image.

この構成によれば、エッジの再現性に優れたハーフトーン処理を高速に行って、出力階調値が付与された画素にドットを形成することにより、エッジの再現性に優れた画像を高速に出力することが可能となる。   According to this configuration, by performing halftone processing with excellent edge reproducibility at high speed and forming dots on pixels to which output gradation values have been assigned, images with excellent edge reproducibility can be generated at high speed. It becomes possible to output.

また、本発明は、方法の発明とすることもできる。すなわち、本発明の画像処理方法は、多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換する画像処理方法であって、入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定工程と、第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定工程と、エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定工程と、エッジを含んでいないと判定された第1の画素群および第2の画素群の各画素群に対して、画素群内の階調値の重心位置に基づく画素に出力階調値を付与する階調値付与工程と、を備えることを特徴とする。   The present invention may also be a method invention. That is, according to the image processing method of the present invention, input image data including a plurality of pixels and having a gradation value for each pixel is output with two or more kinds of levels represented by output gradation values given to each pixel. An image processing method for converting into image data, comprising: a first pixel group setting step of setting a plurality of first pixel groups by dividing an image area of input image data into predetermined areas; An edge determination step for determining whether or not one pixel group includes an edge relating to a gradation value change, and an image area of the first pixel group determined to include an edge is divided into a plurality of second regions. A second pixel group setting step for setting the pixel group, and a gradation value in the pixel group for each of the first pixel group and the second pixel group determined not to include an edge. With gradation value to give output gradation value to pixels based on the center of gravity position Characterized in that it comprises a step.

さらに、本発明は、プログラムまたはそのプログラムを記憶した記録媒体とすることもできる。すなわち、本発明の画像処理プログラムは、多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換するための画像処理プログラムであって、コンピュータに、画素群に設定すべき領域を示したパターンデータを予め記憶する記憶手段からパターンデータを読み出し、パターンデータに従って入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定工程と、第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定工程と、エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定工程と、エッジを含んでいないと判定された第1の画素群および第2の画素群の各画素群に対して、画素群内の階調値の重心位置に基づく画素に出力階調値を付与する階調値付与工程と、を実行させることを特徴とする。また、このプログラムを記録した記録媒体としては、フレキシブルディスクやCD−ROM、DVD−ROM、光磁気ディスク、メモリカードなど、コンピュータが読み取り可能な種々の媒体を利用することができる。   Furthermore, the present invention may be a program or a recording medium storing the program. In other words, the image processing program of the present invention is configured to output two or more types of input image data composed of a large number of pixels and having gradation values for each pixel by output gradation values assigned to each pixel. An image processing program for converting to image data, wherein the computer reads out pattern data from a storage unit that stores in advance pattern data indicating an area to be set in a pixel group, and an image area of input image data according to the pattern data A first pixel group setting step for setting a plurality of first pixel groups by dividing each pixel into predetermined regions, and whether or not the first pixel group includes an edge relating to a gradation value change And a second pixel group setting step of setting a plurality of second pixel groups by partitioning an image region of the first pixel group determined to include an edge, A level for giving an output gradation value to a pixel based on the barycentric position of the gradation value in the pixel group for each of the first pixel group and the second pixel group determined not to include an edge. And a tone value assigning step. As a recording medium on which the program is recorded, various computer-readable media such as a flexible disk, a CD-ROM, a DVD-ROM, a magneto-optical disk, and a memory card can be used.

(第1の実施形態)
以下、本発明を具体化した第1の実施形態について図面を参照して説明する。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.

図1は、第1の実施形態に係る画像出力システムの構成を示したブロック図である。図1に示すように、画像出力システムは、入力画像データを供給するホストコンピュータ10と、供給された入力画像データに従って画像を出力する画像出力装置20とを備えている。   FIG. 1 is a block diagram illustrating a configuration of an image output system according to the first embodiment. As shown in FIG. 1, the image output system includes a host computer 10 that supplies input image data, and an image output device 20 that outputs an image according to the supplied input image data.

ホストコンピュータ10は、アプリケーション部100と、ラスタライズ部200とを有している。   The host computer 10 has an application unit 100 and a rasterizing unit 200.

アプリケーション部100は、文字データ、図形データ、ビットマップデータなどの印刷対象のデータを生成する。アプリケーション部100は、例えば、ワードプロセッサや図形ツールなどであり、キーボードなどへの操作により文字データや図形データを生成する。生成した印刷対象のデータはラスタライズ部200に出力する。   The application unit 100 generates data to be printed such as character data, graphic data, and bitmap data. The application unit 100 is, for example, a word processor or a graphic tool, and generates character data or graphic data by operating a keyboard or the like. The generated print target data is output to the rasterize unit 200.

ラスタライズ部200は、アプリケーション部100から出力された印刷対象のデータを、各画素8ビットのビットマップ画像データに変換(ラスタライズ)する。このときのビットマップ画像データは、マトリクス状に配列された多数の画素ごとに、RGB各色の階調値(「0」〜「255」)を有することによりカラー画像を表現したRGBデータである。ラスタライズされたビットマップ画像データは、画像出力装置20への入力画像データとして画像出力装置20に出力する。   The rasterizing unit 200 converts (rasterizes) the data to be printed output from the application unit 100 into 8-bit bitmap image data for each pixel. The bitmap image data at this time is RGB data representing a color image by having gradation values (“0” to “255”) of RGB colors for each of a large number of pixels arranged in a matrix. The rasterized bitmap image data is output to the image output device 20 as input image data to the image output device 20.

画像出力装置20は、電子写真方式の画像形成によって印刷を行うレーザプリンタであり、大別すると、ホストコンピュータ10から供給された入力画像データに各種画像処理を行って出力画像データに変換する画像処理部(画像処理装置)300と、出力画像データに従って用紙などの印刷媒体に画像を印刷する印刷エンジン400とを備えている。   The image output device 20 is a laser printer that performs printing by electrophotographic image formation, and is roughly classified into image processing that performs various image processing on input image data supplied from the host computer 10 and converts it into output image data. And a print engine 400 that prints an image on a print medium such as paper according to output image data.

画像処理部300は、色変換部310と、ハーフトーン処理部320と、パルス幅変調部330とを有している。   The image processing unit 300 includes a color conversion unit 310, a halftone processing unit 320, and a pulse width modulation unit 330.

色変換部310は、ホストコンピュータ10から受け取った入力画像データ(RGBデータ)を色変換して、CMYKの入力画像データに変換する処理を行う。   The color conversion unit 310 performs a process of converting the input image data (RGB data) received from the host computer 10 into CMYK input image data.

ハーフトーン処理部320は、色変換後の入力画像データ(CMYKデータ)に対し、ドットの有無に対応する2値の階調値に変換するハーフトーン処理を行う。ハーフトーン処理により入力画像データは出力画像データに変換され、印刷エンジン400に出力される。このハーフトーン処理部320は本発明の特徴部分であるが、詳細な構成/処理については後述する。   The halftone processing unit 320 performs halftone processing for converting the input image data (CMYK data) after color conversion into binary gradation values corresponding to the presence or absence of dots. The input image data is converted into output image data by halftone processing, and is output to the print engine 400. The halftone processing unit 320 is a characteristic part of the present invention, and detailed configuration / processing will be described later.

パルス幅変調部330は、ハーフトーン処理部320から出力された出力画像データにパルス幅変調を施すことにより、各画素に形成するドットの有無をパルス幅信号で表す駆動データ形式のデータに変換する。パルス幅変調部330は、パルス幅変調された駆動データ形式の出力画像データを印刷エンジン400に出力する。   The pulse width modulation unit 330 performs pulse width modulation on the output image data output from the halftone processing unit 320, thereby converting the presence / absence of dots to be formed in each pixel into drive data format data represented by a pulse width signal. . The pulse width modulation unit 330 outputs the output image data in the drive data format subjected to the pulse width modulation to the print engine 400.

印刷エンジン400は、レーザドライバ410と、レーザダイオード420とを有している。レーザドライバ410は、画像処理部300から出力された出力画像データに従って駆動パルスの有無に対応する制御データを生成し、制御データによりレーザドライバ410を駆動して、感光体ドラム(図示なし)表面を露光する。そして、現像ユニット、中間転写体、定着ユニット(図示なし)などの構成により、感光体ドラム表面の露光像を現像した画像を印刷用紙表面に定着させる。これにより、画像出力装置20は入力画像データに対応する画像を印刷する。   The print engine 400 includes a laser driver 410 and a laser diode 420. The laser driver 410 generates control data corresponding to the presence / absence of a drive pulse in accordance with the output image data output from the image processing unit 300, and drives the laser driver 410 with the control data so as to cover the surface of the photosensitive drum (not shown). Exposure. Then, an image obtained by developing the exposure image on the surface of the photosensitive drum is fixed on the surface of the printing paper by using a developing unit, an intermediate transfer member, a fixing unit (not shown), and the like. As a result, the image output apparatus 20 prints an image corresponding to the input image data.

次に、画像出力装置20のハードウェア構成について説明する。図2に示すように、画像出力装置20は、入力インターフェイス(以下、「入力I/F」)21と、CPU22と、ROM(記憶手段)23と、RAM24と、印刷エンジン400とを備えており、各構成はバスを介して互いに接続されている。   Next, the hardware configuration of the image output apparatus 20 will be described. As shown in FIG. 2, the image output apparatus 20 includes an input interface (hereinafter “input I / F”) 21, a CPU 22, a ROM (storage means) 23, a RAM 24, and a print engine 400. The components are connected to each other via a bus.

入力I/F21は、ホストコンピュータ10から供給された入力画像データを受け付ける部分であり、入力された入力画像データはRAM24にいったん格納される。   The input I / F 21 is a part that receives input image data supplied from the host computer 10, and the input image data that has been input is temporarily stored in the RAM 24.

ROM23は、フラッシュROM、EEPROMなどの不揮発性のメモリであり、本発明の画像処理プログラムGP、後述するセル繰り返しマトリクスのセルパターンデータCD、および画像出力装置20の制御プログラムなどが予め記憶されている。なお、本実施形態では、画像処理プログラムGPは予めROM23に格納されていているが、画像処理プログラムGPを記録した、メモリカードなどの記録媒体の形態で画像出力装置20に供給してもよい。   The ROM 23 is a non-volatile memory such as a flash ROM or an EEPROM, and stores in advance an image processing program GP of the present invention, a cell pattern data CD of a cell repetition matrix (to be described later), a control program for the image output device 20, and the like. . In this embodiment, the image processing program GP is stored in the ROM 23 in advance. However, the image processing program GP may be supplied to the image output apparatus 20 in the form of a recording medium such as a memory card in which the image processing program GP is recorded.

RAM24は、CPU22が実行する各種処理のワーキングメモリとして主に用いられるメモリであり、色変換後の入力画像データを記憶するための入力バッファ24a、およびハーフトーン処理後の出力画像データを記憶するための出力バッファ24bが所定のメモリ領域に確保されている。   The RAM 24 is a memory mainly used as a working memory for various processes executed by the CPU 22, and stores an input buffer 24a for storing input image data after color conversion and output image data after halftone processing. Output buffer 24b is secured in a predetermined memory area.

CPU22は、バスを介して接続された、入力I/F21、ROM23、RAM24および印刷エンジン400の各構成を制御する。特に、CPU22は、ROM23に格納された画像処理プログラムGPをRAM24に読み出して、画像処理プログラムGPを実行することにより、色変換・ハーフトーン処理・パルス幅変調などの画像処理装置300としての各種処理を行う。   The CPU 22 controls each configuration of the input I / F 21, the ROM 23, the RAM 24, and the print engine 400 connected via the bus. In particular, the CPU 22 reads out the image processing program GP stored in the ROM 23 to the RAM 24 and executes the image processing program GP, thereby performing various processes as the image processing apparatus 300 such as color conversion, halftone processing, and pulse width modulation. I do.

次に、本発明の特徴部分であるハーフトーン処理部320の構成について説明する。図3はハーフトーン処理部の構成を示したブロック図である。図3に示すように、ハーフトーン処理部320は、基本セル設定部(第1の画素群設定部)321と、ハイライト判定部322と、エッジ判定部323と、基本セル拡大部(セル拡大部)324と、小セル設定部(第2の画素群設定部)325と、階調値付与部326とを有している。   Next, the configuration of the halftone processing unit 320 which is a characteristic part of the present invention will be described. FIG. 3 is a block diagram showing the configuration of the halftone processing unit. As shown in FIG. 3, the halftone processing unit 320 includes a basic cell setting unit (first pixel group setting unit) 321, a highlight determination unit 322, an edge determination unit 323, and a basic cell enlargement unit (cell enlargement). Part) 324, a small cell setting part (second pixel group setting part) 325, and a gradation value giving part 326.

基本セル設定部321は、入力画像データの画像領域を、予め決められた領域に区画して、セルを設定する部分である。なお、ここで設定されるセルを、「基本セル(第1の画素群)」という。   The basic cell setting unit 321 is a part that divides the image area of the input image data into predetermined areas and sets cells. The cells set here are referred to as “basic cells (first pixel group)”.

基本セル設定部321は、領域を区画するため、所定範囲の領域に複数個のセルを敷き詰めたセル繰り返しマトリクスを用いる。図4に、セル繰り返しマトリクスの一例を示す。図4に示すように、セル繰り返しマトリクスCMには、矩形状の領域に、同じ大きさ・形状である複数のセル(セル番号(1)〜(8))が千鳥状に配列されている。ここで、セル番号(3),(4),(6),(7),(8)のセルについては、各々が略円形状の形状に設定されている。セル番号(1),(2),(5)などマトリクスの周辺に位置して、略円形状になっていないセルについては、セル繰り返しマトリクスCMを配置したときに、隣り合う位置に配置されたセル繰り返しマトリクスCMのセルと合わさって略円形状の基本セルとなるように設定されている。   The basic cell setting unit 321 uses a cell repetition matrix in which a plurality of cells are laid out in a predetermined area in order to partition the area. FIG. 4 shows an example of the cell repetition matrix. As shown in FIG. 4, in the cell repetition matrix CM, a plurality of cells (cell numbers (1) to (8)) having the same size and shape are arranged in a staggered manner in a rectangular region. Here, the cells with cell numbers (3), (4), (6), (7), and (8) are each set to have a substantially circular shape. Cell numbers (1), (2), (5), etc., which are located around the matrix and are not substantially circular, are placed at adjacent positions when the cell repetition matrix CM is placed. The cells are set to be substantially circular basic cells when combined with the cells of the cell repetition matrix CM.

基本セル設定部321は、入力画像データの画像領域において、セル繰り返しマトリクスCMと同じ大きさの領域ごとにセル繰り返しマトリクスCMを配置して、セル繰り返しマトリクスCMのセルごとに領域を区画するようにして、予め決められた大きさ・形状の領域を有する複数の基本セルを設定する。   The basic cell setting unit 321 arranges a cell repetition matrix CM for each area of the same size as the cell repetition matrix CM in the image area of the input image data, and divides the area for each cell of the cell repetition matrix CM. Thus, a plurality of basic cells having areas of a predetermined size and shape are set.

ハイライト判定部322は、基本セルの各々について、そのセル内の領域が、画像出力時に生成されるドットが少なく、明るい画像に出力されるハイライト領域であるかを判定する。   For each of the basic cells, the highlight determination unit 322 determines whether the area in the cell is a highlight area that is output to a bright image with few dots generated when the image is output.

エッジ判定部323は、基本セルの各々について、そのセル内に入力画像データの階調値変化に関するエッジ(すなわち、階調値差が急激な部分)を含んでいるか否かを判定する。この判定により、エッジを含む基本セルとエッジを含まない基本セルとに区別する。   The edge determination unit 323 determines, for each basic cell, whether or not the cell includes an edge relating to a change in the gradation value of the input image data (that is, a portion where the gradation value difference is abrupt). Based on this determination, a distinction is made between basic cells that contain edges and basic cells that do not contain edges.

基本セル拡大部324は、ハイライト領域と判定された基本セルについて、所定の目標階調値に達するまで当該基本セルの周辺にある画素を基本セルに次々に取り込んで、基本セルを拡大する処理を行う。   The basic cell enlarging unit 324 performs a process of enlarging the basic cell by successively taking pixels around the basic cell until the predetermined target gradation value is reached for the basic cell determined to be the highlight area. I do.

この目標階調値は、印刷エンジン400が安定して形成することができるドットサイズに対応した値であり、画像出力装置20に対して設定された解像度(dpi)に応じて、目標階調値が決定される。例えば、解像度600dpiであれば、1画素のドットサイズ分に相当する目標階調値「255」、解像度1200dpiであれば、1つ1つのドットが小さくなりドットが安定し難くなるので、5画素分のドットサイズに相当する「1275(=5×255)」を目標階調値に設定する。本実施形態では、目標階調値は、予め「1275」に設定されているものとする。   This target gradation value is a value corresponding to the dot size that can be stably formed by the print engine 400, and depends on the resolution (dpi) set for the image output apparatus 20. Is determined. For example, if the resolution is 600 dpi, the target gradation value corresponding to the dot size of one pixel is “255”, and if the resolution is 1200 dpi, each dot becomes smaller and the dots are difficult to stabilize. “1275 (= 5 × 255)” corresponding to the dot size is set as the target gradation value. In the present embodiment, it is assumed that the target gradation value is set to “1275” in advance.

小セル設定部325は、エッジを含む基本セル内の画像領域をさらに区画して、複数のセルを設定する部分である。ここで設定されるセルを、「小セル(第2の画素群)」という。小セル設定部325は、小セル内の階調値合計が目標階調値に達するまで、小セル内階調値の重心位置に近い画素を次々に取り込んで、小セルを設定する。これにより、エッジを含む基本セルは、各々が目標階調値分の階調値をセル内に有する複数の小セルに、さらに区画される。   The small cell setting unit 325 is a part that further divides an image area in a basic cell including an edge and sets a plurality of cells. The cell set here is referred to as a “small cell (second pixel group)”. The small cell setting unit 325 sets small cells by successively capturing pixels close to the barycentric position of the small cell gradation values until the total gradation value in the small cells reaches the target gradation value. As a result, the basic cell including the edge is further partitioned into a plurality of small cells each having a gradation value corresponding to the target gradation value in the cell.

階調値付与部326は、エッジを含まない基本セルおよび小セルの各セルについて、セル内階調値の重心位置に基づく画素に、セル内の階調値合計に応じた出力階調値を付与する処理(ドット生成処理)を行う。ここで付与する出力階調値は、印刷エンジン400が形成可能なドットの階調数に対応する8ビットで表現された階調値(「0」〜「255」)となる。例えば、印刷エンジン400が画素ごとにドットの有無を打ち分けて、画像を出力する場合であれば、予め、各画素が出力階調値「0」に初期設定された出力用の画像領域に対して、ドットを生成する画素に出力階調値「255」を付与する。これにより、各画素を、出力階調値「0」または「255」の2つのレベルで表す出力画像データを生成する。   For each of the basic cell and the small cell that do not include an edge, the gradation value assigning unit 326 assigns an output gradation value corresponding to the total gradation value in the cell to the pixel based on the gravity center position of the in-cell gradation value. A process of giving (dot generation process) is performed. The output gradation value assigned here is a gradation value (“0” to “255”) expressed in 8 bits corresponding to the number of gradations of dots that can be formed by the print engine 400. For example, if the print engine 400 outputs an image by distinguishing the presence / absence of dots for each pixel, each pixel is output in advance to an output image area that is initially set to the output gradation value “0”. Thus, the output gradation value “255” is assigned to the pixel that generates the dot. As a result, output image data representing each pixel with two levels of output gradation values “0” or “255” is generated.

以上に述べたように、階調値付与部326は、エッジを含まない基本セル、および基本セルを区画して得られた小セルの双方に対して、セル内の重心位置に基づく画素に出力階調値を付与するようにしている。このとき、セル繰り返しマトリクスCMにより基本セルを設定し、基本セルに出力階調値を付与する一連の処理は、「AAM法」の処理手法に従っている。基本セルを小セルに区画し、小セルに出力階調値を付与する一連の処理は、「CC法」の処理手法に従っている。以下、AAM法およびCC法の各々の処理手法について、簡単に説明する。   As described above, the gradation value assigning unit 326 outputs to both the basic cell that does not include the edge and the small cell obtained by partitioning the basic cell, to the pixel based on the barycentric position in the cell. A gradation value is assigned. At this time, a series of processing for setting a basic cell by the cell repetition matrix CM and giving an output gradation value to the basic cell is in accordance with the processing method of the “AAM method”. A series of processing for dividing the basic cell into small cells and assigning output gradation values to the small cells follows the processing method of the “CC method”. Hereinafter, each processing method of the AAM method and the CC method will be briefly described.

まず、AAM法について説明する。AAM法は、セル繰り返しマトリクスCMを配置することにより予め決められた領域を有する基本セルを設定し、基本セルごとに出力階調値を付与する方法である。図5は、セル繰り返しマトリクスCMによる基本セル設定を説明するための図であり、入力画像データの画像領域に複数のセル繰り返しマトリクスCMを配置した一例を示している。ここで、図面横方向に左から右向きを「x方向」、図面縦方向に上から下向きを「y方向」とする。なお、以下では、x方向プラス方向を「右」、x方向マイナス方向を「左」、y方向プラス方向を「下」、y方向マイナス方向を「上」ともいう。   First, the AAM method will be described. The AAM method is a method of setting a basic cell having a predetermined region by arranging a cell repetition matrix CM and giving an output gradation value for each basic cell. FIG. 5 is a diagram for explaining basic cell setting by the cell repetition matrix CM, and shows an example in which a plurality of cell repetition matrices CM are arranged in the image area of the input image data. Here, the direction from left to right in the horizontal direction of the drawing is “x direction”, and the direction from top to bottom in the vertical direction of the drawing is “y direction”. Hereinafter, the x direction plus direction is also referred to as “right”, the x direction minus direction as “left”, the y direction plus direction as “down”, and the y direction minus direction as “up”.

基本セルの設定は、入力画像データの画像領域を、セル繰り返しマトリクスCMと同じ大きさを有するセルブロックCBに区分けし、セルブロックCBごとにセル繰り返しマトリクスCMを配置することにより行う。そして、配置されたセル繰り返しマトリクスCMに設定されたセルに対応して基本セルCL1に設定する。基本セルを設定する際には、図5に示すように、セルブロックCB(a〜a+2,b〜b+1)が互いに隙間なく、x方向及びy方向に繰り返して設定し、各々のセルブロックCBにセル繰り返しマトリクスCMを配置することにより、複数の基本セルCL1を設定される。   The basic cell is set by dividing the image area of the input image data into cell blocks CB having the same size as the cell repetition matrix CM, and arranging the cell repetition matrix CM for each cell block CB. Then, it is set in the basic cell CL1 corresponding to the cell set in the arranged cell repetition matrix CM. When setting the basic cell, as shown in FIG. 5, the cell blocks CB (a to a + 2, b to b + 1) are repeatedly set in the x direction and the y direction without any gaps, and each cell block CB is set. By arranging the cell repetition matrix CM, a plurality of basic cells CL1 are set.

このとき、図4を参照して、セル繰り返しマトリクスCMの周辺部にある略円形状になっていないセル(1),(2),(5)については、セル繰り返しマトリクスCMが配置されたときに、隣り合うセルブロックCBのセル繰り返しマトリクスCMのセルと合わさって、略円形状の1つの基本セルCL1となる。例えば、セルブロックCB(a+1,b)のセル(5)は、セルブロックCB(a,b)の右端の領域と合わさって、略円形状の基本セルCL1を構成する。同様に、セルブロックCB(a+1,b+1)のセル(1)は、セルブロックCB(a,b)の右下端の領域、セルブロックCB(a+1,b)の左下端の領域、セルブロックCB(a,b+1)の右上端の領域と合わさって、略円形状の基本セルCL1を構成する。   At this time, referring to FIG. 4, for cells (1), (2) and (5) which are not substantially circular in the periphery of the cell repetition matrix CM, the cell repetition matrix CM is arranged. In addition, when combined with the cells of the cell repetition matrix CM of the adjacent cell block CB, one basic cell CL1 having a substantially circular shape is obtained. For example, the cell (5) of the cell block CB (a + 1, b) is combined with the right end region of the cell block CB (a, b) to form a substantially circular basic cell CL1. Similarly, the cell (1) of the cell block CB (a + 1, b + 1) includes the lower right area of the cell block CB (a, b), the lower left area of the cell block CB (a + 1, b), the cell block CB ( Together with the upper right region of a, b + 1), a substantially circular basic cell CL1 is formed.

次に、AAM法では、基本セルCL1ごとに出力階調値を付与するドット生成処理を行う。図6は、ドット生成処理を説明する図であり、図6(a)は処理対象とする基本セルの一例、図6(b)はセル内のうち出力階調値を付与する画素の一例を示している。図6(a)の例では、基本セルCL1は階調値「30」の領域と「50」の領域とから構成され、セル内の階調値合計は「3940(=255×15+115)」、セル内階調値の重心位置G1は(m+5.48,n+6.78)である。   Next, in the AAM method, dot generation processing for assigning an output gradation value for each basic cell CL1 is performed. 6A and 6B are diagrams for explaining dot generation processing. FIG. 6A is an example of a basic cell to be processed, and FIG. 6B is an example of a pixel to which an output gradation value is given in the cell. Show. In the example of FIG. 6A, the basic cell CL1 is composed of a region of gradation value “30” and a region of “50”, and the total gradation value in the cell is “3940 (= 255 × 15 + 115)”, The barycentric position G1 of the in-cell gradation value is (m + 5.48, n + 6.78).

出力階調値を付与する際には、重心位置Gに近い画素から順番に出力階調値を付与して、セル内階調値の合計分の階調値を付与する。ここで、階調値付与前には、出力バッファ24bに出力階調値「0」が初期設定されており、付与する出力階調値はドット有りに対応する階調値「255」である。図6の例では、セル内の階調値合計は、出力階調値「255」を15個の画素に付与するだけの値を有しているので、重心位置G1から近い順番に、15個の画素(図6(b)の(1)〜(15)参照)に順番に出力階調値「255」を付与する。   When the output gradation value is given, the output gradation value is given in order from the pixel close to the center of gravity position G, and the gradation value corresponding to the sum of the in-cell gradation values is given. Here, before the gradation value is given, the output gradation value “0” is initially set in the output buffer 24b, and the output gradation value to be given is the gradation value “255” corresponding to the presence of a dot. In the example of FIG. 6, the total tone value in the cell has a value that only gives the output tone value “255” to the 15 pixels, so 15 in the order closer to the centroid position G1. The output gradation value “255” is assigned to the pixels (see (1) to (15) in FIG. 6B) in order.

なお、余りの階調値分の出力階調値を付与するか否かについては、余りの階調値が所定の閾値(例えば、最大値の半分の「127」)以上であるかを判断して決定する。図6の例では、余りの階調値「115」が閾値未満であるため、余りの階調値「115」分については16番目の画素への付与を行わない。   Whether or not output gradation values corresponding to the remaining gradation values are to be assigned is determined by determining whether the remaining gradation values are equal to or greater than a predetermined threshold (for example, “127” which is half of the maximum value). To decide. In the example of FIG. 6, since the remaining gradation value “115” is less than the threshold value, the remaining gradation value “115” is not assigned to the 16th pixel.

このAAM法によれば、図6(b)に示すように、基本セルCL1の重心位置G1を中心として略円形状に、基本セルCL1のセル内階調値に応じた大きさの範囲内の画素に出力階調値が付与される。   According to this AAM method, as shown in FIG. 6 (b), a substantially circular shape centered on the center of gravity position G1 of the basic cell CL1, and within a size range corresponding to the in-cell gradation value of the basic cell CL1. An output gradation value is given to the pixel.

次に、CC方法について説明する。図7は、CC法の処理対象とする基本セルCL1の一例を示している。図7の例では、基本セルCL1は、階調値「50」の領域と「200」の領域とから構成されている。   Next, the CC method will be described. FIG. 7 shows an example of the basic cell CL1 to be processed by the CC method. In the example of FIG. 7, the basic cell CL <b> 1 includes a region having a gradation value “50” and a region “200”.

図8は、図7に例として示した基本セルCL1に対して、CC法により行う小セル設定を説明する図である。以下、図8に従って順番に説明する。   FIG. 8 is a diagram illustrating small cell setting performed by the CC method for the basic cell CL1 shown as an example in FIG. Hereinafter, it demonstrates in order according to FIG.

CC法では、まず、小セルCL2を生成するための起点となる初期画素を定める。初期画素は、所定の順番に従って基本セルCL1内の画素から、画素内の階調値を用いた出力階調値の付与が行われていない未処理画素をラスタ順に探索することにより定める。すなわち、対象領域の1番上の行の左端から右方向に走査し、右端まで探索されると、1つ下の行を再び左端から右方向に順番に探索する。探索により始めに見つかった未処理画素を初期画素とする。図8(a)の例では、ラスタ順に探索すると、基本セルCL1から未処理画素(m+6,n)が始めに探索されるので、初期画素として小セルCL2に取り込む。このとき、小セルCL2内の階調値の重心位置G2は(m+6.00,n+0.00)、小セルCL2内の階調値合計は「200」である。   In the CC method, first, an initial pixel serving as a starting point for generating the small cell CL2 is determined. The initial pixel is determined by searching, in raster order, an unprocessed pixel that has not been assigned an output gradation value using the gradation value in the pixel from the pixel in the basic cell CL1 according to a predetermined order. That is, scanning from the left end of the uppermost row of the target area to the right and searching to the right end, the next lower row is again searched in order from the left end to the right. The unprocessed pixel first found by the search is set as the initial pixel. In the example of FIG. 8A, when searching in the raster order, the unprocessed pixel (m + 6, n) is searched first from the basic cell CL1, and is thus taken into the small cell CL2 as an initial pixel. At this time, the gravity center position G2 of the gradation values in the small cell CL2 is (m + 6.00, n + 0.00), and the total gradation value in the small cell CL2 is “200”.

次に、未処理画素のうち、重心位置G2に最も近い画素を選択してセルに取り込む。図8(a)の状態では、重心位置G2との距離が「1.41」の画素(m+7,n+1)と、重心位置G2との距離が「1.00」の画素(m+6,n+1)とを比較して、より距離が短い画素(m+6,n+1)を小セルCL2に取り込む(図8(b)参照)。このとき、重心位置G2は(m+6.00,n+0.50)、小セルCL2内の階調値合計は「400」に更新される。   Next, of the unprocessed pixels, the pixel closest to the gravity center position G2 is selected and taken into the cell. In the state of FIG. 8A, a pixel (m + 7, n + 1) whose distance from the gravity center position G2 is “1.41” and a pixel (m + 6, n + 1) whose distance from the gravity center position G2 is “1.00” And the pixel (m + 6, n + 1) having a shorter distance is taken into the small cell CL2 (see FIG. 8B). At this time, the center-of-gravity position G2 is updated to (m + 6.00, n + 0.50), and the total gradation value in the small cell CL2 is updated to “400”.

同様に重心位置G2に近い画素を取り込む処理を繰り返し行うと、さらに、画素(m+7,n+1)、画素(m+6,n+2)、画素(m+7,n+2)、画素(m+5,n+2)が順番にセルCL2に取り込まれる(図8(c)参照)。これにより、重心位置G2は(m+6.17,n+1.33)、小セルCL2内の階調値合計は「1200」に更新される。   Similarly, when the process of taking in pixels near the center of gravity G2 is repeatedly performed, the pixel (m + 7, n + 1), the pixel (m + 6, n + 2), the pixel (m + 7, n + 2), and the pixel (m + 5, n + 2) are sequentially displayed in the cell CL2. (See FIG. 8C). As a result, the gravity center position G2 is updated to (m + 6.17, n + 1.33), and the total gradation value in the small cell CL2 is updated to “1200”.

次に、重心位置G2(m+6.17,n+1.33)から最も近い未処理画素として、画素(m+6,n+3)が選択され、小セルCL2に取り込まれる。ここで、画素(m+6,n+3)の全階調値を取り込むと、小セルCL2内の階調値合計は「1400」となり、目標階調値「1275」を超える。かかる場合には、目標階調値を超える分の階調値「125」を、元の画素(m+6,n+3)に戻しておく(図8(d)参照)。こうすることにより、目標階調値分だけの階調値を有する小セルCL2を設定する。   Next, the pixel (m + 6, n + 3) is selected as the nearest unprocessed pixel from the gravity center position G2 (m + 6.17, n + 1.33), and is taken into the small cell CL2. Here, when all the gradation values of the pixels (m + 6, n + 3) are captured, the total gradation value in the small cell CL2 is “1400”, which exceeds the target gradation value “1275”. In such a case, the gradation value “125” exceeding the target gradation value is returned to the original pixel (m + 6, n + 3) (see FIG. 8D). In this way, a small cell CL2 having a gradation value corresponding to the target gradation value is set.

次に、基本セルCL1内に、小セルCL2に取り込まれていない未処理画素が残っているので、未処理画素のうちから初期画素を設定して、1つ目の小セルCL2と同様にして、2つ目以降の小セルCL2を設定する。このとき、図8(d)において元の画素に戻された階調値の画素も未処理画素として処理を行う。このように、CC法では、基本セルCL1内の領域に目標階調値分の階調値を有した小セルCL2を設定する処理を繰り返し行うようにして、基本セルCL1を複数の小セルCL2に区画する。   Next, since unprocessed pixels that have not been captured in the small cell CL2 remain in the basic cell CL1, an initial pixel is set from the unprocessed pixels, and the same operation as that of the first small cell CL2 is performed. The second and subsequent small cells CL2 are set. At this time, the pixel of the gradation value returned to the original pixel in FIG. 8D is also processed as an unprocessed pixel. As described above, in the CC method, the process of setting the small cell CL2 having the gradation value for the target gradation value in the region in the basic cell CL1 is repeatedly performed so that the basic cell CL1 is a plurality of small cells CL2. Divide into

CC法では、設定された小セルCL2に対して出力階調値を付与する際に、小セルCL2に対して図6(b)にて説明したAAM法のドット生成処理と同様の処理を行う。ただし、小セルCL2内の階調値は予め決められた目標階調値となるので、予め決められた数の画素に対して出力階調値が付与されることになる。   In the CC method, when an output gradation value is given to the set small cell CL2, the same process as the dot generation process of the AAM method described in FIG. 6B is performed on the small cell CL2. . However, since the gradation value in the small cell CL2 is a predetermined target gradation value, the output gradation value is given to a predetermined number of pixels.

このCC法によれば、基本セルCL1を小セルCL2にさらに区画して、小セルCL2の重心位置G2を中心として略円形状であり、目標階調値に応じた大きさの範囲に出力階調値が付与される。この出力階調値に応じてドットを形成すると、基本セルCL1を分割した小セルCL2ごとにドットが形成されることになる。したがって、基本セルCL1を対象として行うCC法は、AAM法に比べて画像の解像性がより高くなる処理といえる。   According to the CC method, the basic cell CL1 is further divided into small cells CL2, and is substantially circular with the center of gravity G2 of the small cell CL2 as the center, and the output floor is within a range corresponding to the target gradation value. A key value is given. When dots are formed according to the output gradation value, dots are formed for each small cell CL2 obtained by dividing the basic cell CL1. Therefore, the CC method performed on the basic cell CL1 can be said to be a process in which the resolution of the image is higher than that of the AAM method.

以上に説明したように、第1の実施形態では、入力画像の画像領域のうち、エッジ部分を含まない画像領域には、CC法に比べて重心位置・階調値合計の更新回数が少なく済むAAM法を適用して、エッジ部分の領域には解像性が高いCC法を適用することにより、ハーフトーン処理を行うようにしている。   As described above, in the first embodiment, among the image areas of the input image, the image area that does not include the edge portion requires less number of updates of the centroid position / gradation value sum than the CC method. A halftone process is performed by applying the AAM method and applying the CC method having high resolution to the edge portion region.

次に、第1の実施形態に係るハーフトーン処理の処理手順について、図9,10のフローチャートに従って詳細に説明する。   Next, the processing procedure of the halftone process according to the first embodiment will be described in detail with reference to the flowcharts of FIGS.

CPU22は、ROM23から読み出した画像処理プログラムGPを実行して、入力I/F21を介してホストコンピュータ10から受け取った入力画像データをCMYKの入力画像データに変換する。そして、入力画像データのC,M,Y,Kの各色について図9,10に示したハーフトーン処理を開始する。   The CPU 22 executes the image processing program GP read from the ROM 23, and converts the input image data received from the host computer 10 via the input I / F 21 into CMYK input image data. Then, the halftone process shown in FIGS. 9 and 10 is started for each color of C, M, Y, and K of the input image data.

ハーフトーン処理を開始すると、CPU22は、色変換後の入力画像データを読み込んで、RAM24の入力バッファ24aに入力画像を展開し(ステップS100)、入力画像の画像領域の左上に位置するセルブロックCB(0,0)にセル繰り返しマトリクスCMを設定する(ステップS105)。ここで、設定したセル繰り返しマトリクスCMに含まれる複数の基本セルのうち、セル番号最小となる1つの基本セルCL1に注目する。   When the halftone process is started, the CPU 22 reads the input image data after color conversion, develops the input image in the input buffer 24a of the RAM 24 (step S100), and the cell block CB located at the upper left of the image area of the input image. A cell repetition matrix CM is set at (0, 0) (step S105). Here, attention is focused on one basic cell CL1 having the smallest cell number among the plurality of basic cells included in the set cell repetition matrix CM.

次に、CPU22は、注目した基本セルCL1についてのセル内の階調値合計FTを次式に従って算出する(ステップS110)。ただし、「f」は基本セル内の画素が有する階調値、「i」は基本セルCL1内の各画素に1対1に対応する番号である。
FT=Σif(i) …(1)
Next, the CPU 22 calculates the total tone value FT in the cell for the focused basic cell CL1 according to the following equation (step S110). However, “f” is a gradation value of a pixel in the basic cell, and “i” is a number corresponding to each pixel in the basic cell CL1.
FT = Σ i f (i) (1)

階調値合計を算出すると、階調値合計が「0」以上の値になっているか否かを判断する(ステップS115)。階調値合計が「0」未満であれば(ステップS115:No)、当該基本セルCL1に対しては出力階調値を付与することなく、ステップS155に進む。   When the total gradation value is calculated, it is determined whether or not the total gradation value is equal to or greater than “0” (step S115). If the total gradation value is less than “0” (step S115: No), the process proceeds to step S155 without assigning the output gradation value to the basic cell CL1.

階調値合計が「0」以上であれば(ステップS115:Yes)、CPU22は、注目した基本セルCL1がハイライト領域であるか否かを判断する(ステップS120)。具体的には、基本セルCL1内の階調値合計が、ハイライトと非ハイライトとの境界値に対応する所定の閾値(>0)より小さいか否かを判断し、閾値より小さければ(ステップS120:Yes)、ハイライト領域と判断して、ステップS145に進んで基本セル拡大処理を行う。閾値以上であれば(ステップS120:No)、非ハイライト領域であると判断して、ステップS125に進む。   If the total gradation value is “0” or more (step S115: Yes), the CPU 22 determines whether or not the focused basic cell CL1 is a highlight region (step S120). Specifically, it is determined whether or not the total gradation value in the basic cell CL1 is smaller than a predetermined threshold (> 0) corresponding to the boundary value between highlight and non-highlight. In step S120: Yes), it is determined that the area is a highlight area, and the process proceeds to step S145 to perform basic cell expansion processing. If it is equal to or greater than the threshold (step S120: No), it is determined that the area is a non-highlight area, and the process proceeds to step S125.

以下、非ハイライト領域に対して行う処理から説明する。ステップS120において非ハイライト領域と判断されると、CPU22は、注目した基本セルCL1内の階調値のコントラストを算出する(ステップS125)。コントラストの算出は、次式に従って行う。すなわち、基本セルCL1のセル内階調値の最大値と最小値との差分値をコントラストCとする。ただし、max()は最大値を返す関数、min()は最小値を返す関数である。
C=|max(f(i))−min(f(i))| …(2)
Hereinafter, the processing performed on the non-highlight area will be described. If it is determined in step S120 that it is a non-highlight area, the CPU 22 calculates the contrast of the gradation value in the noted basic cell CL1 (step S125). The contrast is calculated according to the following equation. That is, the difference value between the maximum value and the minimum value of the in-cell gradation values of the basic cell CL1 is set as the contrast C. However, max () is a function that returns the maximum value, and min () is a function that returns the minimum value.
C = | max (f (i)) − min (f (i)) | (2)

次に、コントラストを、エッジとエッジでない部分との境界値に対応する所定の基準値(例えば、階調値「80」など)と比較して、注目した基本セルCL1内にエッジを含んでいるか否かを判断する(ステップS130)。コントラストが基準値以上であれば(ステップS130:Yes)、注目した基本セルCL1はエッジを含んでいると判断して、ステップS140に進み、注目した基本セルCL1を対象としたCC法による処理を行う。コントラストが基準値未満であれば(ステップS130:No)、注目した基本セルCL1はエッジを含んでいないと判断して、ステップS135に進んで、注目した基本セルCL1についてAAM法による処理を行う。   Next, the contrast is compared with a predetermined reference value (for example, gradation value “80”, etc.) corresponding to the boundary value between the edge and the non-edge portion, and whether the focused basic cell CL1 includes an edge It is determined whether or not (step S130). If the contrast is equal to or higher than the reference value (step S130: Yes), it is determined that the noticed basic cell CL1 includes an edge, and the process proceeds to step S140 to perform the processing by the CC method for the noticed basic cell CL1. Do. If the contrast is less than the reference value (step S130: No), it is determined that the noticed basic cell CL1 does not include an edge, and the process proceeds to step S135, where the noticed basic cell CL1 is processed by the AAM method.

次に、AAM法の処理手順について図11のフローチャートに従って説明する。   Next, the processing procedure of the AAM method will be described with reference to the flowchart of FIG.

AAM法の処理が開始されると、まず、CPU22は、次式に従って、注目した基本セルCL1のセル内階調値の重心位置G1(G1x,G1y)を算出する(ステップS200)。
G1x=Σix×f(i) …(3)
G1y=Σiy×f(i) …(4)
When the processing of the AAM method is started, first, the CPU 22 calculates the gravity center position G1 (G1x, G1y) of the in-cell gradation value of the noticed basic cell CL1 according to the following equation (step S200).
G1x = Σ i x × f (i) (3)
G1y = Σ i y × f (i) (4)

そして、重心近傍の画素にドットを生成するための出力階調値を付与するドット生成処理を行う(ステップS210)。ドット生成処理については、図12のフローチャートに従って説明する。   Then, a dot generation process for assigning an output gradation value for generating dots to pixels near the center of gravity is performed (step S210). The dot generation process will be described with reference to the flowchart of FIG.

ドット生成処理では、まず、CPU22は出力すべきドットサイズを決定する(ステップS300)。AAM法では、セル内階調値合計に応じた大きさのドットを重心位置G1に形成するため、ステップS110にて算出した基準セルCL1のセル内階調値合計から、ドットサイズを決定する。本実施形態では、セル内階調値合計FTを用いて、次式により、「127」以下の階調値分を切り捨て、「128」以上の階調値分を1画素分「255」の階調値に切り上げるようにして、ドットサイズDSを決定する。ただし、「int()」は、端数を切り捨てて整数を返す関数である。
DS=n×255
=int(FT/255+0.5)×255 …(5)
In the dot generation process, first, the CPU 22 determines a dot size to be output (step S300). In the AAM method, the dot size is determined from the sum of the in-cell tone values of the reference cell CL1 calculated in step S110 in order to form dots having a size corresponding to the sum of the in-cell tone values at the center of gravity position G1. In the present embodiment, by using the in-cell gradation value total FT, the gradation value of “127” or less is rounded down by the following formula, and the gradation value of “128” or more is scaled to “255” for one pixel. The dot size DS is determined by rounding up to the tone value. However, “int ()” is a function that truncates a fraction and returns an integer.
DS = n × 255
= Int (FT / 255 + 0.5) × 255 (5)

ドットサイズを決定すると、CPU22は、セル内で未だ出力階調値が付与されていない未出力画素の各々とセル内重心位置G1との距離を算出して、セル内重心位置G1に最も近い未出力画素を探索する(ステップS310)。そして、探索された画素に出力階調値「255」を付与する(ステップS320)。具体的には、探索画素に対応する出力バッファ24bのメモリ領域に記憶された値に階調値「255」を加算することにより、出力階調値の付与を行う。なお、ステップS310においてセル内重心位置G1に最も近い未出力画素が複数個探索されていた場合には、複数の探索画素のうちランダムに決定した1つの画素に対して出力階調値を付与するとよい。   When the dot size is determined, the CPU 22 calculates the distance between each non-output pixel that has not yet been assigned an output gradation value in the cell and the in-cell center of gravity position G1, and the closest to the in-cell center of gravity position G1. An output pixel is searched (step S310). Then, the output gradation value “255” is assigned to the searched pixel (step S320). Specifically, the output gradation value is given by adding the gradation value “255” to the value stored in the memory area of the output buffer 24b corresponding to the search pixel. If a plurality of non-output pixels closest to the in-cell center-of-gravity position G1 have been searched in step S310, an output gradation value is assigned to one randomly determined pixel among the plurality of search pixels. Good.

次に、CPU22は、出力階調値付与後の値が、出力階調値がとりうる最大値「255」を超えたか否かを判断する(ステップS330)。最大値を超えていれば(ステップS330:Yes)、当該画素に付与された出力階調値を最大値「255」に調整してから(ステップS340)、ステップS350に進む。最大値を超えていなければ(ステップS330:No)、出力階調値を調整することなく、ステップS350に進む。   Next, the CPU 22 determines whether or not the value after the output gradation value is given exceeds the maximum value “255” that the output gradation value can take (step S330). If it exceeds the maximum value (step S330: Yes), the output gradation value assigned to the pixel is adjusted to the maximum value “255” (step S340), and the process proceeds to step S350. If it does not exceed the maximum value (step S330: No), the process proceeds to step S350 without adjusting the output gradation value.

次に、CPU22は、セル内の画素に付与した出力階調値の合計が、ドットサイズDS分の階調値に達したか否かを判断する(ステップS350)。ドットサイズDS分の階調値に達していれば(ステップS350:Yes)、ドット生成処理を終了する。   Next, the CPU 22 determines whether or not the sum of the output gradation values assigned to the pixels in the cell has reached the gradation value for the dot size DS (step S350). If the gradation value for the dot size DS has been reached (step S350: Yes), the dot generation process ends.

ドットサイズDSの階調値に達していなければ(ステップS350:No)、基本セルCL1内の全画素について出力階調値の付与を行って、セル内の全画素が処理されたか否かを判断する(ステップS360)。全画素について出力階調値を付与していなければ(ステップS360:No)、ステップS310に戻って次の未出力画素を探索する。全画素について出力階調値が付与されていれば(ステップS360:Yes)、出力階調値の付与対象となる画素がないため、ドット生成処理を終了する。ドット生成処理を終えるとAAM法の処理を終了して、図9,10の処理に戻る。   If the gradation value of the dot size DS has not been reached (step S350: No), output gradation values are assigned to all the pixels in the basic cell CL1, and it is determined whether or not all the pixels in the cell have been processed. (Step S360). If output gradation values are not assigned to all pixels (step S360: No), the process returns to step S310 to search for the next non-output pixel. If output gradation values have been assigned to all the pixels (step S360: Yes), the dot generation processing ends because there are no pixels to which output gradation values are to be assigned. When the dot generation process is completed, the AAM process ends, and the process returns to the processes of FIGS.

また、図9のフローチャートのステップS130において、コントラストが基準値より大きい場合には(ステップS130:Yes)、当該基本セルCL1が階調値変化の大きいエッジを含んでいると判断して、ステップS140に進み、基本セルCL1を対象としてCC法による処理を行う。以下、基本セルを対象としたCC法の処理手順について図13のフローチャートに従って説明する。   If the contrast is larger than the reference value in step S130 in the flowchart of FIG. 9 (step S130: Yes), it is determined that the basic cell CL1 includes an edge with a large gradation value change, and step S140 is performed. Then, the processing by the CC method is performed for the basic cell CL1. Hereinafter, the processing procedure of the CC method for the basic cell will be described with reference to the flowchart of FIG.

基本セルCL1を対象としたCC法の処理を開始すると、CPU22は、注目した基本セルCL1内に、未処理画素があるか否かを判断する(ステップS400)。基本セルCL1内の画素をラスタ順に探索し、未処理画素が探索されると(ステップS400:Yes)、探索された未処理画素に注目してステップS405に進む。ステップS405以降の処理を行うことで、未処理画素がなくなっていれば(ステップS400:No)、基本セルを対象としたCC法の処理を終了する。   When the CC method processing for the basic cell CL1 is started, the CPU 22 determines whether or not there is an unprocessed pixel in the noticed basic cell CL1 (step S400). The pixels in the basic cell CL1 are searched in raster order, and when an unprocessed pixel is searched (step S400: Yes), the process proceeds to step S405 while paying attention to the searched unprocessed pixel. If there are no unprocessed pixels by performing the processing after step S405 (step S400: No), the CC method processing for the basic cell is terminated.

ステップS405に進むと、CPU22は、次式に従って、注目した未処理画素を含む小セルCL2内の階調値の重心位置G2(G2x,G2y)を算出する。ただし、「j」は小セルCL2内の各画素に1対1に対応する番号である。
G2x=Σjx×f(j) …(6)
G2y=Σjy×f(j) …(7)
In step S405, the CPU 22 calculates the gravity center position G2 (G2x, G2y) of the gradation value in the small cell CL2 including the focused unprocessed pixel according to the following equation. However, “j” is a number corresponding to each pixel in the small cell CL2 on a one-to-one basis.
G2x = Σ j x × f (j) (6)
G2y = Σ j y × f (j) (7)

次に、ステップS410では、CPU22は、小セルCL2の重心位置G2に最も近い未処理画素を探索する。   Next, in step S410, the CPU 22 searches for an unprocessed pixel that is closest to the gravity center position G2 of the small cell CL2.

なお、このときの探索においては、処理対象としている基本セルCL1内の未処理画素に加えて、隣接する基本セルCL1の未処理画素をさらに加えた複数の未処理画素のうちから、重心位置G2に最も近い画素を探索する。これにより、基本セルCL1の区切りにとらわれずに、重心位置G2に最も近い未処理画素が探索される。   In the search at this time, in addition to the unprocessed pixels in the basic cell CL1 to be processed, the center-of-gravity position G2 is selected from a plurality of unprocessed pixels obtained by further adding the unprocessed pixels of the adjacent basic cell CL1. Search for the pixel closest to. Thereby, the unprocessed pixel closest to the gravity center position G2 is searched without being bound by the division of the basic cell CL1.

次に、ステップS415では、CPU22は、探索画素の階調値が最大値、すなわち「255」であるか否かを判断する。最大値であれば(ステップS415:Yes)、ステップS420に進んで、探索画素に対応する出力バッファ24bの領域に階調値「255」を書き込むようにして、出力階調値の最大値を探索画素に付与してから、ステップS410に戻る。   Next, in step S415, the CPU 22 determines whether or not the gradation value of the search pixel is the maximum value, that is, “255”. If it is the maximum value (step S415: Yes), the process proceeds to step S420 to search for the maximum output gradation value by writing the gradation value “255” in the area of the output buffer 24b corresponding to the search pixel. After giving to the pixel, the process returns to step S410.

探索画素の階調値が最大値でなく(ステップS415:No)、ステップS425に進むと、小セルCL2内の階調値合計に探索画素の階調値を加えた値が、目標階調値以下であるか否かを判断する。目標階調値以下であれば(ステップS425:Yes)、ステップS430に進んで探索画素を小セルCL2に取り込む。目標階調値を超えていれば(ステップS425:No)、ステップS435に進んで、目標階調値からの不足分の階調値だけを小セルCL2に取り込んで、小セル内の階調値合計を目標階調値に合わせる(図8(d)参照)。   If the gradation value of the search pixel is not the maximum value (step S415: No), the process proceeds to step S425, and the value obtained by adding the gradation value of the search pixel to the total gradation value in the small cell CL2 is the target gradation value. It is determined whether or not: If it is below the target gradation value (step S425: Yes), the process proceeds to step S430, and the search pixel is taken into the small cell CL2. If the target gradation value is exceeded (step S425: No), the process proceeds to step S435, and only the insufficient gradation value from the target gradation value is taken into the small cell CL2, and the gradation value in the small cell is obtained. The total is adjusted to the target gradation value (see FIG. 8D).

ステップS430またはステップS435の処理を行うと、次に、新たに取り込んだ画素を考慮して、小セルCL2の新たな重心位置G2および階調値合計を算出し、更新する(ステップS440)。   If the processing of step S430 or step S435 is performed, next, the new center of gravity position G2 and the gradation value total of the small cell CL2 are calculated and updated in consideration of the newly captured pixel (step S440).

次に、小セルCL2内の階調値合計が目標階調値以上になっているか否かを判断する(ステップS445)。目標階調値未満であれば(ステップS445:No)、ステップS455に進んで未処理画素があるか否かを判断する。未処理画素が残っていれば(ステップS455:Yes)、ステップS410の処理に戻って、次の未処理画素を探索する処理を行う。小セルCL2内の階調値合計が目標階調値以上となるか(ステップS445:Yes)、または未処理画素が残っていなければ(ステップS455:No)、ステップS450に進んでドット生成処理を行う。   Next, it is determined whether or not the total gradation value in the small cell CL2 is equal to or greater than the target gradation value (step S445). If it is less than the target gradation value (step S445: No), the process proceeds to step S455 to determine whether there is an unprocessed pixel. If unprocessed pixels remain (step S455: Yes), the process returns to the process of step S410 to perform a process of searching for the next unprocessed pixel. If the total gradation value in the small cell CL2 is equal to or greater than the target gradation value (step S445: Yes), or if no unprocessed pixels remain (step S455: No), the process proceeds to step S450 to perform dot generation processing. Do.

CC法におけるドット生成処理では、図12のフローチャートにて説明したAAM法におけるドット生成処理と概ね同様の処理を小セルCL2に対して行うが、ドットサイズを決定するステップS300の処理が異なる。上述したように、CC法の目標階調値には予め決められた値(本実施形態では、「1275」)を用いているので、ステップS300では予め決められた目標階調値がドットサイズDSとして決定され、このドットサイズDSを用いてドット生成処理を行うことになる。CC法におけるドット生成処理を終えると、図13に戻って、未処理画素が残っているか否かを判断する(ステップS400)。ステップS400〜S455の処理を繰り返して、基本セルCL1内に未処理画素がなくなると(ステップS400:No)、基本セルを対象としたCC法の処理を終了して、図9,10の処理に戻る。   In the dot generation processing in the CC method, processing similar to the dot generation processing in the AAM method described in the flowchart of FIG. 12 is performed on the small cell CL2, but the processing in step S300 for determining the dot size is different. As described above, since a predetermined value (in this embodiment, “1275”) is used as the target gradation value of the CC method, the predetermined target gradation value is set to the dot size DS in step S300. The dot generation process is performed using this dot size DS. When the dot generation process in the CC method is completed, the process returns to FIG. 13 to determine whether or not unprocessed pixels remain (step S400). When the processing of steps S400 to S455 is repeated and there is no unprocessed pixel in the basic cell CL1 (step S400: No), the processing of the CC method for the basic cell is terminated, and the processing of FIGS. Return.

また、図9のステップS120にて基本セルCL1がハイライト領域と判断された場合に行うステップS145の基本セル拡大処理の処理手順について、図14のフローチャートに従って説明する。   The processing procedure of the basic cell enlargement process in step S145 performed when the basic cell CL1 is determined to be a highlight area in step S120 in FIG. 9 will be described with reference to the flowchart in FIG.

基本セル拡大処理を開始すると、まず、CPU22は、基本セルCL1の重心位置G1を算出する(ステップS500)。そして、次のステップS510〜S550の処理については、基本セルを対象としたCC法におけるステップS410およびS425〜S440の処理と同様の処理を基本セルCL1について行うことにより、新たな未処理画素を基本セルCL1に取り込んでセルを拡大する。そして、基本セルCL1内の階調値合計が目標階調値以上になっているか否かを判断する(ステップS560)。目標階調値に足りていなければ(ステップS560:No)、未処理画素が残っているか否かを判断する(ステップS570)。未処理画素が残っていれば(ステップS570:Yes)、ステップS510に戻る。セル内階調値が目標階調値以上になっているか(ステップS560:Yes)、または基本セルCL1内に未処理画素がなくなれば(ステップS570:No)、基本セル拡大処理を終了する。   When the basic cell enlargement process is started, first, the CPU 22 calculates the gravity center position G1 of the basic cell CL1 (step S500). And about the process of following step S510-S550, a new unprocessed pixel is made into a basic by performing the process similar to the process of step S410 and S425-S440 in CC method for object of a basic cell about basic cell CL1. The cell is expanded by taking in the cell CL1. Then, it is determined whether or not the total gradation value in the basic cell CL1 is equal to or greater than the target gradation value (step S560). If the target gradation value is not sufficient (step S560: No), it is determined whether or not unprocessed pixels remain (step S570). If unprocessed pixels remain (step S570: Yes), the process returns to step S510. If the in-cell tone value is equal to or higher than the target tone value (step S560: Yes) or if there is no unprocessed pixel in the basic cell CL1 (step S570: No), the basic cell enlargement process is terminated.

基本セル拡大処理を終了すると図9の処理に戻って、ドット生成処理を行う(ステップS150)。このときのドット生成処理は、基本セルを対象としたCC法の処理におけるステップS450と同様の処理を行うため説明を省略するが、拡大した基本セルCL1に対して、セル重心を中心として予め決められた目標階調値分の出力階調値を付与した状態で、ドット生成処理が終了する。   When the basic cell enlargement process is completed, the process returns to the process of FIG. 9 to perform the dot generation process (step S150). Since the dot generation processing at this time is the same as that in step S450 in the CC method processing for basic cells, a description thereof will be omitted, but for the enlarged basic cell CL1, the cell center of gravity is determined in advance. The dot generation process is completed in a state where output gradation values corresponding to the target gradation values are given.

ステップS210、S450またはS150において、ドットサイズ分の出力階調値を付与してドット生成処理を終了すると、次に、CPU22は、設定されたセル繰り返しマトリクスCMに含まれる全ての基本セルCL1について処理を行ったか否かを判断する(ステップS155)。全基本セルCL1について処理が行われていなければ(ステップS155:No)、セル繰り返しマトリクスCMの次のセル番号の基本セルCL1に注目してから(ステップS160)、ステップS110に戻って、次の基本セルCL1について処理を行う。   In step S210, S450, or S150, when the output gradation value for the dot size is assigned and the dot generation process is completed, the CPU 22 then processes all the basic cells CL1 included in the set cell repetition matrix CM. Is determined (step S155). If all the basic cells CL1 have not been processed (step S155: No), after paying attention to the basic cell CL1 of the next cell number in the cell repetition matrix CM (step S160), the process returns to step S110, and the next Processing is performed on the basic cell CL1.

設定されたセル繰り返しマトリクスCMに含まれる全ての基本セルCL1について処理が行われていれば(ステップS155:Yes)、ステップS165に進んで、CPU22は、入力画像データの画像領域において、設定されたセル繰り返しマトリクスCMの右側、すなわちx方向に未処理画素があるか否かを判断する。右側に未処理画素があれば(ステップS165:Yes)、セル繰り返しマトリクスCMを1つ右側のセルブロックに配置するようにして、セル繰り返しマトリクスCMを設定する(ステップS170)。そして新たに配置したセル繰り返しマトリクスCM内の基本セルCL1について、ステップS110以降の処理を行う。右側に未処理画素がなければ(ステップS165:No)、設定されたセル繰り返しマトリクスCMより下側、すなわちy方向に未処理画素があるか否かを判断する(ステップS175)。下側に未処理画素があれば(ステップS175:Yes)、セル繰り返しマトリクスCMをセルブロック1つ分下側の左端のセルブロックにセル繰り返しマトリクスCMを配置して(ステップS180)、新たに配置したセル繰り返しマトリクスCM内の基本セルCL1について、ステップS110以降の処理を行う。このようにラスタ順にセル繰り返しマトリクスCMの配置を繰り返して、下側に未処理画素がなくなれば(ステップS175:No)、図9,10のハーフトーン処理を終了する。   If processing has been performed for all the basic cells CL1 included in the set cell repetition matrix CM (step S155: Yes), the process proceeds to step S165, and the CPU 22 sets the image area of the input image data. It is determined whether there is an unprocessed pixel on the right side of the cell repetition matrix CM, that is, in the x direction. If there is an unprocessed pixel on the right side (step S165: Yes), the cell repetition matrix CM is set so that the cell repetition matrix CM is arranged in the right cell block (step S170). And the process after step S110 is performed about the basic cell CL1 in the newly arranged cell repetition matrix CM. If there is no unprocessed pixel on the right side (step S165: No), it is determined whether there is an unprocessed pixel below the set cell repetition matrix CM, that is, in the y direction (step S175). If there is an unprocessed pixel on the lower side (step S175: Yes), the cell repetition matrix CM is arranged in the leftmost cell block on the lower side by one cell block (step S180) and newly arranged. For the basic cell CL1 in the cell repetition matrix CM, the processing after step S110 is performed. In this way, the arrangement of the cell repetition matrix CM is repeated in the raster order, and when there are no unprocessed pixels on the lower side (step S175: No), the halftone process of FIGS.

上述した図9,10のハーフトーン処理を行うことにより、入力バッファ24aに格納した色変換後の入力画像データから、出力バッファ24b上には、各画素ごとに「0」または「255」の出力階調値を有する出力画像データが生成される。このハーフトーン処理は、入力画像データのC,M,Y,K各色について行う。ハーフトーン処理部320は、生成したC,M,Y,Kの出力画像データを、出力バッファ24bから読み出して、パルス幅変調部330に出力する。パルス幅変調部330は、出力画像データにパルス幅変調を施して、駆動データ形式の出力画像データに変換し、印刷エンジン400に出力する。印刷エンジン400のレーザドライバ410は、駆動データ形式の出力画像データに従ってレーザダイオード420を駆動するようにして、出力階調値が付与された画素にドットを形成することにより、C,M,Y,Kの画像を重ね合わせるようにして、入力画像データに対応したカラー画像を出力する。   By performing the halftone processing of FIGS. 9 and 10 described above, “0” or “255” is output for each pixel from the input image data after color conversion stored in the input buffer 24a onto the output buffer 24b. Output image data having gradation values is generated. This halftone process is performed for each color of C, M, Y, and K of the input image data. The halftone processing unit 320 reads out the generated C, M, Y, and K output image data from the output buffer 24 b and outputs them to the pulse width modulation unit 330. The pulse width modulation unit 330 performs pulse width modulation on the output image data, converts the output image data into output image data in a drive data format, and outputs the output image data to the print engine 400. The laser driver 410 of the print engine 400 drives the laser diode 420 according to the output image data in the drive data format, and forms dots on the pixels to which the output gradation value is given, thereby forming C, M, Y, A color image corresponding to the input image data is output by superimposing the K images.

図15に、本実施形態のハーフトーン処理において設定されたセルの一例を示す。図15(a)は、基本セルCL1に区画された画像領域の一例であり、図15(b)は、図15(a)の基本セルを、小セルCL2に区画した例を示している。図15(a)では、セル繰り返しマトリクスCMを配置して、エッジEを一部に含まない基本セルCL1を実線、エッジEを一部に含む基本セルCL1を破線で示している。また、図15(a)の例では、エッジEより左側が階調値の高い領域(「200」)、右側が階調値が小さい領域(「50」)である。エッジEを一部にも含まない基本セルCL1に対しては、AAM法によるハーフトーン処理が行われる。一方、エッジEを一部にでも含む基本セルCL1については、図15(b)に示すように、CC法の処理によって1つの基本セルCL1が複数の小セルCL2に区画される。   FIG. 15 shows an example of a cell set in the halftone process of this embodiment. FIG. 15A shows an example of an image area partitioned into basic cells CL1, and FIG. 15B shows an example where the basic cell shown in FIG. 15A is partitioned into small cells CL2. In FIG. 15A, the cell repetition matrix CM is arranged, and the basic cell CL1 that does not include the edge E as a part is indicated by a solid line, and the basic cell CL1 that includes the edge E as a part is indicated by a broken line. In the example of FIG. 15A, the left side from the edge E is a region with a high gradation value (“200”), and the right side is a region with a small gradation value (“50”). A halftone process by the AAM method is performed on the basic cell CL1 which does not include the edge E in part. On the other hand, with respect to the basic cell CL1 including even the edge E as a part, as shown in FIG. 15B, one basic cell CL1 is partitioned into a plurality of small cells CL2 by the process of the CC method.

また、ステップS410において、処理対象としている基本セルCL1の未処理画素、および隣接する基本セルCL1の未処理画素のうちから最も近い画素を探索したことにより、エッジEを含む基本セルCL1の境界部分について、隣接する基本セルCL1にまたがるような小セルCL2の設定が許容されている(例えば、図15(b)の小セルA参照)。これにより、基本セルCL1間の境界部分に設定される小セルCL2であっても、セル形状の偏りの発生を抑制して、略円形状となる。   In step S410, the boundary portion of the basic cell CL1 including the edge E is obtained by searching for the nearest pixel from the unprocessed pixels of the basic cell CL1 to be processed and the unprocessed pixels of the adjacent basic cell CL1. , The setting of the small cell CL2 that spans the adjacent basic cell CL1 is allowed (see, for example, the small cell A in FIG. 15B). Thereby, even if it is small cell CL2 set to the boundary part between basic cells CL1, generation | occurrence | production of the deviation of a cell shape is suppressed and it becomes a substantially circular shape.

以下、第1の実施形態における効果を記載する。   Hereinafter, effects in the first embodiment will be described.

(1)エッジを含まないと判定された基本セルCL1については、セル繰り返しマトリクスCMを用いて、予め決められた領域に区画して、基本セルCL1を設定するので、基本セルCL1の設定に要する演算量が少ない。特に、CC法を用いて基本セルCL1を設定する場合に比べると、階調値合計や重心位置の更新演算などに要する演算量が少なくなる。また、エッジを含むと判定された基本セルCL1については、CC法の手法によりさらに小セルCL2に区画し、小セルCL2の重心位置G2に出力階調値を付与するので、エッジ部分の解像性が高くなる。したがって、エッジ再現性に優れたハーフトーン処理を高速に行うことが可能となる。また、生成された出力画像データの出力階調値に従ってドットを形成することにより、エッジの再現性に優れた画像を高速に出力することが可能である。   (1) The basic cell CL1 determined not to include an edge is partitioned into predetermined areas using the cell repetition matrix CM, and the basic cell CL1 is set. Therefore, it is necessary to set the basic cell CL1. The amount of calculation is small. In particular, compared with the case where the basic cell CL1 is set using the CC method, the amount of calculation required for the calculation of the sum of gradation values, the update of the center of gravity position, etc. is reduced. Further, the basic cell CL1 determined to include an edge is further divided into small cells CL2 by the CC method, and an output gradation value is given to the center of gravity position G2 of the small cell CL2. Increases nature. Therefore, halftone processing with excellent edge reproducibility can be performed at high speed. Further, by forming dots according to the output gradation value of the generated output image data, it is possible to output an image with excellent edge reproducibility at high speed.

(2)エッジを含まないと判定された基本セルCL1を対象として行うAAM法では、基本セルCL1に対して行うCC法に比べてセル形状が大きくなるため、セル内階調値合計も大きく、出力階調値が付与される画素数がより多くなりやすい。このため、1つのセルに形成されるドットサイズが大きくなり、小さいドットを露光・現像・定着することによる不安定なドット形成を抑制することになるので、ドット形成がより安定する。したがって、エッジを含まない領域について、階調安定性により優れた画像を出力することができる。   (2) In the AAM method performed on the basic cell CL1 determined not to include an edge, the cell shape is larger than the CC method performed on the basic cell CL1, and thus the sum of in-cell gradation values is also large. The number of pixels to which output gradation values are assigned tends to increase. For this reason, the dot size formed in one cell increases, and unstable dot formation due to exposure, development, and fixing of small dots is suppressed, so dot formation is more stable. Therefore, it is possible to output an image that is superior in gradation stability for a region that does not include an edge.

(3)エッジを含むと判定された基本セルCL1を対象として行うCC法では、目標階調値に達するまで画素を次々に取り込むようにして小セルCL2に区画しているので、小セルの大きさのばらつきを抑え、出力階調値が付与される画素間の距離のばらつきが抑制される。したがって、出力階調値が付与される画素位置の分散性に優れたハーフトーン処理を行って、画質に優れた画像を出力できるようになる。また、目標階調値は、設定された解像度に応じてドットが安定して形成されるドットサイズに対応しているので、ドット解像度を高めながら安定したドット形成により、階調安定性に優れた画像を出力することができる。   (3) In the CC method performed on the basic cell CL1 determined to include an edge, the pixels are divided into small cells CL2 so that pixels are successively taken in until the target gradation value is reached. The variation in the distance is suppressed, and the variation in the distance between the pixels to which the output gradation value is given is suppressed. Therefore, it is possible to output an image with excellent image quality by performing halftone processing with excellent dispersibility of pixel positions to which output gradation values are assigned. In addition, the target gradation value corresponds to the dot size where dots are stably formed according to the set resolution. Therefore, stable dot formation while increasing dot resolution provides excellent gradation stability. An image can be output.

(4)CC法では、セル内重心位置G2に近い画素から順番に取り込んで、小セルCL2を拡大するので、小セルCL2は重心位置G2を中心として略円形状に拡大する可能性が高い。これにより、小セルCL2間で出力階調値が付与される画素間の距離のばらつきが抑制されるので、出力階調値が付与される画素位置の分散性に優れたハーフトーン処理を行って、画質に優れた画像を出力することが可能になる。   (4) In the CC method, since the small cells CL2 are enlarged in order from the pixels close to the in-cell center of gravity position G2, the small cells CL2 are highly likely to expand into a substantially circular shape with the center of gravity position G2 as the center. This suppresses variations in the distance between pixels to which output gradation values are assigned between the small cells CL2, so that halftone processing with excellent dispersion of pixel positions to which output gradation values are assigned is performed. It is possible to output an image with excellent image quality.

(5)ドット生成処理において出力階調値を付与する際、目標階調値分のセル内階調値合計を、重心位置に近い画素から順番に、出力階調値「255」ずつ付与しているので、生成されるドットは重心位置から略円形状に拡大する。これにより、出力階調値が付与される画素位置の分散性により優れたハーフトーン処理を行って、画質により優れた画像を出力することができる。また、セル内階調値合計に応じて出力階調値が付与される画素数(ドットサイズ)を決定しているため、入力画像データの階調再現性に優れた画像を出力することができる。   (5) When assigning output gradation values in the dot generation process, the output gradation values “255” are assigned in order from the pixels closer to the center of gravity in the sum of the in-cell gradation values for the target gradation values. Therefore, the generated dots expand from the center of gravity position to a substantially circular shape. Accordingly, it is possible to perform a halftone process that is superior in the dispersibility of the pixel position to which the output gradation value is given, and to output an image that is superior in image quality. Further, since the number of pixels (dot size) to which the output gradation value is given is determined according to the total gradation value in the cell, an image with excellent gradation reproducibility of the input image data can be output. .

(6)基本セルCL1のうち、ハイライト領域と判定された基本セルCL1については、セル内階調値の重心位置G1に近い画素を、隣接する基本セルCL1から取り込んでセルを拡大することにより、セル内階調値合計が目標階調値に達するようにしている(ステップS145:基本セル拡大処理)。これにより、ドットが生成される画素数が少ないハイライト領域についても、目標階調値に対応する大きさのドット(本実施形態では5画素分の大きさ)を生成するため、安定したドットが生成される。したがって、ハイライト領域において階調安定性に優れた画像を得ることができる。また、セル拡大処理においても、重心位置に近い画素から順番に取り込むため基本セルCL1は略円形状に拡大するので、ハイライト領域についても、画質に優れた画像を出力することが可能である。   (6) Among the basic cells CL1, for the basic cell CL1 determined to be the highlight region, the pixels near the barycentric position G1 of the in-cell gradation value are taken from the adjacent basic cell CL1 to expand the cell. The total tone value in the cell reaches the target tone value (step S145: basic cell enlargement process). Thereby, even in a highlight area where the number of pixels in which dots are generated is small, a dot having a size corresponding to the target gradation value (a size corresponding to five pixels in the present embodiment) is generated. Generated. Therefore, an image having excellent gradation stability in the highlight region can be obtained. In the cell enlargement process, since the basic cell CL1 is enlarged in a substantially circular shape in order from the pixels close to the center of gravity, an image with excellent image quality can be output even in the highlight area.

(7)エッジの判定は、基本セルCL1内階調値の階調値の最大値と最小値との差分値であるコントラストを算出し、コントラストが所定の基準値を超えているか判断することにより行っている(ステップS120,S130)。したがって、エッジ判定を演算量が少ない簡易な処理で判断することができ、エッジ判定を伴うハーフトーン処理をより高速に行うことができる。   (7) Edge determination is performed by calculating contrast, which is a difference value between the maximum value and the minimum value of the gradation values in the basic cell CL1, and determining whether the contrast exceeds a predetermined reference value. (Steps S120 and S130). Therefore, the edge determination can be determined by a simple process with a small calculation amount, and the halftone process with the edge determination can be performed at a higher speed.

(8)小セルCL2に新たに取り込む未処理画素を探索する際に(ステップS410)、処理対象としている基本セルCL1の未処理画素に加えて、隣接する基本セルCL1の未処理画素をさらに加えた複数の未処理画素のうちから、重心位置G2に最も近い画素を探索したので、基本セルCL1間の境界部分に設定される小セルCL2の形状に偏りが生じる可能性は低くなり、略円形状に近付く。このため、ドット位置の偏りが小さく、出力階調値が付与される画素位置の分散性に優れたハーフトーン処理を行って、より画質に優れた画像を出力することが可能である。   (8) When searching for unprocessed pixels to be newly taken into the small cell CL2 (step S410), in addition to the unprocessed pixels of the basic cell CL1 to be processed, the unprocessed pixels of the adjacent basic cell CL1 are further added. Since the pixel closest to the center-of-gravity position G2 is searched from among the plurality of unprocessed pixels, the possibility that the shape of the small cell CL2 set in the boundary portion between the basic cells CL1 is biased is low, and is substantially circular. Approach the shape. For this reason, it is possible to output an image with higher image quality by performing halftone processing with small dot position deviation and excellent dispersibility of pixel positions to which output gradation values are applied.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described.

第2の実施形態では、エッジを含むと判定された基本セルCL1については、基本セルCL1の領域にとらわれることなく、CC法による小セルCL2の設定を行う。すなわち、エッジを含むと判定された基本セルCL1のうち、互いに隣接する基本セルCL1の領域が合わさった領域に対してCC法によるハーフトーン処理を適用する。以下、第2の実施形態に係るハーフトーン処理について、図16,17のフローチャートに従って説明する。なお、第1の実施形態と同様の処理を行う部分については説明を省略している。   In the second embodiment, for the basic cell CL1 determined to include an edge, the small cell CL2 is set by the CC method without being constrained by the area of the basic cell CL1. That is, the halftone process by the CC method is applied to a region where the regions of the basic cells CL1 adjacent to each other among the basic cells CL1 determined to include an edge are combined. Hereinafter, halftone processing according to the second embodiment will be described with reference to the flowcharts of FIGS. Note that the description of the part that performs the same processing as in the first embodiment is omitted.

ハーフトーン処理を開始して、ステップS600〜S625の処理については、第1の実施形態におけるステップS100〜S125の処理と同様であるため、説明を省略する。   Since the halftone process is started and the processes in steps S600 to S625 are the same as the processes in steps S100 to S125 in the first embodiment, the description thereof is omitted.

ステップS625からステップS630に進むと、CPU(エッジ判定部323)22は、基本セルCL1がエッジを含んでいるか否かを判定する。基本セルCL1がエッジを含まないと判定すると(ステップS630:No)、ステップS635に進んで、第1の実施形態において説明したAAM法と同様の処理を行う。一方、基本セルCL1がエッジを含むと判定すると(ステップS630:Yes)、第1の実施形態とは異なり、基本セルを対象としたCC法の処理を行うことなく、ステップS655に進む。次のステップS655〜S680の処理についても、第1の実施形態におけるステップS155〜S180と同様の処理を行うため説明を省略する。   When the process proceeds from step S625 to step S630, the CPU (edge determination unit 323) 22 determines whether or not the basic cell CL1 includes an edge. If it is determined that the basic cell CL1 does not include an edge (step S630: No), the process proceeds to step S635, and the same processing as the AAM method described in the first embodiment is performed. On the other hand, if it is determined that the basic cell CL1 includes an edge (step S630: Yes), unlike the first embodiment, the process proceeds to step S655 without performing the CC method for the basic cell. Regarding the processing of the next steps S655 to S680, the same processing as that of steps S155 to S180 in the first embodiment is performed, and thus the description thereof is omitted.

ただし、ステップS675において、設定されたセル繰り返しマトリクスCMより下に未処理画素がないと判断されると(ステップS675:No)、ステップS685に進む。このとき、入力画像データの画像領域は、エッジを含まない基本セルCL1の領域にはAAM法による出力階調値が付与され、エッジを含む基本セルCL1の領域は未処理画素のままの状態となっている。ステップS685では、この未処理画素が残った全領域に対して、CC法による処理(全未処理画素を対象としたCC法)を行う。以下、図18のフローチャートに従って説明する。   However, if it is determined in step S675 that there is no unprocessed pixel below the set cell repetition matrix CM (step S675: No), the process proceeds to step S685. At this time, in the image area of the input image data, the output gradation value by the AAM method is given to the area of the basic cell CL1 not including the edge, and the area of the basic cell CL1 including the edge remains in the unprocessed pixel state. It has become. In step S685, the CC method (CC method for all unprocessed pixels) is performed on all regions where the unprocessed pixels remain. Hereinafter, description will be made with reference to the flowchart of FIG.

全未処理画素を対象としたCC法を開始すると、入力画像データの全画像領域について、未処理画素が残っているか否かを判断する(ステップS700)。未処理画素が残っていれば(ステップS700:Yes)、ラスタ順に探索して、最初に探索された未処理画素を初期画素として小セルCL2に取り込んでから、小セルCL2内の重心位置を算出する(ステップS705)。   When the CC method for all unprocessed pixels is started, it is determined whether or not unprocessed pixels remain in all image regions of the input image data (step S700). If unprocessed pixels remain (step S700: Yes), search is performed in raster order, the unprocessed pixels searched first are taken as initial pixels in the small cell CL2, and then the position of the center of gravity in the small cell CL2 is calculated. (Step S705).

ステップS710〜ステップS755の処理は、第1の実施形態のステップS405〜S455と同様に行って、入力画像データの画像領域に未処理画素がなくなるまで、ステップS700〜S750の処理を繰り返し行う。そして、未処理画素がなくなると、図18の全未処理画素を対象としたCC法、および図16,17のハーフトーン処理を終了する。   The processes in steps S710 to S755 are performed in the same manner as steps S405 to S455 in the first embodiment, and the processes in steps S700 to S750 are repeated until there are no unprocessed pixels in the image area of the input image data. When there are no unprocessed pixels, the CC method for all unprocessed pixels in FIG. 18 and the halftone processes in FIGS.

以上に説明したハーフトーン処理によれば、エッジを含まないと判定された基本セルCL1について、AAM法による処理を行ってから、残った画像領域(すなわち、エッジを含むと判定された基本セルCL1の領域)については、基本セルCL1の区切りにとらわれることなく、全未処理画素に対してCC法による処理が行われる。これにより、エッジEを一部に含まない基本セル(図15(a)の実線の基本セル参照)CL1については、AAM法によるハーフトーン処理が行われ、エッジEを一部にでも含む基本セル(図15(a)の破線の基本セル参照)の領域については、CC法によるハーフトーン処理が行われる。   According to the halftone processing described above, the basic cell CL1 determined not to include an edge is processed by the AAM method, and the remaining image region (that is, the basic cell CL1 determined to include an edge) is processed. In the case of (region), all the unprocessed pixels are processed by the CC method without being bound by the division of the basic cell CL1. As a result, for a basic cell CL1 that does not include the edge E (see the solid line basic cell in FIG. 15A), a halftone process is performed by the AAM method, and a basic cell that includes the edge E as a part thereof. For the region (see the broken line basic cell in FIG. 15A), halftone processing by the CC method is performed.

第2の実施形態によれば、第1の実施形態における(1)〜(7)と同様の効果を得ることができる。   According to the second embodiment, the same effects as (1) to (7) in the first embodiment can be obtained.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。
(Third embodiment)
Next, a third embodiment of the present invention will be described.

第3の実施形態のパルス幅変調部330は、ハーフトーン処理部320から出力された出力画像データにパルス幅変調を施すことにより、2以上のK(Kは整数)段階のパルス幅をもつパルス幅信号に変換することが可能である。本実施形態では、パルス幅変調部330が255段階のパルス幅信号に対応する場合について説明する。   The pulse width modulation unit 330 according to the third embodiment performs pulse width modulation on the output image data output from the halftone processing unit 320 to thereby generate a pulse having a pulse width of 2 or more K (K is an integer). It can be converted to a width signal. In the present embodiment, a case will be described in which the pulse width modulation unit 330 corresponds to a 255-level pulse width signal.

第1の実施形態では、式(5)にて説明したように「127」以下の階調値分を切り捨てて、「127」より大きい階調値については「255」分のドットを生成することとなっていた。このため、図6の例では、15個分の画素に「255」の階調値を付与して、残った「115」の階調値分には出力階調値を付与していなかった。   In the first embodiment, as described in Expression (5), the gradation value equal to or smaller than “127” is rounded down, and the dot corresponding to “255” is generated for the gradation value larger than “127”. It was. For this reason, in the example of FIG. 6, the gradation value “255” is assigned to 15 pixels, and the output gradation value is not assigned to the remaining gradation value “115”.

これに対し、第3の実施形態では、パルス幅変調部330が255段階のパルス幅信号を生成可能であるため、図6(b)の例の場合であれば、階調値付与部326は、残った階調値「115」を重心位置G1に近い画素(m+6,n+9)に付与する。   On the other hand, in the third embodiment, the pulse width modulation unit 330 can generate a 255-level pulse width signal. Therefore, in the case of the example of FIG. The remaining gradation value “115” is assigned to the pixel (m + 6, n + 9) close to the gravity center position G1.

そのため、階調値付与部326は、出力画像データを生成する際に、出力階調値を付与した画素について、次々に出力階調値を付与することにより、付与された画素の集合が重心位置G1から拡大する方向、すなわちドット成長方向を示すドット成長データ(拡大方向情報)を生成する。   Therefore, when generating the output image data, the tone value assigning unit 326 assigns the output tone value to the pixels to which the output tone value has been assigned one after another, so that the set of assigned pixels becomes the center of gravity position. Generate dot growth data (enlargement direction information) indicating the direction of enlargement from G1, that is, the dot growth direction.

パルス幅変調部330は、階調値「255」未満の出力階調値を付与する際に、ドット成長データを参照して、出力階調値の付与対象の画素内において、ドット成長方向に対する反対側、すなわち重心位置により近い側を起点として出力階調値分のパルス幅信号を生成する。   The pulse width modulation unit 330 refers to the dot growth data when assigning an output gradation value less than the gradation value “255”, and in the pixel to which the output gradation value is to be applied, it is opposite to the dot growth direction. A pulse width signal corresponding to the output gradation value is generated starting from the side, that is, the side closer to the center of gravity.

このパルス幅変調を図6の例の場合について行うと、図19に示したように、画素(m+6,n+9)に対して、画素の左側から出力階調値「115」分のパルス幅を有したドットが形成される。こうすることにより、基本セルCL1には、1つの塊状のドットが生成され、ドットの孤立が抑制される。   When this pulse width modulation is performed in the example of FIG. 6, as shown in FIG. 19, the pixel (m + 6, n + 9) has a pulse width corresponding to the output gradation value “115” from the left side of the pixel. Dots are formed. By doing so, one block-like dot is generated in the basic cell CL1, and dot isolation is suppressed.

第3の実施形態によれば、第1の実施形態における(1)〜(7)に加えて、さらに以下の効果を得ることができる。   According to the third embodiment, in addition to (1) to (7) in the first embodiment, the following effects can be further obtained.

(9)AAM法において、基本セルCL1内階調値に対応する分の目標階調値を付与したことにより、ハーフトーン処理前後におけるセル内階調値合計と、出力階調値の合計とが等しくなるので、入力画像データの階調再現性により優れたハーフトーン処理を行うことができる。   (9) In the AAM method, by adding the target gradation values corresponding to the gradation values in the basic cell CL1, the sum of the gradation values in the cell before and after the halftone processing and the sum of the output gradation values are Therefore, it is possible to perform halftone processing that is superior in tone reproducibility of input image data.

(10)ドットの孤立を抑制することにより、ドット形成がより安定し、階調安定性により優れた画像を出力することができる。   (10) By suppressing the isolation of dots, dot formation is more stable, and an image superior in gradation stability can be output.

以上、本発明の第1ないし第3の実施形態について説明したが、本発明はこれに限られることなく、様々な形態とすることもできる。以下、本発明の変形例について説明する。   The first to third embodiments of the present invention have been described above. However, the present invention is not limited to this, and various forms can be adopted. Hereinafter, modifications of the present invention will be described.

(変形例1)上記第1ないし第3の実施形態では、基本セル内CL1の階調値の最大値と最小値との差分値を用いてエッジを判定したが、エッジの判定方法についてはこれに限られない。例えば、SobelやPrewittなどのエッジ検出フィルタを用いてエッジを検出して、基本セルCL1内にエッジを含んでいるかによりエッジの判定を行ってもよい。また、PDL(Page Description Language)などのプリンタ言語で記述した印刷データをラスタライズする際に、テキスト部分の描画範囲を示す付加情報を入力画像データに加えておき、ハーフトーン処理において、付加情報を参照してテキストの描画範囲を含む基本セルCL1を、エッジを含む基本セルCL1と判定するようにしてもよい。このようにすれば、テキスト部分について視認性のよい画像を出力することができる。   (Modification 1) In the first to third embodiments, the edge is determined by using the difference value between the maximum value and the minimum value of the gradation value of the CL1 in the basic cell. Not limited to. For example, the edge may be detected by detecting an edge using an edge detection filter such as Sobel or Prewitt, and whether the edge is included in the basic cell CL1. In addition, when rasterizing print data described in a printer language such as PDL (Page Description Language), additional information indicating the drawing range of the text portion is added to the input image data, and the additional information is referred to in halftone processing. Then, the basic cell CL1 including the text drawing range may be determined as the basic cell CL1 including the edge. In this way, it is possible to output an image with good visibility for the text portion.

(変形例2)第2の変形例として、本発明は、ホストコンピュータ10側でハーフトーン処理を行うシステム構成としてもよい。すなわち、図20に示すように、ホストコンピュータ(画像処理装置)10は、ラスタライズ部200、色変換部310およびハーフトーン処理部320を有する画像処理部300を備えている。このとき、ハーフトーン処理部320は、入力画像データにハーフトーン処理を施して出力画像データに変換し、色変換後の出力画像データを画像出力装置20に出力することにより、入力画像データの印刷を行う。   (Modification 2) As a second modification, the present invention may have a system configuration in which halftone processing is performed on the host computer 10 side. That is, as shown in FIG. 20, the host computer (image processing apparatus) 10 includes an image processing unit 300 including a rasterizing unit 200, a color conversion unit 310, and a halftone processing unit 320. At this time, the halftone processing unit 320 performs halftone processing on the input image data to convert it to output image data, and outputs the output image data after color conversion to the image output device 20, thereby printing the input image data. I do.

(変形例3)上記第1ないし第3の実施形態では、エッジを含む基本セルCL1をCC法を用いて小セルCL2に分割する場合について説明したが、小セルCL2に分割する際にも、予め決められたセル形状に区画してもよい。すなわち、基本セルCL1を複数の小セルCL2に区画するためのセルパターンのデータを予めROM23に記憶しておき、エッジを含むと判定された基本セルCL1に対しては、セルパターンを配置することによって、小セルCL2に分割する。このようにしても、エッジ部分の解像性を高めることができるので、エッジ再現性に優れたハーフトーン処理を高速に行うことが可能である。   (Modification 3) In the first to third embodiments, the case where the basic cell CL1 including the edge is divided into the small cells CL2 using the CC method has been described, but also when dividing into the small cells CL2, You may divide into the cell shape decided beforehand. That is, cell pattern data for partitioning the basic cell CL1 into a plurality of small cells CL2 is stored in the ROM 23 in advance, and the cell pattern is arranged for the basic cell CL1 determined to include an edge. To divide into small cells CL2. Even in this case, since the resolution of the edge portion can be improved, halftone processing excellent in edge reproducibility can be performed at high speed.

(変形例4)セル繰り返しマトリクスCMについて、生成される基本セルCL1の形状・大きさは図4の例に限られない。例えば、基本セルの形状が四角形の形状であったり、六角形の形状の基本セルCL1がハニカム状に配列したマトリクスであってもよい。また、C,M,Y,Kの各色について異なるマトリクスを適用するようにしてもよい。図4の例では、x,y方向に沿うように基本セルが並んでいるが、各色間で、例えば、30°ずつずれた方向に基本セルが並んだマトリスクを適用するようにすれば、各色間のドット位置が適宜ばらつき、モアレの少ない好適な画像を得ることができる。   (Modification 4) Regarding the cell repetition matrix CM, the shape and size of the generated basic cell CL1 are not limited to the example of FIG. For example, the shape of the basic cells may be a square shape, or a matrix in which the basic cells CL1 having a hexagonal shape are arranged in a honeycomb shape. Different matrices may be applied to C, M, Y, and K colors. In the example of FIG. 4, the basic cells are arranged along the x and y directions. However, for example, if a mat risk in which the basic cells are arranged in a direction shifted by 30 ° is applied between the colors, each color is applied. It is possible to obtain a suitable image with little variation in dot positions between them and less moire.

(変形例5)上記第1ないし第3の実施形態では、CPU22が画像処理プログラムGPを実行することにより、ソフトウェアによってハーフトーン処理を実現する例について説明した。ハーフトーン処理を行う機能を、ASICなどのハードウェアにより実現してもよい。もちろん、一部の機能をハードウェアにもたせて、ハードウェアがもたない機能をソフトウェアによって実現するようにしてもよい。   (Modification 5) In the first to third embodiments, an example has been described in which the CPU 22 executes the image processing program GP to realize halftone processing by software. The function of performing halftone processing may be realized by hardware such as ASIC. Of course, a part of the functions may be given to the hardware, and the functions that the hardware does not have may be realized by software.

(変形例6)上記第1ないし第3の実施形態において、画像処理装置としての画像出力装置は、レーザプリンタであった。本発明はこれに限定されるものでなく、例えば、インクジェットプリンタやサーマルプリンタなど、他の印刷方式のプリンタや複写機、ワープロ、ファックス、ディスプレイなどの種々の機器に適用することができる。   (Modification 6) In the first to third embodiments, the image output apparatus as the image processing apparatus is a laser printer. The present invention is not limited to this, and can be applied to various devices such as printers, copiers, word processors, fax machines, displays, and the like of other printing systems such as inkjet printers and thermal printers.

第1の実施形態に係る画像出力システムの構成を示した図。The figure which showed the structure of the image output system which concerns on 1st Embodiment. 画像出力装置のハードウェア構成を示した図。The figure which showed the hardware constitutions of the image output device. ハーフトーン処理部の構成を示したブロック図。The block diagram which showed the structure of the halftone process part. セル繰り返しマトリクスの一例を示した図。The figure which showed an example of the cell repetition matrix. セル繰り返しマトリクスによる基本セル設定を説明するための図。The figure for demonstrating the basic cell setting by a cell repetition matrix. ドット生成処理を説明するための図であり、(a)は基本セルの一例、(b)は出力階調値を付与した一例を示した図。It is a figure for demonstrating a dot production | generation process, (a) is an example of a basic cell, (b) is a figure which showed an example which provided the output gradation value. CC法の処理対象とする基本セルの一例を示した図。The figure which showed an example of the basic cell made into the processing object of CC method. CC法により行う小セル設定を説明するための図。The figure for demonstrating the small cell setting performed by CC method. ハーフトーン処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the halftone process. ハーフトーン処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the halftone process. AAM法の処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the process of AAM method. ドット生成処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the dot production | generation process. 基本セルを対象としたCC法の処理の流れを示したフローチャート。The flowchart which showed the flow of the process of CC method targeting the basic cell. 基本セル拡大処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the basic cell expansion process. セル設定の一例を示した図。The figure which showed an example of the cell setting. 第2の実施形態に係るハーフトーン処理の処理手順を示したフローチャート。10 is a flowchart showing a processing procedure of halftone processing according to the second embodiment. ハーフトーン処理の処理手順を示したフローチャート。The flowchart which showed the process sequence of the halftone process. 全未処理画素を対象としたCC法の処理手順を示したフローチャート。The flowchart which showed the processing procedure of CC method for all the unprocessed pixels. 第3の実施形態において、出力されるドットの一例を示した図。The figure which showed an example of the dot output in 3rd Embodiment. 第2の変形例を説明するための図。The figure for demonstrating a 2nd modification.

符号の説明Explanation of symbols

10…ホストコンピュータ、20…画像出力装置、21…入力インターフェイス、22…CPU、23…記憶手段としてのROM、24…RAM、24a…入力バッファ、24b…出力バッファ、100…アプリケーション部、200…ラスタライズ部、300…画像処理装置としての画像処理部、310…色変換部、320…ハーフトーン処理部、321…第1の画素群設定部としての基本セル設定部、322…ハイライト判定部、323…エッジ判定部、324…画素群拡大部としての基本セル拡大部、325…第2の画素群設定部としての小セル設定部、326…階調値付与部、330…パルス幅変調部、400…画像出力部としての印刷エンジン、410…レーザドライバ、420…レーザダイオード、CD…パターンデータとしてのセルパターンデータ、GP…画像処理プログラム、CM…セル繰り返しマトリクス、CL1…基本セル、CL2…小セル、CB…セルブロック、G1…基本セルの重心位置、G2…小セルの重心位置。   DESCRIPTION OF SYMBOLS 10 ... Host computer, 20 ... Image output device, 21 ... Input interface, 22 ... CPU, 23 ... ROM as storage means, 24 ... RAM, 24a ... Input buffer, 24b ... Output buffer, 100 ... Application part, 200 ... Rasterization 300, an image processing unit as an image processing apparatus, 310, a color conversion unit, 320, a halftone processing unit, 321, a basic cell setting unit as a first pixel group setting unit, 322, a highlight determination unit, 323. ... edge determination unit, 324 ... basic cell enlargement unit as pixel group enlargement unit, 325 ... small cell setting unit as second pixel group setting unit, 326 ... gradation value giving unit, 330 ... pulse width modulation unit, 400 ... print engine as image output unit, 410 ... laser driver, 420 ... laser diode, CD ... as pattern data Cell pattern data, GP ... image processing program, CM ... cell repetition matrix, CL1 ... basic cells, CL2 ... small cells, CB ... cell block, the center of gravity of the G1 ... basic cell, the center of gravity of the G2 ... small cells.

Claims (16)

多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換する画像処理装置であって、
前記入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定部と、
前記第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定部と、
前記エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定部と、
前記エッジを含んでいないと判定された第1の画素群および前記第2の画素群の各画素群に対して、前記画素群内の階調値の重心位置に基づく画素に前記出力階調値を付与する階調値付与部と、を備えることを特徴とする画像処理装置。
An image processing apparatus that converts input image data composed of a large number of pixels and having gradation values for each pixel into output image data that represents two or more levels by output gradation values assigned to each pixel. And
A first pixel group setting unit that divides an image area of the input image data into predetermined areas and sets a plurality of first pixel groups;
An edge determination unit for determining whether or not the first pixel group includes an edge related to a gradation value change;
A second pixel group setting unit that sets an image area of the first pixel group determined to include the edge and sets a plurality of second pixel groups;
For each pixel group of the first pixel group and the second pixel group determined not to include the edge, the output gradation value is applied to a pixel based on the barycentric position of the gradation value in the pixel group. An image processing apparatus comprising: a gradation value providing unit that provides
請求項1に記載の画像処理装置において、
前記第2の画素群設定部は、前記エッジを含むと判定された第1の画素群の画像領域において、前記第2の画素群内の階調値合計が所定の目標階調値に達するまで前記第2の画素群に画素を次々に取り込んで、前記第2の画素群を設定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The second pixel group setting unit, until the total tone value in the second pixel group reaches a predetermined target tone value in the image region of the first pixel group determined to include the edge An image processing apparatus, wherein pixels are successively taken into the second pixel group to set the second pixel group.
請求項2に記載の画像処理装置において、
前記第2の画素群設定部は、前記第2の画素群への取り込みが未処理の画素のうち、前記第2の画素群内の階調値の重心位置に最も近い画素を取り込むことを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
The second pixel group setting unit captures a pixel that is closest to the gravity center position of the gradation value in the second pixel group among pixels that have not yet been captured into the second pixel group. An image processing apparatus.
請求項3に記載の画像処理装置において、
前記第2の画素群設定部は、前記第2の画素群に画素を取り込む際、当該第2の画素群を含む第1の画素群内のうち前記第2の画素群への取り込みが未処理の画素、および出力階調値の付与が未処理の第1の画素群に含まれる画素のうち、前記第2の画素群内の階調値の重心位置に最も近い画素を取り込むことを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
When the second pixel group setting unit captures a pixel into the second pixel group, the capture into the second pixel group in the first pixel group including the second pixel group is not processed. And the pixel closest to the barycentric position of the gradation value in the second pixel group among the pixels included in the first pixel group in which the output gradation value is not yet processed is fetched. An image processing apparatus.
請求項1ないし4のいずれか一項に記載の画像処理装置において、
前記第1の画素群内の階調値合計が所定の閾値より小さいハイライト領域であるか否かを判定するハイライト判定部と、
前記ハイライト領域と判定された第1の画素群については、当該第1の画素群内の階調値合計が所定の目標階調値に達するまで周辺の画素を次々に取り込んで、前記第1の画素群を拡大する画素群拡大部と、をさらに備えることを特徴とする画像処理装置。
In the image processing device according to any one of claims 1 to 4,
A highlight determination unit that determines whether or not the total gradation value in the first pixel group is a highlight region smaller than a predetermined threshold;
For the first pixel group determined to be the highlight region, the surrounding pixels are successively taken in until the total gradation value in the first pixel group reaches a predetermined target gradation value, and the first pixel group And a pixel group enlargement unit for enlarging the pixel group.
請求項5に記載の画像処理装置において、
前記画素群拡大部は、前記ハイライト領域と判定された第1の画素群に画素を取り込む際、当該第1の画素群に隣接する前記第1の画素群の画素のうち、前記ハイライト領域と判定された第1の画素群内の階調値の重心位置に最も近い画素を取り込むことを特徴とする画像処理装置。
The image processing apparatus according to claim 5.
When the pixel group expansion unit captures a pixel in the first pixel group determined as the highlight area, the highlight area among the pixels of the first pixel group adjacent to the first pixel group An image processing apparatus that captures a pixel that is closest to the barycentric position of the gradation value in the first pixel group determined as.
請求項1ないし6のいずれか一項に記載の画像処理装置において、
前記階調値付与部は、前記エッジを含んでいないと判定された第1の画素群および前記第2の画素群の各画素群に対して、前記画素群内の階調値の重心位置に基づく画素に当該画素群内の階調値合計に応じた出力階調値を付与することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
The gradation value providing unit is configured to set the gradation value in the pixel group at the center of gravity for each pixel group of the first pixel group and the second pixel group determined not to include the edge. An image processing apparatus, wherein an output gradation value corresponding to a total gradation value in the pixel group is assigned to a pixel based on the pixel.
請求項7に記載の画像処理装置において、
前記階調値付与部は、前記画素群内の階調値合計が1画素に付与できる出力階調値の最大値を超えている場合、当該画素群内の階調値の重心位置から近い画素より順番に出力階調値を付与するようにして、前記画素群内の階調値合計に対応する分の出力階調値を前記画素群に対して付与することを特徴とする画像処理装置。
The image processing apparatus according to claim 7.
When the total tone value in the pixel group exceeds the maximum output tone value that can be given to one pixel, the tone value assigning unit is a pixel close to the center of gravity of the tone value in the pixel group An image processing apparatus characterized in that output gradation values are assigned to the pixel group corresponding to the total gradation value in the pixel group so that output gradation values are assigned in order.
請求項1ないし8のいずれか一項に記載の画像処理装置において、
前記第2の画素群設定部は、前記入力画像データの階調値が取りうる最大値を有する画素については、前記第2の画素群に取り込むことなく、
前記階調値付与部は、前記入力画像データの階調値が最大値の画素に対して前記出力階調値の最大値を付与することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 8,
The second pixel group setting unit does not capture the pixel having the maximum value that can be taken by the gradation value of the input image data into the second pixel group,
The image processing apparatus, wherein the gradation value providing unit assigns the maximum value of the output gradation value to a pixel having the maximum gradation value of the input image data.
請求項1ないし9のいずれか一項に記載の画像処理装置において、
前記エッジ判定部は、前記第1の画素群内に含まれる階調値の最大値と最小値との差に基づき、エッジを含んでいるか否かを判定することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 9,
The image processing apparatus according to claim 1, wherein the edge determination unit determines whether an edge is included based on a difference between a maximum value and a minimum value of gradation values included in the first pixel group.
請求項1ないし10のいずれか一項に記載の画像処理装置において、
前記第2の画素群設定部は、前記エッジを含むと判定された第1の画素群のうち、互いに隣接する画素群については、前記互いに隣接する第1の画素群を合わせた画像領域に対して、前記第2の画素群内の階調値合計が前記目標階調値に達するまで前記第2の画素群に画素を次々に取り込んで、前記第2の画素群を設定することを特徴とする画像処理装置。
The image processing device according to any one of claims 1 to 10,
The second pixel group setting unit, for the pixel groups adjacent to each other among the first pixel groups determined to include the edge, for an image region obtained by combining the first pixel groups adjacent to each other The second pixel group is set by successively taking pixels into the second pixel group until the total gradation value in the second pixel group reaches the target gradation value. An image processing apparatus.
請求項8に記載の画像処理装置において、
前記出力画像データから、画素ごとにK(Kは正の整数)段階のドットを形成するためのパルス幅信号を生成可能なパルス幅変調部をさらに備え、
前記階調値付与部は、前記出力階調値を付与された画素の集合が、前記重心位置から拡大する方向を示す拡大方向情報を生成し、
前記パルス幅変調部は、前記拡大方向情報を参照して、前記出力階調値が付与された画素内において前記重心位置側を起点とする前記パルス幅信号を生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 8.
A pulse width modulation unit capable of generating a pulse width signal for forming K-stage dots (K is a positive integer) for each pixel from the output image data;
The gradation value giving unit generates enlargement direction information indicating a direction in which a set of pixels to which the output gradation value is given is enlarged from the center of gravity position,
The image processing characterized in that the pulse width modulation unit generates the pulse width signal starting from the barycentric position side in a pixel to which the output gradation value is given with reference to the enlargement direction information apparatus.
多数の画素により構成され、各画素に階調値を有する入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定部と、
前記第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定部と、
前記エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定部と、
前記エッジを含んでいないと判定された第1の画素群および前記第2の画素群の各画素群に対して、前記画素群内の階調値の重心位置に基づく画素に前記出力階調値を付与する階調値付与部と、
前記出力階調値が付与された画素にドットを形成することにより、画像を出力する画像出力部と、を備えることを特徴とする画像出力装置。
A first pixel group setting unit configured to set a plurality of first pixel groups by dividing an image area of input image data including a plurality of pixels and having gradation values in each pixel for each predetermined area When,
An edge determination unit for determining whether or not the first pixel group includes an edge related to a gradation value change;
A second pixel group setting unit that sets an image area of the first pixel group determined to include the edge and sets a plurality of second pixel groups;
For each pixel group of the first pixel group and the second pixel group determined not to include the edge, the output gradation value is applied to a pixel based on the barycentric position of the gradation value in the pixel group. A gradation value providing unit for providing
An image output apparatus comprising: an image output unit configured to output an image by forming dots at pixels to which the output gradation value is assigned.
多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換する画像処理方法であって、
前記入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定工程と、
前記第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定工程と、
前記エッジを含むと判定された第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定工程と、
前記エッジを含んでいないと判定された第1の画素群および前記第2の画素群の各画素群に対して、前記画素群内の階調値の重心位置に基づく画素に前記出力階調値を付与する階調値付与工程と、を備えることを特徴とする画像処理方法。
An image processing method for converting input image data composed of a large number of pixels and having a gradation value to each pixel into output image data representing two or more levels by an output gradation value assigned to each pixel. And
A first pixel group setting step of setting a plurality of first pixel groups by dividing an image area of the input image data into predetermined areas;
An edge determination step of determining whether or not the first pixel group includes an edge related to a gradation value change;
A second pixel group setting step of setting a plurality of second pixel groups by partitioning an image region of the first pixel group determined to include the edge;
For each pixel group of the first pixel group and the second pixel group determined not to include the edge, the output gradation value is applied to a pixel based on the barycentric position of the gradation value in the pixel group. An image processing method comprising: a gradation value assigning step for assigning.
多数の画素により構成され、各画素に階調値を有する入力画像データを、画素ごとに付与される出力階調値により、2種類以上のレベルを表す出力画像データに変換するための画像処理プログラムであって、
コンピュータに、
画素群に設定すべき領域を示したパターンデータを予め記憶する記憶手段から前記パターンデータを読み出し、前記パターンデータに従って前記入力画像データの画像領域を予め決められた領域ごとに区画して、複数の第1の画素群を設定する第1の画素群設定工程と、
前記第1の画素群が、階調値変化に関するエッジを含んでいるか否かを判定するエッジ判定工程と、
エッジを含むと判定された前記第1の画素群の画像領域を区画して、複数の第2の画素群を設定する第2の画素群設定工程と、
前記エッジを含んでいないと判定された第1の画素群および前記第2の画素群の各画素群に対して、前記画素群内の階調値の重心位置に基づく画素に前記出力階調値を付与する階調値付与工程と、を実行させることを特徴とする画像処理プログラム。
An image processing program for converting input image data composed of a large number of pixels and having gradation values to each pixel into output image data representing two or more levels by output gradation values assigned to each pixel Because
On the computer,
The pattern data is read from a storage unit that prestores pattern data indicating an area to be set in the pixel group, and an image area of the input image data is divided into predetermined areas in accordance with the pattern data, and a plurality of areas are defined. A first pixel group setting step for setting a first pixel group;
An edge determination step of determining whether or not the first pixel group includes an edge related to a gradation value change;
A second pixel group setting step of setting a plurality of second pixel groups by partitioning an image region of the first pixel group determined to include an edge;
For each pixel group of the first pixel group and the second pixel group determined not to include the edge, the output gradation value is applied to a pixel based on the barycentric position of the gradation value in the pixel group. An image processing program that executes a gradation value assigning step for assigning.
請求項15に記載の画像処理プログラムを記録した、コンピュータ読取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 15 is recorded.
JP2006245169A 2006-09-11 2006-09-11 Image processing apparatus, image output apparatus, image processing method, image processing program, and recording medium recording the program Expired - Fee Related JP4702234B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006245169A JP4702234B2 (en) 2006-09-11 2006-09-11 Image processing apparatus, image output apparatus, image processing method, image processing program, and recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006245169A JP4702234B2 (en) 2006-09-11 2006-09-11 Image processing apparatus, image output apparatus, image processing method, image processing program, and recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2008067259A true JP2008067259A (en) 2008-03-21
JP4702234B2 JP4702234B2 (en) 2011-06-15

Family

ID=39289519

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006245169A Expired - Fee Related JP4702234B2 (en) 2006-09-11 2006-09-11 Image processing apparatus, image output apparatus, image processing method, image processing program, and recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4702234B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011022402A (en) * 2009-07-16 2011-02-03 Konica Minolta Business Technologies Inc Image forming apparatus and print control method
US8619332B2 (en) 2008-11-27 2013-12-31 Seiko Epson Corporation Apparatus, method, and storage medium for improving print quality of an image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003143408A (en) * 2001-10-31 2003-05-16 Canon Inc Picture processor
JP2004363639A (en) * 2003-01-09 2004-12-24 Seiko Epson Corp Image processing apparatus, method, program and recording medium with the program recorded thereon
JP2005217618A (en) * 2004-01-28 2005-08-11 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, and image processing program
WO2005109851A1 (en) * 2004-05-06 2005-11-17 Seiko Epson Corporation Image processing device, image processing method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003143408A (en) * 2001-10-31 2003-05-16 Canon Inc Picture processor
JP2004363639A (en) * 2003-01-09 2004-12-24 Seiko Epson Corp Image processing apparatus, method, program and recording medium with the program recorded thereon
JP2005217618A (en) * 2004-01-28 2005-08-11 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, and image processing program
WO2005109851A1 (en) * 2004-05-06 2005-11-17 Seiko Epson Corporation Image processing device, image processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8619332B2 (en) 2008-11-27 2013-12-31 Seiko Epson Corporation Apparatus, method, and storage medium for improving print quality of an image
JP2011022402A (en) * 2009-07-16 2011-02-03 Konica Minolta Business Technologies Inc Image forming apparatus and print control method

Also Published As

Publication number Publication date
JP4702234B2 (en) 2011-06-15

Similar Documents

Publication Publication Date Title
KR100647765B1 (en) Image processing method, image processing device and recording medium thereof
JP4495745B2 (en) Image processing apparatus, image processing method, computer program, and storage medium
JP5078480B2 (en) Image processing apparatus and method, and computer program and recording medium
JP4600352B2 (en) Image processing apparatus, image forming apparatus, and image processing method
JP7071564B2 (en) Image processing system, image processing method, and image processing device
US8441688B2 (en) Image processing apparatus and method thereof
CN1964422A (en) Watermarked information embedding apparatus and method, and computer program
JP4894488B2 (en) Image processing apparatus and image processing method
JP4702234B2 (en) Image processing apparatus, image output apparatus, image processing method, image processing program, and recording medium recording the program
US20090097074A1 (en) Image processing apparatus and method thereof
JP6810895B2 (en) Image forming device
JP5116409B2 (en) Image forming apparatus, image forming method, and image forming program
JP4872924B2 (en) Image data forming method and image data forming apparatus
JP4706884B2 (en) Image processing apparatus, image processing program, and printing apparatus
JP4274102B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the program
JP6507809B2 (en) Printing instruction device, printing system and program
JP4636145B2 (en) Image processing apparatus and program
US20230291857A1 (en) Image processing apparatus and image processing method
JPWO2005109851A1 (en) Image processing apparatus, image processing method, and program
JP3951953B2 (en) Printing apparatus, image processing apparatus, printing method, image processing method, and program
JP6985943B2 (en) Image processing device and its control method and program
JP4337670B2 (en) Image processing apparatus, image processing method, and program
KR20050113510A (en) Apparatus and method of processing halftoning
JP2006025220A (en) Image processing apparatus, image processing method, image processing program, and recording medium recorded with the program
JP2006191294A (en) Image processor, program and image-processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110118

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110208

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110221

LAPS Cancellation because of no payment of annual fees