JP4096949B2 - Image processing apparatus, processing method, and recording medium - Google Patents

Image processing apparatus, processing method, and recording medium Download PDF

Info

Publication number
JP4096949B2
JP4096949B2 JP2005029140A JP2005029140A JP4096949B2 JP 4096949 B2 JP4096949 B2 JP 4096949B2 JP 2005029140 A JP2005029140 A JP 2005029140A JP 2005029140 A JP2005029140 A JP 2005029140A JP 4096949 B2 JP4096949 B2 JP 4096949B2
Authority
JP
Japan
Prior art keywords
pixel
error
pixels
value conversion
diffused
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.)
Expired - Fee Related
Application number
JP2005029140A
Other languages
Japanese (ja)
Other versions
JP2005143140A (en
Inventor
繁明 角谷
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 JP2005029140A priority Critical patent/JP4096949B2/en
Publication of JP2005143140A publication Critical patent/JP2005143140A/en
Application granted granted Critical
Publication of JP4096949B2 publication Critical patent/JP4096949B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、入力された画像データを誤差拡散法により多値化する画像処理装置に関する。   The present invention relates to an image processing apparatus that multiplies input image data by an error diffusion method.

従来より、コンピュータの出力装置として、ヘッドから吐出される数色のインクによりドットを形成して画像を記録するタイプのカラープリンタが提案されており、コンピュータ等が処理した画像を多色多階調で印刷するのに広く用いられている。かかるプリンタは、各ドットごとに見ればドットを形成した状態(オン)と形成しない状態(オフ)の2値しか採ることができず、2階調しか表現し得ない。従って、これらのプリンタは、いわゆるハーフトーン処理により、所定の領域に分散するドットのオン・オフの状態を制御して、原画像データが有する多階調を表現している。近年、ドットの径やインク濃度を多種類形成可能とすることにより、各ドットごとにオン・オフの2値以上の状態を表現可能とした多値プリンタも提案されているが、かかるプリンタにおいても、このようなハーフトーン処理が必要であることは変わりない。   2. Description of the Related Art Conventionally, as a computer output device, a color printer of a type that records dots by forming dots with several colors of ink ejected from a head has been proposed. It is widely used for printing. Such a printer can take only two values, that is, a state where dots are formed (on) and a state where dots are not formed (off), and can only express two gradations. Therefore, these printers express the multi-gradation of the original image data by controlling the on / off state of dots dispersed in a predetermined area by so-called halftone processing. In recent years, multi-value printers have been proposed that can express more than one on / off state for each dot by making it possible to form many types of dot diameters and ink densities. This halftone process is still necessary.

かかるハーフトーン処理の代表的な手法として、誤差拡散法がある。誤差拡散法とは、画像データの各画素の階調値と所定の閾値との大小比較により前記2値化を行った際に生じる階調値の誤差を、周辺の画素に一定の割合で拡散していく方法である。かかる手法によれば、局所的には原画像の階調値と印刷されるドットにより表現される濃度との間に濃度誤差が生じるものの、周辺の画素に濃度誤差を分散することにより、所定の領域で見ればこの誤差を解消することができる。このため高画質による印刷を実現することができる利点がある。   As a typical method of such halftone processing, there is an error diffusion method. The error diffusion method diffuses the error of the gradation value generated when the binarization is performed by comparing the gradation value of each pixel of the image data with a predetermined threshold value to peripheral pixels at a certain ratio. It is a way to do. According to such a technique, although a density error is locally generated between the gradation value of the original image and the density expressed by the printed dots, the density error is distributed to the surrounding pixels to thereby obtain a predetermined error. This error can be eliminated by looking at the area. For this reason, there is an advantage that printing with high image quality can be realized.

しかし、誤差拡散法は、周辺の画素に濃度誤差を拡散するため、各画素ごとの演算量が多かった。このため、処理に長時間を要していた。近年、プリンタの高解像度化が進み、従来に比べて多くの画素について多値化を行う必要が生じてきたため、誤差拡散法の処理時間の短縮化が望まれていた。   However, since the error diffusion method diffuses density error to surrounding pixels, the amount of calculation for each pixel is large. For this reason, a long time was required for processing. In recent years, as the resolution of printers has increased, and it has become necessary to perform multi-value processing for a larger number of pixels than in the past, it has been desired to shorten the processing time of the error diffusion method.

処理の高速化を図るために、並列処理が適用されることが多い。誤差拡散法では、一つの画素の処理によって生じる濃度誤差が拡散されるのを待ってから、次の画素を処理する必要がある。つまり、誤差拡散法では画素を一つ一つ順序よく処理していくことが要求される。このため、従来から誤差拡散法には並列処理は適用できないと考えられていた。   In order to increase the processing speed, parallel processing is often applied. In the error diffusion method, it is necessary to wait for the density error caused by the processing of one pixel to be diffused before processing the next pixel. That is, the error diffusion method requires that the pixels be processed one by one in order. For this reason, it has been conventionally considered that parallel processing cannot be applied to the error diffusion method.

本発明は、かかる課題を解決するためになされたものであり、誤差拡散法による多値化を高速で行うための技術を提供することを目的とする。   The present invention has been made to solve such a problem, and an object of the present invention is to provide a technique for performing multi-value conversion by an error diffusion method at high speed.

上述の課題を解決するため、本発明の画像処理装置は、次の構成を採用した。
本発明の画像処理装置は、
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行う画像処理装置であって、
未だ多値化されていない未処理の画素のうち、他の画素から拡散される濃度誤差が完全に確定した複数の画素について、誤差拡散法による多値化を並行して行うことを特徴とする。
In order to solve the above-described problems, the image processing apparatus of the present invention employs the following configuration.
The image processing apparatus of the present invention
An image processing apparatus that multi-values input image data by an error diffusion method that diffuses density errors that occur when multi-valued each pixel to surrounding pixels that have not yet been multi-valued.
Among the unprocessed pixels that have not yet been multi-valued, a plurality of pixels in which density errors diffused from other pixels are completely determined are subjected to multi-value conversion by the error diffusion method in parallel. .

かかる画像処理装置によれば、複数の画素について多値化を並行して行うため、誤差拡散法による処理を高速に実行することができる。並列処理による高速化は通常行われる手段であるが、本発明は従来は適用が困難とされてきた誤差拡散法による多値化に並列処理を適用した点に大きな意義がある。この意義について説明する。   According to such an image processing apparatus, since multi-value conversion is performed in parallel for a plurality of pixels, processing by the error diffusion method can be executed at high speed. Speeding up by parallel processing is a means usually performed, but the present invention is significant in that parallel processing is applied to multi-value processing by an error diffusion method, which has conventionally been difficult to apply. The significance of this will be described.

誤差拡散法では、一つの画素の処理によって生じる濃度誤差が拡散されるのを待ってから、次の画素を処理する必要がある。かかる処理を実行する性質上、従来、誤差拡散法には並列処理は適用困難とされてきた。例えば、X方向にNx個、Y方向にNy個の画素が2次元的に配列された画像データを考える。左上の画素を(1,1)と表し、右下の画素を(Nx、Ny)と表すものとする。かかる画像データの多値化に並列処理を適用する場合、最初に試みるのは画像データを上下半分、つまり画素のY方向の番号がNy/2以下の領域と、Ny/2よりも大きい領域に分けて適用する方法である。ところが、この場合、2つに分けた領域の境界では、多値化で生じた濃度誤差が解消されず両者の継ぎ目で画質が不連続的に変化する弊害を生じる。   In the error diffusion method, it is necessary to wait for the density error caused by the processing of one pixel to be diffused before processing the next pixel. Conventionally, it has been difficult to apply parallel processing to the error diffusion method due to the nature of executing such processing. For example, consider image data in which Nx pixels in the X direction and Ny pixels in the Y direction are two-dimensionally arranged. The upper left pixel is represented as (1, 1), and the lower right pixel is represented as (Nx, Ny). When parallel processing is applied to such multi-valued image data, the first attempt is to divide the image data into upper and lower halves, that is, an area where the number of pixels in the Y direction is Ny / 2 or less and an area greater than Ny / 2 It is a method to apply separately. However, in this case, at the boundary between the two divided areas, the density error caused by the multi-value conversion is not solved, and the image quality changes discontinuously at the joint between the two.

他の手段として、例えば画像領域の左上の画素から右下に向けて順次進める第1の多値化と、右下の画素から左上に向けて順次進める第2の多値化とを並行して行う手段が考えられる。かかる手段においても、画像領域の中心付近で第1の多値化と第2の多値化との継ぎ目が生じ、やはり画質が不連続的に変化するという弊害を生じる。   As another means, for example, a first multi-value process that sequentially proceeds from the upper left pixel to the lower right part of the image region and a second multi-value process that sequentially proceeds from the lower right pixel to the upper left part are performed in parallel. Means to do so are conceivable. Even in such a means, a seam between the first multi-value and the second multi-value is generated near the center of the image area, and the image quality is also changed discontinuously.

さらに他の手段として、例えば画像を上下2つの領域に分割し、中央から上方に向けて進める第1の多値化と、中央から下方に向けて進める第2の多値化とを並行して行う手段も考えられる。かかる場合には、中央付近の画素の処理で生じた濃度誤差を周辺の画素に拡散できるため、一見画質が確保されるように推測される。しかしながら、誤差拡散法は、処理を開始した画素付近においては、周辺に濃度誤差を拡散することによっては多値化による誤差を十分に解消し得ないという特質がある。256階調ほどの階調値をドットのオン・オフの2値で表現するためには、相当な画素数を必要とするからである。このため、通常、誤差拡散法では画像データの左上などから処理を開始することで、処理開始直後の画素に生じる濃度誤差を目立ちにくくしているのである。上述した方法のように、画像データの中央付近から誤差拡散法による多値化を開始しては、多値化による濃度誤差が目立つようになり、画質を大きく損ねてしまう。   As another means, for example, the image is divided into two upper and lower regions, and the first multi-value processing that advances from the center upward and the second multi-value operation that advances from the center downward are performed in parallel. Means to do so are also conceivable. In such a case, since a density error caused by processing of the pixels near the center can be diffused to the surrounding pixels, it is estimated that the image quality at first glance is ensured. However, the error diffusion method has a characteristic that an error due to multi-leveling cannot be sufficiently eliminated by diffusing density error in the vicinity of the pixel where processing is started. This is because a considerable number of pixels is required to express a gradation value of about 256 gradations using binary values of dot on / off. For this reason, normally, in the error diffusion method, the processing is started from the upper left of the image data or the like, thereby making the density error generated in the pixel immediately after the processing less noticeable. As in the method described above, if multi-value conversion is started from the center of the image data by the error diffusion method, density errors due to multi-value display become conspicuous and image quality is greatly impaired.

以上、いくつか例を挙げて示したように、誤差拡散法では、画質を低下させることなく並列化を図ることは困難とされていた。かかる背景から、誤差拡散法の並列処理化は技術的な検討対象から除外されていた傾向にあった。本発明者は、画像処理の技術について、このような状況に満足することなく、誤差拡散法への並列処理の適用を追求した結果、以下に説明する事項に気づき、本発明を完成した。   As described above, as shown by some examples, it has been difficult for the error diffusion method to achieve parallelization without reducing the image quality. Against this background, the parallel processing of the error diffusion method tended to be excluded from technical considerations. As a result of pursuing the application of parallel processing to the error diffusion method without satisfying such a situation with respect to the image processing technique, the present inventor noticed matters described below and completed the present invention.

誤差拡散法による多値化を行っている際、画像データ中には、他の画素から拡散される濃度誤差が完全に確定した画素が複数存在することがある。完全に確定した画素とは、誤差拡散法による多値化を継続した場合、その画素に拡散される誤差はその画素自体の処理が開始されるまで一切変動しない画素をいう。以下、このような画素を誤差確定画素と呼ぶ。少なくとも現在処理を実行している着目画素の次に処理が行われる画素は誤差確定画素となる。この他の誤差確定画素は、多値化をする際に誤差が拡散される領域に応じて決まる。また、誤差確定画素は、誤差拡散法による処理の進み具合に応じて現れるものである。   When multi-value conversion is performed by the error diffusion method, there may be a plurality of pixels in the image data in which density errors diffused from other pixels are completely determined. A completely determined pixel means a pixel in which an error diffused to the pixel does not change at all until the processing of the pixel itself is started when multi-value conversion by the error diffusion method is continued. Hereinafter, such a pixel is referred to as an error determination pixel. At least a pixel that is processed next to the pixel of interest that is currently being processed is an error-determined pixel. The other error-determining pixels are determined in accordance with the region where the error is diffused when multi-leveling is performed. The error definite pixel appears depending on the progress of processing by the error diffusion method.

例えば、
前記画像データは、第1の方向および第2の方向に2次元的に配列されたデータであり、
前記誤差拡散法は、前記第1の方向に並ぶ画素列に沿って各画素ごとに、少なくとも前記第2の方向に隣接する画素列に前記濃度誤差を拡散しつつ行われる場合には、
前記並行して多値化が行われる複数の画素は、互いに隣接する画素列上の画素となる。
For example,
The image data is data two-dimensionally arranged in a first direction and a second direction,
When the error diffusion method is performed while diffusing the density error to at least a pixel column adjacent in the second direction for each pixel along the pixel column aligned in the first direction,
The plurality of pixels that are multi-valued in parallel are pixels on adjacent pixel columns.

かかる場合を例にとって、本発明における並列化の様子を具体的に示す。前記第2の方向に隣接する画素列に誤差を拡散する例を図9に示す。図9の各マスは画素を示している。図9中のX方向が本発明の第1の方向に相当し、PP,P1・・が画素列に相当する。図9では、画素PPについて誤差拡散法による多値化を施した場合の誤差配分を示している。例えば、画素PPで生じた濃度誤差のうち1/4は隣の画素P1に配分される。その他、図示する通りの配分で着目画素の周辺に濃度誤差は配分され、図9中のY方向に隣接する画素列にも誤差が配分される。   Taking such a case as an example, the state of parallelization in the present invention is specifically shown. FIG. 9 shows an example in which an error is diffused to pixel columns adjacent in the second direction. Each square in FIG. 9 represents a pixel. 9 corresponds to the first direction of the present invention, and PP, P1,... Correspond to the pixel column. FIG. 9 shows an error distribution when the pixel PP is multi-valued by the error diffusion method. For example, 1/4 of the density error generated in the pixel PP is distributed to the adjacent pixel P1. In addition, the density error is distributed around the pixel of interest by the distribution as illustrated, and the error is also distributed to the pixel columns adjacent in the Y direction in FIG.

誤差拡散法による処理が順次行われていく際の誤差配分の様子を図10〜図12に示す。図中の塗りつぶしの画素が処理中の着目画素PPを示している。図中のハッチングを施した画素は着目画素PPから濃度誤差が拡散される画素を示している。図10に示す画素PPを処理しているときは、そこに隣接する画素列上の画素PQには誤差が拡散される。図10の画素PPについて処理が終了した後、X方向に隣接する画素の処理を実行する際には、図11に示す通り隣接する画素列上の画素PQには誤差は拡散されない。さらに、X方向に隣接する画素の処理を実行する際にも図12に示す通り、隣接する画素列上の画素PQには誤差は拡散されない。図10〜図12に示す具体例から明らかな通り、着目画素PPに隣接する画素列上の画素PQに拡散される濃度誤差は、図10に示す画素PPの処理が終了した時点で確定する。この時点で、他の画素から拡散される誤差が完全に確定した画素として、図10中で着目画素PPの右側に隣接する画素と画素PQの2つが存在することになる。   FIGS. 10 to 12 show how errors are distributed when processing by the error diffusion method is sequentially performed. The filled pixels in the figure indicate the target pixel PP being processed. The hatched pixels in the figure indicate pixels in which the density error is diffused from the target pixel PP. When the pixel PP shown in FIG. 10 is processed, an error is diffused to the pixel PQ on the adjacent pixel column. When the processing for the pixels adjacent in the X direction is executed after the processing for the pixel PP in FIG. 10 is completed, the error is not diffused to the pixels PQ on the adjacent pixel columns as shown in FIG. Furthermore, when executing processing of pixels adjacent in the X direction, as shown in FIG. 12, no error is diffused to the pixels PQ on the adjacent pixel columns. As is clear from the specific examples shown in FIGS. 10 to 12, the density error diffused to the pixel PQ on the pixel column adjacent to the target pixel PP is determined when the processing of the pixel PP shown in FIG. 10 is completed. At this time, there are two pixels, the pixel PQ adjacent to the right side of the pixel of interest PP in FIG. 10 and the pixel PQ, as the pixels in which the error diffused from other pixels is completely determined.

本発明の画像処理装置は、着目画素PPの右側に隣接する画素の他、この具体例の画素PQのように誤差確定画素についても誤差拡散法による多値化処理を行う。この処理は、図10〜図12で示した画素PPの多値化と並行して行うことができる。例えば、図11の時点で画素PQの多値化を実行すれば、その右側に隣接する画素PRに拡散される画素が確定する。従って、図12の時点では、画素PPの処理と同時に画素PRについても多値化を行うことができる。   The image processing apparatus of the present invention performs multi-value processing by the error diffusion method for the error-defining pixel as well as the pixel adjacent to the right side of the target pixel PP as in the pixel PQ of this specific example. This process can be performed in parallel with the multi-value pixel PP shown in FIGS. For example, if multi-value conversion of the pixel PQ is executed at the time of FIG. 11, the pixel diffused to the adjacent pixel PR on the right side is determined. Therefore, at the time of FIG. 12, multi-value processing can be performed on the pixel PR simultaneously with the processing of the pixel PP.

本発明では、このように複数の誤差確定画素について誤差拡散法による多値化を実行することにより、従来、適用が困難とされてきた並列化を実現した。また、このような誤差確定画素について並列処理を実行すれば、並列化の具体例として先に列挙した方法のような継ぎ目が生じることがない。従って、本発明の画像処理装置によれば、従来の誤差拡散法による画質を維持したまま高速化を実現することができる。   In the present invention, parallelization, which has conventionally been difficult to apply, is realized by executing multi-value conversion by the error diffusion method for a plurality of error-determined pixels in this way. Further, if parallel processing is executed for such error-determined pixels, there will be no seams as in the methods listed above as specific examples of parallelization. Therefore, according to the image processing apparatus of the present invention, it is possible to achieve high speed while maintaining the image quality by the conventional error diffusion method.

なお、上述の具体例では画素PPと画素PQの2つの画素を並列処理する場合について説明した。誤差拡散法による多値化において、誤差確定画素は上述した2つに限らず、さらに多く存在する可能性がある。かかる画素が3つ以上存在する場合には、3つ以上の画素について並列処理を行うものとすることができるのはいうまでもない。また、並列処理の対象となり得る画素の位置関係は、図10〜図12で示したものに限定されず、濃度誤差が拡散される領域に応じて特定することができる。当然、Y方向に3行以上にわたって誤差が拡散される場合においても、本発明の適用が可能であることはいうまでもない。   In the above-described specific example, the case where two pixels of the pixel PP and the pixel PQ are processed in parallel has been described. In the multi-value conversion by the error diffusion method, the number of error-determining pixels is not limited to the two described above, and there may be more. Needless to say, when there are three or more such pixels, parallel processing can be performed for three or more pixels. Further, the positional relationship of pixels that can be subjected to parallel processing is not limited to that shown in FIGS. 10 to 12, and can be specified according to the region where the density error is diffused. Of course, it is needless to say that the present invention can be applied even when an error is diffused over three or more lines in the Y direction.

本発明の画像処理装置について、少なくとも2つの画素について並列処理を実行する装置は次の通り構成することができる。
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行う画像処理装置であって、
第1の方向および第2の方向に2次元的に配列された画像データを入力する入力手段と、
未だ多値化されていない未処理の画素を、前記第1の方向に並ぶ画素列に沿って順に、少なくとも前記第2の方向に隣接する画素列に濃度誤差を拡散する誤差拡散法により多値化を行う第1の多値化手段と、
前記第1の多値化手段により多値化が行われる画素列に対し、前記第2の方向に隣接する画素列上の画素のうち、他の画素から拡散される濃度誤差が完全に確定した画素について、第1の多値化手段による多値化と並行して誤差拡散法による多値化を行う第2の多値化手段とを備える画像処理装置である。
Regarding the image processing apparatus of the present invention, an apparatus that performs parallel processing on at least two pixels can be configured as follows.
An image processing apparatus that multi-values input image data by an error diffusion method that diffuses density errors that occur when multi-valued each pixel to surrounding pixels that have not yet been multi-valued.
Input means for inputting image data arranged two-dimensionally in a first direction and a second direction;
An unprocessed pixel that has not yet been converted into multiple values is converted into multiple values by an error diffusion method that diffuses a density error to at least pixel columns adjacent in the second direction in order along the pixel columns arranged in the first direction. First multi-value conversion means for performing conversion;
The density error diffused from other pixels among the pixels on the pixel column adjacent in the second direction is completely determined for the pixel column that is multi-valued by the first multi-value quantization means. An image processing apparatus is provided with a second multi-value conversion unit that performs multi-value conversion by an error diffusion method in parallel with multi-value conversion by a first multi-value conversion unit.

また、本発明はこれと同等な画像処理方法として構成することもできる。
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行う画像処理方法であって、
(a)第1の方向および第2の方向に2次元的に配列された画像データを入力する工程と、
(b)未だ多値化されていない未処理の画素を、前記第1の方向に並んだ画素列に沿って順に誤差拡散法により多値化を行う工程と、
(c)前記工程(b)で多値化が行われる画素列に対し前記第2の方向に隣接する画素列上に他の画素から拡散される濃度誤差が完全に確定した画素が現れた後に、前記工程(b)と並行して、該隣接する画素列上の画素を誤差拡散法により多値化する工程とを備える画像処理方法である。
The present invention can also be configured as an image processing method equivalent to this.
An image processing method that multi-values input image data by an error diffusion method that diffuses density errors that occur when each pixel is multi-valued to surrounding pixels that have not yet been multi-valued.
(A) inputting image data arranged two-dimensionally in a first direction and a second direction;
(B) A step of performing multi-value conversion on an unprocessed pixel that has not yet been multi-valued by an error diffusion method in order along a pixel column arranged in the first direction;
(C) After a pixel in which a density error diffused from other pixels is completely determined appears on a pixel column adjacent in the second direction with respect to the pixel column to be multi-valued in the step (b). In parallel with the step (b), there is provided an image processing method comprising a step of multileveling pixels on the adjacent pixel columns by an error diffusion method.

こうすれば、先に図10〜図12を用いて説明したのと同様の作用に基づき、2つの画素について並列して多値化処理を実行することができる。上記発明は2つの画素について並列処理を実行するものに限定するものではなく、3つ以上の画素についての並列処理を実行するものとしても構わない。   In this way, multi-value processing can be executed in parallel for two pixels based on the same operation as described above with reference to FIGS. The above invention is not limited to performing parallel processing on two pixels, and may perform parallel processing on three or more pixels.

なお、第1の多値化手段は、画素列の一端から他端に向けて第1の方向に順に多値化処理を実行し、他端まで処理が完了した後は、別の画素列の処理を実行する。別の画素列の処理を開始した際、第2の多値化手段による多値化がまだ終了していなければ、第1の多値化手段は、第2の多値化手段により多値化が行われる画素列に対して、前記第2の方向に隣接する画素列上の画素に存在する誤差確定画素について多値化を行うことになる。つまり、上記発明における第1の多値化手段の立場と第2の多値化手段の立場とが逆転することになる。本発明による画像処理装置は、このように一画素列についての処理が終了する度に、第1の多値化手段と第2の多値化手段とにより処理される画素を特定する方法を交互に変更する手段をさらに備えた装置として捉えることもできる。当然、本発明の画像処理方法も同様に工程(b)と工程(c)とで処理される画素を特定する方法を交互に変更することを含めた方法として捉えることもできる。   The first multi-value conversion means sequentially executes the multi-value conversion processing in the first direction from one end of the pixel column to the other end, and after the processing is completed up to the other end, Execute the process. When the processing of another pixel column is started, if the multi-value conversion by the second multi-value conversion means is not yet finished, the first multi-value conversion means converts the multi-value by the second multi-value conversion means. For the pixel column to be subjected to the above, multi-value conversion is performed on error-determined pixels existing in pixels on the pixel column adjacent in the second direction. That is, the position of the first multi-value conversion means and the position of the second multi-value conversion means in the above invention are reversed. The image processing apparatus according to the present invention alternates the method of specifying the pixels to be processed by the first multi-value conversion means and the second multi-value conversion means each time the processing for one pixel row is completed. It can also be understood as an apparatus further provided with means for changing to Naturally, the image processing method of the present invention can also be regarded as a method including alternately changing the method of specifying the pixels to be processed in the step (b) and the step (c).

少なくとも2つの画素についての並列処理を実現する上記画像処理装置において、
前記第2の多値化手段は、多値化を行う画素について、他の画素から拡散される濃度誤差が完全に確定したか否かを判定する判定手段を備えるものとすることができる。かかる判定は、例えば第1の多値化手段により処理が実行されている画素との間隔に基づいて判断するものや、第1の多値化処理に伴って各画素に拡散される濃度誤差を所定の期間だけ観察して判断するものとすることができる。こうすれば、第2の多値化手段が誤差確定画素ではない画素を謝って処理する可能性を低減することができ、高画質な多値化が行われる確実性が増す。
In the above-described image processing apparatus that realizes parallel processing for at least two pixels,
The second multi-value conversion unit may include a determination unit that determines whether or not a density error diffused from other pixels is completely determined for a pixel to be multi-valued. For example, the determination is based on an interval from the pixel that is being processed by the first multi-value conversion unit, or a density error that is diffused to each pixel during the first multi-value conversion process. It can be judged by observing only for a predetermined period. In this way, it is possible to reduce the possibility that the second multi-value conversion means apologizes and processes pixels that are not error-determined pixels, and the certainty that high-quality multi-value conversion is performed increases.

また、上記画像処理装置において、例えば、第2の多値化手段は、第1の多値化手段による多値化処理から所定のタイミングだけずらして多値化を行うことにより、結果的に他の画素から拡散された誤差が完全に確定した画素を処理するようにしてもよい。
例えば、前記第1の多値化手段により多値化が行われている着目画素と前記第2の多値化手段により多値化が行われている着目画素とは、前記第1の方向に前記画素列の幅の約半分の間隔を有している位置関係にあるものとできる。
In the above image processing apparatus, for example, the second multi-value conversion means performs multi-value conversion by shifting the multi-value conversion processing by the first multi-value conversion means by a predetermined timing, resulting in other values. Pixels for which the error diffused from these pixels is completely determined may be processed.
For example, the target pixel that has been multi-valued by the first multi-value converting means and the target pixel that has been multi-valued by the second multi-value converting means are in the first direction. It can be in a positional relationship having an interval of about half the width of the pixel column.

通常、誤差拡散法では画素列の幅の半分にわたって誤差を拡散したりはしない。このような広範囲に亘って誤差を拡散する場合には、画像の両端を処理している際に誤差を十分に拡散できなくなり、多値化後の画質を損ねることになるからである。従って、上記画像処理装置のように、2つの多値化手段による多値化のタイミングをずらしておけば、一方の多値化手段により誤差が拡散される領域に他方の多値化手段の着目画素が入ることは生じ難い。従って、複雑な判断処理を施すことなく、第1の多値化手段と第2の多値化手段による並列処理を実現することができる。   Normally, the error diffusion method does not diffuse the error over half the width of the pixel column. This is because when the error is diffused over such a wide range, the error cannot be sufficiently diffused when both ends of the image are processed, and the image quality after multi-leveling is impaired. Accordingly, if the timing of multi-value conversion by the two multi-value conversion means is shifted as in the above image processing apparatus, the attention of the other multi-value conversion means is focused on the area where the error is diffused by one multi-value conversion means. It is difficult for a pixel to enter. Therefore, parallel processing by the first multi-value quantization means and the second multi-value quantization means can be realized without performing complicated determination processing.

第1の多値化手段による着目画素と第2の多値化手段の着目画素との間隔を誤差が拡散される幅よりも広げておけば上述した効果を得ることはできる。但し、両者の間隔を画素列の幅の約半分としておけば、一方の多値化手段により濃度誤差が拡散される領域と、他方の多値化手段の処理対象となる画素とが重複する可能性を極小にすることができる。従って、並列処理によって画質を損なう可能性を極小にすることができる。さらに、第1の多値化手段により一つの画素列の処理が終了した時点で、第2の多値化手段は隣接する画素列の処理を概ね半分済ませているため、第1の多値化手段は待ち時間なく次の画素列の処理を開始することができ非常に効率的な処理を実現することができる。   The effect described above can be obtained if the interval between the pixel of interest by the first multi-value quantization means and the pixel of interest of the second multi-value quantization means is made wider than the error diffusion width. However, if the interval between them is about half the width of the pixel row, the area where the density error is diffused by one multi-value quantization means and the pixel to be processed by the other multi-value quantization means can overlap. Sex can be minimized. Therefore, the possibility that the image quality is impaired by the parallel processing can be minimized. Further, when the processing of one pixel column is completed by the first multi-value conversion means, the second multi-value conversion means has almost half of the processing of adjacent pixel columns, so the first multi-value conversion is performed. The means can start the processing of the next pixel row without waiting time, and can realize very efficient processing.

本発明の画像処理装置において、第1の多値化手段と第2の多値化手段とは異なる演算回路によって構成されることが望ましい。本発明の画像処理装置は、第1の多値化手段と第2の多値化手段とを同じ演算回路で実現して構成することも可能であるが、両者を異なる演算回路で構成すれば、並列処理による高速化の効果を最大限に得ることができる。ここで演算回路とは、誤差拡散法による多値化を行うための専用回路であってもよいし、CPUなどの汎用回路であってもよい。当然、両者の組み合わせであってもよい。   In the image processing apparatus of the present invention, it is desirable that the first multi-value conversion means and the second multi-value conversion means are constituted by different arithmetic circuits. The image processing apparatus of the present invention can be configured by realizing the first multi-value conversion means and the second multi-value conversion means with the same arithmetic circuit, but if both are configured with different arithmetic circuits. The effect of speeding up by parallel processing can be obtained to the maximum. Here, the arithmetic circuit may be a dedicated circuit for performing multi-value processing by an error diffusion method, or may be a general-purpose circuit such as a CPU. Of course, a combination of both may be used.

通常、誤差拡散法による多値化処理を行う画像処理装置では、拡散された誤差を画素との対応関係を付けて記憶するためのメモリを有している。本発明の画像処理装置では、第1の多値化手段で使用するメモリと、第2の多値化手段で使用するメモリとをそれぞれ用意することもできる。   Usually, an image processing apparatus that performs multi-value processing by an error diffusion method has a memory for storing a diffused error in correspondence with a pixel. In the image processing apparatus of the present invention, a memory used in the first multi-value conversion means and a memory used in the second multi-value conversion means can be prepared.

また、両手段で使用するメモリを次の形で共有するものとしてもよい。
つまり、2つの画素についての並列処理を行う画像処理装置において、
前記画像データは前記第1の方向にNx個(Nxは2以上の整数)の画素を有するデータであり、
前記第1の多値化手段は、Y番目からY+n−1番目(Y,nは自然数)までのn本の画素列上の未処理の画素に濃度誤差を拡散する手段であり、
前記第2の多値化手段は、
Y+1番目からY+n番目までのn本の画素列上の未処理の画素に濃度誤差を拡散し、かつ、前記第1の多値化手段によりY番目の画素列に濃度誤差が拡散される領域と前記Y+n番目の画素列に濃度誤差が拡散される領域との前記第1の方向の位置が重複しない画素を処理する手段であり、
前記第1の方向にNx個、前記第2の方向にn個ずつ2次元的に配列された画素に対応したメモリと、
前記Y+1番目からY+n−1番目までのn−1本の画素列に拡散された濃度誤差を、前記第1の方向および前記第2の方向について画素とメモリの位置関係を一義的に保ちつつ、n−1本の画素に対応したメモリに記憶し、
かつ、
残余の1本の画素列に対応したメモリには、前記Y番目の画素列に拡散された濃度誤差と前記Y+n番目の画素列に拡散された濃度誤差とを、前記第1の方向について画素とメモリの位置関係を一義的に保ちつつ記憶する記憶手段とを備える画像処理装置である。
Further, the memory used by both means may be shared in the following manner.
That is, in an image processing apparatus that performs parallel processing on two pixels,
The image data is data having Nx pixels (Nx is an integer of 2 or more) in the first direction,
The first multi-value quantization means is a means for diffusing density errors to unprocessed pixels on n pixel columns from the Yth to Y + n−1th (Y, n are natural numbers),
The second multi-value conversion means
A region in which density error is diffused to unprocessed pixels on n pixel columns from Y + 1 to Y + n, and the density error is diffused to the Yth pixel column by the first multi-value quantization unit; Means for processing pixels in which positions in the first direction do not overlap with a region where density error is diffused in the Y + n-th pixel column;
A memory corresponding to two-dimensionally arranged pixels in each of the Nx number in the first direction and n number in the second direction;
While the density error diffused to the (n−1) pixel columns from the (Y + 1) th to the (Y + n−1) th is kept uniquely in the positional relationship between the pixels and the memory in the first direction and the second direction, store in a memory corresponding to n-1 pixels,
And,
In the memory corresponding to the remaining one pixel column, the density error diffused to the Y-th pixel column and the density error diffused to the Y + n-th pixel column are stored in the first direction as pixels. An image processing apparatus includes a storage unit that stores the memory while maintaining a unique positional relationship.

第1の多値化手段により誤差が拡散される領域と、第2の多値化手段により誤差が拡散される領域とは、Y+1番目からY+n−1番目の画素列までの領域で重複している。従って、この領域では両手段により拡散される誤差を記憶するメモリを共有することができ、そのためにはNx×(n−1)画素分のメモリがあればよい。このメモリに加えて、第1の多値化手段によりY番目の画素列に拡散される誤差を記憶するためのメモリと、第2の多値化手段によりY+n番目の画素列に拡散される誤差を記憶するためのメモリとがあれば、両手段により拡散される誤差を混同することなく記憶することが可能となる。上記画像処理装置では、Y番目の画素列に誤差が拡散される領域と、Y+n番目の画素列に誤差が拡散される領域との前記第1の方向の位置関係が重複しないように第2の多値化手段の着目画素を制御した上で、これらの画素列に拡散された濃度誤差を一つの画素列に対応したメモリに記憶する。このように双方の多値化手段により拡散された誤差を記憶するためのメモリを、一部共有することにより、メモリ容量を節約することができる。また、メモリの共有によって、第1の多値化手段と第2の多値化手段との間で濃度誤差を伝達し合う必要がなくなり、処理の高速化を図ることができる。   The area where the error is diffused by the first multi-value quantization means and the area where the error is diffused by the second multi-value quantization means overlap in the area from the (Y + 1) th to the (Y + n-1) th pixel column. Yes. Therefore, in this area, a memory for storing an error diffused by both means can be shared. For this purpose, a memory for Nx × (n−1) pixels is sufficient. In addition to this memory, a memory for storing an error diffused to the Y-th pixel column by the first multi-value quantization means and an error diffused to the Y + n-th pixel column by the second multi-value quantization means If there is a memory for storing the error, the error diffused by both means can be stored without confusion. In the image processing apparatus, the second positional relationship between the region in which the error is diffused in the Yth pixel column and the region in which the error is diffused in the Y + nth pixel column does not overlap. After controlling the pixel of interest of the multi-value conversion means, the density error diffused in these pixel columns is stored in a memory corresponding to one pixel column. Thus, by partially sharing the memory for storing the error diffused by both the multi-value conversion means, the memory capacity can be saved. Further, by sharing the memory, it is not necessary to transmit a density error between the first multi-value conversion unit and the second multi-value conversion unit, and the processing speed can be increased.

次の態様を採ることによって、拡散された誤差を記憶するメモリを更に節約することもできる。
つまり、2つの画素についての並列処理を行う画像処理装置において、
前記画像データは前記第1の方向にNx個(Nxは2以上の整数)の画素を有するデータであり、
前記第1の多値化手段は、Y番目からY+n−1番目(Y,nは自然数)までのn本の画素列上の未処理の画素に対し、処理対象である第1の着目画素から第1の方向に最大m画素(mは自然数)に亘って濃度誤差を拡散する手段であり、
前記第2の多値化手段は、Y+1番目からY+n番目までのn本の画素列上の未処理の画素に対し、処理対象である第2の着目画素から第1の方向に最大m画素に亘って濃度誤差を拡散する手段であり、
前記第1の方向にNx個、前記第2の方向にn−1個ずつ2次元的に配列された画素に対応した第1のメモリと、
2m個の画素に対応した第2のメモリとを備え、
前記Y+2番目からY+n番目までのn−1本の画素列に拡散された濃度誤差を、前記第1の方向および前記第2の方向について画素とメモリの位置関係を一義的に保ちつつ、n−1本の画素に対応した第1のメモリに記憶し、
かつ、
前記Y番目の画素列において前記第1の着目画素から前記第1の方向にm個の画素に拡散された誤差、および前記Y+1番目の画素列において前記第2の着目画素から前記第1の方向にm個の画素に拡散された誤差を、前記第2のメモリに記憶する記憶手段とを備える画像処理装置である。
The memory for storing the diffused error can be further saved by adopting the following mode.
That is, in an image processing apparatus that performs parallel processing on two pixels,
The image data is data having Nx pixels (Nx is an integer of 2 or more) in the first direction,
The first multi-value conversion means starts from the first pixel of interest to be processed with respect to unprocessed pixels on n pixel columns from the Yth to Y + n−1th (Y, n are natural numbers). Means for diffusing density error over a maximum of m pixels (m is a natural number) in the first direction;
The second multi-value conversion means increases the maximum number of m pixels in the first direction from the second target pixel to be processed with respect to unprocessed pixels on n pixel columns from Y + 1 to Y + n. A means for diffusing density errors over
A first memory corresponding to two-dimensionally arranged pixels in a number of Nx in the first direction and n-1 in the second direction;
A second memory corresponding to 2m pixels,
The density error diffused to the (n−1) pixel columns from the (Y + 2) th to the (Y + n) th is represented by n− while maintaining the positional relationship between the pixels and the memory in the first direction and the second direction uniquely. Storing in a first memory corresponding to one pixel;
And,
An error diffused from the first target pixel to the m pixels in the first direction in the Yth pixel column, and the second direction from the second target pixel in the Y + 1th pixel column The image processing apparatus includes storage means for storing an error diffused to m pixels in the second memory.

こうすれば、メモリ量を「Nx×n+2m」に節約することができる。上記第2のメモリに記憶される誤差には、第1の多値化手段および第2の多値化手段によって新たに拡散される誤差のみならず、従前の処理により既に拡散済みの誤差との総和を記憶する必要がある。なお、上述した態様の他、各メモリへの誤差の割り当ては、異なる画素に拡散された誤差が同じメモリに混同して記憶されることが回避することができる種々の対応関係を採用することができる。   In this way, the memory amount can be saved to “Nx × n + 2m”. The error stored in the second memory includes not only the error newly diffused by the first multi-value conversion means and the second multi-value conversion means, but also the error already diffused by the previous processing. You need to remember the sum. In addition to the above-described aspects, the error allocation to each memory may employ various correspondence relationships that can avoid the error diffused to different pixels being confused and stored in the same memory. it can.

以上で説明した本発明の印刷装置は、誤差拡散法による多値化処理をコンピュータにより実現させることによっても構成することができる。従って、本発明は、かかるプログラムを記録した記録媒体としての態様を採ることもできる。   The printing apparatus of the present invention described above can also be configured by realizing a multilevel processing by an error diffusion method by a computer. Therefore, the present invention can also take the form of a recording medium on which such a program is recorded.

本発明の記録媒体は、
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行うためのプログラムをコンピュータ読みとり可能に記録した記録媒体であって、
第1の方向および第2の方向に2次元的に配列された画像データを入力する機能と、
未だ多値化されていない未処理の画素を、前記第1の方向に並んだ画素列に沿って順に誤差拡散法により多値化を行う第1の多値化機能と、
前記第1の多値化機能により多値化が行われる画素列に対し前記第2の方向に隣接する画素列上の画素のうち、他の画素から拡散される濃度誤差が完全に確定した画素を特定する機能と、
該特定された画素について、前記第1の多値化機能と並行して誤差拡散法による多値化を行う第2の多値化機能とを実現するプログラムを記録した記録媒体である。
The recording medium of the present invention is
A computer-readable program for multi-valued input image data can be obtained by an error diffusion method that diffuses density errors that occur when each pixel is multi-valued to surrounding pixels that have not yet been multi-valued. A recorded recording medium,
A function of inputting image data arranged two-dimensionally in a first direction and a second direction;
A first multi-value quantization function that multi-values unprocessed pixels that have not yet been multi-valued by an error diffusion method in order along the pixel columns arranged in the first direction;
Among the pixels on the pixel column adjacent in the second direction to the pixel column to be multi-valued by the first multi-value function, the pixel in which the density error diffused from other pixels is completely determined With the ability to identify
A recording medium recording a program for realizing a second multi-value function for performing multi-value conversion by an error diffusion method in parallel with the first multi-value function for the identified pixel.

なお、記録媒体としては、フレキシブルディスクやCD−ROM、光磁気ディスク、ICカード、ROMカートリッジ、パンチカード、バーコードなどの符号が印刷された印刷物、コンピュータの内部記憶装置(RAMやROMなどのメモリ)および外部記憶装置等の、コンピュータが読取り可能な種々の媒体を利用できる。また、コンピュータに上記機能を実現させるコンピュータプログラムを通信経路を介して供給するプログラム供給装置としての態様も含む。   The recording medium includes a flexible disk, CD-ROM, magneto-optical disk, IC card, ROM cartridge, punch card, printed matter on which a code such as a barcode is printed, an internal storage device of a computer (memory such as RAM or ROM). ) And external storage devices can be used. Moreover, the aspect as a program supply apparatus which supplies the computer program which makes a computer implement | achieve the said function via a communication path is also included.

以下、本発明の実施の形態について、実施例に基づき説明する。
(1)装置の構成
図1は、本発明の一実施例としての画像処理装置を適用した印刷装置の構成を示すブロック図である。図示するように、コンピュータ90にスキャナ12とカラープリンタ22とが接続されている。コンピュータ90が本実施例の画像処理装置として機能する。このコンピュータ90は、プログラムに従って画像処理に関わる各種演算処理を実行する演算装置としてCPU81A、81Bの2つを備える。また、これらのCPU81A,81Bを中心に、バス80により相互に接続された次の各部を備える。ROM82は、CPU81A,81Bで各種演算処理を実行するのに必要なプログラムやデータを予め格納している。
Hereinafter, embodiments of the present invention will be described based on examples.
(1) Apparatus Configuration FIG. 1 is a block diagram showing the configuration of a printing apparatus to which an image processing apparatus as an embodiment of the present invention is applied. As shown in the figure, a scanner 12 and a color printer 22 are connected to a computer 90. A computer 90 functions as the image processing apparatus of this embodiment. The computer 90 includes two CPUs 81A and 81B as arithmetic devices that execute various arithmetic processes related to image processing according to a program. The following units are connected to each other by a bus 80 with the CPUs 81A and 81B as the center. The ROM 82 stores in advance programs and data necessary for the CPUs 81A and 81B to execute various arithmetic processes.

RAM83は、同じくCPU81A,81Bで各種演算処理を実行するのに必要な各種プログラムやデータが一時的に読み書きされるメモリである。本実施例のRAMは2つのCPU81A,81Bからアクセスされる。従って、本実施例では、2つのCPUが互いにタイミングを考慮することなく自由に読み書きすることができるタイプのRAMを用いている。もちろん、若干の処理効率の低下を覚悟すれば、通常のRAMを用い、RAMへの読み書きが2つのCPUから同時に行われることがないよう、アクセスのタイミングを制御するものとしても構わない。   The RAM 83 is a memory in which various programs and data necessary for executing various arithmetic processes by the CPUs 81A and 81B are temporarily read and written. The RAM of this embodiment is accessed from the two CPUs 81A and 81B. Therefore, in this embodiment, a RAM of a type in which two CPUs can freely read and write without considering timing with each other is used. Of course, if a slight decrease in processing efficiency is prepared, a normal RAM may be used, and the access timing may be controlled so that reading and writing to the RAM are not performed simultaneously by the two CPUs.

入力インターフェイス84は、スキャナ12やキーボード14からの信号の入力を司り、出力インタフェース85は、プリンタ22へのデータの出力を司る。CRTC86は、カラー表示可能なCRT21への信号出力を制御し、ディスクコントローラ(DDC)87は、ハードディスク16やCD−ROMドライブ15あるいは図示しないフレキシブルディスクドライブとの間のデータの授受を制御する。ハードディスク16には、RAM83にロードされて実行される各種プログラムやデバイスドライバの形式で提供される各種プログラムなどが記憶されている。   The input interface 84 controls input of signals from the scanner 12 and the keyboard 14, and the output interface 85 controls output of data to the printer 22. The CRTC 86 controls signal output to the CRT 21 capable of color display, and the disk controller (DDC) 87 controls data exchange with the hard disk 16, the CD-ROM drive 15, or a flexible disk drive (not shown). The hard disk 16 stores various programs loaded in the RAM 83 and executed, various programs provided in the form of device drivers, and the like.

このほか、バス80には、シリアル入出力インタフェース(SIO)88が接続されている。このSIO88は、モデム18に接続されており、モデム18を介して、公衆電話回線PNTに接続されている。コンピュータ90は、このSIO88およびモデム18を介して、外部のネットワークに接続されており、特定のサーバーSVに接続することにより、画像処理に必要なプログラムをハードディスク16にダウンロードすることも可能である。また、必要なプログラムをCD−ROMやフレキシブルディスクによりロードし、コンピュータ90に実行させることも可能である。   In addition, a serial input / output interface (SIO) 88 is connected to the bus 80. The SIO 88 is connected to the modem 18 and is connected to the public telephone line PNT via the modem 18. The computer 90 is connected to an external network via the SIO 88 and the modem 18, and a program necessary for image processing can be downloaded to the hard disk 16 by connecting to a specific server SV. It is also possible to load a necessary program by a CD-ROM or a flexible disk and cause the computer 90 to execute it.

図2は本画像処理装置のソフトウェアの構成を示すブロック図である。コンピュータ90内の画像処理装置は、いわゆるプリンタドライバ100がコンピュータ90にロードされ、図示する各機能を実現することにより構成される。まず、入力部102は画像処理装置が処理すべき画像データを入力する。この画像データは、図1に示したスキャナ12から取り込まれたデータである場合もあるし、コンピュータ90が種々のアプリケーションプログラムを実行することによって生成されたデータである場合もある。   FIG. 2 is a block diagram showing a software configuration of the image processing apparatus. The image processing apparatus in the computer 90 is configured by loading a so-called printer driver 100 into the computer 90 and realizing the functions shown in the figure. First, the input unit 102 inputs image data to be processed by the image processing apparatus. This image data may be data fetched from the scanner 12 shown in FIG. 1 or may be data generated by the computer 90 executing various application programs.

入力された画像データはレンダリング部104のに受け渡される。レンダリング部は、画像データをX方向、Y方向に2次元的に配列された画素に対応したデータに変換する。この結果、各画素ごとにレッド(R),グリーン(G),ブルー(B)の3色の色成分の階調値を有する画像データが生成される。レンダリング部で生成された画像データの様子を図3に示す。図中のマスがそれぞれの画素を示している。本実施例では、X方向にNx個、Y方向にNy個の画素を2次元的に配列している。本明細書では、図3に示す通り、画像データの左上から順にX方向、Y方向に番号を付し、各画素を(X方向の番号、Y方向の番号)の座標形式で特定するものとする。従って、画像データの左上の画素は、(1,1)と表され、右下の画素は(Nx,Ny)と表される。   The input image data is transferred to the rendering unit 104. The rendering unit converts the image data into data corresponding to pixels two-dimensionally arranged in the X direction and the Y direction. As a result, image data having gradation values of three color components of red (R), green (G), and blue (B) is generated for each pixel. The state of the image data generated by the rendering unit is shown in FIG. The squares in the figure indicate the respective pixels. In this embodiment, Nx pixels in the X direction and Ny pixels in the Y direction are two-dimensionally arranged. In this specification, as shown in FIG. 3, numbers are assigned to the X direction and the Y direction in order from the upper left of the image data, and each pixel is specified in the coordinate format (number in the X direction, number in the Y direction). To do. Accordingly, the upper left pixel of the image data is represented as (1, 1), and the lower right pixel is represented as (Nx, Ny).

こうして生成された画像データは、色補正部106に受け渡される。色補正部106では、RGBからなる画像データを、プリンタ22が印刷可能な色彩、ここではシアン(C)、マゼンダ(M)、イエロー(Y)、ブラック(K)の各色についての多値化された信号)に変換している。色補正部106は、色補正テーブルLUTを参照して、画像データのRGBの階調値をCMYKの各色の階調値に置換するのである。本実施例では、各色成分につき、256階調等の幅で階調値を有するものとした。   The image data generated in this way is transferred to the color correction unit 106. In the color correction unit 106, RGB image data is converted into multi-values for colors that can be printed by the printer 22, here, for each color of cyan (C), magenta (M), yellow (Y), and black (K). Signal). The color correction unit 106 refers to the color correction table LUT and replaces the RGB gradation values of the image data with the gradation values of each color of CMYK. In this embodiment, each color component has a gradation value with a width such as 256 gradations.

CMYKの階調値を有する画像データは、ハーフトーン処理部110により2値化される。つまり、プリンタ22で形成されるドットのオン・オフに対応するデータを各画素ごとに割り当てる。本実施例のプリンタドライバ100では、ハーフトーン処理を図2に示す第1誤差拡散部112と第2誤差拡散部114の2つのブロックにより並列して処理可能に構成している。両者は画像データを分担して誤差拡散法による2値化を実行する。本実施例では、第1誤差拡散部112が奇数番目の画素列上の画素、即ち(n,2m−1)(n,mは自然数)で表される画素を処理し、第2誤差拡散部114が偶数番目の画素列上の画素、即ち(n,2m)(n,mは自然数)で表される画素を処理するものとしている。両者の分担の様子を図4に示した。図4中に実線の矢印が第1誤差拡散部112による処理の順序を示しており、破線の矢印が第2誤差拡散部114による処理の順序を示している。各画素列は、図4に示す通り、X方向の番号が小さい順に処理される。なお、第1誤差拡散部112と第2誤差拡散部114による処理タイミングについては後述する。   Image data having CMYK gradation values is binarized by the halftone processing unit 110. That is, data corresponding to ON / OFF of dots formed by the printer 22 is assigned to each pixel. In the printer driver 100 according to the present embodiment, halftone processing can be processed in parallel by two blocks of the first error diffusion unit 112 and the second error diffusion unit 114 shown in FIG. Both share image data and execute binarization by the error diffusion method. In this embodiment, the first error diffusion unit 112 processes pixels on odd-numbered pixel columns, that is, pixels represented by (n, 2m−1) (n and m are natural numbers), and the second error diffusion unit Reference numeral 114 denotes a pixel on an even-numbered pixel column, that is, a pixel represented by (n, 2m) (n and m are natural numbers). FIG. 4 shows the sharing of the two. In FIG. 4, solid arrows indicate the order of processing by the first error diffusion unit 112, and broken arrows indicate the order of processing by the second error diffusion unit 114. Each pixel column is processed in ascending order of numbers in the X direction, as shown in FIG. The processing timing by the first error diffusion unit 112 and the second error diffusion unit 114 will be described later.

誤差拡散法では、後で詳述する通り各画素の2値化に伴って生じる濃度誤差を周辺の画素に拡散することによって、濃度誤差を極小にした画像処理を実現している。この濃度誤差を記憶するメモリとして、第1誤差拡散部112と第2誤差拡散部114とはそれぞれ共通の誤差バッファ116を使用している。もちろん、第1誤差拡散部112が使用する第1の誤差バッファと第2誤差拡散部114が使用する誤差バッファとを別個に設けるものとしても構わない。   In the error diffusion method, as will be described in detail later, image processing that minimizes the density error is realized by diffusing the density error caused by the binarization of each pixel to surrounding pixels. As a memory for storing the density error, the first error diffusion unit 112 and the second error diffusion unit 114 each use a common error buffer 116. Of course, the first error buffer used by the first error diffusion unit 112 and the error buffer used by the second error diffusion unit 114 may be provided separately.

以上の各機能ブロックにより処理された画像データは、出力部120を介してプリンタ22に出力される。プリンタ22はこのデータに基づいて書く画素ごとにドットを形成することで入力された画像データに対応した画像を印刷することができる。本実施例では、画像処理結果の出力先の一例としてプリンタ22を使用しているが、出力先はこれに限られるものではない。いわゆるプリンタの他、スクリーン印刷用の製版装置に出力することもできるし、ディスプレイに出力するものとしても構わない。   The image data processed by the above functional blocks is output to the printer 22 via the output unit 120. The printer 22 can print an image corresponding to the input image data by forming dots for each pixel to be written based on this data. In this embodiment, the printer 22 is used as an example of the output destination of the image processing result, but the output destination is not limited to this. In addition to a so-called printer, it can be output to a plate-making apparatus for screen printing, or can be output to a display.

本実施例で使用しているプリンタ22は、いわゆるインクジェット型のプリンタである。つまり、印刷用紙上にインクを吐出してドットを形成することによって、画像を記録するプリンタである。もちろん、その他のタイプのプリンタ、例えばいわゆるドットインパクト型のプリンタや熱転写型のプリンタなどを用いるものとしても構わない。   The printer 22 used in the present embodiment is a so-called ink jet type printer. In other words, it is a printer that records an image by ejecting ink onto printing paper to form dots. Of course, other types of printers such as a so-called dot impact type printer or thermal transfer type printer may be used.

(2)画像処理:
次に本実施例の画像処理装置における画像処理内容について説明する。図5に本実施例の画像処理装置による画像処理ルーチンのフローチャートを示す。この処理は、コンピュータ90内のCPU81A,81Bにより実行される。本実施例ではCPU81Aが主として処理を実行し、CPU81BはCPU81Aとともに後述するハーフトーン処理を実行する。
(2) Image processing:
Next, the contents of image processing in the image processing apparatus of this embodiment will be described. FIG. 5 shows a flowchart of an image processing routine by the image processing apparatus of this embodiment. This process is executed by the CPUs 81A and 81B in the computer 90. In this embodiment, the CPU 81A mainly executes processing, and the CPU 81B executes halftone processing described later together with the CPU 81A.

図5に示す通り、画像処理ルーチンが開始されると、CPU81Aは画像データの入力を行う(ステップS100)。この画像データは、先に図2に示した入力部102が入力する画像データに相当する。つまり、スキャナ12から読み込まれたデータや種々のアプリケーションなどによって生成された原画像データである。次に、CPU81Aはこの画像データに対してレンダリング処理を実行する(ステップS200)。この処理は、図2で示したレンダリング部104が実行する処理に相当する。つまり、ステップS100で読み込まれた画像データを2次元的に配列された画素に対応したRGBの階調データに置換するのである。レンダリング処理によって得られる画像データは、図3に示した通り、X方向にNx個、Y方向にNy個のサイズで各画素ごとにRGBの階調値を有するデータである。   As shown in FIG. 5, when the image processing routine is started, the CPU 81A inputs image data (step S100). This image data corresponds to the image data input by the input unit 102 shown in FIG. That is, it is the original image data generated by data read from the scanner 12 or various applications. Next, the CPU 81A executes a rendering process on this image data (step S200). This process corresponds to the process executed by the rendering unit 104 shown in FIG. That is, the image data read in step S100 is replaced with RGB gradation data corresponding to the two-dimensionally arranged pixels. As shown in FIG. 3, the image data obtained by the rendering process is Nx size in the X direction and Ny size in the Y direction, and has RGB gradation values for each pixel.

次に、CPU81Aは、色補正処理を行う(ステップS300)。色補正処理とはR,G,Bの階調値からなる画像データをプリンタ22で使用するC,M,Y,Kの各色の階調値のデータに変換する処理である。この処理は、R,G,Bのそれぞれの組み合わせからなる色をプリンタ22で表現するためのC,M,Y,Kの組み合わせを記憶した色補正テーブルLUT(図2参照)を用いて行われる。色補正テーブルLUTを用いて色補正する処理自体については、公知の種々の技術が適用可能であり、例えば補間演算による処理(例えば、特開平4−144481記載の技術)が適用できる。色補正処理の内容は、出力機器によって相違する。出力機器がRGBの色系を使用する場合には色補正処理を省略することができる。   Next, the CPU 81A performs color correction processing (step S300). The color correction process is a process of converting image data composed of R, G, B gradation values into data of gradation values of C, M, Y, K colors used in the printer 22. This process is performed by using a color correction table LUT (see FIG. 2) that stores combinations of C, M, Y, and K for expressing colors composed of combinations of R, G, and B by the printer 22. . Various known techniques can be applied to the process of performing color correction using the color correction table LUT. For example, a process based on an interpolation operation (for example, a technique described in Japanese Patent Laid-Open No. Hei 4-144482) can be applied. The content of the color correction process varies depending on the output device. When the output device uses the RGB color system, the color correction process can be omitted.

こうして色補正された画像データは誤差拡散法によるハーフトーン処理が施される(ステップS400)。ここでのハーフトーン処理とは、原画像データの階調値(本実施例では256階調)を、プリンタ22のドットのオン・オフに対応した2値のデータに変換することをいう。本実施例では、CPU81AとCPU81Bの2つの演算回路によりこの処理を並行して行っている。CPU81Aが図2における第1誤差拡散部112に相当し、CPU81Bが図2における第2誤差拡散部114に相当する。   The color-corrected image data is subjected to halftone processing by the error diffusion method (step S400). Here, the halftone process means that the gradation value of the original image data (256 gradations in this embodiment) is converted into binary data corresponding to ON / OFF of the dots of the printer 22. In this embodiment, this processing is performed in parallel by two arithmetic circuits of CPU 81A and CPU 81B. The CPU 81A corresponds to the first error diffusion unit 112 in FIG. 2, and the CPU 81B corresponds to the second error diffusion unit 114 in FIG.

図6は本実施例におけるハーフトーン処理の流れを示すフローチャートである。以下では、カラー画像データのうち、一色についての処理内容を示す。実際には、各色ごとに同様の処理が繰り返し実行される。図6には、CPU81Aが実行する第1ハーフトーン処理と、CPU81Bが実行する第2ハーフトーン処理とを併記した。両者の処理は、互いに関連を持ったタイミングで並行して進められる。   FIG. 6 is a flowchart showing the flow of halftone processing in this embodiment. In the following, processing contents for one color of the color image data are shown. Actually, the same processing is repeatedly executed for each color. FIG. 6 shows the first halftone process executed by the CPU 81A and the second halftone process executed by the CPU 81B. Both processes are performed in parallel at timings related to each other.

第1ハーフトーン処理が開始されるとCPU81Aは、2値化を行うべき着目画素を特定する変数(kx1、ky1)に値(1,1)を代入して、この変数を初期化する(ステップS410)。図4に示す通り、CPU81Aは画像データの左上端から順に2値化を行う。従って、最初に処理すべき画素(1,1)を特定するデータを上記変数(kx1、ky1)に代入するのである。   When the first halftone process is started, the CPU 81A assigns a value (1, 1) to a variable (kx1, ky1) for specifying a pixel of interest to be binarized, and initializes this variable (step S1). S410). As shown in FIG. 4, the CPU 81A performs binarization in order from the upper left end of the image data. Therefore, the data specifying the pixel (1, 1) to be processed first is substituted into the variables (kx1, ky1).

一方、この処理と並列して第2ハーフトーン処理が開始されるとCPU81Bは、2値化を行うべき着目画素を特定する変数(kx2、ky2)に値(1,2)を代入する(ステップS440)。図4に示す通り、CPU81BはCPU81Aが処理する画素列の直下に隣接する画素列の左端から順に2値化を行う。従って、最初に処理すべき画素(1,2)を特定するデータを上記変数(kx2、ky2)に代入するのである。   On the other hand, when the second halftone process is started in parallel with this process, the CPU 81B substitutes the value (1, 2) for the variable (kx2, ky2) for specifying the pixel of interest to be binarized (step S1). S440). As shown in FIG. 4, the CPU 81B performs binarization in order from the left end of the pixel column adjacent to the pixel column processed by the CPU 81A. Therefore, data specifying the pixel (1, 2) to be processed first is substituted into the variables (kx2, ky2).

次に、CPU81AおよびCPU81Bはそれぞれの着目画素の位置関係に基づいて、ハーフトーン処理を進めてよいか否かを判定する。第1ハーフトーン処理において、CPU81Aは次式(1)が満足されているか否かによってこれを判断する(ステップS412)。次式(1)が満足されている場合には処理の実行を待つ(ステップS414)。
kx2−Nx/2 < kx1 < kx2 ・・・(1)
Next, the CPUs 81A and 81B determine whether or not halftone processing can proceed based on the positional relationship between the respective pixels of interest. In the first halftone process, the CPU 81A determines whether or not the following expression (1) is satisfied (step S412). If the following expression (1) is satisfied, the process waits for execution (step S414).
kx2-Nx / 2 <kx1 <kx2 (1)

かかる判定の意味について図7を用いて説明する。なお、以下の説明では、CPU81AとCPU81Bとの処理タイミングを表現するために、便宜上「処理が進んでいる」「処理が遅れている」という表現を用いる。「処理が進んでいる」とは、一方のCPUが処理している着目画素が、他方のCPUが処理している着目画素よりも右側に位置する、つまりX方向の番号が大きいことを意味するものとする。両着目画素のY方向の位置関係は問わない。「処理が遅れている」とは、この逆に、一方のCPUが処理している着目画素が、他方のCPUが処理している着目画素よりも左側に位置することを意味するものとする。   The meaning of such determination will be described with reference to FIG. In the following description, in order to express the processing timing of the CPU 81A and the CPU 81B, the expressions “processing is progressing” and “processing is delayed” are used for convenience. “Processing is progressing” means that the target pixel being processed by one CPU is located on the right side of the target pixel being processed by the other CPU, that is, the number in the X direction is larger. Shall. The positional relationship between the pixels of interest in the Y direction does not matter. “Processing is delayed” means that, on the contrary, the target pixel processed by one CPU is located on the left side of the target pixel processed by the other CPU.

本実施例では、例えば、CPU81Aが図7中の矢印A1で示す画素を処理している時、その下側に隣接する画素列上の画素を処理するCPU81Bは、矢印B1で示す通り、X方向の画素の幅の約半分に相当する分だけ遅れたタイミングで処理を実行するものとしている。CPU81Aが図7中の矢印A1で示す画素列の処理を終了した時点で、CPU81Bは図7中の矢印B2当たりの画素列の処理を行うことになる。このとき、CPU81Aは逆にCPU81Bから、X方向の画素の幅の約半分に相当する分だけ遅れたタイミングで処理を実行する(図7の矢印A2)。本実施例では、このように下側に位置する画素列を処理するCPUが他方のCPUよりも、X方向の画素の幅の約半分に相当する分だけ遅れたタイミングで処理を実行するものと設定しているのである。かかるタイミングで処理を実行する理由については後述する。CPU81AはステップS412,414において上式(1)を満足するか否かを判定することにより、次の通り図7に示した処理のタイミングが維持されるように制御している。   In the present embodiment, for example, when the CPU 81A is processing the pixel indicated by the arrow A1 in FIG. 7, the CPU 81B that processes the pixel on the pixel column adjacent to the lower side is the X direction as indicated by the arrow B1. The processing is executed at a timing delayed by an amount corresponding to about half of the width of the pixel. When the CPU 81A finishes the processing of the pixel column indicated by the arrow A1 in FIG. 7, the CPU 81B performs the processing of the pixel column per arrow B2 in FIG. At this time, on the contrary, the CPU 81A executes processing at a timing delayed from the CPU 81B by an amount corresponding to about half the width of the pixel in the X direction (arrow A2 in FIG. 7). In this embodiment, the CPU that processes the pixel row located on the lower side executes processing at a timing delayed by an amount corresponding to about half of the width of the pixel in the X direction from the other CPU. It is set. The reason for executing the processing at such timing will be described later. The CPU 81A determines whether or not the above equation (1) is satisfied in steps S412 and 414, thereby controlling the processing timing shown in FIG. 7 as follows.

CPU81Aの着目画素のX方向の番号kx1がCPU81Bの着目画素のX方向の番号kx2よりも小さい場合、CPU81AはCPU81Bよりも処理が遅れた状態にあることを意味する。CPU81Aが図7中の矢印A2の状態にあり、CPU81Bが矢印B2の状態にある場合に相当する。この状態において、kx1が「kx2−Nx/2」よりも大きい場合には、kx1とkx2との間隔がX方向の画素の幅Nxの半分以下であることを意味する。つまり、上式(1)を満足する場合、CPU81Aは処理のタイミングが早くなり過ぎ、処理が進んでいるCPU81Bに追いつくおそれがあることを意味している。従って、CPU81Aは処理タイミングを調整するために、ステップS414で処理の実行を待つのである。   When the number kx1 in the X direction of the pixel of interest of the CPU 81A is smaller than the number kx2 in the X direction of the pixel of interest of the CPU 81B, it means that the CPU 81A is in a state of processing delayed from the CPU 81B. This corresponds to the case where the CPU 81A is in the state of the arrow A2 in FIG. 7 and the CPU 81B is in the state of the arrow B2. In this state, when kx1 is larger than “kx2−Nx / 2”, it means that the interval between kx1 and kx2 is less than or equal to half the width Nx of the pixel in the X direction. That is, when the above equation (1) is satisfied, the CPU 81A has a process timing that is too early and may catch up with the CPU 81B that is processing. Therefore, the CPU 81A waits for execution of the process in step S414 in order to adjust the process timing.

一方、CPU81Aの方が処理が進んでいる場合、つまりCPU81Aが図7中の矢印A1の状態にあり、CPU81Bが矢印B1の状態にある場合、処理タイミングの調整は、第2ハーフトーン処理において行われる。第2ハーフトーン処理においてCPU81Bは、kx2が次式(2)を満足するか否かを判定し(ステップS442)、満足する場合にはCPU81Aに追いつくおそれがあると判断して処理を待つ(ステップS444)。次式(2)の内容は、上式(1)においてCPU81A,81Bの関係を入れ替えた場合に等しい。
kx1−Nx/2 < kx2 < kx1 ・・・(2)
On the other hand, when the processing of the CPU 81A is advanced, that is, when the CPU 81A is in the state of the arrow A1 in FIG. 7 and the CPU 81B is in the state of the arrow B1, the adjustment of the processing timing is performed in the second halftone processing. Is called. In the second halftone process, the CPU 81B determines whether or not kx2 satisfies the following expression (2) (step S442). If satisfied, the CPU 81B determines that there is a risk of catching up with the CPU 81A and waits for the process (step S442). S444). The content of the following equation (2) is equal to the case where the relationship between the CPUs 81A and 81B is replaced in the above equation (1).
kx1-Nx / 2 <kx2 <kx1 (2)

第1ハーフトーン処理におけるステップS412、および第2ハーフトーン処理におけるステップS442でCPU81AとCPU81Bとは、図7に示した所定のタイミングを維持しながら処理を進めるように互いの着目画素の情報を伝達し合っている。CPU81A,81B相互のやりとりを、図6では破線の矢印で示した。   In step S412 in the first halftone process and in step S442 in the second halftone process, the CPU 81A and the CPU 81B transmit information on each pixel of interest so as to advance the process while maintaining the predetermined timing shown in FIG. I'm happy. The interaction between the CPUs 81A and 81B is indicated by broken arrows in FIG.

以上の処理により2値化を実行すべきと判断されるとCPU81Aは画像データの読み込みを行う(ステップS416)。この画像データは、既に説明した通り、各画素ごとにCMYKの色成分についてそれぞれ256階調を有するデータである。この画像データに対して、CPU81Aは誤差拡散処理を実行する(ステップS418)。誤差拡散処理の内容を図8に示す。   When it is determined that binarization should be executed by the above processing, the CPU 81A reads image data (step S416). As described above, this image data is data having 256 gradations for each color component of CMYK for each pixel. For this image data, the CPU 81A executes error diffusion processing (step S418). The contents of the error diffusion process are shown in FIG.

誤差拡散処理では、CPU81Aは、画像データに基づいて拡散誤差補正データCDXの生成を行う(ステップS460)。後述する通り、誤差拡散処理は処理済みの画素について生じた階調表現の誤差をその画素の周りの画素に所定の重みを付けて配分する。各画素の処理は、その画素に配分される誤差も考慮して行われる。従って、ステップS460では着目画素に該当する誤差分を読み出し、着目画素の画像データに反映させるのである。着目している画素PPに対して、周辺の画素にどの程度の重み付けで、この誤差を配分するかを、図9に例示した。着目している画素PPに対して、X方向に数画素、Y方向に隣接する画素列上の数画素に対して、濃度誤差が所定の重み(1/4,1/8、1/16)を付けて配分される。   In the error diffusion process, the CPU 81A generates diffusion error correction data CDX based on the image data (step S460). As will be described later, in the error diffusion process, an error in gradation expression generated for a processed pixel is distributed to pixels around the pixel with a predetermined weight. Processing of each pixel is performed in consideration of an error distributed to the pixel. Therefore, in step S460, the error corresponding to the target pixel is read and reflected in the image data of the target pixel. FIG. 9 exemplifies how much weight is distributed to peripheral pixels with respect to the pixel PP of interest, and how much this error is distributed. With respect to the pixel PP of interest, the density error is a predetermined weight (1/4, 1/8, 1/16) with respect to several pixels in the X direction and several pixels on a pixel column adjacent in the Y direction. It is distributed with.

CPU81Aは、こうして生成された拡散誤差補正データCDXと閾値THとの大小を比較し(ステップS462)、データCDXが閾値THよりも小さい場合には、2値化結果を表す結果値REに値0を代入する(ステップS464)。本実施例においては、結果値REに値0を代入することは、プリンタ22で着目画素にドットを形成しないことを意味する。閾値THはこのように2値化した結果値REが値0となるか否かを判定する基準となる値であり、いずれの値に設定することもできる。本実施例では原画像データの256階調を2値化するため、その中間の階調値127に設定している。ステップS462において、補正データCDXが閾値THよりも大きい場合には、結果値REに値1を代入する(ステップS466)。本実施例においては、結果値REに値1を代入することは、プリンタ22で着目画素にドットを形成することを意味する。   The CPU 81A compares the diffusion error correction data CDX generated in this way with the threshold value TH (step S462). If the data CDX is smaller than the threshold value TH, the result value RE representing the binarization result has a value 0. Is substituted (step S464). In this embodiment, assigning a value of 0 to the result value RE means that the printer 22 does not form a dot on the pixel of interest. The threshold value TH is a value that serves as a reference for determining whether or not the binarized result value RE becomes 0, and can be set to any value. In the present embodiment, in order to binarize 256 gradations of the original image data, an intermediate gradation value 127 is set. In step S462, when the correction data CDX is larger than the threshold value TH, the value 1 is substituted into the result value RE (step S466). In this embodiment, substituting the value 1 into the result value RE means that the printer 22 forms a dot on the pixel of interest.

次に、CPU81Aは2値化により生じた誤差を計算し、その誤差を周辺の画素に拡散する処理を実行する(ステップS468)。誤差とは、原画像データの階調値に相当する濃度と、2値化後結果により表現される濃度との差をいう。例えば、原画像データにおける階調値が0である場合、結果値REが0であれば、表現される濃度に誤差は生じない。このとき誤差は値0となる。原画像データにおける階調値0に対して、結果値REが1であれば表現される濃度に誤差が生じる。一つのドットによって表現される濃度が原画像の階調値255に相当すると評価されれば、誤差は「−255」となる。負号を付けたのは、2値化後の濃度の評価値よりも原画像データの階調値の方が小さいことを意味している。   Next, the CPU 81A calculates an error caused by binarization, and executes a process of diffusing the error to surrounding pixels (step S468). The error means a difference between the density corresponding to the gradation value of the original image data and the density expressed by the binarized result. For example, when the gradation value in the original image data is 0, if the result value RE is 0, no error occurs in the expressed density. At this time, the error is 0. If the result value RE is 1 with respect to the gradation value 0 in the original image data, an error occurs in the expressed density. If it is evaluated that the density expressed by one dot corresponds to the gradation value 255 of the original image, the error is “−255”. The negative sign means that the gradation value of the original image data is smaller than the density evaluation value after binarization.

こうして演算された誤差は図9に示した割合で周辺の画素に拡散される(ステップS468)。例えば、着目している画素PPにおいて階調値4に相当する誤差が算出された場合には、隣の画素P1には誤差の1/4である階調値1に相当する誤差が拡散されることになる。その他の画素についても同様に図9で示した割合で誤差が拡散される。こうして拡散された誤差が先に説明したステップS460で画像データに反映され、拡散誤差補正データCDXが生成される。   The error thus calculated is diffused to the surrounding pixels at the rate shown in FIG. 9 (step S468). For example, when an error corresponding to the gradation value 4 is calculated in the pixel PP of interest, an error corresponding to the gradation value 1 that is ¼ of the error is diffused to the adjacent pixel P1. It will be. Similarly, the error is diffused at the ratio shown in FIG. 9 for the other pixels. The diffused error is reflected in the image data in step S460 described above, and diffusion error correction data CDX is generated.

以上の処理により、着目画素について2値化が行われると、CPU81Aはkx1を値1だけ増す(ステップS420)。この処理により着目画素がX方向に1つずれる。さらに、kx1がNxよりも大きいか否かを判定し(ステップS422)、大きい場合には、kx1の値を1にすると共にky1の値を2値化だけ増やす(ステップS424)。kx1の値がNxよりも大きくなった場合は、一つの画素列について右端まで処理が終了したことを意味するため、次の画素列の左端の画素に対応するデータをkx1,ky1に代入するのである。ky1を値2だけ増やすのは、図7に示した通り、本実施例では、CPU81Aは奇数番目の画素列の2値化を行うものとしているからである。ステップS422において、kx1の値がNx以下である場合は上記処理はスキップされる。   When binarization is performed for the pixel of interest by the above processing, the CPU 81A increases kx1 by the value 1 (step S420). This process shifts the target pixel by one in the X direction. Further, it is determined whether or not kx1 is larger than Nx (step S422). If it is larger, the value of kx1 is set to 1 and the value of ky1 is increased by binarization (step S424). When the value of kx1 is greater than Nx, it means that the processing has been completed to the right end for one pixel column, and therefore data corresponding to the leftmost pixel of the next pixel column is substituted for kx1 and ky1. is there. The reason why ky1 is increased by the value 2 is that, as shown in FIG. 7, in this embodiment, the CPU 81A performs binarization of the odd-numbered pixel columns. In step S422, when the value of kx1 is Nx or less, the above process is skipped.

次にCPU81Aは、ky1の値がNyよりも大きいか否かを判定する(ステップS426)。ky1の値がNyよりも大きい場合、CPU81Aは全ての画像データを処理したことを意味するため、第1ハーフトーン処理を終了する。ky1の値がNy1以下である場合には、ステップS412以降の処理を繰り返すことによって次の着目画素の2値化を実行する。   Next, the CPU 81A determines whether or not the value of ky1 is larger than Ny (step S426). When the value of ky1 is larger than Ny, it means that the CPU 81A has processed all the image data, and thus the first halftone process ends. If the value of ky1 is less than or equal to Ny1, binarization of the next pixel of interest is executed by repeating the processing from step S412 onward.

第2ハーフトーン処理におけるステップS442,S444の処理によって、2値化を実行すべきと判断されるとCPU81Bは画像データの2値化を実行する。2値化の処理内容は第1ハーフトーン処理と同様である。つまり、画像データを読み込み(ステップS446)、誤差拡散処理を実行する(ステップS448)。誤差拡散処理の内容も第1ハーフトーン処理(図8)と同様である。この後、kx2,ky2をそれぞれ増して、着目画素を順次ずらしつつ、全画像データについて処理を実行する(ステップS452〜S456)。なお、この処理は、第1ハーフトーン処理とは独立して並行処理される。処理タイミングによっては、CPU81Aが第1ハーフトーン処理のデータ読み込みを実行している間に、CPU82Bは誤差拡散法による2値化を行っているというように、両者の処理内容が異なっている可能性もある。   If it is determined that the binarization should be executed by the processes of steps S442 and S444 in the second halftone process, the CPU 81B executes the binarization of the image data. The contents of the binarization process are the same as the first halftone process. That is, image data is read (step S446), and error diffusion processing is executed (step S448). The contents of the error diffusion process are the same as those in the first halftone process (FIG. 8). Thereafter, kx2 and ky2 are respectively increased, and the processing is executed for all the image data while sequentially shifting the target pixel (steps S452 to S456). This process is performed in parallel with the first halftone process independently of the first halftone process. Depending on the processing timing, there is a possibility that the processing contents of both are different, for example, the CPU 82B performs binarization by the error diffusion method while the CPU 81A reads the data of the first halftone process. There is also.

以上で説明した通り、CPU81A,CPU81Bによりハーフトーン処理が終了すると(図5のステップS400)、CPU81Aは2値化された画像データを出力する(ステップS500)。本実施例では、プリンタ22が出力先となっていることは既に説明した通りである。なお、本実施例では、全ての画像データについてハーフトーン処理が終了した後、データの出力を行うものとしているが、例えば、一つの画素列について処理が終了するごとにデータを出力するものとしても構わない。   As described above, when the halftone processing is completed by the CPU 81A and CPU 81B (step S400 in FIG. 5), the CPU 81A outputs binarized image data (step S500). In this embodiment, as described above, the printer 22 is the output destination. In the present embodiment, data is output after halftone processing has been completed for all image data. However, for example, data may be output every time processing is completed for one pixel column. I do not care.

ここで、本実施例においてCPU81AとCPU81Bの処理タイミングをX方向の画素の幅の半分に相当する分だけずらしている理由について説明する。図8のフローチャートから明らかな通り、誤差拡散法では、拡散誤差補正データCDXに基づいて各画素の2値化を行う。拡散誤差補正データCDXは、各画素の画像データに配分された拡散誤差データを反映させて生成される。従って、各画素に配分される拡散誤差データが確定しない間はその画素の2値化処理を行うことができない。本実施例では、CPU81AとCPU81Bとの処理タイミングをずらすことによって、それぞれ拡散誤差データが確定した画素の並列処理を実現しているのである。   Here, the reason why the processing timing of the CPU 81A and the CPU 81B is shifted by an amount corresponding to half of the width of the pixel in the X direction in this embodiment will be described. As apparent from the flowchart of FIG. 8, in the error diffusion method, each pixel is binarized based on the diffusion error correction data CDX. The diffusion error correction data CDX is generated by reflecting the diffusion error data allocated to the image data of each pixel. Accordingly, the binarization processing of the pixel cannot be performed while the diffusion error data distributed to each pixel is not determined. In the present embodiment, parallel processing of pixels for which diffusion error data is determined is realized by shifting the processing timings of the CPU 81A and the CPU 81B.

誤差拡散法による処理が順次行われていく際の誤差配分の様子を図10〜図12に示す。図中の塗りつぶしの画素がCPU81Aによって処理されている着目画素PPを示している。図中のハッチングを施した画素は着目画素PPから濃度誤差が拡散される画素を示している。着目画素から誤差が配分される領域は図9に示した通りである。図10に示す画素PPを処理しているときは、その画素列の下に隣接する画素列上の画素PQには誤差が拡散される。図10の画素PPについて処理が終了した後、X方向に隣接する画素の処理を実行する際には、図11に示す通り隣接する画素列上の画素PQには誤差は拡散されない。さらに、X方向に隣接する画素の処理を実行する際にも図12に示す通り、隣接する画素列上の画素PQには誤差は拡散されない。図10〜図12から明らかな通り、誤差拡散法により処理が行われている画素列に隣接する画素列上の画素PQに拡散される画素は、図10に示す画素PPの処理が終了した時点で確定する。   FIGS. 10 to 12 show how errors are distributed when processing by the error diffusion method is sequentially performed. The pixel of fill in the figure indicates the target pixel PP being processed by the CPU 81A. The hatched pixels in the figure indicate pixels in which the density error is diffused from the target pixel PP. The area where the error is distributed from the pixel of interest is as shown in FIG. When the pixel PP shown in FIG. 10 is processed, an error is diffused to the pixel PQ on the pixel column adjacent to the pixel column. When the processing for the pixels adjacent in the X direction is executed after the processing for the pixel PP in FIG. 10 is completed, the error is not diffused to the pixels PQ on the adjacent pixel columns as shown in FIG. Furthermore, when executing processing of pixels adjacent in the X direction, as shown in FIG. 12, no error is diffused to the pixels PQ on the adjacent pixel columns. As apparent from FIGS. 10 to 12, the pixel diffused to the pixel PQ on the pixel column adjacent to the pixel column being processed by the error diffusion method is the time when the processing of the pixel PP shown in FIG. 10 is completed. Confirm with.

従って、理論的にはCPU81Aによって図10に示す画素の処理が終了した以降で、CPU81Bによる第2ハーフトーン処理を開始することができる。かかるタイミングでCPU81Bによる処理が開始された場合、両者の処理速度によっては、図10の時点で未だ拡散誤差の確定していない画素PRの処理をCPU81Bが開始してしまう可能性もある。拡散誤差が確定していない状態で2値化の処理を行った場合には、他の画素で生じた濃度誤差を十分に補償し得ず、画質の低下を招く可能性もある。   Therefore, theoretically, the second halftone process by the CPU 81B can be started after the CPU 81A completes the pixel processing shown in FIG. When the processing by the CPU 81B is started at such timing, depending on the processing speed of both, the CPU 81B may start the processing of the pixel PR for which the diffusion error has not yet been determined at the time of FIG. When the binarization process is performed in a state where the diffusion error is not fixed, the density error generated in other pixels cannot be sufficiently compensated, and the image quality may be deteriorated.

本実施例では、こうした画質の低下を招く危険性を回避するため、両者の処理タイミングをNx/2画素に相当する分だけずらしているのである。こうすれば、CPU81AとCPU81Bのうち、いずれのCPUの処理が進んでいる場合でも、両者の処理タイミングは一定量ずれているため、上述した原因による画質の低下を招くことなく安定した処理を実現することができる。   In the present embodiment, in order to avoid such a risk of degrading the image quality, the processing timings of both are shifted by an amount corresponding to Nx / 2 pixels. In this way, even if the processing of any of the CPUs 81A and 81B is progressing, the processing timings of both are shifted by a certain amount, so that stable processing is realized without causing deterioration in image quality due to the cause described above. can do.

本実施例において両者の処理タイミングをNx/2画素に相当する分だけずらしている理由として、誤差バッファの使用方法に基づく理由もある。誤差バッファとは誤差拡散処理(図8)のステップS468において拡散された誤差を一時的に記憶しておくメモリをいう。   In the present embodiment, the reason why both processing timings are shifted by an amount corresponding to Nx / 2 pixels is based on a method of using an error buffer. The error buffer is a memory that temporarily stores the error diffused in step S468 of the error diffusion process (FIG. 8).

本実施例では、先に図2で説明した通り、CPU81AとCPU81Bによる処理の双方で誤差バッファを共有している。本実施例における誤差バッファへの誤差の記憶について図13および図14を用いて説明する。図13は、CPU81A、CPU81Bにより画素PA,PBの2値化が行われている際に誤差が拡散される領域を示している。CPU81Aが画素列ky上の着目画素PAについて2値化処理を実行し、図9に示す配分でそれぞれの画素に誤差を拡散した場合、誤差は図13中に実線で示す領域に拡散される。図13中のA1はCPU81Aの着目画素PAと同じ画素列上に拡散された誤差を意味し、A2は着目画素PAの下側の画素列に拡散された誤差を示している。   In this embodiment, as described above with reference to FIG. 2, the error buffer is shared by both the CPU 81A and the processing by the CPU 81B. The storage of errors in the error buffer according to this embodiment will be described with reference to FIGS. FIG. 13 shows an area where an error is diffused when the pixels PA and PB are binarized by the CPU 81A and CPU 81B. When the CPU 81A executes binarization processing on the pixel of interest PA on the pixel row ky and diffuses an error to each pixel with the distribution shown in FIG. 9, the error is diffused in the region indicated by the solid line in FIG. A1 in FIG. 13 indicates an error diffused on the same pixel column as the pixel of interest PA of the CPU 81A, and A2 indicates an error diffused on the lower pixel column of the pixel of interest PA.

図14は、本実施例で用意されている誤差バッファ内のメモリ領域を画像データに対応した形で示している。破線で示した各マスが画素に対応したメモリ領域を表している。本実施例では、2つの画素列分に相当する誤差バッファ、つまりNx×2画素分のメモリを用意している。図14に示す通り、画素PAから拡散された誤差は、図13中の画素列ky、ky+1と同じ対応関係で誤差バッファに記憶される。   FIG. 14 shows the memory area in the error buffer prepared in this embodiment in a form corresponding to the image data. Each square indicated by a broken line represents a memory area corresponding to a pixel. In this embodiment, an error buffer corresponding to two pixel columns, that is, a memory for Nx × 2 pixels is prepared. As shown in FIG. 14, the error diffused from the pixel PA is stored in the error buffer in the same correspondence relationship as the pixel columns ky and ky + 1 in FIG.

CPU81Bが画素列ky+1上の着目画素PBについて2値化処理を実行した場合、拡散された誤差は、図13中に実線で示す領域に拡散される。図13中のB2はCPU81Bの着目画素PBと同じ画素列ky+1上に拡散された誤差を意味し、B3は着目画素PBの下側の画素列ky+2上に拡散された誤差を示している。CPU81Bにより拡散された誤差は、図14に示す通り誤差バッファに記憶される。画素列ky+1に拡散された誤差は、CPU81Aからの拡散誤差A2を記憶する部分と同じく誤差バッファ内の2番目の画素列に対応するメモリに記憶される。この画素列については、CPU81Aから誤差が拡散された画素とCPU81Bから誤差が拡散された画素とが重複する場合には、両者の総和をメモリに記憶する。   When the CPU 81B executes the binarization process on the pixel of interest PB on the pixel row ky + 1, the diffused error is diffused in the region indicated by the solid line in FIG. B2 in FIG. 13 means an error diffused on the same pixel column ky + 1 as the target pixel PB of the CPU 81B, and B3 indicates an error diffused on the lower pixel column ky + 2 of the target pixel PB. The error diffused by the CPU 81B is stored in the error buffer as shown in FIG. The error diffused to the pixel column ky + 1 is stored in the memory corresponding to the second pixel column in the error buffer, in the same manner as the part storing the diffusion error A2 from the CPU 81A. For this pixel column, if the pixel in which the error is diffused from the CPU 81A and the pixel in which the error is diffused from the CPU 81B overlap, the sum of both is stored in the memory.

画素列ky+2に拡散された誤差は、誤差バッファ内の1番目の画素列に対応するメモリに記憶される。図13において着目画素PAよりも左側の画素は既に2値化が終了した画素であるため、この画素に対応する誤差バッファにCPU81Aから拡散された誤差を記憶する必要はない。従って、本実施例ではこの部分に対応するメモリを、CPU81Bからky+2に拡散された誤差の記憶に利用している。   The error diffused to the pixel column ky + 2 is stored in a memory corresponding to the first pixel column in the error buffer. In FIG. 13, the pixel on the left side of the pixel of interest PA is a pixel that has already been binarized, so there is no need to store the error diffused from the CPU 81A in the error buffer corresponding to this pixel. Therefore, in this embodiment, the memory corresponding to this portion is used for storing the error diffused from the CPU 81B to ky + 2.

本実施例では、CPU81AおよびCPU81Bから誤差が拡散されるky〜ky+2の画素列のうち、最上方に位置する画素列kyと最下方に位置する画素列ky+2に拡散される誤差を同じ画素列に対応するメモリに記憶することによって、誤差バッファの容量を節約している。また、本実施例では、CPU81AとCPU81Bの処理タイミングをNx/2画素に相当する分だけずらすことによって、画素列kyに拡散された誤差と、画素列ky+2に拡散された誤差とが、誤差バッファ内で混同して記憶される可能性を低減している。   In the present embodiment, among the ky to ky + 2 pixel columns in which the error is diffused from the CPU 81A and the CPU 81B, the error diffused to the uppermost pixel column ky and the lowermost pixel column ky + 2 is set to the same pixel column. By storing in the corresponding memory, the capacity of the error buffer is saved. Further, in this embodiment, the error diffused to the pixel column ky and the error diffused to the pixel column ky + 2 are shifted by shifting the processing timing of the CPU 81A and the CPU 81B by an amount corresponding to Nx / 2 pixels. The possibility of being confused and stored within is reduced.

以上で説明した本実施例の画像処理装置によれば、CPU81AとCPU81Bとで並列して2値化を行うことにより、誤差拡散法による高画質なハーフトーン処理を高速で行うことができる。また、誤差が完全に確定した画素についての2値化を並列して行うため、画質を損ねることなく高速化を図ることができる。この際、図14で示した通り、誤差バッファの一部を両CPUで共有することにより、誤差バッファの量を節約することができるとともに、両CPU間で誤差量を伝達し合う必要がなくなるため、さらなる処理の高速化を図ることができる。   According to the image processing apparatus of this embodiment described above, high-quality halftone processing by the error diffusion method can be performed at high speed by performing binarization in parallel with the CPU 81A and the CPU 81B. Further, since binarization is performed in parallel for pixels for which errors are completely determined, it is possible to increase the speed without impairing image quality. At this time, as shown in FIG. 14, by sharing a part of the error buffer between both CPUs, the amount of error buffer can be saved, and it is not necessary to transmit the error amount between both CPUs. Further, it is possible to further speed up the processing.

なお、本実施例においてCPU81A、CPU81Bの処理タイミングをNx/2画素分だけずらしているが、タイミングのずらし量は誤差拡散法による誤差の拡散領域に応じて種々設定可能である。本実施例の図6のフローチャートで示したようにCPU81AとCPU81Bで処理する着目画素の間隔を制御するための処理(図6中のステップS412,S414,S442,S444)によって、誤差が完全に確定していない画素について2値化が行われることを回避可能であれば、両者の処理タイミングのずれをさらに狭くしてもよい。例えば、図11に示す時点ですぐにCPU81Bによる画素PQの処理を開始するものとしてもよい。   In this embodiment, the processing timings of the CPU 81A and CPU 81B are shifted by Nx / 2 pixels, but various timing shift amounts can be set according to the error diffusion region by the error diffusion method. As shown in the flowchart of FIG. 6 of this embodiment, the error is completely determined by the process for controlling the interval between the target pixels processed by the CPU 81A and the CPU 81B (steps S412, S414, S442, and S444 in FIG. 6). If it is possible to avoid binarization of pixels that have not been performed, the difference in processing timing between them may be further narrowed. For example, the processing of the pixel PQ by the CPU 81B may be started immediately at the time shown in FIG.

このように密なタイミングで並列処理を行えば、3つ以上の演算回路を用いた並列処理を実現することも可能である。かかる処理の例を図15に示す。第1の演算回路により画素P1が処理されている際に誤差が拡散される領域をP1eとする。この時点では、画素P2は拡散される誤差が確定しているから、第2の演算回路により画素P2の処理を実行する。画素P2の処理によって誤差が拡散される領域をP2eとする。画素P2の処理がなされれば、画素P3に拡散される誤差が確定しているから、第2の演算回路により画素P3の処理を実行することができる。以下、同様にして第4の演算回路により画素P4の処理、そして更に多くの画素の処理を並列して行うことができる。この場合、並列処理の多重化の程度に応じて処理速度を向上することができる。   If parallel processing is performed at such dense timing, parallel processing using three or more arithmetic circuits can be realized. An example of such processing is shown in FIG. A region where an error is diffused when the pixel P1 is processed by the first arithmetic circuit is defined as P1e. At this time, since the error to be diffused is determined for the pixel P2, the processing of the pixel P2 is executed by the second arithmetic circuit. A region where an error is diffused by processing of the pixel P2 is defined as P2e. If the processing of the pixel P2 is performed, the error diffused to the pixel P3 is determined, and therefore the processing of the pixel P3 can be executed by the second arithmetic circuit. Thereafter, similarly, the fourth arithmetic circuit can process the pixel P4 and more pixels in parallel. In this case, the processing speed can be improved according to the degree of multiplexing of parallel processing.

以上の実施例では、2つのCPU81A,81Bを用いて処理する場合を例にとって説明したが、一方の処理を誤差拡散による2値化を行うための専用の回路によって実現するものとしてもよい。当然、双方を専用回路によって実現するものとしても構わない。   In the above embodiment, the case where processing is performed using two CPUs 81A and 81B has been described as an example. However, one process may be realized by a dedicated circuit for performing binarization by error diffusion. Naturally, both may be realized by a dedicated circuit.

上述の例では、カラーの画像データを例にとって説明したが、単色の画像データについても同様に適用可能であることは当然である。また、上述の例では2値化の処理を例に採って説明したが、3値以上の多値化を行う画像処理に適用することも可能である。   In the above-described example, color image data has been described as an example, but it is naturally applicable to single-color image data as well. In the above example, the binarization process has been described as an example. However, the present invention can also be applied to image processing that performs multilevel conversion of three or more values.

なお、上記画像処理装置はコンピュータ90による処理が主体であるから、かかる処理を実現するためのプログラムを記録した記録媒体としての実施の態様を採ることもできる。このような記憶媒体としては、フレキシブルディスクやCD−ROM、光磁気ディスク、ICカード、ROMカートリッジ、パンチカード、バーコードなどの符号が印刷された印刷物、コンピュータの内部記憶装置(RAMやROMなどのメモリ)および外部記憶装置等の、コンピュータが読取り可能な種々の媒体を利用できる。また、コンピュータに上記で説明した多値化等を行うコンピュータプログラムを通信経路を介して供給するプログラム供給装置としての態様も可能である。   Since the image processing apparatus is mainly processed by the computer 90, an embodiment as a recording medium in which a program for realizing such processing is recorded can be employed. Such storage media include flexible disks, CD-ROMs, magneto-optical disks, IC cards, ROM cartridges, punch cards, printed matter printed with codes such as barcodes, computer internal storage devices (such as RAM and ROM). A variety of computer-readable media can be used, such as memory) and external storage devices. Moreover, the aspect as a program supply apparatus which supplies the computer program which performs multi-value conversion etc. which were demonstrated above to a computer via a communication path is also possible.

以上、本発明の種々の実施例について説明してきたが、本発明はこれらに限定されるものではなく、その要旨を逸脱しない範囲で、種々の形態による実施が可能である。   Although various embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various embodiments can be implemented without departing from the scope of the present invention.

本発明の画像処理装置の概略構成図である。It is a schematic block diagram of the image processing apparatus of this invention. ソフトウェアの構成を示す説明図である。It is explanatory drawing which shows the structure of software. 画像データの形式を示す説明図である。It is explanatory drawing which shows the format of image data. 本実施例において画素を処理する順序について示す説明図である。It is explanatory drawing shown about the order which processes a pixel in a present Example. 本実施例の画像処理ルーチンを示すフローチャートである。It is a flowchart which shows the image processing routine of a present Example. 本実施例のハーフトーン処理ルーチンを示すフローチャートである。It is a flowchart which shows the halftone process routine of a present Example. 本実施例における並列処理の処理タイミングを示す説明図である。It is explanatory drawing which shows the process timing of the parallel processing in a present Example. 本実施例の誤差拡散処理ルーチンを示すフローチャートである。It is a flowchart which shows the error diffusion process routine of a present Example. 本実施例における誤差配分の重み値を示す説明図である。It is explanatory drawing which shows the weight value of error distribution in a present Example. 第1の時点での着目画素と誤差拡散領域との関係を示す説明図である。It is explanatory drawing which shows the relationship between the focused pixel and error diffusion area | region in the 1st time. 第2の時点での着目画素と誤差拡散領域との関係を示す説明図である。It is explanatory drawing which shows the relationship between the focused pixel and error diffusion area | region in the 2nd time. 第3の時点での着目画素と誤差拡散領域との関係を示す説明図である。It is explanatory drawing which shows the relationship between the focused pixel and error diffusion area | region in the 3rd time. 並列処理による誤差拡散領域の関係を示す説明図である。It is explanatory drawing which shows the relationship of the error diffusion area | region by parallel processing. 誤差バッファにおける拡散誤差の記憶の様子を示す説明図である。It is explanatory drawing which shows the mode of the memory | storage of the diffusion error in an error buffer. 4重化の並列処理の様子を示す説明図である。It is explanatory drawing which shows the mode of quadruple parallel processing.

符号の説明Explanation of symbols

12…スキャナ
14…キーボード
15…CD−ROMドライブ
16…ハードディスク
18…モデム
21…カラーディスプレイ
22…カラープリンタ
80…バス
81…CPU
82…ROM
83…RAM
84…入力インターフェイス
85…出力インタフェース
86…CRTC
87…ディスクコントローラ(DDC)
88…シリアル入出力インタフェース(SIO)
90…パーソナルコンピュータ
100…プリンタドライバ
102…入力部
104…レンダリング部
106…色補正部
110…ハーフトーン処理部
112…第1誤差拡散部
114…第2誤差拡散部
116…誤差バッファ
120…出力部
DESCRIPTION OF SYMBOLS 12 ... Scanner 14 ... Keyboard 15 ... CD-ROM drive 16 ... Hard disk 18 ... Modem 21 ... Color display 22 ... Color printer 80 ... Bus 81 ... CPU
82 ... ROM
83 ... RAM
84 ... Input interface 85 ... Output interface 86 ... CRTC
87: Disk controller (DDC)
88 ... Serial I / O interface (SIO)
90 ... personal computer 100 ... printer driver 102 ... input unit 104 ... rendering unit 106 ... color correction unit 110 ... halftone processing unit 112 ... first error diffusion unit 114 ... second error diffusion unit 116 ... error buffer 120 ... output unit

Claims (4)

各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行う画像処理装置であって、
第1の方向および第2の方向に2次元的に配列された画像データを入力する入力手段と、
未だ多値化されていない未処理の画素を、前記第1の方向に並ぶ画素列に沿って順に、少なくとも前記第2の方向に隣接する画素列に濃度誤差を拡散する誤差拡散法により多値化を行う2つの多値化手段であって、前記2つの多値化手段の一方により多値化が行われる画素列と前記2つの多値化手段の他方により多値化が行われる画素列とが前記第2の方向に沿って互いに隣接する関係を保ちつつ、互いに並行して、互いに独立して、多値化を行う、2つの多値化手段とを備え、
前記画像データは前記第1の方向にNx個(Nxは2以上の整数)の画素を有するデータであり、
前記2つの多値化手段の一方であって前記第2の方向の座標がより小さい画素列についての多値化を行う多値化手段である先行多値化手段は、前記第2の方向の座標がYからY+n−1(Y,nは自然数で、Yは前記先行多値化手段の処理対象画素を含む画素列の座標以上)までのn本の画素列上の未処理の画素に濃度誤差を拡散
前記2つの多値化手段の一方であって前記第2の方向の座標がより大きい画素列についての多値化を行う多値化手段である後続多値化手段は、前記第2の方向の座標がY+1からY+nまでのn本の画素列上の未処理の画素に濃度誤差を拡散すると共に、他の画素から拡散される濃度誤差が完全に確定した画素で、かつ、当該画素の多値化により生じる誤差が前記第2の方向の座標がY+nの画素列に拡散される領域と前記先行多値化手段により前記第2の方向の座標がYの画素列に濃度誤差が拡散される領域との前記第1の方向の位置が重複しない画素を処理
前記画像処理装置は、さらに、
それぞれNx個の誤差を記憶可能なn本のメモリ列を含むメモリと、
前記第2の方向の座標がY+1からY+n−1までのn−1本の画素列のそれぞれに拡散された濃度誤差を、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、前記n本のメモリ列の内の1つに記憶すると共に、前記第2の方向の座標がYの画素列とY+nの画素列とに拡散された濃度誤差を、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、前記n本のメモリ列の内の残りの1つに記憶する記憶手段とを備える、画像処理装置。
An image processing apparatus that multi-values input image data by an error diffusion method that diffuses density errors that occur when multi-valued each pixel to surrounding pixels that have not yet been multi-valued.
Input means for inputting image data arranged two-dimensionally in a first direction and a second direction;
An unprocessed pixel that has not yet been converted into multiple values is converted into multiple values by an error diffusion method that diffuses a density error to at least pixel columns adjacent in the second direction in order along the pixel columns arranged in the first direction. Two multi-value conversion means for performing conversion, a pixel array that is multi-valued by one of the two multi-value conversion means and a pixel array that is multi-valued by the other of the two multi-value conversion means And two multi-value conversion means for performing multi-value conversion independently of each other in parallel with each other while maintaining a relationship adjacent to each other along the second direction ,
The image data is data having Nx pixels (Nx is an integer of 2 or more) in the first direction,
The preceding multi-value conversion means, which is one of the two multi-value conversion means and performs multi-value conversion for a pixel column having a smaller coordinate in the second direction, coordinates Y or we Y + n-1 (Y, n is a natural number, Y coordinates or pixel columns including pixel to be processed in the preceding multi-value conversion means) to unprocessed pixels on the n pixel columns to to diffuse the concentration error,
Subsequent multi-value conversion means, which is one of the two multi-value conversion means and performs multi-value conversion for a pixel column having a larger coordinate in the second direction, coordinate at pixel n to unprocessed pixels on the pixel row with diffusing the density error, density error diffused from other pixels is completely determined between Y + 1 or et Y + n, and the the errors caused by multi-level pixel second direction coordinate density error to the pixel rows of the second direction coordinate Y by region and the prior multi-level means to be diffused to the pixel columns of the Y + n is position of the first direction of the area to be spread processes the pixels that do not overlap,
The image processing apparatus further includes:
A memory including n memory columns each capable of storing Nx errors ;
Wherein the position is the concentration error diffusion to each, along the first direction of each pixel of the n-1 pieces of pixel columns in the second direction coordinate Y + 1 or et Y + n-1 or memory The density error in which the coordinates in the second direction are diffused into the Y pixel column and the Y + n pixel column are stored in one of the n memory columns in correspondence with the position in the column. An image processing apparatus comprising: storage means for storing a position along each of the pixels in the first direction and a position in the memory column in correspondence with the remaining one of the n memory columns. .
請求項1記載の画像処理装置であって、
前記2つの多値化手段のそれぞれの処理対象画素は、前記第1の方向に前記画素列の幅の約半分の間隔を有している位置関係にある画像処理装置。
The image processing apparatus according to claim 1,
Each of the processing target pixels of the two multi-value conversion means is an image processing apparatus having a positional relationship in which the interval in the first direction is about half the width of the pixel column.
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行う画像処理方法であって、
(a)第1の方向および第2の方向に2次元的に配列された画像データを入力する工程と、
(b)未だ多値化されていない未処理の画素を、前記第1の方向に並ぶ画素列に沿って順に、少なくとも前記第2の方向に隣接する画素列に濃度誤差を拡散する誤差拡散法により多値化を行う2つの多値化工程であって、前記2つの多値化工程の一方において多値化が行われる画素列と前記2つの多値化工程の他方において多値化が行われる画素列とが前記第2の方向に沿って互いに隣接する関係を保ちつつ、互いに並行して、互いに独立して、多値化を行う、2つの多値化工程とを備え、
前記2つの多値化工程の一方であって前記第2の方向の座標がより小さい画素列についての多値化を行う多値化工程である先行多値化工程は、前記第2の方向の座標がYからY+n−1(Y,nは自然数で、Yは前記先行多値化工程の処理対象画素を含む画素列の座標以上)までのn本の画素列上の未処理の画素に濃度誤差を拡散する工程であり、
前記2つの多値化工程の一方であって前記第2の方向の座標がより大きい画素列についての多値化を行う多値化工程である後続多値化工程は、前記第2の方向の座標がY+1からY+nまでのn本の画素列上の未処理の画素に濃度誤差を拡散する工程であると共に、他の画素から拡散される濃度誤差が完全に確定した画素で、かつ、当該画素の多値化により生じる誤差が前記第2の方向の座標がY+nの画素列に拡散される領域と前記先行多値化工程において前記第2の方向の座標がYの画素列に濃度誤差が拡散される領域との前記第1の方向の位置が重複しない画素を処理する工程であり、
前記画像処理方法は、さらに、
(c)それぞれNx個の誤差を記憶可能なn本のメモリ列を含むメモリを準備する工程と、
(d)前記第2の方向の座標がY+1からY+n−1までのn−1本の画素列のそれぞれに拡散された濃度誤差を、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、前記n本のメモリ列の内の1つに記憶すると共に、前記第2の方向の座標がYの画素列とY+nの画素列とに拡散された濃度誤差を、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、前記n本のメモリ列の内の残りの1つに記憶する記憶工程とを備える、画像処理方法。
An image processing method that multi-values input image data by an error diffusion method that diffuses density errors that occur when each pixel is multi-valued to surrounding pixels that have not yet been multi-valued.
(A) inputting image data arranged two-dimensionally in a first direction and a second direction;
(B) An error diffusion method in which unprocessed pixels that have not yet been multi-valued are sequentially diffused along at least the pixel columns adjacent in the second direction along the pixel columns arranged in the first direction. Are two multi-value conversion processes for multi-value conversion, wherein the multi-value conversion is performed in one of the two multi-value conversion processes and the other of the two multi-value conversion processes. And two multi-value conversion steps for performing multi-value conversion independently of each other in parallel with each other while maintaining a relationship in which the pixel columns are adjacent to each other along the second direction ,
The preceding multi-value conversion step, which is one of the two multi-value conversion steps and performs multi-value conversion for a pixel column having a smaller coordinate in the second direction, The density of unprocessed pixels on n pixel columns with coordinates from Y to Y + n−1 (Y, n are natural numbers, and Y is equal to or greater than the coordinates of the pixel column including the pixel to be processed in the preceding multi-value conversion step) A process of diffusing errors,
The subsequent multi-value process, which is one of the two multi-value processes and is a multi-value process for performing multi-value processing on a pixel column having a larger coordinate in the second direction, This is a step of diffusing density error to unprocessed pixels on n pixel columns whose coordinates are Y + 1 to Y + n, and a pixel in which the density error diffused from other pixels is completely determined, and the pixel A density error is diffused in a region where the error caused by the multi-value conversion is diffused to the pixel column whose second direction coordinate is Y + n and in the preceding multi-value conversion step, the pixel direction whose second direction coordinate is Y A step of processing a pixel whose position in the first direction with a region to be overlapped does not overlap,
The image processing method further includes:
(C) preparing a memory including n memory columns each capable of storing Nx errors;
(D) The density error diffused in each of the n−1 pixel columns in which the coordinates in the second direction are Y + 1 to Y + n−1, and the position of each pixel along the first direction and the memory The density error in which the coordinates in the second direction are diffused into the Y pixel column and the Y + n pixel column are stored in one of the n memory columns in correspondence with the position in the column. An image processing method comprising: a storing step of storing a position along each of the pixels in the first direction and a position in the memory column in association with each other in the remaining one of the n memory columns. .
各画素を多値化した際に生じる濃度誤差を未だ多値化されていない周辺の画素に拡散する誤差拡散法により、入力された画像データの多値化を行うためのプログラムをコンピュータ読みとり可能に記録した記録媒体であって、
第1の方向および第2の方向に2次元的に配列された画像データを入力する機能と、
未だ多値化されていない未処理の画素を、前記第1の方向に並ぶ画素列に沿って順に、少なくとも前記第2の方向に隣接する画素列に濃度誤差を拡散する誤差拡散法により多値化を行う2つの多値化機能であって、前記2つの多値化機能の一方により多値化が行われる画素列と前記2つの多値化機能の他方により多値化が行われる画素列とが前記第2の方向に沿って互いに隣接する関係を保ちつつ、互いに並行して、互いに独立して、多値化を行う、2つの多値化機能とを実現するプログラムを記録し、
前記画像データは前記第1の方向にNx個(Nxは2以上の整数)の画素を有するデータであり、
前記2つの多値化機能の一方であって前記第2の方向の座標がより小さい画素列についての多値化を行う多値化機能である先行多値化機能は、前記第2の方向の座標がYからY+n−1(Y,nは自然数で、Yは前記先行多値化機能の処理対象画素を含む画素列の座標以上)までのn本の画素列上の未処理の画素に濃度誤差を拡散し、
前記2つの多値化機能の一方であって前記第2の方向の座標がより大きい画素列についての多値化を行う多値化機能である後続多値化機能は、前記第2の方向の座標がY+1からY+nまでのn本の画素列上の未処理の画素に濃度誤差を拡散すると共に、他の画素から拡散される濃度誤差が完全に確定した画素で、かつ、当該画素の多値化により生じる誤差が前記第2の方向の座標がY+nの画素列に拡散される領域と前記先行多値化機能により前記第2の方向の座標がYの画素列に濃度誤差が拡散される領域との前記第1の方向の位置が重複しない画素を処理し、
前記記録媒体は、さらに、
前記第2の方向の座標がY+1からY+n−1までのn−1本の画素列のそれぞれに拡散された濃度誤差を、それぞれNx個の誤差を記憶可能なn本のメモリ列の内の1つに、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、記憶すると共に、前記第2の方向の座標がYの画素列とY+nの画素列とに拡散された濃度誤差を、各画素の前記第1の方向に沿った位置と前記メモリ列における位置とを対応させて、前記n本のメモリ列の内の残りの1つに記憶する記憶機能を実現するプログラムを記録する、記録媒体。
A computer-readable program for multi-valued input image data can be obtained by an error diffusion method that diffuses density errors that occur when each pixel is multi-valued to surrounding pixels that have not yet been multi-valued. A recorded recording medium,
A function of inputting image data arranged two-dimensionally in a first direction and a second direction;
An unprocessed pixel that has not yet been converted into multiple values is converted into multiple values by an error diffusion method that diffuses a density error to at least pixel columns adjacent in the second direction in order along the pixel columns arranged in the first direction. A pixel array that is multi-valued by one of the two multi-value functions and a pixel array that is multi-valued by the other of the two multi-value functions And a program that realizes two multi-value conversion functions for performing multi-value conversion in parallel with each other while maintaining a relationship adjacent to each other along the second direction ,
The image data is data having Nx pixels (Nx is an integer of 2 or more) in the first direction,
The preceding multi-valued function, which is one of the two multi-valued functions and performs multi-valued processing for a pixel column having a smaller coordinate in the second direction, The density of unprocessed pixels on n pixel columns from Y to Y + n−1 (Y, n are natural numbers, and Y is equal to or greater than the coordinate of the pixel column including the processing target pixel of the preceding multi-value conversion function) Diffuse error,
The subsequent multi-valued function, which is one of the two multi-valued functions and performs multi-valued processing for a pixel column having a larger coordinate in the second direction, A pixel in which density errors are diffused to unprocessed pixels on n pixel columns with coordinates Y + 1 to Y + n, density errors diffused from other pixels are completely determined, and the pixel has multiple values An area where the error caused by the conversion is diffused into the pixel column whose coordinates in the second direction are Y + n and a region where the density error is diffused into the pixel line where the coordinates in the second direction are Y by the preceding multi-value quantization function And the pixels in which the positions in the first direction do not overlap ,
The recording medium further includes:
The density error diffused in each of the n−1 pixel columns whose coordinates in the second direction are Y + 1 to Y + n−1 is one of n memory columns that can store Nx errors. Second, the position of each pixel in the first direction and the position in the memory column are stored in correspondence with each other, and the coordinate in the second direction is a pixel column having Y and a pixel column having Y + n. A storage function for storing the diffused density error in the remaining one of the n memory columns by associating the position of each pixel in the first direction with the position in the memory column; A recording medium for recording a program to be realized.
JP2005029140A 2005-02-04 2005-02-04 Image processing apparatus, processing method, and recording medium Expired - Fee Related JP4096949B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005029140A JP4096949B2 (en) 2005-02-04 2005-02-04 Image processing apparatus, processing method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005029140A JP4096949B2 (en) 2005-02-04 2005-02-04 Image processing apparatus, processing method, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP30946298A Division JP3963598B2 (en) 1998-10-14 1998-10-14 Image processing apparatus, processing method, and recording medium

Publications (2)

Publication Number Publication Date
JP2005143140A JP2005143140A (en) 2005-06-02
JP4096949B2 true JP4096949B2 (en) 2008-06-04

Family

ID=34698238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005029140A Expired - Fee Related JP4096949B2 (en) 2005-02-04 2005-02-04 Image processing apparatus, processing method, and recording medium

Country Status (1)

Country Link
JP (1) JP4096949B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10757297B2 (en) 2018-10-15 2020-08-25 Seiko Epson Corporation Image processing apparatus, image processing method, and printing apparatus

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5112386B2 (en) * 2008-06-05 2013-01-09 株式会社東芝 Image processing apparatus and image processing method
JP5222797B2 (en) 2009-06-08 2013-06-26 京セラドキュメントソリューションズ株式会社 Image processing device
JP6464826B2 (en) * 2015-03-03 2019-02-06 セイコーエプソン株式会社 Image processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10757297B2 (en) 2018-10-15 2020-08-25 Seiko Epson Corporation Image processing apparatus, image processing method, and printing apparatus

Also Published As

Publication number Publication date
JP2005143140A (en) 2005-06-02

Similar Documents

Publication Publication Date Title
JP4669249B2 (en) Inkjet recording method, inkjet recording system, and inkjet recording apparatus
JP3963598B2 (en) Image processing apparatus, processing method, and recording medium
JP4096949B2 (en) Image processing apparatus, processing method, and recording medium
JP5127626B2 (en) Image processing apparatus and image processing method
JP5225106B2 (en) Image processing apparatus and image processing method
JP6184115B2 (en) Image processing method and image processing apparatus
JP2009194450A (en) Image processing apparatus, image processing method, and computer program
JP2010130303A (en) Print controller, printing apparatus, print control method, and computer program
JP4274030B2 (en) Image output system, image processing apparatus, image output apparatus, and methods thereof
JP4785351B2 (en) Inkjet recording apparatus, inkjet recording method, data generation apparatus, and program
JP4484505B2 (en) Inkjet recording system, determination apparatus and program
JP4561049B2 (en) Printing system for printing an image based on information on the number of dots formed in a predetermined area
JP4228814B2 (en) Printing method for printing images while processing multiple rasters in parallel
JP2006051696A (en) Printing controller, printer, printing control method, program and data structure
JP6259951B2 (en) Image forming method
JP3823859B2 (en) Image processing apparatus for converting image data in units of multiple pixels
JP4453782B2 (en) Image processing apparatus for processing a plurality of rasters in parallel
JP2008167468A (en) Image processor for processing a plurality of rasters in parallel
JP4409883B2 (en) Image printing device
JP2006229428A (en) Image-formation controller, quantization method and printer device
JP2005295131A (en) Apparatus, method, and program for processing image
JP2004080480A (en) Image processing device for processing a plurality of rasters in parallel
JP4581775B2 (en) Printing device
JP3972875B2 (en) Image processing apparatus for converting image data in units of multiple pixels
JP4013855B2 (en) Image processing apparatus for converting image data in units of multiple pixels

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070814

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071012

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080303

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120321

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120321

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130321

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140321

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees