CN1691741A - Image processing device, printing control device, image processing method - Google Patents
Image processing device, printing control device, image processing method Download PDFInfo
- Publication number
- CN1691741A CN1691741A CN 200510007912 CN200510007912A CN1691741A CN 1691741 A CN1691741 A CN 1691741A CN 200510007912 CN200510007912 CN 200510007912 CN 200510007912 A CN200510007912 A CN 200510007912A CN 1691741 A CN1691741 A CN 1691741A
- Authority
- CN
- China
- Prior art keywords
- pixel
- raster
- mentioned
- grating
- error
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims description 172
- 238000007639 printing Methods 0.000 title claims description 41
- 238000003672 processing method Methods 0.000 title claims description 17
- 238000006243 chemical reaction Methods 0.000 claims abstract description 99
- 238000003860 storage Methods 0.000 claims abstract description 76
- 230000015572 biosynthetic process Effects 0.000 claims description 249
- 238000009792 diffusion process Methods 0.000 claims description 216
- 238000000034 method Methods 0.000 abstract description 110
- 230000008569 process Effects 0.000 abstract description 62
- 239000011159 matrix material Substances 0.000 description 65
- 239000000872 buffer Substances 0.000 description 59
- 239000000976 ink Substances 0.000 description 59
- 238000010586 diagram Methods 0.000 description 34
- 238000012937 correction Methods 0.000 description 26
- 230000002093 peripheral effect Effects 0.000 description 22
- 230000006870 function Effects 0.000 description 19
- 230000007480 spreading Effects 0.000 description 13
- 238000003892 spreading Methods 0.000 description 13
- 230000004048 modification Effects 0.000 description 11
- 238000012986 modification Methods 0.000 description 11
- 239000003086 colorant Substances 0.000 description 7
- 230000001131 transforming effect Effects 0.000 description 7
- 230000009466 transformation Effects 0.000 description 6
- 238000003491 array Methods 0.000 description 4
- 240000008168 Ficus benjamina Species 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000000593 degrading effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000004904 shortening Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 229910052775 Thulium Inorganic materials 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 230000002542 deteriorative effect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000009432 framing Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000000843 powder Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
Description
本申请是下述申请的分案申请:This application is a divisional application of:
发明名称:图象处理装置、印刷控制装置、图象处理方法和记录媒体Title of Invention: Image processing device, printing control device, image processing method and recording medium
申请日:2001年10月5日Application date: October 5, 2001
申请号:01803036.X(PCT/JP01/08837)Application number: 01803036.X (PCT/JP01/08837)
技术领域
本发明涉及变换用构成图像的多个像素的色调值表现的图像数据的技术,详细而言,就是涉及将该图像数据变换为根据有无关于各像素的点的形成的表现形式的图像数据的技术。The present invention relates to a technique for converting image data represented by tone values of a plurality of pixels constituting an image, and specifically relates to converting the image data into image data in an expression form based on whether or not dots are formed for each pixel. technology.
背景技术 Background technique
通过在印刷媒体或液晶画面这样的显示媒体上形成点来表现图像的图像显示装置,广泛地作为各种图像机器的输出装置使用。这样的图像显示装置只能局部地表现是否形成点的某种状态,但是,根据图像的色调值适当地控制点的形成密度,便可表现色调连续变化的图像。An image display device that expresses an image by forming dots on a display medium such as a printing medium or a liquid crystal screen is widely used as an output device of various image devices. Such an image display device can only partially express a certain state of whether or not dots are formed, but by appropriately controlling the formation density of dots according to the tone value of the image, an image with continuously changing tone can be expressed.
在这样的图像显示装置中,为了根据图像的色调值以适当的密度形成点,用于对各像素判断有无点形成的方法有例如称为误差扩散法的方法和在数学上与其等价的称为平均误差最小法的方法等。In such an image display device, in order to form dots at an appropriate density according to the tone value of the image, methods for judging the presence or absence of dot formation for each pixel include, for example, a method called the error diffusion method and a mathematically equivalent method. A method called the method of minimizing the average error, etc.
称为误差扩散法的方法将对目的像素形成点或不形成点而发生的色调表现的误差预先向目的像素周边的未判断像素扩散并进行存储,在判断有无对未判断像素的点形成时,判断有无点形成,用以消除从周边像素扩散来的误差。另外,称为平均误差最小法的方法不预先将通过有无点形成的判断而发生的色调表现的误差向周边像素扩散而存储到目的像素,代之以在判断有无对未判断像素的点形成时,读出周边像素存储的误差,判断有无对目的像素的点形成,用以抵消这些误差。The method called the error diffusion method diffuses and stores the color tone expression error caused by the formation or non-formation of dots on the target pixel to unjudged pixels around the target pixel in advance, and when judging whether or not to form dots on unjudged pixels , to judge whether there is dot formation, to eliminate the error diffused from surrounding pixels. In addition, the method called the method of minimum average error does not diffuse the color tone expression error generated by the judgment of the presence or absence of dots to the surrounding pixels in advance and store it in the target pixel, but replaces it with the dot of the non-judged pixel in the judgment of the presence or absence of the dot. When forming, read out the errors stored in the surrounding pixels, and judge whether there is dot formation for the target pixel, so as to offset these errors.
在这些方法中,由于图像由大量的像素构成,所以,不可能同时对全部像素进行有无点形成的判断。另一方面,图像数据根据扫描原图像而生成的关系是按照通过扫描而得到的像素的列(称为光栅)的顺序供给的。根据这些理由,有无点形成的判断就沿着构成图像的光栅进行。即,从位于光栅的端部的像素开始顺序进行有无点形成的判断,如果有无该光栅上的全部像素的判断结束了,就开始进行相邻的光栅的处理。在这样的方法中,即使在图像上是相互相邻的像素,属于不同的光栅的像素也不能连续地进行处理,所以,预先将通过点形成判断而发生的色调表现的误差存储到误差缓冲器中,在需要时从误差缓冲器中读出使用。这样,通过反映在周边像素中发生的色调表现的误差,并判断有无点形成用以消除误差,便可以与图像的色调值相应的适当的密度形成点,结果,便可在图像显示装置上显示高画质的图像。In these methods, since an image is composed of a large number of pixels, it is impossible to judge whether or not dots are formed for all pixels at the same time. On the other hand, image data is supplied in the order of columns of pixels obtained by scanning (referred to as a raster) based on a relationship generated by scanning an original image. For these reasons, whether or not dots are formed is judged along the rasters constituting the image. That is, the presence or absence of dot formation is judged sequentially from the pixels located at the ends of the raster, and when the judgment of the presence or absence of all pixels on the raster is completed, the processing of the adjacent raster is started. In such a method, even if the pixels are adjacent to each other on the image, the pixels belonging to different rasters cannot be processed consecutively. Therefore, the error in tone expression generated by the dot formation judgment is stored in the error buffer in advance. , read from the error buffer for use when needed. In this way, by reflecting the error in tone expression that occurs in peripheral pixels, and judging whether there is dot formation to eliminate the error, it is possible to form dots at an appropriate density corresponding to the tone value of the image. As a result, it can be displayed on the image display device Displays high-quality images.
但是,在这样的方法中,必须频繁地将每次进行有无点形成的判断时发生的色调表现的误差向误差缓冲器中读写,从而不能迅速地进行有无点形成的判断。即,在误差扩散法中,每次判断有无点形成时必须将应向周边像素扩散的扩散误差写入误差缓冲器,或者,在平均误差最小法中,每次判断有无点形成时必须将在周边像素中发生的色调表现的误差从误差缓冲器中读出,不论哪种情况,都要对误差缓冲器频繁地进行读写,从而判断有无点形成都需要一定的时间。如果判断有无点形成需要一定的时间,就难于迅速地显示图像。However, in such a method, it is necessary to frequently read and write an error in color tone expression that occurs every time the presence or absence of dots is determined, and thus cannot quickly determine the presence or absence of dots. That is, in the error diffusion method, the diffusion error that should be diffused to the surrounding pixels must be written into the error buffer every time it is judged whether or not a dot is formed, or in the average error minimum method, it must be read every time whether or not a dot is formed. In any case, errors in color tone expression generated in peripheral pixels are read out from the error buffer. In any case, reading and writing to the error buffer is frequently performed, and it takes a certain amount of time to determine whether or not dots are formed. If it takes a certain amount of time to judge whether or not dots are formed, it is difficult to quickly display an image.
发明内容Contents of the invention
本发明就是为了解决先有技术中的上述问题而提案的,目的旨在提供通过不招致画质恶化而缩短判断有无点形成所需要的时间从而可以迅速地显示高画质的图像的技术。The present invention is proposed to solve the above-mentioned problems in the prior art, and an object thereof is to provide a technology capable of rapidly displaying a high-quality image by shortening the time required for judging the presence or absence of dot formation without degrading the image quality.
为了解决上述问题的至少一部分,本发明的第图象处理装置采用以下的结构。即,本发明是一种接收表示各像素的色调值的图像数据并通过沿着该像素的列的光栅判断在构成该光栅的各像素中有无点形成而将该图像数据变换为有无点形成的表现形式的图象处理装置,其特征在于:具有光栅群生成单元、最末尾光栅变换单元、第1误差扩散单元、开头光栅变换单元、第2误差扩散单元和其余光栅变换单元,光栅群生成单元将相互相邻的多条光栅集合起来生成光栅群;最末尾光栅变换单元选择位于上述光栅群中最末尾的最末尾光栅并通过对构成该最末尾光栅的各像素判断有无点形成而将该最末尾光栅变换为表示有无点形成的点列;第1误差扩散单元对构成上述最末尾光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差并向位于该各像素的周边的多个未判断的像素扩散;开头光栅变换单元选择位于与上述最末尾光栅相邻的光栅群中开头位置的开头光栅并通过考虑从该最末尾光栅向该开头光栅的各像素扩散的上述色调误差而对构成该开头光栅的各像素判断有无点形成,将该开头光栅变换为表示有无点形成的点列;第2误差扩散单元将在构成上述开头光栅的各像素中发生的上述色调误差向位于该各像素的周边的未判断的像素扩散;其余光栅变换单元通过对从上述光栅群中除了上述开头光栅的其余光栅考虑从属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素扩散的上述色调误差并判断该其余光栅的各像素有无点形成而与将该开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列,上述第1误差扩散单元和上述第2误差扩散单元是将向与判断上述有无点形成的像素不同的光栅群的像素扩散的误差存储到第1误差存储部而将向与判断有无该点形成的像素相同的光栅群的像素扩散的误差存储到第2误差存储部的单元。In order to solve at least part of the above problems, the image processing apparatus of the present invention adopts the following configuration. That is, the present invention is a method of receiving image data representing the tone value of each pixel and converting the image data into dot presence or absence by judging whether or not dots are formed in each pixel constituting the raster through a raster along the column of the pixels. The image processing device of the form of expression formed is characterized in that: it has a grating group generation unit, a last grating transformation unit, a first error diffusion unit, a beginning raster transformation unit, a second error diffusion unit and the remaining grating transformation units, the grating group The generating unit assembles a plurality of adjacent gratings to generate a grating group; the last grating transformation unit selects the last grating located at the end of the above-mentioned grating group and determines whether or not dots are formed on each pixel constituting the last grating. The last raster is converted into a dot sequence indicating whether or not dots are formed; the first error diffusion unit calculates the color tone error that occurs in each pixel by judging the presence or absence of dots for each pixel constituting the last raster, and transfers it to the A plurality of undetermined pixels in the periphery of each pixel spread; the head raster conversion unit selects the head grating at the head position in the grating group adjacent to the above-mentioned last grating and considers the positions from the last grating to the first grating. The above-mentioned hue error of pixel diffusion is used to determine whether dots are formed in each pixel constituting the head raster, and the head raster is converted into a dot row indicating whether dots are formed; The above-mentioned color tone error that occurs in the above-mentioned raster group is diffused to the undetermined pixels located in the periphery of each pixel; the rest of the raster conversion unit considers that the rest of the raster group except the above-mentioned head raster belongs to the same grating group as the rest of the raster group and Having judged the above-mentioned hue error of pixel diffusion with or without dot formation and judging the presence or absence of dot formation in each pixel of the remaining rasters and converting the remaining rasters into dot columns in parallel with the process of converting the first raster into the above-mentioned dot columns, The above-mentioned first error diffusion unit and the above-mentioned second error diffusion unit store the error diffused to the pixels of the raster group different from the pixel for judging the presence or absence of the dot formation in the first error storage part, and then transfer the errors to and to judge whether or not the dot is formed. The pixel diffusion error of the formed grating group with the same pixel is stored in the cell of the second error storage unit.
另外,与上述第1图象处理装置对应的本发明的第1图象处理方法是接收表示各像素的色调值的图像数据并通过沿着该像素的列的光栅判断在构成该光栅的各像素中有无点形成而将该图像数据变换为有无点形成的表现形式的图象处理方法,其特征在于:包括以下步骤,即In addition, the first image processing method of the present invention corresponding to the above-mentioned first image processing device is to receive image data representing the tone value of each pixel, and judge whether each pixel constituting the raster has An image processing method for converting the image data into a form of expression with or without dot formation in the presence or absence of dots, characterized in that it comprises the following steps, namely
(A)将相互相邻的多条光栅集合起来生成光栅群的步骤;(A) the step of combining a plurality of gratings adjacent to each other to generate a grating group;
(B)选择位于上述光栅群中最末尾的最末尾光栅并通过对构成该最末尾光栅的各像素判断有无点形成而将该最末尾光栅变换为表示有无点形成的点列的步骤;(B) selecting the last grating located at the end of the grating group, and converting the last grating into a dot column indicating whether or not dots are formed by judging whether or not dots are formed on each pixel constituting the last grating;
(C)对构成上述最末尾光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差并向位于该各像素的周边的多个未判断的像素扩散的步骤;(C) calculating, for each pixel constituting the last raster, a color tone error generated in each pixel by judging the presence or absence of dot formation, and spreading to a plurality of unjudged pixels located around the respective pixels;
(D)选择位于与上述最末尾光栅相邻的光栅群中开头位置的开头光栅并通过考虑从该最末尾光栅向该开头光栅的各像素扩散的上述色调误差而对构成该开头光栅的各像素判断有无点形成,将该开头光栅变换为表示有无点形成的点列的步骤;(D) Select the head grating located at the head position of the grating group adjacent to the last grating, and calculate the color difference for each pixel constituting the head grating by considering the above-mentioned hue error diffused from the last grating to each pixel of the head grating. A step of judging whether dots are formed, and transforming the beginning raster into a dot column indicating whether dots are formed;
(E)将在构成上述开头光栅的各像素中发生的上述色调误差向位于该各像素的周边的未判断的像素扩散的步骤;(E) a step of diffusing the color tone error occurring in each pixel constituting the first raster to undetermined pixels located around the respective pixels;
(F)通过对从上述光栅群中除了上述开头光栅的其余光栅考虑从属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素扩散的上述色调误差并判断该其余光栅的各像素有无点形成而与将该开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列的步骤;(F) By considering the above-mentioned tone error of the diffusion of pixels belonging to the same grating group as the remaining grating group and judging whether or not the dots are formed, and judging each of the remaining gratings except the first grating the step of converting the remaining rasters into dot trains in parallel with the process of converting the beginning raster into dot trains with or without dot formation in pixels;
上述步骤(C)和上述步骤(E)是将向与判断上述有无点形成的像素不同的光栅群的像素扩散的误差存储到第1误差存储部而将向与判断有无该点形成的像素相同的光栅群的像素扩散的误差存储到第2误差存储部的步骤。The above-mentioned step (C) and the above-mentioned step (E) store the error diffused to the pixel of the grating group different from the pixel for judging the presence or absence of the dot formation in the first error storage part, and store the error for judging whether or not the dot is formed. The step of storing the pixel diffusion error of the raster group with the same pixel in the second error storage unit.
在这样的第1图象处理装置和图象处理方法中,以由指定条数的相邻的光栅构成的光栅群为单位,通过对构成该光栅群的各光栅判断有无各像素的点形成而将各光栅变换为点列。这里,在将通过有无点形成的判断而发生的色调误差向周边的未判断像素扩散时,将向属于与发生该色调误差的判断像素相同的光栅群的像素扩散的误差和向与该判断像素不同的光栅群的像素扩散的误差有区别地存储。对开头光栅,读出从相邻的光栅群的像素扩散来的并已存储的色调误差,通过判断有无点形成而将该开头光栅变换为点列。另一方面,对上述其余光栅,考虑从属于与该位于光栅相同的光栅群并且已判断了有无点形成的像素扩散来的并已存储的色调误差,通过判断有无点形成,与将该开头光栅变换为上述点列的处理平行地将该其余光栅变换点列。In such a first image processing device and image processing method, in units of a grating group constituted by a specified number of adjacent gratings, it is determined whether or not dots of each pixel are formed by each grating constituting the grating group. Instead, each raster is transformed into a point column. Here, when the color tone error generated by the judgment of the presence or absence of dot formation is diffused to the surrounding unjudged pixels, the sum of the error diffused to the pixels belonging to the same raster group as the judging pixel in which the color tone error occurred is distributed to the pixels related to the judging pixel. The errors of the pixel spread of different raster groups of pixels are stored differently. For the first raster, the color tone error diffused from the pixels of the adjacent raster group and stored is read out, and the first raster is converted into a dot row by judging whether or not dots are formed. On the other hand, for the above-mentioned remaining gratings, considering the color tone error diffused from the pixels belonging to the same grating group as the grating and for which the presence or absence of dot formation has been judged and stored, by judging the presence or absence of dot formation, and the The process of transforming the first raster into the above-mentioned point sequence parallelizes the transformation of the remaining rasters into the point sequence.
这样,只要与将上述开头光栅变换为点列的处理平行地执行将上述其余光栅变换为点列的处理,就可以迅速地变换光栅群的图像数据。另外,由于就图像数据按光栅群单位进行变换,所以,向属于相同的光栅群的像素扩散的误差就可以比向属于不同的光栅群的像素扩散的误差较早读出。因此,只要将向属于相同的光栅群的像素扩散的误差与向属于不同的光栅群的像素扩散的误差有区别地存储,就可以迅速地读出误差,从而可以更迅速地执行按光栅群单位变换图像数据的处理。In this way, the image data of the raster group can be rapidly converted by performing the processing of converting the remaining rasters into dot rows in parallel with the processing of converting the first raster into dot rows. In addition, since image data is converted in units of raster groups, errors spreading to pixels belonging to the same raster group can be read earlier than errors spreading to pixels belonging to different raster groups. Therefore, as long as errors diffused to pixels belonging to the same grating group are stored differently from errors diffused to pixels belonging to different grating groups, errors can be quickly read out, and the processing by grating group unit can be executed more quickly. Transform image data processing.
在这样的图象处理装置中,可以将向相同的光栅群的像素扩散的误差存储为可以比向不同的光栅群的像素扩散的误差迅速地执行数据的存储或读出中的至少一方的处理。In such an image processing device, errors spreading to pixels of the same grating group can be stored so that at least one of data storage or reading can be performed more quickly than errors spreading to pixels of a different grating group. .
按光栅群单位变换图像数据时,通过判断有无点形成而发生的色调误差,向属于相同的光栅群的像素扩散的比向不同的光栅群的像素扩散的多。因此,只要将向属于相同的光栅群的像素扩散的误差存储为可以比向属于不同的光栅群的像素扩散的误差迅速地执行数据的存储或读出中的至少一方的处理,便可有效而迅速地进行扩散误差的处理。When image data is converted in units of raster groups, color tone errors generated by judging the presence or absence of dot formation tend to spread more to pixels belonging to the same raster group than to pixels of different raster groups. Therefore, as long as at least one of data storage and readout can be performed more quickly than the error spreading to pixels belonging to the same grating group, the error spreading to the pixels belonging to the same grating group can be stored efficiently and efficiently. Promptly perform diffusion error processing.
在这样的图象处理装置中,对向不同的光栅群的像素扩散的误差,可以同时存储至少与构成上述开头光栅的像素数相同数以上的像素数,同时,对向相同的光栅群的像素扩散的误差,可以同时存储比构成该开头光栅的像素数少的像素数。In such an image processing device, for errors diffused to pixels of different grating groups, at least the same number of pixels as the number of pixels constituting the first grating can be simultaneously stored, and at the same time, pixels of the same grating group can be simultaneously stored. Diffused errors can simultaneously store a number of pixels smaller than the number of pixels constituting the head raster.
按光栅群单位变换图像数据时,向相同的光栅群的像素扩散的误差在将该光栅群的图像数据进行变换的变换中使用,以后不必进行存储,所以,存储该误差的存储部就可以存储向属于该光栅群的其他的像素扩散的误差。因此,对向相同的光栅群的像素扩散的误差,只要可以仅存储比构成该开头光栅的像素数少的像素数,就可以有效地使用存储部。When image data is converted in units of raster groups, the error diffused to the pixels of the same raster group is used in the conversion to convert the image data of the raster group, and there is no need to store it later. Therefore, the storage unit that stores the error can store An error diffused to other pixels belonging to the raster group. Therefore, as long as only a number of pixels smaller than the number of pixels constituting the first raster can be stored for errors diffused to pixels of the same raster group, the storage unit can be effectively used.
在使用计算机进行上述图像数据的变换的图象处理装置中,向相同的光栅群的像素扩散的误差可以存储到该计算机的运算装置可以直接执行数据的写入或读出的存储元件中,向不同的光栅群的像素扩散的误差可以存储到该运算装置间接地执行数据的写入或读出的存储元件中。In the image processing device that uses a computer to perform the conversion of the above-mentioned image data, the error diffused to the pixels of the same grating group can be stored in a storage element that can directly execute data writing or reading by the computing device of the computer, and can be transferred to Errors in the pixel diffusion of different grating groups can be stored in the memory element through which the computing device indirectly performs data writing or reading.
可以从计算机的运算装置直接写入或读出数据的存储元件可以迅速地进行写入或读出,因此,通过存储到这样的存储元件中,可以迅速地存储或读出向相同的光栅群的像素扩散的误差。这样的存储元件不限于可以从上述运算装置直接执行数据的写入或读出中的一方的存储元件,也可以是可以从运算装置直接执行写入和读出的存储元件。The storage element that can directly write or read data from the computing device of the computer can quickly write or read, so by storing in such a storage element, it is possible to quickly store or read data to the same grating group. Pixel Diffusion Error. Such a storage element is not limited to a storage element that can directly write or read data from the above-mentioned computing device, and may be a storage element that can directly write and read data from the computing device.
在这样的图象处理装置中,在上述判断了有无点形成的像素的周边,使在上述最末尾光栅的各像素中发生的色调误差向属于不同的光栅群的未判断的像素扩散时,可以仅向与上述最末尾光栅相邻的上述开头光栅的像素扩散。In such an image processing device, when the hue error generated in each pixel of the last raster is diffused to unjudged pixels belonging to a different raster group around the pixel whose presence or absence of dot formation is judged, Diffusion may be performed only to pixels of the first raster adjacent to the last raster.
这样,色调误差从不同的光栅群的像素扩散的就仅是上述开头光栅的像素,不会向上述其余光栅的像素扩散。因此,仅在判断上述开头光栅的各像素有无点形成时读出上述第1误差存储部存储的误差,判断有无点形成,对于其余光栅,可以读出第2误差存储部存储的误差,判断有无点形成。结果,总体的处理就简化了,所以,可以迅速地进行判断有无点形成的处理。In this way, the color tone error diffuses from the pixels of different raster groups only to the pixels of the first raster, and does not spread to the pixels of the remaining rasters. Therefore, only when judging whether each pixel of the above-mentioned head raster has dot formation or not, the error stored in the above-mentioned first error storage unit is read out to determine whether there is dot formation, and for the remaining rasters, the error stored in the second error storage unit can be read out, Determine whether a point is formed or not. As a result, the overall process is simplified, so that the process of judging the presence or absence of dot formation can be performed quickly.
此外,在这样的图象处理装置中,逐次将各2条光栅的图像数据变换为点列,可以将位于该2条光栅中前面的开头光栅和位于后面的最末尾光栅如以下所述的那样变换为点列。即,对该最末尾光栅的各像素通过判断有无点形成而发生的色调误差向该最末尾光栅的像素和与该最末尾光栅相邻的光栅群的上述开头光栅的像素扩散。另外,对该开头光栅的各像素通过判断有无点形成而发生的色调误差向该开头光栅的像素和该开头光栅之后的最末尾光栅的像素扩散。可以考虑这样扩散来的色调误差,对各光栅群的最末尾的各像素判断有无点形成。In addition, in such an image processing device, the image data of each of the two rasters is sequentially converted into a dot sequence, and the first raster located in the front and the last raster located in the rear of the two rasters can be converted as follows Convert to a column of points. That is, a color tone error generated by determining the presence or absence of dot formation in each pixel of the last raster is diffused to the pixel of the last raster and the pixel of the first raster of the group adjacent to the last raster. In addition, the hue error generated by determining the presence or absence of dot formation in each pixel of the first raster is diffused to the pixel of the first raster and the pixel of the last raster after the first raster. It is possible to determine the presence or absence of dot formation for each pixel at the end of each raster group in consideration of the hue error caused by such diffusion.
这样,只要逐次将各2条光栅进行变换为点列的处理,便可将多个光栅通过简单的处理平行地进行变换为点列的处理。In this way, only two rasters are sequentially converted into dot arrays, and a plurality of rasters can be converted into dot arrays in parallel with simple processing.
在这样的图象处理装置中,将对各像素通过判断有无点形成而发生的色调误差从发生该色调误差的像素向位于指定值以上的远处的未判断像素扩散时,可以仅向与判断了有无该点形成的光栅群不同的光栅群的像素扩散。In such an image processing device, when the color tone error generated by judging the presence or absence of dot formation for each pixel is diffused from the pixel where the color tone error occurs to the unjudged pixel located at a distance greater than or equal to a specified value, it can The presence or absence of pixel spread of a grating group different from the grating group formed by the dot was judged.
将通过判断有无点形成而发生的色调误差向远处的未判断像素扩散时,即使扩散的像素的位置多少偏离,也不会对画质有大的影响。因此,向远处的未判断像素扩散时,只要集中地向与判断了有无点形成的光栅群不同的光栅群的像素扩散,就可以简单地进行扩散误差的处理。When the color tone error generated by judging the presence or absence of dot formation is diffused to distant unjudged pixels, even if the positions of the diffused pixels are shifted to some extent, the image quality will not be greatly affected. Therefore, when diffusing to distant undetermined pixels, it is only necessary to collectively diffuse to pixels of a grating group different from the grating group for which presence or absence of dot formation has been judged, and the diffusion error can be easily processed.
另外,为了解决上述问题的至少一部分,本发明的第2图象处理装置采用以下的结构。即,本发明是一种接收表示各像素的色调值的图像数据并通过沿着该像素的列的光栅判断在构成该光栅的各像素中有无点形成而将该图像数据变换为有无点形成的表现形式的图象处理装置,其特征在于:具有光栅群生成单元、选择光栅变换单元、第1色调误差存储单元、开头光栅变换单元、第2色调误差存储单元和其余光栅变换单元,光栅群生成单元将相互相邻的多条光栅集合起来生成光栅群;选择光栅变换单元至少包含位于上述光栅群的最末尾的最末尾光栅从该光栅群中选择光栅,通过对构成该选择的光栅的各像素判断有无点形成,就该选择的光栅变换为表示有无点形成的点列;第1色调误差存储单元对构成上述选择的光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差,使之与进行了该判断的各像素对应,并存储到第1存储部中;开头光栅变换单元选择位于与上述最末尾光栅相邻的光栅群中的开头位置的开头光栅,在构成该开头光栅的各像素的周边,考虑已判断了有无点形成的周边像素存储的上述色调误差,通过判断该各像素有无点形成,将该开头光栅变换为点列;第2色调误差存储单元使在构成上述开头光栅的各像素中发生的上述色调误差与进行了上述判断的各像素对应,并存储到第2存储部中;其余光栅变换单元对从上述光栅群中除了上述开头光栅的其余的光栅考虑在属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素中发生的上述色调误差,通过判断该其余光栅的各像素有无点形成,与将上述开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列。In addition, in order to solve at least part of the above-mentioned problems, the second image processing device of the present invention adopts the following configuration. That is, the present invention is a method of receiving image data representing the tone value of each pixel and converting the image data into dot presence or absence by judging whether or not dots are formed in each pixel constituting the raster through a raster along the column of the pixels. The image processing device of the expression form formed is characterized in that: it has a grating group generation unit, a selection grating conversion unit, a first color tone error storage unit, a beginning raster conversion unit, a second color tone error storage unit and the rest of the grating conversion units, and the grating The group generation unit assembles a plurality of adjacent gratings to generate a grating group; the selection grating transformation unit includes at least the last grating located at the end of the above-mentioned grating group to select a grating from the grating group, and the selected gratings are selected. Each pixel judges whether dots are formed or not, and converts the selected grating into a dot row representing whether dots are formed; the first color tone error storage unit calculates each pixel constituting the selected grating by judging whether the above-mentioned dots are formed. The color tone error that occurs in the pixel is made to correspond to each pixel for which the determination has been made, and stored in the first storage unit; the head raster conversion unit selects the head of the head position in the raster group adjacent to the last raster For the raster, in the periphery of each pixel constituting the head raster, consider the above-mentioned hue error stored in the surrounding pixels that have been judged to have dot formation or not, and convert the head raster into a dot row by judging whether the dots are formed in each pixel; 2. The color tone error storage unit associates the above-mentioned color tone error that occurs in each pixel constituting the above-mentioned head raster with each pixel that has performed the above-mentioned judgment, and stores it in the second storage unit; The remaining gratings of the above-mentioned first grating consider the above-mentioned tone error occurring in the pixels belonging to the same grating group as the remaining gratings and the presence or absence of dot formation has been judged, and by judging whether or not dots are formed in each pixel of the remaining gratings, they are compared with the remaining gratings. The process of converting the first raster into the dot train described above converts the rest of the rasters into the dot train in parallel.
与这样的第2图象处理装置对应的本发明的第2图象处理方法是接收表示各像素的色调值的图像数据并通过沿着该像素的列的光栅判断在构成该光栅的各像素中有无点形成而将该图像数据变换为有无点形成的表现形式的图象处理方法,其特征在于:包括以下步骤。即,In the second image processing method of the present invention corresponding to such a second image processing device, image data representing the tone value of each pixel is received, and a raster along the column of the pixel is used to determine whether the pixel in each pixel constituting the raster is An image processing method for converting the image data into an expression form of dot formation with or without dot formation is characterized by including the following steps. Right now,
(A)将相互相邻的多条光栅集合起来生成光栅群的步骤;(A) the step of combining a plurality of gratings adjacent to each other to generate a grating group;
(B)至少包含位于上述光栅群的最末尾的最末尾光栅从该光栅群中选择光栅,通过对构成该选择的光栅的各像素判断有无点形成,就该选择的光栅变换为表示有无点形成的点列的步骤;(B) Selecting a grating from the grating group including at least the last grating located at the end of the grating group, and determining the presence or absence of dots in each pixel constituting the selected grating, and converting the selected grating into an expression indicating presence or absence The steps of point columns formed by points;
(C)对构成上述选择的光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差,使之与进行了该判断的各像素对应而进行存储的步骤;(C) calculating, for each pixel constituting the selected raster, a color tone error generated in each pixel by judging the presence or absence of dot formation, and storing it in association with each pixel for which the judgment has been made;
(D)选择位于与上述最末尾光栅相邻的光栅群中的开头位置的开头光栅,在构成该开头光栅的各像素的周边,考虑已判断了有无点形成的周边像素存储的上述色调误差,通过判断该各像素有无点形成而将该开头光栅变换为点列的步骤;(D) Select the head raster located at the head position of the grating group adjacent to the last raster, and consider the above-mentioned tone error stored in the peripheral pixels that have been judged to have dot formation around each pixel constituting the head raster , the step of transforming the beginning raster into a dot row by judging whether each pixel has a dot formation;
(E)使在构成上述开头光栅的各像素中发生的上述色调误差与在所述步骤C存储的色调误差相区分,同时与进行了上述判断的各像素对应而进行存储的步骤;(E) A step of distinguishing the above-mentioned color tone error occurring in each pixel constituting the above-mentioned head raster from the color tone error stored in the step C, and storing it in correspondence with each pixel for which the above-mentioned determination is performed;
(F)对从上述光栅群中除了上述开头光栅的其余的光栅考虑在属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素中发生的上述色调误差,通过判断该其余光栅的各像素有无点形成,与将上述开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列的步骤。(F) For the rest of the grating group except the first grating, the color tone error occurred in the pixel belonging to the same grating group as the remaining grating and the presence or absence of dot formation has been judged, and by judging the remaining grating In parallel with the process of converting the first raster into the above-mentioned dot sequence, the step of converting the remaining rasters into the dot sequence is carried out in parallel.
在这样的第2图象处理装置和图象处理方法中,与上述第1图象处理装置和图象处理方法一样,以由指定条数的相邻的光栅构成的光栅群为单位,对构成该光栅群的各光栅,通过判断各像素有无点形成,将各光栅变换为点列。这时,在第2图象处理装置和图象处理方法中,使在上述最末尾光栅的各像素中发生的色调误差与进行该判断的各像素对应而存储,在判断上述开头光栅的像素有无点形成时读出该像素的周边的上述最末尾光栅的各像素存储的色调误差,判断有无点形成。这样,在开头光栅的各像素中发生的色调误差预先与在上述最末尾光栅的各像素中发生的色调误差有区别地进行存储。对上述其余光栅,考虑在属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素中发生的色调误差,通过判断有无点形成,与将该开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列。In such a second image processing device and image processing method, as in the above-mentioned first image processing device and image processing method, a grating group composed of a specified number of adjacent gratings is used as a unit to configure Each grating of the grating group is converted into a dot row by judging whether or not dots are formed in each pixel. In this case, in the second image processing apparatus and image processing method, the color tone error generated in each pixel of the last raster is associated with each pixel for which the determination is made and stored, and the pixel of the first raster is judged to have When there is no dot formation, the color tone error stored in each pixel of the above-mentioned last raster around the pixel is read out, and whether or not dots are formed is judged. In this way, the color tone error occurring in each pixel of the first raster and the color tone error occurring in each pixel of the above-mentioned last raster are differentiated and stored in advance. For the rest of the above-mentioned rasters, considering the hue error occurring in pixels belonging to the same grating group as the rest of the rasters and for which the presence or absence of dot formation has been judged, by judging whether or not dots are formed, the conversion of the head raster into the above-mentioned dot array is performed. Processing transforms this remaining raster into a column of points in parallel.
这样,只要将上述开头光栅和其余光栅平行地按光栅群单位把图像数据变换为点列,就可以迅速地变换图像数据。另外,由于按光栅群单位变换图像数据,所以,在处理中的光栅群的上述最末尾光栅中发生的色调误差与在其他光栅中发生的色调误差不同,在现在的光栅群的处理结束之后而读出。因此,只要将在光栅群的最末尾光栅中发生的色调误差与在其他光栅中发生的色调误差有区别地进行存储,就可以迅速地读出误差,从而可以迅速地变换图像数据。In this way, the image data can be quickly converted by simply converting the image data into a dot row in parallel with the first raster and the remaining rasters in raster group units. In addition, since the image data is converted in raster group units, the color tone error that occurs in the last raster of the raster group being processed is different from the color tone error that occurs in other rasters. read out. Therefore, if the color tone error occurring in the last raster of the group of rasters is stored differently from the tone errors occurring in other rasters, the error can be quickly read and the image data can be quickly converted.
在这样的图象处理装置中,可以将在最末尾光栅以外的光栅中发生的色调误差存储为可以比在最末尾光栅中发生的色调误差可以迅速地执行数据的存储或读出中的至少一方的处理。In such an image processing apparatus, at least one of storage and readout of data can be performed more quickly than color tone errors occurring in the last raster by storing color tone errors occurring in rasters other than the last raster. processing.
按光栅群单位变换图像数据时,由于在1个光栅群中只存在1条最末尾光栅,而其他光栅则存在1条以上,所以,在判断有无点形成时,在最末尾光栅以外的光栅中发生的色调误差将比在最末尾光栅中发生的色调误差被频繁地读出。因此,只要将在最末尾以外的光栅中发生的色调误差存储为可以比在最末尾光栅中发生的色调误差迅速地执行数据的存储或读出中的至少一方的处理,就可以有效而迅速地进行按光栅群单位变换的处理。When converting image data in units of raster groups, there is only one last raster in one raster group, and there are more than one other raster. Hue errors occurring in the raster will be read out more frequently than those occurring in the last raster. Therefore, as long as at least one of data storage or readout can be performed more quickly than the color tone error occurring in the last raster, the hue error occurring in the raster other than the last raster can be efficiently and quickly Performs conversion in units of raster groups.
在这样的图象处理装置中,对在上述最末尾光栅的各像素中发生的色调误差,可以同时存储至少与构成该最末尾光栅的像素相同数量以上的像素数,同时,对在上述开头光栅的各像素中发生的色调误差,可以体仅存储比构成该开头光栅的像素少的像素数。In such an image processing device, for the hue error occurring in each pixel of the last raster, at least the same number of pixels as the pixels constituting the last raster can be simultaneously stored, The color tone error occurring in each pixel of each pixel can be stored only by the number of pixels less than the pixels constituting the head raster.
在按光栅群单位变换图像数据时,通过判断有无点形成而发生的色调误差在对相同的光栅群的像素判断有无点形成时使用,而在以后不必存储,所以,存储该色调误差的存储部可以用于存储在属于相同光栅群的其他像素中发生的色调误差。因此,对在开头光栅的各像素中发生的色调误差,可以仅存储比构成该开头光栅的像素少的像素数,从而可以有效地使用存储部。When image data is converted in raster group units, the color tone error generated by judging the presence or absence of dot formation is used when judging the presence or absence of dot formation for the pixels of the same raster group, and does not need to be stored later. Therefore, the color tone error is stored. The storage unit may be used to store hue errors occurring in other pixels belonging to the same raster group. Therefore, it is possible to store the hue error generated in each pixel of the first raster by only a number of pixels less than the number of pixels constituting the first raster, so that the storage unit can be effectively used.
在使用计算机进行上述图像数据的变换的图象处理装置中,在上述开头光栅的各像素中发生的色调误差可以存储到该计算机的运算装置可以直接执行数据的写入或读出的存储元件中,在上述最末尾光栅的各像素中发生的色调误差可以存储到该运算装置间接地执行数据的写入或读出的存储元件中。In the image processing device that uses a computer to convert the above-mentioned image data, the color tone error that occurs in each pixel of the above-mentioned head raster can be stored in a storage element that can directly write or read data by the computing device of the computer. A color tone error occurring in each pixel of the last raster can be stored in a storage element in which the computing means indirectly writes or reads data.
可以从计算机的运算装置中直接写入或读出数据的存储元件可以进行迅速的写入或读出,因此,只要将在开头光栅的像素中发生的色调误差存储到这样的存储元件中,就可以迅速地变换光栅群的图像数据。这样的存储元件可以是可从该运算装置执行数据的写入或读出的存储元件。The storage element that can directly write or read data from the computing device of the computer can perform rapid writing or reading. Therefore, as long as the color tone error that occurs in the pixel of the first raster is stored in such a storage element, The image data of the raster group can be changed rapidly. Such a storage element may be a storage element capable of writing or reading data from the computing device.
在这样的图象处理装置中,仅对上述光栅群中的上述最末尾光栅将在构成该光栅的各像素中发生的色调误差存储到该各像素中,可以作为在对上述开头光栅判断有无点形成时考虑的上述色调误差,考虑上述最末尾光栅的各像素的色调误差,将上述开头光栅变换为上述点列。In such an image processing device, only for the last raster in the raster group, the color tone error that occurs in each pixel constituting the raster is stored in each pixel, which can be used as the basis for determining the presence or absence of the first raster. The hue error of each pixel of the last raster is considered in consideration of the hue error in dot formation, and the first raster is converted into the dot sequence.
这样,可以仅在判断上述开头光栅的各像素有无点形成时读出在属于不同的光栅群的上述最末尾光栅的像素中发生的色调误差,而在判断其余光栅的各像素有无点形成时读出在不同的光栅群的像素中发生的色调误差,所以,可以迅速地变换光栅群的图像数据。In this way, it is possible to read the color tone error occurring in the pixels of the last raster belonging to different raster groups only when judging whether or not dots are formed in each pixel of the first raster, and to judge whether or not dots are formed in each pixel of the remaining rasters. Since color tone errors occurring in pixels of different raster groups are read out at any time, the image data of the raster group can be changed rapidly.
此外,在这样的图象处理装置中,逐次将各2条光栅的图像数据变换为点列,可以将位于该2条光栅中前面的开头光栅和位于后面的最末尾光栅如以下所述的那样变换为点列。即,仅将在最末尾光栅中发生的色调误差存储到上述第1存储部中,在判断构成开头光栅的各像素有无点形成时,读出该最末尾光栅的各像素存储的色调误差进行判断,在各像素中发生的色调误差存储到上述第2存储部中。对该开头光栅之后的最末尾光栅,与将该开头光栅变换为点列的处理平行地考虑在该开头光栅的各像素中发生的色调误差而变换为点列。In addition, in such an image processing device, the image data of each of the two rasters is sequentially converted into a dot sequence, and the first raster located in the front and the last raster located in the rear of the two rasters can be converted as follows Convert to a column of points. That is, only the tone error generated in the last raster is stored in the first storage unit, and when it is judged whether or not dots are formed in each pixel constituting the first raster, the tone error stored in each pixel of the last raster is read out and performed. It is judged that the color tone error generated in each pixel is stored in the second storage unit. The last raster following the first raster is converted into a dot sequence in parallel with the process of converting the first raster into a dot sequence in consideration of the hue error occurring in each pixel of the first raster.
这样,只要逐次各2条光栅变换为点列,便可通过简单的处理平行地进行将多个光栅变换为点列的处理。In this way, only two rasters are sequentially converted into dot arrays, and the process of converting a plurality of rasters into dot arrays can be performed in parallel with simple processing.
在这样的第1图象处理装置或第2图象处理装置中,为了反映在上述开头光栅的各像素中发生的色调误差并将上述其余光栅变换为点列,可以通过考虑从该开头光栅向该其余光栅的各像素扩散的扩散误差,判断有无点形成而将该其余光栅变换为点列。或者,可以通过考虑在该开头光栅的各像素中发生的色调误差,判断有无点形成而将该其余光栅变换为点列。In such a first image processing device or a second image processing device, in order to reflect the hue error occurring in each pixel of the above-mentioned head raster and convert the above-mentioned remaining rasters into a dot sequence, it is possible to consider The diffusion error diffused by each pixel of the remaining raster is judged whether or not dots are formed, and the remaining raster is converted into a dot row. Alternatively, the rest of the rasters may be converted into dot columns by determining whether or not dots are formed in consideration of color tone errors occurring in each pixel of the first raster.
使用这些方法,可以反映在上述开头光栅的各像素中发生的色调误差,并且可以将上述其余光栅变换为点列。Using these methods, it is possible to reflect the hue error occurring in each pixel of the above-mentioned head raster, and to convert the above-mentioned remaining rasters into dot columns.
另外,对在印刷媒体上形成喷墨点而印刷图像的印刷部,通过输出用于控制喷墨点的形成的印刷数据,在控制该印刷部的印刷控制装置中,可以利用本发明的上述第1图象处理装置或第2图象处理装置。In addition, by outputting printing data for controlling the formation of inkjet dots to a printing section that forms inkjet dots on a printing medium to print an image, the above-mentioned first aspect of the present invention can be used in a printing control device that controls the printing section. 1 image processing device or a 2nd image processing device.
即,在上述第1图象处理装置或第2图象处理装置中,接收表示各像素的色调值的图像数据,可以相当地将该图像数据变换为由有无点形成决定的图像数据。因此,如果把这样的第1图象处理装置或第2图象处理装置应用于上述印刷控制装置,便可将图像数据迅速地变换为印刷数据。如果将这样得到的印刷数据向上述印刷部输出,便可由该印刷部迅速地印刷高画质的图像。That is, in the first image processing device or the second image processing device, image data representing the tone value of each pixel can be received, and the image data can be converted into image data determined by the presence or absence of dot formation. Therefore, if such a first image processing device or a second image processing device is applied to the above-mentioned print control device, image data can be quickly converted into print data. By outputting the print data obtained in this way to the printing unit, a high-quality image can be quickly printed by the printing unit.
另外,本发明也可以使用计算机实现将实现上述第1图象处理方法或第2图象处理方法的程序读入计算机。因此,本发明也包含以下作为记录媒体的形式。即,与上述第1图象处理方法对应的记录媒体是通过接收表示各像素的色调值的图像数据并按照该像素的列而形成的光栅判断构成该光栅的各像素有无点形成而将实现把该图像数据变换为由有无点形成的表现形式的方法的程序记录为可以由计算机读取的记录媒体,其特征在于:记录实现以下功能的程序,即In addition, the present invention can also be realized by using a computer by reading a program for realizing the first image processing method or the second image processing method described above into the computer. Therefore, the present invention also includes the following as forms of recording media. That is, the recording medium corresponding to the first image processing method described above receives image data representing the tone value of each pixel and judges whether or not dots are formed in each pixel constituting the raster by receiving image data representing the tone value of each pixel and forming a raster according to the column of the pixel. A program for converting the image data into a form of expression formed by the presence or absence of dots is recorded on a recording medium that can be read by a computer, and it is characterized in that a program for realizing the following functions is recorded, that is,
(A)将相互相邻的多条光栅集合起来生成光栅群的功能;(A) The function of combining multiple gratings adjacent to each other to generate a grating group;
(B)选择位于上述光栅群中最末尾的最末尾光栅并通过对构成该最末尾光栅的各像素判断有无点形成而将该最末尾光栅变换为表示有无点形成的点列的功能;(B) A function of selecting the last grating located at the end of the above-mentioned grating group and converting the last grating into a dot row indicating whether or not dots are formed by judging the presence or absence of dots for each pixel constituting the last grating;
(C)对构成上述最末尾光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差并向位于该各像素的周边的多个未判断的像素扩散的功能;(C) A function of calculating, for each pixel constituting the last raster, a color tone error generated in each pixel by judging the presence or absence of dot formation, and diffusing it to a plurality of unjudged pixels located around the respective pixel;
(D)选择位于与上述最末尾光栅相邻的光栅群中开头位置的开头光栅并通过考虑从该最末尾光栅向该开头光栅的各像素扩散的上述色调误差而对构成该开头光栅的各像素判断有无点形成,将该开头光栅变换为表示有无点形成的点列的功能;(D) Select the head grating located at the head position of the grating group adjacent to the last grating, and calculate the color difference for each pixel constituting the head grating by considering the above-mentioned hue error diffused from the last grating to each pixel of the head grating. The function of judging whether dots are formed, and transforming the beginning raster into a dot column indicating whether dots are formed;
(E)将在构成上述开头光栅的各像素中发生的上述色调误差向位于该各像素的周边的未判断的像素扩散的功能;(E) a function of diffusing the color tone error that occurs in each pixel constituting the first raster to undetermined pixels located around the respective pixels;
(F)通过对从上述光栅群中除了上述开头光栅的其余光栅考虑从属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素扩散的上述色调误差并判断该其余光栅的各像素有无点形成而与将该开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列的功能;(F) By considering the above-mentioned tone error of the diffusion of pixels belonging to the same grating group as the remaining grating group and judging whether or not the dots are formed, and judging each of the remaining gratings except the first grating The function of transforming the remaining rasters into dot trains in parallel with the process of transforming the beginning raster into dot trains with or without dot formation in pixels;
同时,记录作为上述功能(C)和上述功能(E)而实现将向与判断了上述有无点形成的像素相同的光栅群的像素扩散的误差与向不同的光栅群的像素扩散的误差有区别地进行存储的功能的程序。Simultaneously, record as above-mentioned function (C) and above-mentioned function (E) realize the difference between the error that diffuses to the pixel of the same grating group as the pixel that judged the above-mentioned presence or absence of dot formation and the error that diffuses to the pixel of different grating group A program that performs storage functions differently.
另外,与上述第2图象处理方法对应的记录媒体是通过接收表示各像素的色调值的图像数据并按照该像素的列而形成的光栅判断构成该光栅的各像素有无点形成而将实现把该图像数据变换为由有无点形成的表现形式的方法的程序记录为可以由计算机读取的记录媒体,其特征在于:记录实现以下功能的程序,即In addition, the recording medium corresponding to the above-mentioned second image processing method is to realize by receiving the image data representing the tone value of each pixel and judging whether each pixel constituting the raster has dots formed by the raster formed according to the column of the pixel. A program for converting the image data into a form of expression formed by the presence or absence of dots is recorded on a recording medium that can be read by a computer, and it is characterized in that a program for realizing the following functions is recorded, that is,
(A)将相互相邻的多条光栅集合起来生成光栅群的功能;(A) The function of combining multiple gratings adjacent to each other to generate a grating group;
(B)至少包含位于上述光栅群的最末尾的最末尾光栅从该光栅群中选择光栅,通过对构成该选择的光栅的各像素判断有无点形成,就该选择的光栅变换为表示有无点形成的点列的功能;(B) Selecting a grating from the grating group including at least the last grating located at the end of the grating group, and determining the presence or absence of dots in each pixel constituting the selected grating, and converting the selected grating into an expression indicating presence or absence function of the column of points formed by the points;
(C)对构成上述选择的光栅的各像素计算通过判断上述有无点形成而在各像素中发生的色调误差,使之与进行了该判断的各像素对应而进行存储的功能;(C) A function of calculating, for each pixel constituting the selected raster, a color tone error generated in each pixel by judging the presence or absence of dot formation, and storing it in association with each pixel for which the judgment has been made;
(D)选择位于与上述最末尾光栅相邻的光栅群中的开头位置的开头光栅,在构成该开头光栅的各像素的周边,考虑已判断了有无点形成的周边像素存储的上述色调误差,通过判断该各像素有无点形成而将该开头光栅变换为点列的功能;(D) Select the head raster located at the head position of the grating group adjacent to the last raster, and consider the above-mentioned tone error stored in the peripheral pixels that have been judged to have dot formation around each pixel constituting the head raster , the function of transforming the beginning raster into a dot row by judging whether each pixel has a dot formation;
(E)使在构成上述开头光栅的各像素中发生的上述色调误差在所述步骤C存储的色调误差相区分,同时与进行了上述判断的各像素对应而进行存储的功能;(E) The function of distinguishing the above-mentioned color tone error generated in each pixel constituting the above-mentioned head raster from the color tone error stored in the step C, and simultaneously storing it in correspondence with each pixel for which the above-mentioned judgment is performed;
(F)对从上述光栅群中除了上述开头光栅的其余的光栅考虑在属于与该其余光栅相同的光栅群并且已判断了有无点形成的像素中发生的上述色调误差,通过判断该其余光栅的各像素有无点形成,与将上述开头光栅变换为上述点列的处理平行地将该其余光栅变换为点列的功能。(F) For the rest of the grating group except the first grating, the color tone error occurred in the pixel belonging to the same grating group as the remaining grating and the presence or absence of dot formation has been judged, and by judging the remaining grating In parallel with the process of converting the first raster into the above-mentioned dot sequence, the function of converting the rest of the rasters into the dot sequence is performed.
只要将这些记录媒体记录的程序读取计算机并使用该计算机实现上述各种功能,就可以将表示各像素的色调值的图像数据迅速地变换为由有无点形成的表现形式的图像数据。By reading the programs recorded on these recording media into a computer and using the computer to realize the various functions described above, image data representing the tone value of each pixel can be quickly converted into image data in a form of dot presence or absence.
附图说明Description of drawings
图1是本实施例的印刷系统的概略结构图。FIG. 1 is a schematic configuration diagram of a printing system of this embodiment.
图2是表示作为本实施例的图象处理装置的计算机的结构的说明图。FIG. 2 is an explanatory diagram showing the configuration of a computer as the image processing apparatus of the present embodiment.
图3是作为本实施例的图像显示装置的打印机的概略结构图。FIG. 3 is a schematic configuration diagram of a printer as the image display device of the present embodiment.
图4是表示由本实施例的图象处理装置进行的图像数据变换处理的流程的流程图。FIG. 4 is a flowchart showing the flow of image data conversion processing performed by the image processing apparatus of this embodiment.
图5是概念式地表示使用误差扩散法判断有无点形成的情况的说明图。FIG. 5 is an explanatory diagram conceptually showing the state of determining the presence or absence of dot formation using the error diffusion method.
图6是表示对各像素设定误差扩散系数的情况的说明图。FIG. 6 is an explanatory diagram showing a case where an error diffusion coefficient is set for each pixel.
图7是表示在实施例1的色调系数变换处理中通过平行地进行多个光栅的处理而缩短处理时间的原理的说明图。FIG. 7 is an explanatory diagram showing the principle of shortening the processing time by performing processing of a plurality of rasters in parallel in the tone coefficient conversion processing of the first embodiment.
图8是表示实施例1的色调系数变换处理的流程的流程图。8 is a flowchart showing the flow of tone coefficient conversion processing in the first embodiment.
图9是贯式地表示在实施例1的色调系数变换处理的变形例1中平行地处理多个光栅的情况的说明图。FIG. 9 is an explanatory view schematically showing a case where a plurality of rasters are processed in parallel in
图10是概念式地表示在实施例1的色调系数变换处理的变形例2中平行地处理多个光栅的情况的说明图。FIG. 10 is an explanatory diagram conceptually showing a case where a plurality of rasters are processed in parallel in
图11是概念式地表示在实施例1的色调系数变换处理的变形例3中平行地处理多个光栅的情况的说明图。11 is an explanatory diagram conceptually showing a case where a plurality of rasters are processed in parallel in
图12是概念式地表示在实施例1的色调系数变换处理的变形例4中对向远处扩散的误差向误差缓冲器的某一像素扩散的误差扩散矩阵的说明图。12 is an explanatory diagram conceptually showing an error diffusion matrix in which an error diffused far away is diffused to a certain pixel of the error buffer in Modification 4 of the tone coefficient conversion process of the first embodiment.
图13是概念式地表示在实施例2的色调系数变换处理中通过平行地进行多个光栅的处理而糁处理时间的原理的说明图。13 is an explanatory diagram conceptually showing the principle of reducing processing time by performing processing on a plurality of rasters in parallel in the tone coefficient conversion processing of the second embodiment.
图14是表示在实施例2的变形例的色调系数变换处理中对各像素设定权重系数的情况的说明图。FIG. 14 is an explanatory diagram showing a state in which a weight coefficient is set for each pixel in tone coefficient conversion processing in a modified example of the second embodiment.
图15是表示实施例2的色调系数变换处理的流程的流程图。15 is a flowchart showing the flow of tone coefficient conversion processing in the second embodiment.
图16是概念式地表示在实施例2的色调系数变换处理的变形例1中平行地处理多个光栅的情况的说明图。FIG. 16 is an explanatory diagram conceptually showing a case where a plurality of rasters are processed in parallel in
具体实施方式 Detailed ways
实施发明的最佳的形式The best form for carrying out the invention
为了更明确地说明本发明的作用和效果,下面,按照以下的顺序说明本发明的实施例。In order to more clearly describe the actions and effects of the present invention, examples of the present invention will be described in the following order.
A.实施例A. Example
B.实施例1B. Example 1
B-1.装置结构B-1. Device structure
B-2.图像数据变换处理的概要B-2. Outline of image data conversion processing
B-3.实施例1的色调系数变换处理B-3. Tone coefficient conversion processing of
B-4.变形例B-4. Modifications
C.实施例2C. Example 2
C-1.实施例2的色调系数变换处理C-1. Tone coefficient conversion processing of
C-2.变形例C-2. Variations
A.实施例A. Example
下面,参照图1说明本发明的实施例。图1是以印刷系统为例用于说明本发明的实施例的说明图。本印刷系统由作为图象处理装置的计算机10和彩色打印机20等构成。计算机10从数码相机或彩色扫描仪等图像机器接收到彩色图像的色调图像数据时,就将该图像数据变换为利用可以由彩色打印机20进行印刷的有无各色点所表现的印刷数据。这样的图像数据的变换使用称为打印机驱动器12的专用的程序进Next, an embodiment of the present invention will be described with reference to FIG. 1 . FIG. 1 is an explanatory diagram for explaining an embodiment of the present invention by taking a printing system as an example. This printing system is composed of a
行。彩色图像的色调图像数据也可以由计算机10使用各种应用程序而作成。OK. The tone image data of a color image can also be created by the
打印机驱动器1 2由解像度变换模块、色变换模块、色调数变换模块和称为交错模块的多个模块构成。色调数变换模块是进行将色调图像数据变换为有无点形成的表现形式的处理的模块。本实施例的色调数变换模块在对目的像素判断有无点形成时,考虑在周边像素中发生的色调误差,为了消除误差而判断目的像素有无点形成。对于由其他模块进行的处理,后面说明。彩色打印机20根据由这些各模块变换的印刷数据,通过在印刷媒体上形成各色墨点而遗少彩色图像。The printer driver 12 is composed of a resolution conversion module, a color conversion module, a tone number conversion module, and a plurality of modules called an interleave module. The tone number conversion module is a module that performs processing for converting tone image data into an expression format with or without dot formation. The tone number conversion module of the present embodiment considers the tone error occurring in surrounding pixels when determining the presence or absence of dots in the target pixel, and determines whether the target pixel has dots in order to eliminate the error. The processing performed by other modules will be described later. The color printer 20 forms color images on a printing medium by forming ink dots of each color on the basis of the printing data converted by these modules.
供给打印机驱动器12的图像数据如图1概念式所示的那样,是使构成原稿图像的各像素的色调值从图像的一端开始顺序逐次1光栅1光栅地输出的数据结构。打印机驱动器12内的解像度变换模块和色变换模块按照供给的图像数据的数据结构逐次1光栅1光栅地进行它们的处理,在本发明的印刷系统的色调数变换模块中,利用后面所述的方法平行地进行相互相邻的指定条数的光栅的处理。图1作为一例,概念式地表示平行地处理3条光栅的情况。详细情况,后面说明,但是,如果可以这样平行地进行多条光栅的处理,则在平行地进行处理的多个光栅间,便可考虑在各光栅中发生的色调误差而进行点形成的判断,所以,不必将色调误差或扩散误差一一存储到误差缓冲器中。即,在本实施例的色调数变换模块中,不必对误差缓冲器频繁地进行读写,所以,可以迅速地进行有无点形成的判断。The image data supplied to the printer driver 12 has a data structure in which the tone values of the pixels constituting the document image are sequentially output raster by raster from one end of the image as shown in the conceptual formula in FIG. 1 . The resolution conversion module and the color conversion module in the printer driver 12 perform their processing one raster by one raster according to the data structure of the supplied image data. In the tone number conversion module of the printing system of the present invention, the method described later is used. The specified number of rasters adjacent to each other are processed in parallel. FIG. 1 conceptually shows a case where three rasters are processed in parallel as an example. The details will be described later, but if a plurality of rasters can be processed in parallel in this way, then between the plurality of rasters processed in parallel, the dot formation can be judged in consideration of the hue error occurring in each raster, Therefore, it is not necessary to store hue errors or diffusion errors one by one into the error buffer. That is, in the tone number conversion module of this embodiment, it is not necessary to frequently read and write to the error buffer, so it is possible to quickly determine whether or not dots are formed.
这样,考虑在多条光栅间发生的色调误差而平行地进行有无点形成的判断的具体的方法就存在各种形式,下面,使用各种实施例说明这些各种形式。In this way, there are various specific methods for judging the presence or absence of dot formation in parallel in consideration of color tone errors occurring among a plurality of rasters, and these various methods will be described below using various embodiments.
B.实施例1B. Example 1
B-1.装置结构B-1. Device structure
图2是表示作为实施例1的图象处理装置的计算机100的结构的说明图。计算机100是以CPU102为中心、通过总线116将ROM104或RAM106等相互连接而构成的众所周知的计算机。CPU102由实际进行处理的运算器和暂时保持处理中的数据的多个寄存器构成。寄存器保持的数据远远比RAM106存储的数据可以高速地处理。FIG. 2 is an explanatory diagram showing the configuration of a
用于读入软盘124或小型盘126的数据的盘控制器DDC109、用于与外围设备进行数据的收发的外围设备接口P·I/F108、用于驱动CRT114的视频接口V·I/F112等与计算机100连接。后面所述的彩色打印机200和硬盘118等与P·I/F108连接。另外,如果将数码相机120或彩色扫描仪122等与P·I/F108连接,也可印刷由数码相机1220或彩色扫描仪122取入的图像。另外,如果安装网络接口卡NIC110,将计算机100与通信线路300连接,便可取得与通信线路连接的存储装置310存储的数据。Disk controller DDC109 for reading data from
图3是表示实施例1的彩色打印机200的概略结构的说明图。彩色打印机200是可以形成青、品红、黄、黑等4色墨的点的喷墨打印机。当然,也可以使用在这4色墨之外可以形成包含染料浓度低的青(淡青)墨和染料浓度低的品红(淡品红)墨的共计6色的墨点的喷墨打印机。此外,也可以使用可以形成包括明度低的(暗的)黄(暗黄)墨的共计7色的墨点的喷墨打印机。下面,根据情况不同,将青墨、品红墨、黄墨、黑墨、淡青墨、淡品红墨、暗黄墨水分别简称为C墨水、M墨、Y墨、K墨、LC墨、LM墨和DY墨。FIG. 3 is an explanatory diagram showing a schematic configuration of the
彩色打印机200如图所示,由驱动搭载在托架240上的印字头241用于进行墨水的喷出和点形成的机构、由托架电机230使该托架240沿着压纸滚筒236的轴向往复运动的机构、由送纸电机235传送印刷用纸P的机构和控制点的形成和托架240的移动以及印刷用纸的传送的控制电路260构成。As shown in the figure, the
在托架240上,安装着收纳K墨水的墨盒242和收纳C墨水、M墨水、Y墨水的各种墨水的墨盒243。墨盒242、243安装到托架240上时,盒内的各墨水就通过图中未示出的导入管供给设置在印字头241的下面的各色的墨水喷头242~247。K墨水用的墨水喷头244如图所示,多个喷嘴Nz按一定的喷嘴间距k交错地排列成2列。其他色的墨水喷头245~247也一样,各设置1组按喷嘴间距k交错地排列的喷嘴列。Mounted on the carriage 240 is an ink cartridge 242 containing K ink and an ink cartridge 243 containing various inks of C ink, M ink, and Y ink. When the ink cartridges 242 and 243 are mounted on the carriage 240, the inks in the cartridges are supplied to the ink jet heads 242 to 247 of the respective colors provided on the lower side of the print head 241 through guide tubes not shown in the figure. In the ink jet head 244 for the K ink, as shown in the figure, a plurality of nozzles Nz are arranged in two rows alternately at a constant nozzle pitch k. The same applies to the ink jet heads 245 to 247 of other colors, each having a set of nozzle rows arranged in a staggered manner at a nozzle pitch k.
控制电路260由CPU261和ROM262、RAM263等构成,通过控制托架电机230和送纸电机235的动作来控制托架240的主扫描和副扫描,同时,根据从计算机100供给的印刷数据在适当的时刻从各喷嘴喷出墨水滴。这样,在控制电路260的控制下,通过在印刷媒体上的适当的位置形成各色的墨点,彩色打印机200便可印刷彩色图像。The control circuit 260 is composed of CPU261, ROM262, RAM263, etc., and controls the main scanning and sub-scanning of the carriage 240 by controlling the operation of the
从各色的墨水喷头喷出墨水滴的方法,可以应用各种方法。即,可以使用利用压电元件喷出墨水的方式或用配置在墨水通路上的加热器使墨水通路内发生气泡从而喷出墨水滴的方法等。另外,也可以使用利用热转印等现象在印刷用纸上形成墨点的方式或利用静电使各色的调色剂粉附着到印刷媒体上的方式的打印机,取代喷出墨水。Various methods can be applied to the method of ejecting ink droplets from the ink heads of each color. That is, a method of ejecting ink using a piezoelectric element, or a method of ejecting ink droplets by generating air bubbles in the ink passage using a heater disposed on the ink passage may be used. In addition, instead of ejecting ink, a printer of a method of forming ink dots on printing paper using a phenomenon such as thermal transfer or a method of attaching toner powder of each color to a printing medium using static electricity may be used.
此外,也可以使用控制从墨水喷头喷出的墨水滴的大小或一次喷出多个微细的墨水滴而控制喷出的墨水滴的数的方法从而可以控制在印刷用纸上形成的墨点的大小的打印机,即所谓的可变点打印机。In addition, it is also possible to control the size of the ink droplets ejected from the inkjet head or to eject a plurality of fine ink droplets at a time to control the number of ink droplets ejected, thereby controlling the size of the ink dots formed on the printing paper. small and large printers, so-called variable dot printers.
B-2.图像数据变换处理的概要B-2. Outline of image data conversion processing
图4是表示通过对作为实施例1的图象处理装置的计算机100接收的图像数据进行指定的图象处理而将该图像数据变换为印刷数据的流程的流程图。这样的处理,通过计算机100的操作系统起动打印机驱动器12而开始。下面,参照图4简单滴说明实施例1的图像数据变换处理。4 is a flowchart showing a flow of converting image data into print data by performing predetermined image processing on image data received by the
打印机驱动器12开始进行图像数据变换处理时,先开始读入应变换的TGB彩色图像数据(步骤S100)。图像数据按R(红)、G(绿)、B(篮)各色逐次1光栅1光栅滴读入打印机驱动器12。When the printer driver 12 starts image data conversion processing, it first starts to read TGB color image data to be converted (step S100). Image data is read into the printer driver 12 one by one raster by one raster drop for each color of R (red), G (green), and B (basket).
然后,将取入的图像数据的解像度变换为彩色打印机200进行印刷的解像度(步骤S102)。在彩色图像数据的解像度比印刷解像度低时,通过进行线性内插,在相邻图像数据间生成新的数据,相反,在彩色图像数据的解像度比印刷解像度高时,通过按一定的比率间抽数据,将图像数据的解像度变换为印刷解像度。Then, the resolution of the captured image data is converted into a resolution for printing by the color printer 200 (step S102). When the resolution of the color image data is lower than the printing resolution, new data is generated between adjacent image data by performing linear interpolation; Data to convert the resolution of the image data into the printing resolution.
在这样变换了解像度时,就进行彩色图像数据的色变换处理(步骤S104)。所谓色变换处理,就是将由R、G、B的色调值的组合所表现的彩色图像数据变换为由C、M、Y、K等彩色打印机200使用的各色的色调值的组合所表现的图像数据的处理。色变换处理可以通过参照称为色变换表(LUT)的3维的数表迅速地进行。以上说明的解像度变换处理(步骤S102)和色变换处理(步骤S104)按每一光栅进行。When the resolution is converted in this way, color conversion processing of the color image data is performed (step S104). The so-called color conversion process is to convert the color image data expressed by the combination of R, G, and B tone values into the image data expressed by the combination of the tone values of each color used by the
在色变换处理结束时,就开始进行色调数变换处理(步骤S106)。所谓色调数变换处理,就是以下所述的处理。通过色变换处理而变换的色调数据,表现为各色具有256色调幅度的数据。与此相反,在本实施例的彩色打印机200中,只能采用「形成点」和「不形成点」中的某一状态。即,本实施例的彩色打印机200只能局部地表现2色调。因此,必须将具有256色调的图像数据变换为用彩色打印机200可以表现的2色调表现的图像数据。进行这样的色调数的变换的处理就是色调数变换处理。如前所述,在本实施例的色调数变换处理中,通过平行地判断多个光栅有无点形成,便可进行迅速的处理。关于色调数变换处理,后面详细说明。When the color conversion process ends, the tone number conversion process starts (step S106). The tone number conversion processing is the processing described below. The tone data converted by the color conversion process is expressed as data having a tone width of 256 for each color. On the contrary, in the
这样,如果色调数变换处理结束了,打印机驱动器就开始进行交错处理(步骤S108)。交错处理,就是考虑点的形成顺序将变换为表示有无点的形成的形式的图像数据顺序变换为应向彩色打印机200传输的处理。打印机驱动器将进行交错处理而最后得到的图像数据作为印刷数据向彩色打印机200输出(步骤S110)。彩色打印机200按照印刷数据在印刷媒体上形成各色的墨点。结果,与图像数据对应的彩色图像就印刷到了印刷媒体上。In this way, when the tone number conversion process is completed, the printer driver starts the interleaving process (step S108). The interleaving process is a process of sequentially converting image data converted into a format indicating whether or not dots are formed to be transmitted to the
下面,说明在实施例1的色调数变换处理中通过平行地处理多个光栅而迅速地进行有无点形成的判断的处理。Next, in the tone number conversion process of the first embodiment, processing for quickly performing a determination of the presence or absence of dot formation by processing a plurality of rasters in parallel will be described.
B-3.实施例1的色调数变换处理B-3. Hue number conversion processing in
(a)利用误差扩散法的色调数变换处理的概要(a) Outline of the tone number conversion process using the error diffusion method
下面,作为说明平行地进行多个光栅有无点形成的判断的方法和通过平行进行而缩短色调数变换处理所需要的时间的原理的准备,简单地说明在所谓的误差扩散法中判断沿着光栅有无点形成的方法。Next, as a preparation for explaining the method of judging the presence or absence of dot formation in a plurality of rasters in parallel and the principle of shortening the time required for the tone number conversion process by doing it in parallel, a brief description will be given of judging along the lines in the so-called error diffusion method. There are methods of dot-free formation of gratings.
图5是将要判断有无点形成的图像的一部分放大而概念式地表示的说明图。1各1各的小方格表示像素,像素排一横列,形成光栅。为了便于说明,把图5(a)所示的案板上面的光栅称为「光栅0」、就其下面的光栅称为「光栅1」,其他依次晁「光栅2」、「光栅3」。为了区别各个像素,对各像素也标为「Pmn」。像素Pmn表示光栅m的第n个像素。图4所示的色变换处理后的图像数据是使各色的色调值与各像素对应的数据。FIG. 5 is an explanatory diagram conceptually showing enlarged part of an image to be judged whether or not dot formation is present. The small squares of 1 and 1 represent pixels, and the pixels are arranged in a row to form a raster. For ease of explanation, the grating on the cutting board shown in Figure 5(a) is called "grating 0", the grating below it is called "grating 1", and the others are "grating 2" and "grating 3" in turn. In order to distinguish each pixel, each pixel is also marked with "Pmn". Pixel Pmn represents the nth pixel of raster m. The image data after the color conversion process shown in FIG. 4 is data in which the tone value of each color is associated with each pixel.
误差扩散法,如以下说明的那样,沿着光栅逐个像素判断有无点形成。图5(a)是概念式地表示对像素P11有无点形成的情况的说明图。如像素P11那样,在本说明书中将要判断有无点形成的像素称为目的像素。图中,通过用粗线框住像素P11来表示目的像素。另外,图中画了斜线的区域表示该区域的像素已进行了有无点形成的判断。In the error diffusion method, the presence or absence of dot formation is judged pixel by pixel along the raster, as described below. FIG. 5( a ) is an explanatory diagram conceptually showing whether or not dots are formed on the pixel P11 . Like the pixel P11 , a pixel whose presence or absence of dot formation is to be determined is referred to as a target pixel in this specification. In the figure, the pixel of interest is indicated by framing the pixel P11 with a thick line. In addition, hatched areas in the figure indicate that the pixels in this area have already been judged as to whether or not dots are formed.
如图5(a)所示,对目的像素P11判断有无点形成时,其结果则是在目的像素P11中将发生色调误差E11。即,不论像素P11形成了点或未形成了点,像素P11中表现的色调值(以下,将这样的色调值称为结果值)通常与该像素的图像数据的色调值不一致。因此,像素P11的结果值与像素P11的图像数据的色调值之差就在目的像素中发生色调误差。误差扩散法对目的像素的周边未判断像素加上指定的权重,将每次判断有无点形成时发生的色调误差扩散。向周边的未判断像素扩散时使用的权重系数称为误差扩散系数,以目的像素为中心,对每个像素预先进行确定。As shown in FIG. 5( a ), when the presence or absence of dot formation is determined for the target pixel P11 , as a result, a tone error E11 occurs in the target pixel P11 . That is, regardless of whether the pixel P11 forms a dot or not, the tone value expressed in the pixel P11 (hereinafter, such a tone value is referred to as a result value) usually does not match the tone value of the image data of the pixel. Therefore, the difference between the resultant value of the pixel P11 and the tone value of the image data of the pixel P11 causes a tone error in the target pixel. The error diffusion method adds a specified weight to the surrounding non-judged pixels of the target pixel, and diffuses the color tone error that occurs every time it is judged whether there is a dot formation. The weight coefficient used when spreading to surrounding undetermined pixels is called an error diffusion coefficient, and is determined in advance for each pixel centering on the target pixel.
图6是决定误差扩散系数的情况的说明图。图6中画了斜线的像素是目的像素,根据到目的像素的位置来决定各像素的误差扩散系数。这样,以目的像素为中心设定向周边像素的误差扩散系数的矩阵称为误差扩散矩阵。例如,在图6(a)的误差扩散矩阵中,对于目的像素右边相邻的像素,设定误差扩散系数K01为「1/4」。因此,使用图6(a)的误差扩散矩阵时,在目的像素中发生的色调误差的1/4误差分配给右边相邻的像素。同样,对于目的像素的左下、正下、右下方的各像素,也分配在目的像素中发生的色调误差的1/4误差。误差扩散矩阵不限于图6所示的示例,扩散误差的范围及误差扩散系数等可以设定为各种值,在实际的误差扩散法中,为了得到良好的画质,根据情况使用适当的误差扩散矩阵。为了避免说明的复杂化,在以下的说明中,使用示例的误差扩散矩阵中扩散范围最窄的矩阵即图6(a)的误差扩散矩阵进行说明。FIG. 6 is an explanatory diagram of a case where an error diffusion coefficient is determined. The obliquely drawn pixels in FIG. 6 are target pixels, and the error diffusion coefficient of each pixel is determined according to the position to the target pixel. In this way, a matrix in which error diffusion coefficients are set to peripheral pixels centered on a target pixel is called an error diffusion matrix. For example, in the error diffusion matrix of FIG. 6( a ), for the pixel adjacent to the right of the target pixel, the error diffusion coefficient K01 is set to "1/4". Therefore, when the error diffusion matrix of FIG. 6( a ) is used, 1/4 of the hue error occurring in the target pixel is allocated to the pixel adjacent to the right. Similarly, the 1/4 error of the hue error generated in the target pixel is allocated to each of the lower left, right lower, and lower right pixels of the target pixel. The error diffusion matrix is not limited to the example shown in Figure 6. The range of the diffusion error and the error diffusion coefficient can be set to various values. In the actual error diffusion method, in order to obtain a good image quality, an appropriate error is used according to the situation diffusion matrix. In order to avoid complicating the description, in the following description, the error diffusion matrix in FIG. 6( a ), which is the matrix with the narrowest diffusion range among the exemplary error diffusion matrices, is used for description.
作为误差扩散矩阵,如果使用图6(a)的矩阵,如图5(a)所示,在目的像素P11中发生的色调误差E11分别向右边相邻的像素P12、左下方的像素P20、正下方的像素P21、右下方的像素P22等共计4个像素各分配色调误差E00的1/4。4个周边像素中的像素P20、像素P21、像素P22等3个像素与目的像素P11不同,是属于光栅2的像素。这样,向目的像素周边的各像素扩散的误差(扩散误差)就在进行这些各像素的点形成判断时使用,所以,必须将各像素区别开进行存储。因此,扩散误差就存储到可以存储大量的像素的扩散误差的大容量的RAM106中(参见图2)。As the error diffusion matrix, if the matrix in FIG. 6(a) is used, as shown in FIG. A total of 4 pixels including the lower pixel P21 and the lower right pixel P22 are assigned 1/4 of the color tone error E00. Among the 4 peripheral pixels, 3 pixels, including the pixel P20, the pixel P21, and the pixel P22, are different from the target pixel P11. Pixels belonging to
如果将像素P11的色调误差向周边像素扩散了,就对右边相邻的像素P12开始进行有无点形成的判断。图5(b)是概念式地表示判断目的像素P12有无点形成的情况的说明图。在进行点形成判断时,首先,读出从周边像素向目的像素P12分配而积累的扩散误差,用读出的扩散误差修正目的像素P12的图像数据。如图5(b)所示,在目的像素P12上,积累了从已进行了点形成判断的周边像素即像素P01、像素P02、像素P03、像素P11等4个像素按照上述误差扩散矩阵扩散来的误差。从RAM106中读出该扩散误差,修正目的像素P12的图像数据,通过将得到的修正值与指定的阈值进行比较,判断有无点形成。图5(c)表示对新的目的像素P12判断有无点形成的状态。判断有无点形成的结果,是在新的目的像素P12中发生了色调误差E12,所以,和用图5(a)说明的一样,按照误差扩散矩阵将该色调误差向周边像素扩散。When the color tone error of the pixel P11 is diffused to the surrounding pixels, the determination of the presence or absence of dot formation is started for the pixel P12 adjacent to the right. FIG. 5( b ) is an explanatory diagram conceptually showing the state of judging the presence or absence of dot formation in the target pixel P12 . When performing dot formation determination, first, the accumulated diffusion errors distributed from peripheral pixels to the target pixel P12 are read out, and the image data of the target pixel P12 is corrected using the read diffusion errors. As shown in Figure 5(b), on the target pixel P12, four pixels from the surrounding pixels that have been judged to form dots, that is, the pixel P01, the pixel P02, the pixel P03, and the pixel P11, are accumulated according to the above-mentioned error diffusion matrix. error. This diffusion error is read out from the
如果将在像素P12中发生的色调误差向周边像素扩散了,就开始对位于更右边相邻的像素P13判断有无点形成。在新的目的像素P13中也发生色调误差,所以,按照误差扩散矩阵将该误差向周边像素扩散,并进行更右边相邻的像素有无点形成的判断。这样,如果将色调误差向周边像素扩散了,就使目的像素逐次向右移动1像素,如果到达了图像的右端的像素,就暂时返回到图像的左端,开始对位于下一光栅的像素(在图5所示的例中,是像素P20)进行有无点形成的判断。和光栅1一样,如果对光栅2也到达了图像的右端的像素,就再次返回到图像的左端,开始进行光栅3的处理。When the color tone error generated in the pixel P12 spreads to the surrounding pixels, it starts to judge whether or not dots are formed in the pixel P13 adjacent to the right. A color tone error also occurs in the new target pixel P13, so the error is diffused to the surrounding pixels according to the error diffusion matrix, and it is judged whether there is dot formation in the pixel adjacent to the right. In this way, if the hue error is diffused to the surrounding pixels, the target pixel is moved to the right by 1 pixel one by one, and if it reaches the pixel at the right end of the image, it returns to the left end of the image temporarily, and begins to align the pixel at the next raster (in the next raster). In the example shown in FIG. 5 , it is the pixel P20) that determines whether or not dots are formed. Like
这样,在误差扩散法中,就是沿着光栅使目的像素逐次移动1像素,考虑从周边像素扩散来的扩散误差而进行有无点形成的判断的。通过判断而在目的像素中发生的色调误差向周边的未判断像素扩散并进行存储,在判断这些未判断像素有无点形成时使用。In this way, in the error diffusion method, the target pixel is shifted one by one along the raster, and the presence or absence of dot formation is determined in consideration of diffusion errors diffused from peripheral pixels. The color tone error generated in the target pixel by the judgment is diffused to and stored in surrounding unjudged pixels, and is used when judging whether or not dots are formed in these unjudged pixels.
这里,如前所述,在周边像素中也包含与目的像素所属的光栅不同的光栅上的像素。有无点形成的判断沿着光栅进行,所以,即使已分配了扩散误差,在开始进行该像素所属的光栅的处理之前,也必须存储分配的扩散误差。此外,由于光栅中包含大量的像素,所以,对于相当数量的像素必须按区别各像素的状态存储分配来的扩散误差。为了存储扩散误差,使用存储容量大的RAM106的理由就在于此。Here, as described above, pixels on a raster different from the raster to which the target pixel belongs are also included in the peripheral pixels. The presence or absence of dot formation is determined along the raster, so even if a diffusion error has been allocated, it is necessary to store the allocated diffusion error before starting the processing of the raster to which the pixel belongs. Furthermore, since a large number of pixels are included in the raster, it is necessary to store the assigned diffusion error for a considerable number of pixels in a state that distinguishes each pixel. This is the reason for using the
另外,为了将每次对目的像素判断有无点形成时发生的色调误差向周边的未判断像素扩散,必须对RAM106频繁地读写数据。如果对RAM106频繁地读写数据,就要增加该读写用的时间,从而将延长判断有无点形成所需要的时间。In addition, in order to spread the color tone error that occurs every time the presence or absence of dot formation is judged for the target pixel to surrounding unjudged pixels, it is necessary to frequently read and write data to the
(b)本实施例的色调数变换处理的概要(b) Outline of tone number conversion processing in this embodiment
与此相反,在本实施例的色调数变换处理中,如下所述,对多条光栅平行地进行有无点形成的判断。这样,将减少对RAM106读写数据的频度,所以,可以迅速地进行有无点形成的判断。下面,说明通过平行地进行多个光栅的处理而迅速地进行有无点形成的判断的原理。On the other hand, in the tone number conversion process of this embodiment, the presence or absence of dot formation is determined in parallel for a plurality of rasters as described below. In this way, the frequency of reading and writing data to the
图7是作为最简单的例子表示对2条光栅平行地进行有无点形成的判断的原理的说明图。这里,对光栅i和其下方的光栅j这2条光栅平行地进行有无点形成的判断。FIG. 7 is an explanatory diagram showing, as the simplest example, the principle of judging the presence or absence of dot formation with respect to two gratings in parallel. Here, whether or not dots are formed is judged in parallel with two gratings, i.e., grating i and grating j below it.
首先,判断光栅i的最左侧的像素Pi0。图7(a)概念式表示判断像素Pi0有无点形成的情况。误差从位于光栅i的正上方的光栅h的像素Ph0及像素Ph1等分配来存储到像素Pi0中。因此,从计算机100的RAM106中读出像素Pi0存储的扩散误差,修正图像数据在像素Pi0中的色调值,通过将得到的修正值与指定的阈值进行比较,对像素Pi0判断有无点形成。这样,在判断像素Pi0有无点形成时,在像素Pi0中就发生色调误差,所以,按照误差扩散矩阵将其向周边像素扩散。这里,为了避免说明复杂化,使用图6(a)所示的比较简单的误差扩散矩阵进行说明。为了便于理解,将与图6(a)的误差扩散矩阵相同的矩阵示于图7(b)。在像素Pi0中发生的色调误差按照图7(b)的误差扩散矩阵分配给像素Pi1、像素Pj0、像素Pj1等3个像素,并且这些扩散误差的值存储到CPU102中内置的寄存器中。在图7(a)中,用粗箭头概念式地表示色调误差从像素Pi0向周边像素扩散的情况。First, determine the leftmost pixel Pi0 of raster i. Fig. 7(a) conceptual formula shows the situation of judging the presence or absence of dot formation in the pixel Pi0. The error is allocated from the pixel Ph0 and the pixel Ph1 of the raster h located directly above the raster i, and is stored in the pixel Pi0. Therefore, the diffusion error stored in the pixel Pi0 is read out from the
在本说明书中,平行地处理的多个光栅间的扩散误差(在图7中,例如从光栅i的像素向光栅j的像素扩散的扩散误差)存储到寄存器中,不是平行地处理的光栅间的扩散误差(在图7中,例如从光栅j的像素向光栅k的像素扩散的扩散误差)存储到RAM106中。如前所述,寄存器可以比RAM106高速地进行读写,所以,通过灵活使用寄存器,可以更迅速地进行色调数变换处理。平行地处理的光栅间的误差不是一定必须存储到寄存器中,也可以例如存储到RAM106中。这些立即要使用的扩散误差即使存储到RAM106中,通常,也可以使用留在CPU102的高速缓冲存储器内的值,所以,实际上可以高速地进行读写,从而可以迅速地进行色调数变换处理。In this specification, the diffusion error between multiple rasters processed in parallel (in FIG. 7, for example, the diffusion error diffused from the pixel of raster i to the pixel of raster j) is stored in the register, not between the rasters processed in parallel. The diffusion error (in FIG. 7 , for example, the diffusion error diffused from the pixel of raster j to the pixel of raster k) is stored in
如果对像素Pi0判断了有无点形成并扩散了发生的色调误差,就开始进行右边相邻的像素Pi1的有无点形成的判断。对像素Pi1,位于其上一行的光栅h的像素中发生的色调误差按照图7(b)的误差扩散矩阵进行扩散,并预先存储到RAM106中。因此,读出从光栅h的像素扩散来的预先存储在RAM106中的误差,用该扩散误差和从像素Pi0分配给像素Pi1并存储到寄存器中的扩散误差修正像素Pi1的图像数据的色调值。这样,像素Pi1的图像数据就用从位于光栅h上像素Ph0、像素Ph1、像素Ph2和像素Pi0扩散来的误差进行了修正,所以,可以得到与通常的误差扩散法相等的修正值。When the presence or absence of dot formation is determined for the pixel Pi0 and the generated tone error is diffused, the determination of the presence or absence of dot formation in the pixel Pi1 adjacent to the right begins. For the pixel Pi1, the color tone error generated in the pixel of the raster h located one row above it is diffused according to the error diffusion matrix of FIG. 7( b ), and stored in the
比较该修正值与指定的阈值的大小关系,如果修正值大于阈值,就判定在像素Pi1中形成了点,否则就判定未形成点。判断的结果,在像素Pi1中也发生色调误差,所以,按照误差扩散矩阵分配给周边的4个像素即像素Pi2、像素Pj0、像素Pj1和像素Pj2。分配给这4个像素的扩散误差的值按各像素存储到CPU102的寄存器中。在图7(a)中,用细的实线箭头概念式地表示在像素Pi1中发生的色调误差向周边像素扩散的情况。对于像素Pj0,已存储了从像素Pi0扩散来的扩散误差,所以,将从像素Pi1扩散来的扩散误差与该值相加后进行存储。另外,判断了像素Pi1中有无点形成时,就不需要存储向像素Pi1扩散的扩散误差所使用的寄存器了,所以,为了存储从像素Pi1分配给其他像素的扩散误差,可以使用该寄存器。The magnitude relationship between this correction value and a specified threshold is compared, and if the correction value is larger than the threshold, it is determined that a dot is formed in the pixel Pi1, otherwise it is determined that a dot is not formed. As a result of the judgment, a color tone error also occurs in pixel Pi1, so it is assigned to four surrounding pixels, namely, pixel Pi2, pixel Pj0, pixel Pj1, and pixel Pj2, according to the error diffusion matrix. The values of diffusion errors assigned to these four pixels are stored in registers of the
如果对位于光栅i上的像素Pi0和像素Pi1判断了有无点形成,就开始对位于光栅j的左端的像素Pj0进行有无点形成的判断。即,这里通过有无点形成的判断而发生的色调误差按照图7(b)的误差扩散矩阵向周边像素扩散,所以,如果分配了像素Pi0的扩散误差和像素Pi1的扩散误差,对像素Pj0就是分配了所有的扩散误差。因此,在进行了这2个像素的点形成的判断之后,进行像素Pj0的判断。When the presence or absence of dot formation is determined for the pixels Pi0 and Pi1 located on the raster i, the determination of the presence or absence of dot formation is started for the pixel Pj0 located at the left end of the raster j. That is, here, the color tone error generated by the judgment of the presence or absence of dots is diffused to the surrounding pixels according to the error diffusion matrix of FIG. is to distribute all the diffusion errors. Therefore, after the determination of the dot formation of these two pixels is performed, the determination of the pixel Pj0 is performed.
图7(c)是概念式地表示判断像素Pj0有无点形成的情况的说明图。按照图7(b)所示的误差扩散矩阵,误差从像素Pi0和像素Pi1向像素Pj0扩散,如上所述,该误差的值不是存储到RAM106中,而是存储在CPU102的寄存器内。因此,使用该值修正图像数据在像素Pj0中的色调值,根据修正值与阈值的大小关系判断有无点形成。判断的结果,在像素Pj0中发生的色调误差按照误差扩散矩阵向周边的像素Pj1、像素Pk0、像素Pk1等3个像素扩散。FIG. 7( c ) is an explanatory diagram conceptually showing a state of judging the presence or absence of dot formation in the pixel Pj0 . According to the error diffusion matrix shown in FIG. 7( b ), the error is diffused from the pixel Pi0 and the pixel Pi1 to the pixel Pj0 , and the value of the error is not stored in the
这里,在图7所示的例中,平行地对光栅i的像素和光栅j的像素进行有无点形成的判断。这样,对像素Pk0和像素Pk1的2个像素的有无点形成的判断就是在光栅i和光栅j的像素的判断全部结束之后进行的。因此,向像素Pk0的扩散误差和向像素Pk1的扩散误差的值可以认为暂时不使用,所以,这些值存储到RAM106中。另一方面,向像素Pj1的扩散误差很快就要使用,所以,存储到CPU102的寄存器中。这样,由于对光栅i和光栅j平行地进行这2个光栅有无点形成的判断,所以,在光栅i之上的光栅中发生的向光栅i的像素扩散的误差存储到RAM106中。同样,在光栅j中发生的向光栅k的像素扩散的误差也存储到RAM106中。与此相反,在光栅i中发生的向光栅j的像素扩散的误差存储到CPU102的寄存器中。在图7中,在光栅i和光栅k中画斜线表示向这些光栅的像素扩散的扩散误差存储到RAM106中。Here, in the example shown in FIG. 7 , whether or not dots are formed is determined in parallel for the pixels of the raster i and the pixels of the raster j. In this way, the determination of the presence or absence of dot formation in the two pixels of the pixel Pk0 and the pixel Pk1 is performed after the determination of all the pixels of the raster i and the raster j is completed. Therefore, the values of the diffusion error to the pixel Pk0 and the diffusion error to the pixel Pk1 are considered to be temporarily unused, and therefore these values are stored in the
另外,在图7(c)中,从像素Pj0指向像素Pk0的箭头或从像素Pj0指向像素Pk1的箭头使用空心箭头,表示向这些像素分配的扩散误差存储在CPU102的寄存器中。对像素Pj0已判断了有无点形成,所以,可以将存储向像素Pj0的扩散误差的寄存器用于其他目的,利用用于存储向像素Pj1的扩散误差。In FIG. 7( c ), the arrows pointing from pixel Pj0 to pixel Pk0 or from pixel Pj0 to pixel Pk1 use hollow arrows, indicating that the diffusion errors assigned to these pixels are stored in registers of the
这样,如果将在像素Pj0中发生的色调误差向周边像素扩散了,就将判断光栅i的像素Pi1有无点形成而发生的色调误差向周边像素扩散,然后,判断光栅j的像素Pj1有无点形成。图7(d)是概念式表示该情况的说明图。在进行像素Pi2有无点形成的判断时,使用从光栅h的像素扩散来的存储在RAM106中的扩散误差和从像素Pi1扩散来的存储在寄存器中的扩散误差修正图像数据的色调值,判断有无点形成。通过判断而发生的色调误差向周边像素扩散。如图7(d)中用粗线箭头所示的那样,向周边像素的扩散误差存储到寄存器中。然后,在进行像素Pj1有无点形成的判断时,使用寄存器存储的扩散误差修正图像数据的色调值,根据与指定的阈值的大小关系判断有无点形成。通过判断我发生的色调误差和向光栅k的像素的扩散误差存储到RAM106中,向光栅j的像素的扩散误差存储到寄存器中。通过上述处理,如果对像素Pi2和像素Pj1的处理结束了,就按照同样的办法进行像素Pi3和像素Pj2的处理。In this way, if the color tone error generated in the pixel Pj0 is diffused to the surrounding pixels, the color tone error generated by judging the presence or absence of dot formation in the pixel Pi1 of the raster i is diffused to the surrounding pixels, and then the presence or absence of the pixel Pj1 of the raster j is judged. dots formed. FIG. 7( d ) is an explanatory diagram conceptually representing this situation. When judging whether the pixel Pi2 has a dot or not, the color tone value of the image data is corrected using the diffusion error stored in the
在图7(d)的像素中与圆圈引起标注的号码表示对光栅i的像素和光栅j的像素判断有无点形成的顺序。如图所示,对光栅i的像素和位于该像素的左下方的光栅j的像素交替地进行有无点形成的判断。这样,如果对光栅i和光栅j平行地进行了处理,就可以将向光栅j的像素的扩散误差存储到寄存器中,将向光栅k的像素的扩散误差存储到RAM106中。即,可以减少对RAM106写入读出扩散误差的频度,从而可以迅速地进行有无点形成的判断。The numbers marked with circles in the pixels of FIG. 7( d ) indicate the order of judging the presence or absence of dot formation for the pixels of raster i and raster j. As shown in the figure, the determination of the presence or absence of dot formation is alternately performed on the pixel of raster i and the pixel of raster j located on the lower left of the pixel. In this way, if raster i and raster j are processed in parallel, the diffusion error for the pixel of raster j can be stored in the register, and the diffusion error for the pixel of raster k can be stored in the
如图7所示,对于光栅i的左端的像素即像素Pi0,在该像素的左下方不存在光栅j的像素,所以,变通地在像素Pi0之后进行位于相同的光栅i上的像素Pi1的处理。在像素Pi0的左下方设想架空的像素Pj-1,在紧接像素Pi0进行架空的像素Pj-1的处理之后,对这样的架空像素Pj-1可以不使用有无点形成的判断结果而舍弃。这样,对于左端的像素,也可以对架空的像素进行通常的处理,所以,就不需要变通的处理了。As shown in FIG. 7, for the pixel Pi0 at the left end of the raster i, there is no pixel of the raster j at the lower left of the pixel, so the processing of the pixel Pi1 located on the same raster i is performed after the pixel Pi0 . Assume an overhead pixel Pj-1 at the lower left of pixel Pi0, after the overhead pixel Pj-1 is processed immediately after pixel Pi0, such overhead pixel Pj-1 can be discarded without using the judgment result of dot formation . In this way, for the pixels at the left end, the usual processing can also be performed on the overhead pixels, so there is no need for flexible processing.
图8是表示对2条光栅平行地进行有无点形成的判断的处理的流程的流程图。该处理由计算机100的CPU102进行。如前所述,本实施例的彩色打印机是可以形成C、M、Y、K等4色的墨点的打印机,图8所示的色调数变换处理也按各色进行,但是,下面为了避免说明的复杂化,不特定墨点的颜色了说明。当然,除了上述4色外,还可以增加LC墨水、LM墨水,应用于6色打印机。FIG. 8 is a flowchart showing the flow of processing for judging the presence or absence of dot formation for two rasters in parallel. This processing is performed by
另外,如前所述,本实施例的彩色打印机也可以采用可以对各色形成大小变通的点的可变点打印机。使用可变点铥时,例如使用可以形成大点、中点、小点的各种点的可变点打印机时,以下说明的色调数变换处理就对各种大小的点进行。In addition, as described above, the color printer of this embodiment may also be a variable dot printer capable of forming dots of varying sizes for each color. When using variable dot thulium, for example, when using a variable dot printer capable of forming large, medium, and small dots, the tone number conversion process described below is performed for dots of various sizes.
这样,随着使用的墨水的颜色增加以及可以形成各种大小的点,进行色调数变换处理的次数也增加,所以,进行这些处理所需要的时间也将延长。用于以下说明的本实施例的色调数变换处理可以迅速的处理,所以,也极适合应用于这种情况。In this way, as the color of the ink used increases and dots of various sizes can be formed, the number of times to perform the tone number conversion process also increases, so the time required for these processes will also be extended. The tone number conversion processing used in this embodiment described below can be processed quickly, so it is very suitable for this case as well.
开始进行本实施例的色调数变换处理时,首先,从平行地处理的光栅的第1条光栅中取得要判断有无点形成的像素的图像数据还向该像素扩散的扩散误差(步骤S200)。这里,设要处理的像素为光栅i的第n各像素Pin。图像数据Cdin还扩散误差Edin都存储到RAM106中。When the tone number conversion process of this embodiment is started, at first, the diffusion error that the image data of the pixel for which the presence or absence of dot formation is to be judged is diffused to the pixel is obtained from the first raster of the parallel processed rasters (step S200) . Here, it is assumed that the pixel to be processed is each n-th pixel Pin of the raster i. Both image data Cdin and diffusion error Edin are stored in
然后,通过将像素Pin的图像数据Cdin还扩散误差Edin相加,计算像素Pin的修正数据Cxin(步骤S202)。比较这样得到的修正数据Cxin还指定的阈值th(步骤S204),如果修正数据大,就判定在像素Pin中形成了点,对表示判断结果的变数Cr写入表示形成点的值「1」(步骤S206)。否则就判定在像素Pin中未形成点,对变数Cr写入表示未形成点的值「0」(步骤S208)。Then, the correction data Cxin of the pixel Pin is calculated by adding the image data Cdin of the pixel Pin and the diffusion error Edin (step S202 ). Comparing the correction data Cxin obtained in this way with the specified threshold th (step S204), if the correction data is large, it is judged that a dot is formed in the pixel Pin, and the value "1" representing the formation of a dot is written into the variable Cr representing the judgment result ( Step S206). Otherwise, it is determined that no dot is formed in the pixel Pin, and a value "0" indicating that no dot is formed is written into the variable Cr (step S208).
如果对光栅i的像素Pin判断了有无点形成,就计算伴随该判断而发生的色调误差(步骤S210)。根据形成了点或未形成点,从修正数据Cxin中减去在像素Pin中表现的色调值(结果值),便可求出色调误差Ein。将误差扩散系数乘以得到的色调误差,计算向周边像素扩散的扩散误差。误差扩散系数根据误差扩散矩阵对各像素设定。向这样求出的光栅i的像素扩散的扩散误差还向位于光栅i正下方的光栅j的像素扩散的扩散误差存储到寄存器中(步骤S212)。向除此以外的像素扩散的扩散误差例如若有向光栅k的像素扩散的扩散误差等,就存储到RAM106中。When it is judged whether or not dots are formed in the pixel Pin of the raster i, the hue error resulting from the judgment is calculated (step S210). The color tone error Ein can be obtained by subtracting the tone value (result value) expressed in the pixel Pin from the correction data Cxin according to whether a dot is formed or not. The obtained hue error is multiplied by the error diffusion coefficient to calculate the diffusion error diffused to the surrounding pixels. The error diffusion coefficient is set for each pixel based on the error diffusion matrix. The diffusion error diffused to the pixel of raster i obtained in this way is also stored in the register as the diffusion error diffused to the pixel of raster j located directly below the raster i (step S212). Diffusion errors diffused to other pixels are stored in
这样,如果对光栅i的像素的有无点形成的判断还误差的扩散结束了,就开始对光栅j的像素Pjn-1进行有无点形成的判断。即,从RAM106中读出像素Pjn-1的图像数据Cdin(步骤S214),从寄存器中读入向像素Pjn-1扩散的扩散误差Edin-1(步骤S216)。从寄存器读入的扩散误差Edin-1中,也包括从刚进行了有无点形成的判断的像素Pin扩散来的扩散误差。光栅i的像素Pin是左端的像素Pi0时,就对架空的像素Pj-1进行这样的处理。In this way, when the determination of the presence or absence of dot formation in the pixel of raster i is completed and the diffusion of the error is completed, the determination of the presence or absence of dot formation in the pixel Pjn-1 of raster j is started. That is, the image data Cdin of the pixel Pjn-1 is read from the RAM 106 (step S214), and the diffusion error Edin-1 diffused to the pixel Pjn-1 is read from the register (step S216). The diffusion error Edin-1 read from the register also includes the diffusion error diffused from the pixel Pin for which the determination of whether or not dot formation has just been performed. When the pixel Pin of the raster i is the pixel Pi0 at the left end, such processing is performed on the overhead pixel Pj-1.
其次,将图像数据Cdin-1与扩散误差Edin-1相加,计算修正数据Cxin-1(步骤S218),比较得到的修正数据Cxin-1还指定的阈值th(步骤S220),如果修正数据大,就判断形成了点,对表示判断结果的变数Cr写入表示形成点的值「1」(步骤S222)。否则就写入表示未形成点的值「0」(步骤S224)。然后,计算伴随该判断而在像素Pjn-1中发生的色调误差Ejn-1(步骤S226)。从修正数据Cxin-1中减去像素Pjn-1的结果值,便可求出色调误差Ejn-1。将按照误差扩散矩阵设定的误差扩散系数乘以得到的色调误差,计算向周边像素扩散的扩散误差。这样,如果求出了扩散误差,就将向光栅j的像素扩散的扩散误差存储到寄存器中,将向光栅k的像素扩散的扩散误差存储到RAM106中(步骤S228)。Next, add the image data Cdin-1 and the diffusion error Edin-1 to calculate the correction data Cxin-1 (step S218), compare the obtained correction data Cxin-1 with the specified threshold th (step S220), if the correction data is large When it is judged that a dot is formed, a value "1" indicating that a dot is formed is written into the variable Cr representing the judgment result (step S222). Otherwise, a value "0" indicating that no dot is formed is written (step S224). Then, the hue error Ejn-1 generated in the pixel Pjn-1 accompanying this determination is calculated (step S226). The hue error Ejn-1 can be obtained by subtracting the result value of the pixel Pjn-1 from the correction data Cxin-1. The color tone error obtained is multiplied by the error diffusion coefficient set according to the error diffusion matrix, and the diffusion error diffused to the surrounding pixels is calculated. Thus, when the diffusion error is obtained, the diffusion error diffused to the pixel of raster j is stored in the register, and the diffusion error diffused to the pixel of raster k is stored in the RAM 106 (step S228).
通过上述处理,如果对光栅i的像素和光栅j的像素的点形成判断和误差的扩散处理结束了,就判断光栅i和光栅j的全部像素的处理是否结束了(步骤S230)。还有未处理的像素时,就使像素的位置向右移动1像素,即用「n+1」的值置换「n」(步骤S232),并返回到步骤S200,继续进行一系列的处理。没有了未处理的像素时,就判定所有光栅的处理已结束了(步骤S234),还有未处理的光栅时,就使光栅位置向下移动2条光栅,即用「i+2」的值置换「i」(步骤S236),并返回到步骤S200,继续进行一系列的处理。没有了未处理的光栅时,图8所示的色调数变换处理即告结束,并返回到图4所示的图像数据变换处理。Through the above processing, if the dot formation judgment and error diffusion processing for the pixels of raster i and raster j are completed, it is judged whether the processing of all the pixels of raster i and raster j is completed (step S230). When there are still unprocessed pixels, the position of the pixel is moved to the right by 1 pixel, that is, "n" is replaced with the value of "n+1" (step S232), and then returns to step S200 to continue a series of processing. When there are no unprocessed pixels, it is determined that the processing of all rasters has ended (step S234). Substitute "i" (step S236), and return to step S200 to continue a series of processing. When there is no more unprocessed raster, the tone number conversion process shown in FIG. 8 is terminated, and the process returns to the image data conversion process shown in FIG. 4 .
如上所述,在实施例1的色调数变换处理中,对光栅i的像素还光栅j的像素平行地交替判断有无点形成。这样,对于光栅j的像素,紧接在光栅i的像素之后或很快就进行有无点形成的判断。因此,对于光栅j的像素有无点形成,不将从光栅i的像素向周边像素的扩散误差暂时存储到误差缓冲器中也可以直接进行判断,所以,可以减少向误差缓冲器的写入频度。只要可以减少向误差缓冲器的写入频度,就可以缩短判断有无点形成所需要的时间,所以,可以迅速地进行色调数变换处理。As described above, in the tone number conversion process of the first embodiment, the presence or absence of dot formation is alternately determined in parallel with respect to the pixel of raster i and the pixel of raster j. In this way, for the pixel of raster j, it is judged immediately after the pixel of raster i or whether there is dot formation or not. Therefore, whether or not dots are formed in the pixel of raster j can be directly judged without temporarily storing the diffusion error from the pixel of raster i to the surrounding pixels in the error buffer, so that the frequency of writing to the error buffer can be reduced. Spend. As long as the frequency of writing to the error buffer can be reduced, the time required for judging the presence or absence of dot formation can be shortened, so that the tone number conversion process can be performed quickly.
另外,在需要节约误差缓冲器的存储容量时,进行对其他光栅的判断再次使用为了判断有无点形成而暂时使用的误差缓冲器的处理。这时,在上述实施例1的色调数变换处理中,对2条光栅可以将误差缓冲器按每1条光栅进行设置,所以,可以将误差缓冲器存储的全部光栅的条数减半。结果,即使不进行将判断点形成所使用的误差缓冲器为了其他光栅的判断而再次使用的处理,也可以节约误差缓冲器的容量。当然,如果平行地处理比2条多的多条光栅,可以对该多条光栅按每1条光栅设置误差缓冲器,所以,可以酒误差缓冲器的容量。Also, when it is necessary to save the storage capacity of the error buffer, a process of reusing the error buffer temporarily used for determining whether or not dots are formed is performed for the determination of another raster. In this case, in the tone number conversion process of the first embodiment above, an error buffer can be provided for each raster of two rasters, so the number of all rasters stored in the error buffer can be halved. As a result, it is possible to save the capacity of the error buffer without performing a process of reusing the error buffer used for forming the judgment point for judgment of another raster. Of course, if more than two rasters are processed in parallel, an error buffer can be provided for each of the plurality of rasters, so the capacity of the error buffer can be reduced.
B-4.变形例B-4. Modifications
(1)变形例1(1)
以上,作为最简单的例子,说明了对2条光栅平行地进行有无点形成的判断的情况,但是,平行地处理的光栅的条数不限于2条,也可以平行地进行3条以上的光栅的处理。图9是概念式地表示对3条光栅平行地进行有无点形成的判断的情况的说明图。在图9中,对光栅i、光栅j还光栅k等3条光栅平行地进行有无点形成的判断。为了避免说明的复杂化,和图7的情况一样,这里也使用图6(a)所示的误差扩散矩阵。In the above, as the simplest example, the case of judging the presence or absence of dot formation is performed on two gratings in parallel, however, the number of gratings to be processed in parallel is not limited to two, and three or more gratings may be processed in parallel. Raster processing. FIG. 9 is an explanatory diagram conceptually showing a state of judging the presence or absence of dot formation for three gratings in parallel. In FIG. 9 , whether or not dots are formed is determined in parallel for three gratings, namely, grating i, grating j, and grating k. In order to avoid complicating the description, the error diffusion matrix shown in FIG. 6( a ) is used here as in the case of FIG. 7 .
在光栅i和光栅L中画斜线,表示分配给这些光栅的像素的扩散误差存储到RAM106中。光栅i、光栅j和光栅k的各像素的圆圈符号中的数字表示判断各像素有无点形成的顺序。如图所示,对于开始的3个像素,按照和平行地处理在图7中说明的2个光栅时相同的顺序判断有无点形成。从以后的第4个像素开始,将光栅i、光栅j和光栅k的3个像素作为一组,按该顺序平行地判断有无点形成。这里,由于平行地进行光栅i~光栅k的3个光栅的处理,向这3个光栅的像素扩散的误差很快就要使用,所以,存储到CPU102的寄存器中。光栅L的像素扩散的误差在光栅i~光栅k的3个光栅的处理结束之后使用,所以,向光栅L的像素扩散的误差存储到RAM106中。通过反复进行这样的处理,便可平行地进行3个光栅的有无点形成的判断。Oblique lines in raster i and raster L indicate that the diffusion errors of the pixels assigned to these rasters are stored in
这样,如果平行地进行光栅i~光栅k的像素有无点形成的判断,在相互相邻的光栅i与光栅j或者光栅j与光栅k之间便可得到与平行地处理2光栅相同的效果。In this way, if the judgment of whether the pixels of grating i ~ grating k have dot formation is performed in parallel, the same effect as that of processing two gratings in parallel can be obtained between adjacent grating i and grating j or between grating j and grating k .
此外,如果平行地进行光栅i~光栅k的处理,对于光栅k的像素,则在紧接光栅i的像素之后或不久就要判断有无点形成。因此,即使不将从光栅i的像素向周边像素扩散的扩散误差暂时存储到误差缓冲器中,也可以直接判断光栅k的像素有无点形成,于是,可以减少向误差缓冲器的读写频度,从而可以缩短进行有无点形成的判断所需要的时间。In addition, if the processing of raster i to raster k is performed in parallel, for the pixel of raster k, it is judged whether or not dots are formed immediately after or shortly after the pixel of raster i. Therefore, even if the diffusion error diffused from the pixel of raster i to the surrounding pixels is not temporarily stored in the error buffer, it is possible to directly judge whether or not the pixel of raster k has dot formation, thereby reducing the frequency of reading and writing to the error buffer. Therefore, the time required for judging the presence or absence of dot formation can be shortened.
(2)变形例2(2)
在以上的各种实施例中,为了避免说明的复杂化,误差扩散矩阵使用了图6(a)所示的比较小的矩阵。当然,使用其他误差扩散矩阵时,也可以按照同样的方法对多个光栅的像素平行地判断有无点形成。作为一例,使用图6(b)的误差扩散矩阵,并参照图10说明平行地判断2条光栅有无点形成的处理。In the various embodiments above, in order to avoid the complexity of the description, the error diffusion matrix uses a relatively small matrix as shown in FIG. 6( a ). Of course, when other error diffusion matrices are used, the presence or absence of dots can be judged in parallel for pixels of a plurality of gratings in the same way. As an example, using the error diffusion matrix of FIG. 6( b ), a process of judging whether or not dots are formed on two rasters in parallel will be described with reference to FIG. 10 .
为了便于理解,将使用的误差扩散矩阵示于图10(a)。该矩阵与图6(b)所示的矩阵相同。使用这样的误差扩散矩阵时,在画着斜线的目的像素中发生的色调误差不仅向与目的像素相邻的像素而且向其邻近的像素扩散。如果将其与图10(b)对照,在像素Pj2中发生的色调误差,对于光栅i就是向像素Pi3和像素Pi4扩散,对于光栅j就是向像素Pj0~像素Pj4的个像素扩散。换言之,对于光栅j的像素Pj0,除了来自光栅i的像素Pi0的扩散误差和来自像素Pi1的扩散误差外,还分配了来自像素Pi2的扩散误差。因此,在对包含在光栅i中的3个像素的有无点形成的判断结束之后,开始进行位于光栅j中的像素Pj0的有无点形成的判断。即,使用图10(a)所示的误差扩散矩阵时,光栅i的像素与光栅j的像素的位置关系就是光栅j的像素相对于光栅i的像素滞后2像素的关系。这样,平行地进行多个光栅的处理时,包含在各光栅中的各个像素的位置关系可以根据扩散色调误差的范围来决定。保持着这样的位置关系,平行地判断这些光栅的像素有无点形成。For ease of understanding, the error diffusion matrix used is shown in FIG. 10( a ). This matrix is the same as that shown in Fig. 6(b). When such an error diffusion matrix is used, the hue error generated in the obliquely-lined target pixel is diffused not only to the pixels adjacent to the target pixel but also to the adjacent pixels. Comparing this with FIG. 10( b ), the hue error occurring in pixel Pj2 spreads to pixels Pi3 and Pi4 for raster i, and spreads to pixels Pj0 to Pj4 for raster j. In other words, for pixel Pj0 of raster j, a diffusion error from pixel Pi2 is assigned in addition to the diffusion error from pixel PiO of raster i and the diffusion error from pixel Pi1. Therefore, after the determination of the presence or absence of dot formation of the three pixels included in the raster i is completed, the determination of the presence or absence of dot formation of the pixel Pj0 located in the raster j is started. That is, when using the error diffusion matrix shown in FIG. 10( a ), the positional relationship between the pixels of raster i and the pixels of raster j is such that the pixels of raster j lag behind the pixels of raster i by 2 pixels. In this way, when a plurality of rasters are processed in parallel, the positional relationship of each pixel included in each raster can be determined according to the range of diffuse tone error. While maintaining such a positional relationship, whether or not dots are formed in the pixels of these rasters is judged in parallel.
图10(b)是表示对光栅i的像素Pi2还光栅j的像素Pj0连续地进行有无点形成的判断的情况的说明图。图中与圆圈引起标出的数字表示在光栅i还光栅j的像素中该像素第几个进行有无点形成的判断。另外,从像素Pi2指向周边的像素的粗箭头概念式地表示在像素Pi2中发生的色调误差按照误差扩散矩阵向周边像素扩散的情况。如果将像素Pi2的色调误差向周边像素扩散了,就判断像素Pj0有无点形成。在像素Pj0中发生的色调误差中分配给光栅j的像素的扩散误差存储到CPU102的寄存器中,分配给光栅k的像素的扩散误差存储到RAM106中。从像素Pj0指向光栅k的像素的空心箭头表示分配给这些像素的扩散误差存储在RAM106中。如圆圈中的顺所示的那样,按照像素Pj01像素Pi3、像素Pj1这样的顺序对光栅i的像素还光栅j的像素交替地进行有无点形成的判断。分配给光栅i或光栅j的像素的扩散误差存储到CPU102的寄存器中,分配给光栅k的扩散误差存储到RAM106中。反复进行上述处理,如果对光栅i还光栅j的全部像素进行了有无点形成的判断,就使处理的光栅的位置向下移动2行,通过对光栅k和其之下的光栅反复进行同样的处理,使用图10(a)所示的误差扩散矩阵便可平行地进行2个光栅有无点形成的判断。FIG. 10( b ) is an explanatory diagram showing a state in which the presence or absence of dot formation is continuously determined for the pixel Pi2 of the raster i and the pixel Pj0 of the raster j. The numbers marked with the circles in the figure indicate which pixel is judged whether to form dots or not among the pixels of raster i and raster j. In addition, the thick arrow pointing from the pixel Pi2 to the surrounding pixels conceptually shows that the hue error generated in the pixel Pi2 is diffused to the surrounding pixels according to the error diffusion matrix. If the color tone error of the pixel Pi2 is diffused to the surrounding pixels, it is judged whether or not the pixel Pj0 has dot formation. Among the hue errors occurring in the pixel Pj0 , the diffusion error assigned to the pixel of raster j is stored in the register of
这样,在对光栅i和光栅j平行地进行有无点形成的判断时,也是在紧接光栅i的像素之后或很快就进行光栅j的像素有无点形成的判断。因此,即使不将从光栅i的像素向周边像素扩散的扩散误差暂时存储到误差缓冲器中,也可以直接进行光栅j的像素有无点形成的判断,所以,可以减少向误差缓冲器的读写频度。结果,减少向误差缓冲器的读写频度便可缩短进行有无点形成的判断所需要的时间。In this way, when grating i and grating j are judged whether or not dots are formed in parallel, it is also judged whether or not dots are formed in pixels of raster j immediately after or soon after the pixels of raster i. Therefore, the presence or absence of dot formation in the pixel of raster j can be directly judged without temporarily storing the diffusion error diffused from the pixel of raster i to the surrounding pixels in the error buffer, thereby reducing the number of reads to the error buffer. Write frequency. As a result, by reducing the frequency of reading and writing to the error buffer, it is possible to shorten the time required for judging whether or not dots are formed.
(3)变形例3(3)
在以上的各种实施例中,说明了在目的像素中发生的色调误差向有目的像素的光栅的像素和该光栅之下1条光栅的像素扩散的情况,但是,不限定这样的情况。例如,如果使用图6(d)所示的误差扩散矩阵,在目的像素中发生的色调误差就从有目的像素的光栅下其下2条光栅的像素扩散。图11是作为一例概念式地表示使用图6(d)所示的误差扩散矩阵时平行地判断3条光栅有无点形成的处理的说明图。In the above various embodiments, the case where the hue error generated in the target pixel is diffused to the pixels of the raster of the target pixel and the pixels of one raster below the raster has been described, but the case is not limited to such a case. For example, if the error diffusion matrix shown in FIG. 6(d) is used, the color tone error occurring in the target pixel is diffused from the pixels of the next two rasters below the target pixel. FIG. 11 is an explanatory diagram conceptually showing, as an example, the process of judging whether or not dots are formed on three rasters in parallel when the error diffusion matrix shown in FIG. 6( d ) is used.
为了便于理解,将使用的误差扩散矩阵示于图11(a)。该矩阵是和图6(d)的矩阵相同的矩阵。假定对光栅i、光栅j和光栅k这3条光栅平行地判断有无点形成。在光栅k的像素中发生的色调误差按照图11(a)的误差扩散矩阵下光栅k~光栅m的3条光栅的像素扩散,对于位于光栅L和光栅m这2条光栅上的像素,在光栅i~光栅k的3条光栅的处理结束之后判断有无点形成。因此,向光栅L和光栅m扩散的误差存储到RAM106中。在图11(b)中,在将扩散来的误差存储到RAM106中的像素中画上斜线进行表示。这样,使用图11(a)所示的误差扩散矩阵时,交替地出现扩散来的误差存储到CPU102的寄存器中的光栅和存储到RAM106中的2条光栅。For ease of understanding, the error diffusion matrix used is shown in FIG. 11( a ). This matrix is the same matrix as that of Fig. 6(d). It is assumed that the presence or absence of dot formation is judged in parallel for three gratings of grating i, grating j, and grating k. The hue error occurring in the pixel of grating k is diffused according to the pixel diffusion of the three gratings from grating k to grating m under the error diffusion matrix in Fig. 11(a). After the processing of the three rasters of raster i to raster k is completed, it is judged whether or not dots are formed. Therefore, the errors diffused to the grating L and the grating m are stored in the
(4)变形例4(4) Modification 4
将色调误差向宽的范围扩散时,从目的像素向指定远以上的远处扩散时,可以向误差缓冲器扩散。例如,设从目的像素向3像素以上的远处扩散的误差向存在误差缓冲器的像素扩散,可以使用图12(a)所示的误差扩散矩阵。在图12(a)中,从目的像素到远处跨越2条光栅,像素用虚线作为一体进行显示,是表示在这些区域中误差向2条光栅中存在误差缓冲器的光栅扩散。下面,参照图12(b)、(c)具体地说明。考虑目的像素位于存在误差缓冲器的光栅上的情况。这时,误差缓冲器位于有目的像素的光栅和其之下的2条光栅上,所以,结果便和按照图12(b)所示的矩阵扩散误差的情况相同。其次,考虑目的像素位于不存在误差缓冲器的光栅上的情况,这时,误差缓冲器位于从上下将有目的像素的光栅夹在中间的2条光栅上,所以,结果便和按照图12(c)所示的矩阵扩散误差的情况相同。When spreading the tone error over a wide range, it can be spread to the error buffer when spreading from the target pixel to a distance beyond a specified distance. For example, an error diffusion matrix shown in FIG. 12( a ) can be used assuming that an error diffused from a target pixel to a distance of 3 pixels or more is diffused to a pixel existing in an error buffer. In FIG. 12( a ), two rasters are straddled from the target pixel to the distance, and the pixels are displayed as a whole by dotted lines, indicating that errors in these areas diffuse to the rasters where error buffers exist in the two rasters. Next, it demonstrates concretely with reference to FIG.12 (b), (c). Consider the case where the pixel of interest lies on a raster where an error buffer exists. At this time, the error buffer is located on the raster of the target pixel and the two rasters below it, so the result is the same as the case where errors are diffused according to the matrix shown in FIG. 12(b). Next, consider the situation where the target pixel is located on a raster that does not have an error buffer. At this time, the error buffer is located on two rasters sandwiching the target pixel's raster from top to bottom. Therefore, the result is the same as that shown in FIG. 12( The same is true for the matrix diffusion error shown in c).
比较这样的图12(a)的误差扩散矩阵和与其对应的图6(c)的误差扩散矩阵可知,向图6(c)的像素K03和像素K13扩散的误差,在图12(a)中则集中在一起向距离目的像素3像素处的区域(图中表示为K3)扩散。同样,向图6(c)的像素K04和像素K14扩散的误差,在图12(a)中则集中在一起向距离目的像素4像素处的区域(图中表示为K4)扩散。Comparing the error diffusion matrix in Fig. 12(a) with the corresponding error diffusion matrix in Fig. 6(c), we can see that the error diffused to the pixel K03 and pixel K13 in Fig. 6(c) is in Fig. 12(a) Then gather together and spread to the
将在目的像素中发生的误差向远处扩散时,在经验上知道,即使扩散误差的像素的位置多少偏离,也不会发生太大的画质的恶化。因此,将色调误差向宽的范围扩散时,对于远处的像素,即使向有误差缓冲器的像素扩散,画质也不会发生恶化。在上述各种实施例中,不将误差向误差缓冲器扩散时,就存储到CPU102的寄存器中。因此,对于远处的像素,如果存储到误差缓冲器中,便可节约进行有无点形成的判断所使用的寄存器。如果减少了存储误差的寄存器的数量,便可使处理简化,此外,如果将节约的寄存器用于其他目的,便可迅速地进行有无点形成的判断。When an error occurring in a target pixel is diffused to a distant place, it is known empirically that even if the position of the pixel where the error is diffused is shifted to some extent, there will be no significant deterioration in image quality. Therefore, when color tone errors are diffused over a wide range, image quality does not deteriorate even if distant pixels are diffused to pixels with error buffers. In the various embodiments described above, when the error is not diffused to the error buffer, it is stored in the register of the
在以上的说明中,假定将误差向跨越2条光栅的像素扩散,但是,如果使用图12(d)所示的误差扩散矩阵,也可以跨越3条光栅进行扩散。这样,向更多条的光栅扩散时,对于向远处扩散的误差,如果向误差缓冲器扩散,就不会招致画质恶化,从而可以简单而迅速地进行处理。In the above description, it is assumed that the error is diffused to pixels spanning two rasters. However, if the error diffusion matrix shown in FIG. 12(d) is used, the error may be diffused across three rasters. In this way, when spreading to more rasters, the error that spreads far can be easily and quickly processed without degrading the image quality if it is spread to the error buffer.
C.实施例2C. Example 2
以上作为实施例1的色调数变换处理而说明的各种实施例,将通过判断有无点形成而在目的像素中发生的色调误差按照在误差扩散矩阵中设定的误差扩散系数向周边的像素扩散。从这个意义上说,可以认为实施例1的方法是基于称为所谓的误差扩散法的方法。利用不基于这样的方法而基于称为所谓的平均误差最小法的方法,也可以平行地进行多个光栅有无点形成的判断。下面,说明这样的实施例2的色调数变换处理。In the various embodiments described above as the tone number conversion processing of the first embodiment, the tone error generated in the target pixel by judging the presence or absence of dot formation is transferred to the surrounding pixels according to the error diffusion coefficient set in the error diffusion matrix. diffusion. In this sense, the method of
C-1.实施例2的色调数变换处理C-1. Hue Number Conversion Processing of
图13是概念式地表示在实施例2的色调数变换处理中通过偏心地进行多个光栅的处理而迅速地进行有无点形成的判断的原理的说明图。在进入实施例2的色调数变换处理的详细说明之前,作为其准备,先使用图13简单地说明称为平均误差最小法的方法。FIG. 13 is an explanatory diagram conceptually showing the principle of quickly performing the determination of the presence or absence of dot formation by performing the processing of a plurality of rasters eccentrically in the tone number conversion processing of the second embodiment. Before proceeding to the detailed description of the tone number conversion process in the second embodiment, a method called the method of minimizing the average error will be briefly described using FIG. 13 as a preparation.
在平均误差最小法中,判断目的像素有无点形成时,从已判断了有无点形成的周边像素中读出在各像素中发生的色调误差,考虑这些色调误差,进行目的像素有无点形成的判断。下面,参照图13(a)说明这些处理。图13(a)是表示判断像素Pi0有无点形成的情况的说明图。要判断像素Pi0有无点形成时,先将指定的权重系数乘以在像素Pi0周边的像素Ph0和像素Ph1中发生的色调误差,并计算将它们相加之后的值。在图13(a)中,在像素Ph0和像素Ph1中分别表示为Eh0、Eh1的符号,表示在各像素中发生的色调误差Eh0和Eh1。其次,用计算的值修正像素Pi0的图像数据,根据得到的修正值与指定的阈值的大小关系判断有无点形成。与色调误差相乘的权重系数,根据各像素与目的像素的相对位置关系预先对各像素设定。图13(b)是表示以目的像素为中心对周边的各像素设定权重系数的情况的说明图。图中画了斜线的像素是目的像素。例如,对目的像素左边相邻的像素,设定其权重系数为「K0-1」。对目的像素周边的各像素设定权重系数的矩阵不限于图13(b)的矩阵,可以使用图14所示的各种矩阵。In the average error minimum method, when judging the presence or absence of dots in the target pixel, the color tone error occurring in each pixel is read from the surrounding pixels for which the presence or absence of dots has been judged. formed judgments. Next, these processes will be described with reference to FIG. 13( a ). FIG. 13( a ) is an explanatory diagram showing a state of judging the presence or absence of dot formation in the pixel Pi0. To determine whether or not dots are formed in pixel Pi0, the specified weight coefficient is multiplied by the color tone error occurring in the pixel Ph0 and the pixel Ph1 around the pixel Pi0, and the value obtained by adding them is calculated. In FIG. 13( a ), the symbols respectively indicated as Eh0 and Eh1 in the pixel Ph0 and the pixel Ph1 indicate hue errors Eh0 and Eh1 that occur in the respective pixels. Next, the image data of the pixel Pi0 is corrected with the calculated value, and the presence or absence of dot formation is judged based on the magnitude relationship between the obtained correction value and the specified threshold value. The weight coefficient to be multiplied by the hue error is set in advance for each pixel based on the relative positional relationship between each pixel and the target pixel. FIG. 13( b ) is an explanatory diagram showing a case where a weight coefficient is set for each surrounding pixel centering on the target pixel. The obliquely drawn pixels in the figure are the target pixels. For example, for the pixel adjacent to the left of the target pixel, set its weight coefficient to "K0-1". The matrix for setting weight coefficients for each pixel around the target pixel is not limited to the matrix shown in FIG. 13(b), and various matrices shown in FIG. 14 can be used.
这样,如果对像素Pi0进行了有无点形成的判断,就开始对位于右边相邻的像素Pi1进行有无点形成的判断。在进行像素Pi1的有无点形成的判断时,按照图13(b)中设定的矩阵,考虑在像素Ph0、像素Ph1、像素Ph2和像素Pi0中发生的色调误差,进行有无点形成的判断。如果对像素Pi1的判断结束了,进而就开始对位于右边相邻的像素Pi2进行判断。这样,就沿着光栅逐个像素进行有无点形成的判断。作为有无点形成的判断的结果而发生的色调误差存储到设置在RAM中的误差缓冲器中,在对位于现在处理中的光栅上的全部像素进行的有无点形成的判断结束之后,在位于其下的1个光栅的处理中,再次从RAM的误差缓冲器中读出进行使用。In this way, when the determination of the presence or absence of dot formation is performed on the pixel Pi0, the determination of the presence or absence of dot formation on the pixel Pi1 adjacent to the right begins. When judging the presence or absence of dot formation in pixel Pi1, the presence or absence of dot formation is performed in consideration of color tone errors occurring in pixel Ph0, pixel Ph1, pixel Ph2, and pixel Pi0 according to the matrix set in FIG. 13(b). judge. If the determination of the pixel Pi1 ends, the determination of the adjacent pixel Pi2 on the right starts. In this way, whether or not dots are formed is judged pixel by pixel along the raster. The color tone error generated as a result of the judgment of dot formation is stored in the error buffer provided in the RAM, and after the dot formation judgment is completed for all the pixels on the raster currently being processed, the In the processing of the next raster, it is read from the error buffer of RAM again and used.
如上所述,为了使用平均误差最小法进行有无点形成的判断,每次对目的像素进行有无点形成的判断时,都必须从设置在RAM中的误差缓冲器中读出周边像素的色调误差,另外,为了将通过判断而在目的像素中发生的色调误差用于进行其他像素的有无点形成的判断,必须预先存储到误差缓冲器中。这样,由于频繁地对误差缓冲器读写色调误差,所以,进行有无点形成的判断就需要一定的时间。As mentioned above, in order to judge the presence or absence of dot formation using the method of minimizing the average error, every time the judgment of the presence or absence of dot formation is performed on the target pixel, it is necessary to read the color tone of the surrounding pixels from the error buffer provided in RAM. In addition, in order to use the color tone error generated in the target pixel by the judgment to judge the presence or absence of dot formation in other pixels, it must be stored in the error buffer in advance. In this way, since color tone errors are frequently read and written to the error buffer, it takes a certain amount of time to determine whether or not dots are formed.
与此相反,在以下说明的实施例2的色调数变换处理中,通过平行地进行多个光栅的处理,可以迅速地进行有无点形成的判断。下面,参照图13说明通过平行地进行多个光栅的处理而迅速地进行有无点形成的判断的原理。On the other hand, in the tone number conversion process of the second embodiment described below, by performing the processing of a plurality of rasters in parallel, it is possible to quickly determine the presence or absence of dot formation. Next, the principle of quickly performing the determination of the presence or absence of dot formation by performing the processing of a plurality of rasters in parallel will be described with reference to FIG. 13 .
图13是作为最简单的例子表示对2条光栅平行地进行有无点形成的判断的原理的说明图。这里,假定对光栅i和紧在其之下的光栅j的2条光栅平行地进行有无点形成的判断。FIG. 13 is an explanatory diagram showing, as the simplest example, the principle of judging the presence or absence of dot formation with respect to two gratings in parallel. Here, it is assumed that the presence or absence of dot formation is determined in parallel for two gratings of grating i and grating j immediately below it.
首先,对光栅i的最左侧的像素Pi0进行有无点形成的判断。图13(a)概念式地表示判断像素Pi0有无点形成的情况。为了对目的像素Pi0进行判断,和上述平均误差扩散法一样,使用像素Ph0的色调误差Eh0和像素Ph1的色调误差Eh1。这些色调误差存储在计算机100的RAM106中。将在图13(b)的矩阵中设定的权重系数乘以从RAM106中读出的各色调误差,修正目的像素Pi0的图像数据。根据这样得到的修正值判断像素Pi0有无点形成。在图13(a)中,从像素Ph0或像素Ph1指向目的像素Pi0的粗线箭头概念式地表示为了判断目的像素Pi0有无点形成而考虑像素Ph0或像素Ph1的色调误差。First, whether or not dots are formed is determined for the leftmost pixel Pi0 of the raster i. FIG. 13( a ) conceptually shows the state of judging the presence or absence of dot formation in the pixel Pi0. In order to judge the target pixel Pi0, the hue error Eh0 of the pixel Ph0 and the hue error Eh1 of the pixel Ph1 are used in the same manner as the average error diffusion method described above. These color tone errors are stored in the
如果对像素Pi0进行了有无点形成的判断,在将发生的色调误差暂时存储到CPU102的寄存器中之后,开始对像素Pi0的右边相邻的像素Pi1进行有无点形成的判断。如在图13(b)中设定的那样,在像素Pi1的有无点形成的判断中,考虑在像素Ph0、像素Ph1、像素Ph2和像素Pi0的各像素中发生的色调误差。在图13(a)中,从各像素指向像素Pi1的细线箭头概念式地表示为了进行目的像素Pi1有无点形成的判断而考虑这些像素的色调误差。这4各色调误差中,像素Ph0的色调误差Eh0和像素Ph1的色调误差Eh1预先存储了在刚才对像素Ph0的有无点形成的判断中使用的值,所以,可以使用该值。另外,像素Pi0的色调误差可以使用刚才求出的值。因此,只要从RAM106中仅读出像素Ph2的色调误差Eh2,就可以对像素Pi1进行有无点形成的判断。作为判断的结果而在像素Pi1中发生的色调误差预先存储到CPU102的寄存器中。After the pixel Pi0 has been judged to have dot formation, the color tone error that has occurred is temporarily stored in the register of the
在实施例2的色调数变换处理中,如果对位于光栅i上的像素Pi0和像素Pi1进行了有无点形成的判断,然后就对位于光栅j上的像素Pj0进行有无点形成的判断。图13(c)是概念式地表示判断像素Pj0有无点形成的情况的说明图。由图13(b)的矩阵可知,仅考虑像素Pi0和像素Pi1的色调误差,便可进行像素Pj0的有无点形成的判断。如前所述,这些色调误差Ei0和Ei1在像素Pj0之前求出,并存储到CPU102的寄存器中。因此,对于像素Pj0,不从RAM106中读出色调误差就可以进行有无点形成的判断。这样,如果对像素Pj0进行了有无点形成的判断,就将在像素Pj0中发生的色调误差存储到CPU102的寄存器和RAM106的误差缓冲器中,以后,就对光栅i的像素和光栅j的像素交替地进行有无点形成的判断。In the tone number conversion process of the second embodiment, if the presence or absence of dot formation is determined for pixels Pi0 and Pi1 located on raster i, then the presence or absence of dot formation is determined for pixel Pj0 located on raster j. FIG. 13( c ) is an explanatory diagram conceptually showing a state of judging the presence or absence of dot formation in the pixel Pj0 . From the matrix in FIG. 13( b ), it can be seen that the presence or absence of dot formation in the pixel Pj0 can be determined by only considering the hue error between the pixel Pi0 and the pixel Pi1. As described above, these hue errors Ei0 and Ei1 are calculated before the pixel Pj0 and stored in the register of the
将像素Pj0的色调误差存储到RAM106的误差缓冲器中的理由在于,在光栅i和光栅j的处理结束之后,对位于光栅k上的像素进行有无点形成的判断时,要使用色调误差Ej0。另外,不仅存储到误差缓冲器中而且也存储到CPU102的寄存器中,是由于在进行相邻的像素Pj1有无点形成的判断要使用。在进行上述像素Pi0或像素Pi1有无点形成的判断时,读出这样存储在RAM106中的色调误差进行使用。在图13中,在光栅h和光栅j的像素中画斜线是表示这些像素的色调误差存储在误差缓冲器中。The reason why the hue error of pixel Pj0 is stored in the error buffer of
在图13(d)中,像素中圆圈符号中的顺表示对各像素进行有无点形成的判断的顺序。如图13(d)所示,在继像素Pj0之后进行有无点形成的判断的像素是位于光栅i上的像素Pi2的像素。在这样的像素的有无点形成判断中考虑的色调误差是像素Ph1、像素Ph2、像素Ph3和像素Pi1的4个色调值,但是,如果存储了上述像素Pi1时使用的色调误差,仅从RAM106中读出在像素Ph3中发生的色调误差便可进行有无点形成的判断。此外,在像素Pi2之后,进行光栅j的像素Pj1有无点形成的判断。在像素Pj1的有无点形成的判断中,使用像素Pi0、像素Pi1、像素Pi2和像素Pj0的各像素的色调误差,这些色调误差都在进行判断之前求出,并存储到CPU102的寄存器中。因此,对于像素Pj1,不从RAM106中读出色调误差就可以进行有无点形成的判断。这样,如果求出了像素Pj1的色调误差Ej1,就将色调误差Ej1存储到CPU102的寄存器和RAM106的误差缓冲器中。In FIG. 13( d ), the sequence in the circled symbols in the pixels indicates the order in which the presence or absence of dot formation is performed for each pixel. As shown in FIG. 13( d ), the pixel for determining presence or absence of dot formation subsequent to the pixel Pj0 is a pixel of the pixel Pi2 located on the raster i. The color tone errors considered in the determination of the presence or absence of dot formation of such pixels are the four color tone values of the pixel Ph1, the pixel Ph2, the pixel Ph3, and the pixel Pi1. The presence or absence of dot formation can be determined by reading out the color tone error occurring in the pixel Ph3. In addition, after the pixel Pi2, it is determined whether or not the pixel Pj1 of the raster j has dot formation. In judging the presence or absence of dots in the pixel Pj1, the color tone errors of the pixels Pi0, Pi1, Pi2, and Pj0 are used. Therefore, the presence or absence of dot formation can be determined for the pixel Pj1 without reading the color tone error from the
如上所述,对光栅i的像素和位于该像素左下方的光栅j的像素交替地进行有无点形成的判断。这样,只要可以平行地进行与光栅i相邻的光栅j的处理,对于光栅j的像素,不从RAM106中读出色调误差便可进行有无点形成的判断。即,可以减少对RAM106的误差缓冲器进行读写的频度,从而可以迅速地进行有无点形成的判断。As described above, the determination of the presence or absence of dot formation is alternately performed on the pixel of the raster i and the pixel of the raster j located on the lower left of the pixel. In this way, as long as the processing of the raster j adjacent to the raster i can be performed in parallel, the presence or absence of dot formation can be determined for the pixel of the raster j without reading the hue error from the
如图13所示,对于光栅i的左端的像素即像素Pi0,由于在该像素的左下方不存在光栅j的像素,所以,变通地在像素Pi0之后进行位于相同的光栅i上的像素Pi1的处理。在像素Pi0的左下方设想架空的像素Pj-1,在紧接像素Pi0进行架空的像素Pj-1的处理之后,对这样的架空像素Pj-1可以不使用有无点形成的判断结果而舍弃。这样,对于左端的像素,也可以对架空的像素进行通常的处理,所以,就不需要变通的处理了。As shown in FIG. 13, for the pixel Pi0 at the left end of the raster i, since there is no pixel of the raster j at the lower left of the pixel, the pixel Pi1 located on the same raster i is modified after the pixel Pi0. deal with. Assume an overhead pixel Pj-1 at the lower left of pixel Pi0, after the overhead pixel Pj-1 is processed immediately after pixel Pi0, such overhead pixel Pj-1 can be discarded without using the judgment result of dot formation . In this way, for the pixels at the left end, the usual processing can also be performed on the overhead pixels, so there is no need for flexible processing.
图15是表示对2条光栅平行地进行有无点形成的判断的处理的流程的流程图。该处理由计算机100进行。和上述实施例1的色调数变换处理一样,实施例2的色调数变换处理也按彩色打印机具有的各色进行,为了避免说明的复杂化,不特定墨点的颜色而进行说明。另外,在使用所谓的可变点打印机时,实施例2的色调数变换处理按点的各种带进行,这和上述实施例1的情况相同。FIG. 15 is a flowchart showing the flow of processing for judging the presence or absence of dot formation for two rasters in parallel. This processing is performed by the
在开始进行实施例2的色调数变换处理时,首先,从平行地进行处理的光栅的第1条光栅中取得要进行有无点形成的判断的像素的图像数据(步骤S300)。这里,和实施例1一致,设要处理的像素(目的像素)为光栅i的第n各像素Pin。图像数据Cdin存储到RAM106中。When the tone number conversion process of the second embodiment is started, first, image data of a pixel for which dot formation is to be determined is acquired from the first raster of rasters processed in parallel (step S300 ). Here, as in
其次,读出目的像素Pin的周边像素的色调误差(步骤S302)。所谓周边像素,就是在距离目的像素的指定区域内的在进行目的像素的有无点形成的判断中考虑色调误差的像素。在进行目的像素有无点形成的判断时,作为周边像素,可以考虑各种范围的像素,但是,为了避免说明的复杂化,下面,考虑图14(a)的矩阵所示的周边像素。在步骤S302读出周边像素的色调误差时,如使用图13说明的那样,将在进行目的像素Pin的左边相邻的像素Pin-1的判断时读出的各像素的色调误差预先存储到寄存器中,在步骤S302可以从RAM106中仅读出寄存器未存储的色调误差。Next, the hue error of the surrounding pixels of the target pixel Pin is read (step S302). Peripheral pixels are pixels within a specified area away from the target pixel for which color tone errors are taken into account when determining whether or not the target pixel is dot-formed. When judging whether or not a target pixel has dots, pixels in various ranges can be considered as peripheral pixels. However, in order to avoid complicating the description, the peripheral pixels shown in the matrix of FIG. 14( a ) are considered below. In step S302, when the color tone error of the surrounding pixels is read, as described with reference to FIG. In step S302, only the hue error not stored in the register can be read out from RAM106.
根据这样读出的周边像素的色调误差和目的像素Pin的图像数据Cdin计算目的像素Pin的修正数据Cxin(步骤S304)。即,将对各周边像素决定的指定的权重系数乘以周边像素的色调误差,求出这些计算值与目的像素Pin的图像数据Cdin之和,作为修正数据Cxin。周边像素的权重系数由图14(a)的矩阵对各像素进行决定。Correction data Cxin of the target pixel Pin is calculated based on the hue error of the peripheral pixels read in this way and the image data Cdin of the target pixel Pin (step S304). That is, a predetermined weight coefficient determined for each peripheral pixel is multiplied by the color tone error of the peripheral pixel, and the sum of these calculated values and the image data Cdin of the target pixel Pin is obtained as correction data Cxin. The weight coefficients of peripheral pixels are determined for each pixel by the matrix shown in FIG. 14( a ).
比较这样得到的修正数据Cxin和指定的阈值th(步骤S306),如果修正数据大,就判定在像素Pin中形成了点,并将表示形成了点的值「1」写入表示判断结果的变数Cr(步骤S308)。否则就判定在像素Pin中未形成点,并将表示未形成点的值「0」写入变数Cr(步骤S310)。Comparing the correction data Cxin obtained in this way with the specified threshold th (step S306), if the correction data is large, it is judged that a dot is formed in the pixel Pin, and the value "1" indicating that a dot is formed is written into the variable representing the judgment result Cr (step S308). Otherwise, it is determined that no dot is formed in the pixel Pin, and a value "0" indicating that no dot is formed is written into the variable Cr (step S310).
如果对光栅i的像素Pin进行了有无点形成的判断,就计算伴随该判断而发生的基调误差Ein,并存储到CPU102的寄存器中(步骤S312)。和实施例1一样,通过从修正数据Cxin中减去目的像素Pin的结果值,便可求出色调误差Ein。When it is determined whether or not dots are formed on the pixel Pin of the raster i, the key error Ein accompanying the determination is calculated and stored in the register of the CPU 102 (step S312). As in the first embodiment, the hue error Ein can be obtained by subtracting the resultant value of the target pixel Pin from the correction data Cxin.
如上述那样,如果对光栅i上的像素Pin进行了有无点形成的判断并将色调误差存储到了CPU102的寄存器中,就开始对位于像素Pin的左下方的光栅j的像素Pjn-1进行有无点形成的判断的处理。首先,从RAM106中读出像素Pjn-1的图像数据Cdin-1(步骤S314),从CPU102的寄存器中读出周边的各像素的色调误差(步骤S316)。像素Pin是位于光栅i的左端的像素Pi0时,就对架空的像素Pj-1进行同样的处理。As mentioned above, if the pixel Pin on the raster i is judged to have dot formation or not and the hue error is stored in the register of the
下面,说明在步骤S316可以从寄存器中读出周边像素的色调误差而可以不从RAM106的误差缓冲器中读出的理由。如前所述,作为周边像素,考虑了图14(a)所示的范围,所以,在进行光栅j上的像素有无点形成的判断中,考虑位于相同的光栅i上的像素的色调误差和光栅j的像素的色调误差。这里,由于对光栅i的像素和光栅j的像素平行地进行有无点形成的判断,所以,在进行光栅j上的像素有无点形成的判断时成为周边像素的就全部都是此前刚刚进行了有无点形成的判断的像素。因此,如果将通过判断有无点形成而发生的色调误差暂时存储到CPU102的寄存器中,即使不从RAM106的误差缓冲器中读出,也可以从寄存器中全部读出周边像素的色调误差。Next, the reason why the hue error of the peripheral pixels can be read from the register but not from the error buffer of the
这样,如果对像素Pjn-1读出了周边像素的色调误差,和像素Pin的情况一样,可以进行有无点形成的判断,并计算膀该判断而发生的色调误差Ejn-1。即,根据周边像素的色调误差和目的像素Pjn-1的图像数据Cdin-1计算修正数据Cxin-1(步骤S318),比较得到的修正数据Cxjn-1和指定的阈值th(步骤S320),如果修正数据大,就判定在像素Pjn-1中形成了点,并将表示形成了点的值「1」写入表示判断结果的变数Cr(步骤S322)。否则就判定在像素Pjn-1中未形成点,并将表示未形成点的值「0」写入变数Cr(步骤S324)。然后,从修正数据Cxjn-1中减去目的像素Pjn-1的结果值,计算在目的像素Pjn-1中发生的色调误差Ejn-1。In this way, if the color tone error of the surrounding pixels is read out for the pixel Pjn-1, as in the case of the pixel Pin, the presence or absence of dot formation can be judged, and the color tone error Ejn-1 generated due to this judgment can be calculated. That is, the correction data Cxin-1 is calculated according to the hue error of the surrounding pixels and the image data Cdin-1 of the target pixel Pjn-1 (step S318), and the obtained correction data Cxjn-1 is compared with the specified threshold th (step S320), if If the correction data is large, it is judged that a dot is formed in the pixel Pjn-1, and a value "1" indicating that a dot is formed is written into the variable Cr indicating the judgment result (step S322). Otherwise, it is determined that a dot is not formed in the pixel Pjn-1, and a value "0" indicating that a dot is not formed is written into the variable Cr (step S324). Then, the value obtained by subtracting the target pixel Pjn-1 from the correction data Cxjn-1 is calculated to calculate the hue error Ejn-1 generated in the target pixel Pjn-1.
通过上述处理,如果求出了光栅j上的像素Pjn-1的色调误差Ejn-1,就将该色调误差Ejn-1存储到CPU102的寄存器和RAM106的误差缓冲器中(步骤S328)。这里,将色调误差存储到寄存器和误差缓冲器中的理由如下。即,像素Pjn-1的色调误差Ejn-1在进行相邻的像素Pjn的有无点形成的判断和下一个光栅k上的像素有无点形成的判断中使用。这里,由于平行地进行光栅i和光栅j的处理,所以,相邻的像素Pjn的有无点形成的判断很快就进行,但是,位于光栅k上的像素的判断则要在光栅i和光栅j的处理结束之后蔡进行。因此,为了在像素Pjn的判断中使用像素Pjn-1的色调误差Ejn-1,存储到CPU102的寄存器中,同时,为了在光栅k的像素的判断中使用,也存储到RAM106的误差缓冲器中。When the color tone error Ejn-1 of pixel Pjn-1 on raster j is obtained through the above processing, the color tone error Ejn-1 is stored in the register of
通过上述处理,如果对光栅i的像素和光栅j的像素进行有无点形成的判断结束了,就判断对光栅i和光栅j的所有的像素的处理是否结束了(步骤S330)。如果还有未处理的像素时,就使像素的位置向右移动1像素,即用「n+1」的值置换「n」,并返回到步骤S300,继续进行一系列的处理。如果已没有未处理的像素时,就判断所有的光栅的处理是否结束了(步骤S332),如果还有未处理的光栅,就使光栅位置向下移动2条光栅,即用「i+2」的值置换「i」,然后返回到步骤S300,继续进行一系列的处理。如果已没有未处理的光栅了,图15所示的色调数变换处理即告结束,并返回到图4所示的图像数据变换处理。Through the above processing, if the determination of the presence or absence of dot formation for the pixels of raster i and the pixels of raster j is completed, it is judged whether the processing for all the pixels of raster i and raster j is completed (step S330). If there are unprocessed pixels, the position of the pixel is moved to the right by 1 pixel, that is, "n" is replaced with the value of "n+1", and the process returns to step S300 to continue a series of processing. If there are no unprocessed pixels, it is judged whether the processing of all rasters has ended (step S332), and if there are unprocessed rasters, the raster position is moved down by 2 rasters, i.e. use "i+2" Replace "i" with the value of , and then return to step S300 to continue a series of processing. If there is no more unprocessed raster, the tone number conversion process shown in FIG. 15 ends, and returns to the image data conversion process shown in FIG. 4 .
如上所述,按照实施例2的色调数变换处理,对光栅i的像素和光栅j的像素平行地交替地进行有无点形成的判断。这样,光栅j的像素就紧接在光栅i的像素之后或很快便进行有无点形成的判断,所以,即使不预先将在光栅i的像素这发生的色调误差存储到误差缓冲器中,也可以对光栅j的像素进行有无点形成的判断。如果可以不将在光栅i的像素中发生的色调误差存储到误差缓冲器中,就可以减少向误差缓冲器的写入频度,从而可以迅速地进行有无点形成的判断。当然,平行地处理的光栅的条数不限于2条,也可以对更多的光栅平行地进行有无点形成的判断。平行地处理的光栅的条数越多,向误差缓冲器的写入频度就越少,从而可以迅速地进行有无点形成的判断。As described above, according to the tone number conversion process of the second embodiment, the determination of the presence or absence of dot formation is alternately performed on the pixels of the raster i and the pixels of the raster j in parallel. In this way, the pixel of raster j is judged immediately after the pixel of raster i or whether there is dot formation or not. Therefore, even if the color tone error that occurs at the pixel of raster i is not stored in the error buffer in advance, It is also possible to judge whether or not dots are formed on the pixels of the raster j. If the color tone error generated in the pixel of raster i can not be stored in the error buffer, the frequency of writing to the error buffer can be reduced, and the presence or absence of dot formation can be quickly judged. Of course, the number of gratings to be processed in parallel is not limited to two, and the presence or absence of dot formation may be determined in parallel for more gratings. As the number of rasters processed in parallel increases, the frequency of writing to the error buffer decreases, so that the presence or absence of dot formation can be quickly determined.
C-2.变形例C-2. Variations
上述实施例2的色调数变换处理,使用基于称为所谓的平均误差最小方的方法进行有无点形成的判断。即,就在目的像素中发生的色调误差预先存储到该目的像素中,在进行新的像素有无点形成的判断时,考虑存储到周边的像素中的色调误差来进行有无点形成的判断。另外,在上述实施例1的色调数变换处理中,使用基于称为所谓的误差扩散法的方法进行有无点形成的判断。即,就在目的像素中发生的色调误差向周边像素扩散,在进行新的像素有无点形成的判断时,考虑从周边的已判断像素扩散来的积累的扩散误差,进行有无点形成的判断。与它们相反,也可以同时 用平均误差最小方和误差扩散法进行有无点形成的判断。下面,简单地说明这样的实施例2的变形例。In the tone number conversion process of the second embodiment described above, the presence or absence of dot formation is determined by a method based on a so-called mean error least square method. That is, the color tone error that occurs in the target pixel is stored in the target pixel in advance, and the presence or absence of dot formation is determined in consideration of the color tone error stored in the surrounding pixels when a new pixel is judged whether to form a dot or not. . In addition, in the tone number conversion process of the first embodiment described above, the presence or absence of dot formation is determined using a method based on a so-called error diffusion method. That is, the color tone error that occurs in the target pixel is diffused to the surrounding pixels, and when the determination of whether a new pixel has dot formation is performed, the accumulated diffusion error diffused from the surrounding judged pixels is considered, and the presence or absence of dot formation is performed. judge. Contrary to them, it is also possible to use the least square of average error and the error diffusion method to judge whether there is a point formed or not. Hereinafter, such a modified example of the second embodiment will be briefly described.
图16是概念式表示实施例2的变形例的色调数变换处理的说明图。为了避免说明的复杂化,这里假定对光栅i和光栅j平行地进行处理。另外,在将色调误差向周边像素扩散时,按照图6(a)所示的简单的误差扩散矩阵进行扩散,在考虑周边像素的色调误差进行有无点形成的判断时按照图14(a)所示的简单的矩阵考虑各像素的色调误差。16 is an explanatory diagram conceptually showing tone number conversion processing in a modified example of the second embodiment. To avoid complicating the description, it is assumed here that raster i and raster j are processed in parallel. In addition, when the color tone error is diffused to the surrounding pixels, it is diffused according to the simple error diffusion matrix shown in FIG. The simple matrix shown takes into account the hue error for each pixel.
图16(a)是表示对光栅i的左端的像素Pi0进行有无点形成的判断的情况的说明图。在判断光栅h上的像素有无点形成时,在各像素中发生的色调误差向光栅i的各像素扩散并进行存储。例如,从光栅h扩散来的扩散误差Edi0存储到像素Pi0中,从光栅h扩散来的扩散误差Edi1存储到像素Pi1中,扩散误差Ei2存储到像素Pi2中。为了便于理解,将使用的误差扩散矩阵示于图16(b)。另外,在图16(a)中,从光栅h的像素指向光栅i的像素的箭头概念式地表示从各像素扩散误差。FIG. 16( a ) is an explanatory diagram showing a state of judging the presence or absence of dot formation for the pixel Pi0 at the left end of the raster i. When judging whether or not dots are formed in pixels on raster h, color tone errors generated in each pixel are diffused to and stored in each pixel of raster i. For example, the diffusion error Edi0 diffused from the raster h is stored in the pixel Pi0, the diffusion error Edi1 diffused from the raster h is stored in the pixel Pi1, and the diffusion error Ei2 is stored in the pixel Pi2. For ease of understanding, the error diffusion matrix used is shown in FIG. 16(b). In addition, in FIG. 16( a ), the arrows pointing from the pixels of raster h to the pixels of raster i conceptually indicate that errors are diffused from each pixel.
如果对像素Pi0进行了有无点形成的判断,就将膀判断而发生的色调误差Ei0存储到CPU102的寄存器中,然后开始进行右边相邻的像素Pi1有无点形成的判断。对像素Pi1的有无点形成的判断,和使用图7说明的实施例1的色调数变换处理一样进行。即,读出预先扩散并存储在像素Pi1中的扩散误差Edi1,考虑该扩散误差Edi1和从刚才进行了有无点形成的判断的像素Pi0扩散来的误差,根据图像数据进行有无点形成的判断。这样,如果对像素Pi1进行了有无点形成的判断,和像素Pi0的情况一样,将通过该判断而发生的色调误差存储到CPU102的寄存器中。If the pixel Pi0 is judged to have dots or not, the hue error Ei0 generated by the judgment is stored in the register of
通过上述处理,如果对光栅i上的像素Pi0和像素Pi1进行了有无点形成的判断,就对位于光栅j的左端的像素Pj0进行判断。图16(c)是表示对光栅j的像素Pj0判断有无点形成的情况的说明图。对光栅j的像素的判断,使用基于平均误差最小法的方法判断有无点形成。即,对在周边像素中发生的色调误差,考虑根据矩阵对各像素决定的指定的权重进行有无点形成的判断。为了便于理解,将使用的矩阵示于图16(d)。Through the above-described processing, once the presence or absence of dot formation has been determined for the pixels Pi0 and Pi1 on the raster i, the determination is made for the pixel Pj0 located at the left end of the raster j. FIG. 16( c ) is an explanatory diagram showing a state of judging the presence or absence of dot formation with respect to the pixel Pj0 of the raster j. For judging the pixels of grating j, use the method based on the method of minimum average error to judge whether there are dots formed. That is, it is considered that the presence or absence of dot formation is determined based on the specified weight determined for each pixel by the matrix for the color tone error occurring in the peripheral pixels. For ease of understanding, the matrix used is shown in Fig. 16(d).
如图16(d)的矩阵所示的那样,对像素Pj0的有无点形成的判断,可以使用在像素Pi0和像素Pi1中发生的色调误差。如前所述,这些色调误差已求出并且已存储在CPU102的寄存器中,所以,可以对像素Pj0迅速地进行有无点形成的判断。这样对像素Pj0进行判断的结果,就是发生了色调误差,所以,现在就按照误差扩散矩阵向位于光栅k上的周边像素分配扩散误差。扩散误差的分配,使用图16(b)的误差扩散矩阵。这里,由于对光栅i和光栅j的像素平行地进行处理,所以,对光栅k的像素的有无点形成的判断就是在这些光栅的处理结束之后。因此,向光栅k的各像素扩散的扩散误差预先存储到RAM106的误差缓冲器中。在图16(c)中,从像素Pj0指向光栅k上的像素Pk0和像素Pk1的空心箭头表示存储在RAM106的误差缓冲器中。As shown in the matrix of FIG. 16( d ), the color tone error generated between the pixel Pi0 and the pixel Pi1 can be used to determine the presence or absence of dot formation in the pixel Pj0 . As described above, these color tone errors have been obtained and stored in the registers of the
如上所述,对光栅i的像素,根据误差扩散法进行有无点形成的判断,对光栅j的像素,根据平均误差最小法进行有无点形成的判断。在光栅j的像素中发生的色调误差,根据误差扩散法向周边像素扩散。通过反复进行这样的处理,可以对光栅i和光栅j的像素交替地进行有无点形成的判断。图16(e)是概念式地表示这样的处理的情况的说明图。在图16(e)中,通过在光栅i的像素中画斜线来表示从光栅h扩散来的扩散误差已存储在光栅i的像素中。同样,通过在光栅k的像素中画斜线来表示从光栅j扩散来的扩散误差已存储在光栅k的像素中。另外,在图16(e)的各像素中与圆圈符号一起表示的数字,表示进行像素的有无点形成的判断的顺序。如图所示,将光栅i的像素和位于其左下方的光栅j的像素作为1组,通过使处理的1组的位置逐次向右移动1像素而进行有无点形成的判断,便可平行地进行光栅i和光栅j的处理。As described above, for the pixels of raster i, whether or not dots are formed is determined by the error diffusion method, and for the pixels of raster j, whether or not dots are formed is determined by the method of minimizing the average error. The hue error generated in the pixel of raster j is diffused to surrounding pixels by the error diffusion method. By repeating such processing, the presence or absence of dot formation can be alternately determined for the pixels of raster i and raster j. FIG. 16( e ) is an explanatory diagram conceptually showing such processing. In FIG. 16(e), the diffusion error diffused from raster h has been stored in the pixels of raster i by slashing the pixels of raster i. Likewise, the diffusion error diffused from raster j has been stored in the pixel of raster k by slashing the pixel of raster k. In addition, the numerals shown together with the encircled symbols in each pixel in FIG. 16( e ) indicate the order of judging the presence or absence of dot formation in the pixel. As shown in the figure, the pixel of grating i and the pixel of grating j located at the lower left are regarded as a group, and the position of the processed group is moved to the right by 1 pixel to judge whether there is dot formation or not, so that parallel The processing of raster i and raster j is performed accordingly.
这样,只要对光栅i和光栅j的像素平行地交替进行有无点形成的判断,利用在光栅i的像素中发生的色调误差,就可以对此后的光栅j的像素进行有无点形成的判断,从而就不必将光栅i的像素的色调误差存储到误差缓冲器中。结果,便可减少对误差缓冲器进行读写的频度,从而可以迅速地进行有无点形成的判断。In this way, as long as the pixels of raster i and raster j are alternately judged whether or not dots are formed in parallel, the pixel of raster j can be judged whether or not there are dots formed by using the hue error that occurs in the pixels of raster i. , so that there is no need to store the hue error of the pixel of raster i into the error buffer. As a result, the frequency of reading and writing to the error buffer can be reduced, so that the presence or absence of dot formation can be judged quickly.
在以上的说明中,是将基于误差扩散法的方法应用于对光栅i的像素进行有无点形成的判断,将基于平均误差最小法的方法应用于对光栅j的像素的判断,但是,将基于平均误差最小法的方法应用于对光栅i的像素的判断,将j的像素的判断,也可以获得同样的效果。In the above description, the method based on the error diffusion method is applied to the judgment of the presence or absence of dot formation on the pixel of the grating i, and the method based on the minimum average error method is applied to the judgment of the pixel of the grating j. However, the The method based on the method of minimum average error is applied to the judgment of the pixel of the grating i, and the judgment of the pixel j can also obtain the same effect.
另外,在以上说明的实施例2的变形例中,是平行地进行光栅i和光栅j的2条光栅的处理,但是,也可以对更多的光栅的像素平行地进行有无点形成的判断。In addition, in the modified example of the second embodiment described above, the processing of two rasters of raster i and raster j is performed in parallel, but it is also possible to perform the determination of the presence or absence of dot formation on pixels of more rasters in parallel. .
以上,说明了各种实施例,但是,本发明不限于上述所有的实施例,在不脱离其主旨的范围内,可以用各种形式实施。例如,可以将实现上述功能的软件程序(应用程序)通过通信线路供给计算机系统的住存储器或外部存储装置来执行。当然,也可以读入CD-ROM或软盘存储的软件程序来执行。Various embodiments have been described above, but the present invention is not limited to all the above-mentioned embodiments, and can be implemented in various forms within a range not departing from the gist. For example, a software program (application program) realizing the above functions may be supplied to the memory of the computer system or an external storage device through a communication line for execution. Of course, it can also be read into a software program stored in a CD-ROM or a floppy disk for execution.
另外,在上述各种实施例中,包含色调数变换处理的图像数据变换处理是在计算机内执行的,但是,也可以使用打印机侧的或专用的图象处理装置执行图像数据变换处理的一部分或全部。In addition, in the various embodiments described above, the image data conversion processing including the tone number conversion processing is executed in the computer, but it is also possible to use a printer-side or dedicated image processing device to execute a part of the image data conversion processing or all.
此外,图像显示装置不限于在印刷媒体上形成墨点而印刷图像的印刷装置,也可以是例如在液晶显示画面上通过以适当的明度分散亮点而表现色调连续变化的图像的液晶显示装置。In addition, the image display device is not limited to a printing device that forms ink dots on a printing medium to print an image, and may be, for example, a liquid crystal display device that expresses an image with continuously changing hues by dispersing bright spots with appropriate brightness on a liquid crystal display screen.
如上所述,按照本发明的图象处理装置、印刷控制装置和图象处理方法,可以不使画质恶化而迅速地变换图像数据,所以,极适合应用于图像的输出装置。特别是极适合于处理大尺寸的图像数据而印刷高画质的图像或者不使画质恶化而迅速地印刷图像的印刷装置。As described above, according to the image processing device, printing control device and image processing method of the present invention, image data can be quickly converted without deteriorating the image quality, so it is very suitable for use in image output devices. In particular, it is very suitable for a printing device that processes large-sized image data to print high-quality images or quickly prints images without degrading the image quality.
Claims (19)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000307926 | 2000-10-06 | ||
JP307926/00 | 2000-10-06 | ||
JP307214/01 | 2001-10-03 |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN01803036XA Division CN1216484C (en) | 2000-10-06 | 2001-10-05 | Image processing device, printing control device, image processing method, and recorded medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1691741A true CN1691741A (en) | 2005-11-02 |
Family
ID=35346840
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200510007912 Pending CN1691741A (en) | 2000-10-06 | 2001-10-05 | Image processing device, printing control device, image processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1691741A (en) |
-
2001
- 2001-10-05 CN CN 200510007912 patent/CN1691741A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1216484C (en) | Image processing device, printing control device, image processing method, and recorded medium | |
CN1187953C (en) | Image procesing device, print control device, image processing method and recording medium | |
CN1223170C (en) | Method for correcting colour image data by correction table | |
CN1762149A (en) | Image processing device and image processing method for performing conversion of color image data | |
CN1302927C (en) | Printing apparatus, printing method, computer program, and computer system | |
CN1473707A (en) | Ink jet recorder and ink jet recording method | |
CN1572502A (en) | Ink jet print apparatus and ink jet print method | |
CN1186194C (en) | Printing for switching second scanning feed in point recording area and blank recording area | |
CN1572497A (en) | Liquid-discharging apparatus, and density adjusting method and system of the same | |
CN1189321C (en) | Image printing device, control method, storing medium and program | |
CN1807097A (en) | Liquid discharging apparatus and liquid discharging method | |
CN1642740A (en) | Image recording apparatus | |
CN1162277C (en) | Print carrying to end part of medium to be printed but net contaminating paper-press roller | |
CN1319749C (en) | Ink jet record method, apparatus and data process method | |
CN1693085A (en) | Printing apparatus and printing method | |
CN1685739A (en) | Output image adjustment of image data | |
CN1124542C (en) | Printing apparatus, printing method and recording medium | |
JP5813550B2 (en) | Color adjustment method and apparatus, program, and ink jet apparatus | |
CN1810508A (en) | Printing device, printing device control method, print data generation device, and print data generation method | |
CN1197035C (en) | Image processing device, image processing method, printing control device, and recording medium | |
CN1496825A (en) | Liquid discharge device and liquid discharge method | |
CN1263602C (en) | Ink-jet recording method and ink-jet recording device, program | |
CN1236917A (en) | Information processing device and method, printing driver forming method, and storage medium | |
CN1765118A (en) | Image output control system, image processing device and method thereof | |
CN100337832C (en) | Ink jet recording apparatus and ink jet recording method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |