JP2005081770A - Printer for printing image while converting image data in units of a plurality of pixels - Google Patents

Printer for printing image while converting image data in units of a plurality of pixels Download PDF

Info

Publication number
JP2005081770A
JP2005081770A JP2003318426A JP2003318426A JP2005081770A JP 2005081770 A JP2005081770 A JP 2005081770A JP 2003318426 A JP2003318426 A JP 2003318426A JP 2003318426 A JP2003318426 A JP 2003318426A JP 2005081770 A JP2005081770 A JP 2005081770A
Authority
JP
Japan
Prior art keywords
pixel
unit
absence
raster
dot
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
JP2003318426A
Other languages
Japanese (ja)
Other versions
JP4325325B2 (en
Inventor
Shigeaki Sumiya
繁明 角谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003318426A priority Critical patent/JP4325325B2/en
Priority to US10/913,298 priority patent/US7414756B2/en
Publication of JP2005081770A publication Critical patent/JP2005081770A/en
Application granted granted Critical
Publication of JP4325325B2 publication Critical patent/JP4325325B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent deterioration of image quality due to unit conversion of image data. <P>SOLUTION: A plurality of adjacent pixels are collected into a unit and subjected to unit conversion into dot data indicative of presence/absence of dot formation. With regard to pixels in a converted unit, presence/absence of dot formation is stored under a state capable of identifying the pixel position in the unit. When image data is subjected to unit conversion into dot data, a remarked pixel for which presence/absence of dot formation is judged is set and then dot formation conditions of the remarked pixel is detected at a specified pixel position and dot formation is judged while taking account of the detection results. Consequently, deterioration of image quality due to unit conversion of image data into dot data can be avoided. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明は、画像データに基づいて画像を印刷する技術に関し、詳しくは、所定数の隣接する画素をユニットにまとめて処理することで画像データを迅速に変換しながら、高画質の画像を印刷する技術に関する。   The present invention relates to a technique for printing an image based on image data, and more specifically, prints a high-quality image while quickly converting the image data by processing a predetermined number of adjacent pixels in a unit. Regarding technology.

印刷媒体上に、ドットを形成することによって画像を印刷する印刷装置は、各種画像機器の出力装置として広く使用されている。かかる印刷装置は、局所的にはドットを形成するか否かのいずれかの状態しか表現し得ないが、画像の階調値に応じてドットの形成密度を適切に制御することによって、階調が連続的に変化する画像を表現することが可能となっている。   A printing apparatus that prints an image by forming dots on a print medium is widely used as an output apparatus for various image apparatuses. Such a printing apparatus can express only the state of whether or not to form dots locally, but by controlling the dot formation density appropriately according to the gradation value of the image, It is possible to express an image in which continuously changes.

これら印刷装置において画像の階調値に応じて適切な密度でドットが形成されるように、各画素についてのドット形成の有無を判断するための手法としては、誤差拡散法と呼ばれる手法が広く使用されている。誤差拡散法は、着目画素にドットを形成したこと、あるいはドットを形成しなかったことによって生じる階調表現の誤差を、該着目画素周辺の未判断画素に拡散して記憶しておき、未判断画素についてのドット形成の有無を判断するにあたっては、周辺画素から拡散されてきた誤差を解消するようにドット形成の有無を判断する手法である。誤差拡散法を用いれば、このように周辺画素で発生した階調表現の誤差を解消するようにドットの形成有無を判断することができるので、画像の階調値に応じた適切な密度となるようにドット形成の有無を判断することが可能である。   A method called error diffusion is widely used as a method for determining the presence or absence of dot formation for each pixel so that dots can be formed at an appropriate density according to the gradation value of the image in these printing devices. Has been. In the error diffusion method, an error in gradation expression caused by the formation of a dot in a pixel of interest or the absence of a dot is diffused and stored in undetermined pixels around the pixel of interest. When determining the presence or absence of dot formation for a pixel, this is a method for determining the presence or absence of dot formation so as to eliminate the error diffused from the surrounding pixels. By using the error diffusion method, it is possible to determine whether or not dots are formed so as to eliminate the error in gradation expression generated in the peripheral pixels in this way, so that the density is appropriate according to the gradation value of the image. Thus, it is possible to determine the presence or absence of dot formation.

誤差拡散法を用いれば、画像に応じて適切な密度でドットを形成することで高画質な画像を表示することができるものの、一方では、ドット形成の有無を判断する度に階調誤差を周辺画素に拡散しなければならならず、画像を構成する画素数が多くなると処理に時間がかかって迅速に画像を表現することが困難となる。このような問題を解決するために、本願の発明者は、所定数ずつの隣接する画素をユニットにまとめて、ユニット単位で誤差を拡散しながらドット形成の有無を判断する技術を開発済みである(特許文献1)。   By using the error diffusion method, high-quality images can be displayed by forming dots with an appropriate density according to the image. When the number of pixels constituting an image increases, it takes time to process and it is difficult to express the image quickly. In order to solve such a problem, the inventor of the present application has developed a technique for collecting a predetermined number of adjacent pixels into a unit and determining the presence or absence of dot formation while diffusing an error in units. (Patent Document 1).

特開2001−185789号公報JP 2001-185789 A

しかし、ドット形成有無の判断をユニット単位で行う場合、それぞれのユニットについては同じような処理が繰り返されることになる。このため、複数のユニットに亘って、ユニット内の同じ位置の画素にドットが形成されて、これが周期的なパターンとして視認されることとなり、画質を悪化させるおそれがある。また、周期的なパターンの発生には至らずとも色ムラが発生して画質が悪化してしまう現象もしばしば散見されている。更に、ドット形成の有無をユニット単位で判断した場合に、こうした画質の悪化が生じることがあるという問題は、誤差拡散法に限らず他の周知な方法を用いた場合にも同様に生じ得る。   However, when determining whether or not dots are formed on a unit basis, the same processing is repeated for each unit. For this reason, a dot is formed in the pixel of the same position in a unit over a some unit, and this will be visually recognized as a periodic pattern, and there exists a possibility of degrading an image quality. In addition, there is often a phenomenon in which color unevenness occurs and image quality deteriorates even if a periodic pattern does not occur. Furthermore, when the presence / absence of dot formation is determined on a unit basis, such a problem that image quality may be deteriorated is not limited to the error diffusion method, but may also occur when other known methods are used.

この発明は、従来技術における上述の課題を解決するためになされたものであり、ドット形成の有無をユニット単位で判断することにより迅速な判断を可能としながら、画質の悪化を回避して高画質な画像を印刷可能とする技術の提供を目的とする。   The present invention has been made to solve the above-described problems in the prior art, and enables quick determination by determining the presence or absence of dot formation in units, while avoiding deterioration in image quality and high image quality. The purpose is to provide a technology that enables printing of a simple image.

上述の課題の少なくとも一部を解決するため、本発明の印刷装置は、次の構成を採用した。すなわち、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷装置であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る画像データ受取手段と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換するドットデータ変換手段と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶するドット有無記憶手段と、
前記ドットデータに従って前記ラスタ形成要素を駆動するラスタ形成要素駆動手段と
を備え、
前記ドットデータ変換手段は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する着目画素設定手段と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出するドット形成有無検出手段と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断するドット形成判断手段と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる手段であることを要旨とする。
In order to solve at least a part of the problems described above, the printing apparatus of the present invention employs the following configuration. That is,
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A printing apparatus that prints an image by forming a plurality of rasters,
Image data receiving means for receiving, for a plurality of pixels constituting the image to be printed, image data representing a gradation value of each pixel;
Dot data conversion means for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data representing the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, dot presence / absence storage means for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
And raster forming element driving means for driving the raster forming element according to the dot data,
The dot data conversion means includes
Pixel-of-interest setting means for sequentially setting a pixel of interest for which the presence / absence of dot formation is determined in the unit;
Dot formation presence / absence detection means for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit;
Dot formation determination means for determining the presence or absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the presence or absence of the detected dot formation; and
The gist is that the unit is a means for collecting consecutive pixels corresponding to an integral multiple of the predetermined number of times the raster forming element reciprocates to form the raster, at least in the raster direction. .

また、上記の印刷装置に対応する本発明の印刷方法は、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷方法であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る工程(A)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する工程(B)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する工程(C)と、
前記ドットデータに従って前記ラスタ形成要素を駆動する工程(D)と
を備え、
前記工程(B)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する工程(B−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する工程(B−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する工程(B−3)と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる工程であることを要旨とする。
Also, the printing method of the present invention corresponding to the above printing apparatus is
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A printing method for printing an image by forming a plurality of rasters,
Receiving (A) image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A step (B) of grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data representing the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, a step (C) of storing the presence / absence of dot formation in a state where the pixel positions in the unit can be identified;
(D) driving the raster forming element according to the dot data,
The step (B)
A step (B-1) of sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A step (B-2) of detecting the presence or absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among pixels in which the presence or absence of dot formation is stored in the converted unit; ,
A step (B-3) of determining the presence / absence of dot formation for the target pixel based on the gradation value of the image data for the target pixel and the detected dot formation presence / absence,
The gist of the present invention is that the unit is a process of collecting consecutive pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction. .

かかる印刷装置および印刷制御方法においては、画素を所定の複数個ずつユニットとしてまとめ、画像データをユニット単位でドットデータに変換するに際して、既に変換したユニット内でのドットの形成状況を検出し、検出結果を考慮しながらドットの形成有無を判断する。変換済みのユニット内でのドット形成状況は、次のようにして検出する。先ず、変換されたユニットを構成する少なくとも一部の画素について、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶しておく。次いで、ユニット内でドット形成有無を判断しようとする着目画素を設定し、ドット形成有無を記憶しておいた画素の中から、該着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する。ドット形成の有無を検出する画素は、着目画素に対して所定位置にあればよい。従って、複数の画素について検出することとしてもよく、また、検出する画素位置は、着目画素の画素位置に応じて異なった画素位置とすることも可能である。   In such a printing apparatus and printing control method, when a predetermined number of pixels are grouped as a unit and image data is converted into dot data in units of units, the dot formation status in the already converted units is detected and detected. The presence / absence of dot formation is determined in consideration of the result. The dot formation status in the converted unit is detected as follows. First, for at least some of the pixels constituting the converted unit, the presence / absence of dot formation is stored in a state where the pixel positions in the unit can be identified. Next, the pixel of interest for which the presence / absence of dot formation is to be determined is set in the unit, and the dot for the pixel located at a predetermined position with respect to the pixel position of the pixel of interest is stored among the pixels in which the presence / absence of dot formation is stored. The presence or absence of formation is detected. The pixel for detecting the presence or absence of dot formation may be at a predetermined position with respect to the pixel of interest. Therefore, it is good also as detecting about a some pixel, and it is also possible to set the pixel position to detect as a different pixel position according to the pixel position of the pixel of interest.

こうして得られたドットデータに基づいてラスタを形成しながら画像を印刷すれば、複数のユニットに亘って一定のパターンでドットが形成されることを回避することができる。そのため、周期的なパターンが視認されて画質が悪化することを確実に防止することが可能となる。   If an image is printed while forming a raster based on the dot data obtained in this way, it is possible to avoid the formation of dots with a constant pattern over a plurality of units. Therefore, it is possible to reliably prevent the periodic pattern from being visually recognized and the image quality from deteriorating.

また、上記の印刷装置および印刷方法においては、次のような複数の画素をユニットとしてまとめている。すなわち、少なくともラスタの方向には、ラスタ形成要素が該ラスタを形成するために往復動する所定回数の整数倍に相当する個数ずつ連続した画素をまとめることとしている。こうすれば、複数のユニットに亘ってドットが一定のパターンで形成されることを回避すると同時に、周期的なパターンの発生には至らずとも色ムラが発生して画質が悪化してしまう現象も回避することが可能となる。以下、この理由について説明する。   In the above printing apparatus and printing method, the following plurality of pixels are grouped as a unit. In other words, at least in the direction of the raster, a continuous number of pixels corresponding to an integral multiple of a predetermined number of times that the raster forming element reciprocates to form the raster is collected. By doing this, it is possible to avoid the formation of dots in a constant pattern across a plurality of units, and at the same time, the phenomenon that color irregularity occurs and the image quality deteriorates without the occurrence of a periodic pattern. It can be avoided. Hereinafter, this reason will be described.

一般に、印刷媒体上でラスタ形成要素を往復動させてラスタを形成しながら画像を印刷する場合、1回の往復動でラスタを形成するのではなく、複数回の往復動に分けて形成することが広く行われている。こうした印刷方法は、1回の往復動でラスタを形成した場合に生じる次のような現象、すなわち、筋状に印刷媒体の地色が現れてしまうバンディングと呼ばれる現象や、バンディングにまでは至らずとも色ムラが発生する現象などにより、画質が低下してしまうことを回避するために採用されている。こうした印刷方法では、1本のラスタを形成するためにラスタ形成要素を往復動させる回数を仮にN回とすると、1回の往復動ではN画素飛びにドットを形成することが通常である。従って、ドットがたまたまN画素飛びに形成されているような領域を印刷する場合、ラスタ形成要素をN回往復動させながら画像を印刷していたとしても、その領域については1回の往復動で印刷されてしまう。このため、こうした領域ではバンディングや色ムラなどが発生することがあり、画質の低下が起こり得ることになる。   In general, when printing an image while forming a raster by reciprocating a raster forming element on a print medium, the raster is not formed by a single reciprocating motion, but formed by a plurality of reciprocating motions. Is widely practiced. Such a printing method does not lead to the following phenomenon that occurs when a raster is formed by a single reciprocation, that is, a phenomenon called banding in which the ground color of the print medium appears in a streak shape, or banding. Both are used to avoid the deterioration of image quality due to the phenomenon of color unevenness. In such a printing method, assuming that the number of times the raster forming element is reciprocated to form one raster is N, it is normal to form dots in N pixel jumps in one reciprocating motion. Therefore, when printing an area where dots are accidentally formed in N pixels, even if an image is printed while the raster forming element is reciprocated N times, the area can be reciprocated once. It will be printed. For this reason, banding, color unevenness, and the like may occur in such areas, and image quality may be degraded.

ところで、上記の印刷装置および印刷方法では、前述したように、隣接する複数の画素をユニットとしてまとめ、画像データをユニット単位でドットデータに変換している。このとき、既に変換したユニット内でのドットの形成状況を検出し、検出結果を考慮しながらドットの形成有無を判断している。このため、ユニット内で同じ位置の画素にドットが形成されるなど、一定のパターンが発生することを回避することができる。しかし、ユニット単位でドットが周期的に形成されることを回避することで、今度は、ドットがN画素飛びに形成される領域が発生してしまうことがある。ここで、N画素とは、1本のラスタをN回の往復動で形成する場合に、個々の往復動で画素が飛び飛びに形成されるときのN画素である。   By the way, in the above-described printing apparatus and printing method, as described above, a plurality of adjacent pixels are grouped as a unit, and image data is converted into dot data in units. At this time, the dot formation status in the already converted unit is detected, and the presence or absence of dot formation is determined in consideration of the detection result. For this reason, it is possible to avoid the occurrence of a certain pattern, such as the formation of dots at pixels at the same position in the unit. However, by avoiding the periodic formation of dots in units of units, an area in which dots are formed so as to jump N pixels may occur. Here, the N pixel is an N pixel when a single raster is formed by N reciprocating motions, and pixels are formed in a jumping manner by individual reciprocating motions.

例えば、縦横3つずつの合計9個の画素をユニットとしてまとめた場合を考える。画像中にちょうど3画素飛びにドットが形成されるような領域が存在していても、各ユニットで同じ画素位置にドットが形成されることを回避するため、ドットの形成位置がずらされるので、3画素おきに周期的にドットが形成されることはない。しかし、ドットの形成位置をずらした結果、例えば4画素飛びにドットが形成される領域が発生し得る。そして1本のラスタが、たまたま4回の往復動で形成されていた場合には、この領域は1回の往復動でラスタが形成されてしまうので、色ムラが発生するなど画質の悪化が生じ得る。   For example, consider a case where a total of nine pixels, each of three vertical and horizontal, are grouped as a unit. Even if there is an area in which dots are formed in exactly three pixels in the image, the dot formation position is shifted in order to avoid the formation of dots at the same pixel position in each unit. Dots are not formed periodically every three pixels. However, as a result of shifting the dot formation position, for example, a region where dots are formed every four pixels may be generated. If one raster happens to be formed by reciprocating four times, the raster is formed in this region by one reciprocating motion, resulting in image quality deterioration such as color unevenness. obtain.

これに対して、本願の印刷装置および印刷方法では、1本のラスタをN回の往復動で形成している場合、少なくともラスタの方向には、Nの整数倍に相当する個数の連続した画素をユニットとしてまとめている。このため、複数のユニットに亘って周期的にドットが形成されることを回避しておけば、ただちに、1回の往復動でドットが形成されてしまう領域の発生も回避されることになる。すなわち、複数のユニットに亘って一定のパターンで周期的にドットが形成されることを回避すると同時に、周期的なパターンの発生には至らずとも色ムラが発生して画質が悪化してしまう現象も回避することが可能となるのである。   On the other hand, in the printing apparatus and printing method of the present application, when one raster is formed by N reciprocations, the number of continuous pixels corresponding to an integer multiple of N is at least in the raster direction. As a unit. For this reason, if it is avoided that dots are periodically formed over a plurality of units, the occurrence of a region where dots are formed by a single reciprocation can be avoided immediately. In other words, a phenomenon in which dots are periodically formed in a constant pattern across a plurality of units is avoided, and at the same time, even if a periodic pattern does not occur, color unevenness occurs and image quality deteriorates. Can also be avoided.

また、本発明は、上述した印刷方法や印刷制御方法を実現するプログラムをコンピュータに読み込ませることにより、コンピュータを用いて実現することも可能である。従って、本発明は次のようなプログラム、あるいはプログラムを記憶した記録媒体としての態様も含んでいる。すなわち、上述の印刷方法に対応する本発明のプログラムは、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する方法を、コンピュータを用いて実現するためのプログラムであって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(A)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(B)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(C)と、
前記ドットデータに従って前記ラスタ形成要素を駆動する機能(D)と
を実現するとともに、
前記機能(B)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(B−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(B−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(B−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であることを要旨とする。
The present invention can also be realized using a computer by causing a computer to read a program that realizes the above-described printing method and printing control method. Therefore, the present invention includes the following program or a mode as a recording medium storing the program. That is, the program of the present invention corresponding to the printing method described above is
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A program for realizing a method of printing an image by forming a plurality of rasters using a computer,
A function (A) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (B) for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data indicating the presence / absence of dot formation for each pixel in units;
For at least some of the pixels constituting the converted unit, a function (C) for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
A function (D) for driving the raster forming element according to the dot data and
The function (B) is
A function (B-1) for sequentially setting a pixel of interest for which the presence or absence of dot formation is to be determined in the unit;
A function (B-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (B-3) for determining the presence / absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the detected dot formation presence / absence,
The gist of the unit is that the raster forming element collects a number of pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction. .

また、上記のプログラムに対応する本発明の記録媒体は、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷するプログラムを、コンピュータで読み取り可能に記録した記録媒体であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(A)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(B)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(C)と、
前記ドットデータに従って前記ラスタ形成要素を駆動する機能(D)と
を実現するプログラムを記憶しているとともに、
前記機能(B)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(B−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(B−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(B−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であることを要旨とする。
The recording medium of the present invention corresponding to the above program is
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A recording medium on which a program for printing an image by forming a plurality of rasters is recorded in a computer-readable manner,
A function (A) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (B) for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data indicating the presence / absence of dot formation for each pixel in units;
For at least some of the pixels constituting the converted unit, a function (C) for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
A program for realizing the function (D) for driving the raster forming element according to the dot data, and
The function (B) is
A function (B-1) for sequentially setting a pixel of interest for which the presence or absence of dot formation is to be determined in the unit;
A function (B-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (B-3) for determining the presence / absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the detected dot formation presence / absence,
The gist of the unit is that the raster forming element collects a number of pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction. .

更に、上記の印刷制御方法に対応する本発明のプログラムは、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷部に、該ラスタ形成要素の駆動を制御するための制御データを供給して該印刷部の制御を行う方法を、コンピュータを用いて実現するためのプログラムであって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(ア)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(イ)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(ウ)と、
前記ドットデータを前記制御データとして前記印刷部に供給する機能(エ)と
を実現するとともに、
前記機能(イ)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(イ−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(イ−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(イ−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であることを要旨とする。
Furthermore, the program of the present invention corresponding to the above print control method is as follows:
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster Using a computer to supply control data for controlling driving of the raster forming element to a printing unit that prints an image by forming a plurality of rasters, and to control the printing unit A program for realizing
A function (a) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (a) that collects a predetermined plurality of adjacent pixels as a unit, and converts the image data into dot data indicating the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, a function (c) for storing the presence or absence of dot formation in a state in which the pixel position in the unit can be identified;
A function (d) for supplying the dot data as the control data to the printing unit is realized, and
The function (b)
A function (a-1) for sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A function (a-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (i-3) for determining the presence / absence of dot formation for the target pixel based on the gradation value of the image data for the target pixel and the detected dot formation presence / absence;
The gist of the unit is that the raster forming element collects a number of pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction. .

また、上記のプログラムに対応する本発明の記録媒体は、
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷部に、該ラスタ形成要素の駆動を制御するための制御データを供給して該印刷部の制御を行うプログラムを、コンピュータで読み取り可能に記録した記録媒体であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(ア)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(イ)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(ウ)と、
前記ドットデータを前記制御データとして前記印刷部に供給する機能(エ)と
を実現するプログラムを記憶しているとともに、
前記機能(イ)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(イ−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(イ−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(イ−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であることを要旨とする。
The recording medium of the present invention corresponding to the above program is
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster In addition, a computer reads a program for controlling the printing unit by supplying control data for controlling the driving of the raster forming element to a printing unit that prints an image by forming a plurality of rasters. A recording medium capable of recording,
A function (a) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (A) for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data indicating the presence / absence of dot formation for each pixel,
For at least some of the pixels constituting the converted unit, a function (c) for storing the presence or absence of dot formation in a state in which the pixel position in the unit can be identified;
A program for realizing the function (d) for supplying the dot data as the control data to the printing unit;
The function (b)
A function (a-1) for sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A function (a-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (i-3) for determining the presence / absence of dot formation for the target pixel based on the gradation value of the image data for the target pixel and the detected dot formation presence / absence;
The gist of the unit is that the raster forming element collects a number of pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction. .

かかるプログラム、あるいは記録媒体に記憶されているプログラムをコンピュータに読み込ませ、上述の各種機能を該コンピュータに実行させれば、画質の悪化を招くことなく、画像データをユニット単位でドットデータに変換して、迅速に画像を印刷することが可能となる。   If such a program or a program stored in a recording medium is read into a computer and the above-described various functions are executed by the computer, the image data is converted into dot data in units without causing image quality deterioration. Thus, it is possible to print an image quickly.

本発明の作用・効果をより明確に説明するために、本発明の実施の形態を、次のような順序に従って以下に説明する。
A.発明の概要:
B.装置構成:
C.画像データ変換処理の概要:
D.第1実施例:
D−1.ユニット単位で行う階調数変換処理:
D−2.ユニット内多値化処理:
D−3.第1実施例のユニット内多値化処理:
D−4.変形例:
E.第2実施例:
E−1.第2実施例のユニット内多値化処理:
E−2.第2実施例の変形例:
In order to more clearly describe the operation and effect of the present invention, embodiments of the present invention will be described below in the following order.
A. Summary of the invention:
B. Device configuration:
C. Overview of image data conversion process:
D. First embodiment:
D-1. Tone number conversion processing performed in units:
D-2. In-unit multi-value processing:
D-3. In-unit multilevel processing of the first embodiment:
D-4. Variation:
E. Second embodiment:
E-1. In-unit multi-value processing of the second embodiment:
E-2. Modification of the second embodiment:

A.発明の概要:
実施例の詳細な説明を開始する前に、理解の便宜を図るため、本発明の概要について簡単に説明しておく。図1は、印刷システムを例にとって、本発明の概要を示した説明図である。図1に示した印刷システムは、画像処理装置としてのコンピュータ10と、カラープリンタ20等から構成されている。コンピュータ10は、デジタルカメラやカラースキャナなどの画像機器からRGB各色の階調値によって表現されたカラー画像データを受け取ると、該画像データを、カラープリンタ20で印刷可能な各色ドットの形成有無により表現された印刷データに変換する。かかる画像データの変換は、プリンタドライバ12と呼ばれる専用のプログラムを用いて行われる。尚、RGB各色によるカラー画像データは、各種アプリケーションプログラムを用いてコンピュータ10で作成することもできる。
A. Summary of the invention:
Before starting the detailed description of the embodiments, the outline of the present invention will be briefly described for convenience of understanding. FIG. 1 is an explanatory diagram showing an outline of the present invention, taking a printing system as an example. The printing system shown in FIG. 1 includes a computer 10 as an image processing apparatus, a color printer 20 and the like. When the computer 10 receives color image data expressed by gradation values of RGB colors from an image device such as a digital camera or a color scanner, the computer 10 expresses the image data by the presence or absence of formation of each color dot that can be printed by the color printer 20. Is converted to print data. Such conversion of image data is performed using a dedicated program called the printer driver 12. Note that color image data for each color of RGB can also be created by the computer 10 using various application programs.

また、カラープリンタ20には、印刷媒体上にドットを形成するヘッドが各色毎に設けられており、カラープリンタ20は、プリンタドライバ12によって生成された印刷データに従って、ヘッドを印刷媒体上で往復動させながらドットを形成することによって画像を印刷する。この時、ヘッドが往復動しながら印刷媒体上に形成するドット列は「ラスタ」と呼ばれるが、カラープリンタ20は、主に画質上の要請から、1本のラスタを1回の往復動で形成するのではなく、複数回の往復動に分けて形成している。このように、1本のラスタを形成するために行う往復動の回数は、「パス数」と呼ばれることがある。   The color printer 20 is provided with a head for forming dots on the print medium for each color. The color printer 20 reciprocates the head on the print medium in accordance with the print data generated by the printer driver 12. The image is printed by forming dots while At this time, the dot row formed on the print medium while the head reciprocates is called “raster”, but the color printer 20 forms one raster by one reciprocation mainly due to the demands on image quality. Instead, it is divided into a plurality of reciprocations. As described above, the number of reciprocations performed to form one raster may be referred to as “the number of passes”.

プリンタドライバ12は、解像度変換モジュール,色変換モジュール,階調数変換モジュール14,インターレースモジュールといった複数のモジュールから構成されている。これら各モジュールで行われる処理については後述する。このうち、階調数変換モジュール14では、画像データをドット形成の有無により表現されたデータに変換する処理を行っている。ここで、処理を迅速化するため、本実施例の階調数変換モジュールでは、次のようにユニット単位の処理を行っている。すなわち、隣接する複数個の画素をまとめてユニットを生成し、各画素についてのドット形成有無の判断をユニット単位でまとめて行う。ドット形成有無の判断をユニット単位で行う方法については後述する。また、前述したようにカラープリンタ20は、1本のラスタを形成するためにヘッドを所定の複数回往復動させることとしているが、複数の画素をユニットとしてまとめる際には、少なくともラスタの方向には、パス数の整数倍に相当する個数ずつ連続した画素をまとめている。   The printer driver 12 includes a plurality of modules such as a resolution conversion module, a color conversion module, a gradation number conversion module 14, and an interlace module. Processing performed in each of these modules will be described later. Among these, the gradation number conversion module 14 performs processing for converting the image data into data represented by the presence or absence of dot formation. Here, in order to speed up the processing, the gradation number conversion module of the present embodiment performs processing in units as follows. That is, a unit is generated by grouping a plurality of adjacent pixels, and whether or not dots are formed for each pixel is collectively determined for each unit. A method for determining whether or not to form dots in units will be described later. Further, as described above, the color printer 20 reciprocates the head a predetermined number of times in order to form one raster. However, when a plurality of pixels are combined as a unit, at least in the direction of the raster. Summarizes consecutive pixels by the number corresponding to an integral multiple of the number of passes.

図1中で、階調数変換モジュール14を表す枠の下方に、矢印で示した概念図は、階調数変換モジュール14において画像データがドットデータに変換されている様子を示したものである。概念図中で破線で示した小さな正方形は画素を模式的に示したものである。1つのユニットは、縦横2列ずつの4つの画素で構成されている。ユニットとしてまとめられる画素の個数は、カラープリンタ20のパス数(図1の例示では2)を基準として、次のようにして選択されたものである。すなわち、ユニットとしてまとめられる複数の画素が、少なくともラスタの方向には、パス数の整数倍の個数の連続した画素となるように選択されている。図中で細かい斜線を付して示したユニットは、処理中のユニット、すなわち画像データをドットデータに変換中のユニットを示したものである。また、粗い斜線を付して示した領域は、ドット形成有無が判断されてドットデータに変換された領域を示している。ドット形成有無の判断をユニット単位で行う場合、各ユニットについては同様な処理が行われる。このため、特に画像データの階調値があまり変化しない領域を処理した場合などには、複数のユニットに亘って一定のパターンでドットが形成されるおそれがある。一定のパターンでドットが形成された領域が発生すると、これが視認されて画質の悪化を招くことが懸念される。   In FIG. 1, a conceptual diagram indicated by an arrow below a frame representing the gradation number conversion module 14 shows a state in which image data is converted into dot data in the gradation number conversion module 14. . The small squares indicated by broken lines in the conceptual diagram schematically show the pixels. One unit is composed of four pixels in two rows and two columns. The number of pixels collected as a unit is selected as follows based on the number of passes of the color printer 20 (2 in the example of FIG. 1). That is, a plurality of pixels grouped as a unit are selected so as to be a continuous number of pixels that is an integral multiple of the number of passes, at least in the raster direction. The units shown with fine diagonal lines in the figure indicate units that are being processed, that is, units that are converting image data into dot data. A region indicated by a rough oblique line indicates a region converted to dot data after the presence / absence of dot formation is determined. When the determination of dot formation is performed in units, the same processing is performed for each unit. For this reason, particularly when an area where the gradation value of the image data does not change so much is processed, there is a possibility that dots are formed in a constant pattern across a plurality of units. If a region in which dots are formed in a certain pattern is generated, there is a concern that this is visually recognized and the image quality is deteriorated.

図1中の概念図では、ドットが一定のパターンで形成される一例として、連続するユニット内の同じ画素位置にドットが形成される場合を示している。図示されているように、処理中のユニット(細かい斜線を付したユニット)の左側には、左上隅の画素にドットが形成されたユニットが2つ連続している。仮に、処理中のユニットでも左上隅の画素にドットが形成されると、連続して3つのユニットで同じ位置の画素にドットが形成されることになり、これがパターンとして視認されて画質が悪化するおそれがある。もちろん、ドットが一定のパターンで形成される例としては、連続するユニット内の同じ画素位置にドットが形成される場合に限られず、複数のユニットを周期として一定のパターンでドットが形成される場合も起こり得る。   The conceptual diagram in FIG. 1 shows a case where dots are formed at the same pixel position in a continuous unit as an example in which dots are formed in a constant pattern. As shown in the drawing, on the left side of the unit being processed (the unit with fine slashes), two units in which dots are formed in the pixel in the upper left corner are continuous. If a dot is formed in the pixel in the upper left corner even in the unit being processed, dots will be formed in the pixel at the same position in three units in succession, and this will be visually recognized as a pattern and image quality will deteriorate. There is a fear. Of course, an example in which dots are formed in a fixed pattern is not limited to the case where dots are formed at the same pixel position in successive units, but where dots are formed in a fixed pattern with multiple units as a period. Can also happen.

この様な問題の発生を回避するために、図1に示した印刷システムにおける階調数変換モジュール14では、既に処理したユニットについてドットを形成すると判断した画素を、階調数変換結果記憶部に記憶しておく。ユニット単位でドット形成有無を判断するに際しては、階調数変換結果記憶部から判断結果を読み出して、ドットが一定のパターンで形成されることを回避しながら判断していく。例えば、図1中の概念図に示した例では、連続したユニットで同じ画素位置にドットが形成されているから、同じ位置の画素に連続してドットが形成されないようにしながら、処理ユニットについてのドット形成有無を判断していく。このように、視認され易いパターンでドットが形成されることを回避しながらドット形成の有無を判断する。こうすれば、ユニット単位でドット形成の有無を判断することによって迅速な処理を行いながら、画質を悪化させることなく高画質な画像を印刷することが可能となる。また、ユニットとしては、少なくともラスタの方向には、カラープリンタ20のパス数の整数倍に相当する個数の連続する複数の画素が選択されている。詳細には後述するが、このような複数の画素をユニットしてまとめておけば、複数のユニットに亘ってドットが一定のパターンで形成されることを回避すると同時に、周期的なパターンの発生には至らずとも色ムラが発生して画質が悪化してしまう現象も回避することが可能となる。以下では、このような画像処理について、実施例に基づき詳細に説明する。   In order to avoid the occurrence of such a problem, the gradation number conversion module 14 in the printing system shown in FIG. 1 stores, in the gradation number conversion result storage unit, pixels that have been determined to form dots for units that have already been processed. Remember. When determining the presence or absence of dot formation on a unit basis, the determination result is read from the gradation number conversion result storage unit, and determination is made while avoiding the formation of dots in a constant pattern. For example, in the example shown in the conceptual diagram in FIG. 1, dots are formed at the same pixel position in consecutive units. Whether or not dots are formed is determined. In this way, it is determined whether or not dots are formed while avoiding the formation of dots with a pattern that is easily visible. In this way, it is possible to print a high-quality image without deteriorating the image quality while performing quick processing by determining the presence or absence of dot formation in units. As a unit, a plurality of continuous pixels corresponding to an integral multiple of the number of passes of the color printer 20 are selected at least in the raster direction. As will be described in detail later, if such a plurality of pixels are grouped together, it is possible to avoid the formation of dots in a constant pattern across the plurality of units and at the same time generate periodic patterns. It is possible to avoid the phenomenon that color unevenness occurs and image quality deteriorates. Hereinafter, such image processing will be described in detail based on examples.

B.装置構成:
図2は、本実施例の画像処理装置としてのコンピュータ100の構成を示す説明図である。コンピュータ100は、CPU102を中心に、ROM104やRAM106などを、バス116で互いに接続して構成された周知のコンピュータである。
B. Device configuration:
FIG. 2 is an explanatory diagram illustrating a configuration of a computer 100 as the image processing apparatus according to the present exemplary embodiment. The computer 100 is a well-known computer configured by connecting a ROM 104, a RAM 106, and the like with a bus 116 around a CPU 102.

コンピュータ100には、フレキシブルディスク124やコンパクトディスク126のデータを読み込むためのディスクコントローラDDC109や、周辺機器とデータの授受を行うための周辺機器インターフェースPIF108、CRT114を駆動するためのビデオインターフェースVIF112等が接続されている。PIF108には、後述するカラープリンタ200や、ハードディスク118等が接続されている。また、デジタルカメラ120やカラースキャナ122等をPIF108に接続すれば、デジタルカメラ120やカラースキャナ122で取り込んだ画像を印刷することも可能である。また、ネットワークインターフェースカードNIC110を装着すれば、コンピュータ100を通信回線300に接続して、通信回線に接続された記憶装置310に記憶されているデータを取得することもできる。   Connected to the computer 100 are a disk controller DDC 109 for reading data from the flexible disk 124 and the compact disk 126, a peripheral device interface PIF 108 for exchanging data with peripheral devices, a video interface VIF 112 for driving a CRT 114, and the like. Has been. A color printer 200, a hard disk 118, and the like, which will be described later, are connected to the PIF 108. Further, if the digital camera 120, the color scanner 122, and the like are connected to the PIF 108, it is possible to print an image captured by the digital camera 120 or the color scanner 122. If the network interface card NIC 110 is installed, the computer 100 can be connected to the communication line 300 to acquire data stored in the storage device 310 connected to the communication line.

図3は、第1実施例のカラープリンタ200の概略構成を示す説明図である。カラープリンタ200はシアン,マゼンタ,イエロ,ブラックの4色インクのドットを形成可能なインクジェットプリンタである。もちろん、これら4色のインクに加えて、染料濃度の低いシアン(淡シアン)インクと染料濃度の低いマゼンタ(淡マゼンタ)インクとを含めた合計6色のインクドットを形成可能なインクジェットプリンタを用いることもできる。尚、以下では場合によって、シアンインク,マゼンタインク,イエロインク,ブラックインク,淡シアンインク,淡マゼンタインクのそれぞれを、Cインク,Mインク,Yインク,Kインク,LCインク,LMインクと略称することがあるものとする。   FIG. 3 is an explanatory diagram showing a schematic configuration of the color printer 200 of the first embodiment. The color printer 200 is an ink jet printer capable of forming dots of four color inks of cyan, magenta, yellow, and black. Of course, in addition to these four color inks, an ink jet printer capable of forming ink dots of a total of six colors including cyan (light cyan) ink having a low dye density and magenta (light magenta) ink having a low dye density is used. You can also. In the following, cyan ink, magenta ink, yellow ink, black ink, light cyan ink, and light magenta ink are abbreviated as C ink, M ink, Y ink, K ink, LC ink, and LM ink, respectively. There shall be.

カラープリンタ200は、図示するように、キャリッジ240に搭載された印字ヘッド241を駆動してインクの吐出およびドットの形成を行う機構と、このキャリッジ240をキャリッジモータ230によってプラテン236の軸方向に往復動させる機構と、紙送りモータ235によって印刷用紙Pを搬送する機構と、ドットの形成やキャリッジ240の移動および印刷用紙の搬送を制御する制御回路260とから構成されている。   As shown in the figure, the color printer 200 has a mechanism for driving the print head 241 mounted on the carriage 240 to eject ink and forming dots, and the carriage 240 is reciprocated in the axial direction of the platen 236 by the carriage motor 230. A mechanism for moving the printing paper P by a paper feed motor 235, and a control circuit 260 for controlling dot formation, carriage 240 movement, and printing paper conveyance.

キャリッジ240には、Kインクを収納するインクカートリッジ242と、Cインク,Mインク,Yインクの各種インクを収納するインクカートリッジ243とが装着されている。キャリッジ240にインクカートリッジ242,243を装着すると、カートリッジ内の各インクは図示しない導入管を通じて、印字ヘッド241の下面に設けられた各色毎のインク吐出用ヘッド244ないし247に供給される。各色毎のインク吐出用ヘッド244ないし247には、48個のノズルNz が一定のノズルピッチkで配列されたノズル列が1組ずつ設けられている。   An ink cartridge 242 that stores K ink and an ink cartridge 243 that stores various inks of C ink, M ink, and Y ink are mounted on the carriage 240. When the ink cartridges 242 and 243 are mounted on the carriage 240, each ink in the cartridge is supplied to ink discharge heads 244 to 247 for each color provided on the lower surface of the print head 241 through an introduction pipe (not shown). Each of the ink discharge heads 244 to 247 for each color is provided with one set of nozzle rows in which 48 nozzles Nz are arranged at a constant nozzle pitch k.

制御回路260は、CPU261と、ROM262、RAM263等から構成されている。制御回路260は、キャリッジモータ230と紙送りモータ235とを適切に駆動することを通じて、キャリッジ240の主走査と副走査とを制御するとともに、コンピュータ100から供給される印刷データに基づいて、各ノズルから適切なタイミングでインク滴を吐出する。こうして、制御回路260の制御の下、印刷媒体上の適切な位置に各色のインクドットを形成することによって、カラープリンタ200はカラー画像を印刷することができる。   The control circuit 260 includes a CPU 261, a ROM 262, a RAM 263, and the like. The control circuit 260 controls main scanning and sub-scanning of the carriage 240 by appropriately driving the carriage motor 230 and the paper feed motor 235, and each nozzle based on print data supplied from the computer 100. Ink droplets are discharged at an appropriate timing. Thus, the color printer 200 can print a color image by forming ink dots of respective colors at appropriate positions on the print medium under the control of the control circuit 260.

尚、各色のインク吐出ヘッドからインク滴を吐出する方法には、種々の方法を適用することができる。すなわち、ピエゾ素子を用いてインクを吐出する方式や、インク通路に配置したヒータでインク通路内に泡(バブル)を発生させてインク滴を吐出する方法などを用いることができる。また、インクを吐出する代わりに、熱転写などの現象を利用して印刷用紙上にインクドットを形成する方式や、静電気を利用して各色のトナー粉を印刷媒体上に付着させる方式のプリンタを使用することも可能である。   Note that various methods can be applied to the method of ejecting ink droplets from the ink ejection heads of the respective colors. That is, a method of ejecting ink using a piezo element, a method of ejecting ink droplets by generating bubbles in the ink passage with a heater arranged in the ink passage, and the like can be used. Also, instead of ejecting ink, use a printer that uses a method such as thermal transfer to form ink dots on printing paper, or a method that uses static electricity to attach each color toner powder onto the print medium. It is also possible to do.

更には、吐出するインク滴の大きさを制御したり、あるいは一度に複数のインク滴を吐出して、吐出するインク滴の数を制御することにより、印刷用紙上に形成されるインクドットの大きさを制御可能な、いわゆるバリアブルドットプリンタを使用することもできる。   Furthermore, the size of the ink dots formed on the printing paper can be controlled by controlling the size of the ejected ink droplets, or by ejecting a plurality of ink droplets at a time and controlling the number of ejected ink droplets. A so-called variable dot printer capable of controlling the height can also be used.

以上のようなハードウェア構成を有するカラープリンタ200は、キャリッジモータ230を駆動することによって、各色のインク吐出用ヘッド244ないし247を印刷用紙Pに対して主走査方向に移動させ、また紙送りモータ235を駆動することによって、印刷用紙Pを副走査方向に移動させる。制御回路260は、印刷データに従って、キャリッジ240の主走査および副走査を繰り返しながら、適切なタイミングでノズルを駆動してインク滴を吐出することによって、カラープリンタ200は印刷用紙上にカラー画像を印刷している。   The color printer 200 having the above hardware configuration drives the carriage motor 230 to move the ink ejection heads 244 to 247 of the respective colors in the main scanning direction with respect to the printing paper P, and also feeds the paper. By driving 235, the printing paper P is moved in the sub-scanning direction. The control circuit 260 drives the nozzles at appropriate timing to discharge ink droplets while repeating main scanning and sub-scanning of the carriage 240 according to the print data, so that the color printer 200 prints a color image on the printing paper. doing.

C.画像データ変換処理の概要:
図4は、本実施例の画像処理装置としてのコンピュータ100が、受け取った画像データに所定の画像処理を加えることによって、画像データを印刷データに変換する処理の流れを示すフローチャートである。かかる処理は、コンピュータ100のオペレーティングシステムがプリンタドライバ12を起動することによって開始される。以下、図4に従って、本実施例の画像データ変換処理について簡単に説明する。
C. Overview of image data conversion process:
FIG. 4 is a flowchart showing a flow of processing in which the computer 100 as the image processing apparatus of the present embodiment converts image data into print data by applying predetermined image processing to the received image data. Such processing is started when the operating system of the computer 100 activates the printer driver 12. Hereinafter, the image data conversion processing of the present embodiment will be briefly described with reference to FIG.

プリンタドライバ12は、画像データ変換処理を開始すると、先ず初めに、変換すべきRGBカラー画像データの読み込みを開始する(ステップS100)。次いで、取り込んだ画像データの解像度を、カラープリンタ200が印刷するための解像度に変換する(ステップS102)。カラー画像データの解像度が印刷解像度よりも低い場合は、線形補間を行うことで隣接する画像データ間に新たなデータを生成し、逆に印刷解像度よりも高い場合は一定の割合でデータを間引くことによって、画像データの解像度を印刷解像度に変換する。   When the image data conversion process is started, the printer driver 12 first starts reading RGB color image data to be converted (step S100). Next, the resolution of the captured image data is converted to a resolution for printing by the color printer 200 (step S102). When the resolution of color image data is lower than the print resolution, new data is generated between adjacent image data by performing linear interpolation. Conversely, when the resolution is higher than the print resolution, the data is thinned out at a fixed rate. Thus, the resolution of the image data is converted into the printing resolution.

こうして解像度を変換すると、カラー画像データの色変換処理を行う(ステップS104)。色変換処理とは、R,G,Bの階調値の組み合わせによって表現されているカラー画像データを、C,M,Y,Kなどのカラープリンタ200で使用する各色の階調値の組み合わせによって表現された画像データに変換する処理である。色変換処理は、色変換テーブルと呼ばれる3次元の数表を参照することで迅速に行うことができる。   When the resolution is converted in this way, color conversion processing of color image data is performed (step S104). Color conversion processing refers to color image data expressed by a combination of R, G, and B gradation values, by a combination of gradation values of each color used in the color printer 200 such as C, M, Y, and K. This is a process of converting into expressed image data. The color conversion process can be quickly performed by referring to a three-dimensional numerical table called a color conversion table.

プリンタドライバ12は、色変換処理に続いて階調数変換処理を開始する(ステップS106)。階調数変換処理とは次のような処理である。色変換処理によって、RGB画像データはC,M,Y,K各色の階調データに変換される。これら各色の階調データは、階調値0から255の256階調を有するデータである。これに対し、本実施例のカラープリンタ200は、「ドットを形成する」,「ドットを形成しない」のいずれかの状態しか採り得ない。そこで、256階調を有する各色の階調データを、カラープリンタ200が表現可能な2階調で表現された画像データに変換する必要がある。このような階調数の変換を行う処理が階調数変換処理である。後述するように、本実施例のプリンタドライバ12は、画素を所定数ずつユニットにまとめ、ユニット単位で階調数変換処理を行うことによって迅速な処理を可能としている。また、処理済みのユニットについては、ドットを形成すると判断した画素を記憶しておき、このデータを反映させながら階調数変換を行う。更に、詳細には後述するが、ユニットの大きさは、カラープリンタ200のパス数を基準として所定の大きさに設定されている。こうすることで、ユニット単位で階調数変換処理を行った場合に懸念される、ドットが一定のパターンで形成される現象が発生することを確実に回避すると同時に、周期的なパターンの発生には至らずとも色ムラが発生して画質が悪化することも回避可能となっている。階調数変換処理については、後ほど詳細に説明する。   The printer driver 12 starts the tone number conversion process following the color conversion process (step S106). The gradation number conversion process is the following process. By the color conversion process, the RGB image data is converted into gradation data of C, M, Y, and K colors. The gradation data of each color is data having 256 gradations with gradation values 0 to 255. On the other hand, the color printer 200 according to the present embodiment can take only one of the states of “forming dots” and “not forming dots”. Therefore, it is necessary to convert the gradation data of each color having 256 gradations into image data expressed in 2 gradations that can be expressed by the color printer 200. A process for converting the number of gradations is a gradation number conversion process. As will be described later, the printer driver 12 according to the present embodiment enables rapid processing by collecting a predetermined number of pixels into units and performing gradation number conversion processing on a unit basis. For the processed unit, the pixel determined to form a dot is stored, and the number of gradations is converted while reflecting this data. Further, as will be described in detail later, the size of the unit is set to a predetermined size based on the number of passes of the color printer 200. In this way, it is possible to surely avoid the phenomenon that dots are formed in a constant pattern, which is a concern when the gradation number conversion processing is performed in units of units, and at the same time, to generate periodic patterns. However, it is possible to avoid the occurrence of color unevenness and deterioration of image quality. The gradation number conversion process will be described in detail later.

こうして階調数変換処理を終了したら、プリンタドライバはインターレース処理を開始する(ステップS108)。インターレース処理とは、ドットの形成有無を表す形式に変換された画像データ(ドットデータ)を、ドットの形成順序を考慮しながらカラープリンタ200に転送すべき順序に並べ替える処理である。プリンタドライバ12は、インターレース処理を行って最終的に得られた画像データを、印刷データとしてカラープリンタ200に出力する(ステップS110)。カラープリンタ200は、印刷データに従って、各色のインクドットを印刷媒体上に形成する。その結果、画像データに対応したカラー画像が印刷媒体上に印刷される。   When the gradation number conversion process is thus completed, the printer driver starts the interlace process (step S108). The interlace process is a process of rearranging the image data (dot data) converted into a format representing the presence / absence of dot formation into an order to be transferred to the color printer 200 in consideration of the dot formation order. The printer driver 12 outputs the image data finally obtained by performing the interlace processing to the color printer 200 as print data (step S110). The color printer 200 forms ink dots of each color on the print medium according to the print data. As a result, a color image corresponding to the image data is printed on the print medium.

D.第1実施例:
以下、図4に示した画像データ変換処理の中で行われる第1実施例の階調数変換処理について説明する。前述したように、本実施例の階調数変換処理では、複数の画素をユニットにまとめて、階調数変換処理をユニット単位で行っている。そこで、第1実施例の階調数変換処理について説明するための準備として、先ず、階調数変換処理をユニット単位で行う方法について説明し、その後、第1実施例の階調数変換処理において、処理済みのユニットでの判断結果を、ドット形成有無の判断に反映させる処理について説明する。
D. First embodiment:
Hereinafter, the tone number conversion process of the first embodiment performed in the image data conversion process shown in FIG. 4 will be described. As described above, in the gradation number conversion process of this embodiment, a plurality of pixels are grouped into units, and the gradation number conversion process is performed in units. Therefore, as a preparation for explaining the gradation number conversion process of the first embodiment, first, a method of performing the gradation number conversion process in units will be described, and then, in the gradation number conversion process of the first embodiment. A process of reflecting the determination result of the processed unit in the determination of the presence / absence of dot formation will be described.

D−1.ユニット単位で行う階調数変換処理:
図5は、ユニット単位で行う階調数変換処理の流れを示すフローチャートである。この処理は、コンピュータ100のCPU102によって行われる。尚、本実施例のカラープリンタ200は、前述したようにC,M,Y,Kの4色のインクドットを形成可能なプリンタであり、図5に示す処理も各色毎に行っている。しかし、以下では説明が煩雑となることを避けるために、色を特定せずに説明することとして、特段の明示がない限り、色を特定せずに説明した場合は、各色について同様な処理が行われることを意味するものとする。
D-1. Tone number conversion processing performed in units:
FIG. 5 is a flowchart showing the flow of gradation number conversion processing performed in units. This process is performed by the CPU 102 of the computer 100. Note that the color printer 200 of this embodiment is a printer that can form ink dots of four colors C, M, Y, and K as described above, and the processing shown in FIG. 5 is also performed for each color. However, in the following description, in order to avoid complicated explanation, the explanation will be made without specifying the color. Unless otherwise specified, when the explanation is made without specifying the color, the same processing is performed for each color. It means to be done.

ユニット単位の階調数変換処理を開始すると、先ず初めに、処理するユニットの位置を設定する(ステップS200)。ユニット単位で行う階調数変換処理では、所定の複数個の隣接する画素をユニットとしてまとめ、各画素にドットを形成するか否かの判断をユニット単位で行う。そこで、ユニット単位の階調数変換処理を開始すると、先ず初めに、画像中でドットの形成有無を判断しようとするユニット(処理ユニット)の位置を設定する処理を行う。   When the unit-unit gradation number conversion process is started, first, the position of the unit to be processed is set (step S200). In the gradation number conversion process performed in units, a predetermined number of adjacent pixels are grouped as a unit, and it is determined in units of whether or not to form dots in each pixel. Therefore, when the unit-unit gradation number conversion process is started, first, a process of setting the position of a unit (processing unit) for which it is determined whether or not dots are formed in the image is performed.

図6は、隣接する所定の複数個の画素をまとめて、処理ユニットの位置を設定している様子を概念的に示した説明図である。図6中に、複数表示されている小さな正方形は、画素を模式的に表示したものである。図示されているように、画像は格子状に配列された複数の画素によって構成されている。図6(a)に示した例では、縦横2列ずつに並んだ隣接する4つの画素をまとめて処理ユニットを設定している。図6(a)中で、4つの画素を囲む太い破線は、これら画素が処理ユニットとして設定されていることを模式的に示したものである。説明の便宜上、ユニットを構成する4つの画素の中で、左上の画素を「Pa 」、右上の画素を「Pb 」、左下の画素を「Pc 」、右下の画素を「Pd 」と呼んで区別するものとする。尚、以下では、ユニットは縦横2列に並んだ4つの画素で構成されているものとして説明するが、もちろん、このような構成のユニットに限定されるものではない。例えば、図6(b)に示すような隣接する4つの画素をまとめることによって処理ユニットを設定しても良い。また、処理ユニットとしてまとめる画素の個数も4つに限られるものではない。   FIG. 6 is an explanatory diagram conceptually showing a state in which a predetermined plurality of adjacent pixels are grouped to set the position of the processing unit. In FIG. 6, a plurality of small squares displayed schematically represent pixels. As shown in the figure, the image is composed of a plurality of pixels arranged in a grid pattern. In the example shown in FIG. 6A, a processing unit is set by grouping four adjacent pixels arranged in two vertical and horizontal columns. In FIG. 6A, a thick broken line surrounding four pixels schematically shows that these pixels are set as a processing unit. For convenience of explanation, among the four pixels constituting the unit, the upper left pixel is called “Pa”, the upper right pixel is “Pb”, the lower left pixel is “Pc”, and the lower right pixel is called “Pd”. A distinction shall be made. In the following description, the unit is assumed to be composed of four pixels arranged in two rows and columns, but of course, the unit is not limited to such a configuration. For example, the processing unit may be set by grouping four adjacent pixels as shown in FIG. Further, the number of pixels grouped as a processing unit is not limited to four.

処理ユニットを設定したら、続いてユニット内の各画素についての画像データおよび拡散誤差の読み込みを行う(図5のステップS202)。ここで読み込む画像データは、前述した色変換処理(図4のステップS104)によって色変換して得られたC,M,Y,K各色の階調データである。また、拡散誤差とは、階調数を変換することにより生じた階調誤差が、周辺のユニットから処理ユニットの各画素に拡散されてきた誤差である。画像データがC,M,Y,Kの各色毎の階調データであることから、階調誤差はこれら各色毎に発生し、従って拡散誤差もこれら各色毎の階調データとなっている。階調数を変換することに伴って階調誤差が発生し、発生した誤差が拡散誤差として周辺の画素に拡散される様子については後述する。   After the processing unit is set, image data and diffusion error are read for each pixel in the unit (step S202 in FIG. 5). The image data read here is gradation data of each color of C, M, Y, and K obtained by color conversion by the above-described color conversion process (step S104 in FIG. 4). The diffusion error is an error in which the gradation error caused by converting the number of gradations is diffused from the peripheral unit to each pixel of the processing unit. Since the image data is gradation data for each color of C, M, Y, and K, a gradation error occurs for each of these colors, and therefore the diffusion error is also gradation data for each of these colors. As will be described later, a gradation error is generated along with the conversion of the number of gradations, and the generated error is diffused as a diffusion error to surrounding pixels.

ここでは、図6(a)に示すように、処理ユニットは画素Pa 、画素Pb 、画素Pc 、画素Pd の4つの画素で構成されているとしているから、図5のステップS202の処理では、それぞれの画素について、画像データDTa 、DTb 、DTc 、DTd および拡散誤差EDa 、EDb 、EDc 、EDd が読み込まれることになる。処理ユニットについて読み込んだこれらのデータは、コンピュータ100のRAM106に記憶される。   Here, as shown in FIG. 6A, the processing unit is assumed to be composed of four pixels, pixel Pa, pixel Pb, pixel Pc, and pixel Pd. Therefore, in the process of step S202 in FIG. For these pixels, image data DTa, DTb, DTc, DTd and diffusion errors EDa, EDb, EDc, EDd are read. These data read for the processing unit are stored in the RAM 106 of the computer 100.

こうして各画素の画像データおよび拡散誤差を読み込んだら、処理ユニットを構成する各画素について、ドット形成の有無を判断する処理を開始する(ステップS204)。ここでは、図6(a)に示したように処理ユニットは4つの画素で構成されているとしているから、ステップS204の処理ではこれら4つの画素について所定の順序でドット形成の有無を判断していく。尚、本明細書中では、このようにユニット内の各画素についてドット形成の有無を判断する処理を、「ユニット内多値化処理」と呼ぶことがあるものとする。ユニット内多値化処理の詳細な内容については後述する。   When the image data and the diffusion error of each pixel are read in this way, processing for determining whether or not dots are formed is started for each pixel constituting the processing unit (step S204). Here, as shown in FIG. 6A, since the processing unit is composed of four pixels, in the process of step S204, the presence or absence of dot formation is determined for these four pixels in a predetermined order. Go. In the present specification, the process for determining the presence or absence of dot formation for each pixel in the unit is sometimes referred to as “in-unit multi-value processing”. Details of the multi-value processing in the unit will be described later.

処理ユニットを構成する各画素についてのドット形成有無の判断を終了したら、判断に伴って処理ユニット内で生じた階調誤差を、周辺のユニットに拡散する処理を行う(ステップS206)。処理ユニット内で生じた階調誤差とは、処理ユニット全体で表現すべき画像データの階調値と、該ユニット内の各画素にドットを形成することによって実際に表現された階調値との偏差を表す誤差である。処理ユニットで生じる階調誤差を算出する方法については、ユニット内多値化処理の説明の中で説明する。ステップS206においては、この偏差を示す階調値を、処理ユニットで生じた階調誤差として周辺の未処理のユニットに拡散させる処理を行う。   When the determination of the presence / absence of dot formation for each pixel constituting the processing unit is completed, a process of diffusing the gradation error generated in the processing unit to the peripheral units with the determination is performed (step S206). The gradation error generated in the processing unit is the gradation value of the image data to be expressed in the entire processing unit and the gradation value actually expressed by forming dots at each pixel in the unit. It is an error representing a deviation. A method for calculating the gradation error occurring in the processing unit will be described in the explanation of the multi-value processing in the unit. In step S206, the gradation value indicating the deviation is diffused to the surrounding unprocessed units as a gradation error generated in the processing unit.

図7は、処理ユニットで生じた階調誤差を、周辺の未処理のユニットに拡散させる様子を概念的に示した説明図である。図7中に示した複数の小さな正方形は、それぞれ画素を模式的に表示したものである。また、太い破線で示した大きな正方形は処理ユニットを示しており、細い破線で示した大きな正方形は、処理ユニットに隣接する未処理のユニットを示している。処理ユニットで生じた階調誤差は、周辺の未処理ユニットを構成する画素に所定の割合で拡散する。図7中で処理ユニットから周辺の6つの画素に伸びる黒抜きの矢印は、処理ユニットで生じた階調誤差を、これら6つの画素に所定の割合で拡散していることを模式的に示している。   FIG. 7 is an explanatory diagram conceptually showing a state in which the gradation error generated in the processing unit is diffused to surrounding unprocessed units. Each of the plurality of small squares shown in FIG. 7 schematically represents a pixel. A large square indicated by a thick broken line indicates a processing unit, and a large square indicated by a thin broken line indicates an unprocessed unit adjacent to the processing unit. The gradation error generated in the processing unit is diffused at a predetermined ratio to the pixels constituting the surrounding unprocessed units. In FIG. 7, the black arrows extending from the processing unit to the surrounding six pixels schematically indicate that the gradation error generated in the processing unit is diffused to these six pixels at a predetermined rate. Yes.

図8は、処理ユニットで生じた階調誤差を、処理ユニット周辺の未処理のユニットを構成する画素に拡散させる割合が設定されている様子を例示したものである。図8中で、太い実線で示した大きな正方形は処理ユニットを表したものであり、処理ユニットに隣接して細い破線で示した大きな正方形は、処理ユニット周辺の未処理のユニットを示したものである。これら未処理のユニットの中に細い実線で示した複数の小さな正方形は、処理ユニットからの誤差が拡散される画素を表示したものである。   FIG. 8 illustrates a state in which a ratio of diffusing gradation errors generated in the processing unit to pixels constituting unprocessed units around the processing unit is set. In FIG. 8, a large square indicated by a thick solid line represents a processing unit, and a large square indicated by a thin broken line adjacent to the processing unit represents an unprocessed unit around the processing unit. is there. A plurality of small squares indicated by thin solid lines in these unprocessed units represent pixels in which an error from the processing unit is diffused.

図8(a)に示した例では、処理ユニットの右側にある2つの画素には、処理ユニットで生じた階調誤差が1/8の割合でそれぞれ拡散され、処理ユニットの下側にある2つの画素にも同様に、階調誤差が1/8の割合でそれぞれ拡散される。また、処理ユニットの左下の画素あるいは右下の画素には、階調誤差が1/4の割合でそれぞれ拡散される。このような割合で階調誤差を拡散させれば、処理ユニットの周辺のユニットに均等に、それぞれ階調誤差の1/4の割合で拡散されることになる。また、図8(b)に示した例では、処理ユニットで生じた階調誤差が、処理ユニット周辺のユニットを構成するすべての画素に、同じ割合で拡散される。もちろん、同じユニットに拡散する誤差をそのユニットの1つの画素にまとめて拡散するようにしても良い。   In the example shown in FIG. 8A, the gradation error generated in the processing unit is diffused to the two pixels on the right side of the processing unit at a ratio of 1/8, and 2 pixels on the lower side of the processing unit. Similarly, the gradation error is diffused to each pixel at a rate of 1/8. Further, the gradation error is diffused at a ratio of 1/4 to the lower left pixel or the lower right pixel of the processing unit. If the gradation error is diffused at such a ratio, it is diffused evenly to the peripheral units of the processing unit at a ratio of 1/4 of the gradation error. Further, in the example shown in FIG. 8B, the gradation error generated in the processing unit is diffused at the same rate to all the pixels constituting the unit around the processing unit. Of course, errors that diffuse to the same unit may be diffused together in one pixel of that unit.

図5のステップS206においては、以上のようにして、処理ユニットで生じた階調誤差を周辺のユニットに拡散させる。処理ユニットについて、上述したすべての処理を終了したら、画像を構成する全てのユニットについて処理を終了したか否かを判断し(ステップS208)、未処理のユニットが残っていればステップS200に戻って続く一連の処理を繰り返す。こうして、すべてのユニットについての処理を完了したら、ユニット単位の階調数変換処理を終了する。   In step S206 in FIG. 5, the gradation error generated in the processing unit is diffused to the peripheral units as described above. When all the processes described above are completed for the processing unit, it is determined whether or not the process has been completed for all the units constituting the image (step S208). The following series of processes is repeated. When the processing for all the units is completed in this way, the gradation conversion processing for each unit is finished.

以上に説明したユニット単位で階調数変換処理を行えば、画素毎に処理した場合に比べて、以下のような利点を得ることができる。すなわち、階調数変換処理を画素毎に行う場合は、1つの画素についてのドット形成有無を判断する度に、その画素に対応付けて記憶されている拡散誤差を読み出さなければならず、また、ドット形成有無の判断によって生じた階調誤差を周辺の未判断画素に誤差を拡散しなければならない。このため、階調数変換処理を画素毎に行うと、処理時間が長くなってしまう傾向にある。これに対して、階調数変換処理をユニット単位で行った場合は、ユニット単位で画像データを読み出し、階調誤差を拡散させた後、拡散誤差をユニット単位でメモリに書き込むことができる。こうしてデータの読み出しおよび書き込みをユニット単位でまとめて行えば、処理に要する時間を短縮化することが可能である。   When the gradation number conversion process is performed on a unit basis as described above, the following advantages can be obtained as compared with the case of processing for each pixel. That is, when the gradation number conversion process is performed for each pixel, the diffusion error stored in association with the pixel must be read every time it is determined whether or not a dot is formed for one pixel. It is necessary to diffuse the error caused by the determination of whether or not dots are formed to surrounding undetermined pixels. For this reason, when the gradation number conversion process is performed for each pixel, the processing time tends to be long. On the other hand, when the gradation number conversion process is performed in units, it is possible to read the image data in units and diffuse the gradation errors, and then write the diffusion errors into the memory in units. If data reading and writing are performed in units in this way, the time required for processing can be shortened.

D−2.ユニット内多値化処理:
上述したユニット単位の階調数変換処理で行われるユニット内多値化処理(図5のステップS204)について説明する。図9は、ユニット内多値化処理の流れを示したフローチャートである。以下、フローチャートに従って説明する。
D-2. In-unit multi-value processing:
The in-unit multilevel conversion process (step S204 in FIG. 5) performed in the unit-unit gradation number conversion process described above will be described. FIG. 9 is a flowchart showing the flow of the in-unit multilevel processing. Hereinafter, it demonstrates according to a flowchart.

ユニット内多値化処理を開始すると、先ず初めに、処理ユニットを構成する画素の中から、ドット形成の有無を判断する画素(着目画素)を1つ設定する(ステップS300)。前述したようにユニットは複数の画素から構成されているので、これら複数の画素について所定の順序で1画素ずつドット形成の有無を判断することとして、着目画素を1つ選択する。ここでは、図6(a)に示したユニットを構成する4つの画素を、左上にある画素から右下の画素に向かって画素Pa 、画素Pb 、画素Pc 、画素Pd の順番にドット形成有無を判断することとして、ステップS300では、先ず初めに、左上隅にある画素Pa を着目画素として設定する。   When the intra-unit multi-value processing is started, first, one pixel (a pixel of interest) for determining the presence / absence of dot formation is set from the pixels constituting the processing unit (step S300). Since the unit is composed of a plurality of pixels as described above, one pixel of interest is selected by determining whether or not dots are formed pixel by pixel in a predetermined order for the plurality of pixels. Here, the four pixels constituting the unit shown in FIG. 6A are changed in the order of the pixel Pa, the pixel Pb, the pixel Pc, and the pixel Pd from the upper left pixel to the lower right pixel. In step S300, first, the pixel Pa at the upper left corner is set as the pixel of interest.

次いで、設定した着目画素(ここでは、画素Pa )についての補正データCx を算出する(ステップS302)。補正データCx は、着目画素の画像データと着目画素に拡散されて記憶されている拡散誤差とを加算することによって求めることができる。処理ユニットを構成する各画素についての画像データおよび拡散誤差は、図5に示した階調数変換処理中のステップS202において既に読み込まれているので、ユニット内多値化処理の数轍鮒S302においては、これらのデータの中から着目画素の画像データと拡散誤差とを加算して補正データCx を算出する。   Next, correction data Cx for the set target pixel (here, pixel Pa) is calculated (step S302). The correction data Cx can be obtained by adding the image data of the target pixel and the diffusion error diffused and stored in the target pixel. Since the image data and the diffusion error for each pixel constituting the processing unit have already been read in step S202 during the gradation number conversion processing shown in FIG. Adds the image data of the pixel of interest and the diffusion error from these data to calculate the correction data Cx.

着目画素Pa の補正データCx を算出したら、得られた補正データCx と所定の閾値thとの大小関係を判断する(ステップS304)。そして、補正データCx の方が大きければ着目画素(ここでは画素Pa )にドットを形成すると判断し(ステップS3306)、そうでなければ、着目画素にはドットを形成しないと判断する(ステップS308)。判断の結果は、各画素についての判断結果を示す変数に蓄えられる。   After calculating the correction data Cx of the pixel of interest Pa, the magnitude relationship between the obtained correction data Cx and the predetermined threshold th is determined (step S304). If the correction data Cx is larger, it is determined that a dot is to be formed on the target pixel (here, pixel Pa) (step S3306). Otherwise, it is determined that no dot is formed on the target pixel (step S308). . The result of the determination is stored in a variable indicating the determination result for each pixel.

こうして着目画素についてのドット形成有無を判断したら、判断に伴って着目画素に生じた階調誤差を算出する(ステップS310)。階調誤差は、ドットを形成したこと、あるいはドットを形成しなかったことによって着目画素に表現される階調値(以下では、この階調値を結果値と呼ぶ)を、着目画素の補正データCx から減算することによって算出することができる。   When the presence / absence of dot formation for the target pixel is determined in this way, the gradation error generated in the target pixel is calculated in accordance with the determination (step S310). The gradation error is a gradation value expressed in the pixel of interest by forming a dot or not forming a dot (hereinafter, this gradation value is referred to as a result value). It can be calculated by subtracting from Cx.

着目画素で生じた階調誤差を算出したら、処理ユニット内の全画素の処理を終了したか否かを判断し(ステップS312)、未処理の画素が残っている場合は(ステップS312:no)、これら未処理の画素中で着目画素周辺にある画素に誤差を拡散させる処理を行う(ステップS314)。この処理について、図10を参照しながら説明する。   After the gradation error generated in the target pixel is calculated, it is determined whether or not the processing of all the pixels in the processing unit has been completed (step S312). If there are unprocessed pixels remaining (step S312: no). Then, a process of diffusing an error to pixels around the target pixel among these unprocessed pixels is performed (step S314). This process will be described with reference to FIG.

図10は、処理ユニット内の画素から着目画素を1つずつ選択してドット形成の有無を判断することにより、ドット形成の有無をユニット単位で判断している様子を模式的に示した説明図である。図中の4つの正方形は、処理ユニットを構成する画素Pa 、画素Pb 、画素Pc 、画素Pd をそれぞれ示している。また、画素Pa を示す正方形の中に示したDTa およびEDa は、画素Pa に対応付けて、画像データDTa と拡散誤差EDa とがRAM106に読み込まれていることを概念的に示したものである。同様に、画素Pb には画像データDTb と拡散誤差EDb とが、画素Pc には画像データDTc と拡散誤差EDc とが、画素Pd には画像データDTd と拡散誤差EDd とが対応付けられて、それぞれRAM106に記憶されている。   FIG. 10 is an explanatory diagram schematically showing a state in which the presence / absence of dot formation is determined on a unit basis by selecting each pixel of interest from the pixels in the processing unit and determining the presence / absence of dot formation. It is. Four squares in the figure indicate the pixel Pa, the pixel Pb, the pixel Pc, and the pixel Pd, respectively, constituting the processing unit. DTa and Eda shown in the square indicating the pixel Pa conceptually show that the image data DTa and the diffusion error Eda are read into the RAM 106 in association with the pixel Pa. Similarly, image data DTb and diffusion error EDb are associated with pixel Pb, image data DTc and diffusion error EDc are associated with pixel Pc, and image data DTd and diffusion error EDd are associated with pixel Pd, respectively. Stored in the RAM 106.

前述したように、着目画素は、先ず初めはこれら4つの画素の中の画素Pa に設定されている。画素Pa についての画像データと拡散誤差とを読み出して補正データCx を算出し、閾値thと比較することによって画素Pa についてのドット形成の有無を判断する。画素Pa についてドット形成の有無を判断した時点では、図10(a)に示すように、同じユニット内には画素Pb と画素Pc と画素Pd の3つの画素が未判断画素として残っている。そこで、画素Pa で生じた階調誤差を、これら3つの画素に1/3ずつ均等に分配して、これら誤差を、各画素毎に記憶されている拡散誤差に加算する処理を行う。例えば画素Pb には、図10(a)に示すように、既に拡散誤差EDb が対応付けて記憶されている。画素Pa で生じた階調誤差は、その1/3の階調値が画素Pb に分配されて、拡散誤差EDb に加算される。その結果、画素Pb に対応づけて記憶されていた拡散誤差EDb は、画素Pa からの誤差が加算された新たな拡散誤差EDb に更新される。   As described above, the target pixel is initially set to the pixel Pa among these four pixels. The correction data Cx is calculated by reading out the image data and the diffusion error for the pixel Pa, and the presence or absence of dot formation for the pixel Pa is determined by comparing with the threshold value th. At the time when the presence or absence of dot formation is determined for the pixel Pa, as shown in FIG. 10A, three pixels of the pixel Pb, the pixel Pc, and the pixel Pd remain as undetermined pixels in the same unit. Therefore, the gradation error generated in the pixel Pa is equally distributed to each of these three pixels by 1/3, and the error is added to the diffusion error stored for each pixel. For example, as shown in FIG. 10A, the diffusion error EDb is already stored in association with the pixel Pb. The gradation error generated in the pixel Pa is distributed to the pixel Pb by 1/3 of the gradation value and added to the diffusion error EDb. As a result, the diffusion error EDb stored in association with the pixel Pb is updated to a new diffusion error EDb to which the error from the pixel Pa is added.

他の画素Pc および画素Pd についても同様な処理を行う。簡単に説明すると、画素Pa からの誤差が画素Pc に拡散されると、画素Pc に記憶されていた拡散誤差EDc と画素Pa からの誤差とが加算され、新たな拡散誤差EDc として画素Pc に対応付けて記憶される。また、画素Pd についても同様に、画素Pd に記憶されていた拡散誤差EDd と画素Pa からの誤差とが加算され、新たな拡散誤差EDd として画素Pd に対応付けて記憶される。図10(a)中で画素Pa から他の3つ画素に向かって表示されている白抜きの矢印は、画素Pa で生じた誤差がこれら3つの画素に拡散されることを模式的に示したものである。尚、階調誤差は、必ずしも周辺の未判断画素に均等に分配する必要はなく、各画素に所定の割合で分配することも可能である。   Similar processing is performed for the other pixels Pc and Pd. Briefly, when the error from the pixel Pa is diffused to the pixel Pc, the diffusion error EDc stored in the pixel Pc and the error from the pixel Pa are added to correspond to the pixel Pc as a new diffusion error EDc. It is memorized. Similarly, for the pixel Pd, the diffusion error EDd stored in the pixel Pd and the error from the pixel Pa are added and stored as a new diffusion error EDd in association with the pixel Pd. In FIG. 10A, the white arrow displayed from the pixel Pa toward the other three pixels schematically shows that the error generated in the pixel Pa is diffused to these three pixels. Is. Note that the gradation error does not necessarily have to be evenly distributed to the surrounding undetermined pixels, and can be distributed to each pixel at a predetermined ratio.

以上のようにして画素Pa で階調誤差をユニット内の周辺画素に拡散したら、図9のステップS300に戻って、新たな着目画素を設定する処理を行う。処理ユニット中の画素Pa については、既にドット形成の有無を判断済みであるから、ステップS300では、今度は画素Pa の右隣の画素Pb を着目画素として設定する。こうして設定した新たな着目画素について、上述した処理とほぼ同様の処理を行う。以下、画素Pa における処理との相違点を中心に簡単に説明する。   After the gradation error is diffused to the peripheral pixels in the unit as described above, the process returns to step S300 in FIG. 9 to perform a process for setting a new pixel of interest. Since the pixel Pa in the processing unit has already been determined for dot formation, in step S300, the pixel Pb right next to the pixel Pa is set as the pixel of interest. For the new pixel of interest set in this way, the same processing as that described above is performed. Hereinafter, the difference from the processing in the pixel Pa will be briefly described.

画素Pb についての処理を行う場合にも画素Pa における場合と同様に、先ず初めに、補正データCx を算出する(ステップS302)。ここで、画素Pb に対応付けて記憶されている拡散誤差EDb には、先に画素Pa で生じた階調誤差が拡散されて、新たな拡散誤差EDb として更新されている。そこで、画素Pb についての画像データDTb と、画素Pa からの階調誤差が拡散された新たな拡散誤差EDb とを加算することにより、画素Pb についての補正データCx を算出する。こうして算出した補正データCx と所定の閾値thとの大小関係を判断し(ステップS304)、補正データCx の方が大きければ画素Pb にはドットを形成すると判断し(ステップS306)、そうでなければ画素Pb にはドットを形成しないと判断する(ステップS308)。次いで、画素Pb について発生した階調誤差を算出する(ステップS310)。階調誤差は、画素Pa の場合と同様に、画素Pb の補正データCx から結果値を減算することによって算出することができる。   When the process for the pixel Pb is performed, the correction data Cx is first calculated as in the case of the pixel Pa (step S302). Here, the gradation error previously generated in the pixel Pa is diffused into the diffusion error EDb stored in association with the pixel Pb, and updated as a new diffusion error EDb. Therefore, the correction data Cx for the pixel Pb is calculated by adding the image data DTb for the pixel Pb and the new diffusion error EDb in which the gradation error from the pixel Pa is diffused. The magnitude relationship between the correction data Cx thus calculated and the predetermined threshold th is determined (step S304). If the correction data Cx is larger, it is determined that a dot is to be formed in the pixel Pb (step S306), otherwise. It is determined that no dot is formed on the pixel Pb (step S308). Next, the gradation error generated for the pixel Pb is calculated (step S310). Similar to the case of the pixel Pa, the gradation error can be calculated by subtracting the result value from the correction data Cx of the pixel Pb.

着目画素Pb で生じた階調誤差を算出したら、処理ユニット内のすべての画素について処理を終了したか否かを判断し(ステップS312)、未処理の画素が残っていれば、算出しておいた階調誤差を、これら未処理の画素に拡散させる処理を行う(ステップS314)。前述したように、ユニット内の画素Pa については既に判断を終了しているから、未判断画素として残っているのは画素Pc および画素Pd の2つの画素である。そこで、画素Pb で生じた階調誤差はこれら2つの画素に拡散させることになる。再び、図10を参照しながら、画素Pb からの誤差を拡散させる処理について説明する。   After the gradation error generated in the target pixel Pb is calculated, it is determined whether or not the processing has been completed for all the pixels in the processing unit (step S312). A process of diffusing the gradation error that has occurred to these unprocessed pixels is performed (step S314). As described above, since the determination for the pixel Pa in the unit has already been completed, two pixels, the pixel Pc and the pixel Pd, remain as undecided pixels. Therefore, the gradation error generated in the pixel Pb is diffused to these two pixels. The process for diffusing the error from the pixel Pb will be described again with reference to FIG.

図10(b)は、画素Pb で生じた階調誤差を拡散している様子を概念的に示した説明図である。図中で、画素Pa に斜線が施されているのは、画素Pa については既にドット形成の有無を判断済みであることを模式的に示したものである。画素Pb についてドット形成の有無を判断した時点では、処理ユニット内には未判断画素として画素Pc 、画素Pd の2つの画素が残っている。そこで、画素Pb で生じた階調誤差は、図10(b)に示したように、これらの画素Pc および画素Pd にそれぞれ、1/2ずつ拡散されることになる。図中で、画素Pb から画素Pc および画素Pd に向かって伸びる白抜きの矢印は、画素Pb で生じた階調誤差がこれら画素に拡散されていることを模式的に示している。こうして誤差が拡散される結果、各画素の拡散誤差は、拡散されてきた誤差が加算された新たな拡散誤差に更新される。尚、ここでは、階調誤差は処理ユニット内の未判断画素に均等に拡散されるものとしているが、もちろん、均等に拡散させるのではなく、所定の割合で誤差を拡散させることとしても構わない。   FIG. 10B is an explanatory diagram conceptually showing a state in which the gradation error generated in the pixel Pb is diffused. In the figure, the pixel Pa is shaded to schematically indicate that the pixel Pa has already been determined for dot formation. At the time when it is determined whether or not dots are formed for the pixel Pb, two pixels of the pixel Pc and the pixel Pd remain as undetermined pixels in the processing unit. Therefore, the gradation error generated in the pixel Pb is diffused by ½ each to the pixel Pc and the pixel Pd as shown in FIG. In the drawing, white arrows extending from the pixel Pb toward the pixels Pc and Pd schematically indicate that the gradation error generated in the pixel Pb is diffused to these pixels. As a result of the error being diffused in this way, the diffusion error of each pixel is updated to a new diffusion error obtained by adding the diffused error. Here, the gradation error is assumed to be evenly diffused to the undetermined pixels in the processing unit, but of course, the error may be diffused at a predetermined rate instead of being uniformly diffused. .

こうして画素Pb で生じた階調誤差を周辺の画素に拡散したら、再び図9のステップS300に戻って、今度は着目画素を画素Pc に移動させた後、着目画素Pc について同様の処理を行う。以下では、かかる処理について、図10(c)を参照しながら説明する。画素Pc についての処理を開始すると、先ず初めに画素Pc の画像データDTc と拡散誤差EDc とを加算して補正データCx を算出する。ここで、画素Pc についてのドット形成有無を開始した時点では、画素Pc の拡散誤差EDc は、元々記憶されていた拡散誤差に加えて、画素Pa からの誤差と画素Pb からの誤差とが加算されて、新たな拡散誤差EDc として更新されている。このことから、画素Pc の補正データCx の算出に際しては、画素Pc の画像データDTc に、新たな拡散誤差EDc が算出されることになる。こうして得られた補正データCx と、所定の閾値thとを比較することによって、画素Pc についてのドット形成有無を判断する。こうして画素Pc についてのドット形成有無を判断した時点では、処理ユニット内に残る未判断画素は、図10(c)に示すように画素Pd のみである。そこで、画素Pc で生じた階調誤差は全て画素Pd に拡散され、画素Pd に元々記憶されていた拡散誤差に加算されて、新たな拡散誤差EDd として更新される。   After the gradation error generated in the pixel Pb is diffused to the surrounding pixels, the process returns to step S300 in FIG. 9 again, this time the target pixel is moved to the pixel Pc, and the same process is performed for the target pixel Pc. Hereinafter, such processing will be described with reference to FIG. When the process for the pixel Pc is started, first, the correction data Cx is calculated by adding the image data DTc of the pixel Pc and the diffusion error EDc. Here, when the dot formation on / off of the pixel Pc is started, the diffusion error EDc of the pixel Pc is obtained by adding the error from the pixel Pa and the error from the pixel Pb in addition to the originally stored diffusion error. And updated as a new diffusion error EDc. Therefore, when calculating the correction data Cx for the pixel Pc, a new diffusion error EDc is calculated for the image data DTc for the pixel Pc. By comparing the correction data Cx thus obtained with a predetermined threshold th, it is determined whether or not dots are formed for the pixel Pc. Thus, when it is determined whether or not dots are formed for the pixel Pc, the undetermined pixel remaining in the processing unit is only the pixel Pd as shown in FIG. Therefore, all the gradation errors generated in the pixel Pc are diffused to the pixel Pd, added to the diffusion error originally stored in the pixel Pd, and updated as a new diffusion error EDd.

着目画素Pc で生じた階調誤差を拡散したら、図9のステップS300に戻って着目画素を画素Pd に移動した後、画素Pd についてのドット形成有無の判断を開始する。すなわち、画素Pd に対応づけられた新たな拡散誤差EDd と画素Pd の画像データDTd とを加算して補正データCx を算出する(ステップS300、ステップS302)。次いで、補正データCx と閾値thとを比較し(ステップS304)、補正データCx の方が大きい場合は画素Pd にはドットを形成する(ステップS306)と判断し、そうでない場合は画素Pd にはドットを形成しないと判断する(ステップS308)。   When the gradation error generated in the pixel of interest Pc is diffused, the process returns to step S300 in FIG. 9 to move the pixel of interest to the pixel Pd, and then the determination of dot formation on the pixel Pd is started. That is, the correction data Cx is calculated by adding the new diffusion error EDd associated with the pixel Pd and the image data DTd of the pixel Pd (steps S300 and S302). Next, the correction data Cx is compared with the threshold value th (step S304). If the correction data Cx is larger, it is determined that a dot is formed in the pixel Pd (step S306). Otherwise, the pixel Pd It is determined that no dot is formed (step S308).

こうして画素Pd についてのドット形成の有無を判断したら、画素Pd で生じた階調誤差を算出した後(ステップS310)、処理ユニット内の全画素の処理を終了したか否かを判断する(ステップS312)。図10(d)に示したように、画素Pd について処理を開始した時点で、もはや処理ユニット内には未判断の画素は残っておらず、画素Pd についての判断が終了した後のステップS312においては、処理ユニット内の全画素についての処理が終了したと判断される。そこで、図9に示したユニット内の多値化処理を終了して、図5を用いて前述したユニット単位で行う階調数変換処理に復帰する。図5に示されているように、ユニット単位の階調数変換処理では、ユニット内多値化処理から復帰すると、処理ユニットで生じた階調誤差を周辺のユニットに拡散する処理を行う(図5のステップS206)。   When it is determined whether or not dots are formed for the pixel Pd in this way, the gradation error generated in the pixel Pd is calculated (step S310), and then it is determined whether or not the processing of all the pixels in the processing unit is completed (step S312). ). As shown in FIG. 10D, at the time when the processing for the pixel Pd is started, there is no longer any undetermined pixel in the processing unit, and in step S312 after the determination for the pixel Pd is completed. Is determined to have been processed for all the pixels in the processing unit. Therefore, the multi-value process in the unit shown in FIG. 9 is terminated, and the process returns to the gradation number conversion process performed in units as described above with reference to FIG. As shown in FIG. 5, in the unit-unit gradation number conversion process, after returning from the multi-value process in the unit, a process of diffusing the gradation error generated in the processing unit to surrounding units is performed (FIG. 5). 5 step S206).

ここで、処理ユニットで生じた階調誤差の値としては、ユニット内多値化処理のステップS310において画素Pd について求めた階調誤差の値を用いることができる。これは、着目画素で生じた階調誤差をユニット内の未判断画素に拡散しながらドット形成有無の判断を行っているために、ユニット内で生じた階調誤差が、最後に判断する画素Pd に拡散誤差EDd として累積されることによる。以下、図10を参照して詳しく説明する。   Here, as the value of the gradation error generated in the processing unit, the value of the gradation error obtained for the pixel Pd in step S310 of the intra-unit multi-value processing can be used. This is because the gradation error generated in the unit is determined to be the last pixel Pd to be determined because the gradation error generated in the unit is determined while diffusing the gradation error generated in the target pixel to the undetermined pixels in the unit. Is accumulated as a diffusion error EDd. Hereinafter, this will be described in detail with reference to FIG.

画素Pa で生じた階調誤差は処理ユニット内の画素Pb 、画素Pc 、画素Pd の3つの画素に拡散される。画素Pb のドット形成有無の判断に際しては、画素Pa からの誤差を考慮して、画素Pb に拡散されている誤差ができるだけ解消されるようにドット形成の有無が判断される。仮に、画素Pb についてドット形成有無を判断することにより、画素Pb に拡散されている誤差を解消することができたものとする。この場合は、画素Pb では新たな階調誤差は発生せず、また、画素Pb から画素Pc 、画素Pd に拡散される誤差も生じない。他の2つの画素Pc 、画素Pd についても同様に、ドット形成の有無を判断したことで、それぞれの画素に拡散されている誤差を解消することができたものとすると、これらの画素では階調誤差は生じない。結局、この場合は、画素Pa で生じた階調誤差を、周辺の未判断画素Pb 、画素Pc 、画素Pd で解消したこととなって、処理ユニット全体としては階調誤差の発生を避けることができる。   The gradation error generated in the pixel Pa is diffused to three pixels of the pixel Pb, the pixel Pc, and the pixel Pd in the processing unit. In determining whether or not the pixel Pb has dot formation, the presence or absence of dot formation is determined in consideration of the error from the pixel Pa so that the error diffused in the pixel Pb is eliminated as much as possible. It is assumed that the error diffused to the pixel Pb can be eliminated by determining the presence or absence of dot formation for the pixel Pb. In this case, a new gradation error does not occur in the pixel Pb, and an error diffused from the pixel Pb to the pixels Pc and Pd does not occur. Similarly, regarding the other two pixels Pc and Pd, it is assumed that the error diffused in each pixel can be eliminated by determining the presence or absence of dot formation. There is no error. Eventually, in this case, the gradation error generated in the pixel Pa is eliminated in the surrounding undetermined pixels Pb, Pc, and Pd, so that the entire processing unit avoids the generation of the gradation error. it can.

ここでは、画素Pb のドット形成有無の判断によって、画素Pb での誤差を解消するものとしたが、画素Pb で新たな階調誤差が発生した場合には、この誤差は周辺の未判断画素Pc および画素Pd に拡散されて、その結果、これらの画素には、画素Pa で生じた階調誤差と画素Pb で生じた階調誤差とが拡散されることになる。しかし、これら画素Pc 、画素Pd についてドット形成の有無を判断することで、それぞれの画素に拡散された誤差を解消することができれば、依然としてユニット全体としてみれば階調誤差は生じない。   Here, it is assumed that the error in the pixel Pb is eliminated by determining whether or not the dot is formed in the pixel Pb. However, when a new gradation error occurs in the pixel Pb, this error is not detected in the surrounding undetermined pixel Pc. As a result, the gradation error generated in the pixel Pa and the gradation error generated in the pixel Pb are diffused in these pixels. However, if it is possible to eliminate the error diffused in each pixel by determining the presence or absence of dot formation for these pixels Pc and Pd, there will be no gradation error in the entire unit.

画素Pc についてドット形成有無を判断することで、画素Pc に拡散されている拡散誤差を解消することができない場合も、全く同様にして、画素Pd で誤差を解消することができれば、ユニット全体としては階調誤差が生じることはない。換言すれば、画素Pd で解消しきれずに残った誤差が、ユニット全体で生じた階調誤差となる。このように、着目画素で生じた階調誤差をユニット内の未判断画素に拡散しながらドット形成有無を判断していくと、各画素で解消しきれずに残った階調誤差が後続する画素に集約されていくので、ユニット内で最後に判断する画素Pd で生じた階調誤差を、処理ユニット全体で生じた階調誤差として用いることが可能となるのである。   Even if it is not possible to eliminate the diffusion error diffused in the pixel Pc by determining the presence or absence of dot formation for the pixel Pc, if the error can be eliminated in the pixel Pd in the same manner, There is no gradation error. In other words, the remaining error that cannot be resolved in the pixel Pd is a gradation error that occurs in the entire unit. As described above, when the presence or absence of dot formation is determined while diffusing the gradation error generated in the target pixel to the undetermined pixels in the unit, the remaining gradation error that cannot be resolved in each pixel is transferred to the subsequent pixels. Since the data is collected, the gradation error generated in the pixel Pd to be determined last in the unit can be used as the gradation error generated in the entire processing unit.

尚、以上の説明では、処理ユニット内で最後にドット形成有無を判断する画素Pd で生じた階調誤差の値を、処理ユニット全体で生じた階調誤差として用いるものとしたが、もちろん、処理ユニットを構成する各画素毎に階調誤差を算出し、これら階調誤差の総和を処理ユニットの階調誤差としても構わない。   In the above description, the value of the gradation error generated in the pixel Pd that finally determines the presence or absence of dot formation in the processing unit is used as the gradation error generated in the entire processing unit. The gradation error may be calculated for each pixel constituting the unit, and the sum of these gradation errors may be used as the gradation error of the processing unit.

また、図10に示した例では、着目ユニットを構成する各画素のドット形成有無を判断するに際しては、画素Pa 、画素Pb 、画素Pc 、画素Pd の順番で判断を行ったが、必ずしもこの順番で判断する必要はなく、例えば、画素Pa 、画素Pc 、画素Pb 、画素Pd の順番でドット形成有無を判断しても構わない。処理ユニット内で着目画素を設定する順番は、良好な画質が得られる順番を選択しておくことができる。   Further, in the example shown in FIG. 10, when determining the presence or absence of dot formation of each pixel constituting the target unit, the determination is performed in the order of the pixel Pa, the pixel Pb, the pixel Pc, and the pixel Pd. For example, it may be determined whether or not dots are formed in the order of the pixel Pa, the pixel Pc, the pixel Pb, and the pixel Pd. The order in which the pixel of interest is set in the processing unit can be selected in order of obtaining good image quality.

D−3.第1実施例のユニット内多値化処理:
以上に説明したようにして、ユニット単位で階調数変換処理を行う場合、ユニット毎に同じ処理が繰り返されることになる。このことから、あるユニットでドットを形成すると判断した画素は、後続するユニットでも、同じ位置にドットが形成されると判断され易い傾向がある。あるいは、個々のユニットについてはドットが形成されるユニットとされないユニットが生じるものの、複数のユニットを周期として一定のパターンでドットが形成されることがある。例えば、画像データが一定の領域が続く場合など、複数のユニットを周期としてほとんど同じ処理が繰り返されることになり、ユニット内の同じ位置の画素に周期的にドットが形成されることが起こり得る。もちろん、ドット自体の大きさは視認が困難なほどに小さいが、複数のユニットに亘って周期的なパターンでドットが形成されると、この様な領域の存在が視認されて画質を悪化させるおそれがある。
D-3. In-unit multilevel processing of the first embodiment:
As described above, when the gradation number conversion process is performed in units, the same process is repeated for each unit. From this, a pixel that is determined to form a dot in a certain unit tends to be easily determined that a dot is formed at the same position in the subsequent unit. Alternatively, although there is a unit where dots are not formed as individual units, dots may be formed in a fixed pattern with a plurality of units as a period. For example, when a certain area of image data continues, almost the same processing is repeated with a plurality of units as a cycle, and it is possible that dots are periodically formed in pixels at the same position in the unit. Of course, the size of the dot itself is so small that it is difficult to visually recognize. However, if dots are formed in a periodic pattern across multiple units, the existence of such a region may be visually recognized and the image quality may deteriorate. There is.

更には、本実施例のカラープリンタ200のように、1本のラスタを複数回の主走査によって形成するプリンタでは、周期的なパターンが視認されるまでには至らずとも、ユニット内の特定の画素位置に偏ってドットが形成されると、色ムラが発生するなどして画質が悪化してしまうことがある。すなわち、主走査を複数回行っているものの、特定の主走査で集中してドットが形成されてしまうために、ラスタを複数回に分けて形成していることによる画質改善の効果が得られず、色ムラや白筋などの画質上の問題が発生してしまう場合がある。   Furthermore, in a printer that forms one raster by a plurality of main scans, such as the color printer 200 of the present embodiment, a specific pattern in a unit is not necessary even if a periodic pattern is not visually recognized. If dots are formed biased at pixel positions, image quality may deteriorate due to color unevenness. That is, although the main scan is performed a plurality of times, dots are formed in a concentrated manner in a specific main scan, and therefore the effect of improving the image quality due to the formation of the raster divided into a plurality of times cannot be obtained. In some cases, image quality problems such as color unevenness and white stripes may occur.

この様な問題の発生を回避するために、第1実施例では、ユニット内の多値化処理を行い、画像データをユニット単位でドットデータに変換するに際して、既に処理したユニット中でドットが形成された画素位置を検出し、検出結果を反映させながらドット形成の有無を判断している。このように、処理済みのユニット内でドットが形成される画素位置の履歴を考慮しながら、処理ユニット内のドット形成有無を判断すれば、画像データをユニット単位で変換することによって生じ得る画質の悪化を回避することができる。また、本実施例では、ユニットには、少なくとも主走査方向には、カラープリンタ200のパス数の整数倍に相当する個数ずつ連続した画素をまとめることとしている。後述するように、ユニットをこのような大きさとしておけば、周期的なパターンの発生を回避することで、色ムラや白筋が発生するといった問題が発生することも同時に回避することが可能である。以下では、こうした第1実施例のユニット内多値化処理について説明する。   In order to avoid the occurrence of such a problem, in the first embodiment, multi-value processing in the unit is performed, and when image data is converted into dot data in units, dots are formed in the already processed units. The detected pixel position is detected, and the presence or absence of dot formation is determined while reflecting the detection result. In this way, if the presence / absence of dot formation in the processing unit is determined while considering the history of pixel positions where dots are formed in the processed unit, the image quality that can be generated by converting the image data in units is determined. Deterioration can be avoided. Further, in this embodiment, the unit collects continuous pixels by the number corresponding to an integral multiple of the number of passes of the color printer 200 at least in the main scanning direction. As will be described later, if the unit is set to such a size, it is possible to avoid the occurrence of problems such as color unevenness and white streak by avoiding the generation of periodic patterns. is there. Hereinafter, the in-unit multi-value processing of the first embodiment will be described.

上述したように、本実施例のユニット内多値化処理では、ユニットの大きさが、少なくとも主走査方向には、カラープリンタ200のパス数の整数倍となるように設定されている。具体的には、図6に示したように、少なくとも主走査方向には2画素ずつの複数の画素がまとめられている。これは、本実施例のカラープリンタ200が、1つのラスタを2回の主走査に分けて(すなわち2パスで)形成していることに対応したものである。この点につき、若干補足して説明する。   As described above, in the intra-unit multilevel processing of this embodiment, the unit size is set to be an integral multiple of the number of passes of the color printer 200 at least in the main scanning direction. Specifically, as shown in FIG. 6, a plurality of pixels each having two pixels are collected at least in the main scanning direction. This corresponds to the fact that the color printer 200 of this embodiment forms one raster divided into two main scans (that is, in two passes). This point will be described with some supplementary explanation.

図11は、カラープリンタ200が、1本のラスタを2パスで形成する様子を概念的に示した説明図である。図中に示した小さな矩形は、画素を模式的に表したものである。今、図中の上段に示した一列の画素の上に、ドットの列(ラスタ)を形成するものとする。また説明の便宜上、図11では、各画素を識別するために画素番号を付してある。1本のラスタを2パスで形成する場合は、各パスでは画素1つおきにドットを形成する。図11に示した例では、パスAでは画素番号が奇数の画素にドットを形成し、パスBでは画素番号が偶数の画素にドットを形成している。図11では、理解の便宜を図るため、パスAで形成されるドットは斜線を付した丸印で表し、パスBで形成されるドットは斜線を付した三角印で表すことによって区別している。このように、各パスでは飛び飛びの画素にドットを形成しながらも、2パス終了後には、図11の下段に示したように1本のラスタが形成されることになる。   FIG. 11 is an explanatory diagram conceptually showing how the color printer 200 forms one raster in two passes. The small rectangle shown in the figure schematically represents a pixel. Assume that a dot row (raster) is formed on one row of pixels shown in the upper part of the drawing. For convenience of description, pixel numbers are assigned in FIG. 11 to identify each pixel. When one raster is formed by two passes, dots are formed every other pixel in each pass. In the example shown in FIG. 11, in pass A, dots are formed on pixels with odd pixel numbers, and in pass B, dots are formed on pixels with even pixel numbers. In FIG. 11, for convenience of understanding, the dots formed in pass A are distinguished by hatched circles, and the dots formed in pass B are distinguished by hatched triangles. In this way, while forming dots on the skipped pixels in each pass, one raster is formed as shown in the lower part of FIG. 11 after the end of the second pass.

このように、本実施例ではカラープリンタ200が2パスでラスタを形成することに対応して、主走査方向および副走査方向に2画素ずつの合計4つの画素をユニットとしてまとめている。ユニットしてまとめる画素は、少なくとも主走査方向の画素数がパス数2の倍数となりさえすれば、どのようなものであっても良い。例えば、図12に示すように、主走査方向に4画素ずつ連続した合計8つの画素をユニットとしてまとめることも可能である。   As described above, in this embodiment, in correspondence with the color printer 200 forming a raster in two passes, a total of four pixels of two pixels each in the main scanning direction and the sub-scanning direction are combined as a unit. The pixels grouped together as a unit may be any pixel as long as at least the number of pixels in the main scanning direction is a multiple of the number of passes 2. For example, as shown in FIG. 12, it is also possible to collect a total of eight pixels that are continuous in four pixels in the main scanning direction as a unit.

尚、ここでは、カラープリンタ200のパス数が「2」であるものとして説明しているが、ここで説明している事柄は、他のパス数である場合にも同様に適用することができる。すなわち、1本のラスタを3回のパスで形成するパス数3のプリンタの場合には、主走査方向に3の倍数個(すなわち、3,6,9・・・のいずれか)ずつの画素をユニットしてまとめればよいし、パス数4のプリンタであれば、主走査方向に4の倍数個ずつの画素をユニットとしてまとめてやればよい。   Here, the description has been made assuming that the number of passes of the color printer 200 is “2”. However, the matter described here can be similarly applied to other numbers of passes. . That is, in the case of a three-pass printer that forms one raster in three passes, each pixel is a multiple of 3 (that is, any of 3, 6, 9,...) In the main scanning direction. If the printer has 4 passes, multiple pixels of 4 in the main scanning direction may be combined as a unit.

図13は、こうしたユニットを、ユニット単位で多値化処理する流れを示すフローチャートである。かかる処理は、図9を用いて前述したユニット内多値化処理に対して、処理済みのユニット内でドットが形成された画素位置を検出し、検出結果を反映させながら階調数変換処理を行っている点が大きく異なっている。以下、前述したユニット内多値化処理との相違点を中心として、第1実施例のユニット内多値化処理について説明する。   FIG. 13 is a flowchart showing the flow of multi-value processing of such units in units. In this process, in contrast to the multi-value processing in the unit described above with reference to FIG. 9, the pixel position where the dot is formed in the processed unit is detected, and the tone number conversion process is performed while reflecting the detection result. The point of going is very different. Hereinafter, the intra-unit multi-value processing of the first embodiment will be described with a focus on the differences from the above-described intra-unit multi-value processing.

第1実施例のユニット内多値化処理においても、処理を開始すると先ず初めに、処理ユニットの中から着目画素を1つ設定し(ステップS400)、設定した着目画素についての補正データCx を算出する(ステップS402)。補正データCx は、着目画素の画像データと着目画素に拡散されて記憶されている拡散誤差とを加算することによって求めることができる。また、処理ユニットを構成する各画素の画像データおよび拡散誤差は、図5に示した階調数変換処理中のステップS202において既に読み込まれており、これらデータの中から着目画素についてのデータを用いて補正データCx を算出する。   Also in the intra-unit multi-value processing of the first embodiment, when processing is started, first, one target pixel is set from the processing unit (step S400), and correction data Cx for the set target pixel is calculated. (Step S402). The correction data Cx can be obtained by adding the image data of the target pixel and the diffusion error diffused and stored in the target pixel. Further, the image data and the diffusion error of each pixel constituting the processing unit have already been read in step S202 during the gradation number conversion process shown in FIG. 5, and data on the pixel of interest is used from these data. Correction data Cx is calculated.

次いで、第1実施例のユニット内多値化処理においては、処理済みのユニット内でドットが形成される画素位置の履歴を検出し、検出結果に基づいて閾値thを適切な値に設定する処理を行う(ステップS404)。この処理(履歴検出・閾値設定処理)について、図14を参照しながら説明する。   Next, in the intra-unit multi-value process of the first embodiment, a process of detecting a history of pixel positions where dots are formed in a processed unit, and setting the threshold th to an appropriate value based on the detection result Is performed (step S404). This process (history detection / threshold setting process) will be described with reference to FIG.

図14は、履歴検出・閾値設定処理の流れを示すフローチャートである。履歴検出・閾値設定処理を開始すると、先ず初めに、履歴データを読み出す処理を行う(ステップS500)。履歴データとは、処理済みのユニットについてドットを形成すると判断された画素位置を記録したデータであり、RAM106上の特定の領域に確保された専用のバッファ(履歴検出用バッファ)に記憶されている。   FIG. 14 is a flowchart showing the flow of history detection / threshold setting processing. When the history detection / threshold setting processing is started, first, history data reading processing is performed (step S500). The history data is data in which pixel positions determined to form dots for a processed unit are recorded and stored in a dedicated buffer (history detection buffer) secured in a specific area on the RAM 106. .

図15(a)は、履歴データの構造を概念的に示した説明図である。図15(a)に示した履歴データは、12bitの長さを有しており、それぞれのbitが画素位置に対応している。前述したように、ここでは1つのユニットは4つの画素から構成されているとしているから、12bit分の履歴データには、3つのユニット分の画素が記憶されていることになる。尚、ここでは履歴データには3ユニット分のデータが蓄えられているものとして説明するが、より多数のユニットのデータを蓄えることとしても構わない。以下、図15(a)を参照しながら具体的に説明する。   FIG. 15A is an explanatory diagram conceptually showing the structure of history data. The history data shown in FIG. 15A has a length of 12 bits, and each bit corresponds to a pixel position. As described above, since one unit is composed of four pixels here, three units of pixels are stored in the 12-bit history data. Here, although it is assumed that the data for three units is stored in the history data, data of a larger number of units may be stored. Hereinafter, a specific description will be given with reference to FIG.

図示するように、履歴データは連続する4bitを1つのブロックとして、3つのブロックに分けて解釈することができる。これら3つのブロックは、下位側(図上では右側)から順番に、処理中のユニットの直前に処理したユニット(「1つ前のユニット」)、その直前に処理したユニット(「2つ前のユニット」)、更にその直前に処理したユニット(「3つ前のユニット」)にそれぞれ対応している。また、各ブロックを構成する4つのbitは、下位側から、対応するユニット内の右下隅にある画素(画素Pd )、左下隅にある画素(画素Pc )、右上隅にある画素(画素Pb )、左上隅にある画素(画素Pa )にそれぞれ対応している。履歴データ中のあるbitに値「1」が記録されていることは、そのbitが対応する画素にドットが形成されることを意味しており、逆にbitに値「0」が記憶されている場合は、そのbitが対応する画素にはドットが形成されないことを意味している。   As shown in the figure, the history data can be interpreted as three blocks with four consecutive bits as one block. These three blocks are, in order from the lower side (right side in the figure), the unit processed immediately before the unit being processed (“the previous unit”) and the unit processed immediately before that (“the two previous units”). Unit ") and the unit processed immediately before that (" three previous units "). Also, the four bits constituting each block are, from the lower side, a pixel in the lower right corner (pixel Pd), a pixel in the lower left corner (pixel Pc), and a pixel in the upper right corner (pixel Pb) in the corresponding unit. , Corresponding to the pixel (pixel Pa) in the upper left corner. The fact that a value “1” is recorded in a certain bit in the history data means that a dot is formed in the pixel corresponding to that bit, and conversely the value “0” is stored in the bit. If it is, it means that no dot is formed in the pixel corresponding to the bit.

尚、図15において、4bitを1ブロックとして解釈しているのは、ここでは1つのユニットが4つの画素から構成されているとしたことに対応したものである(図6(a)参照)。従って、1つのユニットをN個の画素から構成されているとした場合は、履歴データは連続するNbitを1つのブロックとして解釈される。また、ここでは、履歴データは12bit分のデータであるとして説明するが、1つのユニットがN個の画素から構成されていて、処理ユニットからMユニット前に処理したユニットまでのドット形成状況を参照する場合には、履歴データは、N×Mbitの長さを有するデータとすればよい。   In FIG. 15, the interpretation of 4 bits as one block corresponds to the fact that one unit is composed of four pixels here (see FIG. 6A). Therefore, if one unit is composed of N pixels, the history data is interpreted as a block of N bits that are continuous. In addition, here, the history data is described as data of 12 bits. However, one unit is composed of N pixels, and the dot formation status from the processing unit to the unit processed before M units is referred to. In this case, the history data may be data having a length of N × Mbit.

一例として、図15(b)に示すような履歴データを想定する。履歴データの下位側の4つのbitからなるグループに着目すると、このグループ内の最上位(左端)のbitおよび最下位(右端)のbitには値「1」が設定されており、他のbitについては値「0」が設定されている。これは、処理中のユニットの直前に処理したユニット(「1つ前のユニット」)では、画素Pa および画素Pd の2つ画素にドットが形成され、その他の画素位置にはドットが形成されないことを意味している。同様に、履歴データの中央にあるグループについては、いずれのbitにも値「0」が記憶されているから、処理ユニットの2つ前に処理したユニットでは、いずれの画素にもドットが形成されていないことを意味している。履歴データの上位側にあるグループについては、グループ内の最上位のbitに値「1」が記憶されているから、処理ユニットの3つ前に処理したユニットでは画素Pa の画素位置にドットが形成されることを意味している。このようにして履歴データを解釈することにより、図15(b)で想定した履歴データからは、図15(c)に示したドットの形成状況を知ることができる。   As an example, history data as shown in FIG. Focusing on a group consisting of four bits on the lower side of the history data, the value “1” is set for the most significant (leftmost) bit and the least significant (rightmost) bit in this group, and the other bits The value “0” is set for. This is because in the unit processed immediately before the unit being processed (the “previous unit”), dots are formed in the two pixels Pa and Pd, and no dots are formed in the other pixel positions. Means. Similarly, since the value “0” is stored in any bit for the group in the center of the history data, a dot is formed in any pixel in the unit processed immediately before the processing unit. It means not. For the group on the upper side of the history data, since the value “1” is stored in the most significant bit in the group, a dot is formed at the pixel position of the pixel Pa in the unit processed three times before the processing unit. Is meant to be. By interpreting the history data in this way, it is possible to know the dot formation status shown in FIG. 15C from the history data assumed in FIG.

図14のステップS500では、RAM106上の所定の領域に確保された履歴検出用バッファから、このような履歴データを読み出す処理を行う。こうして、履歴データを読み出したら、続いて、履歴検出用データを設定する処理を開始する(ステップS502)。かかる処理について、図16を参照して説明する。   In step S500 in FIG. 14, such history data is read from the history detection buffer secured in a predetermined area on the RAM 106. After the history data is read out in this way, subsequently, a process for setting history detection data is started (step S502). Such processing will be described with reference to FIG.

図16は、履歴検出用データを設定する様子を概念的に示した説明図である。一例として、処理ユニット中の画素Pa について、ドット形成有無を判断しようとしている場合を考える。図16(a)で、斜線を付して示した破線の大きな正方形は、処理ユニットを示しており、処理ユニット中の黒い正方形は着目画素を示している。前述したようにユニット内多値化処理では、各画素のドット形成有無の判断をユニット単位で行うために、同じ画素位置にドットが形成され易くなる場合がある。この理由について、少し詳しく説明する。   FIG. 16 is an explanatory diagram conceptually showing how history detection data is set. As an example, consider a case in which it is determined whether or not dots are formed for the pixel Pa in the processing unit. In FIG. 16A, a large square with a broken line indicated by hatching indicates a processing unit, and a black square in the processing unit indicates a pixel of interest. As described above, in the intra-unit multi-value processing, since it is determined on a unit basis whether or not dots are formed in each pixel, dots may be easily formed at the same pixel position. The reason for this will be explained in a little more detail.

例えば、画像中で処理している領域が、画素36個につき1画素の割合でドットが形成されるような、比較的低階調の画像データの領域(明るい画像の領域)であるとする。この様な領域では、縦横6画素の合計36画素から構成される正方形の領域に、ほぼ1つずつの割合でドットが形成されることになる。この様な画像データの領域を、4画素(縦横2画素)を1ユニットとするユニット単位でドット形成有無を判断した場合、3ユニット(6画素分)を周期として同じ処理が繰り返されることになり、3ユニット目の同じ画素位置にドットが形成されてしまうことが起こり得る。こうした一定の周期でドットが形成された場合、これらドットを形成する印字パスが、後述するように特定のパスに偏ってしまい、色ムラが発生して画質を悪化させることが起こり得る。   For example, it is assumed that a region being processed in an image is a relatively low gradation image data region (bright image region) in which dots are formed at a rate of one pixel per 36 pixels. In such a region, dots are formed at a rate of approximately one in a square region composed of a total of 36 pixels of 6 pixels vertically and horizontally. In such an image data area, when the presence or absence of dot formation is determined in units of 4 pixels (vertical and horizontal 2 pixels) as one unit, the same processing is repeated with a cycle of 3 units (6 pixels) It is possible that dots are formed at the same pixel position in the third unit. When dots are formed at such a constant cycle, the print pass for forming these dots may be biased to a specific pass as will be described later, and color unevenness may occur to deteriorate the image quality.

そこで、図16(a)に示した例では、処理ユニットから3つ前のユニットまでの範囲で、各ユニットの画素Pa にドットが形成されているか否かを検出する。図16(a)中で、各ユニットの画素Pa に示された「?」は、これらの画素位置でドットの形成状況を検出することを模式的に示したものである。   Therefore, in the example shown in FIG. 16A, it is detected whether or not dots are formed in the pixel Pa of each unit in the range from the processing unit to the unit three units before. In FIG. 16A, “?” Shown in the pixel Pa of each unit schematically indicates that the dot formation status is detected at these pixel positions.

図16(b)は、これら画素位置でのドット形成状況を検出するために設定された履歴検出用データを、概念的に示した説明図である。履歴検出用データも、前述した履歴データと同様に12bitの長さを有しており、4bitを1グループとして、3つのグループに分けて解釈される。履歴検出用データが3つのグループから構成されているのは、3つのユニットでのドット形成状況を検出することに対応したものである。また、4bitで1グループを構成しているのは、本実施例では、4つの画素を1つのユニットとしてまとめて処理していることに対応したものである。履歴検出用データの各グループとユニットとの対応関係、および各bitとユニット内の画素位置との対応関係は、図15に示した履歴データの場合と同様であるため、ここでは説明は省略する。尚、ここでは、履歴検出用データは、図15に示した履歴データと同じ長さのデータとして説明するが、これに限られるものではない。   FIG. 16B is an explanatory diagram conceptually showing history detection data set for detecting the dot formation status at these pixel positions. The history detection data also has a length of 12 bits, similar to the history data described above, and is interpreted as being divided into three groups, with 4 bits as one group. The history detection data is composed of three groups corresponding to the detection of dot formation status in three units. The reason why one group is formed by 4 bits corresponds to the fact that four pixels are collectively processed as one unit in this embodiment. The correspondence between each group of history detection data and the unit, and the correspondence between each bit and the pixel position in the unit are the same as in the history data shown in FIG. . Here, the history detection data is described as data having the same length as the history data shown in FIG. 15, but the present invention is not limited to this.

図16(a)に示したように、ここでは、各ユニットの画素Pa でのドット形成状況を検出しようとしている場合を想定しているから、履歴検出用データは、各ユニットの画素Pa に対応するbitのみ値「1」を設定し、他のbitには値「0」を設定したデータとすればよい。   As shown in FIG. 16A, since it is assumed here that the dot formation status is detected in the pixel Pa of each unit, the history detection data corresponds to the pixel Pa of each unit. The value “1” is set only for the bits to be set, and the data “0” is set for the other bits.

また、着目画素が画素Pb に設定されている場合は、同様にして、処理ユニットから3つ前のユニットまでの範囲で、各ユニットの画素Pb にドットが形成されているか否かを検出すればよい。図16(c)は、着目画素が画素Pb に設定されている場合に、各ユニットでのドット形成状況を検出する画素位置を示す説明図である。図中に「?」を表示した画素が、ドット形成状況を検出する必要のある画素となる。図16(d)は、この様な画素でのドット形成状況を検出するために設定される履歴検出用データを概念的に示した説明図である。図示されているように、このような場合の履歴検出用データは、各ユニットの画素Pb に対応するbitの値を「1」として、他のbitは値「0」を設定したデータとすればよい。   If the pixel of interest is set to the pixel Pb, similarly, if it is detected whether or not a dot is formed on the pixel Pb of each unit in the range from the processing unit to the unit three units before. Good. FIG. 16C is an explanatory diagram showing a pixel position for detecting the dot formation status in each unit when the target pixel is set to the pixel Pb. A pixel displaying “?” In the figure is a pixel that needs to detect the dot formation status. FIG. 16D is an explanatory diagram conceptually showing history detection data set for detecting the dot formation state in such a pixel. As shown in the figure, history detection data in such a case is data in which the value of the bit corresponding to the pixel Pb of each unit is set to “1” and the other bits are set to the value “0”. Good.

図14のステップS502では、以上に説明したようにして、着目画素の位置に応じて履歴検出用データを設定する処理を行う。   In step S502 in FIG. 14, as described above, processing for setting history detection data according to the position of the pixel of interest is performed.

こうして履歴検出用データを設定したら、ステップS500で読み込んだ履歴データに、設定した履歴検出用データを作用させることによって、検出対象としているドットの形成状況(以下、履歴検出用データを設定して検出しようとしているドットの形成状況を「対象履歴」と呼ぶことがあるものとする)を検出する(ステップS504)。   When the history detection data is set in this way, the dot detection status (hereinafter referred to as history detection data is set and detected) by applying the set history detection data to the history data read in step S500. The formation status of the dot that is going to be called may be referred to as “target history”) (step S504).

図17(a)は、履歴データに履歴検出用データを作用させて、対象履歴を検出する様子を概念的に示した説明図である。図17(a)の上段には、履歴データを示し、履歴データの下段には履歴検出用データを示している。対象履歴の検出に際しては、先ず、履歴データと履歴検出用データとの間で、対応するbit同士の論理積を算出する。本明細書中で「履歴データに履歴検出用データを作用させる」とは、このように、履歴データと履歴検出用データとの間で、対応するbit同士の論理積を採ることにより中間データを算出することを言う。次いで、こうして得られた中間データの各bitの論理和、あるいは算術和を取ることによって対象履歴を検出することができる。図17(a)では、履歴データに履歴検出用データを作用して算出した中間データを、履歴検出用データの下段に示している。前述したように、履歴検出用データには、各ユニット中で検出しようとする画素位置にのみ値「1」が設定され、検出不要の画素位置には値「0」が設定されているから、履歴データと履歴検出用データとでbit同士の論理積を算出すると、検出しようとする画素位置にドットが形成されている場合にのみ、その画素位置に対応するbitの値が「1」に設定される。   FIG. 17A is an explanatory diagram conceptually showing how the history detection data is applied to the history data to detect the target history. The upper part of FIG. 17A shows history data, and the lower part of the history data shows history detection data. When detecting the target history, first, a logical product of corresponding bits is calculated between the history data and the history detection data. In this specification, “acting history detection data on history data” means that intermediate data is obtained by taking the logical product of corresponding bits between history data and history detection data. Say to calculate. Next, the target history can be detected by taking the logical sum or arithmetic sum of each bit of the intermediate data obtained in this way. In FIG. 17A, the intermediate data calculated by applying the history detection data to the history data is shown in the lower part of the history detection data. As described above, in the history detection data, the value “1” is set only at the pixel position to be detected in each unit, and the value “0” is set at the pixel position that does not need to be detected. When the logical product of the bits is calculated from the history data and the history detection data, the bit value corresponding to the pixel position is set to “1” only when a dot is formed at the pixel position to be detected. Is done.

上述した処理を、図17(a)中に示した「1つ前のユニット」に着目して、具体的に説明する。履歴データに示されているように、処理ユニットの「1つ前のユニット」には画素Pa および画素Pd にドットが形成されている。ここで、ドットの形成状況を検出しようとしている画素位置は、履歴検出用データに示されているように画素Pa のみであるから、中間データは、図17(a)に示すように、画素Pa に対応するbitのみが値「1」となり、他のbitは値「0」となる。このように、中間データのいずれかのbitが値「1」となっていることは、そのユニットには、検出しようとしている画素位置にドットが形成されていることを意味している。次いで、各ユニットの論理和を取って、その値が「1」であれば、検出しようとする画素位置のいずれかにドットが形成されていることになる。また、各ユニットの算術和を取れば、検出しようとする画素位置に何個のドットが形成されているかを検出することが可能となる。   The above-described processing will be specifically described by paying attention to “the previous unit” shown in FIG. As shown in the history data, dots are formed in the pixel Pa and the pixel Pd in the “previous unit” of the processing unit. Here, since the pixel position where the dot formation status is to be detected is only the pixel Pa as shown in the history detection data, the intermediate data is the pixel Pa as shown in FIG. Only the bit corresponding to “1” has the value “1”, and the other bits have the value “0”. Thus, if any bit of the intermediate data has the value “1”, it means that a dot is formed in the unit at the pixel position to be detected. Next, the logical sum of each unit is calculated, and if the value is “1”, a dot is formed at any pixel position to be detected. Further, by calculating the arithmetic sum of each unit, it is possible to detect how many dots are formed at the pixel position to be detected.

図14のステップS504では、以上のようにして、中間データの各bitの論理和(あるいは算術和)を採って検出結果を算出する処理を行う。こうして得られた検出結果に基づいて、対象履歴が検出されたか否かを判断する(ステップS506)。検出結果の値が「0」である場合は、対象履歴は検出されていないものと判断する。すなわち、検出結果(すなわち中間データの各bitの論理和)の値が「0」となったことは、検出対象とするいずれのユニットにおいても、検出しようとしている画素位置にはドットが形成されていないことを意味している。そこで、検出結果の値が「0」であれば、対象履歴は検出されていないものと判断することができる。逆に、検出結果の値が「1」であれば、検出対象としているユニット中のいずれかのユニットにおいて、検出しようとしている画素位置にドットが形成されていることを意味しており、対象履歴が検出されたものと判断することができる。また、中間データの各bitの算術和を取った場合は、得られた値が所定値以上であれば対象履歴が検出されたものと判断し、算術和の値が所定値未満であれば対象履歴は検出されていないものと判断すればよい。   In step S504 in FIG. 14, processing for calculating the detection result by taking the logical sum (or arithmetic sum) of each bit of the intermediate data is performed as described above. Based on the detection result thus obtained, it is determined whether a target history has been detected (step S506). When the value of the detection result is “0”, it is determined that the target history is not detected. That is, the fact that the value of the detection result (that is, the logical sum of each bit of the intermediate data) is “0” means that no dot is formed at the pixel position to be detected in any unit to be detected. It means not. Therefore, if the value of the detection result is “0”, it can be determined that the target history has not been detected. On the other hand, if the value of the detection result is “1”, this means that a dot is formed at the pixel position to be detected in any of the units to be detected. Can be determined to be detected. In addition, when the arithmetic sum of each bit of the intermediate data is taken, it is determined that the target history is detected if the obtained value is equal to or greater than the predetermined value, and if the arithmetic sum value is less than the predetermined value, the target It may be determined that the history is not detected.

図17(a)に示した中間データには、「1つ前のユニット」および「3つ前のユニット」の中のbitが値「1」に設定されているので、このような中間データの各bitの論理和を採って検出結果を算出すると値「1」が得られる。従って、この場合には対象履歴が検出されることになる。   In the intermediate data shown in FIG. 17 (a), the bits in the “one previous unit” and the “three previous units” are set to the value “1”. A value “1” is obtained by calculating the detection result by taking the logical sum of each bit. Therefore, in this case, the target history is detected.

参考として、図17(a)の上段に示す履歴データが表しているドットの形成状況を、図17(b)に示した。図17(a)に示したように、中間データから算出された検出結果は値「1」となり、画素Pa にドットが形成されていることを示す結果が得られる。図17(b)に示されているように、処理ユニットの「1つ前のユニット」および「3つ前のユニット」の画素Pa の位置には、確かにドットが形成されている。このことから、履歴データに履歴検出用データを作用させる方法を用いることで、ドットの形成状況を正確に検出可能であることが確認できる。   As a reference, the dot formation status represented by the history data shown in the upper part of FIG. 17A is shown in FIG. As shown in FIG. 17A, the detection result calculated from the intermediate data is the value “1”, and a result indicating that a dot is formed in the pixel Pa is obtained. As shown in FIG. 17B, a dot is surely formed at the position of the pixel Pa of “the previous unit” and “the previous unit” of the processing unit. From this, it can be confirmed that the dot formation status can be accurately detected by using the method of applying the history detection data to the history data.

図14の履歴検出・閾値設定処理では、こうして検出した対象履歴に基づいて、閾値thの値を適切な値に設定する処理を行う。すなわち、ステップS506において対象履歴が検出されなかった場合には、通常値Vn を閾値thとして設定し(ステップS508)、逆に、対象履歴が検出された場合には、通常値Vn よりも大きな値に設定された割増値Vp を、閾値thとして設定する(ステップS510)。ここで設定した閾値thは、ユニット内多値化処理中で着目画素にドットを形成するか否かを判断するために参照される。こうして閾値thを設定したら、図14の履歴検出・閾値設定処理を終了して、図13に示した第1実施例のユニット内多値化処理に復帰する。   In the history detection / threshold setting processing of FIG. 14, processing for setting the value of the threshold th to an appropriate value is performed based on the target history thus detected. That is, when the target history is not detected in step S506, the normal value Vn is set as the threshold th (step S508). Conversely, when the target history is detected, a value larger than the normal value Vn is set. Is set as the threshold th (step S510). The threshold value th set here is referred to in order to determine whether or not to form a dot on the target pixel during the multi-value processing in the unit. When the threshold value th is set in this way, the history detection / threshold value setting process of FIG. 14 is terminated, and the process returns to the intra-unit multi-value process of the first embodiment shown in FIG.

履歴検出・閾値設定処理から復帰すると、ステップS402において算出しておいた補正データCx と、閾値thとの大小関係を判断する(ステップS406)。この閾値thは、履歴検出・閾値設定処理中で対象履歴を検出することにより、適切な値に設定されている。そして、補正データCx の方が大きい場合には(ステップS406:yes)、着目画素にはドットを形成すると判断し(ステップS408)、そうでない場合には(ステップS406:no)、着目画素にはドットを形成しないと判断する(ステップS410)。図14を用いて説明したように、対象履歴が検出されると閾値thの値は、通常用いられる値(通常値Vn )よりも大きな所定の割増値(Vp )に変更されることから、結局、対象履歴が検出された場合には着目画素にはドットが形成され難くなることとなる。こうして判断した結果は、各画素についての判断結果を示す変数に蓄えられる。   When returning from the history detection / threshold setting process, the magnitude relationship between the correction data Cx calculated in step S402 and the threshold th is determined (step S406). The threshold th is set to an appropriate value by detecting the target history during the history detection / threshold setting process. If the correction data Cx is larger (step S406: yes), it is determined that a dot is to be formed on the target pixel (step S408). Otherwise (step S406: no), It is determined that no dot is formed (step S410). As described with reference to FIG. 14, when the target history is detected, the value of the threshold value th is changed to a predetermined premium value (Vp) larger than the normally used value (normal value Vn). When the target history is detected, it becomes difficult to form dots on the target pixel. The determination result is stored in a variable indicating the determination result for each pixel.

以上のようにして着目画素についてのドット形成有無を判断したら、判断に伴って生じる階調誤差を算出する(ステップS412)。階調誤差の算出方法は、図9に示したユニット内多値化処理と同様であり、ここでは説明を省略する。ついで、処理ユニット内の全画素の処理を終了したか否かを判断する(ステップS414)。未処理の画素が残っている場合は(ステップS414:no)、ユニット内にあるそれらの周辺画素に誤差を拡散させる処理を行った後(ステップS416)、ステップS400に戻って着目画素を移動させて、続く一連の処理を繰り返す。ステップS416において処理ユニット内の画素に誤差を拡散させる処理は、図9、図10を用いて説明した前述のユニット内多値化処理と同様にして行うことができる。   When the presence / absence of dot formation for the pixel of interest is determined as described above, the tone error that accompanies the determination is calculated (step S412). The method for calculating the gradation error is the same as the in-unit multi-value processing shown in FIG. Next, it is determined whether or not the processing of all the pixels in the processing unit has been completed (step S414). If unprocessed pixels remain (step S414: no), after performing processing for diffusing the error to those neighboring pixels in the unit (step S416), the process returns to step S400 to move the pixel of interest. Then, the following series of processes is repeated. In step S416, the process of diffusing the error to the pixels in the processing unit can be performed in the same manner as the above-described intra-unit multilevel processing described with reference to FIGS.

一方、ステップS414において、処理ユニット内の全画素の処理を終了したと判断された場合は(ステップS414:no)、処理ユニット内の各画素についての判断結果を、履歴検出用バッファに書き込む処理を行う(ステップS418)。かかる処理について、図18、図19を参照して説明する。   On the other hand, when it is determined in step S414 that the processing of all the pixels in the processing unit has been completed (step S414: no), a process of writing the determination result for each pixel in the processing unit to the history detection buffer is performed. This is performed (step S418). Such processing will be described with reference to FIGS.

図18は、処理ユニットの各画素についての判断結果を、履歴検出用バッファに書き込む処理の流れを示したフローチャートである。履歴検出用バッファに書き込む処理を開始すると、先ず初めに、バッファに記憶されているデータを、上位方向に1ユニット分だけシフトさせる処理を行う(ステップS600)。図19は、かかる処理を模式的に示した説明図である。図中に示された小さな正方形の列は、履歴検出用バッファを模式的に示したものであり、図中の上側に示した履歴検出用バッファはデータをシフトする前の状態を、図中の下側に示し履歴検出用バッファはデータをシフトした後の状態を示している。図18のステップS600においては、図19に示されているように履歴検出用バッファのデータを1ユニット分だけ上位方向にシフトさせる。このとき、履歴検出用バッファの最上位側のユニットのデータは破棄される。また、シフトさせた後の最下位ユニットの各bitには、念のために、いずれのbitにも値「0」を書き込んでおく。尚、図19では、履歴検出用バッファは、ユニット3つ分のデータを記憶可能であるとしているが、もちろんより多数のユニットのデータを記憶可能としてもよい。   FIG. 18 is a flowchart showing the flow of processing for writing the determination result for each pixel of the processing unit into the history detection buffer. When the process of writing to the history detection buffer is started, first, the process of shifting the data stored in the buffer by one unit in the upper direction is performed (step S600). FIG. 19 is an explanatory diagram schematically showing such processing. The small square column shown in the figure schematically shows the history detection buffer. The history detection buffer shown in the upper side of the figure shows the state before the data is shifted. The history detection buffer shown on the lower side shows a state after the data is shifted. In step S600 of FIG. 18, the data in the history detection buffer is shifted upward by one unit as shown in FIG. At this time, the data of the highest unit in the history detection buffer is discarded. In addition, a value “0” is written in each bit of the lowest unit after the shift as a precaution. In FIG. 19, the history detection buffer is capable of storing data for three units, but of course, data for a larger number of units may be stored.

こうして1ユニット分のデータを上位方向にシフトさせたら(図18のステップS600)、次いで、処理ユニット内の各画素の判断結果に応じた4bit長のデータを設定する処理を行う(ステップS602)。かかるデータのそれぞれのbitは、処理ユニットを構成する各画素に対応付けられている。具体的には、最上位bitは処理ユニットの画素Pa に、上位から2番目のbitは画素Pb に、3番目のbitは画素Pc に、最下位bitは画素Pd にそれぞれ対応付けられている。ステップS602においては、処理ユニット内でドットが形成される画素に対応するbitには値「1」を書き込み、ドットが形成されない画素に対応するbitには値「0」を書き込む処理を行う。例えば、ある処理ユニットでは、画素Pb にのみドットが形成され、他の画素にはドットが形成されなかったとすると、ステップS602の処理では、処理ユニットに対応する4bit長のデータとして「0100( 2)」が設定されることになる。尚、( 2)は二進数表示されていることを示すものとする。   After the data for one unit is shifted in the upper direction in this way (step S600 in FIG. 18), a process for setting 4-bit length data according to the determination result of each pixel in the processing unit is performed (step S602). Each bit of the data is associated with each pixel constituting the processing unit. Specifically, the most significant bit is associated with the pixel Pa of the processing unit, the second most significant bit is associated with the pixel Pb, the third bit is associated with the pixel Pc, and the least significant bit is associated with the pixel Pd. In step S602, a value “1” is written in a bit corresponding to a pixel in which a dot is formed in the processing unit, and a value “0” is written in a bit corresponding to a pixel in which no dot is formed. For example, when a dot is formed only in the pixel Pb in a certain processing unit and no dot is formed in other pixels, in the processing in step S602, “0100 (2)” is obtained as 4-bit length data corresponding to the processing unit. "Will be set. Note that (2) indicates that a binary number is displayed.

続くステップS604では、こうして設定したデータを、履歴検出用バッファの最下位ユニットの領域に書き込む処理を行う。図19で、最下位ユニットの各bitに向かう白抜きの矢印は、設定されたデータがこれらbitに書き込まれる様子を模式的に示したものである。   In a succeeding step S604, a process for writing the set data in the area of the lowest unit of the history detection buffer is performed. In FIG. 19, the white arrow toward each bit of the lowest unit schematically shows how the set data is written into these bits.

以上のようにして、処理ユニット内の各画素の判断結果を履歴検出用バッファに書き込む処理を終了したら、図13に示した第1実施例のユニット内多値化処理を終了して、図5の階調数変換処理に復帰する。   As described above, when the process of writing the determination result of each pixel in the processing unit to the history detection buffer is finished, the intra-unit multi-value quantization process of the first embodiment shown in FIG. Return to the tone number conversion process.

尚、以上の説明では、対象履歴が検出された場合には、ドット形成有無の判断に使用する閾値thの設定値を大きな値に変更して、着目画素にはドットが形成され難くするものとした。もちろん、対象履歴が検出された場合には、着目画素にはドットを形成しないと判断することも可能である。このようにすれば、複数のユニットを周期として同じ画素位置にドットが形成されることを、簡便に回避することができる。   In the above description, when the target history is detected, the setting value of the threshold th used for determination of dot formation presence / absence is changed to a large value to make it difficult for dots to be formed on the target pixel. did. Of course, when the target history is detected, it is possible to determine that no dot is formed in the target pixel. In this way, it is possible to easily avoid the formation of dots at the same pixel position with a plurality of units as a cycle.

また、以上の説明では、履歴データに履歴検出用データを作用させて中間データを生成し、中間データの各bitの論理和あるいは算術和を取って検出結果を算出した。これに対して、中間データの各bitの論理積を取って、この値を検出結果としても良い。この場合は、ドットの形成状況を検出しようとしている全ての画素位置にドットが形成されている場合にのみ、検出結果の値が「1」となる。従って、例えば、ドットがある程度の密度で形成されている状況で、視認されやすい特定のパターン形成されたドットだけを、確実に検出することが可能となる。   In the above description, history detection data is applied to history data to generate intermediate data, and a detection result is calculated by calculating a logical sum or arithmetic sum of each bit of the intermediate data. On the other hand, the logical product of each bit of the intermediate data is taken, and this value may be used as the detection result. In this case, the value of the detection result is “1” only when dots are formed at all the pixel positions where the dot formation status is to be detected. Therefore, for example, in a situation where dots are formed with a certain density, it is possible to reliably detect only dots with a specific pattern that is easily visible.

上述したように、第1実施例のユニット内多値化処理においては、履歴検出・閾値設定処理中で対象履歴の有無を検出し、対象履歴が検出された場合には閾値thの値を大きくすることによって、着目画素にドットが形成され難くしている。このため、ユニット単位で階調数変換処理を行った場合でも、複数のユニットを周期として同じ画素位置にドットが形成される領域が発生し、この領域が視認されて画質を悪化させることを回避することができる。   As described above, in the intra-unit multilevel processing of the first embodiment, the presence / absence of the target history is detected during the history detection / threshold setting processing, and when the target history is detected, the value of the threshold th is increased. This makes it difficult for dots to be formed on the target pixel. For this reason, even when the gradation number conversion processing is performed in units of units, an area where dots are formed at the same pixel position with a plurality of units as a cycle is generated, and it is avoided that this area is visually recognized to deteriorate image quality. can do.

また、ユニットの大きさは、少なくとも主走査方向にはパス数の整数倍となるように設定されている。このため、複数のユニットに亘って同じ画素位置にドットが形成されることを回避しておけば、特定のパスに偏ってドットが形成されてしまって画質が悪化することも同時に回避することが可能となる。以下、この理由について説明する。   The unit size is set to be an integral multiple of the number of passes at least in the main scanning direction. For this reason, if it is avoided that dots are formed at the same pixel position over a plurality of units, it is possible to simultaneously avoid the deterioration of image quality due to the formation of dots in a specific pass. It becomes possible. Hereinafter, this reason will be described.

図20は、ユニットの大きさが、主走査方向にはパス数の整数倍となっていない場合、複数ユニットに亘ってドットが一定のパターンで発生することを回避しようとすると、ドットを形成するパスが特定のパスに偏ってしまうことがある理由を示した説明図である。図中に示した小さな正方形は画素を示しており、破線で示した大きな矩形はユニットを示している。尚、説明の便宜から、ここでは1つのラスタに着目して説明することとして、図20では着目しているラスタのみを表示している。また、ラスタは2パスで形成されているものとして、ユニットは少なくとも主走査方向には、3画素ずつまとめて形成されている場合を示している。3画素という値は、パス数2の整数倍ではない値として例示されたものであり、ここでの説明は、5画素や7画素など、2の倍数ではない他の値についても同様に適用することができる。   FIG. 20 shows that when the unit size is not an integral multiple of the number of passes in the main scanning direction, dots are formed when trying to avoid the occurrence of dots in a constant pattern across a plurality of units. It is explanatory drawing which showed the reason where a path may be biased to a specific path. Small squares shown in the figure indicate pixels, and large rectangles indicated by broken lines indicate units. For convenience of explanation, only one raster is shown in FIG. 20 as a description will be given focusing on one raster. Further, it is assumed that the raster is formed by two passes, and the unit is formed by collecting three pixels at least in the main scanning direction. The value of 3 pixels is exemplified as a value that is not an integer multiple of the number of passes 2, and the description here applies similarly to other values that are not multiples of 2, such as 5 pixels or 7 pixels. be able to.

今、印刷しようとする画像中に、9画素に1個の割合でドットが形成されるような領域が存在していたものとする。主走査方向に3画素ずつユニットとしてまとめ、ユニット単位でドット形成の有無を判断した場合、このような領域では、図13および図14に示した特別な制御を行わない限り、3画素飛びにドットが形成されるという一定のパターンが発生し易い。図20(a)には、特別な制御を行わない場合に、3画素飛びにドットが形成される様子が示されている。図中で、画素を示す正方形の中に表示された斜線を付した表示した丸印は、その画素に形成されるドットを表している。本実施例では、このようにドットが一定のパターンで形成されて画質を悪化させることを回避するために、図13および図14に示したように、既に処理済みのユニットでのドット形成有無の判断結果を検出し、一定のパターンでドットが形成される場合には、その画素にはドットが形成され難くする。   Now, it is assumed that there is an area in which dots are formed at a rate of 1 in 9 pixels in an image to be printed. When the unit is grouped in units of 3 pixels in the main scanning direction and it is determined whether or not dots are formed on a unit basis, in such an area, dots are skipped by 3 pixels unless the special control shown in FIGS. 13 and 14 is performed. It is easy to generate a certain pattern that is formed. FIG. 20A shows a state in which dots are formed every three pixels when special control is not performed. In the figure, a circle with a diagonal line displayed in a square indicating a pixel represents a dot formed on the pixel. In this embodiment, in order to avoid the deterioration of the image quality due to the dots being formed in a constant pattern in this way, as shown in FIGS. 13 and 14, whether or not dots have been formed in the already processed unit. When the determination result is detected and dots are formed in a certain pattern, it is difficult to form dots on the pixels.

図20(b)は、このようにして、ドットが一定のパターンで形成されることが回避されている様子を表している。例えば、図中の左から2番目のユニットについては、ユニット内の左上隅の画素位置にドットが形成されると、先頭のユニットと同じ画素位置に連続してドットが形成されることになる。そこで、2番目のユニットの左上隅の画素についてはドットを形成され難くして、その結果、ドットの形成される画素位置が隣の画素にずれている様子を表している。左から4番目のユニットについても同様にして、ドットが形成される画素位置が隣の画素にずれた様子を表している。   FIG. 20B shows how the dots are prevented from being formed in a certain pattern in this way. For example, in the second unit from the left in the figure, when dots are formed at the pixel position at the upper left corner in the unit, dots are continuously formed at the same pixel position as the head unit. Therefore, the pixel in the upper left corner of the second unit is made difficult to form a dot, and as a result, the pixel position where the dot is formed is shifted to the adjacent pixel. Similarly, the fourth unit from the left represents a state in which the pixel position where the dot is formed is shifted to the adjacent pixel.

図20(b)に示されているように、こうしてドットの形成位置をずらしてやることで、ドットが一定のパターンで形成されることを回避することができる。しかし、こうしてドットをずらしたために、ドットを形成するパスが特定のパスに偏ってしまうことが起こり得る。ここでは、1本のラスタをパスAとパスBの2パスで形成するものとして、パスAでは奇数番目の画素にドットを形成し、パスBでは偶数番目の画素にドットを形成するものとする。図20(a)に示すように、ドットの形成位置をずらす前は、パスAとパスBとでほぼ同じような割合でドットが形成されている。これに対して、ドットの形成位置をずらした後は、図20(b)に示すように、全てのドットがパスAで形成されている。このように、ドットを形成するパスが特定のパスに偏ってしまうと、ラスタを複数のパスで形成することによる画質の改善効果を得ることができず、色ムラや白筋が発生して画質を低下させることがある。特に、カラープリンタ200のように、多色のインクを用いてカラー画像を印刷する場合は、こうした色ムラが発生し易い傾向にある。これは、複数色のインクドットを形成する場合、色の異なるインクドットがどのような順序で形成されるかによって、インク同士の混ざり具合や、後から形成したドットの滲み具合が異なって発色に微妙な差が生じるので、ある色のインクが特定のパスで偏って形成されると、その領域では周囲と異なる特定の順序でドットが形成されるため発色が異なってしまい、これが色ムラと認識されてしまうためである。   As shown in FIG. 20B, it is possible to avoid the formation of dots in a constant pattern by shifting the dot formation position in this way. However, since the dots are shifted in this way, it is possible that the path for forming the dots is biased to a specific path. Here, it is assumed that one raster is formed by two passes of pass A and pass B, and in pass A, dots are formed in odd-numbered pixels, and in pass B, dots are formed in even-numbered pixels. . As shown in FIG. 20A, before the dot formation position is shifted, dots are formed at almost the same rate in pass A and pass B. On the other hand, after shifting the dot formation position, all the dots are formed by pass A as shown in FIG. Thus, if the pass for forming dots is biased to a specific pass, the effect of improving the image quality by forming a raster with multiple passes cannot be obtained, resulting in color unevenness and white streaks. May be reduced. In particular, when a color image is printed using multi-color ink as in the color printer 200, such color unevenness tends to occur. This is because when ink dots of multiple colors are formed, depending on the order in which the ink dots of different colors are formed, the degree of mixing of the inks and the degree of bleeding of the dots formed later will be different. Since a subtle difference occurs, if ink of a certain color is formed in a specific pass in a specific pass, dots are formed in a specific order different from the surrounding area, and the color development is different, which is recognized as color unevenness. It is because it will be done.

本実施例では、こうした点を考慮して、ユニットの大きさが、少なくとも主走査方向にはパス数の整数倍となるように設定されている。図21は、ユニットの主走査方向の大きさをパス数の整数倍とすることで、ドットを形成するパスが特定のパスに偏ってしまうことを回避している様子を示した説明図である。ここでは、カラープリンタ200はラスタを2パスで形成するものとしているから、ユニットの主走査方向の大きさは、4画素に設定されている。もちろん、ユニットの主走査方向の大きさは、4画素に限らず、2画素あるいは6画素など、パス数である2の倍数でありさえすれば、どのような大きさとすることもできる。   In this embodiment, in consideration of these points, the unit size is set to be an integral multiple of the number of passes at least in the main scanning direction. FIG. 21 is an explanatory diagram showing a state in which the size of the unit in the main scanning direction is set to an integral multiple of the number of passes to prevent the dots forming pass from being biased to a specific pass. . Here, since the color printer 200 forms a raster in two passes, the size of the unit in the main scanning direction is set to 4 pixels. Of course, the size of the unit in the main scanning direction is not limited to 4 pixels, and can be any size as long as it is a multiple of 2 as the number of passes, such as 2 pixels or 6 pixels.

ユニットを、主走査方向に4画素ずつの複数の画素で構成し、ユニット単位でドット形成の有無を判断した場合、図13および図14を用いて前述した特別な制御を行わなければ、複数のユニットに亘って一定のパターンでドットが形成されることが生じ得る。図21(a)は、一例として、4画素飛びにドットが形成されている様子を示している。本実施例では、こうした一定のパターンの発生を回避するために、図13および図14を用いて説明したように、既に処理済みのユニットでのドット形成有無の判断結果を検出する。そして、一定のパターンでドットが形成される場合には、その画素にはドットが形成され難くする。   When the unit is composed of a plurality of pixels of 4 pixels in the main scanning direction, and the presence or absence of dot formation is determined in units of units, a plurality of units are required unless the special control described above with reference to FIGS. 13 and 14 is performed. It can happen that dots are formed in a constant pattern across the unit. FIG. 21A shows, as an example, a state where dots are formed every four pixels. In this embodiment, in order to avoid the occurrence of such a constant pattern, as described with reference to FIGS. 13 and 14, the determination result of the dot formation presence / absence in the already processed unit is detected. When dots are formed with a certain pattern, it is difficult to form dots on the pixels.

図21(b)は、こうして、ドットが一定のパターンで形成されることを回避している様子を表している。図中の左から2番目のユニットおよび4番目のユニットでは、ドットの形成される画素位置が、ユニット内の左上隅の画素位置から、隣の画素位置にずらされている。こうすることで、先頭のユニットから連続して同じ画素位置にドットが形成されることを回避することができる。また、印字パスについても、ドット位置をずらした図21(b)では、パスAとパスBとでほぼ同じ割合でドットが形成されている。これに対して、ドット位置がずらされていない図21(a)では、パスAに偏ってドットが形成されている。これら図21(a)および図21(b)を比較すれば明らかなように、ドットを形成する画素位置をずらすことによって、印字パスがパスAからパスBに変更され、その結果、パスAに偏っていた印字パスが分散されている。すなわち、ユニットの大きさを、少なくとも主走査方向にはパス数の整数倍に設定しておけば、ユニット内の同じ画素位置に形成されるドットは同じパスで形成されることになる。このため、複数のユニットに亘るパターンの発生を回避しようとしてドット位置をずらしてやると、そのことが直ちに、印字パスを分散させることに繋がることになる。このため、複数のユニットに亘って同じ画素位置にドットが形成されることを回避しておけば、特定のパスに偏ってドットが形成されてしまって画質が悪化することも同時に回避することが可能となるのである。   FIG. 21B shows a state where dots are thus prevented from being formed in a certain pattern. In the second unit and the fourth unit from the left in the figure, the pixel position where the dot is formed is shifted from the pixel position at the upper left corner in the unit to the adjacent pixel position. By doing so, it is possible to avoid the formation of dots at the same pixel position continuously from the head unit. In the printing pass as well, in FIG. 21B in which the dot positions are shifted, dots are formed at substantially the same rate in pass A and pass B. On the other hand, in FIG. 21A in which the dot positions are not shifted, dots are formed with a bias toward pass A. As is clear from comparison between FIGS. 21A and 21B, the printing pass is changed from pass A to pass B by shifting the pixel position for forming the dots. The biased print paths are distributed. That is, if the unit size is set to an integral multiple of the number of passes at least in the main scanning direction, dots formed at the same pixel position in the unit are formed in the same pass. For this reason, if the dot position is shifted in an attempt to avoid the generation of a pattern over a plurality of units, this immediately leads to the distribution of the print path. For this reason, if it is avoided that dots are formed at the same pixel position over a plurality of units, it is possible to simultaneously avoid the deterioration of image quality due to the formation of dots in a specific pass. It becomes possible.

D−4.変形例:
上述した第1実施例の履歴検出・閾値設定処理には、種々の変形例が存在している。以下、これらの各種変形例について説明する。
D-4. Variation:
Various modifications exist in the history detection / threshold setting process of the first embodiment described above. Hereinafter, these various modifications will be described.

(1)第1の変形例:
上述した第1実施例の履歴検出・閾値設定処理では、常に3ユニット分だけ遡ってドットの形成状況を検出するものとして説明したが、遡るユニット数を可変とすることもできる。以下では、こうした第1の変形例について説明する。
(1) First modification:
In the history detection / threshold setting process of the first embodiment described above, it has been described that the dot formation status is always detected by going back by 3 units, but the number of units to go back can be made variable. Hereinafter, such a first modification will be described.

図22は、第1の変形例の履歴検出・閾値設定処理の流れを示すフローチャートである。かかる処理は前述した第1実施例の処理に対して、処理ユニット内の画像データに応じて、遡るユニット数を変更可能な点が大きく異なっている。以下、相違点を中心として、フローチャートに従って説明する。   FIG. 22 is a flowchart illustrating a flow of history detection / threshold setting processing according to the first modification. Such processing differs greatly from the processing of the first embodiment described above in that the number of units to be traced back can be changed according to the image data in the processing unit. Hereinafter, it demonstrates according to a flowchart centering on difference.

第1の変形例の履歴検出・閾値設定処理を開始すると、先ず初めに処理ユニットを構成する各画素についての画像データの総和値を算出する(ステップS700)。処理ユニットを構成する各画素の画像データは、図5に示した階調数変換処理中のステップS202において予め読み込まれており、各画素の画像データの総和値は容易に算出することができる。   When the history detection / threshold value setting process of the first modified example is started, first, a total value of image data for each pixel constituting the processing unit is calculated (step S700). The image data of each pixel constituting the processing unit is read in advance in step S202 during the gradation number conversion process shown in FIG. 5, and the total value of the image data of each pixel can be easily calculated.

第1の変形例においては、ドットの形成状況を何ユニット前まで遡って調べるかを、処理ユニットの画像データの総和値に基づいて設定する。これは次のような理由による。総和値が小さい場合は、画像データの階調値が小さな領域(すなわち明るい画像の領域)を処理していると考えられる。この様な領域では、ドットはまばらに形成されることになるので、ユニット単位で処理したことによってドットの形成にパターンが生じた場合にも、長い周期のパターンになるものと考えられる。このことから、画像データの階調値が小さな領域では長い周期のパターンも検出可能とすべく、遡るユニット数を大きな値に設定するのである。具体的に遡るユニット数は、総和値の値に応じて、段階的にいくつかの適切な数値が予め設定されている。ステップS702においては、総和値に応じて遡るユニット数を設定した後、前述した履歴検出用バッファから、ユニット数に相当するbit長のデータを読み出す処理を行う。   In the first modification, how many units before the dot formation status is checked is set based on the total value of the image data of the processing unit. This is due to the following reason. When the total value is small, it is considered that an area where the gradation value of the image data is small (that is, a bright image area) is being processed. In such a region, since dots are formed sparsely, it is considered that a pattern with a long cycle is formed even when a pattern is generated in the formation of dots by processing in units. For this reason, the number of retroactive units is set to a large value so that a pattern with a long period can be detected in a region where the gradation value of the image data is small. For the number of units to be traced back, some appropriate numerical values are set in advance step by step according to the value of the total value. In step S702, after setting the number of units going back in accordance with the total value, a process of reading data having a bit length corresponding to the number of units from the history detection buffer described above is performed.

こうして履歴検出用バッファから履歴データを読み出したら、続いて履歴検出用データを設定する(ステップS704)。かかる処理は、図14を用いて前述した第1実施例の履歴検出・閾値設定処理とほぼ同様であるが、処理ユニットによって履歴検出用データのbit長が変わることのみ異なっている。すなわち、第1の変形例においては、処理ユニットを構成する各画素の画像データの総和値を算出し、総和値に応じたユニット数だけ遡ってドットの形成状況を検出することとしているので、これに対応して履歴検出用データも総和値に応じた長さのデータに設定されるのである。   When the history data is read from the history detection buffer in this way, history detection data is subsequently set (step S704). This process is substantially the same as the history detection / threshold value setting process of the first embodiment described above with reference to FIG. 14, except that the bit length of the history detection data varies depending on the processing unit. That is, in the first modification, the sum value of the image data of each pixel constituting the processing unit is calculated, and the dot formation status is detected retroactively by the number of units corresponding to the sum value. Corresponding to this, the history detection data is also set to data having a length corresponding to the total value.

次いで、履歴データに履歴検出用データを作用させて、対象履歴(検出しようとしているドットの形成状況)の有無を検出し、対象履歴が検出された場合には閾値thの値を大きな値(Vp )に変更し、対象履歴が検出されなかった場合には閾値thの値を通常値Vn に設定する(ステップS706ないしステップS712)。以上の処理を終了したら、第1の変形例の履歴検出・閾値設定処理を抜けて、図13に示したユニット内多値化処理に復帰する。   Next, the history detection data is applied to the history data to detect the presence or absence of the target history (the formation status of the dot to be detected). When the target history is detected, the threshold th value is increased to a large value (Vp When the target history is not detected, the threshold value th is set to the normal value Vn (steps S706 to S712). When the above processing is completed, the history detection / threshold setting processing of the first modification is exited, and the processing returns to the in-unit multi-value processing shown in FIG.

以上に説明した第1の変形例の履歴検出・閾値設定処理によれば、処理中の画像データの階調値に応じて、適切なユニット数だけ遡ってドットの形成状況を検出することができる。このため、画質の悪化をより確実に防止することが可能となる。尚、上述した第1の変形例においては、処理ユニット内の各画素についての総和値を算出し、総和値が小さければ、明るい画像領域(画像データの階調値が小さな領域)を処理中であると判断するものとして説明した。もちろん、処理中の領域が明るい画像領域であることを異なる方法を用いて検出することとしても良い。例えば、周辺の領域の画像データの平均値を利用して検出することも可能である。また、上述した第1の変形例の履歴検出・閾値設定処理では、ドット形成有無を遡って検出するユニット数は、処理ユニット内の各画素の総和値に応じて設定されているものとして説明したが、これに限らず、各画素の階調値に応じて、遡るユニット数あるいはユニット内の画素位置を設定するものとしてもよい。こうすれば、遡るユニット数をよりきめ細かく適切な値とすることが可能となるので好ましい。   According to the history detection / threshold setting process of the first modification described above, the dot formation status can be detected retroactively by the appropriate number of units according to the gradation value of the image data being processed. . For this reason, it becomes possible to prevent deterioration of image quality more reliably. In the first modification described above, the total value for each pixel in the processing unit is calculated. If the total value is small, a bright image region (region where the gradation value of the image data is small) is being processed. It explained that it was judged that there was. Of course, it may be detected using a different method that the area being processed is a bright image area. For example, it is also possible to detect using the average value of the image data in the peripheral area. Further, in the history detection / threshold value setting process of the first modification described above, the number of units to be detected retroactively for dot formation has been described as being set according to the total value of each pixel in the processing unit. However, the present invention is not limited to this, and the number of units to be traced back or the pixel position in the unit may be set according to the gradation value of each pixel. This is preferable because the number of retroactive units can be set to a finer and appropriate value.

(2)第2の変形例:
上述した各種実施例においては、処理済みのユニットの中でドットの形成有無を検出しようとする画素位置が、処理中のユニットの着目画素と同じ画素位置である場合を中心として説明した。もちろん、処理済みのユニット中でドットの形成状況を検出する画素位置は、前述した履歴検出用データを適切に設定することにより、必要に応じて自由に設定することができる。以下では、こうした第2の変形例について説明する。
(2) Second modification:
In the various embodiments described above, the description has been made centering on the case where the pixel position in the processed unit for detecting whether or not dots are formed is the same pixel position as the target pixel of the unit being processed. Of course, the pixel position for detecting the dot formation status in the processed unit can be freely set as necessary by appropriately setting the history detection data described above. Hereinafter, such a second modification will be described.

図23は、こうした第2の変形例において、履歴検出用データを設定する様子を例示した説明図である。例えば、処理ユニットの画素Pa についてのドット形成有無を判断するに際して、図23(a)に示すように、処理ユニットの「1つ前のユニット」については画素Pa のドット形成状況を検出し、「2つ前のユニット」および「3つ前のユニット」については、いずれも画素Pc のドット形成状況を検出するものとする。図中に示した「?」印は、該当する画素についてのドット形成状況を検出することを模式的に示したものである。ドットの形成状況を検出する画素位置をこの様に設定しておけば、4ユニットを周期として、「左下の画素」、「左下の画素」、「左上の画素」、「左上の画素」のパターンで周期的にドットが形成されることを回避することができる。   FIG. 23 is an explanatory view exemplifying how history detection data is set in the second modification. For example, when determining the presence or absence of dot formation for the pixel Pa of the processing unit, as shown in FIG. 23A, the dot formation status of the pixel Pa is detected for the “previous unit” of the processing unit. As for both “second previous unit” and “third previous unit”, the dot formation status of the pixel Pc is detected. The “?” Mark shown in the drawing schematically indicates that the dot formation status for the corresponding pixel is detected. If the pixel position for detecting the dot formation state is set in this way, the pattern of “lower left pixel”, “lower left pixel”, “upper left pixel”, and “upper left pixel” with a period of 4 units. Thus, it is possible to avoid the formation of dots periodically.

図23(b)には、図23(a)で「?」印を示した画素位置を検出するために設定される履歴検出用データを示している。前述したように、履歴検出用データは、隣接する4bitをひとまとまりとする3つのグループから構成されており、図23(b)に示すように、それぞれのグループが図23(a)に示した3つのユニットに対応している。また、各グループを構成する4つのbitは、上位側(図上では左側)から順に、画素Pa ,画素Pb ,画素Pc ,画素Pd にそれぞれ対応している。履歴検出用データは、検出しようとする画素位置に対応するbitには値「1」を設定し、その他のbitには値「0」を設定することによって得ることができる。尚、図23(c)は、こうして得られた履歴検出用データを16進数表示したものである。前述したように、履歴検出用データは4bitで1つのユニットを表しているから、4bitをまとめて16進数表示すれば履歴検出用データを簡便に表記することができる。図23(b)に示した履歴検出用データは、16進数表示することにより「0x228」と表すことができる。尚、「0x」は16進数表示していることを意味している。   FIG. 23B shows history detection data set to detect the pixel position indicated by “?” In FIG. As described above, the history detection data is composed of three groups of four adjacent bits. As shown in FIG. 23 (b), each group is shown in FIG. 23 (a). It corresponds to three units. The four bits constituting each group correspond to the pixel Pa, the pixel Pb, the pixel Pc, and the pixel Pd in order from the upper side (left side in the figure). The history detection data can be obtained by setting a value “1” for the bit corresponding to the pixel position to be detected and setting a value “0” for the other bits. FIG. 23C shows the history detection data obtained in this way displayed in hexadecimal. As described above, since the history detection data represents one unit with 4 bits, the history detection data can be simply expressed by displaying 4 bits together in hexadecimal. The history detection data shown in FIG. 23B can be expressed as “0x228” by displaying in hexadecimal. Note that “0x” means that hexadecimal numbers are displayed.

尚、上述した実施例では、ドットの形成状況を検出する画素は、各ユニットに1画素ずつであるものとしたが、もちろんユニット当たり複数の画素位置について、ドットの形成状況を検出することとしても良い。図24は、複数の画素位置でドット形成状況を検出する様子を示す説明図である。ここでは、図24(a)に示すように、処理ユニットの「1つ前のユニット」については3つの画素位置でドット形成状況を検出するものとしている。図24(b)は、この様な画素位置でのドット形成状況を検出するために設定される履歴検出用データを示した説明図である。図示されているように、「1つ前のユニット」については、画素Pa に加えて、画素Pb および画素Pd の2つの画素位置についても、ドットの形成状況を検出するものとしている。このことに対応して、履歴検出用データの下位側の4bitの中で、画素Pa 、画素Pb 、画素Pd にそれぞれ対応する3つのbitには値「1」が設定される。すなわち、16進数表示で「D」が設定される。また、「2つ前のユニット」および「3つ前のユニット」については、図23の場合と同様に、画素Pa のドット形成状況を検出することとしているから、これらユニットについては16進数表示で「8」が設定され、結局、履歴検出用データとしては、図24(c)に示すように「0x88D」のデータが設定されることになる。   In the above-described embodiment, the number of pixels for detecting the dot formation status is one pixel for each unit. Of course, it is also possible to detect the dot formation status for a plurality of pixel positions per unit. good. FIG. 24 is an explanatory diagram showing how the dot formation status is detected at a plurality of pixel positions. In this case, as shown in FIG. 24A, the dot formation status is detected at three pixel positions for the “previous unit” of the processing unit. FIG. 24B is an explanatory diagram showing history detection data set to detect the dot formation status at such a pixel position. As shown in the drawing, with respect to “the previous unit”, in addition to the pixel Pa, the dot formation status is detected also at the two pixel positions of the pixel Pb and the pixel Pd. Correspondingly, the value “1” is set in three bits corresponding to the pixel Pa, the pixel Pb, and the pixel Pd in the lower four bits of the history detection data. That is, “D” is set in hexadecimal notation. Further, as for the “second previous unit” and the “third previous unit”, the dot formation status of the pixel Pa is detected as in the case of FIG. 23. Therefore, these units are displayed in hexadecimal notation. “8” is set, and as a result, data “0x88D” is set as history detection data as shown in FIG.

以上に説明したように、履歴検出用データを適切に設定することで、処理済みのユニットの中でドットの形成状況を検出する画素位置を自由に設定することが可能である。従って、複数のユニットに亘って特定のパターンでドットが形成される易くなっている場合でも、この様なパターンの発生を確実に回避することができる。加えて、ユニットの大きさは、少なくとも主走査方向にはパス数の整数倍に設定されているので、パターンの発生を回避することで、ドットが特定のパスに偏って形成されてしまうことも同時に回避することができる。また、図24に示したように、処理ユニットの近傍の画素位置についてのドット形成状況を検出しておけば、着目画素の近傍にドットが形成されることを回避することができる。このため、ドットの分散性を向上させて、画質をより改善することが可能となる。   As described above, by appropriately setting the history detection data, it is possible to freely set the pixel position for detecting the dot formation status in the processed unit. Therefore, even when dots are easily formed in a specific pattern over a plurality of units, such a pattern can be reliably avoided. In addition, since the unit size is set to an integral multiple of the number of passes at least in the main scanning direction, dots may be formed biased to a specific pass by avoiding the occurrence of a pattern. It can be avoided at the same time. In addition, as shown in FIG. 24, if the dot formation status at the pixel position in the vicinity of the processing unit is detected, the formation of dots in the vicinity of the pixel of interest can be avoided. For this reason, it is possible to improve the image quality by improving the dispersibility of the dots.

(3)第3の変形例:
ドットの形成状況を検出しようとする画素位置を、乱数を用いて設定することも可能である。例えば、先ず初めに、遡ってドット形成状況を検出しようとするユニット数を乱数を用いて設定し、次いで、各ユニットについて検出しようとする画素位置を乱数を用いて設定することとしても良い。こうすれば、ドットの形成状況を検出する画素位置の設定にも規則性が無くなるので、複数ユニットに亘って周期的なパターンが発生することを確実に回避することが可能となる。
(3) Third modification:
It is also possible to set the pixel position for detecting the dot formation status using a random number. For example, first, the number of units to be detected retroactively may be set using a random number, and then the pixel position to be detected for each unit may be set using a random number. In this way, since there is no regularity in the setting of the pixel position for detecting the dot formation state, it is possible to reliably avoid the occurrence of a periodic pattern over a plurality of units.

E.第2実施例:
上述した第1実施例のユニット内多値化処理中で行われる履歴検出・閾値設定処理においては、処理済みのユニットのドット形成状況を表す履歴データが、1つの履歴検出用バッファに記憶されているものとして説明した。ユニットには複数の画素が含まれているから、第1実施例においては、各画素についてのドット形成有無を表すデータが履歴検出用バッファ上で混在して記憶されていることになる。これに対して、ユニットを構成する画素の数だけバッファを設けておき、各画素のドット形成有無を判断したら、ユニット内の画素位置に対応付けて異なるバッファに判断結果を記憶することとしても良い。以下、このように画素位置毎に専用のバッファを用いた第2実施例について説明する。
E. Second embodiment:
In the history detection / threshold setting processing performed during the unit multi-value processing of the first embodiment described above, history data representing the dot formation status of the processed unit is stored in one history detection buffer. It was explained as being. Since the unit includes a plurality of pixels, in the first embodiment, data indicating the presence or absence of dot formation for each pixel is mixedly stored on the history detection buffer. On the other hand, as many buffers as the number of pixels constituting the unit are provided, and it is determined whether or not dots are formed for each pixel, the determination results may be stored in different buffers in association with the pixel positions in the unit. . Hereinafter, a second embodiment using a dedicated buffer for each pixel position will be described.

E−1.第2実施例のユニット内多値化処理:
図25は、第2実施例のユニット内多値化処理の流れを示すフローチャートである。かかる処理は、図13を用いて前述した第1実施例のユニット内多値化処理に対して、履歴検出用バッファが画素位置毎に設けられている点が大きく異なっている。また、この様な相違点から派生して、着目画素についてのドット形成有無を判断するたびに、判断結果を対応する履歴検出用バッファに書き込んでいる点でも、第1実施例とは異なっている。以下では、これら、第1実施例との相違点を中心として、第2実施例のユニット内多値化処理について説明する。
E-1. In-unit multi-value processing of the second embodiment:
FIG. 25 is a flowchart showing the flow of the intra-unit multi-value processing of the second embodiment. Such processing is largely different from the intra-unit multilevel processing of the first embodiment described above with reference to FIG. 13 in that a history detection buffer is provided for each pixel position. Further, it is different from the first embodiment in that it is derived from such a difference and every time it is determined whether or not dots are formed for the target pixel, the determination result is written in the corresponding history detection buffer. . In the following, the in-unit multi-value processing of the second embodiment will be described focusing on these differences from the first embodiment.

処理を開始すると、先ず初めに、処理ユニットを構成する複数の画素の中から、ドットの形成有無を判断しようとする着目画素を検出し(ステップS800)、着目画素の画像データと拡散誤差とを加算して補正データCx を算出する(ステップS802)。処理ユニットを構成する各画素についての画像データおよび拡散誤差は、図5に示した階調数変換処理中で既に読み込まれているデータを使用する。   When the process is started, first, a target pixel from which a dot formation presence / absence is to be determined is detected from a plurality of pixels constituting the processing unit (step S800), and image data and diffusion error of the target pixel are detected. The correction data Cx is calculated by addition (step S802). As the image data and diffusion error for each pixel constituting the processing unit, data already read during the gradation number conversion processing shown in FIG. 5 is used.

こうして着目画素についての補正データCx を算出したら、第2実施例の履歴検出・閾値設定処理を開始する(ステップS804)。前述したように第2実施例においては、ユニット内の画素位置に応じて設けられた専用の履歴検出用バッファを使用する。そこで、かかる処理の内容について説明する前に、第2実施例の履歴検出・閾値設定処理で用いられる履歴検出用バッファについて説明しておく。   When the correction data Cx for the pixel of interest is thus calculated, the history detection / threshold setting process of the second embodiment is started (step S804). As described above, in the second embodiment, a dedicated history detection buffer provided according to the pixel position in the unit is used. Therefore, before describing the contents of such processing, the history detection buffer used in the history detection / threshold setting processing of the second embodiment will be described.

図26は、ユニット内の画素位置に対応付けて設けられた履歴検出用バッファを模式的に示した説明図である。図中に示した「履歴検出用バッファA」は、ユニット内の画素Pa に対応付けられているバッファである。このバッファには、画素Pa ついてのドット形成判断結果が記憶される。また、「履歴検出用バッファB」は、ユニット内の画素Pb に対応付けられて、画素Pb についての判断結果が記憶されるバッファである。同様に、「履歴検出用バッファC」にはユニット内の画素Pc についての判断結果が記録され、「履歴検出用バッファD」には画素Pd についての判断結果が記憶される。このように第2実施例においては、ユニット内の画素位置に対応付けられた専用のバッファが設けられており、それぞれのバッファに履歴データが記憶されている。   FIG. 26 is an explanatory diagram schematically showing a history detection buffer provided in association with the pixel position in the unit. The “history detection buffer A” shown in the figure is a buffer associated with the pixel Pa in the unit. In this buffer, the dot formation determination result for the pixel Pa is stored. The “history detection buffer B” is a buffer that stores the determination result for the pixel Pb in association with the pixel Pb in the unit. Similarly, the determination result for the pixel Pc in the unit is recorded in the “history detection buffer C”, and the determination result for the pixel Pd is stored in the “history detection buffer D”. Thus, in the second embodiment, dedicated buffers associated with the pixel positions in the unit are provided, and history data is stored in the respective buffers.

次に、「履歴検出用バッファA」を例にとって、記憶されている履歴データのデータ構造について説明する。履歴検出用バッファAの各bitは、下位側(図26では右側)から順番に、処理ユニットから1つずつ前のユニットに対応付けられている。すなわち、最下位bit(図上では右端のbit)は処理ユニットの「1つ前のユニット」に対応付けられており、下位から2つめのbitは「2つ前のユニット」に、下位から3つめのbitは「3つ前のユニット」に、というように、各bitがそれぞれのユニットに順番に対応付けられている。これらのbitに値「1」が設定されていることは、対応するユニットの画素Pa にドットが形成されることを表しており、逆に値「0」が設定されていることは、対応するユニットの画素Pa にはドットが形成されないことを表している。   Next, taking the “history detection buffer A” as an example, the data structure of the stored history data will be described. Each bit of the history detection buffer A is associated with the previous unit one by one from the processing unit in order from the lower side (right side in FIG. 26). That is, the least significant bit (the rightmost bit in the figure) is associated with the “first unit” of the processing unit, and the second bit from the lower level is assigned to the “second previous unit” and the lower 3 bits. Each bit is associated with each unit in order, for example, the second bit is “3rd previous unit”. The value “1” being set in these bits indicates that a dot is formed in the pixel Pa of the corresponding unit, and conversely that the value “0” is set corresponds. This indicates that no dot is formed on the pixel Pa of the unit.

以上の説明から明らかなように、履歴検出用バッファAに記憶されている図26に例示の履歴データは、処理ユニットから1つ前、3つ前、5つ前、8つ前にの各ユニットについては、画素Pa にドットが形成されており、他のユニットについては画素Pa にドットが形成されていないことを表している。尚、図26では、それぞれの履歴検出用バッファは、8bit分のデータ長を有するものとしたが、より多いbit数のデータとしても構わない。   As is clear from the above description, the history data illustrated in FIG. 26 stored in the history detection buffer A is the units one, three, five, eight, and eight before the processing unit. Indicates that a dot is formed in the pixel Pa, and no dot is formed in the pixel Pa for the other units. In FIG. 26, each history detection buffer has a data length of 8 bits, but it may be data having a larger number of bits.

こうした履歴検出用データを用いて行われる第2実施例の履歴検出・閾値設定処理について、以下に説明する。第2実施例の履歴検出・閾値設定処理は、前述した第1実施例の処理に対して、画素位置毎に履歴検出用バッファが設けられている点が異なっており、他の処理はほぼ同様である。そこで以下では、第1実施例の履歴検出・閾値設定処理について説明した図14のフローチャートを流用しながら説明する。尚、かかる処理は、図25のユニット内多値化処理において着目画素が設定された後(ステップS800)、かかる着目画素に対してステップS804で実行される処理である。   The history detection / threshold setting process of the second embodiment performed using such history detection data will be described below. The history detection / threshold setting processing of the second embodiment is different from the processing of the first embodiment described above in that a history detection buffer is provided for each pixel position, and the other processing is almost the same. It is. Accordingly, the following description will be made with reference to the flowchart of FIG. 14 describing the history detection / threshold setting processing of the first embodiment. This process is a process executed in step S804 on the target pixel after the target pixel is set (step S800) in the intra-unit multi-value quantization process of FIG.

第2実施例の履歴検出・閾値設定処理を開始すると、先ず初めに、履歴検出用バッファから履歴データを読み出す処理を行う(図14のステップS500相当)。図26を用いて説明したように、第2実施例では画素位置に応じて履歴検出用バッファが設けられており、かかる処理では、着目画素と同じ画素位置に対応するバッファから、必要なデータ量の履歴データを読み出す。例えば、着目画素が画素Pa にあるとして、5ユニット分だけ遡ってドットの形成状況を検出するものとすれば、「履歴検出用バッファA」の下位側から5bit分のデータを読み出すことになる。この結果、図26に示した例では、履歴データとして「10101 (2)」が読み出される。ここで、(2) は2進数表示されていることを示している。尚、着目画素が画素Pb ,画素Pc ,画素Pd に設定されている場合は、履歴検出用バッファB,履歴検出用バッファC,履歴検出用バッファDにそれぞれ記録されている履歴データを読み出せばよい。   When the history detection / threshold value setting process of the second embodiment is started, first, history data is read from the history detection buffer (corresponding to step S500 in FIG. 14). As described with reference to FIG. 26, in the second embodiment, a history detection buffer is provided according to the pixel position, and in this process, a necessary data amount is obtained from the buffer corresponding to the same pixel position as the target pixel. Read the history data. For example, assuming that the pixel of interest is located in the pixel Pa and the dot formation status is detected retroactively by 5 units, data of 5 bits is read from the lower side of the “history detection buffer A”. As a result, in the example shown in FIG. 26, “10101 (2)” is read as the history data. Here, (2) indicates that a binary number is displayed. If the target pixel is set to the pixel Pb, the pixel Pc, and the pixel Pd, the history data recorded in the history detection buffer B, the history detection buffer C, and the history detection buffer D are read out. Good.

こうして履歴データを読み出したら、続いて、履歴検出用データを設定する処理を行う(図14のステップS502相当)。かかる処理について、図27を参照しながら説明する。例えば、処理ユニットから5つ前のユニットまで遡って、ドットの形成状況を検出するものとする。図27(a)は、ドットの形成状況を検出しようとしている画素位置の分布を概念的に示した説明図である。図中の小さな正方形はそれぞれ画素を模式的に示したものである。また、太い破線で示した大きな正方形は処理中のユニットを模式的に示したものであり、細い破線で示した大きな正方形は、既に処理済みのユニットを模式的に示したものである。処理ユニット中で斜線を付した画素は着目画素を示しており、処理済みのユニット中で図中で「?」を付した画素は、ドットの形成状況を検出しようとしている画素を示している。   When the history data is read in this way, subsequently, processing for setting history detection data is performed (corresponding to step S502 in FIG. 14). Such processing will be described with reference to FIG. For example, it is assumed that the dot formation status is detected retroactively from the processing unit to the previous unit. FIG. 27A is an explanatory diagram conceptually showing the distribution of pixel positions for which the dot formation status is to be detected. Each small square in the drawing schematically shows a pixel. A large square indicated by a thick broken line schematically shows a unit being processed, and a large square indicated by a thin broken line schematically shows a unit that has already been processed. The hatched pixel in the processing unit indicates the target pixel, and the pixel marked with “?” In the processed unit indicates the pixel for which the dot formation status is to be detected.

図27(b)は、このような画素についてのドット形成状況を検出するために用いられる履歴検出用データを示したものである。ここでは、処理ユニットから5つ前のユニットまで遡って検出するとしているから、履歴検出用データは、最下位bitから5bitまでのbitに値「1」が設定され、6bitより上位側のbitには値「0」が設定されている。このように、検出しようとするユニットに対応するbitに値「1」を設定し、他のbitには値「0」を設定することによって、履歴検出用データを設定することができる。図27(c)はこうして設定された履歴検出用データを16進数表示したものである。   FIG. 27B shows history detection data used to detect the dot formation status for such pixels. Here, since it is assumed that detection is performed retroactively from the processing unit to the previous unit, the value “1” is set in the bits from the least significant bit to the 5th bit in the history detection data, and the higher bit than the 6th bit is set. Is set to the value “0”. In this way, history detection data can be set by setting a value “1” in the bit corresponding to the unit to be detected and setting a value “0” in the other bits. FIG. 27 (c) shows the history detection data set in this way displayed in hexadecimal.

こうして履歴検出用データを設定したら、設定した履歴検出用データを先に読み出した履歴データに作用させることによって、対象履歴(検出しようとしている画素位置でのドットの形成状況)を検出する(図14のステップS504相当)。対象履歴の検出は、第1実施例と同様にして行う。すなわち、履歴データと履歴検出用データとの間で、対応するbit同士の論理積を採ることにより中間データを算出し、得られた中間データの各bitの論理和(あるいは算術和)を採って検出結果を算出する。得られた検出結果が値「1」であれば対象履歴が検出されたものと判断して、閾値thに割増値Vp を設定する。検出結果が値「0」であれば、対象履歴は検出されなかったものと判断して、閾値thに通常値Vn を設定する。以上のようにして閾値thを適切な値に設定したら、第2実施例の履歴検出・閾値設定処理を終了して、図25に示すユニット内多値化処理に復帰する。尚、ここでは、中間データの各bitの論理和(あるいは算術和)を採って検出結果を算出するものとしたが、中間データの各bitの論理積を採って検出結果を算出するものとしてもよい。   When history detection data is set in this way, the target history (the dot formation status at the pixel position to be detected) is detected by applying the set history detection data to the previously read history data (FIG. 14). Step S504). The target history is detected in the same manner as in the first embodiment. That is, intermediate data is calculated by taking the logical product of corresponding bits between the history data and the history detection data, and taking the logical sum (or arithmetic sum) of each bit of the obtained intermediate data. The detection result is calculated. If the obtained detection result is the value “1”, it is determined that the target history has been detected, and the premium value Vp is set to the threshold th. If the detection result is the value “0”, it is determined that the target history has not been detected, and the normal value Vn is set as the threshold th. When the threshold value th is set to an appropriate value as described above, the history detection / threshold value setting process of the second embodiment is terminated, and the process returns to the in-unit multilevel conversion process shown in FIG. Here, the detection result is calculated by taking the logical sum (or arithmetic sum) of each bit of the intermediate data, but the detection result may be calculated by taking the logical product of each bit of the intermediate data. Good.

以上のようにして閾値thを設定して、図25に示す第2実施例のユニット内多値化処理に復帰したら、続いて、着目画素の補正データCx と閾値thとの大小関係を判断する(図25のステップS806)。補正データCx の方が大きい場合には着目画素にドットを形成すると判断し(ステップS808)、そうでなければドットを形成しないと判断する(ステップS810)。次いで、ドットの形成有無を判断したことで生じる階調誤差を算出した後(ステップS812)、着目画素についての判断結果を対応する履歴検出用バッファに書き込む処理を開始する(ステップS814)。かかる処理について、図28を用いて説明する。   When the threshold value th is set as described above and the process returns to the in-unit multivalue processing of the second embodiment shown in FIG. 25, the magnitude relationship between the correction data Cx of the pixel of interest and the threshold value th is subsequently determined. (Step S806 in FIG. 25). If the correction data Cx is larger, it is determined that a dot is to be formed on the pixel of interest (step S808). Otherwise, it is determined that no dot is to be formed (step S810). Next, after calculating a gradation error caused by determining the presence or absence of dot formation (step S812), a process of writing the determination result for the pixel of interest into the corresponding history detection buffer is started (step S814). Such processing will be described with reference to FIG.

図28は、第2実施例のユニット内多値化処理において、着目画素についての判断結果を履歴検出用バッファに書き込む様子を概念的に示した説明図である。今、着目画素が画素Pa に設定されているものとすると、ドット形成有無の判断結果は、履歴検出用バッファAに書き込まれることになる。判断結果を書き込むにあたっては、先ず、履歴検出用バッファAに記憶されている履歴データを、1bit分だけ上位側(図上では左側)にシフトさせる。図28の上段はシフトする前の履歴検出用バッファAに記憶されている履歴データを示しており、下段はシフトした後のバッファに記憶されている履歴データを示している。履歴データをシフトさせることに伴って、最上位bitに記憶されたデータは破棄される。次いで、着目画素についての判断結果に対応する値を、最下位のbitに書き込む処理を行う。着目画素にドットを形成すると判断された場合は、最下位のbitには値「1」が書き込まれ、着目画素にドットを形成しないと判断された場合は、値「0」が書き込まれる。以上の説明では、着目画素が画素Pa に設定されているものとして説明したが、着目画素が他の画素位置に設定されている場合も同様にして、着目画素の画素位置に対応する履歴検出用バッファに判断結果に応じた値を書き込んでやればよい。図25のステップS814では、こうして着目画素についての判断結果を、着目画素に対応する履歴検出用バッファに書き込む処理を行う。   FIG. 28 is an explanatory diagram conceptually showing a state in which the determination result for the target pixel is written in the history detection buffer in the unit multi-value quantization process of the second embodiment. Assuming that the pixel of interest is set to the pixel Pa, the determination result of dot formation presence / absence is written in the history detection buffer A. In writing the determination result, the history data stored in the history detection buffer A is first shifted to the upper side (left side in the figure) by 1 bit. The upper part of FIG. 28 shows history data stored in the history detection buffer A before shifting, and the lower part shows history data stored in the buffer after shifting. As the history data is shifted, the data stored in the most significant bit is discarded. Next, a process of writing a value corresponding to the determination result for the pixel of interest in the least significant bit is performed. If it is determined that a dot is to be formed in the pixel of interest, the value “1” is written in the least significant bit, and if it is determined that no dot is to be formed in the pixel of interest, a value “0” is written. In the above description, the pixel of interest has been described as being set to the pixel Pa. However, the history detection corresponding to the pixel position of the pixel of interest is similarly performed when the pixel of interest is set to another pixel position. A value corresponding to the determination result may be written in the buffer. In step S814 in FIG. 25, processing for writing the determination result for the target pixel in this way into the history detection buffer corresponding to the target pixel is performed.

こうして着目画素の判断結果を書き込む処理を終了したら(図25のステップS814)、処理ユニット内の全ての画素についての処理を終了したか否かを判断し(ステップS816)、未処理の画素が残っていればステップS800に戻って上述した一連の処理を繰り返す。全ての画素についての処理を終了したら、ユニット内多値化処理を抜けて、図5に示した階調数変換処理に復帰する。   When the process of writing the determination result of the target pixel is completed (step S814 in FIG. 25), it is determined whether the process for all the pixels in the processing unit is completed (step S816), and unprocessed pixels remain. If so, the process returns to step S800 to repeat the series of processes described above. When the process for all the pixels is completed, the process returns to the gradation number conversion process shown in FIG.

以上に説明した第2実施例のユニット内多値化処理においては、履歴検出用バッファのそれぞれのbitが、処理済みのユニット1つ1つに対応付けられている。従って、ドットの形成状況を遡って調べるユニット数が多くなった場合でも、ユニット数と同じbit長のデータを読み込むだけでよい。例えば、処理中のユニットから8ユニット分だけ遡ってドットの形成状況を検出する場合、1ユニットが4つの画素で構成されているとして、前述した第1実施例においては32bitの履歴データを読み込む必要があるが、第2実施例では8bitのデータを読み込むだけで足りる。このため、第2実施例においては、遡るユニット数が多い場合であっても、迅速な処理を行うことができる。   In the intra-unit multilevel processing of the second embodiment described above, each bit of the history detection buffer is associated with each processed unit. Accordingly, even when the number of units to be examined retrospectively for the dot formation status increases, it is only necessary to read data having the same bit length as the number of units. For example, when detecting the dot formation status by going back 8 units from the unit being processed, it is necessary to read the history data of 32 bits in the first embodiment, assuming that one unit is composed of four pixels. However, in the second embodiment, it is only necessary to read 8-bit data. For this reason, in the second embodiment, even if the number of units to be traced back is large, a quick process can be performed.

E−2.第2実施例の変形例:
上述した第2実施例では、ドット形成状況を検出する画素位置は、着目画素と同じ画素であるものとして説明した。しかし、第1実施例において、ドットの形成状況を検出しようとする画素位置を自由に設定可能であったのと同様に、第2実施例においても、ドットの形成状況を検出する画素を、ユニット毎に任意の画素位置に設定することが可能である。以下では、こうした第2の実施例の変形例について説明する。
E-2. Modification of the second embodiment:
In the second embodiment described above, the pixel position for detecting the dot formation state is described as being the same pixel as the pixel of interest. However, similarly to the first embodiment, the pixel position for detecting the dot formation status can be freely set. In the second embodiment, the pixel for detecting the dot formation status is also a unit. It is possible to set an arbitrary pixel position every time. Hereinafter, a modification of the second embodiment will be described.

図29は、第2実施例において、任意の画素位置でのドットの形成状況を検出する方法を示した説明図である。図29(a)は、検出しようとする画素位置の分布を例示した説明図である。図中に示した小さな正方形は画素を模式的に示したものであり、破線で示した大きな正方形はユニットを示している。ドットの形成状況を検出しようとする画素位置は、画素中に「?」印を付して示している。検出しようとする画素位置および画素数は任意に設定することができるが、以下では、図29(a)に示した画素位置でのドット形成状況を検出するものとして説明する。   FIG. 29 is an explanatory diagram showing a method of detecting the dot formation status at an arbitrary pixel position in the second embodiment. FIG. 29A is an explanatory diagram illustrating the distribution of pixel positions to be detected. The small squares shown in the figure schematically indicate pixels, and the large squares indicated by broken lines indicate units. The pixel position where the dot formation state is to be detected is indicated by a “?” Mark in the pixel. Although the pixel position and the number of pixels to be detected can be set arbitrarily, the following description will be made assuming that the dot formation status at the pixel position shown in FIG.

図29(b)は、第2実施例において、任意の画素位置でのドット形成状況を検出する方法を示す説明図である。第2実施例では、前述したように、ドット形成有無の判断結果を各ユニットの画素位置毎に記憶していることから、任意の画素位置でのドット形成状況を検出しようとする場合でも、各ユニットの画素位置に着目した方法で検出する。すなわち、図29(a)に示した例では、画素Pa の画素位置について、ドット形成状況を検出しようとしているのは、処理ユニットの「1つ前のユニット」、「2つ前のユニット」、「3つ前のユニット」の3つのユニットである。また、画素Pb の画素位置については、処理ユニットの「1つ前のユニット」と、「2つ前のユニット」の2つのユニットである。更に、画素Pc あるいは画素Pd の画素位置については、いずれも処理ユニットの「1つ前のユニット」でのみドットの形成状況を検出している。このように、画素位置毎に、ドット形成状況を検出しようとするユニット位置を検出した後、検出したユニットにドットが形成されているか否かを画素位置毎に判断すれば、任意の画素位置でのドット形成状況を検出することが可能となる。以下、図29(a)に示した場合に即して具体的に説明する。   FIG. 29B is an explanatory diagram illustrating a method for detecting a dot formation state at an arbitrary pixel position in the second embodiment. In the second embodiment, as described above, since the determination result of dot formation presence / absence is stored for each pixel position of each unit, each dot formation state at an arbitrary pixel position can be detected. Detection is performed by a method focusing on the pixel position of the unit. That is, in the example shown in FIG. 29A, the dot formation status for the pixel position of the pixel Pa is to be detected by the “first unit”, “second unit” of the processing unit, These are the three units of “3rd previous unit”. Further, the pixel position of the pixel Pb is two units of “the previous unit” and “the second previous unit” of the processing unit. Furthermore, as for the pixel position of the pixel Pc or the pixel Pd, the dot formation status is detected only in the “one unit before” of the processing unit. In this way, after detecting the unit position for detecting the dot formation status for each pixel position, if it is determined for each pixel position whether or not a dot is formed in the detected unit, any pixel position can be determined. It is possible to detect the dot formation status. Hereinafter, specific description will be made in accordance with the case shown in FIG.

初めに画素Pa のドット形成状況を検出する場合について説明する。図29(b)には、こうして画素Pa の画素位置でのドット形成状況を検出する様子が模式的に示されている。先ず初めに、画素Pa でのドット形成判断結果を記憶したバッファ(履歴検出用バッファA)から3ユニット分の履歴データ(最下位から3bit分のデータ)を読み出す。もちろん、より多数のユニットを遡って検出する場合は、それに応じて読み出すデータ長を長くすればよい。   First, the case where the dot formation status of the pixel Pa is detected will be described. FIG. 29B schematically shows how the dot formation status at the pixel position of the pixel Pa is detected in this way. First, the history data for 3 units (data corresponding to 3 bits from the lowest order) is read from the buffer (history detection buffer A) in which the dot formation determination result at the pixel Pa is stored. Of course, when detecting a larger number of units retrospectively, the data length to be read out may be increased accordingly.

次いで、この履歴データに履歴検出用データを作用させる。履歴検出用データは、画素Pa でのドット形成状況を検出しようとしているユニットに応じて設定される。図29(a)に示すように、画素Pa については処理ユニットの「1つ前のユニット」、「2つ前のユニット」、「3つ前のユニット」の3つのユニットでドット形成状況を検出しようとしているから、これに対応して履歴検出用データは、最下位bitから3つのbitに値「1」を設定する。こうして設定した履歴検出用データ(2進数表示で「111 (2)」)を、読み出した履歴データに作用させて中間データを算出する。「履歴検出用データを履歴データに作用させる」とは、前述したように、2つのデータの対応するbit間で、論理積を採ることである。こうして中間データが得られたら、中間データの各bit間の論理和(あるいは算術和)を算出することにより、画素Pa についての検出結果を得ることができる。   Next, history detection data is applied to the history data. The history detection data is set according to the unit that is trying to detect the dot formation status at the pixel Pa. As shown in FIG. 29 (a), with respect to the pixel Pa, the dot formation status is detected by three units of the processing unit "one previous unit", "two previous units", and "three previous units". In response to this, in the history detection data, the value “1” is set in the three least significant bits. The history detection data set in this way ("111 (2)" in binary notation) is applied to the read history data to calculate intermediate data. “Making history detection data act on history data” means taking a logical product between corresponding bits of two data as described above. When the intermediate data is obtained in this way, a detection result for the pixel Pa can be obtained by calculating a logical sum (or arithmetic sum) between the bits of the intermediate data.

こうして画素Pa について得られた検出結果は、次のことを意味している。すなわち、検出結果が値「0」であることは、検出しようとしているユニットのいずれにも画素Pa にはドットが形成されていないことを意味している。逆に、検出結果としての論理和が「1」であることは、検出しようとしているユニットのいずれかには、画素Pa にドットが形成されていることを意味している。また、算術和を取ることによって検出結果を得た場合は、得られた数値は形成されているドットの個数を表している。もちろん、中間データの各bitの論理和(あるいは算術和)を採る代わりに、論理積を採ることとしても良い。中間データの各bitの論理積を採った場合、検出結果の値が「1」であることは、検出しようとしている全てのユニットの画素Pa に、ドットが形成されていることを意味することになる。   The detection result thus obtained for the pixel Pa means the following. That is, the detection result having the value “0” means that no dot is formed in the pixel Pa in any of the units to be detected. On the other hand, the logical sum as the detection result being “1” means that a dot is formed in the pixel Pa in any of the units to be detected. When the detection result is obtained by calculating the arithmetic sum, the obtained numerical value represents the number of dots formed. Of course, instead of taking the logical sum (or arithmetic sum) of each bit of the intermediate data, a logical product may be taken. When the logical product of each bit of the intermediate data is taken, the detection result value of “1” means that dots are formed in the pixels Pa of all the units to be detected. Become.

同様の方法により、画素Pb についての検出結果を得ることができる。図29(c)には、画素Pb についてのドット形成状況を検出している様子を模式的に示している。図29(b)を参照して簡単に説明すると、先ず、画素Pb についてのドット形成有無を記録したバッファ(履歴検出用バッファB)から3ユニット分の履歴データを読み出す。次いで、このデータに履歴検出用データを作用させて中間データを算出する。画素Pb については、処理ユニットの「1つ前のユニット」、および「2つ前のユニット」でのドット形成状況を検出しようとしているから、これに対応して履歴検出用データは、最下位bitから2つのbitが値「1」に設定されたデータ(2進数表示で「011 (2)」)を使用する。こうして、得られた中間データの各bit間の論理和(あるいは算術和)を求めることにより、画素Pb についての検出結果を得ることができる。   The detection result for the pixel Pb can be obtained by the same method. FIG. 29C schematically shows how the dot formation status for the pixel Pb is detected. Briefly described with reference to FIG. 29 (b), first, history data for three units is read from a buffer (history detection buffer B) in which the presence or absence of dot formation for the pixel Pb is recorded. Next, history detection data is applied to this data to calculate intermediate data. For the pixel Pb, since the dot formation status of the “one previous unit” and “two previous units” of the processing unit is to be detected, the history detection data corresponding to this is the least significant bit. From which two bits are set to the value “1” (“011 (2)” in binary notation). Thus, by obtaining a logical sum (or arithmetic sum) between each bit of the obtained intermediate data, a detection result for the pixel Pb can be obtained.

画素Pc 、画素Pd についても同様にして、それぞれの画素についての検出結果を算出することができる。これら画素については、ドット形成状況を検出しようとしているユニットは、処理ユニットの「1つ前のユニット」のみであるから、これら画素については、履歴検出用データとして最下位bitにのみ値「1」が設定されたデータ(2進数表示で「001 (2)」)を使用すればよい。画素Pc についての検出結果を算出する様子を図29(d)に、また、画素Pd についての検出結果を算出する様子を図29(e)にそれぞれ示した。   The detection result for each pixel can be calculated in the same manner for the pixels Pc and Pd. For these pixels, the unit that is trying to detect the dot formation status is only “the previous unit” of the processing unit. Therefore, for these pixels, the value “1” is set only for the least significant bit as history detection data. May be used (“001 (2)” in binary display). FIG. 29D shows how the detection result for the pixel Pc is calculated, and FIG. 29E shows how the detection result for the pixel Pd is calculated.

こうして各画素についての検出結果が得られたら、これら検出結果の論理和を算出することによって、最終的な検出結果を得ることができる。すなわち、図29(a)に「?」印で示した画素のいずれかにドットが形成されていれば、検出結果として値「1」が得られ、逆にいずれの画素にもドットが形成されていない場合は検出結果として値「0」が得られることになる。もちろん、各画素についての検出結果の論理積を採ることによって、最終的な検出結果を算出することとしても良い。こうした場合は、図29(a)に「?」印で示した全ての画素にドットが形成されている場合に、最終的な検出結果の値が「1」得られることになる。   Once the detection results for each pixel are obtained in this way, the final detection result can be obtained by calculating the logical sum of these detection results. That is, if a dot is formed in any of the pixels indicated by “?” In FIG. 29A, a value “1” is obtained as a detection result, and conversely, a dot is formed in any pixel. If not, the value “0” is obtained as the detection result. Of course, the final detection result may be calculated by taking the logical product of the detection results for each pixel. In such a case, when dots are formed in all the pixels indicated by “?” In FIG. 29A, the final detection result value is “1”.

以上に説明した方法を用いれば、ドットの形成状況を検出しようとする画素位置を、既に処理済みのユニットの中から自由に設定することが可能である。従って、ユニット単位でドットの形成有無を判断する場合であっても、所定の画素位置でのドット形成状況を検出し、検出結果を踏まえてドットの形成有無を判断することにより、複数のユニットに亘って所定のパターンでドットが形成されることを効果的に回避することが可能となる。加えて、ユニットの大きさは、少なくとも主走査方向にはパス数の整数倍に設定されているので、パターンの発生を回避することで、ドットが特定のパスに偏って形成されてしまうことも同時に回避することができる。   By using the method described above, it is possible to freely set a pixel position from which a dot formation state is to be detected from among already processed units. Therefore, even in the case where the presence / absence of dot formation is determined on a unit basis, the dot formation status at a predetermined pixel position is detected, and the presence / absence of dot formation is determined based on the detection result. It is possible to effectively avoid the formation of dots in a predetermined pattern. In addition, since the unit size is set to an integral multiple of the number of passes at least in the main scanning direction, dots may be formed biased to a specific pass by avoiding the occurrence of a pattern. It can be avoided at the same time.

以上、各種の実施例について説明してきたが、本発明は上記すべての実施例に限られるものではなく、その要旨を逸脱しない範囲において種々の態様で実施することができる。   Although various embodiments have been described above, the present invention is not limited to all the embodiments described above, and can be implemented in various modes without departing from the scope of the invention.

例えば、上述した各種実施例では、ユニットを構成する各画素についてのドット形成有無を判断する手法として、いわゆる誤差拡散法を用いているが、これに限らず、例えばディザ法などの周知な他の手法を適用することもできる。   For example, in the various embodiments described above, a so-called error diffusion method is used as a method for determining the presence or absence of dot formation for each pixel constituting the unit. Techniques can also be applied.

また、上述した各種実施例においては、処理済みのユニットの中で、所定の画素位置にドットが形成されていることが検出された場合には、着目画素についてドットが形成され難くするものとして説明した。これに対して、所定の画素位置にドットが形成されていない場合には、着目画素にドットが形成され易くする様にしても良い。こうすれば、例えば、ドットが高い密度で形成されるような領域では、ドットが形成されない画素が複数のユニットに亘って周期的に発生する場合に、画質の悪化を効果的に回避することができる。   Further, in the various embodiments described above, when it is detected that a dot is formed at a predetermined pixel position in a processed unit, it is assumed that it is difficult to form a dot for the pixel of interest. did. On the other hand, when a dot is not formed at a predetermined pixel position, the dot may be easily formed at the target pixel. In this way, for example, in a region where dots are formed at a high density, when pixels where dots are not formed periodically occur across a plurality of units, deterioration of image quality can be effectively avoided. it can.

上述した機能を実現するソフトウェアプログラム(アプリケーションプログラム)を、通信回線を介してコンピュータシステムのメインメモリまたは外部記憶装置に供給し実行するものであってもよい。もちろん、CD−ROMやフレキシブルディスクに記憶されたソフトウェアプログラムを読み込んで実行するものであっても構わない。   A software program (application program) that realizes the above-described functions may be supplied to a main memory or an external storage device of a computer system via a communication line and executed. Of course, a software program stored in a CD-ROM or a flexible disk may be read and executed.

上述した各種実施例では、階調数変換処理を含む画像データ変換処理はコンピュータ内で実行されるものとして説明したが、画像データ変換処理の一部あるいは全部をプリンタ側、あるいは専用の画像処理装置を用いて実行するものであっても構わない。   In the various embodiments described above, the image data conversion process including the gradation number conversion process has been described as being executed in the computer. However, part or all of the image data conversion process is performed on the printer side or a dedicated image processing apparatus. It may be executed by using.

更には、画像表示装置は、必ずしも印刷媒体上にインクドットを形成して画像を印刷する印刷装置に限定されるものではなく、例えば、液晶表示画面上で輝点を適切な密度で分散させることにより、階調が連続的に変化する画像を表現する液晶表示装置であっても構わない。   Further, the image display device is not necessarily limited to a printing device that prints an image by forming ink dots on a print medium. For example, bright spots are dispersed at an appropriate density on a liquid crystal display screen. Thus, a liquid crystal display device that expresses an image whose gradation changes continuously may be used.

本発明の概要を例示した印刷システムの概略構成図である。1 is a schematic configuration diagram of a printing system illustrating an overview of the present invention. 本実施例の画像処理装置としてのコンピュータの構成を示す説明図である。It is explanatory drawing which shows the structure of the computer as an image processing apparatus of a present Example. 本実施例の画像表示装置としてのプリンタの概略構成図である。1 is a schematic configuration diagram of a printer as an image display apparatus according to an embodiment. 本実施例の画像処理装置で行われる画像データ変換処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the image data conversion process performed with the image processing apparatus of a present Example. ユニット単位で行われる階調数変換処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the gradation number conversion process performed per unit. 複数個の画素をまとめて処理ユニットを設定している様子を示す説明図である。It is explanatory drawing which shows a mode that the process unit is set collectively for several pixels. 処理ユニットで発生した階調誤差を周辺の未判断画素に拡散させる様子を例示した説明図である。It is explanatory drawing which illustrated a mode that the gradation error which generate | occur | produced in the processing unit was diffused to the surrounding undetermined pixel. 処理ユニットで発生した階調誤差を周辺の未判断画素に拡散させる割合を例示した説明図である。It is explanatory drawing which illustrated the ratio which diffuses the gradation error which generate | occur | produced in the processing unit to the surrounding undetermined pixel. ユニットを構成する各画素についてドット形成の有無を判断することによりユニット内を多値化する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which multi-values the inside of a unit by determining the presence or absence of dot formation about each pixel which comprises a unit. ユニット内の各画素に誤差を拡散させながら、画素毎にドット形成の有無を判断する方法を概念的に示した説明図である。It is explanatory drawing which showed notionally the method of determining the presence or absence of dot formation for every pixel, diffusing an error to each pixel in a unit. 1本のラスタを2パスで形成する様子を概念的に示した説明図である。It is explanatory drawing which showed notionally the mode that one raster is formed by 2 passes. 主走査方向に4画素ずつ連続した合計8つの画素をユニットとしてまとめる様子を例示した説明図である。It is explanatory drawing which illustrated a mode that a total of eight pixels which continued 4 pixels at a time in the main scanning direction were put together as a unit. 第1実施例において、ユニット内の各画素についてドット形成の有無を判断することによりユニット内を多値化する処理の流れを示すフローチャートである。In the first embodiment, it is a flowchart showing a flow of processing for multi-valued in the unit by determining the presence or absence of dot formation for each pixel in the unit. 第1実施例においてドットの形成状況を検出し、閾値の値を設定する処理の流れを示すフローチャートである。6 is a flowchart showing a flow of processing for detecting a dot formation state and setting a threshold value in the first embodiment. 第1実施例の履歴検出・閾値設定処理において読み出される履歴データの構造を概念的に示した説明図である。It is explanatory drawing which showed notionally the structure of the historical data read in the log | history detection and threshold value setting process of 1st Example. 第1実施例の履歴検出・閾値設定処理において履歴を検出するために設定される履歴検出用データの構造を概念的に示した説明図である。It is explanatory drawing which showed notionally the structure of the data for log | history detection set in order to detect a log | history in the log | history detection and threshold value setting process of 1st Example. 第1実施例の履歴検出・閾値設定処理において履歴データに履歴検出用データを作用させて対象履歴を検出する様子を概念的に示した説明図である。It is explanatory drawing which showed notionally the mode that the data for log | history detection act on log | history data in the log | history detection and threshold value setting process of 1st Example, and a target log | history is detected. 第1実施例において、履歴データを格納している履歴検出用バッファに、ユニット内各画素についての判断結果を書き込む処理の流れを示したフローチャートである。6 is a flowchart showing a flow of processing for writing a determination result for each pixel in a unit into a history detection buffer storing history data in the first embodiment. 第1実施例において、履歴データを格納している履歴検出用バッファに、ユニット内各画素についての判断結果を書き込んでいる様子を概念的に示した説明図である。In the first embodiment, it is an explanatory diagram conceptually showing a state in which a determination result for each pixel in the unit is written in a history detection buffer storing history data. ユニットの大きさが、主走査方向にはパス数の整数倍となっていない場合には、複数ユニットに亘ってドットが一定のパターンで発生することを回避しようとすると、ドットを形成するパスが特定のパスに偏ってしまうことがある理由を示した説明図である。If the size of the unit is not an integral multiple of the number of passes in the main scanning direction, if it is attempted to avoid the occurrence of dots in a constant pattern across a plurality of units, the pass for forming the dots is It is explanatory drawing which showed the reason which may be biased to a specific path | pass. ユニットの主走査方向の大きさをパス数の整数倍とすることで、ドットを形成するパスが特定のパスに偏ってしまうことを回避している様子を示した説明図である。It is explanatory drawing which showed a mode that the path | pass which forms a dot is not biased to a specific path | pass by making the magnitude | size of the main scanning direction of the unit into the integral multiple of the number of passes. 第1実施例の第1の変形例においてドットの形成状況を検出し、閾値の値を設定する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which detects the formation condition of a dot and sets the value of a threshold value in the 1st modification of 1st Example. 第1実施例の第2の変形例において履歴検出用データを設定している様子を概念的に示した説明図である。It is explanatory drawing which showed notionally the mode that the data for log | history detection were set in the 2nd modification of 1st Example. 第1実施例の第2の変形例において、異なる履歴検出用データを設定している様子を概念的に示した説明図である。It is explanatory drawing which showed notionally the mode that the different data for log | history detection are set in the 2nd modification of 1st Example. 第2実施例において、ユニット内の各画素についてドット形成の有無を判断することによりユニット内を多値化する処理の流れを示すフローチャートである。In a 2nd Example, it is a flowchart which shows the flow of the process which multi-values the inside of a unit by determining the presence or absence of dot formation about each pixel in a unit. 第2実施例において、ユニット内の画素位置に対応付けて設けられた履歴検出用バッファを概念的に示す説明図である。In 2nd Example, it is explanatory drawing which shows notionally the log | history detection buffer provided correspondingly with the pixel position in a unit. 第2実施例において、ドット形成状況を検出しようとする画素位置に応じて履歴検出用データを設定する方法を概念的に示した説明図である。In the second embodiment, it is an explanatory diagram conceptually showing a method of setting history detection data according to the pixel position to be detected dot detection status. 第2実施例において、ドット形成有無の判断結果を履歴検出用バッファに書き込む方法を概念的に示した説明図である。In the second embodiment, it is an explanatory diagram conceptually showing a method of writing the determination result of dot formation presence or absence in the history detection buffer. 第2実施例において、履歴データに履歴検出用データを作用させることにより、任意の画素位置でのドット形成状況を検出する方法を概念的に示した説明図である。In 2nd Example, it is explanatory drawing which showed notionally the method of detecting the dot formation condition in arbitrary pixel positions by making log | history detection data act on log | history data.

符号の説明Explanation of symbols

10…コンピュータ
12…プリンタドライバ
14…階調数変換モジュール
20…カラープリンタ
100…コンピュータ
102…CPU
104…ROM
106…RAM
108…周辺機器インターフェースP/IF
109…ディスクコントローラDDC
110…ネットワークインターフェースカードNIC
112…ビデオインターフェースV/IF
114…CRT
116…バス
118…ハードディスク
120…デジタルカメラ
122…カラースキャナ
124…フレキシブルディスク
126…コンパクトディスク
200…カラープリンタ
230…キャリッジモータ
235…紙送りモータ
236…プラテン
240…キャリッジ
241…印字ヘッド
242,243…インクカートリッジ
244…インク吐出用ヘッド
260…制御回路
261…CPU
262…ROM
263…RAM
300…通信回線
310…記憶装置
DESCRIPTION OF SYMBOLS 10 ... Computer 12 ... Printer driver 14 ... Tone number conversion module 20 ... Color printer 100 ... Computer 102 ... CPU
104 ... ROM
106 ... RAM
108 ... Peripheral device interface P / IF
109 ... Disk controller DDC
110: Network interface card NIC
112 ... Video interface V / IF
114 ... CRT
DESCRIPTION OF SYMBOLS 116 ... Bus 118 ... Hard disk 120 ... Digital camera 122 ... Color scanner 124 ... Flexible disk 126 ... Compact disk 200 ... Color printer 230 ... Carriage motor 235 ... Paper feed motor 236 ... Platen 240 ... Carriage 241 ... Print head 242, 243 ... Ink Cartridge 244 ... Ink ejection head 260 ... Control circuit 261 ... CPU
262 ... ROM
263 ... RAM
300 ... Communication line 310 ... Storage device

Claims (6)

ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷装置であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る画像データ受取手段と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換するドットデータ変換手段と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶するドット有無記憶手段と、
前記ドットデータに従って前記ラスタ形成要素を駆動するラスタ形成要素駆動手段と
を備え、
前記ドットデータ変換手段は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する着目画素設定手段と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出するドット形成有無検出手段と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断するドット形成判断手段と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる手段である印刷装置。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A printing apparatus that prints an image by forming a plurality of rasters,
Image data receiving means for receiving, for a plurality of pixels constituting the image to be printed, image data representing a gradation value of each pixel;
Dot data conversion means for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data representing the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, dot presence / absence storage means for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
And raster forming element driving means for driving the raster forming element according to the dot data,
The dot data conversion means includes
Pixel-of-interest setting means for sequentially setting a pixel of interest for which the presence / absence of dot formation is determined in the unit;
Dot formation presence / absence detection means for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit;
Dot formation determination means for determining the presence or absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the presence or absence of the detected dot formation; and
A printing apparatus as a unit that collects a number of continuous pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction.
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷部に、該ラスタ形成要素の駆動を制御するための制御データを供給して該印刷部の制御を行う印刷制御装置であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る画像データ受取手段と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換するドットデータ変換手段と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶するドット有無記憶手段と、
前記ドットデータを前記制御データとして前記印刷部に供給する制御データ供給手段と
を備え、
前記ドットデータ変換手段は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する着目画素設定手段と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出するドット形成有無検出手段と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断するドット形成判断手段と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる手段である印刷制御装置。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A control unit for controlling the printing unit by supplying control data for controlling driving of the raster forming element to a printing unit that prints an image by forming a plurality of rasters. ,
Image data receiving means for receiving, for a plurality of pixels constituting the image to be printed, image data representing a gradation value of each pixel;
Dot data conversion means for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data representing the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, dot presence / absence storage means for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
Control data supply means for supplying the dot data as the control data to the printing unit,
The dot data conversion means includes
Pixel-of-interest setting means for sequentially setting a pixel of interest for which the presence / absence of dot formation is determined in the unit;
Dot formation presence / absence detection means for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit;
Dot formation determination means for determining the presence or absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the presence or absence of the detected dot formation; and
The printing control apparatus as a unit that collects a number of continuous pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction.
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷方法であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る工程(A)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する工程(B)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する工程(C)と、
前記ドットデータに従って前記ラスタ形成要素を駆動する工程(D)と
を備え、
前記工程(B)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する工程(B−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する工程(B−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する工程(B−3)と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる工程である印刷方法。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A printing method for printing an image by forming a plurality of rasters,
Receiving (A) image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A step (B) of grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data representing the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, a step (C) of storing the presence / absence of dot formation in a state where the pixel positions in the unit can be identified;
(D) driving the raster forming element according to the dot data,
The step (B)
A step (B-1) of sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A step (B-2) of detecting the presence or absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among pixels in which the presence or absence of dot formation is stored in the converted unit; ,
A step (B-3) of determining the presence / absence of dot formation for the target pixel based on the gradation value of the image data for the target pixel and the detected dot formation presence / absence,
The printing method, which is a step of collecting a number of pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster as at least a raster direction as the unit.
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷部に、該ラスタ形成要素の駆動を制御するための制御データを供給して該印刷部の制御を行う印刷制御方法であって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る工程(ア)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する工程(イ)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する工程(ウ)と、
前記ドットデータを前記制御データとして前記印刷部に供給する工程(エ)と
を備え、
前記工程(イ)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する工程(イ−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する工程(イ−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する工程(イ−3)と
を備えるとともに、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる工程である印刷制御方法。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A printing control method for controlling the printing unit by supplying control data for controlling driving of the raster forming element to a printing unit that prints an image by forming a plurality of rasters. ,
(A) receiving image data representing the gradation value of each pixel for a plurality of pixels constituting the image to be printed;
(A) converting the image data into dot data indicating the presence or absence of dot formation for each pixel in a unit (a), by combining a predetermined plurality of pixels adjacent to each other as a unit.
For at least some of the pixels constituting the converted unit, a step (c) of storing the presence or absence of dot formation in a state where the pixel positions in the unit can be identified;
And (d) supplying the dot data as the control data to the printing unit.
The step (a)
A step (a-1) of sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A step (a-2) of detecting the presence / absence of dot formation for a pixel located at a predetermined position with respect to the pixel position of the pixel of interest from the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A step (i-3) of determining the presence / absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the detected dot formation presence / absence,
The printing control method, which is a step of collecting continuous pixels as a unit corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction.
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する方法を、コンピュータを用いて実現するためのプログラムであって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(A)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(B)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(C)と、
前記ドットデータに従って前記ラスタ形成要素を駆動する機能(D)と
を実現するとともに、
前記機能(B)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(B−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(B−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(B−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であるプログラム。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster A program for realizing a method of printing an image by forming a plurality of rasters using a computer,
A function (A) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (B) for grouping a predetermined plurality of pixels adjacent to each other as a unit, and converting the image data into dot data indicating the presence / absence of dot formation for each pixel in units;
For at least some of the pixels constituting the converted unit, a function (C) for storing the presence / absence of dot formation in a state where the pixel position in the unit can be identified;
A function (D) for driving the raster forming element according to the dot data and
The function (B) is
A function (B-1) for sequentially setting a pixel of interest for which the presence or absence of dot formation is to be determined in the unit;
A function (B-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (B-3) for determining the presence / absence of dot formation for the pixel of interest based on the gradation value of the image data for the pixel of interest and the detected dot formation presence / absence,
As a unit, a program that collects a number of consecutive pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction.
ドットの列たるラスタを、印刷媒体上にドットを形成しつつ所定回数ずつ往復動を繰り返すことによって形成するラスタ形成要素を備え、該ラスタ形成要素を該ラスタとは交差する方向に相対的に移動させながら、複数本のラスタを形成することで画像を印刷する印刷部に、該ラスタ形成要素の駆動を制御するための制御データを供給して該印刷部の制御を行う方法を、コンピュータを用いて実現するためのプログラムであって、
前記印刷しようとする画像を構成する複数の画素について、各画素の階調値を表す画像データを受け取る機能(ア)と、
互いに隣接する前記画素を所定の複数個ずつユニットとしてまとめ、前記画像データを、各画素についてのドット形成の有無を表すドットデータに、該ユニット単位で変換する機能(イ)と、
前記変換されたユニットを構成する少なくとも一部の画素については、該ユニット内での画素位置を識別可能な状態でドット形成の有無を記憶する機能(ウ)と、
前記ドットデータを前記制御データとして前記印刷部に供給する機能(エ)と
を実現するとともに、
前記機能(イ)は、
前記ユニット内でドット形成の有無を判断しようとする着目画素を順次設定する機能(イ−1)と、
前記変換済みのユニット内でドット形成の有無が記憶されている画素の中から、前記着目画素の画素位置に対して所定位置にある画素についてのドット形成有無を検出する機能(イ−2)と、
前記着目画素についての画像データの階調値と、前記検出したドット形成有無とに基づいて、該着目画素についてのドット形成の有無を判断する機能(イ−3)と
を備え、
前記ユニットとして、少なくともラスタの方向には、前記ラスタ形成要素が前記ラスタを形成するために往復動する前記所定回数の整数倍に相当する個数ずつ連続した画素をまとめる機能であるプログラム。
A raster forming element for forming a dot row raster by repeating reciprocating movement a predetermined number of times while forming dots on a printing medium, and relatively moving the raster forming element in a direction crossing the raster Using a computer to supply control data for controlling driving of the raster forming element to a printing unit that prints an image by forming a plurality of rasters, and to control the printing unit A program for realizing
A function (a) for receiving image data representing a gradation value of each pixel for a plurality of pixels constituting the image to be printed;
A function (a) that collects a predetermined plurality of adjacent pixels as a unit, and converts the image data into dot data indicating the presence or absence of dot formation for each pixel in units.
For at least some of the pixels constituting the converted unit, a function (c) for storing the presence or absence of dot formation in a state in which the pixel position in the unit can be identified;
A function (d) for supplying the dot data as the control data to the printing unit is realized, and
The function (b)
A function (a-1) for sequentially setting a pixel of interest for which it is determined whether or not to form dots in the unit;
A function (a-2) for detecting the presence / absence of dot formation for a pixel at a predetermined position with respect to the pixel position of the pixel of interest from among the pixels in which the presence / absence of dot formation is stored in the converted unit; ,
A function (i-3) for determining the presence / absence of dot formation for the target pixel based on the gradation value of the image data for the target pixel and the detected dot formation presence / absence;
As a unit, a program that collects a number of consecutive pixels corresponding to an integral multiple of the predetermined number of times that the raster forming element reciprocates to form the raster, at least in the raster direction.
JP2003318426A 2003-08-08 2003-09-10 Printing device that prints an image while converting image data in units of multiple pixels Expired - Fee Related JP4325325B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2003318426A JP4325325B2 (en) 2003-09-10 2003-09-10 Printing device that prints an image while converting image data in units of multiple pixels
US10/913,298 US7414756B2 (en) 2003-08-08 2004-08-06 Image processing apparatus for converting image data by unit of multiple pixels and printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003318426A JP4325325B2 (en) 2003-09-10 2003-09-10 Printing device that prints an image while converting image data in units of multiple pixels

Publications (2)

Publication Number Publication Date
JP2005081770A true JP2005081770A (en) 2005-03-31
JP4325325B2 JP4325325B2 (en) 2009-09-02

Family

ID=34417716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003318426A Expired - Fee Related JP4325325B2 (en) 2003-08-08 2003-09-10 Printing device that prints an image while converting image data in units of multiple pixels

Country Status (1)

Country Link
JP (1) JP4325325B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7414756B2 (en) 2003-08-08 2008-08-19 Seiko Epson Corporation Image processing apparatus for converting image data by unit of multiple pixels and printing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7414756B2 (en) 2003-08-08 2008-08-19 Seiko Epson Corporation Image processing apparatus for converting image data by unit of multiple pixels and printing apparatus

Also Published As

Publication number Publication date
JP4325325B2 (en) 2009-09-02

Similar Documents

Publication Publication Date Title
KR100477329B1 (en) Image processing device, printing control device, image processing method, and recording media
JP3823424B2 (en) Image processing apparatus and image processing method
US9862214B2 (en) Recording apparatus for reducing discharge position deviation of discharged ink, and recording method for the same
JP2006289947A (en) Printing device, printing device control program and method of controlling printing device, and data formation device for printing, data formation program for printing and method of forming data for printing
US20060109308A1 (en) Image processing device and image processing method
JP2004350257A (en) Image display system for displaying image on the basis of information of number of dot formed in prescribed region
JP4225319B2 (en) Image output control system, image processing apparatus and method
JP5434058B2 (en) Printing device and dither mask
JP2007068202A (en) Printing device, printing program, printing method, image processing device, image processing program, image processing method, and recording medium with the programs recorded thereon
JP4274030B2 (en) Image output system, image processing apparatus, image output apparatus, and methods thereof
JP2013082122A (en) Controller and control method for printing
JP4325325B2 (en) Printing device that prints an image while converting image data in units of multiple pixels
JP3823859B2 (en) Image processing apparatus for converting image data in units of multiple pixels
US7414756B2 (en) Image processing apparatus for converting image data by unit of multiple pixels and printing apparatus
US7362473B2 (en) Image processing technique for tone number conversion of image data
JP4013855B2 (en) Image processing apparatus for converting image data in units of multiple pixels
JP3972875B2 (en) Image processing apparatus for converting image data in units of multiple pixels
JP4561049B2 (en) Printing system for printing an image based on information on the number of dots formed in a predetermined area
JP4059121B2 (en) Image display system for displaying an image based on information on the number of dots formed in a predetermined area
JP2006231915A (en) Printer, printing program, printing method, image processor, image processing program, image processing method, and recording medium with program recorded
JP2006247918A (en) Printing device, printing program, printing method, image processing device, image processing program, image processing method, and recording medium on which the program is recorded
JP4577366B2 (en) Image processing apparatus for processing a plurality of rasters in parallel
JP4228814B2 (en) Printing method for printing images while processing multiple rasters in parallel
JP4453782B2 (en) Image processing apparatus for processing a plurality of rasters in parallel
JP2006191268A (en) Image output device outputting image while performing image processing a plurality of pixels at a time

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070403

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080520

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080717

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081111

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090109

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090420

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090519

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090601

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees