WO2000019704A1 - Image processing device and method, and printer - Google Patents

Image processing device and method, and printer Download PDF

Info

Publication number
WO2000019704A1
WO2000019704A1 PCT/JP1999/005241 JP9905241W WO0019704A1 WO 2000019704 A1 WO2000019704 A1 WO 2000019704A1 JP 9905241 W JP9905241 W JP 9905241W WO 0019704 A1 WO0019704 A1 WO 0019704A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
pixel
dot
value
image
Prior art date
Application number
PCT/JP1999/005241
Other languages
French (fr)
Japanese (ja)
Inventor
Toshiaki Kakutani
Saburo Yosho
Original Assignee
Seiko Epson Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corporation filed Critical Seiko Epson Corporation
Publication of WO2000019704A1 publication Critical patent/WO2000019704A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/405Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels
    • H04N1/4051Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size
    • H04N1/4052Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size by error diffusion, i.e. transferring the binarising error to neighbouring dot decisions
    • H04N1/4053Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size by error diffusion, i.e. transferring the binarising error to neighbouring dot decisions with threshold modulated relative to input image data or vice versa
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/405Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels
    • H04N1/4051Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size

Definitions

  • Image processing apparatus and method, and printing apparatus are Image processing apparatus and method, and printing apparatus
  • the present invention provides a technique for performing halftone processing on an image having a gradation value for each pixel, a technique for printing an image using the image processing technique, and designing a matrix used in the image processing.
  • a technique for performing halftone processing on an image having a gradation value for each pixel a technique for printing an image using the image processing technique, and designing a matrix used in the image processing.
  • an ink jet printer that forms a dot with several colors of ink ejected from a plurality of nozzles provided in a head and records an image has been proposed. It is widely used to print processed images in multiple colors and multiple tones. In such printing, usually, only two gradations of dot on / off can be taken for each pixel. Therefore, an image is printed after image processing for expressing the gradation of the original image data by the dispersibility of dots, that is, so-called halftone processing.
  • an ink jet printing which is a so-called multi-value printing, capable of expressing more than two levels of ON / OFF for each dot. For example, by changing the dot diameter divided by the ink density, three or more types of density can be expressed for each pixel. Multi-tones can be formed by superimposing multiple dots for each pixel. It is a pudding evening that can be expressed. Even in such printing, halftone processing is required because the gradation of the original image data cannot be sufficiently expressed in each pixel unit.
  • a dither method is one of the typical methods.
  • a preset ⁇ value is used for each component.
  • a matrix called Bayer type is shown in Fig. 25.
  • a 4 ⁇ 4 Bayer matrix has 16 thresholds from 0 to 15.
  • the on / off determination of the dot of each pixel is performed in accordance with the dither matrix.
  • Figure 26 shows the correspondence between the dither matrix and the image data.
  • the components shown in (a, b) in Fig. 26 represent the components of the dither matrix in Fig. 25, respectively.
  • the image data has pixels that are many times the size of the dither matrix in each of the vertical and horizontal directions. Therefore, in the dither method, the dither matrix shown in FIG. 25 is repeatedly arranged and arranged in a grid in each of the vertical and horizontal directions.
  • the matrix repetition direction has a certain angle with respect to the two-dimensional pixel array direction in order to generate a screen angle that simulates halftone printing.
  • a dither matrix may be arranged as described above, in the dot-dispersion type dither method, the dither matrix is usually arranged in a grid because it is not related to the halftone dot printing.
  • FIG. 27 shows the concept of dot on / off determination in the dither method.
  • FIG. 27 shows the result of dot on / off determination for an image having a constant gradation value 8 for each pixel.
  • the tone value of the image data is compared with the threshold value of the dither matrix corresponding to each pixel, and it is determined that a dot is to be formed in a pixel having a larger tone value of the image data.
  • the dots are turned on in a pine pattern.
  • the pixel for turning on the dot changes according to the gradation value of the image data and the dither matrix used in the halftone processing.
  • FIG. 28 shows a state in which the result of the on / off determination shown in FIG. Figure 28 shows the result of using the dither matrix in the correspondence shown in Figure 26. This shows the result of the dot on / off determination of the dot obtained by the above.
  • the hatched portions in FIG. 28 are the pixels for which the dots should be turned on. As shown in the figure, the pixels on which dots are to be formed are widely distributed in a pine pattern. If the dither matrix used for halftone processing changes, the dots will turn on in a different pattern from that in FIG. In the ink jet printing, dots are formed in each pixel according to the result of the halftone means such as the dither method described above.
  • an ink jet printer if there is a mechanical manufacturing error or the like in a nozzle that discharges ink, the amount of ink to be discharged and the position of dots to be formed vary from nozzle to nozzle. If the ink discharge amount of a specific nozzle is large or the dot formation position shifts, the gap between adjacent laths and evenings becomes large or small, causing uneven density in the printed image at that part. Particularly in printers that form dots while scanning the head in the main direction, similar unevenness is likely to occur continuously in the main scanning direction, so that streak-like density unevenness called banding may appear in the main scanning direction. .
  • the dot generation rate may be biased every day according to the threshold of the dither matrix and the gradation value of the image.
  • the occurrence of dots in the entire image is determined by arranging the dither matrix in a grid pattern, such a biased pattern is repeatedly generated, which promotes a bias in the dot generation rate for each raster.
  • a raster having a large number of dots is formed by nozzles formed by shifting the positions of the dots, remarkable banding may occur and image quality may be degraded.
  • each raster is formed using two or more different nozzles.
  • each nozzle is formed by two main scans using two nozzles. In the first main scan, only odd-numbered dots of each raster are formed intermittently. Sub-scanning is performed thereafter, and in the second main scanning, only even-numbered dots are intermittently formed using nozzles different from those in the first scanning. If such a recording method is adopted, since each raster is formed by two or more different nozzles, a shift in dot formation position caused by nozzle characteristics or the like can be dispersed on each raster.
  • Image quality can be improved.
  • the halftone processing is performed by using the dither method, the above-described effect of the overlap may not be sufficiently obtained.
  • the pixels whose dots should be turned on are arranged in a checkered pattern. This means that the dot of either the odd-numbered pixel or the even-numbered pixel is turned on when viewed at each raster.
  • the dots of the odd-numbered pixels of each raster are formed in the first main scan, and the dots of the even-numbered pixels of each raster are formed in the second main scan. .
  • each raster is eventually formed only by the first or second main scanning.
  • the advantage of the overlap method obtained by forming the dots on each lath using different nozzles could not be used, and the advantage of improving the image quality could not be sufficiently obtained.
  • the Bayer type dither matrix used in the above-described example is a matrix that is relatively frequently used in halftone processing by the dither method. It has been found that when such a matrix is used, the problem that the advantage of the overlap method cannot be obtained sufficiently occurs.
  • the Bayer-type dither matrix is taken as an example.However, when other dither matrices are used, the dot generation rate for each raster and the even and odd pixels Since it is difficult to make the dot generation rates almost equal, a similar problem has occurred. If a dither matrix different from the bayer type is used, the dots are formed in a pattern different from the pattern shown in FIG. However, even in this case, the same pattern is repeatedly displayed in the vertical and horizontal directions of the image in a diagonal matrix. Therefore, if there is a bias in the number of dots formed in each evening, banding may occur based on variations in the ink ejection direction. In addition, if there is a raster in which a relatively small threshold value is biased in odd-numbered pixels, the effect of recording by the overlap method cannot be sufficiently obtained.
  • a similar problem occurred in halftone means other than the dither method.
  • a halftone processing method other than the dither method for example, there is a method called an error diffusion method.
  • Such a method originally performs halftone processing without using a matrix.
  • a predetermined noise is intentionally added to the image data before halftone processing. Processing may be performed.
  • a matrix with predetermined noise data is used as the noise data in the correspondence shown in Fig. 26, a fixed repetition pattern
  • the same problem as the above-described problem described with the dither method as an example may occur due to the addition of noise. Disclosure of the invention
  • the present invention has been made to solve the above-mentioned problem.
  • a halftone means using a dot dispersion type matrix
  • a pattern in which dots are formed is periodically arranged in a vertical and horizontal direction in an image area.
  • the purpose of the present invention is to provide a technology for avoiding the appearance of an image and improving image quality.
  • the present invention employs the following configurations.
  • the image processing apparatus includes:
  • the image data is determined for each pixel according to the magnitude relationship between the gradation value and a predetermined threshold value.
  • An image processing device that determines whether a dot is on or off and generates an output data corresponding to a predetermined image output device,
  • Storage means for storing a dot-dispersion type two-dimensional matrix having a size smaller than the size of the image data composed of the two-dimensional pixel array and having a predetermined value as a component;
  • the matrix is shifted with respect to the image data from a grid in a range in which deterioration of image quality caused by interference between on / off of dots and a fluctuation cycle of dot forming characteristics of the image output device can be avoided.
  • the gist of the invention is to include a halftone means for judging on / off of a dot by reflecting the components of the matrix in the gradation value or the threshold value of the image data.
  • the grid means that the arrangement on the image data is grid-shaped when the matrix is captured as one unit as shown in Fig. 26, for example.
  • the matrix is associated with a state deviating from the grid, it is possible to prevent the dots from being repeatedly formed in a fixed pattern in the X direction and the y direction.
  • the number of formed dots tends to be biased for each arrangement in the X direction or y direction. For example, if there is a bias in the number of dots formed for each arrangement in the X direction, and if the recording position of the arrangement having a large number of dots is displaced, on / off of the dots and the dot formation of the image output device will occur. Remarkable banding occurs due to interference with the characteristic fluctuation cycle, and the image quality is reduced.
  • the image processing apparatus of the present invention by preventing the dots from being repeatedly formed in a fixed pattern, it is possible to avoid a bias in the number of dots formed for each row. Therefore, it is possible to suppress the occurrence of banding and perform half-tone processing with excellent image quality.
  • the present application intends to avoid deterioration of image quality caused by interference between on / off of dots and a fluctuation cycle of dot forming characteristics of the image output device when dots are formed in a dispersed manner. It is a thing.
  • the present application has found that in an image output device that forms dots in this manner, image quality is degraded due to interference between the on / off of the dots and the fluctuation cycle of the dot formation characteristics of the image output device. This has great technical significance in that it has been found that such interference can be mitigated by a simple method of shifting the arrangement of the matrix from the grid.
  • the size of the matrix In terms of avoiding repeated formation of dots in a certain pattern, for simplicity, it is possible to set the size of the matrix to be very large. According to such means, the memory for storing the matrix data becomes enormous. In addition, it takes a long time to read data from the memory. According to the image processing apparatus and the image processing method of the present invention, the above effects can be obtained without increasing the size of the matrix. That is, according to the image processing apparatus and the image processing method of the present invention, there is also an advantage that the image quality can be improved without increasing the memory and the processing time.
  • FIG. 1 is an explanatory diagram showing the correspondence between image data and matrices.
  • Each square in FIG. 1 indicates a pixel.
  • the bold line in FIG. 1 indicates an area corresponding to a matrix as a unit.
  • the matrices were associated in a grid as shown in FIG. 26, but in the image processing apparatus of the present invention, for example, as shown in FIG. 1, the matrices are sequentially shifted in the y direction in a stepwise manner. It is.
  • FIG. 1 shows an example in which it is shifted in the y direction, it may be made to correspond while being shifted in the X direction, or both may be made to correspond.
  • the amount of shift in each direction can be set to various values. Further, it is not necessary to shift the matrix in all the regions of the image data, and it is also possible to shift the matrix in some regions from the grid shape.
  • n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values
  • the on / off state of the dot is determined for each pixel according to the magnitude relationship between the gradation value and a predetermined threshold, and the output data corresponding to the predetermined image output device is determined.
  • Mxxmy (1 ⁇ mx ⁇ nx, 1 ⁇ my ⁇ n storage means for storing a dot-dispersion type matrix of (integer y); and halftone for judging dot on / off by reflecting the matrix component to the gradation value or the threshold value for each pixel.
  • the matrix component reflected on the kx-th pixel in the X direction (kX is an integer satisfying 0 ⁇ kx ⁇ nX) and the ky-th pixel in the y direction (ky is an integer satisfying 0 ⁇ ky ⁇ ny) is provided.
  • the image processing device is given by (Xt, yt) (0 ⁇ xt ⁇ mx, 0 ⁇ yt ⁇ my) given by the following equation (1).
  • a d i v b is an operator that calculates the quotient of a / b as an integer
  • a% b is the remainder operator to find the remainder of aZb
  • dxl, dx2, dyl, and dy2 are integers equal to or greater than 0, and at least one of dxl, dx2, dy1, and dy2 is a value other than 0.
  • this image processing apparatus similarly to the above-described image processing apparatus, it is possible to reduce the occurrence of the dot formation pattern being repeated in one direction in the matrix unit, and to improve the image quality.
  • the correspondence between the image data and the matrix in the above invention will be specifically described with reference to FIG.
  • image data is composed of pixels arranged two-dimensionally in the X and y directions, and n X pixels from 0 to n X—1 in the X direction, y direction Has ny pixels from 0 to ny- 1.
  • An arbitrary pixel of this image data is represented as (kx, ky) by using a number in the X direction and the y direction (hereinafter referred to as a pixel number).
  • Matrix is also a two-dimensional array of data It has mx components from 0 to mx-1 in the X direction, and my components from 0 to my-1 in the y direction.
  • An arbitrary component of the matrix is represented as (xt, yt).
  • FIG. 1 shows the relationship between the matrix and the image data in such a state.
  • the matrices are associated with the portions indicated by the thick lines and broken lines in FIG.
  • the matrix can be associated with the image data in other image areas.
  • d y 1 1
  • the matrices are associated as shown by the thick lines in FIG. In other words, as the pixel numbers in the X direction increase, the corresponding matrices are gradually shifted in the negative direction in the y direction. If d y 1 is greater than 1, the amount of matrix shift will be even greater.
  • FIG. 1 shows a case where d y 1 is a constant value, for example, d y 1 may be changed every time the value of r X or r y changes.
  • d y 1 may be changed every time the value of r X or r y changes.
  • the way the matrix shifts in the y direction changes in various ways.
  • the other values d X 1, d X 2, and dy 2 may take different values each time the value of r X or ry changes.
  • a matrix is associated and has a certain gradation value.
  • the halftoning results will naturally be different.
  • the image processing apparatus of the present invention can perform halftone processing with excellent image quality by suppressing the repetition of the dot formation pattern. Naturally, such an effect is not limited to an image having a constant gradation value.
  • the present invention is also applicable to a case where a plurality of types of such matrices are provided.
  • a different matrix may be used for the other area including the area A2 in FIG. 1 and the area A1.
  • the halftone means may be a means for performing halftone processing after reflecting the components of the matrix as noise data in the image data.
  • the halftone means may include any one of the matrices as the threshold. It can be a means for performing a halftone process by a dither method using a minute.
  • the dither method since halftone processing is performed according to the magnitude relationship between the tone value of image data and the threshold value of the matrix, a fixed dot formation pattern is likely to occur repeatedly according to the correspondence relationship between image data and matrix . According to the above-described image processing apparatus, such repetition can be avoided and the image quality can be improved by shifting the matrix to correspond. Moreover, the image quality can be improved without impairing the advantage of the dither method that the processing time required for the halftone processing is short.
  • the dot dispersion type dither matrix in the present invention is a matrix in which threshold values are set so that the positions of dots formed according to gradation values are dispersed as much as possible in the matrix.
  • Various matrices are known as such a dot dispersion type dither matrix. For example,
  • the matrix can be a Bayer-type dither matrix.
  • Figure 2 shows an example of a 4x4 matrix as a bayer-type dither matrix. This is a matrix having 16 types of thresholds from thresholds 0 to 15. Looking at the 3X3 portion shown in the area P1 in FIG. 2, the components at the four corners are assigned values from 0 to 3 in order. Similarly, the four corners of the 3 ⁇ 3 portion shown in area P 4 are assigned values 4-7, the four corners of area P 2 are assigned values 8-11, and the four corners of area P 3 are assigned the value 1 2 to 15 are assigned.
  • a plurality of small matrices each of which has four thresholds assigned in a predetermined pattern to four corners having a predetermined size smaller than the dither matrix size, are prepared, and a dither matrix is generated by combining these with a Bayer type.
  • FIG. 2 illustrates the case of 4 ⁇ 4 as an example, matrices of other sizes are similarly defined.
  • the Bayer type matrix is generated by the above-described method, it is characterized in that the assignment of the threshold to each component in the matrix is regular. Therefore, the dots formed according to the gradation values have a regular pattern over the entire image area, and banding is likely to occur. According to the image processing apparatus of the present invention, since the occurrence of such regular patterns can be reduced, the image quality can be greatly improved.
  • the matrix may be a blue noise mask type matrix.
  • Fig. 3 shows an example of a 64 x 64 matrix as a blue noise mask type matrix. Only a part is shown for convenience of illustration.
  • a threshold is set so that the appearance of the threshold (0 to 255) is not biased in any 16 x 16 area inside a matrix of size 64 x 64. Has been assigned.
  • a matrix having such properties is called a bull noise mask type matrix.
  • Blue noise mask type matrices are configurable for various sizes and threshold ranges.
  • the matrix may be a matrix capable of performing halftone processing with high dot dispersibility in an image area wider than an area corresponding to the size of the matrix.
  • n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values
  • a dot is formed by driving a head according to the on / off of a dot specified according to the magnitude relationship between the gradation value and a predetermined threshold value for each pixel.
  • Halftone means for judging on / off of dots by reflecting any component of the matrix in one of the gradation value and the threshold value for each of the pixels
  • the halftone processing is performed after the matrices are shifted to correspond to each other, and dots are formed in accordance with the results of the half-toning processing. High quality printing becomes possible.
  • various correspondences can be made between the matrix and the image data.
  • Main scanning means for reciprocating the head relative to the print medium in the X direction, wherein the head comprises a plurality of nozzles arranged in the y direction;
  • a sub-scanning unit that relatively moves the head and the print medium in the y-direction; and a main scanning unit, a sub-scanning unit, and a drive of the head are controlled to form each dot row aligned in the X-direction by 2 It is preferable that a drive control unit formed by using the above nozzles is provided, and at least the dy 1 ⁇ 0.
  • each dot row arranged in the X direction is formed using two or more nozzles.
  • By forming dot rows using different nozzles it is possible to improve the image quality by dispersing the shift of the dot formation position due to the characteristics of the nozzles. Wear.
  • dots are formed after halftone processing is performed while the matrix is sequentially shifted in the y-direction with respect to the image data. Therefore, in the above-described printing apparatus, the effect of forming each dot row using different nozzles can be sufficiently exhibited, and high-quality printing can be performed. The effect will be described with a specific example.
  • a dot row recording method a method of recording odd-numbered dots in the X direction with nozzle A and recording an even-numbered dot with nozzle B can be considered.
  • the matrix is made to correspond to the image data in a grid pattern, the pixels in which dots are formed are biased toward the odd-numbered pixels in the X direction depending on the relationship between the gradation value of the image data and the threshold value of the matrix.
  • the threshold value of the matrix There are cases.
  • most of the dot rows are formed by the nozzles A, and the effect of forming the dot rows using different nozzles cannot be sufficiently obtained.
  • “at least d y 1 ⁇ ⁇ 0” is set. This is because the effect of improving the image quality is large when the matrices are correspondingly shifted in the y direction. Needless to say, the matrix may be shifted only in the X direction to correspond, or may be shifted in both the X direction and the y direction.
  • the present invention can be configured as an image processing method.
  • an image processing method for an image composed of a two-dimensional array of pixels and having a gradation value in a predetermined range for each pixel, the difference between the gradation value and a predetermined threshold value for each pixel is determined.
  • a dot dispersion type two-dimensional matrix having a predetermined value as a component is applied to the image data to reduce image quality degradation caused by interference between dot on / off and a fluctuation cycle of dot forming characteristics of the image output device.
  • This is an image processing method in which dots are arranged so as to be deviated from a grid in an avoidable range, and the on / off state of dots is determined by reflecting the components of the matrix in the gradation values or the threshold value of the image data.
  • an existing matrix such as the above-described bayer type matrix or bull noise mask type matrix may be used. It is also possible to use a designed matrix.
  • the matrix design method of the present invention is:
  • n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values
  • mx Xmy an integer of 1 ⁇ mx ⁇ n, 1 ⁇ my ⁇ ny
  • a value to be reflected in the gradation value or a predetermined threshold value when the dot on / off is determined is stored in advance.
  • the first n (n is an integer of 1 or more) values are determined by taking into account the dispersibility of the threshold value and the arbitrary components of the matrix.
  • the step (c) comprises:
  • (c-12) a step of setting a leading value in a case where the remaining values are arranged in accordance with the magnitude relation to a component evaluated to be the longest from a component for which a value has already been set; and
  • the gist consists of
  • the matrix designed by the above design method is composed of a component whose threshold is set by the designer's intention and a component whose threshold is set by calculation.
  • Step (a) in the above-described design method is a step of setting the arrangement of the matrix in the image data.
  • Various arrangements are conceivable, such as a square arrangement as shown in FIG. 26 and an arrangement in which the matrix is sequentially shifted in the y direction as shown in FIG.
  • n thresholds are assigned to the components of the matrix.
  • Fig. 4 shows an example in which the thresholds are arranged in ascending order and n thresholds are assigned in ascending order.
  • FIG. 5 shows an example of the evaluation.
  • Fig. 5 shows the matrices in the image This shows a state in which the boxes are associated with each other.
  • the part shown by the thick line in FIG. 5 corresponds to the matrix.
  • the components shown in FIG. 4 have thresholds of values 0 to n ⁇ 1
  • the thresholds of values 0 to n ⁇ 1 are set at the locations shown in FIG. 5, respectively.
  • the distance is evaluated for a component whose value is undefined, for example, (2, my-1).
  • FIG. 1 consider the case where the distance is evaluated for a component whose value is undefined, for example, (2, my-1).
  • mp which is one of the pixels to which this component corresponds, is hatched.
  • dl to d4 are distances from pixels corresponding to a matrix different from pixel mp. “Across a plurality of matrices” means that the distances to the pixels on the different matrices are also evaluated.
  • One of the distances d1 to d4 calculated in this way is selected as an evaluation value for the threshold 0. In FIG.
  • the distance is calculated for a part of the pixels to which the threshold value 0 is assigned. However, all the pixels may be calculated. In the same way, the evaluation values for all the threshold values from the already set values 0 to n-1 are calculated. Further, such an evaluation value is calculated not only for the pixel mp but also for all components whose thresholds are not defined.
  • a component that is evaluated as being farthest from the component for which the threshold value has already been set is obtained based on the evaluation value calculated in the step (c-1).
  • Such a component corresponds to the component having the highest dispersibility.
  • the n-th threshold value is set for such a component.
  • the set threshold is the nth smallest value.
  • the matrix designing method of the present invention by repeating the above-described steps (c-11) and (c-2) sequentially, emphasis is placed on dot dispersibility in consideration of the arrangement of the matrix in the image data. To set the threshold.
  • halftone processing is performed using a matrix designed by the design method of the present invention, high-quality halftone processing can be performed.
  • the threshold value may be set in order from the larger threshold value.
  • the thresholds may be set in order from a larger threshold.
  • the above-described distance may be evaluated in consideration of factors other than the dispersibility of the dots, and the threshold value of the matrix may be set.
  • Matrix components to be reflected on the first pixel in the X direction (X 1 is an integer of 0 ⁇ x 1 ⁇ n X) and on the first pixel in the y direction (y 1 is an integer of 0 ⁇ y 1 ⁇ ny) May correspond to (xt, yt) (0 ⁇ xt ⁇ mx, 0 ⁇ yt ⁇ my) given by the above equation (1).
  • This correspondence corresponds to the case where the matrix is made to correspond to the image data in a state shifted from the grid, as described in the image processing apparatus above.
  • the above-described design method it is possible to generate a matrix in which the dispersibility of dots is sufficiently ensured over the entire image region, while assuming that the matrix is displaced from the grid shape. Therefore, if a matrix designed by the above design method is used, high-quality image processing can be performed.
  • the above-described image device of the present invention can also be configured by realizing the above-described halftone processing by a computer. Therefore, the present invention adopts an aspect as a recording medium on which such a program is recorded. You can also.
  • the recording medium of the present invention is a recording medium of the present invention.
  • nxxny pixels consisting of nx pixels in the X direction and ny pixels in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values.
  • a computer-readable recording medium for storing a program for determining dot on / off in accordance with a magnitude relationship between the gradation value and a predetermined threshold value for each of the pixels.
  • the grayscale value or the threshold value of the kx-th pixel (kX is an integer satisfying 0 ⁇ kx ⁇ nX) in the X direction and the ky-th pixel (ky is an integer satisfying 0 ⁇ ky ⁇ ny) in the y direction are as described above.
  • the above-described image processing apparatus of the present invention can be realized by executing the program recorded on each of the recording media by the computer.
  • the storage medium include a flexible disk, a CD-R ⁇ M, a magneto-optical disk, an IC card, a ROM cartridge, a punched card, a printed matter on which a code such as a barcode is printed, and a computer internal storage device (RAM or RAM).
  • RAM or RAM Various computer-readable media such as a memory such as a ROM) and an external storage device can be used.
  • It also includes a storage device of a program supply device that supplies a computer program for realizing the halftone processing function of the image processing device to a computer via a communication path.
  • the present invention can be configured as a program itself for realizing the above functions or various signals that can be regarded as the same.
  • FIG. 1 is an explanatory diagram showing the correspondence between image data and matrices.
  • FIG. 2 is an explanatory diagram showing the contents of the Bayer matrix.
  • FIG. 3 is an explanatory diagram showing an example of a blue noise mask type matrix.
  • FIG. 4 is an explanatory diagram showing the arrangement of thresholds in a matrix.
  • FIG. 5 is an explanatory diagram showing the calculation of the distance to each component.
  • FIG. 6 is a schematic configuration diagram of a printing apparatus as an embodiment.
  • FIG. 7 is an explanatory diagram showing the configuration of the software.
  • FIG. 8 is a schematic configuration diagram of the printer according to the embodiment.
  • FIG. 9 is an explanatory diagram showing a schematic configuration of a dot recording head for printing in the embodiment.
  • FIG. 10 is an explanatory diagram illustrating the principle of dot formation during printing in the example.
  • FIG. 11 is an explanatory diagram showing the internal configuration of the controller of the printer.
  • FIG. 12 is an explanatory diagram showing the driving waveforms of the nozzles during printing and the state of the dots formed by the driving waveforms in the embodiment.
  • FIG. 13 is a flowchart showing the flow of the dot formation control routine.
  • FIG. 14 is a flowchart showing a flow of the halftone process by the dither method.
  • FIG. 15 is an explanatory diagram showing the correspondence between the matrix and the image data in the embodiment.
  • FIG. 16 is an explanatory diagram showing a result of forming a dot according to the example.
  • FIG. 17 is an explanatory diagram showing how dots are formed by the overlap method.
  • FIG. 18 is a flowchart showing the flow of the halftone process by the error diffusion method.
  • FIG. 19 is an explanatory diagram showing weights when diffusing an error.
  • FIG. 20 is a flowchart illustrating the procedure of the design method according to the embodiment.
  • FIG. 21 is an explanatory diagram illustrating setting of thresholds in the design method according to the embodiment.
  • FIG. 22 is an explanatory diagram illustrating the calculation of the distance in the design method according to the embodiment.
  • FIG. 23 is an explanatory diagram illustrating an evaluation value of the distance in the design method of the example.
  • FIG. 24 is an explanatory diagram showing a matrix designed by the design method of the embodiment.
  • FIG. 25 is an explanatory diagram showing a bayer type matrix.
  • FIG. 26 is an explanatory diagram showing the correspondence between a matrix and image data in the conventional technology.
  • FIG. 27 is an explanatory diagram showing the concept of dot on / off determination by the dither method.
  • FIG. 28 is an explanatory diagram showing a dot formation result in the conventional technique.
  • FIG. 6 is a block diagram illustrating a configuration of an image processing apparatus and a printing apparatus as one embodiment of the present invention.
  • the scanner 90 and the color printer 22 are connected to the computer 90.
  • the computer 90 functions not only as an image processing apparatus but also as a printing apparatus in combination with the printer 22.
  • This computer 90 includes the following units interconnected by a bus 80, centering on a CPU 81 that executes various arithmetic processes for controlling operations related to image processing according to a program.
  • the ROM 82 stores in advance the program data necessary for executing various arithmetic processing by the CPU 81, and the RAM 83 stores the program data required for executing various arithmetic processing by the CPU 81 similarly.
  • the input interface 8 4 is connected to the scanner 1 2
  • the output interface 85 controls the input of signals, and controls the output of data to the printer 22.
  • the CRTC 86 controls the signal output to the CRT 21 capable of displaying color
  • the disk controller (DDC) 87 exchanges data with the hard disk 16, the flexible drive 15 or a CD-ROM drive (not shown). Control.
  • the hard disk 16 stores various programs loaded into the RAM 83 and executed, various programs provided in the form of device drivers, and the like.
  • a serial input / output interface (SIO) 88 is connected to the bus 80.
  • This SI ⁇ 88 is connected to a modem 18, and is connected to a public telephone line PNT via the modem 18.
  • the computer 90 is connected to an external network via the SIO 88 and the modem 18, and by connecting to a specific server-SV, a program required for image processing can be downloaded to the hard disk 16. Is also possible. It is also possible to load the necessary programs on a floppy disk FD or CD-ROM, and have the program run on the convenience store 90.
  • FIG. 7 is a block diagram illustrating a software configuration of the printing apparatus.
  • Comb At evening 90, the application program 95 is running under the given operating system.
  • the operating system incorporates a video driver 91 and a printer driver 96, and the application program 95 outputs image data FNL to be transferred to the printer 22 via these drivers. Will be done.
  • An application program 95 for performing image retouching and the like reads an image from the scanner 12, and displays the image on the CRT display 21 via the video driver 91 while performing predetermined processing on the image.
  • the data ORG supplied from the scanner 12 is read from the color manuscript and the three color components of red (R), green (G) and blue (B) are read. This is the original color image data ORG consisting of the components.
  • the printer driver 96 of the combination 90 receives image information from the application program 95, and receives a signal that can be processed by the printer 22 (here, a signal that can be processed by the printer 22).
  • Halftoned signals for cyan, magenta, yellow, and black are provided inside the printer driver 96.
  • the resolution conversion module 97 serves to convert the resolution of the color image data provided by the application program 95, that is, the number of pixels per unit length into a resolution that can be handled by the printer driver 96. .
  • the color correction module 98 refers to the color correction table LUT and uses the cyan (C) used by the printer 22 for each pixel. ), Magenta (M), yellow (Y), and black ( ⁇ ).
  • the data subjected to the color correction in this way has a gradation value with a width of, for example, 256 gradations.
  • the halftone module 99 executes a halftone process for expressing the gradation value in the printer 22 by forming dots in a dispersed manner.
  • the halftone module of the present embodiment is included in at least the image processing apparatus of the present invention.
  • the image data processed in this way is rearranged by the rasterizer 100 in the order of data to be transferred to the printer 22, and output as final image data FNL.
  • the printer 22 only plays a role of forming dots in accordance with the image data FNL, and does not perform image processing. However, it is a matter of course that these processes may be performed by the printer 22.
  • the printer 22 has a mechanism for transporting the paper P by the paper feed motor 23, a mechanism for reciprocating the carriage 31 in the axial direction of the platen 26 by the carriage motor 24, and a carriage 31.
  • a control circuit 40 that controls the exchange of data.
  • the mechanism for reciprocating the carriage 31 in the axial direction of the platen 26 includes a sliding shaft 3 4, which is installed in parallel with the platen 26 axis, and holds the carriage 31 slidably, and a carriage motor 24. It comprises a pulley 38 on which an endless drive belt 36 is stretched, and a position detection sensor 39 for detecting the origin position of the carriage 31.
  • the carriage 31 has a cartridge 71 for black ink (Bk) and a cartridge 72 for color ink containing three color inks of cyan (C), magenta (M) and yellow (Y). Can be mounted.
  • a total of four ink discharge heads 6 1 to 6 4 are formed on the print head 2 8 below the carriage 3 1, and the bottom of the carriage 3 1 has a head for each color.
  • An inlet pipe 67 (see Fig. 9) for guiding the ink from the ink tank is provided upright.
  • FIG. 9 is an explanatory diagram showing a schematic configuration inside the ink ejection head 28.
  • the ink cartridges 7 1 and 7 2 are mounted on the carriage 31, the ink in the ink cartridge is sucked out through the introduction pipe 67 by utilizing the capillary phenomenon as shown in FIG.
  • the printing head 28 is provided at the lower portion of the carriage 31 and is guided to the heads 6 1 to 64 of the respective colors.
  • the operation of sucking ink into the heads 61 to 64 of each color is performed by a dedicated pump.In this embodiment, the pump for suction and the print head 28 at the time of suction are operated.
  • the illustration and description of the configuration of the covering cap and the like are omitted.
  • FIG. 10 shows the structure of the piezo element PE and the nozzle Nz in detail. As shown in the upper part of FIG. 10, the piezo element PE is installed at a position in contact with the ink passage 68 that guides the ink to the nozzle Nz. As is well known, the piezo element PE is an element that distorts the crystal structure due to the application of a voltage, and performs electro-mechanical energy conversion at extremely high speed.
  • the piezo element PE is extended by the voltage application time as shown in the lower part of Fig. 10. Then, one side wall of the ink passage 68 is deformed. As a result, the volume of the ink passage 68 contracts in accordance with the expansion of the piezo element PE, and the ink corresponding to the contraction becomes particles Ip and is discharged at high speed from the tip of the nozzle Nz. Printing is performed by the ink particles Ip penetrating into the paper P mounted on the platen 26.
  • FIG. 11 is an explanatory diagram showing the internal configuration of the control circuit 40.
  • a PC interface 44 for exchanging data with the computer 90, a paper feeder 23, a carriage motor 24 And signals with operation panel 32, etc.
  • Peripheral input / output unit (PI ⁇ ) 45 that exchanges data
  • timer 46 that measures time
  • drive buffer 47 that outputs dot on / off signals to heads 6 1 to 66
  • the control circuit 40 also includes a transmitter 51 for outputting a driving waveform for driving the piezo element at a predetermined frequency, and outputs from the transmitter 51 to the heads 61 to 64 at a predetermined timing.
  • a distributor 55 for distributing is also provided.
  • the control circuit 40 receives the dot data processed by the computer 90, temporarily stores it in the RAM 43, and outputs it to the driving buffer 47 at a predetermined timing.
  • FIG. 12 is an explanatory diagram showing the arrangement and connection of one nozzle row of the heads 61 to 64 as an example.
  • 48 nozzles Nz are arranged in a staggered manner at a constant nozzle pitch k.
  • the state of dots formed by the nozzle row of the present embodiment is shown on the right side of FIG.
  • the circle shown by the solid line is a dot that can be formed by one main scan.
  • the dashed line is shown as an indicator of the interval between the dots.
  • the nozzle pitch k corresponds to two dots.
  • each nozzle array need not be arranged in a staggered manner, and may be arranged on a straight line. However, if they are arranged in a staggered pattern as shown in FIG. 12, there is an advantage that the nozzle pitch k can be easily set small in manufacturing.
  • Each of the nozzle arrays of the heads 6 1 to 6 4 is interposed in a circuit in which the driving buffer 47 is used as a source and the distribution output unit 55 is used as a sink.
  • One of the electrodes is connected to each output terminal of the driving buffer 47, and the other electrode is connected to the output terminal of the distribution output device 55 collectively.
  • the drive waveform of the oscillator 51 is output from the distribution output device 55.
  • On / off for each nozzle is determined from CPU 81 and each terminal of drive buffer 47 When the signal is output to the, only the piezo element PE that has received the ON signal from the driving buffer 47 is driven according to the driving waveform.
  • the ink particles Ip are simultaneously discharged from the nozzles of the piezo element PE that have received the ON signal from the transfer buffer 47.
  • the nozzle rows are formed in a staggered manner, so when forming dots while transporting the carriage 31, in order to form dots arranged in one row in the main scanning direction, It is necessary to shift the ink ejection timing of each nozzle row. In addition, it is necessary to similarly shift the ink ejection timing for each of the heads 61 to 64.
  • the CPU 81 outputs on / off signals of the respective dots via the driving buffer 47 in consideration of such a timing shift to form dots of each color.
  • the printer 22 of this embodiment transports the paper P by the paper feed mode 23 (hereinafter referred to as “sub-scan”), and controls the carriage 31 by the carriage motor 24. It is reciprocated (hereinafter referred to as main scanning), and at the same time, the piezo elements PE of the heads 6 1 to 6 4 of the print head 28 are driven to eject ink of each color to form dots. To form a multi-color image on paper P.
  • the printer 22 having the head that discharges ink using the piezo element PE is used, but a printer that discharges ink by another method may be used.
  • the present invention may be applied to a pudding type in which ink is discharged by bubbles generated in the ink passage by energizing a heater disposed in the ink passage.
  • FIG. 13 shows the flow of the dot formation control processing routine.
  • This is a process executed by the CPU 81 of the computer 90.
  • the CPU 81 inputs image data (step S100).
  • This image data is the data passed from the application program 95 shown in FIG. 2 and has a value of 0 to 15 for each of the R, G, and B colors for each pixel constituting the image. This is data having 16 gradation values.
  • the resolution of this image data changes according to the resolution of the original image data ORG.
  • the CPU 81 converts the resolution of the input image data into a resolution for printing by the printer 22 (step S105). If the image data is lower than the printing resolution, resolution conversion is performed by generating new data between adjacent original image data by linear interpolation. Conversely, if the image data is higher than the print resolution, resolution conversion is performed by thinning out the data at a fixed rate.
  • the resolution conversion processing is not essential in the present embodiment, and printing may be executed without performing such processing.
  • the color correction process is a process of converting image data consisting of R, G, and B gradation values into a decimation of gradation values of C, M, Y, and ⁇ colors used in the printer 22.
  • This processing is performed by using a color correction table LUT (see Fig. 7) that stores the combination of:, M, Y, and ⁇ to represent the color composed of each combination of R, G, and B in the print area 22.
  • Various known techniques can be applied to the processing itself for performing color correction using the color correction table LUT, and for example, processing by interpolation (such as the technique described in Japanese Patent Application Laid-Open No. 4-144481) can be applied.
  • the CPU 81 performs halftone processing on the color-corrected image data (step S200).
  • the halftone process means that the printer 22 converts the tone value of the original image (16 tones in the present embodiment) into a tone value that can be expressed by the printer 22 for each pixel.
  • halftone processing is performed for two gradations of dot on / off, but halftone processing for more gradations is performed. It may be performed.
  • halftone processing is performed by the dither method.
  • Fig. 14 shows the flow of halftone processing by the dither method.
  • the CPU 81 inputs an image data CD (step S202).
  • the input image data CD is a color image that has been subjected to color correction processing (step S110 in FIG. 13) and has 16 gradations for each color of C, ⁇ , ⁇ , and K.
  • initialization is performed by assigning a value of 0 to each pixel number (kx, ky) constituting the image data (step S204).
  • the image data is composed of nx two-dimensionally arranged pixels in the main scanning direction and ny in the sub-scanning direction.
  • Figure 1 shows the relationship between image data and pixels.
  • Each pixel has a pixel number kx assigned in the main scanning direction (X direction in FIG. 1) from the left side in FIG. 1 and a pixel number assigned in the sub scanning direction (y direction in FIG. 1) from the upper side in FIG. Expressed using ky.
  • the upper left pixel shown in FIG. 1 is set as the pixel to start processing.
  • the CPU 81 calculates the component number (Xt, yt) of the dither matrix used for the halftone processing (step S206).
  • the dither matrix is composed of mx two-dimensionally arranged components in the main scanning direction and my in the sub-scanning direction.
  • each component is represented by an integer component number (Xt, yt) such that 0 ⁇ xt ⁇ mx and 0 ⁇ ytmy.
  • each component number is calculated by the following equation (2).
  • yt ((kxdiv mx) xdy + ky)% my;... (2)
  • % is the remainder operator, for example, kX% mx means the remainder of kxZmx.
  • Kxdivmx means the quotient of kxZmx.
  • Figure 15 shows the correspondence between dither matrix components and each pixel. For convenience of illustration, only the-part of the image data is shown. The components of the dither matrix corresponding to each pixel are shown in Fig. 15 in the form of (xt, yt). The values from 0 to 9 at the top of Fig. 15 indicate the pixel numbers in the main scanning direction, and the values from 0 to 5 on the left indicate the pixel numbers in the sub-scanning direction. ing.
  • Pixels (5, 0) to (7, 0) Components (1, 1) to (3, 1); Pixels (4, 1) to (7, 1) —Components (0, 2) to (3, 2); Pixels (4, 2) to (7, 2) —Components (0, 3) to (3, 3) );
  • the shift amount dy in the sub-scanning direction is also a constant value in the entire image area, but the shift amount dy is changed each time the matrix is used repeatedly in the main scanning direction or the sub-scanning direction. Can also.
  • the CPU 81 compares the gradation value CD (kx, ky) of the image data with the threshold value DM (xt, yt) of the dither matrix (step S208). .
  • the gradation value is larger than the threshold value, that is, when CD (kX, ky)> DM (xt, yt)
  • Substitute the value that indicates the ON of the dot into the value CDR (kx, ky) (step S212).
  • step S210 it is determined that the dot should be turned off, and a value indicating that the dot is turned off is substituted into the result value CDR (kx, ky) (step S210).
  • the result value CDR is transferred to the driving buffer 47 (see FIG. 12) through processing such as rasterizing, which will be described later, and determines ON / OFF of each nozzle.
  • the CPU 81 increases the pixel number kx by the value 1 (step S214). That is, the pixel to be processed is shifted by one in the main scanning direction. Further, it is determined whether or not the pixel number kX set in this way is equal to or more than the value nX (step S216). As described above, the image data has nx pixels in the main scanning direction, and the pixel number kX can take a value from 0 to nX-1.
  • the CPU 81 initializes the pixel number kX in the main scanning direction by substituting the value 0, and increases the pixel number ky in the sub-scanning direction by the value 1 (step S218). This means that processing of the next raster will begin.
  • the image data has ny pixels in the sub-scanning direction, and the pixel number ky can take a value from 0 to ny-1.
  • the CPU 81 increases the pixel number ky in the above step S218, compares the pixel number ky with the value ny (step S220), and when ky is greater than or equal to the value ny. Ends the halftone process.
  • Fig. 16 shows an example of the result of performing the above processing.
  • FIG. 16 shows the result of performing halftone processing on image data having a constant gradation value 8 using the Bayer matrix shown in FIG. The correspondence between the matrix and the image data is as shown in Fig.15. Comparing the Bayer type matrix shown in Fig.
  • the gradation value 8 is larger than the threshold values set as the components (2, 2), (1, 3), and (3, 3). Therefore, a dot is turned on at a pixel corresponding to such a component.
  • the hatched pixels indicate pixels whose dots are turned on. Looking at the unit of each matrix, the dots are formed in a checkered pattern, but since the matrix is shifted from the image data in the sub-scanning direction, the dots in the entire image data are in a checkered pattern. No.
  • the CPU 81 performs a rasterization on the result value CDR subjected to the halftone processing by the above processing (step S300 in FIG. 13). This means that one raster's worth of data is sorted in the order that the evening is transferred to the head of the pudding.
  • a recording method is used in which every other dot is formed, for example, every other dot, and the second main scan forms the remaining dots.
  • each raster is formed by two main scans.
  • step S240 creates the data to be transferred to the head according to the recording method performed by the printer 22.
  • the CPU 81 outputs the data and transfers it to the printer 22 (step S310).
  • Fig. 17 shows an example of dot recording by the overlap method.
  • the nozzle pitch in the sub-scanning direction is 2 dots.
  • the position of the head in the sub-scanning direction is shown corresponding to the first to fifth main scanning.
  • the position of each nozzle is indicated by “ ⁇ ”.
  • the number enclosed by a circle indicates the nozzle number.
  • the right side of FIG. 17 shows the state of the dots formed in each main scan.
  • the sub-scan is performed with a feed amount equivalent to three dots, and then the dots are formed while the second main scan is performed. Also in this case, for the above-mentioned reason, dots are formed using only the nozzles No. 4 to No. 6. Further, after performing sub-scanning corresponding to three dots, dots are formed while performing third main scanning.
  • the position of No. 2 nozzle in the third main scan coincides with the position of No. 5 nozzle in the first main scan. Therefore, the second nozzle records a pixel in which no dot is formed in the first main scan, that is, an even-numbered pixel.
  • dots can be formed in the area indicated by PA in FIG. 17 without gaps.
  • odd-numbered pixels and even-numbered pixels are formed by different nozzles.
  • the dither matrix is By shifting the pattern in a stepwise manner from the grid, the dots can be suppressed from being formed in a regular pattern in units of a matrix.
  • dots are completely formed in a checkered pattern as shown in FIG. 28 for image data having a constant gradation value of 8. Will be.
  • the regularity of dots is broken as shown in FIG.
  • the printing apparatus of the present embodiment it is possible to suppress the occurrence of unevenness in the number of dots for each raster due to the loss of dot regularity. Therefore, when there is a nozzle in which the dot formation position is shifted based on a mechanical manufacturing error, it is possible to avoid an increase in the number of dots formed by such a nozzle. As a result, it is possible to avoid occurrence of remarkable banding in a lasing portion formed by the nozzle, and to improve image quality. This effect can be obtained both in the case of performing the overlap recording and in the case of completing each raster in one main scan.
  • the image quality can be improved even when performing recording by the overlap method for the following reason.
  • dots are formed in a regular pattern as shown in FIG. 28, the pixels on which dots are formed are often biased to odd-numbered pixels or even-numbered pixels when viewed from each raster. In the case where such deviation occurs, even if the recording by the overlap method is adopted, most of each lath is substantially formed by a single nozzle. I can't get enough.
  • the printing apparatus of the present embodiment as a result of suppressing the above-mentioned regular pattern, it is possible to suppress the pixels in which dots are formed from being biased to odd-numbered or even-numbered. Therefore, the effect of improving the image quality by the overlap method can be sufficiently obtained.
  • the hardware configuration of the printing apparatus according to the second embodiment is the same as that of the printing apparatus according to the first embodiment (see FIGS. 6 to 12).
  • the dot formation control process is the same as in the first embodiment (see FIG. 13).
  • the content of the halftone process (step S200 in FIG. 13) is different from that of the first embodiment.
  • a halftone process is performed using an error diffusion method.
  • FIG. 18 shows the contents of the halftone process in the second embodiment, that is, the halftone process by the error diffusion method.
  • the CPU 81 reads the image data CD (step S250), and performs initialization by substituting the value 0 into both the pixel numbers (kx, ky) (step S252).
  • These processing contents are the same as the halftone processing (steps S202 and S204 in FIG. 14) in the first embodiment.
  • the CPU 81 generates the diffusion error correction data CDX based on the initialized image data of the pixel number (0, 0) (step S254).
  • an error in the gradation expression generated for the processed pixel is assigned in advance to pixels surrounding the pixel with a predetermined weight, so that in step S254, the corresponding error is read out. This is reflected in the pixel of interest to be processed now.
  • Fig. 19 shows an example of how to assign this error to which pixel in the surrounding area and to what degree of weighting the pixel PP of interest.
  • a predetermined weight (1Z4, 1Z8, 1/16). The error diffusion processing will be described later in detail.
  • the CPU 81 calculates a component number (Xt, yt) of the matrix (step S256).
  • the calculation of the component number (X t, y t) is performed using the equation (2) described in the first embodiment.
  • the size and displacement d y of the matrix used in this embodiment are the same as those in the first embodiment. Therefore, the correspondence between the matrix and the image data is the same as in the first embodiment. In other words, the correspondence is such that the matrix is displaced stepwise from the grid by one pixel in the sub-scanning direction.
  • the matrix component DM (xt, yt) thus set is added as noise to the diffusion error correction data CDX (kx, ky) obtained in step S254.
  • the image data after the noise is added is the noise added data C DN (kX, ky)
  • the following equation (3) is calculated. The reason for adding noise in this way will be described later.
  • CDN (k X, ky) CDX (kx, ky) + DM (xt, yt)... (3) Compare the magnitude of the noise-added CDN generated in this way with a predetermined threshold TH (step S 260), if the data CDN is greater than the threshold value TH, substitute a value indicating that the dot is on into the result value CDR (kx, ky) . If the data CDN is less than the threshold value TH, the result value CDR (kx, ky) Substitute a value indicating that the dot is off into ky) (step S240).
  • the threshold value TH is a value that serves as a reference for judging on / off of a dot as described above. This threshold value TH can be set to any value. In this embodiment, the threshold value TH is set to a value 7 which is an intermediate value between 16 gradation values of 0 to 15 which can be taken by the image data CD.
  • step S266 the CPU 81 calculates an error generated by the halftone process, and executes a process of diffusing the error to peripheral pixels (step S266). Error and Is the original image data from the evaluation value of the density represented by each dot after halftone processing.
  • the error calculated in this way is diffused to peripheral pixels at the rate shown in FIG.
  • the error corresponding to the gradation value 4 is calculated at the pixel PP of interest
  • the error corresponding to the gradation value 1 which is the error 14 is diffused to the adjacent pixel P1. Will be.
  • the errors are similarly diffused for the other pixels at the rate shown in FIG.
  • the error thus diffused is reflected on the image data CD in step S254 described above, and diffusion error correction data CDX is generated.
  • the CPU 81 increases the pixel number kx by the value 1 (step S268) and compares the magnitude relationship with the number nX of pixels in the main scanning direction (step S270) ). If the pixel number kx is equal to or larger than the pixel number nx, the value 0 is substituted into, and the pixel number kx in the sub-scanning direction is increased by the value 1 (step S2722), and the pixel number ny in the sub-scanning direction (Step S2744) The pixels to be processed are sequentially moved until the processing for all the pixels is completed by these processes. When the processing has been completed for all the pixels, the halftone processing routine ends, and the process returns to the dot formation control processing routine (FIG.
  • the subsequent processing is the same as in the first embodiment.
  • noise is added to the diffusion error correction data CDX in step S258.
  • the error diffusion method can originally perform halftone processing without adding noise.
  • the dot generation rate may suddenly change according to the change in the gradation value. For example, in the case of image data having a uniform gradation value of 8, a large error occurs when the dot is turned on and when the dot is turned off. Therefore, it is very difficult to determine whether the dot is on or off. It is easy to be stable. If the occurrence rate of dots changes rapidly, false contours may occur and the image quality may decrease. In this embodiment, noise is added to avoid such a phenomenon. By adding noise to the image data, it is possible to prevent the above-mentioned unstable gradation values from being present over a wide range, and thus it is possible to suppress a sudden change in the incidence of dots.
  • a matrix set so that the average value of each component value is 0 is used. If the average value is a value other than 0, the density expressed as a whole will change.
  • a matrix in which each component of the bayer type matrix was shifted so as to fall within the range of -7 to 7 was used.
  • various matrices such as a blue noise mask type matrix can be used by shifting them so that the average value of the threshold value becomes zero.
  • high-quality halftone processing and printing can be performed by adding noise based on a matrix.
  • the matrix is made to correspond to the image data in a grid pattern, the added noise will be a repetition of a regular pattern, so that the dots may be formed in a regular pattern.
  • the matrix is shifted stepwise with respect to the image data so that the formation of such a regular pattern can be avoided, and high-quality printing can be performed. I can. Such an effect can be obtained regardless of whether printing is performed by completing each raster in one main scan or printing by the overlap method.
  • the matrix is made to correspond to the matrix while being shifted stepwise in the sub-scanning direction. However, the matrix may be shifted in the main scanning direction, or may be shifted to both. Absent.
  • the embodiment can be adopted as a recording medium on which a program for realizing such processing is recorded.
  • recording media include flexible disks, CD-ROMs, magneto-optical disks, IC cards, ROM cartridges, punched cards, printed materials on which codes such as barcodes are printed, and internal storage devices (such as RAM and Various computer-readable media can be used, such as a memory such as a ROM) and an external storage device.
  • a program supply device that supplies a computer program for performing the above-described image processing and the like at the time of combination via a communication path is also possible.
  • a generally well-known bayer type matrix is used for halftone processing.
  • a blue noise mask type matrix can also be used.
  • a matrix designed for the image processing device and the printing device can also be used.
  • FIG. 20 is a flowchart showing the procedure of a matrix design method according to an embodiment of the present invention.
  • FIGS. 21 to 24 show specific design examples. The matrix design method in this embodiment will be described with reference to these drawings.
  • step S10 set the size of the matrix and the threshold stored in the matrix Is set.
  • the matrix size is set according to the gradation value to be expressed by halftone processing and the memory capacity for storing the matrix.
  • the threshold is set according to the gradation value to be expressed by the halftone processing.
  • the matrix size is set to 4 ⁇ 4, and the threshold value is set in a range of values 0 to 15.
  • the threshold value is a continuous integer in the range of values 0 to 15.
  • a discrete threshold value may be stored.
  • overlapping thresholds may exist.
  • the arrangement of the matrix refers to the correspondence of the matrix to the image data.
  • the matrix may be arranged in a grid pattern with respect to the image data, or may be arranged in a stair-like manner. In the present embodiment, as described later, they are arranged stepwise.
  • thresholds 0 and 1 are assigned to components in the matrix (step S14).
  • FIG. 21 shows the assignment of thresholds in the present embodiment.
  • the value 0 was assigned to component (0, 0) and the value 1 was assigned to component (2, 1). This means that two thresholds are assigned from the smaller of all thresholds arranged in the matrix. Three or more thresholds may be assigned in ascending order, or only the smallest ⁇ value may be assigned.
  • the threshold value can be assigned to an arbitrary component, but is desirably assigned in consideration of the dispersibility of dots.
  • FIG. 20 shows the step of substituting the value 2 for the threshold value nc to be set in this sense.
  • step S18 select one component in the matrix for which the threshold has not yet been set.
  • step S20 the evaluation value of the distance from this component to the component for which the threshold has already been set is calculated (step S20).
  • the component (3, 0) is selected first.
  • FIG. 22 shows the position of this component on the image data.
  • FIG. 22 shows the correspondence between the matrix and the image data in the present embodiment.
  • the component (3, 0) corresponds to the pixel DD in FIG.
  • the matrix is arranged stepwise in FIG. 22, there are many pixels corresponding to the component (3, 0), but one of them may be selected.
  • the distance evaluation value is calculated for each.
  • the evaluation value of the distance is calculated through a step of calculating a distance to a pixel for which a threshold has already been set, as described later, and a step of obtaining an evaluation value of the distance based on the distance.
  • the calculation of the distance is performed in the following manner.
  • the pixels DD with undefined thresholds there are many pixels to which threshold 0 is assigned according to the arrangement of the matrix.
  • the distance is calculated by selecting the pixel with the shortest distance from among such a large number of pixels.
  • the pixel adjacent to the upper right of the pixel DD is the closest pixel.
  • the distance between the pixel to which threshold value 1 is assigned and the pixel DD is calculated.
  • a distance evaluation value e vl is obtained by the following equation (4). Where "-" is a power operator.
  • the component having the smallest evaluation value is selected (step S24).
  • the evaluation value e V A component having a minimum value of 1 corresponds to a pixel that is farther from any pixel for which a threshold has already been set, so if halftone processing is performed using a matrix designed by assigning a threshold to such a component, In this embodiment, it is possible to secure the dispersibility of the dots in the entire image data.In this embodiment, taking into account the arrangement of the matrix on the image data, the pixels for which the threshold is already set and the pixels which are not defined are used. Is calculated for the reason This is to ensure dot dispersibility throughout the image data.
  • the next threshold is set as the target.
  • the threshold nc is increased by 1 (step S26).
  • Figure 24 shows the result of the threshold assignment.
  • the matrix shown in Fig. 24 has a different matrix from both the bayer type and the blue noise mask type.
  • the matrix obtained in this manner may be corrected according to the relationship with the image data to be processed. For example, if the image data has gradation values from 0 to 255, the correction of multiplying each threshold by a factor is performed so that the matrix in Fig. 24 adopts a maximum of 255 thresholds. It may be applied.
  • the noise matrix is used as the noise matrix in the halftone processing shown in FIG. 18, correction for shifting the value of each component so that the average value becomes 0 may be performed.
  • various corrections can be made according to the relationship with the image data.
  • the matrix design method described above it is possible to obtain a matrix with high dot dispersibility in consideration of the arrangement of the matrix with respect to the image data. If halftone processing is performed using the matrix designed in this way, high-quality halftone processing with high dot dispersibility in the entire image data becomes possible. Further, according to the above design method, it is possible to obtain a matrix on the premise that the matrix is arranged in a stepwise manner as shown in FIG. 22 with respect to the image data. As a result, it is possible to obtain a matrix most suitable for the image processing apparatus and the printing apparatus of the present embodiment described above.
  • the present invention is applicable to an image processing apparatus that generates output data to be supplied to various image output apparatuses that output images using dots, such as an ink jet printer.

Abstract

Dithering matrices are arranged stepwise for image data to enable half tone processing. That is, dithering matrices are shifted one by one in the horizontal or vertical scanning direction, or in both the directions. Thus regular repetition of dot formation pattern in the horizontal and vertical scanning directions can be prevented, and banding hardly occurs, thereby improving the quality of image. The technique can be applied to the error dispersing method in which matrix data is added as noise. The matrix can be a known matrix or a dot-distributed matrix designed assuming stepwise arrangement.

Description

明細書  Specification
画像処理装置および方法並びに印刷装置 技術分野  Image processing apparatus and method, and printing apparatus
本発明は、 各画素ごとに階調値を有する画像デ一夕をハーフトーン処理する 技術、 該画像処理の技術を利用して画像を印刷する技術、 および前記画像処理 に用いられるマトリックスを設計する技術に関する。 背景技術  The present invention provides a technique for performing halftone processing on an image having a gradation value for each pixel, a technique for printing an image using the image processing technique, and designing a matrix used in the image processing. About technology. Background art
従来より、 コンピュータの出力装置として、 ヘッドに備えられた複数のノズ ルから吐出される数色のインクによりドッ卜を形成して画像を記録するインク ジエツ卜プリン夕が提案されており、 コンピュータ等が処理した画像を多色多 階調で印刷するのに広く用いられている。 かかるプリン夕では、 通常、 各画素 ごとにはドットのオン ·オフの 2階調しか採り得ない。 従って、 原画像データ の有する階調をドットの分散性により表現するための画像処理、 いわゆるハ一 フトーン処理を施した上で画像を印刷する。  2. Description of the Related Art Conventionally, as an output device of a computer, an ink jet printer that forms a dot with several colors of ink ejected from a plurality of nozzles provided in a head and records an image has been proposed. It is widely used to print processed images in multiple colors and multiple tones. In such printing, usually, only two gradations of dot on / off can be taken for each pixel. Therefore, an image is printed after image processing for expressing the gradation of the original image data by the dispersibility of dots, that is, so-called halftone processing.
近年では、 階調表現を豊かにするために、 各ドットごとにオン ·オフの 2値 よりも多い階調表現を可能としたインクジエツトプリン夕、 いわゆる多値プリ ン夕が提案されている。 例えば、 ドット径ゃインク濃度を変化させることによ り各画素ごとに 3種類以上の濃度を表現可能としたプリン夕ゃ各画素ごとに複 数のドットを重ねて形成することにより多階調を表現可能としたプリン夕であ る。 かかるプリン夕であっても各画素単位では原画像データの有する階調を十 分表現し得ないため、 ハーフトーン処理が必要となる。  In recent years, in order to enrich the gradation expression, there has been proposed an ink jet printing, which is a so-called multi-value printing, capable of expressing more than two levels of ON / OFF for each dot. For example, by changing the dot diameter divided by the ink density, three or more types of density can be expressed for each pixel. Multi-tones can be formed by superimposing multiple dots for each pixel. It is a pudding evening that can be expressed. Even in such printing, halftone processing is required because the gradation of the original image data cannot be sufficiently expressed in each pixel unit.
かかるハーフトーン処理には、 種々の方法が提案されており、 その代表的な 手法の一つとしてディザ法がある。 ディザ法では、 予め設定された闞値を各成 分とするディザマトリックスを用いる。 ディザマトリックスの一例として、 ベ ィャ型と呼ばれるマトリックスを図 2 5に示す。 図 2 5に示す通り、 4 X 4の サイズのベィャ型マトリックスでは 0〜 1 5までの 1 6個の閾値を有している。 ディザ法では、 このディザマトリックスを画像デ一夕に対応させて各画素のド ットのオン ·オフ判定を行う。 図 2 6にディザマトリックスと画像デ一夕との 対応を示す。 図 2 6中で (a, b ) のように示したのは、 図 2 5のディザマト リックスの成分をそれぞれ表している。 当然ながら画像デー夕は縦横それぞれ の方向にディザマトリックスのサイズの何倍も大きい画素を有している。 従つ て、 ディザ法では図 2 5に示したディザマトリックスを縦横それぞれの方向に 方眼状に配置して繰り返し用いる。 Various methods have been proposed for such halftone processing, and a dither method is one of the typical methods. In the dither method, a preset 闞 value is used for each component. Use a dither matrix for the minutes. As an example of the dither matrix, a matrix called Bayer type is shown in Fig. 25. As shown in FIG. 25, a 4 × 4 Bayer matrix has 16 thresholds from 0 to 15. In the dither method, the on / off determination of the dot of each pixel is performed in accordance with the dither matrix. Figure 26 shows the correspondence between the dither matrix and the image data. The components shown in (a, b) in Fig. 26 represent the components of the dither matrix in Fig. 25, respectively. Naturally, the image data has pixels that are many times the size of the dither matrix in each of the vertical and horizontal directions. Therefore, in the dither method, the dither matrix shown in FIG. 25 is repeatedly arranged and arranged in a grid in each of the vertical and horizontal directions.
なお、 いわゆるドット集中型の網点ディザ法などでは、 網点印刷を摸したス クリーン角度を発生させるためにマトリックスの繰り返し方向を 2次元的な画 素の配列方向に対して一定の角度を有するようにディザマトリックスを配置す ることもあるが、 ドット分散型のディザ法では、 網点印刷とは無関係なため、 ディザマトリックスを方眼状に配置するのが通常である。  In the so-called dot concentration type halftone dither method, the matrix repetition direction has a certain angle with respect to the two-dimensional pixel array direction in order to generate a screen angle that simulates halftone printing. Although a dither matrix may be arranged as described above, in the dot-dispersion type dither method, the dither matrix is usually arranged in a grid because it is not related to the halftone dot printing.
ディザ法におけるドッ卜のオン ·オフ判定の考え方を図 2 7に示した。 図 2 7は各画素ごとに一定の階調値 8を有する画像に対するドッ卜のオン ·オフ判 定の結果を示している。 図示する通り、 画像デ一夕の階調値と各画素に対応す るディザマトリックスの閾値とを比較し、 画像データの階調値の方が大きい画 素にドットを形成するものと判定する。 階調値 8に対しては、 図 2 7に示す通 り、 巿松状にドットをオンにすることになる。 もちろんドットをオンにする画 素は、 画像デ一夕の階調値およびハーフトーン処理で用いられるディザマトリ ックスに応じて変化する。  Figure 27 shows the concept of dot on / off determination in the dither method. FIG. 27 shows the result of dot on / off determination for an image having a constant gradation value 8 for each pixel. As shown in the figure, the tone value of the image data is compared with the threshold value of the dither matrix corresponding to each pixel, and it is determined that a dot is to be formed in a pixel having a larger tone value of the image data. As shown in FIG. 27, for the gradation value 8, the dots are turned on in a pine pattern. Of course, the pixel for turning on the dot changes according to the gradation value of the image data and the dither matrix used in the halftone processing.
図 2 7のオン ·オフ判定の結果を画像領域に展開した状態を図 2 8に示す。 図 2 8は、 図 2 6に示した対応関係でディザマトリックスを用いることによつ て得られるドットのオン 'オフ判定の結果を示している。 図 2 8中のハツチン グを付した部分がドットをオンにすべき画素である。 図示する通り、 ドットを 形成すべき画素は巿松状に広く分布する。 ハーフトーン処理に用いるディザマ トリックスが変われば図 2 8とは異なるパターンでドットがオンになる。 イン クジェットプリン夕では、 例えば上述したディザ法のようなハーフトーン手段 による結果に応じて各画素にドットを形成する。 FIG. 28 shows a state in which the result of the on / off determination shown in FIG. Figure 28 shows the result of using the dither matrix in the correspondence shown in Figure 26. This shows the result of the dot on / off determination of the dot obtained by the above. The hatched portions in FIG. 28 are the pixels for which the dots should be turned on. As shown in the figure, the pixels on which dots are to be formed are widely distributed in a pine pattern. If the dither matrix used for halftone processing changes, the dots will turn on in a different pattern from that in FIG. In the ink jet printing, dots are formed in each pixel according to the result of the halftone means such as the dither method described above.
しかし、 ディザ法を用いてハーフトーン処理を行った場合には、 ディザマト リックスと画像デ一夕との対応関係 (図 2 6 ) から明らかな通り、 画像領域に はディザマトリックスの大きさを単位としてほぼ一定のドッ卜の形成パターン が方眼状に現れる。 従来の印刷装置では、 このような一定のパターンに起因し て、 以下の理由により画質が低下することがあった。  However, when halftone processing is performed using the dither method, as is clear from the correspondence between dither matrix and image data (Fig. 26), the size of the dither matrix is used as the unit for the image area. An almost constant dot formation pattern appears in a grid pattern. In a conventional printing apparatus, the image quality may be degraded due to the fixed pattern for the following reasons.
インクジエツトプリンタでは、 インクを吐出するノズルに機械的な製造誤差 等が存在すると、 吐出されるインク量や、 形成されるドットの位置にノズルご とのばらつきが生じる。 特定のノズルのインク吐出量が多かったり、 ドットの 形成位置のずれによって、 隣接するラス夕間の間隔に広狭が生じると、 その部 分で印刷画像に濃度ムラが生じる。 特にへッドを主走査しながらドットを形成 するプリンタでは、 主走査方向に同様のムラが連続的に生じやすいため、 主走 査方向にバンディングと呼ばれる筋状の濃度ムラが現れることもあった。  In an ink jet printer, if there is a mechanical manufacturing error or the like in a nozzle that discharges ink, the amount of ink to be discharged and the position of dots to be formed vary from nozzle to nozzle. If the ink discharge amount of a specific nozzle is large or the dot formation position shifts, the gap between adjacent laths and evenings becomes large or small, causing uneven density in the printed image at that part. Particularly in printers that form dots while scanning the head in the main direction, similar unevenness is likely to occur continuously in the main scanning direction, so that streak-like density unevenness called banding may appear in the main scanning direction. .
ディザマトリックスによってドットの発生を決定した場合、 ディザマトリッ クスの閾値と画像デ一夕の階調値に応じて、 ドットの発生率がラス夕ごとに偏 ることがある。 ディザマトリックスを方眼状に配置して画像全体のドッ卜の発 生を決定した場合、かかる偏りをもったパターンが繰り返し生じることになり、 ラスタごとのドットの発生率の偏りが助長される。 かかる場合に、 ドット数が 多いラスタが、ドッ卜の位置がずれて形成されるノズルによって形成されると、 顕著なバンデイングを生じ、 画質を低下させることがあった。 かかる問題は、 べィャ型のディザマトリックスを用いた場合のみならず、 特 定の規則性のないランダムなドット発生パターンを持ついわゆるブル一ノイズ マスク型のディザマトリックスを用いた場合にも同様に生じる。 これは、 ブル 一ノイズマスク型のディザマトリックスにより生成される規則性のないランダ ムなドット発生パターンであっても、 各ラス夕ごとのドット発生率には大きな ばらつきが生じるからである。 When the dot generation is determined by the dither matrix, the dot generation rate may be biased every day according to the threshold of the dither matrix and the gradation value of the image. When the occurrence of dots in the entire image is determined by arranging the dither matrix in a grid pattern, such a biased pattern is repeatedly generated, which promotes a bias in the dot generation rate for each raster. In such a case, if a raster having a large number of dots is formed by nozzles formed by shifting the positions of the dots, remarkable banding may occur and image quality may be degraded. This problem occurs not only when a Bayer-type dither matrix is used, but also when a so-called Bull-Noise mask-type dither matrix having a specific random dot generation pattern is used. Occurs. This is because even a random dot generation pattern with no regularity generated by a bull noise mask type dither matrix has a large variation in the dot generation rate for each raster.
一方、 バンデイングの発生を抑制して画質を向上する技術として、 いわゆる オーバラップ方式による記録が提案されている。 これは、 各ラスタを 2つ以上 の異なるノズルを用いて形成する技術である。 一例として、 各ラス夕を 2つの ノズルを用いて、 2回の主走査で形成する場合を考える。 1回目の主走査では 各ラスタの奇数番目のドットのみを間欠的に形成する。 その後副走査を行い、 2回目の主走査では、 1回目とは異なるノズルを用いて偶数番目のドットのみ を間欠的に形成する。 かかる記録方式を採用すれば、 各ラスタを 2つ以上の異 なるノズルで形成するため、 ノズルの特性等に起因して生じるドットの形成位 置のずれを各ラスタ上で分散させることができ、画質を向上することができる。 ところが、 ディザ法を用いてハーフトーン処理を行った場合には、 上記ォ一 バラップの効果が十分に得られないことがあった。 ディザ法によるハーフトー ン処理により図 2 8に示す結果が得られた場合を考える。 このとき、 ドットを オンにすべき画素は市松状に並んでいる。 これは、 各ラス夕ごとに見れば、 奇 数番目または偶数番目のいずれかの画素のドッ卜がオンになっていることを意 味している。 上述したオーバラップ方式による記録の例では、 1回目の主走査 では各ラス夕の奇数番目の画素のドットを形成し、 2回目の主走査では各ラス 夕の偶数番目の画素のドットを形成する。 図 2 8のハーフトーン処理結果に対 して、 かかるオーバラップ方式による記録を実行した場合、 結局各ラス夕は 1 回目または 2回目のいずれかの主走査によってのみ形成されることになる。 か かる場合には、 各ラス夕上のドットを異なるノズルを用いて形成することによ り得られるオーバラップ方式の利点が生かせず、 画質の向上というメリットは 十分には得られないことがあった。 On the other hand, as a technique for suppressing banding and improving image quality, recording using a so-called overlap method has been proposed. This is a technique in which each raster is formed using two or more different nozzles. As an example, consider a case where each nozzle is formed by two main scans using two nozzles. In the first main scan, only odd-numbered dots of each raster are formed intermittently. Sub-scanning is performed thereafter, and in the second main scanning, only even-numbered dots are intermittently formed using nozzles different from those in the first scanning. If such a recording method is adopted, since each raster is formed by two or more different nozzles, a shift in dot formation position caused by nozzle characteristics or the like can be dispersed on each raster. Image quality can be improved. However, when the halftone processing is performed by using the dither method, the above-described effect of the overlap may not be sufficiently obtained. Let us consider the case where the result shown in Fig. 28 is obtained by the halftone processing by the dither method. At this time, the pixels whose dots should be turned on are arranged in a checkered pattern. This means that the dot of either the odd-numbered pixel or the even-numbered pixel is turned on when viewed at each raster. In the example of the recording by the overlap method described above, the dots of the odd-numbered pixels of each raster are formed in the first main scan, and the dots of the even-numbered pixels of each raster are formed in the second main scan. . When printing by the overlap method is performed on the halftone processing result in FIG. 28, each raster is eventually formed only by the first or second main scanning. Or In such a case, the advantage of the overlap method obtained by forming the dots on each lath using different nozzles could not be used, and the advantage of improving the image quality could not be sufficiently obtained. .
上述の例で用いたべィャ型のディザマトリックスはディザ法によるハーフト ーン処理において比較的多く用いられているマトリックスである。 かかるマト リックスを用いた場合には、 オーバラップ方式による利点が十分に得られない という問題が顕著に生じることが分かつた。  The Bayer type dither matrix used in the above-described example is a matrix that is relatively frequently used in halftone processing by the dither method. It has been found that when such a matrix is used, the problem that the advantage of the overlap method cannot be obtained sufficiently occurs.
以上の説明では、 べィャ型のディザマトリックスを例にとったが、 他のディ ザマトリックスを用いた場合も、あらゆる階調値でラス夕毎のドット発生率や、 偶数画素と奇数画素のドット発生率をほぼ等しくすることは困難であるため、 同様の課題が生じていた。 べィャ型と異なるディザマトリックスを用いれば、 ドットは図 2 8に示したパターンとは異なるパターンで形成される。とはいえ、 この場合でもディザマトリックス単位で同様のパターンが画像の縦横それぞれ の方向に方眼状に繰り返し現れることに変わりはない。 従って、 ラス夕毎に形 成されるドットの数に偏りがあれば、 ィンクの吐出方向のバラツキに基づいて バンデイングを生じる可能性がある。 また、 奇数番目の画素に比較的小さい閾 値が偏って存在するラスタがあれば、 オーバラップ方式による記録の効果を十 分に得ることはできない。  In the above description, the Bayer-type dither matrix is taken as an example.However, when other dither matrices are used, the dot generation rate for each raster and the even and odd pixels Since it is difficult to make the dot generation rates almost equal, a similar problem has occurred. If a dither matrix different from the bayer type is used, the dots are formed in a pattern different from the pattern shown in FIG. However, even in this case, the same pattern is repeatedly displayed in the vertical and horizontal directions of the image in a diagonal matrix. Therefore, if there is a bias in the number of dots formed in each evening, banding may occur based on variations in the ink ejection direction. In addition, if there is a raster in which a relatively small threshold value is biased in odd-numbered pixels, the effect of recording by the overlap method cannot be sufficiently obtained.
同様の課題は、 ディザ法以外のハーフトーン手段においても同様に生じてい た。 ディザ法以外のハーフトーン処理手法としては、 例えば誤差拡散法と呼ば れる手法がある。 かかる手法は、 本来はマトリックスを用いることなくハーフ トーン処理を行うものであるが、 ハーフトーン処理結果の連続性を確保する等 の目的で画像デー夕に敢えて所定のノィズを付加した上でハーフト一ン処理を 行うことがある。 このノイズデータとして予め定めたノイズデータを有するマ トリックスを図 2 6に示した対応関係で用いた場合、 一定の繰り返しパターン でノイズを付加することに起因して、 ディザ法を例にとって説明した上述の問 題と同様の問題が生じることがあった。 発明の開示 A similar problem occurred in halftone means other than the dither method. As a halftone processing method other than the dither method, for example, there is a method called an error diffusion method. Such a method originally performs halftone processing without using a matrix. However, in order to ensure continuity of the halftone processing result, a predetermined noise is intentionally added to the image data before halftone processing. Processing may be performed. When a matrix with predetermined noise data is used as the noise data in the correspondence shown in Fig. 26, a fixed repetition pattern In some cases, the same problem as the above-described problem described with the dither method as an example may occur due to the addition of noise. Disclosure of the invention
この発明は、 上述の課題を解決するためになされたものであり、 ドット分散 型のマトリックスを用いたハーフトーン手段において、 ドットが形成されるパ ターンが画像領域内で縦および横方向に周期的に現れることを回避し、 画質を 向上するための技術を提供することを目的とする。  SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problem. In a halftone means using a dot dispersion type matrix, a pattern in which dots are formed is periodically arranged in a vertical and horizontal direction in an image area. The purpose of the present invention is to provide a technology for avoiding the appearance of an image and improving image quality.
上述の課題の少なくとも一部を解決するため、 本発明は、 次の構成を採用し た。  In order to solve at least a part of the problems described above, the present invention employs the following configurations.
本発明の画像処理装置は、  The image processing apparatus according to the present invention includes:
2次元的な画素の配列により構成され、 各画素ごとに予め定めた範囲の階調 値を有する画像データに対し、 前記各画素ごとに前記階調値と所定の閾値との 大小関係に応じてドッ卜のオン ·オフを判定し、 所定の画像出力装置に対応し た出力デ一夕を生成する画像処理装置であって、  For image data having a two-dimensional array of pixels and having a predetermined range of gradation values for each pixel, the image data is determined for each pixel according to the magnitude relationship between the gradation value and a predetermined threshold value. An image processing device that determines whether a dot is on or off and generates an output data corresponding to a predetermined image output device,
前記 2次元的な画素の配列により構成された画像デ一夕の大きさよりも小さ いサイズで、 予め設定された値を成分とするドット分散型の 2次元マトリック スを記憶する記憶手段と、  Storage means for storing a dot-dispersion type two-dimensional matrix having a size smaller than the size of the image data composed of the two-dimensional pixel array and having a predetermined value as a component;
前記マ卜リックスを前記画像データに対して、 ドットのオン ·オフと前記画 像出力装置のドット形成特性の変動周期との干渉によって生じる画質の劣化を 回避可能な範囲で方眼状からずらして配置し、 該マトリックスの成分を前記画 像デ一夕の前記階調値または前記閾値に反映させて、 ドッ卜のオン ·オフを判 定するハーフトーン手段とを備えることを要旨とする。  The matrix is shifted with respect to the image data from a grid in a range in which deterioration of image quality caused by interference between on / off of dots and a fluctuation cycle of dot forming characteristics of the image output device can be avoided. The gist of the invention is to include a halftone means for judging on / off of a dot by reflecting the components of the matrix in the gradation value or the threshold value of the image data.
かかる画像処理装置によれば、 ドッ卜の形成パターンが前記マトリックス単 位で方眼状に繰り返し生じることを抑制でき、 画質を向上することができる。 方眼状とは、 例えば、 図 2 6に示したようにマトリックスを一つの単位として 捕らえた場合に、 画像デー夕上の配置が方眼状になっていることを意味する。 上記発明の画像処理装置では、 方眼状からずれた状態でマトリックスが対応付 けられるため、 X方向および y方向にドッ卜が一定のパターンで繰り返し形成 されることを回避できる。 According to such an image processing apparatus, it is possible to prevent a dot formation pattern from being repeatedly generated in a grid pattern in the matrix unit, and to improve image quality. The grid means that the arrangement on the image data is grid-shaped when the matrix is captured as one unit as shown in Fig. 26, for example. In the image processing apparatus according to the present invention, since the matrix is associated with a state deviating from the grid, it is possible to prevent the dots from being repeatedly formed in a fixed pattern in the X direction and the y direction.
ドットが一定のパターンで繰り返し形成される場合には、 前記 X方向または y方向の並びごとにドットの形成数に偏りが生じやすい。 例えば前記 X方向の 並びごとにドッ卜の形成数に偏りがある場合、 ドッ卜の数が多い並びの記録位 置にずれが生じると、 ドッ卜のオン ·オフと前記画像出力装置のドット形成特 性の変動周期との干渉によって顕著なバンディングを生じて画質が低下する。 本発明の画像処理装置では、 ドットが一定のパターンで繰り返し形成されるこ とを回避することにより、 各並びごとにドッ卜の形成数に偏りが生じることを 回避できる。 従って、 バンデイングの発生を抑制し、 画質に優れたハーフト一 ン処理を行うことができる。  In the case where dots are repeatedly formed in a fixed pattern, the number of formed dots tends to be biased for each arrangement in the X direction or y direction. For example, if there is a bias in the number of dots formed for each arrangement in the X direction, and if the recording position of the arrangement having a large number of dots is displaced, on / off of the dots and the dot formation of the image output device will occur. Remarkable banding occurs due to interference with the characteristic fluctuation cycle, and the image quality is reduced. In the image processing apparatus of the present invention, by preventing the dots from being repeatedly formed in a fixed pattern, it is possible to avoid a bias in the number of dots formed for each row. Therefore, it is possible to suppress the occurrence of banding and perform half-tone processing with excellent image quality.
既に述べたとおり、 ドット集中型のマトリックスを方眼状からずらして配置 する技術は存在した。 これは、 ドットが集中的に形成される方向を X方向、 y 方向からずらすことを意図したものである。 これに対し、 本願は、 ドットが分 散して形成される場合にドッ卜のオン ·オフと前記画像出力装置のドット形成 特性の変動周期との干渉によって生じる画質の劣化を回避することを意図した ものである。 本願は、 このようにドットを分散して形成する画像出力装置にお いて、 ドッ卜のオン ·オフと前記画像出力装置のドット形成特性の変動周期と の干渉によって画質の劣化が生じることを見出した点、 およびマトリックスの 配置を方眼状からずらすという簡易な手法によってかかる干渉が緩和されるこ とを見出した点に大きな技術的意義を有する。  As already mentioned, there was a technique to arrange the dot-intensive matrix off the grid. This is intended to shift the direction in which dots are concentratedly formed from the X and y directions. On the other hand, the present application intends to avoid deterioration of image quality caused by interference between on / off of dots and a fluctuation cycle of dot forming characteristics of the image output device when dots are formed in a dispersed manner. It is a thing. The present application has found that in an image output device that forms dots in this manner, image quality is degraded due to interference between the on / off of the dots and the fluctuation cycle of the dot formation characteristics of the image output device. This has great technical significance in that it has been found that such interference can be mitigated by a simple method of shifting the arrangement of the matrix from the grid.
ドットが一定のパターンで繰り返し形成されることを回避するという観点の みからすれば、 マトリックスのサイズを非常に大きなものに設定することも可 能ではある。 かかる手段によればマトリックスのデ一夕を記憶するためのメモ リが膨大なものとなる。 また、 該メモリのデータを読み出すために長時間を要 することになる。 本発明の画像処理装置および画像処理方法によれば、 マトリ ックスのサイズを大きくすることなく、上記効果を得ることができる。つまり、 本発明の画像処理装置および画像処理方法によれば、 メモリや処理時間を増加 させることなく、 画質を向上することができるという利点も有している。 In terms of avoiding repeated formation of dots in a certain pattern, For simplicity, it is possible to set the size of the matrix to be very large. According to such means, the memory for storing the matrix data becomes enormous. In addition, it takes a long time to read data from the memory. According to the image processing apparatus and the image processing method of the present invention, the above effects can be obtained without increasing the size of the matrix. That is, according to the image processing apparatus and the image processing method of the present invention, there is also an advantage that the image quality can be improved without increasing the memory and the processing time.
図 1は画像データとマトリックスとの対応関係を示す説明図である。 図 1中 の各マスはそれぞれ画素を示している。 また、 図 1中の太線は、 マトリックス を単位として対応させる領域を示している。 従来は図 2 6に示すように方眼状 にマトリックスを対応させていたが、 本発明の画像処理装置では、 例えば図 1 に示すように順次 y方向に階段状にずらした状態でマトリックスを対応させる のである。 図 1では y方向にずらした例を示しているが、 X方向にずらしつつ 対応させても構わないし、 双方にずらして対応させても構わない。 また、 それ ぞれの方向にずらしていく量も種々の値に設定可能である。 さらに、 画像デ一 夕の全ての領域において、 マトリックスをずらして対応させる必要はなく、 一 部の領域において方眼状からずらして対応させるものとしてもよい。  FIG. 1 is an explanatory diagram showing the correspondence between image data and matrices. Each square in FIG. 1 indicates a pixel. In addition, the bold line in FIG. 1 indicates an area corresponding to a matrix as a unit. Conventionally, matrices were associated in a grid as shown in FIG. 26, but in the image processing apparatus of the present invention, for example, as shown in FIG. 1, the matrices are sequentially shifted in the y direction in a stepwise manner. It is. Although FIG. 1 shows an example in which it is shifted in the y direction, it may be made to correspond while being shifted in the X direction, or both may be made to correspond. Also, the amount of shift in each direction can be set to various values. Further, it is not necessary to shift the matrix in all the regions of the image data, and it is also possible to shift the matrix in some regions from the grid shape.
上述した本発明の画像処理装置において、 画像デ一夕とマトリックスとの対 応を数式を用いてより正確に記述すれば、  In the above-described image processing apparatus of the present invention, if the correspondence between the image data and the matrix is more accurately described using mathematical formulas,
X方向に n x個、 y方向に n y個 (n x, n yは 2以上の整数) からなる合 計 n X X n y個の画素で構成され、 各画素ごとに予め定めた範囲の階調値を有 する画像デ一夕に対し、 前記各画素ごとに前記階調値と所定の閾値との大小関 係に応じてドッ卜のオン ·オフを判定し、 所定の画像出力装置に対応した出力 デ一夕を生成する画像処理装置であって、  It is composed of a total of n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values With respect to the image data, the on / off state of the dot is determined for each pixel according to the magnitude relationship between the gradation value and a predetermined threshold, and the output data corresponding to the predetermined image output device is determined. An image processing apparatus for generating
予め設定された値を成分とする m x x m y ( 1≤m x < n x , 1≤m y < n yなる整数) のドット分散型のマトリックスを記憶する記憶手段と、 前記各画素ごとに前記階調値または前記閾値に前記マトリックスの成分を反 映させて、 ドットのオン ·オフを判定するハーフトーン手段とを備え、 前記 X方向に kx番目 (k Xは 0≤ k x≤n Xなる整数)、 y方向に k y番目 の画素(kyは 0≤k y≤nyなる整数)に反映させるマトリックスの成分は、 次式 (1) で与えられる (X t, y t ) (0≤x t≤mx、 0≤y t≤myの整 数) である画像処理装置となる。 Mxxmy (1≤mx <nx, 1≤my <n storage means for storing a dot-dispersion type matrix of (integer y); and halftone for judging dot on / off by reflecting the matrix component to the gradation value or the threshold value for each pixel. The matrix component reflected on the kx-th pixel in the X direction (kX is an integer satisfying 0≤kx≤nX) and the ky-th pixel in the y direction (ky is an integer satisfying 0≤ky≤ny) is provided. Then, the image processing device is given by (Xt, yt) (0≤xt≤mx, 0≤yt≤my) given by the following equation (1).
X t = ( r x · d x l + r y · d x 2 + k x) mx ;  X t = (r x · d x l + r y · d x 2 + k x) mx;
y t = ( r x - d y l + r y - d y 2 + k y) my ;  y t = (r x-d y l + r y-d y 2 + k y) my;
r x = k x d i v mx ;  r x = k x d i v mx;
r y = k y d i v my ; ··· ( 1 ) ここで、  r y = ky d i v my; (1) where
a d i v bは a/bの商を整数値で求める演算子、  a d i v b is an operator that calculates the quotient of a / b as an integer,
a%bは aZbの余りを求める剰余演算子、  a% b is the remainder operator to find the remainder of aZb,
d x l , d x 2, d y l , d y 2は 0以上の整数であって、 d x l, d x 2, d y 1 , d y 2のうち少なくとも一つは 0以外の値である。  dxl, dx2, dyl, and dy2 are integers equal to or greater than 0, and at least one of dxl, dx2, dy1, and dy2 is a value other than 0.
かかる画像処理装置によれば、 上述の画像処理装置と同様、 ドットの形成パ タ一ンが前記マトリックス単位で一方向に繰り返し生じることを低減すること ができ、 画質を向上することができる。 上記発明における画像データとマトリ ックスとの対応について図 1を用いて具体的に説明する。  According to this image processing apparatus, similarly to the above-described image processing apparatus, it is possible to reduce the occurrence of the dot formation pattern being repeated in one direction in the matrix unit, and to improve the image quality. The correspondence between the image data and the matrix in the above invention will be specifically described with reference to FIG.
図 1に示す通り、 画像データは X方向および y方向に 2次元的に配列された 画素から構成されており、 X方向に 0番〜 n X— 1番までの n X個の画素、 y 方向に 0番〜 n y― 1番までの n y個の画素を有している。 この画像データの 任意の画素を X方向、 y方向の番号(以下、 画素番号という) を用いて(k x, ky) と表すものとする。 マトリックスは同じく 2次元的に配列されたデータ から構成されており、 X方向に 0番〜 mx— 1番までの mx個の成分、 y方向 に 0番〜 my— 1番までの my個の成分を有している。 マトリックスの任意の 成分を (x t, y t) と表すものとする。 As shown in Fig. 1, image data is composed of pixels arranged two-dimensionally in the X and y directions, and n X pixels from 0 to n X—1 in the X direction, y direction Has ny pixels from 0 to ny- 1. An arbitrary pixel of this image data is represented as (kx, ky) by using a number in the X direction and the y direction (hereinafter referred to as a pixel number). Matrix is also a two-dimensional array of data It has mx components from 0 to mx-1 in the X direction, and my components from 0 to my-1 in the y direction. An arbitrary component of the matrix is represented as (xt, yt).
このマトリックスと画像データとの対応は上式 (1) により求められる。 k x<mxかつ k y<myなる領域を考える。 図 1に示す領域 A 1である。 この とさ、  The correspondence between this matrix and the image data is obtained by the above equation (1). Consider an area where k x <mx and k y <my. This is the area A1 shown in FIG. This
r X = k X d i v mx = 0 ;  rX = kXdivmx = 0;
r y = k y d i v my = 0 ;  r y = ky d i v my = 0;
となるから、 上式 (1) は、  Therefore, the above equation (1) becomes
X t =k x%mx = kx ;  X t = k x% mx = kx;
y t = k y %my = k y ;  y t = ky% my = ky;
となる。 つまり、 この領域では、 画像データの図 1における左上の画素と、 マ トリックスの左上の成分を一致させた状態での対応となる。  Becomes In other words, in this area, the upper left pixel of the image data in FIG. 1 and the upper left component of the matrix are matched.
次に、 m 1≤k Xく 2mxかつ k yく myなる領域を考える。 図 1における 領域 A 2である。 かかる領域では、  Next, consider an area where m 1 ≤ k X × 2mx and ky × my. This is area A2 in FIG. In such areas,
r = k X d i v mx = 1 ;  r = kXdivmx = 1;
r y = k y d i v my = 0 ;  r y = ky d i v my = 0;
であるから、 上式 (1) は、 Therefore, the above equation (1) becomes
x t = (d x l +k x) %mx ;  x t = (d x l + k x)% mx;
y t = (d y l + ky) %my ;  y t = (d y l + ky)% my;
となる。 d x 1 =d y 1 = 0であれば、 x t =k x%mx、 y t =k y %my となり、 k x =mx、 mx+ l , mx + 2 - - -に対し、 k x%mx = 0, 1, 2 · · · となるから、 領域 A 1にマトリックスを対応させたのと同じ対応関係 が領域 A 2の画像データとマトリックスとの間に与えられることになる。 Becomes If dx 1 = dy 1 = 0, then xt = kx% mx, yt = ky% my, and for kx = mx, mx + l, mx + 2---, kx% mx = 0, 1, 2, Therefore, the same correspondence as the correspondence of the matrix to the area A1 is given between the image data of the area A2 and the matrix.
これに対し、 d y 1 = 1であれば、 k y = 0, 1, 2 · · · に対し、 y t = ( 1 + k y ) %my = 1, 2, 3 · · · となるから、 領域 A2では画像デ一夕 に対してマトリックスを y方向の負の方向に値 1だけずらして対応させた状態 となる。 図 1では、 かかる状態におけるマトリックスと画像デ一夕との関係を 示した。 図 1中に太線および破線で示された部分でマトリックスが対応付けら れている。 On the other hand, if dy 1 = 1, then ky = 0, 1, 2, (1 + ky)% my = 1, 2, 3 . FIG. 1 shows the relationship between the matrix and the image data in such a state. The matrices are associated with the portions indicated by the thick lines and broken lines in FIG.
他の画像領域でも同様にして、 画像データにマトリックスを対応付けること ができる。 d y 1 = 1とした場合には、 図 1に太線で示すようにマトリックス が対応付けられる。 つまり、 X方向の画素番号が大きくなるにつれて対応する マトリックスが徐々に y方向の負の方向にずれるように対応付けられる。 d y 1が 1よりも大きな値であれば、 マトリックスがずれる量はさらに大きなもの となる。  Similarly, the matrix can be associated with the image data in other image areas. When d y 1 = 1, the matrices are associated as shown by the thick lines in FIG. In other words, as the pixel numbers in the X direction increase, the corresponding matrices are gradually shifted in the negative direction in the y direction. If d y 1 is greater than 1, the amount of matrix shift will be even greater.
図 1では、 d x l = d x 2 = dy 2 = 0かつ d y 1 = 1の場合を示している。 d X 1≠ 0であれば、 X方向の画素番号が大きくなるにつれて対応するマトリ ックスは X方向にずれる。 d x 2≠0であれば、 y方向の画素番号が大きくな るにつれて対応するマトリックスが X方向にずれる。 d y 2≠ 0であれば、 y 方向の画素番号が大きくなるにつれて対応するマトリックスが y方向にずれる。 本発明では、 d x l, d X 2, d y l , d y 2の少なくとも一つは 0以外の値 に設定される。 従って、 本発明では、 画素番号が大きくなるにつれて対応する マトリックスが X方向および y方向の少なくとも一方にずれることになる。  FIG. 1 shows a case where dxl = dx2 = dy2 = 0 and dy1 = 1. If d X 1 ≠ 0, the corresponding matrix shifts in the X direction as the pixel number in the X direction increases. If d x 2 ≠ 0, the corresponding matrix shifts in the X direction as the pixel number in the y direction increases. If d y 2 ≠ 0, the corresponding matrix shifts in the y direction as the pixel number in the y direction increases. In the present invention, at least one of dxl, dX2, dyl, and dy2 is set to a value other than 0. Therefore, in the present invention, as the pixel number increases, the corresponding matrix shifts in at least one of the X direction and the y direction.
また、 図 1では d y 1を一定値とした場合について示しているが、 例えば、 r Xまたは r yの値が変化する度に d y 1を変化させるものとしても構わない。 このように d y 1を設定すれば、 マトリックスの y方向のずれ方が種々変化す ることになる。 その他の値 d X 1, d X 2, d y 2についても同様に r Xまた は r yの値が変化するごとに異なる値を採るものとしても構わない。  Although FIG. 1 shows a case where d y 1 is a constant value, for example, d y 1 may be changed every time the value of r X or r y changes. By setting d y 1 in this way, the way the matrix shifts in the y direction changes in various ways. Similarly, the other values d X 1, d X 2, and dy 2 may take different values each time the value of r X or ry changes.
例えば、 図 1に示したようにマトリックスを対応させ、 一定の階調値を有す る画像データについて、 k x = 0〜n x— 1、 k y = 0の画素のハーフトーン 処理を行う場合を考える。 k x = 0〜m x— 1 (図 1中の領域 A 1に対応) の ハーフトーン処理結果と、 k x = m x〜2 m x— 1 (領域 A 2に対応) のハ一 フトーン処理結果とは対応するマトリックスの値が異なるため、 当然、 ハーフ トーン処理結果も異なるものとなる。 この結果、 k x == 0〜n X— 1の画素に おけるハーフトーン処理結果、 即ちドッ卜の形成パターンが X方向に繰り返し 現れことを回避できる。 本発明の画像処理装置では、 ドットの形成パターンの 繰り返しを抑制することにより、 画質に優れたハーフトーン処理を行うことが できる。 当然、 かかる効果は一定の階調値からなる画像デ一夕に限定されるも のではない。 For example, as shown in Fig. 1, a matrix is associated and has a certain gradation value. Consider the case where halftone processing is performed on pixels with kx = 0 to nx-1 and ky = 0 for image data that is multiplexed. The halftone processing result of kx = 0 to mx—1 (corresponding to region A1 in Fig. 1) corresponds to the halftone processing result of kx = mx to 2mx—1 (corresponding to region A2) Due to the different matrix values, the halftoning results will naturally be different. As a result, it is possible to avoid the halftone processing result in the pixels of kx == 0 to nx−1, that is, the repeated appearance of the dot formation pattern in the X direction. The image processing apparatus of the present invention can perform halftone processing with excellent image quality by suppressing the repetition of the dot formation pattern. Naturally, such an effect is not limited to an image having a constant gradation value.
以上の説明では、 ハーフトーン処理に用いられるマトリックスが 1種類の場 合を前提として説明しているが、 本発明はかかるマトリックスが複数種類備え られている場合にも適用可能である。 例えば、 図 1における領域 A 2を含むそ の他の領域と、 領域 A 1とで異なるマトリックスを用いるものとしても構わな い。  Although the above description has been made on the assumption that only one type of matrix is used for the halftone processing, the present invention is also applicable to a case where a plurality of types of such matrices are provided. For example, a different matrix may be used for the other area including the area A2 in FIG. 1 and the area A1.
上記画像処理装置におけるハーフトーン手段としては、 種々の手段が考えら れる。  Various means can be considered as the halftone means in the image processing apparatus.
例えば、 前記ハーフトーン手段は、 前記マトリックスの成分をノイズデータ として前記画像デ一夕に反映させた上でハーフトーン処理を行う手段であるも のとすることができる。  For example, the halftone means may be a means for performing halftone processing after reflecting the components of the matrix as noise data in the image data.
具体的には、 例えば誤差拡散法によりハーフトーン処理を行う場合等が挙げ られる。  Specifically, for example, there is a case where halftone processing is performed by an error diffusion method.
一方、 ハーフトーン処理に用いられる閾値にマトリックスの成分を反映させ る場合として、  On the other hand, when the matrix components are reflected in the threshold value used for halftone processing,
前記ハーフトーン手段は、 前記閾値として前記マトリックスのいずれかの成 分を用いるディザ法によりハーフトーン処理を行う手段であるものとすること ができる。 The halftone means may include any one of the matrices as the threshold. It can be a means for performing a halftone process by a dither method using a minute.
ディザ法では、 画像データの階調値とマトリックスの閾値との大小関係に応 じてハーフトーン処理が行われるため、 画像データとマトリックスの対応関係 に応じて一定のドットの形成パターンが繰り返し生じやすい。 上記画像処理装 置によれば、 マトリックスをずらして対応させることによって、 かかる繰り返 しを回避し、 画質を向上することができる。 しかも、 ハーフトーン処理に要す る処理時間が短いというディザ法の長所は損なうことなく画質を向上すること ができる。  In the dither method, since halftone processing is performed according to the magnitude relationship between the tone value of image data and the threshold value of the matrix, a fixed dot formation pattern is likely to occur repeatedly according to the correspondence relationship between image data and matrix . According to the above-described image processing apparatus, such repetition can be avoided and the image quality can be improved by shifting the matrix to correspond. Moreover, the image quality can be improved without impairing the advantage of the dither method that the processing time required for the halftone processing is short.
本発明におけるドット分散型のディザマトリックスとは、 階調値に応じて形 成されるドッ卜の位置がマトリックス内で、 できるだけ分散するように閾値が 設定されたマトリックスをいう。 かかるドット分散型のディザマトリックスと しては、 種々のマトリックスが知られている。 例えば、  The dot dispersion type dither matrix in the present invention is a matrix in which threshold values are set so that the positions of dots formed according to gradation values are dispersed as much as possible in the matrix. Various matrices are known as such a dot dispersion type dither matrix. For example,
前記マトリックスは、 べィャ型のディザマトリックスとすることができる。 べィャ型のディザマトリックスとして 4 X 4のマトリックスの例を図 2に示 す。 閾値 0〜 1 5までの 1 6種類の閾値を有するマトリックスである。 図 2の 領域 P 1に示す 3 X 3の部分を見ると、 その四隅の成分は値 0〜 3までが順番 に割り当てられている。 同様に、 領域 P 4に示す 3 X 3の部分の四隅には値 4 〜 7が割り当てられ、 領域 P 2の四隅には値 8〜 1 1が割り当てられ、 領域 P 3の四隅には値 1 2〜 1 5が割り当てられている。 このようにディザマトリツ クスのサイズよりも小さい所定サイズの四隅に対し、 所定のパターンで 4つの 閾値を割り当てた小マトリックスを複数用意し、 これらを組み合わせてディザ マトリックスを生成したのがべィャ型と呼ばれるディザマトリックスである。 図 2では 4 X 4の場合を例にとって説明したが、 その他のサイズのマトリック スも同様にして定義される。 べィャ型のマトリックスは上述した方法で生成されるため、 閾値のマトリッ クス内の各成分への割り当てが規則的であるという特徴がある。 従って、 階調 値に応じて形成されるドットが画像領域全体で規則的なパターンとなり、 バン デイングを生じやすい。 本発明の画像処理装置によれば、 かかる規則的なパ夕 ーンの発生を低減することができるため、画質を大きく向上することができる。 また、 前記マトリックスは、 ブルーノイズマスク型のマトリックスであるも のとしてもよい。 The matrix can be a Bayer-type dither matrix. Figure 2 shows an example of a 4x4 matrix as a bayer-type dither matrix. This is a matrix having 16 types of thresholds from thresholds 0 to 15. Looking at the 3X3 portion shown in the area P1 in FIG. 2, the components at the four corners are assigned values from 0 to 3 in order. Similarly, the four corners of the 3 × 3 portion shown in area P 4 are assigned values 4-7, the four corners of area P 2 are assigned values 8-11, and the four corners of area P 3 are assigned the value 1 2 to 15 are assigned. In this manner, a plurality of small matrices, each of which has four thresholds assigned in a predetermined pattern to four corners having a predetermined size smaller than the dither matrix size, are prepared, and a dither matrix is generated by combining these with a Bayer type. This is the dither matrix called. Although FIG. 2 illustrates the case of 4 × 4 as an example, matrices of other sizes are similarly defined. Since the Bayer type matrix is generated by the above-described method, it is characterized in that the assignment of the threshold to each component in the matrix is regular. Therefore, the dots formed according to the gradation values have a regular pattern over the entire image area, and banding is likely to occur. According to the image processing apparatus of the present invention, since the occurrence of such regular patterns can be reduced, the image quality can be greatly improved. Further, the matrix may be a blue noise mask type matrix.
ブルーノイズマスク型のマトリックスとして 6 4 X 6 4のマトリックスの例 を図 3に示す。 図示の都合上、 一部についてのみ示す。 このディザマトリック スでは、 6 4 X 6 4の大きさのマトリックスの内部のいずれの 1 6 X 1 6の領 域をとつても閾値 (0〜2 5 5 ) の出現に偏りがないように閾値が割り当てら , れている。 かかる性質を有するマトリックスをブル一ノイズマスク型のマトリ ックスと呼ぶ。 ブルーノイズマスク型のマトリックスは種々のサイズぉよび閾 ' 値の範囲に対して設定可能である。  Fig. 3 shows an example of a 64 x 64 matrix as a blue noise mask type matrix. Only a part is shown for convenience of illustration. In this dither matrix, a threshold is set so that the appearance of the threshold (0 to 255) is not biased in any 16 x 16 area inside a matrix of size 64 x 64. Has been assigned. A matrix having such properties is called a bull noise mask type matrix. Blue noise mask type matrices are configurable for various sizes and threshold ranges.
さらに、 前記マトリックスは、 前記マトリックスの大きさに対応する領域よ りも広い画像領域で、 ドットの分散性が高いハーフトーン処理を行うことが可 能なマトリックスであるものとしてもよい。  Further, the matrix may be a matrix capable of performing halftone processing with high dot dispersibility in an image area wider than an area corresponding to the size of the matrix.
上記発明の画像処理装置を用いることにより、 次に示す印刷装置の発明を実 現することもできる。  By using the image processing apparatus of the invention described above, the invention of the following printing apparatus can be realized.
本発明の印刷装置は、  The printing apparatus of the present invention
X方向に n x個、 y方向に n y個 (n x, n yは 2以上の整数) からなる合 計 n X X n y個の画素で構成され、 各画素ごとに予め定めた範囲の階調値を有 する画像データに対し、 前記各画素ごとに前記階調値と所定の閾値との大小関 係に応じて特定されたドッ卜のオン ·オフに応じて、 へッドを駆動してドット を形成することにより印刷媒体上に画像を印刷する印刷装置であって、 予め設定された値を成分とする mx xmy ( 1≤mx<n x, 1≤my <n yなる整数) のドット分散型のマトリックスを記憶する記憶手段と、 It is composed of a total of n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values For the image data, a dot is formed by driving a head according to the on / off of a dot specified according to the magnitude relationship between the gradation value and a predetermined threshold value for each pixel. A printing device for printing an image on a printing medium by Storage means for storing a dot-dispersion type matrix of mx xmy (1≤mx <nx, 1≤my <ny) having components set in advance,
前記各画素ごとに前記階調値と前記閾値のいずれか一方に前記マトリックス のいずれかの成分を反映させて、 ドットのオン ·オフを判定するハーフトーン 手段とを備え、  Halftone means for judging on / off of dots by reflecting any component of the matrix in one of the gradation value and the threshold value for each of the pixels,
前記 X方向に k x番目 (k Xは 0≤ k x≤n Xなる整数)、 y方向に k y番目 の画素(k yは 0≤ k y≤n yなる整数)に反映させるマトリックスの成分は、 上式 (1) で与えられる (X t , y t ) (0≤ x t≤mx、 0≤ y t ^myの整 数) であることを要旨とする。  The components of the matrix to be reflected on the kx-th pixel in the X direction (kX is an integer equal to 0≤ kx≤nX) and the ky-th pixel in the y direction (ky is an integer equal to 0≤ky≤ny) are given by )) (Xt, yt) (0≤xt≤mx, 0≤yt ^ my integer).
かかる印刷装置によれば、 先に説明した画像処理装置と同じく、 マトリック スをずらして対応させた上でハーフトーン処理を行い、 該ハーフ卜一ン処理の 結果に応じてドットを形成するため、 高画質な印刷が可能となる。 かかる印刷 装置においても先に説明した画像処理装置と同様、 マトリックスと画像データ とは種々の対応が可能である。  According to such a printing apparatus, as in the image processing apparatus described above, the halftone processing is performed after the matrices are shifted to correspond to each other, and dots are formed in accordance with the results of the half-toning processing. High quality printing becomes possible. In such a printing apparatus, similarly to the image processing apparatus described above, various correspondences can be made between the matrix and the image data.
さらに、 上記印刷装置において、  Further, in the printing device,
前記へッドは、 前記 y方向に並ぶ複数のノズルを備えるへッドであり、 前記へッドを前記 X方向に前記印刷媒体に対して相対的に往復動する主走査 手段と、  Main scanning means for reciprocating the head relative to the print medium in the X direction, wherein the head comprises a plurality of nozzles arranged in the y direction;
前記へッドと前記印刷媒体を前記 y方向に相対的に移動する副走査手段と、 前記主走査手段、 副走査手段およびヘッドの駆動を制御して、 前記 X方向に 並ぶ各ドット列を 2以上のノズルを用いて形成する駆動制御手段とを備え、 少なくとも前記 d y 1≠ 0であるものとすることが望ましい。  A sub-scanning unit that relatively moves the head and the print medium in the y-direction; and a main scanning unit, a sub-scanning unit, and a drive of the head are controlled to form each dot row aligned in the X-direction by 2 It is preferable that a drive control unit formed by using the above nozzles is provided, and at least the dy 1 ≠ 0.
かかる印刷装置では、 前記 X方向に並ぶ各ドット列を 2以上のノズルを用い て形成する。 異なるノズルを用いてドット列を形成することにより、 ノズルの 特性に起因するドッ卜の形成位置のずれを分散させ画質を向上させることがで きる。 上記印刷装置では、 d y 1≠ 0に設定することで、 画像デ一夕に対して マトリックスを順次 y方向にずらしながら対応させてハーフトーン処理を行つ た上でドットを形成する。 従って、 上記印刷装置では、 異なるノズルを用いて 各ドット列を形成する効果を十分に発揮することができ高画質な印刷が可能と なる。 かかる効果について具体例を挙げて説明する。 In such a printing apparatus, each dot row arranged in the X direction is formed using two or more nozzles. By forming dot rows using different nozzles, it is possible to improve the image quality by dispersing the shift of the dot formation position due to the characteristics of the nozzles. Wear. In the above printing apparatus, by setting dy1 ≠ 0, dots are formed after halftone processing is performed while the matrix is sequentially shifted in the y-direction with respect to the image data. Therefore, in the above-described printing apparatus, the effect of forming each dot row using different nozzles can be sufficiently exhibited, and high-quality printing can be performed. The effect will be described with a specific example.
例えば、 2つのノズル A , Bを用いてドット列を記録する場合を考える。 こ の場合のドッ卜列の記録方法としては、 ノズル Aで X方向の奇数番目のドット を記録し、 ノズル Bで偶数番目のドットを記録する方法が考えられる。 マトリ ックスを画像データに対し方眼状に対応させた場合、 画像データの階調値およ びマトリックスの閾値との関係によっては、 ドットが形成される画素が前記 X 方向の奇数番目の画素に偏る場合がある。 かかる偏りが生じると、 該ドット列 は大部分がノズル Aで形成されることになり、 異なるノズルを用いてドット列 を形成する効果が十分に得られない。 マトリックスを y方向にずらしつつ対応 させてハーフトーン処理を行えば、 画像データとマトリックスの閾値とが種々 変化して対応付けられるため、 ドットが形成される画素が前記奇数番目の画素 に偏ることを抑制できる。 この結果、 各ドット列を異なるノズルで形成する効 果を十分に得ることができるようになる。 ここでは、 2つのノズルでドット列 を形成する場合を例にとって説明したが、 各ドット列を形成するために用いる ノズル数が異なつた場合でも同様の効果を得ることができる。  For example, consider a case where a dot row is printed using two nozzles A and B. In this case, as a dot row recording method, a method of recording odd-numbered dots in the X direction with nozzle A and recording an even-numbered dot with nozzle B can be considered. When the matrix is made to correspond to the image data in a grid pattern, the pixels in which dots are formed are biased toward the odd-numbered pixels in the X direction depending on the relationship between the gradation value of the image data and the threshold value of the matrix. There are cases. When such a deviation occurs, most of the dot rows are formed by the nozzles A, and the effect of forming the dot rows using different nozzles cannot be sufficiently obtained. If halftone processing is performed while the matrices are shifted while being shifted in the y direction, the image data and the threshold values of the matrices are changed and associated with each other, so that pixels in which dots are formed are biased toward the odd-numbered pixels. Can be suppressed. As a result, the effect of forming each dot row with a different nozzle can be sufficiently obtained. Here, the case where a dot row is formed by two nozzles has been described as an example, but the same effect can be obtained even when the number of nozzles used to form each dot row is different.
なお、 上記印刷装置においては、 「少なくとも前記 d y 1≠ 0」 としている。 これは、 マトリックスを y方向にずらしつつ対応させる場合に画質を向上する 効果が大きいためである。 もとより、 マトリックスを X方向にのみずらして対 応させるものとしても構わないし、 X方向および y方向の双方にずらして対応 させるものとしても構わない。  In the printing apparatus, “at least d y 1 前 記 0” is set. This is because the effect of improving the image quality is large when the matrices are correspondingly shifted in the y direction. Needless to say, the matrix may be shifted only in the X direction to correspond, or may be shifted in both the X direction and the y direction.
また、 本発明は、 画像処理方法として構成することもできる。 即ち、 2次元的な画素の配列により構成され、 各画素ごとに予め定めた範囲 の階調値を有する画像デ一夕に対し、 前記各画素ごとに前記階調値と所定の閾 値との大小関係に応じてドッ卜のオン ·オフを判定し、 所定の画像出力装置に 対応した出力データを生成する画像処理方法であって、 Further, the present invention can be configured as an image processing method. In other words, for an image composed of a two-dimensional array of pixels and having a gradation value in a predetermined range for each pixel, the difference between the gradation value and a predetermined threshold value for each pixel is determined. An image processing method for determining whether a dot is on or off according to a magnitude relationship and generating output data corresponding to a predetermined image output device, comprising:
予め設定された値を成分とするドット分散型の 2次元マトリックスを前記画 像データに対し、 ドットのオン 'オフと前記画像出力装置のドット形成特性の 変動周期との干渉によって生じる画質の劣化を回避可能な範囲で方眼状からず らして配置し、 該マトリックスの成分を前記画像データの前記階調値または前 記閾値に反映させて、 ドットのオン 'オフを判定する画像処理方法である。 本発明の画像処理装置に用いるマトリックスとしては、 先に説明したべィャ 型のマトリックスやブル一ノイズマスク型のマトリックス等の既存のマトリッ クスを用いるものとしてもよいが、 以下に示す設計方法により設計されたマト リックスを用いるものとすることもできる。  A dot dispersion type two-dimensional matrix having a predetermined value as a component is applied to the image data to reduce image quality degradation caused by interference between dot on / off and a fluctuation cycle of dot forming characteristics of the image output device. This is an image processing method in which dots are arranged so as to be deviated from a grid in an avoidable range, and the on / off state of dots is determined by reflecting the components of the matrix in the gradation values or the threshold value of the image data. As the matrix used in the image processing apparatus of the present invention, an existing matrix such as the above-described bayer type matrix or bull noise mask type matrix may be used. It is also possible to use a designed matrix.
本発明のマトリックスの設計方法は、  The matrix design method of the present invention is:
X方向に n x個、 y方向に ny個 (nx, nyは 2以上の整数) からなる合 計 n X X n y個の画素で構成され、 各画素ごとに予め定めた範囲の階調値を有 する画像データについて、 ドッ卜のオン ·オフを判定する際に前記階調値また は所定の閾値に反映させる値を予め記憶した mx Xmy ( 1≤mx<n , 1 ≤my<nyなる整数) のマトリックスの設計方法であって、  It is composed of a total of n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values For image data, mx Xmy (an integer of 1≤mx <n, 1 ≤my <ny) in which a value to be reflected in the gradation value or a predetermined threshold value when the dot on / off is determined is stored in advance. A matrix design method,
(a) 前記ハーフトーン処理における各画素と該マトリックスの成分との対 応を設定する工程と、  (a) setting a correspondence between each pixel and the matrix component in the halftone processing;
(b) 該マトリックスに割り当てられる値を大小関係に応じて並べた場合の 先頭から n個 (nは 1以上の整数) の値を、 閾値の分散性を考慮して前記マト リックスの任意の成分として設定する工程と、  (b) When the values assigned to the matrix are arranged according to the magnitude relation, the first n (n is an integer of 1 or more) values are determined by taking into account the dispersibility of the threshold value and the arbitrary components of the matrix. A step of setting as
(c) 該マトリックスに割り当てられるべき値として残っている値を、 所定 の演算により求められた成分に順次設定する工程とを備え、 (c) the remaining values to be assigned to the matrix are Sequentially setting the components obtained by the calculation of
前記工程 (c ) は、 The step (c) comprises:
( c— 1 ) 該マトリックスのうち値が割り当てられていない各成分と既に値 が設定された前記マトリックスの成分との距離を、 前記画像データを構成する 各画素に対応付けられた前記マトリックスの各成分との関係を複数のマトリッ クスに亘つて考慮して評価する工程と、  (c-1) The distance between each component of the matrix to which no value is assigned and the component of the matrix for which a value has already been set is determined by each of the matrices associated with each pixel constituting the image data. Evaluating the relationship with the component in consideration of a plurality of matrices;
( c一 2 ) 既に値が設定された成分からの距離が最も遠いと評価される成分 に、 前記残っている値を前記大小関係に応じて並べた場合の先頭の値を設定す る工程とからなることを要旨とする。  (c-12) a step of setting a leading value in a case where the remaining values are arranged in accordance with the magnitude relation to a component evaluated to be the longest from a component for which a value has already been set; and The gist consists of
上記設計方法により設計されたマトリックスは、 設計者の意思によって閾値 が設定される成分と、 演算により閾値が設定される成分とから成る。 上記設計 方法における工程 (a ) は、 換言すれば画像データへのマトリックスの配置を 設定する工程である。 配置としては、 図 2 6に示したような方眼状の配置を始 めとし、 図 1に示したようにマトリックスを y方向に順次ずらした配置など 種々の配置が考えられる。  The matrix designed by the above design method is composed of a component whose threshold is set by the designer's intention and a component whose threshold is set by calculation. Step (a) in the above-described design method is a step of setting the arrangement of the matrix in the image data. Various arrangements are conceivable, such as a square arrangement as shown in FIG. 26 and an arrangement in which the matrix is sequentially shifted in the y direction as shown in FIG.
工程 (b ) では n個の閾値をマトリックスの成分に割り当てる。 閾値を小さ い順に並べた場合、 小さい方から n個の閾値を割り当てた例を図 4に示す。 図 4では閾値 0 , 1, 2 · · · n— 1の n個の閾値をそれぞれ (0, 0 )、 (2, 0 ) 等の成分に割り当てている。 この割り当ては、 ドットの分散性を考慮して なされるが基本的には任意の成分に割り当て可能である。 また、 n個の閾値は 1個であっても構わない。 n = lの場合には、 図 4の値 0のみを割り当てるこ とになる。  In step (b), n thresholds are assigned to the components of the matrix. Fig. 4 shows an example in which the thresholds are arranged in ascending order and n thresholds are assigned in ascending order. In Fig. 4, n thresholds of thresholds 0, 1, 2,..., N-1 are assigned to components (0, 0), (2, 0), respectively. This assignment is made in consideration of the dispersibility of the dots, but can basically be assigned to any component. Further, the n thresholds may be one. If n = 1, only the value 0 in Figure 4 will be assigned.
工程 (c— 1 ) では、 複数のマトリックスに亘つて前記距離の評価を行う。 「複数のマトリックスに亘つて」 の意味について説明する。 図 5にかかる評価 の例を示した。 図 5は工程 (a ) で設定した対応関係で画像データにマトリツ クスを対応させた状態を示している。 図 5中の太線で示した部分がマトリック スに対応している。 図 4で示した成分に値 0〜n— 1までの閾値が設定されて いるものとすれば、 それぞれ図 5に示した場所に値 0〜n— 1の閾値が設定さ れていることになる。 ここで、 値が未定義の成分として例えば(2, m y - 1 ) なる成分について距離の評価を行う場合を考える。 この成分が対応する画素の 一つである m pを図 5ではハッチングを付して示した。 このとき、 既に閾値 0 が設定された成分が対応する画素は上記画素 m pの周囲にいくつか存在する。 これらの画素との距離は、 例えば図 5中に d l〜d 4で示すように種々の値が 算出される。 この中で d 2〜d 4は画素 m pとは異なるマトリックスに対応し た画素との距離である。 「複数のマトリックスに亘つて」 とは、 このように異な るマトリックス上の画素との距離も評価の対象とすることを意味する。 こうし て算出された距離 d 1〜d 4等から一つを閾値 0に対する評価値として選択す る。 図 5では、 閾値 0が割り当てられている画素の一部を対象として距離を算 出しているが、 当然、 全ての画素を対象としても構わない。 同様にして、 既に 設定された値 0〜n— 1までの全ての閾値に対する評価値を算出する。 また、 かかる評価値を画素 m pのみならず、 閾値が未定義の全ての成分について算出 する。 In the step (c-1), the distance is evaluated over a plurality of matrices. The meaning of "over a plurality of matrices" will be described. Figure 5 shows an example of the evaluation. Fig. 5 shows the matrices in the image This shows a state in which the boxes are associated with each other. The part shown by the thick line in FIG. 5 corresponds to the matrix. Assuming that the components shown in FIG. 4 have thresholds of values 0 to n−1, the thresholds of values 0 to n−1 are set at the locations shown in FIG. 5, respectively. Become. Here, consider the case where the distance is evaluated for a component whose value is undefined, for example, (2, my-1). In FIG. 5, mp, which is one of the pixels to which this component corresponds, is hatched. At this time, there are some pixels around the pixel mp corresponding to the components for which the threshold value 0 has already been set. Various values are calculated for the distances to these pixels, for example, as indicated by dl to d4 in FIG. Among them, d2 to d4 are distances from pixels corresponding to a matrix different from pixel mp. “Across a plurality of matrices” means that the distances to the pixels on the different matrices are also evaluated. One of the distances d1 to d4 calculated in this way is selected as an evaluation value for the threshold 0. In FIG. 5, the distance is calculated for a part of the pixels to which the threshold value 0 is assigned. However, all the pixels may be calculated. In the same way, the evaluation values for all the threshold values from the already set values 0 to n-1 are calculated. Further, such an evaluation value is calculated not only for the pixel mp but also for all components whose thresholds are not defined.
工程 (c— 2 ) では、 工程 (c— 1 ) で算出された評価値に基づいて既に閾 値が設定された成分から最も遠いと評価される成分を求める。 かかる成分が最 も分散性が高くなる成分に相当する。 そして、 かかる成分に対して n番目の閾 値を設定する。 図 5の例では、 閾値を小さい順に与えているので、 設定される 閾値は n番目に小さい値となる。  In the step (c-2), a component that is evaluated as being farthest from the component for which the threshold value has already been set is obtained based on the evaluation value calculated in the step (c-1). Such a component corresponds to the component having the highest dispersibility. Then, the n-th threshold value is set for such a component. In the example of FIG. 5, since the thresholds are given in ascending order, the set threshold is the nth smallest value.
本発明のマトリックスの設計方法によれば、 上述した工程 (c一 1 ) および ( c - 2 ) を順次繰り返すことにより、 画像データへのマトリックスの配置を 考慮した上で、 ドットの分散性を重視して閾値を設定することができる。 従つ て、 本発明の設計方法により設計されたマトリックスを用いてハーフトーン処 理を行えば、 高画質なハーフトーン処理を実行することができる。 According to the matrix designing method of the present invention, by repeating the above-described steps (c-11) and (c-2) sequentially, emphasis is placed on dot dispersibility in consideration of the arrangement of the matrix in the image data. To set the threshold. Follow If halftone processing is performed using a matrix designed by the design method of the present invention, high-quality halftone processing can be performed.
なお、 図 5で示した例とは逆に大きい閾値から順に設定していくものとして もよい。 例えば、 いわゆるべ夕領域に発生する白いドットの分散性を十分に確 保したい場合などには、 大きい閾値から順に設定していくことが望ましい場合 もある。 また、 ドットの分散性以外の要素を加味した上で上記距離の評価を行 つて、 マトリックスの閾値を設定するものとすることもできる。  Note that, contrary to the example shown in FIG. 5, the threshold value may be set in order from the larger threshold value. For example, when it is desired to sufficiently ensure the dispersibility of white dots generated in a so-called sunset area, it may be desirable to set the thresholds in order from a larger threshold. In addition, the above-described distance may be evaluated in consideration of factors other than the dispersibility of the dots, and the threshold value of the matrix may be set.
上記マトリックスの設計方法において、  In the above matrix design method,
前記工程 (a) における対応は、  The correspondence in the step (a) is as follows.
前記 X方向に X 1番目 (X 1は 0≤ x 1≤ n Xなる整数)、 y方向に y 1番 目の画素 (y 1は 0≤y 1≤n yなる整数) に反映させるマトリックスの成分 が、 上式 (1) で与えられる (x t , y t ) (0≤ x t ≤mx , 0≤y t≤my の整数) 対応であるものとすることもできる。  Matrix components to be reflected on the first pixel in the X direction (X 1 is an integer of 0 ≤ x 1 ≤ n X) and on the first pixel in the y direction (y 1 is an integer of 0 ≤ y 1 ≤ ny) May correspond to (xt, yt) (0 ≤ xt ≤ mx, 0 ≤ yt ≤ my) given by the above equation (1).
かかる対応関係は、 先に画像処理装置で説明した通り、 マトリックスを画像 データに対して方眼状からずれた状態で対応させる場合に相当する。 つまり、 上記設計方法によれば、 マトリックスを方眼状からずれた状態で対応させるこ とを前提としつつ、 画像領域全体でドッ卜の分散性を十分確保したマトリック スの生成が可能となる。 従って、 上記設計方法により設計されたマトリックス を用いれば、 高画質な画像処理が可能となる。  This correspondence corresponds to the case where the matrix is made to correspond to the image data in a state shifted from the grid, as described in the image processing apparatus above. In other words, according to the above-described design method, it is possible to generate a matrix in which the dispersibility of dots is sufficiently ensured over the entire image region, while assuming that the matrix is displaced from the grid shape. Therefore, if a matrix designed by the above design method is used, high-quality image processing can be performed.
以上で説明した本発明の画像装置は、 上記ハーフトーン処理をコンピュータ により実現させることによつても構成することができるため、 本発明は、 かか るプログラムを記録した記録媒体としての態様を採ることもできる。  The above-described image device of the present invention can also be configured by realizing the above-described halftone processing by a computer. Therefore, the present invention adopts an aspect as a recording medium on which such a program is recorded. You can also.
本発明の記録媒体は、  The recording medium of the present invention
X方向に n x個、 y方向に n y個 (nx, n yは 2以上の整数) からなる合 計 nxxny個の画素で構成され、 各画素ごとに予め定めた範囲の階調値を有 する画像データについて、 前記各画素ごとに前記階調値と所定の閾値との大小 関係に応じてドットのオン ·オフを判定するためのプログラムをコンピュータ 読みとり可能に記録した記録媒体であって、 It is composed of a total of nxxny pixels consisting of nx pixels in the X direction and ny pixels in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values. A computer-readable recording medium for storing a program for determining dot on / off in accordance with a magnitude relationship between the gradation value and a predetermined threshold value for each of the pixels.
予め設定された値を成分として記憶された mx xmy ( 1≤mx<n x, 1 ≤myく nyなる整数) のドット分散型のマトリックスと、  An mx xmy (1≤mx <nx, an integer 1≤my ny) dot-dispersion type matrix stored with preset values as components,
前記 X方向に kx番目 (k Xは 0≤k x≤n Xなる整数)、 y方向に k y番目 の画素 (k yは 0≤k y≤n yなる整数) の前記階調値または前記閾値に、 前 記マトリックスのうち次式で与えられる (x t, y t ) ( 0≤x t≤mx, 0≤ y t≤myの整数) 成分を反映させてドッ卜のオン ·オフを判定する機能を実 現するためのプログラムを記録した記録媒体である。  The grayscale value or the threshold value of the kx-th pixel (kX is an integer satisfying 0≤kx≤nX) in the X direction and the ky-th pixel (ky is an integer satisfying 0≤ky≤ny) in the y direction are as described above. A program that implements the function to determine the dot on / off by reflecting the (xt, yt) (0≤xt≤mx, 0≤yt≤my) component of the matrix given by Is a recording medium on which is recorded.
上記の各記録媒体に記録されたプログラムが、 前記コンピュータに実行され ることにより、 先に説明した本発明の画像処理装置を実現することができる。 なお、 記憶媒体としては、 フレキシブルディスクや CD— R〇M、 光磁気ディ スク、 I Cカード、 ROMカートリッジ、 パンチカード、 バーコードなどの符 号が印刷された印刷物、 コンピュータの内部記憶装置 (RAMや ROMなどの メモリ) および外部記憶装置等、 コンピュータが読取り可能な種々の媒体を利 用できる。 また、 コンピュータに上記の画像処理装置のハーフトーン処理機能 を実現させるコンピュータプログラムを通信経路を介して供給するプログラム 供給装置の記憶装置も含まれる。 その他、 本発明は、 上記機能を実現するプロ グラム自体、 またはこれと同視し得る種々の信号として構成することも可能で ある。 図面の簡単な説明  The above-described image processing apparatus of the present invention can be realized by executing the program recorded on each of the recording media by the computer. Examples of the storage medium include a flexible disk, a CD-R〇M, a magneto-optical disk, an IC card, a ROM cartridge, a punched card, a printed matter on which a code such as a barcode is printed, and a computer internal storage device (RAM or RAM). Various computer-readable media such as a memory such as a ROM) and an external storage device can be used. It also includes a storage device of a program supply device that supplies a computer program for realizing the halftone processing function of the image processing device to a computer via a communication path. In addition, the present invention can be configured as a program itself for realizing the above functions or various signals that can be regarded as the same. BRIEF DESCRIPTION OF THE FIGURES
図 1は、 画像データとマトリックスとの対応関係を示す説明図である。  FIG. 1 is an explanatory diagram showing the correspondence between image data and matrices.
図 2は、 ベィャ型マトリックスの内容を示す説明図である。 図 3は、 ブルーノイズマスク型のマトリックスの例を示す説明図である。 図 4は、 マトリックスへの閾値の配置を示す説明図である。 FIG. 2 is an explanatory diagram showing the contents of the Bayer matrix. FIG. 3 is an explanatory diagram showing an example of a blue noise mask type matrix. FIG. 4 is an explanatory diagram showing the arrangement of thresholds in a matrix.
図 5は、 各成分との距離の算出について示す説明図である。  FIG. 5 is an explanatory diagram showing the calculation of the distance to each component.
図 6は、 実施例としての印刷装置の概略構成図である。  FIG. 6 is a schematic configuration diagram of a printing apparatus as an embodiment.
図 7は、 ソフトウェアの構成を示す説明図である。  FIG. 7 is an explanatory diagram showing the configuration of the software.
図 8は、 実施例におけるプリン夕の概略構成図である。  FIG. 8 is a schematic configuration diagram of the printer according to the embodiment.
図 9は、 実施例におけるプリン夕のドット記録へッドの概略構成を示す説明 図である。  FIG. 9 is an explanatory diagram showing a schematic configuration of a dot recording head for printing in the embodiment.
図 1 0は、 実施例におけるプリン夕におけるドット形成原理を示す説明図で ある。  FIG. 10 is an explanatory diagram illustrating the principle of dot formation during printing in the example.
図 1 1は、 プリン夕の制御装置の内部構成を示す説明図である。  FIG. 11 is an explanatory diagram showing the internal configuration of the controller of the printer.
図 1 2は、 実施例におけるプリン夕におけるノズルの駆動波形および該駆動 波形により形成されるドッ卜の様子を示す説明図である。  FIG. 12 is an explanatory diagram showing the driving waveforms of the nozzles during printing and the state of the dots formed by the driving waveforms in the embodiment.
図 1 3は、 ドット形成制御ルーチンの流れを示すフローチャートである。 図 1 4は、 ディザ法によるハーフトーン処理の流れを示すフローチャートで ある。  FIG. 13 is a flowchart showing the flow of the dot formation control routine. FIG. 14 is a flowchart showing a flow of the halftone process by the dither method.
図 1 5は、 実施例におけるマトリックスと画像データとの対応を示す説明図 である。  FIG. 15 is an explanatory diagram showing the correspondence between the matrix and the image data in the embodiment.
図 1 6は、 実施例によるドッ卜の形成結果を示す説明図である。  FIG. 16 is an explanatory diagram showing a result of forming a dot according to the example.
図 1 7は、オーバラップ方式によるドットの形成の様子を示す説明図である。 図 1 8は、 誤差拡散法によるハーフトーン処理の流れを示すフローチャート である。  FIG. 17 is an explanatory diagram showing how dots are formed by the overlap method. FIG. 18 is a flowchart showing the flow of the halftone process by the error diffusion method.
図 1 9は、 誤差を拡散する際の重みを示す説明図である。  FIG. 19 is an explanatory diagram showing weights when diffusing an error.
図 2 0は、 実施例の設計方法の手順を示すフローチャートである。  FIG. 20 is a flowchart illustrating the procedure of the design method according to the embodiment.
図 2 1は、実施例の設計方法における閾値の設定について示す説明図である。 図 2 2は、実施例の設計方法における距離の算出について示す説明図である。 図 2 3は、 実施例の設計方法における距離の評価値を示す説明図である。 図 2 4は、 実施例の設計方法により設計されたマトリックスを示す説明図で ある。 FIG. 21 is an explanatory diagram illustrating setting of thresholds in the design method according to the embodiment. FIG. 22 is an explanatory diagram illustrating the calculation of the distance in the design method according to the embodiment. FIG. 23 is an explanatory diagram illustrating an evaluation value of the distance in the design method of the example. FIG. 24 is an explanatory diagram showing a matrix designed by the design method of the embodiment.
図 2 5は、 べィャ型のマトリックスを示す説明図である。  FIG. 25 is an explanatory diagram showing a bayer type matrix.
図 2 6は、 従来技術におけるマトリックスと画像データとの対応を示す説明 図である。  FIG. 26 is an explanatory diagram showing the correspondence between a matrix and image data in the conventional technology.
図 2 7は、 ディザ法によるドッ卜のオン ·オフ判定の考え方を示す説明図で ある。  FIG. 27 is an explanatory diagram showing the concept of dot on / off determination by the dither method.
図 2 8は、 従来技術におけるドットの形成結果を示す説明図である。 発明を実施するための最良の形態  FIG. 28 is an explanatory diagram showing a dot formation result in the conventional technique. BEST MODE FOR CARRYING OUT THE INVENTION
以下、 本発明の実施の形態について、 実施例に基づき説明する。  Hereinafter, embodiments of the present invention will be described based on examples.
A . 装置の構成: A. Equipment configuration:
図 6は、 本発明の一実施例としての画像処理装置および印刷装置の構成を示 すブロック図である。 図示するように、 コンピュータ 9 0にスキャナ 1 2と力 ラープリンタ 2 2とが接続されている。 このコンピュータ 9 0に所定のプログ ラムがロードされ実行されることにより画像処理装置として機能する他、 プリ ンタ 2 2と併せて印刷装置として機能する。 このコンピュータ 9 0は、 プログ ラムに従って画像処理に関わる動作を制御するための各種演算処理を実行する C P U 8 1を中心に、 バス 8 0により相互に接続された次の各部を備える。 R O M 8 2は、 C P U 8 1で各種演算処理を実行するのに必要なプログラムゃデ —夕を予め格納しており、 R AM 8 3は、 同じく C P U 8 1で各種演算処理を 実行するのに必要な各種プログラムやデータが一時的に読み書きされるメモリ である。 入力インターフェイス 8 4は、 スキャナ 1 2ゃキ一ボード 1 4からの 信号の入力を司り、 出力インタフェース 85は、 プリン夕 22へのデータの出 力を司る。 CRTC 86は、 カラー表示可能な CRT 2 1への信号出力を制御 し、 ディスクコントローラ (DDC) 87は、 ハードディスク 16やフレキシ ブルドライブ 1 5あるいは図示しない CD— ROMドライブとの間のデータの 授受を制御する。 ハードディスク 1 6には、 RAM83にロードされて実行さ れる各種プログラムやデバイスドライバの形式で提供される各種プログラムな どが記憶されている。 FIG. 6 is a block diagram illustrating a configuration of an image processing apparatus and a printing apparatus as one embodiment of the present invention. As shown, the scanner 90 and the color printer 22 are connected to the computer 90. When a predetermined program is loaded and executed on the computer 90, the computer 90 functions not only as an image processing apparatus but also as a printing apparatus in combination with the printer 22. This computer 90 includes the following units interconnected by a bus 80, centering on a CPU 81 that executes various arithmetic processes for controlling operations related to image processing according to a program. The ROM 82 stores in advance the program data necessary for executing various arithmetic processing by the CPU 81, and the RAM 83 stores the program data required for executing various arithmetic processing by the CPU 81 similarly. It is a memory where necessary various programs and data are temporarily read and written. The input interface 8 4 is connected to the scanner 1 2 The output interface 85 controls the input of signals, and controls the output of data to the printer 22. The CRTC 86 controls the signal output to the CRT 21 capable of displaying color, and the disk controller (DDC) 87 exchanges data with the hard disk 16, the flexible drive 15 or a CD-ROM drive (not shown). Control. The hard disk 16 stores various programs loaded into the RAM 83 and executed, various programs provided in the form of device drivers, and the like.
このほか、 バス 80には、 シリアル入出力インタフェース (S I O) 88が 接続されている。 この S I〇88は、 モデム 1 8に接続されており、 モデム 1 8を介して、 公衆電話回線 PNTに接続されている。 コンピュータ 90は、 こ の S I O 88およびモデム 18を介して、 外部のネットワークに接続されてお り、 特定のサーバ一 SVに接続することにより、 画像処理に必要なプログラム をハードディスク 1 6にダウンロードすることも可能である。 また、 必要なプ ログラムをフレキシブルディスク FDや CD— ROMによりロードし、 コンビ ュ一夕 90に実行させることも可能である。  In addition, a serial input / output interface (SIO) 88 is connected to the bus 80. This SI〇88 is connected to a modem 18, and is connected to a public telephone line PNT via the modem 18. The computer 90 is connected to an external network via the SIO 88 and the modem 18, and by connecting to a specific server-SV, a program required for image processing can be downloaded to the hard disk 16. Is also possible. It is also possible to load the necessary programs on a floppy disk FD or CD-ROM, and have the program run on the convenience store 90.
図 7は本印刷装置のソフトウエアの構成を示すブロック図である。 コンビュ —夕 90では、 所定のオペレーティングシステムの下で、 アプリケーションプ ログラム 95が動作している。 オペレーティングシステムには、 ビデオドライ バ 9 1やプリン夕ドライバ 96が組み込まれており、 アプリケ一ションプログ ラム 95からはこれらのドライバを介して、 プリン夕 22に転送するための画 像データ F N Lが出力されることになる。 画像のレタツチなどを行うアプリケ ーシヨンプログラム 95は、 スキャナ 12から画像を読み込み、 これに対して 所定の処理を行いつつビデオドライバ 9 1を介して CRTディスプレイ 2 1に 画像を表示している。 スキャナ 1 2から供給されるデータ ORGは、 カラー原 稿から読みとられ、 レッド (R), グリーン (G), ブル一 (B) の 3色の色成 分からなる原カラー画像データ O R Gである。 FIG. 7 is a block diagram illustrating a software configuration of the printing apparatus. Comb — At evening 90, the application program 95 is running under the given operating system. The operating system incorporates a video driver 91 and a printer driver 96, and the application program 95 outputs image data FNL to be transferred to the printer 22 via these drivers. Will be done. An application program 95 for performing image retouching and the like reads an image from the scanner 12, and displays the image on the CRT display 21 via the video driver 91 while performing predetermined processing on the image. The data ORG supplied from the scanner 12 is read from the color manuscript and the three color components of red (R), green (G) and blue (B) are read. This is the original color image data ORG consisting of the components.
このアプリケーションプログラム 9 5が、 印刷命令を発すると、 コンビユー 夕 9 0のプリン夕ドライバ 9 6力 画像情報をアプリケ一ションプログラム 9 5から受け取り、 これをプリン夕 2 2が処理可能な信号 (ここではシアン、 マ ゼンダ、 イェロー、 ブラックの各色についてのハーフトーン処理された信号) に変換している。 図 7に示した例では、 プリンタドライバ 9 6の内部には、 解 像度変換モジュール 9 7と、 色補正モジュール 9 8と、 色補正テーブル L U T と、ハーフトーンモジュール 9 9と、ラス夕ライザ 1 0 0とが備えられている。 解像度変換モジュール 9 7は、 アプリケ一シヨンプログラム 9 5が极つてい るカラー画像データの解像度、 即ち単位長さ当たりの画素数をプリンタドライ バ 9 6が扱うことができる解像度に変換する役割を果たす。 こうして解像度変 換された画像データはまだ R G Bの 3色からなる画像情報であるから、 色補正 モジュール 9 8は色補正テーブル L U Tを参照しつつ、 各画素ごとにプリンタ 2 2が使用するシアン (C )、 マゼンダ (M)、 イェロー (Y)、 ブラック (Κ) の各色のデータに変換する。 こうして色補正されたデータは例えば 2 5 6階調 等の幅で階調値を有している。 ハーフトーンモジュール 9 9は、 ドットを分散 して形成することによりプリン夕 2 2でかかる階調値を表現するためのハーフ トーン処理を実行する。 本実施例におけるハーフトーンモジュール 9 9力 少 なくとも本発明における画像処理装置に含まれる。 こうして処理された画像デ 一夕は、 ラスタライザ 1 0 0によりプリン夕 2 2に転送すべきデータ順に並べ 替えられて、 最終的な画像データ F N Lとして出力される。 本実施例では、 プ リン夕 2 2は画像データ F N Lに従ってドットを形成する役割を果たすのみで あり画像処理は行っていないが、 もちろんこれらの処理をプリン夕 2 2で行う ものとしても差し支えない。  When the application program 95 issues a print command, the printer driver 96 of the combination 90 receives image information from the application program 95, and receives a signal that can be processed by the printer 22 (here, a signal that can be processed by the printer 22). Halftoned signals for cyan, magenta, yellow, and black). In the example shown in FIG. 7, inside the printer driver 96, a resolution conversion module 97, a color correction module 98, a color correction table LUT, a halftone module 99, and a rasterizer 1 0 and 0 are provided. The resolution conversion module 97 serves to convert the resolution of the color image data provided by the application program 95, that is, the number of pixels per unit length into a resolution that can be handled by the printer driver 96. . Since the image data converted in this way is still image information consisting of three colors of RGB, the color correction module 98 refers to the color correction table LUT and uses the cyan (C) used by the printer 22 for each pixel. ), Magenta (M), yellow (Y), and black (Κ). The data subjected to the color correction in this way has a gradation value with a width of, for example, 256 gradations. The halftone module 99 executes a halftone process for expressing the gradation value in the printer 22 by forming dots in a dispersed manner. The halftone module of the present embodiment is included in at least the image processing apparatus of the present invention. The image data processed in this way is rearranged by the rasterizer 100 in the order of data to be transferred to the printer 22, and output as final image data FNL. In the present embodiment, the printer 22 only plays a role of forming dots in accordance with the image data FNL, and does not perform image processing. However, it is a matter of course that these processes may be performed by the printer 22.
次に、 図 8によりプリン夕 2 2の概略構成を説明する。 図示するように、 こ のプリンタ 2 2は、 紙送りモー夕 2 3によって用紙 Pを搬送する機構と、 キヤ リッジモー夕 2 4によってキヤリッジ 3 1をプラテン 2 6の軸方向に往復動さ せる機構と、 キヤリッジ 3 1に搭載された印字へッド 2 8を駆動してィンクの 吐出およびドット形成を行う機構と、 これらの紙送りモー夕 2 3, キャリッジ モー夕 2 4, 印字ヘッド 2 8および操作パネル 3 2との信号のやり取りを司る 制御回路 4 0とから構成されている。 Next, the schematic configuration of the printer 22 will be described with reference to FIG. As shown, The printer 22 has a mechanism for transporting the paper P by the paper feed motor 23, a mechanism for reciprocating the carriage 31 in the axial direction of the platen 26 by the carriage motor 24, and a carriage 31. A mechanism that drives the printed print head 28 to discharge ink and form dots, and signals from these paper feed motors 23, carriage motors 24, print heads 28, and the operation panel 32 And a control circuit 40 that controls the exchange of data.
キヤリッジ 3 1をプラテン 2 6の軸方向に往復動させる機構は、 プラテン 2 6の軸と並行に架設されキヤリッジ 3 1を摺動可能に保持する摺動軸 3 4と、 キヤリッジモー夕 2 4との間に無端の駆動ベルト 3 6を張設するプーリ 3 8と、 キャリッジ 3 1の原点位置を検出する位置検出センサ 3 9等から構成されてい る。  The mechanism for reciprocating the carriage 31 in the axial direction of the platen 26 includes a sliding shaft 3 4, which is installed in parallel with the platen 26 axis, and holds the carriage 31 slidably, and a carriage motor 24. It comprises a pulley 38 on which an endless drive belt 36 is stretched, and a position detection sensor 39 for detecting the origin position of the carriage 31.
なお、 このキャリッジ 3 1には、 黒インク (B k ) 用のカートリッジ 7 1と シアン (C ), マゼン夕 (M) , イエロ (Y) の 3色のインクを収納したカラー ィンク用カートリッジ 7 2が搭載可能である。 キヤリッジ 3 1の下部の印字へ ッド 2 8には計 4個のィンク吐出用へッド 6 1ないし 6 4が形成されており、 キヤリッジ 3 1の底部には、 この各色用へッドにィンクタンクからのィンクを 導く導入管 6 7 (図 9参照) が立設されている。 キャリッジ 3 1に黒 (B k ) インク用のカートリッジ 7 1およびカラ一^ Γンク用カートリッジ 7 2を上方か ら装着すると、 各カートリッジに設けられた接続孔に導入管 6 7が挿入され、 各ィンクカートリッジから吐出用へッド 6 1ないし 6 4へのィンクの供給が可 能となる。  The carriage 31 has a cartridge 71 for black ink (Bk) and a cartridge 72 for color ink containing three color inks of cyan (C), magenta (M) and yellow (Y). Can be mounted. A total of four ink discharge heads 6 1 to 6 4 are formed on the print head 2 8 below the carriage 3 1, and the bottom of the carriage 3 1 has a head for each color. An inlet pipe 67 (see Fig. 9) for guiding the ink from the ink tank is provided upright. When the black (Bk) ink cartridge 71 and the color ink cartridge 72 are mounted on the carriage 31 from above, the introduction pipes 67 are inserted into the connection holes provided in each cartridge, The ink can be supplied from the ink cartridge to the discharge heads 61 to 64.
インクの吐出およびドット形成を行う機構について説明する。 図 9はインク 吐出用へッド 2 8の内部の概略構成を示す説明図である。 ィンク用力一トリッ ジ 7 1 , 7 2がキャリッジ 3 1に装着されると、 図 9に示すように毛細管現象 を利用してィンク用カートリッジ内のインクが導入管 6 7を介して吸い出され、 キヤリッジ 3 1下部に設けられた印字へッド 28の各色へッド 6 1ないし 64 に導かれる。 なお、 初めてインクカートリッジが装着されたときには、 専用の ポンプによりインクを各色のへッド 61ないし 64に吸引する動作が行われる が、 本実施例では吸引のためのポンプ、 吸引時に印字ヘッド 28を覆うキヤッ プ等の構成については図示および説明を省略する。 A mechanism for discharging ink and forming dots will be described. FIG. 9 is an explanatory diagram showing a schematic configuration inside the ink ejection head 28. As shown in FIG. When the ink cartridges 7 1 and 7 2 are mounted on the carriage 31, the ink in the ink cartridge is sucked out through the introduction pipe 67 by utilizing the capillary phenomenon as shown in FIG. The printing head 28 is provided at the lower portion of the carriage 31 and is guided to the heads 6 1 to 64 of the respective colors. When the ink cartridge is installed for the first time, the operation of sucking ink into the heads 61 to 64 of each color is performed by a dedicated pump.In this embodiment, the pump for suction and the print head 28 at the time of suction are operated. The illustration and description of the configuration of the covering cap and the like are omitted.
各色のヘッド 6 1ないし 64には、 後で説明する通り、 各色毎に 48個のノ ズル Nzが設けられており (図 12参照)、各ノズル毎に電歪素子の一つであつ て応答性に優れたピエゾ素子 PEが配置されている。 ピエゾ素子 PEとノズル Nzとの構造を詳細に示したのが図 10である。図 1 0上段に図示するように、 ピエゾ素子 PEは、 ノズル Nzまでインクを導くインク通路 68に接する位置 に設置されている。 ピエゾ素子 PEは、 周知のように、 電圧の印加により結晶 構造が歪み、 極めて高速に電気—機械工ネルギの変換を行う素子である。 本実 施例では、 ピエゾ素子 PEの両端に設けられた電極間に所定時間幅の電圧を印 加することにより、 図 1 0下段に示すように、 ピエゾ素子 PEが電圧の印加時 間だけ伸張し、 インク通路 68の一側壁を変形させる。 この結果、 インク通路 68の体積はピエゾ素子 PEの伸張に応じて収縮し、 この収縮分に相当するィ ンクが、 粒子 I pとなって、 ノズル N zの先端から高速に吐出される。 このィ ンク粒子 I pがプラテン 26に装着された用紙 Pに染み込むことにより印刷が 行われる。  As will be described later, the heads 61 to 64 of each color are provided with 48 nozzles Nz for each color (see FIG. 12), and each nozzle is one of the electrostrictive elements and responds. Piezoelectric element PE with excellent performance is arranged. FIG. 10 shows the structure of the piezo element PE and the nozzle Nz in detail. As shown in the upper part of FIG. 10, the piezo element PE is installed at a position in contact with the ink passage 68 that guides the ink to the nozzle Nz. As is well known, the piezo element PE is an element that distorts the crystal structure due to the application of a voltage, and performs electro-mechanical energy conversion at extremely high speed. In this embodiment, by applying a voltage of a predetermined time width between the electrodes provided at both ends of the piezo element PE, the piezo element PE is extended by the voltage application time as shown in the lower part of Fig. 10. Then, one side wall of the ink passage 68 is deformed. As a result, the volume of the ink passage 68 contracts in accordance with the expansion of the piezo element PE, and the ink corresponding to the contraction becomes particles Ip and is discharged at high speed from the tip of the nozzle Nz. Printing is performed by the ink particles Ip penetrating into the paper P mounted on the platen 26.
次にプリンタ 22の制御回路 40の内部構成を説明するとともに、 ヘッドに 備えられた複数のノズル N zからなるへッド 28を駆動する方法について説明 する。 図 1 1は制御回路 40の内部構成を示す説明図である。 図 1 1に示す通 り、 この制御回路 40の内部には、 CPU8 1, PROM42, RAM43の 他、コンピュータ 90とのデータのやりとりを行う P Cインタフェース 44と、 紙送りモ一夕 23、 キャリッジモータ 24および操作パネル 32などとの信号 をやりとりする周辺入出力部 (P I〇) 4 5と、 計時を行う夕イマ 4 6と、 へ ッド 6 1〜6 6にドットのオン ·オフの信号を出力する駆動用バッファ 4 7な どが設けられており、 これらの素子および回路はバス 4 8で相互に接続されて いる。 また、 制御回路 4 0には、 所定周波数でピエゾ素子を駆動するための駆 動波形を出力する発信器 5 1、 および発信器 5 1からの出力をヘッド 6 1〜6 4に所定のタイミングで分配する分配器 5 5も設けられている。 制御回路 4 0 は、 コンピュータ 9 0で処理されたドットデータを受け取り、 これを一時的に R AM 4 3に蓄え、 所定のタイミングで駆動用バッファ 4 7に出力する。 Next, an internal configuration of the control circuit 40 of the printer 22 will be described, and a method of driving the head 28 including a plurality of nozzles Nz provided in the head will be described. FIG. 11 is an explanatory diagram showing the internal configuration of the control circuit 40. As shown in FIG. 11, inside the control circuit 40, in addition to the CPU 81, PROM 42, and RAM 43, a PC interface 44 for exchanging data with the computer 90, a paper feeder 23, a carriage motor 24 And signals with operation panel 32, etc. Peripheral input / output unit (PI〇) 45 that exchanges data, timer 46 that measures time, and drive buffer 47 that outputs dot on / off signals to heads 6 1 to 66 These elements and circuits are interconnected by a bus 48. The control circuit 40 also includes a transmitter 51 for outputting a driving waveform for driving the piezo element at a predetermined frequency, and outputs from the transmitter 51 to the heads 61 to 64 at a predetermined timing. A distributor 55 for distributing is also provided. The control circuit 40 receives the dot data processed by the computer 90, temporarily stores it in the RAM 43, and outputs it to the driving buffer 47 at a predetermined timing.
制御回路 4 0がへッド 6 1〜6 4に対して信号を出力する形態について説明 する。 図 1 2は、 ヘッド 6 1〜6 4の 1つのノズル列を例にとって、 その配置 および接続について示す説明図である。 これらのノズルは、 4 8個のノズル N zが一定のノズルピッチ kで千鳥状に配列されている。 図 1 2の右側に本実施 例のノズル列により形成されるドットの様子を示した。 実線で示した円が 1回 の主走査により形成可能なドットである。 破線はドッ卜の間隔を示す目安とし て示した。 図 1 2に示す通り、 本実施例ではノズルのピッチ kは 2ドット分に 相当する。 なお、 各ノズルアレイに含まれる 4 8個のノズル N zは、 千鳥状に 配列されている必要はなく、 一直線上に配置されていてもよい。 但し、 図 1 2 に示すように千鳥状に配列すれば、 製造上、 ノズルピッチ kを小さく設定し易 いという利点がある。  A mode in which the control circuit 40 outputs signals to the heads 61 to 64 will be described. FIG. 12 is an explanatory diagram showing the arrangement and connection of one nozzle row of the heads 61 to 64 as an example. In these nozzles, 48 nozzles Nz are arranged in a staggered manner at a constant nozzle pitch k. The state of dots formed by the nozzle row of the present embodiment is shown on the right side of FIG. The circle shown by the solid line is a dot that can be formed by one main scan. The dashed line is shown as an indicator of the interval between the dots. As shown in FIG. 12, in the present embodiment, the nozzle pitch k corresponds to two dots. Note that the 48 nozzles Nz included in each nozzle array need not be arranged in a staggered manner, and may be arranged on a straight line. However, if they are arranged in a staggered pattern as shown in FIG. 12, there is an advantage that the nozzle pitch k can be easily set small in manufacturing.
ヘッド 6 1〜6 4の各ノズル列は、 駆動用バッファ 4 7をソース側とし、 分 配出力器 5 5をシンク側とする回路に介装されており、 ノズル列を構成する各 ピエゾ素子 P Eは、 その電極の一方が駆動用バッファ 4 7の各出力端子に、 他 方が一括して分配出力器 5 5の出力端子に、 それぞれ接続されている。 分配出 力器 5 5からは図 1 2に示す通り、 発信器 5 1の駆動波形が出力されている。 C P U 8 1から各ノズル毎にオン ·オフを定め、 駆動用バッファ 4 7の各端子 に信号を出力すると、 駆動波形に応じて、 駆動用バッファ 4 7側からオン信号 を受け取つていたピエゾ素子 P Eだけが駆動される。 この結果、 転送用バッフ ァ 4 7からオン信号を受け取つていたピエゾ素子 P Eのノズルから一斉にィン ク粒子 I pが吐出される。 なお、 図 1 2に示す通り、 ノズル列は千鳥状に形成 されているから、 キャリッジ 3 1を搬送しつつドットを形成する場合、 主走査 方向に 1列に並ぶドットを形成するためには、 それぞれのノズル列のインクの 吐出タイミングをずらす必要がある。 また、 各ヘッド 6 1〜6 4についても同 様にインクの吐出タイミングをずらす必要がある。 C P U 8 1は、 かかるタイ ミングのずれを勘案した上で、 各ドッ卜のオン ·オフの信号を駆動用バッファ 4 7を介して出力し、 各色のドットを形成している。 Each of the nozzle arrays of the heads 6 1 to 6 4 is interposed in a circuit in which the driving buffer 47 is used as a source and the distribution output unit 55 is used as a sink. One of the electrodes is connected to each output terminal of the driving buffer 47, and the other electrode is connected to the output terminal of the distribution output device 55 collectively. As shown in FIG. 12, the drive waveform of the oscillator 51 is output from the distribution output device 55. On / off for each nozzle is determined from CPU 81 and each terminal of drive buffer 47 When the signal is output to the, only the piezo element PE that has received the ON signal from the driving buffer 47 is driven according to the driving waveform. As a result, the ink particles Ip are simultaneously discharged from the nozzles of the piezo element PE that have received the ON signal from the transfer buffer 47. As shown in FIG. 12, the nozzle rows are formed in a staggered manner, so when forming dots while transporting the carriage 31, in order to form dots arranged in one row in the main scanning direction, It is necessary to shift the ink ejection timing of each nozzle row. In addition, it is necessary to similarly shift the ink ejection timing for each of the heads 61 to 64. The CPU 81 outputs on / off signals of the respective dots via the driving buffer 47 in consideration of such a timing shift to form dots of each color.
以上で説明したハードウェア構成により、 本実施例のプリンタ 2 2は、 紙送 りモー夕 2 3により用紙 Pを搬送しつつ (以下、 副走査という)、 キャリッジ 3 1をキヤリッジモータ 2 4により往復動させ(以下、 主走査という)、 同時に印 字へッド 2 8の各色へッド 6 1〜6 4のピエゾ素子 P Eを駆動して、 各色イン クの吐出を行い、 ドットを形成して用紙 P上に多色の画像を形成する。  With the hardware configuration described above, the printer 22 of this embodiment transports the paper P by the paper feed mode 23 (hereinafter referred to as “sub-scan”), and controls the carriage 31 by the carriage motor 24. It is reciprocated (hereinafter referred to as main scanning), and at the same time, the piezo elements PE of the heads 6 1 to 6 4 of the print head 28 are driven to eject ink of each color to form dots. To form a multi-color image on paper P.
なお、 本実施例では、 上述の通りピエゾ素子 P Eを用いてインクを吐出する へッドを備えたプリンタ 2 2を用いているが、 他の方法によりインクを吐出す るプリンタを用いるものとしてもよい。 例えば、 インク通路に配置したヒータ に通電し、 インク通路内に発生する泡 (バブル) によりインクを吐出するタイ プのプリン夕に適用するものとしてもよい。  In the present embodiment, as described above, the printer 22 having the head that discharges ink using the piezo element PE is used, but a printer that discharges ink by another method may be used. Good. For example, the present invention may be applied to a pudding type in which ink is discharged by bubbles generated in the ink passage by energizing a heater disposed in the ink passage.
B . ドット形成制御: B. Dot formation control:
次に本実施例におけるドット形成の制御処理について説明する。 ドット形成 制御処理ルーチンの流れを図 1 3に示す。 これは、 コンピュータ 9 0の C P U 8 1が実行する処理である。 この処理が開始されると、 CPU8 1は、 画像データを入力する (ステップ S 1 00)。 この画像データは、図 2に示したアプリケションプログラム 95か ら受け渡されるデ一夕であり、 画像を構成する各画素ごとに R, G, Bそれぞ れの色について、 値 0〜 1 5の 1 6段階の階調値を有するデータである。 この 画像データの解像度は、 原画像のデータ ORGの解像度等に応じて変化する。 Next, a control process of dot formation in this embodiment will be described. Figure 13 shows the flow of the dot formation control processing routine. This is a process executed by the CPU 81 of the computer 90. When this process is started, the CPU 81 inputs image data (step S100). This image data is the data passed from the application program 95 shown in FIG. 2 and has a value of 0 to 15 for each of the R, G, and B colors for each pixel constituting the image. This is data having 16 gradation values. The resolution of this image data changes according to the resolution of the original image data ORG.
CPU8 1は、 入力された画像データの解像度をプリン夕 22が印刷するた めの解像度に変換する(ステップ S 105)。画像データが印刷解像度よりも低 い場合には、 線形補間により隣接する原画像データの間に新たなデータを生成 することで解像度変換を行う。 逆に画像データが印刷解像度よりも高い場合に は、 一定の割合でデータを間引くことにより解像度変換を行う。 なお、 解像度 変換処理は本実施例において本質的なものではなく、 かかる処理を行わずに印 刷を実行するものとしても構わない。  The CPU 81 converts the resolution of the input image data into a resolution for printing by the printer 22 (step S105). If the image data is lower than the printing resolution, resolution conversion is performed by generating new data between adjacent original image data by linear interpolation. Conversely, if the image data is higher than the print resolution, resolution conversion is performed by thinning out the data at a fixed rate. The resolution conversion processing is not essential in the present embodiment, and printing may be executed without performing such processing.
次に、 C PU8 1は、 色補正処理を行う (ステップ S 1 10)。 色補正処理と は R, G, Bの階調値からなる画像データをプリン夕 22で使用する C, M, Y, Κの各色の階調値のデ一夕に変換する処理である。 この処理は、 R, G, Bのそれぞれの組み合わせからなる色をプリン夕 22で表現するための(:, M, Y, Κの組み合わせを記憶した色補正テーブル LUT (図 7参照) を用いて行 われる。 色補正テーブル LUTを用いて色補正する処理自体については、 公知 の種々の技術が適用可能であり、 例えば補間演算による処理 (特開平 4一 14 4481記載の技術等) が適用できる。  Next, the CPU 81 performs a color correction process (step S110). The color correction process is a process of converting image data consisting of R, G, and B gradation values into a decimation of gradation values of C, M, Y, and 色 colors used in the printer 22. This processing is performed by using a color correction table LUT (see Fig. 7) that stores the combination of:, M, Y, and 色 to represent the color composed of each combination of R, G, and B in the print area 22. Various known techniques can be applied to the processing itself for performing color correction using the color correction table LUT, and for example, processing by interpolation (such as the technique described in Japanese Patent Application Laid-Open No. 4-144481) can be applied.
こうして色補正された画像データに対して、 CPU 8 1はハーフトーン処理 を行う(ステップ S 200)。ハーフトーン処理とは、原画像デ一夕の階調値(本 実施例では 1 6階調) をプリンタ 22が各画素ごとに表現可能な階調値に変換 することをいう。 後述する通り、 本実施例ではドットのオン ·オフの 2階調へ のハーフトーン処理を行っているが、 更に多くの階調へのハーフトーン処理を 行うものとしてもよい。 本実施例の印刷装置では、 ディザ法によるハーフトー ン処理を行っている。 The CPU 81 performs halftone processing on the color-corrected image data (step S200). The halftone process means that the printer 22 converts the tone value of the original image (16 tones in the present embodiment) into a tone value that can be expressed by the printer 22 for each pixel. As will be described later, in this embodiment, halftone processing is performed for two gradations of dot on / off, but halftone processing for more gradations is performed. It may be performed. In the printing apparatus of the present embodiment, halftone processing is performed by the dither method.
ディザ法によるハーフトーン処理の流れを図 14に示す。 この処理が開始さ れると、 CPU8 1は画像デ一夕 CDを入力する (ステップ S 202)。 ここで 入力される画像データ CDとは、 色補正処理 (図 1 3のステップ S 1 10) を 施され、 C, Μ, Υ, Kの各色につき 16階調を有するデ一夕である。 また、 画像デ一夕を構成する画素番号 (kx, ky) にそれぞれ値 0を代入して初期 化を行う (ステップ S 204)。 画像データは主走査方向に n X個、 副走査方向 に n y個の 2次元的に配列された画素から構成されている。 画像データと画素 の関係を図 1に示す。 各画素は、 それぞれ図 1の左側から主走査方向 (図 1の X方向) に付された画素番号 k x、 および図 1の上側から副走査方向 (図 1の y方向) に付された画素番号 k yを用いて表される。 上記初期化によって、 図 1に示した左上の画素が処理を開始する画素として設定されたことになる。 次に、 C PU 8 1はハーフトーン処理に用いるディザマトリックスの成分番 号 (X t, y t) を算出する (ステップ S 206)。 ディザマトリックスは主走 査方向に mx個、 副走査方向に my個の 2次元的に配列された成分から構成さ れている。 各成分は、 0≤x t <mxおよび 0≤y tく myなる整数の成分番 号 (X t, y t ) を用いて表される。 ディザマトリックスとしては、 種々のマ トリックスを適用可能であるが、 本実施例では 4 X 4のべィャ型のディザマト リックス (図 2参照) を用いた。 従って、 mx=my = 4である。 その他、 例 えばブル一ノイズマスク型 (図 3参照) のマトリックスを用いるものとしても よい。 また、 マトリックスのサイズも種々のサイズのものが適用可能である。 ステップ S 206では、 次式 (2) によりそれぞれの成分番号を算出する。  Fig. 14 shows the flow of halftone processing by the dither method. When this process is started, the CPU 81 inputs an image data CD (step S202). The input image data CD is a color image that has been subjected to color correction processing (step S110 in FIG. 13) and has 16 gradations for each color of C, Μ, Υ, and K. In addition, initialization is performed by assigning a value of 0 to each pixel number (kx, ky) constituting the image data (step S204). The image data is composed of nx two-dimensionally arranged pixels in the main scanning direction and ny in the sub-scanning direction. Figure 1 shows the relationship between image data and pixels. Each pixel has a pixel number kx assigned in the main scanning direction (X direction in FIG. 1) from the left side in FIG. 1 and a pixel number assigned in the sub scanning direction (y direction in FIG. 1) from the upper side in FIG. Expressed using ky. By the above initialization, the upper left pixel shown in FIG. 1 is set as the pixel to start processing. Next, the CPU 81 calculates the component number (Xt, yt) of the dither matrix used for the halftone processing (step S206). The dither matrix is composed of mx two-dimensionally arranged components in the main scanning direction and my in the sub-scanning direction. Each component is represented by an integer component number (Xt, yt) such that 0≤xt <mx and 0≤ytmy. Various matrices can be used as the dither matrix. In this embodiment, a 4 × 4 Bayer type dither matrix (see FIG. 2) is used. Therefore, mx = my = 4. Alternatively, for example, a matrix of a bull noise mask type (see FIG. 3) may be used. Also, various sizes of the matrix can be applied. In step S206, each component number is calculated by the following equation (2).
t = k X %mx ;  t = k X% mx;
y t = ((k x d i v mx) xdy + ky) %my ; … (2) ここで、 %は剰余演算子であり、 例えば k X %mxは k xZmxの余りを意 味する。 yt = ((kxdiv mx) xdy + ky)% my;… (2) Here,% is the remainder operator, for example, kX% mx means the remainder of kxZmx.
また、 (k x d i v mx) は k xZmxの商を意味する。  (Kxdivmx) means the quotient of kxZmx.
d yは 1以上の整数で任意の値に設定可能である。 本実施例では d y= 1に 設定した。  d y is an integer greater than or equal to 1 and can be set to any value. In this embodiment, d y = 1 was set.
後述する通り、 上式 (2) の計算により求められる成分番号に対応する閾値 が画素 (k x, k y) のハーフトーン処理に用いられる。 図 1 5にディザマト リックスの成分と各画素との対応関係を示した。 図示の都合上、 画像デ一夕の —部についてのみ示す。 図 1 5中に各画素に対応するディザマトリックスの成 分を、 それぞれ (x t, y t ) の形で表した。 図 1 5の上方に付した 0〜9ま での値は、 主走査方向の画素番号を意味しており、 左側に付した 0〜 5までの 値は、 副走査方向の画素番号を意味している。  As described later, the threshold corresponding to the component number obtained by the calculation of the above equation (2) is used for the halftone processing of the pixel (kx, ky). Figure 15 shows the correspondence between dither matrix components and each pixel. For convenience of illustration, only the-part of the image data is shown. The components of the dither matrix corresponding to each pixel are shown in Fig. 15 in the form of (xt, yt). The values from 0 to 9 at the top of Fig. 15 indicate the pixel numbers in the main scanning direction, and the values from 0 to 5 on the left indicate the pixel numbers in the sub-scanning direction. ing.
例えば、 画素 (0, 0) については、 上式 (2) の計算結果は、  For example, for pixel (0,0), the result of the above equation (2) is
X t = 0 % 4= 0 ;  X t = 0% 4 = 0;
y t = ((0 d i v 4) X l + 0) 4 = 0 ;  y t = ((0 d i v 4) X l + 0) 4 = 0;
となる。 従って、 画素 (0, 0) については、 ディザマトリックスの成分 (0,Becomes Therefore, for pixel (0, 0), the components (0, 0) of the dither matrix
0) が対応する。 k x≤ 3かつ k y≤ 3の各画素については、 同様の演算によ り、 それぞれ x t =kx、 y t = k yで特定される成分が対応する。 0) corresponds. For each pixel of k x ≤ 3 and ky ≤ 3, the components specified by x t = kx and y t = ky respectively correspond by the same operation.
次に、 画素 (4, 0) について、 上式 (2) の計算結果は、  Next, for pixel (4, 0), the calculation result of above equation (2) is
X t = 4 % 4 = 0 ;  X t = 4% 4 = 0;
y t = ((4 d i v 4) X l + 0) %4= 1 ;  y t = ((4 d i v 4) X l + 0)% 4 = 1;
となる。 従って、 画素(4, 0) については、 ディザマトリックスの成分(0,Becomes Therefore, for pixel (4, 0), the components (0,
1) が対応する。 同様にして画素とディザマトリックスの成分について以下の 対応関係が得られる。 「→」 の左側の画素に対し、 右側の成分が対応する。 1) corresponds. Similarly, the following correspondence is obtained for the pixels and the components of the dither matrix. The component on the right side corresponds to the pixel on the left side of “→”.
画素 ( 5, 0 ) 〜 ( 7, 0 ) —成分 ( 1, 1 ) 〜 ( 3, 1 ) ; 画素 ( 4 , 1 ) 〜 ( 7, 1 ) —成分 (0, 2) 〜 (3, 2) ; 画素 (4, 2) 〜 (7, 2) —成分 (0, 3) 〜 (3, 3) ; Pixels (5, 0) to (7, 0) —components (1, 1) to (3, 1); Pixels (4, 1) to (7, 1) —Components (0, 2) to (3, 2); Pixels (4, 2) to (7, 2) —Components (0, 3) to (3, 3) );
その他の画素についても同様にして画像データとディザマトリックスとの対 応関係が得られる。 これらの対応関係は、 図 1 5に示す通り、 画像データに対 してディザマトリックスを階段状に上方に一画素分ずらして対応させた状態に 相当する。 図 1 5中の太線は、 ディザマトリックスを一つのまとまりとして捕 らえた場合の配置を示している。 本実施例では、 上式 (2) における d yを値 1に設定しているため、それぞれ 1画素分上方にずれた対応関係となっている。 つまり、 d yはマトリックスのずれ量を意味しているのである。 また、 本実施 例では副走査方向にのみマトリックスをずらすものとしているが、 主走査方向 にずらして対応するものとしても構わないし、 双方にずらして対応させるもの としても構わない。 本実施例では、 副走査方向へのずれ量 d yも画像領域全体 で一定の値としているが、 主走査方向または副走査方向にマトリックスが繰り 返し使われる度にずれ量を変化させるものとすることもできる。  Correspondence between the image data and the dither matrix is similarly obtained for the other pixels. As shown in FIG. 15, these correspondences correspond to a state where the dither matrix is stepwise shifted upward by one pixel with respect to the image data. The bold line in FIG. 15 shows the arrangement when the dither matrix is captured as one unit. In the present embodiment, since d y in the above equation (2) is set to a value of 1, the correspondence is shifted upward by one pixel. In other words, d y means the amount of matrix displacement. Further, in this embodiment, the matrix is shifted only in the sub-scanning direction. However, the matrix may be shifted in the main scanning direction or may be shifted in both directions. In the present embodiment, the shift amount dy in the sub-scanning direction is also a constant value in the entire image area, but the shift amount dy is changed each time the matrix is used repeatedly in the main scanning direction or the sub-scanning direction. Can also.
こうして、 ディザマトリックスの成分番号が設定されると、 CPU8 1は画 像データの階調値 CD (k x、 k y) とディザマトリックスの閾値 DM (x t、 y t ) との比較を行う (ステップ S 208)。 この結果、 階調値が閾値よりも大 きい場合、 即ち CD (k X, k y) >DM (x t , y t ) である場合には、 そ の画素についてドットをオンにすべきと判断し、 結果値 CDR (kx, ky) にドッ卜の ONを意味する値を代入する(ステップ S 2 12)。逆の場合にはド ットをオフにすべきと判断し、 結果値 CDR (kx, ky) にドットの OFF を意味する値を代入する(ステップ S 2 10)。 この結果値 CDRは後に示すラ ス夕ライズ等の処理を経て、 駆動用バッファ 47 (図 12参照) に転送され、 各ノズルのオン ·オフを決定する。  When the dither matrix component numbers are set in this way, the CPU 81 compares the gradation value CD (kx, ky) of the image data with the threshold value DM (xt, yt) of the dither matrix (step S208). . As a result, when the gradation value is larger than the threshold value, that is, when CD (kX, ky)> DM (xt, yt), it is determined that the dot should be turned on for the pixel, and the result is determined. Substitute the value that indicates the ON of the dot into the value CDR (kx, ky) (step S212). In the opposite case, it is determined that the dot should be turned off, and a value indicating that the dot is turned off is substituted into the result value CDR (kx, ky) (step S210). The result value CDR is transferred to the driving buffer 47 (see FIG. 12) through processing such as rasterizing, which will be described later, and determines ON / OFF of each nozzle.
以上の処理により、 一つの画素についてドットのオン ·オフ判定がされたこ とになる。 次に、 CPU 8 1は画素番号 k xを値 1だけ増加する (ステップ S 2 14)。 つまり、 処理対象となる画素を主走査方向に 1つだけずらす。 また、 こうして設定された画素番号 k Xが値 n X以上であるか否かを判定する (ステ ップ S 2 1 6)。先に説明した通り、画像データは主走査方向に nx個の画素を 有しており、 画素番号 k Xは値 0〜n X— 1までを採ることができる。 画素番 号 k Xが値 n X以上になった場合には、主走査方向に並ぶ一列分の画素(以下、 ラスタと呼ぶ) についての処理が終了したことを意味する。 従って、 CPU 8 1は主走査方向の画素番号 k Xに値 0を代入して初期化し、 副走査方向の画素 番号 k yを値 1だけ増加する (ステップ S 2 1 8)。 これは、 次のラスタの処理 を開始することを意味する。 By the above processing, the dot on / off judgment was made for one pixel. And Next, the CPU 81 increases the pixel number kx by the value 1 (step S214). That is, the pixel to be processed is shifted by one in the main scanning direction. Further, it is determined whether or not the pixel number kX set in this way is equal to or more than the value nX (step S216). As described above, the image data has nx pixels in the main scanning direction, and the pixel number kX can take a value from 0 to nX-1. When the pixel number kX becomes equal to or larger than the value nX, it means that the processing for one row of pixels (hereinafter, referred to as a raster) arranged in the main scanning direction has been completed. Accordingly, the CPU 81 initializes the pixel number kX in the main scanning direction by substituting the value 0, and increases the pixel number ky in the sub-scanning direction by the value 1 (step S218). This means that processing of the next raster will begin.
先に説明した通り、画像データは副走査方向には n y個の画素を有しており、 画素番号 k yは値 0〜n y— 1までを採ることができる。 画素番号 k yが値 n y以上になった場合には、 画像デ一夕の全ての画素について処理が終了したこ とを意味する。 従って、 CPU 8 1は、 上記ステップ S 2 1 8において画素番 号 kyを増加した後、 その画素番号 kyと値 nyとを比較し (ステップ S 22 0)、 kyが値 ny以上である場合には、 ハーフトーン処理を終了する。  As described above, the image data has ny pixels in the sub-scanning direction, and the pixel number ky can take a value from 0 to ny-1. When the pixel number ky becomes equal to or larger than the value ny, it means that the processing has been completed for all the pixels in the image data. Therefore, the CPU 81 increases the pixel number ky in the above step S218, compares the pixel number ky with the value ny (step S220), and when ky is greater than or equal to the value ny. Ends the halftone process.
一方、 ステップ S 2 1 6において画素番号 k Xが値 n Xよりも小さいと判定 された場合、 およびステップ S 220において画素番号 k yが値 n yよりも小 さいと判定された場合は、 それぞれ未処理の画像デ一夕が残っていることを意 味するため、 ステップ S 206に戻りドットのオン ·オフ判定を実行する。 以上の処理を行った結果の一例を図 1 6に示す。 図 16は一定の階調値 8を 有する画像データに対し、 図 2に示したべィャ型のマトリックスを用いてハー フトーン処理を行った結果を示している。 マトリックスと画像データとの対応 関係は図 1 5に示した通りである。 図 2に示すべィャ型のマトリックスと前記 階調値 8を比較すると、 (0, 0)、 (2, 0)、 (1, 1)、 (3, 1)、 (0, 2)、 ( 2 , 2 )、 ( 1 , 3 )、 (3 , 3 ) の成分として設定されている閾値に比べて階 調値の方が大きい。従って、かかる成分に対応する画素でドットがオンとなる。 図 1 6においてハッチングを付した画素はドッ卜がオンとなる画素を意味して いる。 マトリックスごとのまとまりで見れば、 ドットが市松状に形成されるも のの、 画像データに対してマトリックスが副走査方向にずれて対応づけられて いるため、 画像データ全体ではドットは市松状にはならない。 On the other hand, if the pixel number kX is determined to be smaller than the value nX in step S216, and if the pixel number ky is determined to be smaller than the value ny in step S220, each is not processed. In order to mean that the image data remains, the process returns to step S206 to execute dot on / off determination. Fig. 16 shows an example of the result of performing the above processing. FIG. 16 shows the result of performing halftone processing on image data having a constant gradation value 8 using the Bayer matrix shown in FIG. The correspondence between the matrix and the image data is as shown in Fig.15. Comparing the Bayer type matrix shown in Fig. 2 with the gradation value 8, it is found that (0, 0), (2, 0), (1, 1), (3, 1), (0, 2), The gradation value is larger than the threshold values set as the components (2, 2), (1, 3), and (3, 3). Therefore, a dot is turned on at a pixel corresponding to such a component. In FIG. 16, the hatched pixels indicate pixels whose dots are turned on. Looking at the unit of each matrix, the dots are formed in a checkered pattern, but since the matrix is shifted from the image data in the sub-scanning direction, the dots in the entire image data are in a checkered pattern. No.
以上の処理によりハーフトーン処理された結果値 C D Rに対し、 C P U 8 1 はラス夕ライズを行う (図 1 3のステップ S 3 0 0 )。 これは、 1ラスタ分のデ —夕をプリン夕 2 2のへッドに転送する順序に並べ替えることをいう。 プリン タ 2 2がラスタを形成する記録方法には種々のモードがある。最も単純なのは、 へッドの 1回の往運動で各ラス夕のドットを全て形成するモ一ドである。 この 場合には 1ラスタ分のデータを処理された順序でへッドに出力すればよい。 他 のモードとしては、 いわゆるオーバラップがある。 例えば、 1回目の主走査で は各ラス夕のドットを例えば 1つおきに形成し、 2回目の主走査で残りのドッ トを形成する記録方法である。 この場合は各ラスタを 2回の主走査で形成する ことになる。 かかる記録方法を採用する場合には、 各ラスタのドットを 1つお きにピックアップしたデータをへッドに転送する必要がある。 さらに別の記録 モードとしていわゆる双方向記録がある。 これはへッドの往運動のみならず復 運動時にもドットを形成するものである。 かかる記録モードを採用する場合に は、 往運動時用のデータと復運動時用のデ一夕とは転送順序を逆転する必要が 生じる。 いずれのモードで記録を行うかは、 使用者が指定することができる。 このようにプリン夕 2 2が行う記録方法に応じてヘッドに転送すべきデ一夕を 作成するのが上記ステップ S 2 4 0での処理である。 こうしてプリン夕 2 2が 印刷可能なデータが生成されると、 C P U 8 1は該デ一夕を出力し、 プリンタ 2 2に転送する (ステップ S 3 1 0 )。 一例として、 オーバラップ方式によるドットの記録の例を図 1 7に示す。 図 示の都合上、 ノズル数を 6つに減らして示した。 副走査方向のノズルピッチは 2 ドッ卜分である。 図 1 7の左側にはへッドの副走査方向の位置を、 1回目〜 5回目までの主走査に対応させて示した。 それぞれノズルの位置を 「〇」 で示 している。 また、 丸で囲まれた数字はノズル番号を示している。 図 1 7の右側 には各主走査において形成されるドットの様子を示した。 The CPU 81 performs a rasterization on the result value CDR subjected to the halftone processing by the above processing (step S300 in FIG. 13). This means that one raster's worth of data is sorted in the order that the evening is transferred to the head of the pudding. There are various modes in a recording method in which the printer 22 forms a raster. The simplest is a mode that forms all the dots of each lath and evening in one outbound movement of the head. In this case, the data for one raster may be output to the head in the order in which it was processed. Another mode is the so-called overlap. For example, in the first main scan, a recording method is used in which every other dot is formed, for example, every other dot, and the second main scan forms the remaining dots. In this case, each raster is formed by two main scans. When such a recording method is adopted, it is necessary to transfer data picked up every other dot of each raster to the head. There is a so-called bidirectional recording as another recording mode. This is to form dots not only during the head's forward movement but also during the backward movement. When such a recording mode is adopted, it is necessary to reverse the transfer order between the data for the forward movement and the data for the backward movement. The user can specify which mode to record. The processing in step S240 described above creates the data to be transferred to the head according to the recording method performed by the printer 22. When data that can be printed by the printer 22 is thus generated, the CPU 81 outputs the data and transfers it to the printer 22 (step S310). As an example, Fig. 17 shows an example of dot recording by the overlap method. For convenience of illustration, the number of nozzles is reduced to six. The nozzle pitch in the sub-scanning direction is 2 dots. On the left side of FIG. 17, the position of the head in the sub-scanning direction is shown corresponding to the first to fifth main scanning. The position of each nozzle is indicated by “〇”. The number enclosed by a circle indicates the nozzle number. The right side of FIG. 17 shows the state of the dots formed in each main scan.
図 1 7に示す通り、 1回目の主走査では、 主走査方向の奇数番目の画素を間 欠的に形成する。 この際、 ドットを形成するのは 5番ノズルおよび 6番ノズル のみであり、 1番〜 4番のノズルはドットを形成しない。 図 1 7では、 実際に 形成されるドットを実線で示し、 1番〜 4番のノズルに対応するドットを破線 で示した。 これらのドットを形成しないのは、 副走査の送り量との関係で、 そ れぞれのラスタを完全に形成することができないからである。  As shown in FIG. 17, in the first main scan, odd-numbered pixels in the main scan direction are formed intermittently. At this time, dots are formed only by nozzles No. 5 and No. 6, and nozzles Nos. 1 to 4 do not form dots. In FIG. 17, dots that are actually formed are indicated by solid lines, and dots corresponding to nozzles 1 to 4 are indicated by broken lines. The reason why these dots are not formed is that each raster cannot be completely formed due to the relationship with the sub-scan feed amount.
1回目の主走査を終えると、 3 ドッ卜に相当する送り量で副走査を行った後、 2回目の主走査を行いつつドットを形成する。 この場合も上述の理由により、 4番〜 6番のノズルのみを用いてドットを形成する。 さらに、 3 ドットに相当 する副走査を行った後、 3回目の主走査を行いつつドットを形成する。 3回目 の主走査における 2番ノズルの位置は、 1回目の主走査における 5番ノズルの 位置と一致する。 従って、 2番ノズルは 1回目の主走査でドットが形成されて いない画素、 即ち偶数番目の画素を記録する。 以下、 同様に 3 ドット分の副走 査を行いつつ主走査を行えば、 図 1 7中の P Aで示す領域にドットを隙間なく 形成することができる。 このとき、 各ラス夕は奇数番目の画素と偶数番目の画 素とが、 それぞれ異なるノズルで形成される。 かかる記録を行うことにより各 ノズルの特性に起因して生じるドッ卜の形成位置のずれを各ラスタ上で分散さ せることができ、 画質を向上することができる効果を有する。  When the first main scan is completed, the sub-scan is performed with a feed amount equivalent to three dots, and then the dots are formed while the second main scan is performed. Also in this case, for the above-mentioned reason, dots are formed using only the nozzles No. 4 to No. 6. Further, after performing sub-scanning corresponding to three dots, dots are formed while performing third main scanning. The position of No. 2 nozzle in the third main scan coincides with the position of No. 5 nozzle in the first main scan. Therefore, the second nozzle records a pixel in which no dot is formed in the first main scan, that is, an even-numbered pixel. Hereinafter, if the main scanning is performed while performing the sub-scanning for three dots in the same manner, dots can be formed in the area indicated by PA in FIG. 17 without gaps. At this time, in each raster, odd-numbered pixels and even-numbered pixels are formed by different nozzles. By performing such recording, the displacement of the dot formation position caused by the characteristics of each nozzle can be dispersed on each raster, and the image quality can be improved.
以上で説明した印刷装置によれば、 ディザマトリックスを画像デ一夕に対し て方眼状から階段状にずらして対応させることにより、 ドットがマトリックス 単位の規則的なパターンで形成されることを抑制することができる。 本実施例 と同じディザマトリックスを方眼状に対応させた場合、 一定の階調値 8を有す る画像データに対しては、 図 2 8に示す通り完全に市松状にドッ卜が形成され ることになる。 これに対し、 本実施例の印刷装置によれば、 図 1 6に示す通り ドットの規則性が崩れていることが分かる。 According to the printing apparatus described above, the dither matrix is By shifting the pattern in a stepwise manner from the grid, the dots can be suppressed from being formed in a regular pattern in units of a matrix. When the same dither matrix as in the present embodiment is made to correspond to a grid pattern, dots are completely formed in a checkered pattern as shown in FIG. 28 for image data having a constant gradation value of 8. Will be. On the other hand, according to the printing apparatus of the present embodiment, it can be seen that the regularity of dots is broken as shown in FIG.
本実施例の印刷装置によれば、 ドットの規則性が崩れることにより、 各ラス 夕ごとにドットの数の偏りが生じることを抑制できる。 従って、 機械的な製造 誤差に基づきドッ卜の形成位置にずれが生じるノズルが含まれる場合に、 その ようなノズルによって形成されるドット数が増えることを回避できる。 この結 果、 該ノズルによって形成されるラス夕部分で顕著なバンディングが生じるこ とを回避でき、 画質を向上することができる。 この効果は、 オーバラップ方式 による記録を行う場合、 1回の主走査でそれぞれのラス夕を完成する場合の双 方で同様に得られる。  According to the printing apparatus of the present embodiment, it is possible to suppress the occurrence of unevenness in the number of dots for each raster due to the loss of dot regularity. Therefore, when there is a nozzle in which the dot formation position is shifted based on a mechanical manufacturing error, it is possible to avoid an increase in the number of dots formed by such a nozzle. As a result, it is possible to avoid occurrence of remarkable banding in a lasing portion formed by the nozzle, and to improve image quality. This effect can be obtained both in the case of performing the overlap recording and in the case of completing each raster in one main scan.
また、 本実施例の印刷装置によれば、 以下に示す理由により、 オーバラップ 方式による記録を行う場合にも画質を向上することができる。 図 2 8に示すよ うな規則的なパターンでドットを形成する場合、 各ラスタごとに見れば、 ドッ 卜が形成される画素が奇数番目の画素または偶数番目の画素に偏ることが多い。 かかる偏りが生じている場合には、 オーバラップ方式による記録を採用しても 実質的には各ラス夕の大部分を単一のノズルで形成することになるため、 ォ一 バラップ方式による効果を十分に得ることができない。 これに対し、 本実施例 の印刷装置では、 上記規則的なパターンを抑制する結果、 ドットが形成される 画素が奇数番目または偶数番目に偏ることを抑制できる。 従って、 オーバラッ プ方式による画質向上の効果を十分に得ることができるのである。  Further, according to the printing apparatus of the present embodiment, the image quality can be improved even when performing recording by the overlap method for the following reason. When dots are formed in a regular pattern as shown in FIG. 28, the pixels on which dots are formed are often biased to odd-numbered pixels or even-numbered pixels when viewed from each raster. In the case where such deviation occurs, even if the recording by the overlap method is adopted, most of each lath is substantially formed by a single nozzle. I can't get enough. On the other hand, in the printing apparatus of the present embodiment, as a result of suppressing the above-mentioned regular pattern, it is possible to suppress the pixels in which dots are formed from being biased to odd-numbered or even-numbered. Therefore, the effect of improving the image quality by the overlap method can be sufficiently obtained.
上述の効果は、 端的な例として一定の階調値を有する画像データを例にとつ て説明した。 本実施例の印刷装置による上記効果は、 一定の階調値を有する画 像データに限定して得られるものではなく、 種々の階調値からなる画像データ に対して同様に得られるものである。 C. 第 2実施例: The above effect is obtained by taking, as a simple example, image data having a constant gradation value. Explained. The above-described effect of the printing apparatus of the present embodiment is not limited to image data having a fixed gradation value, but is similarly obtained for image data having various gradation values. . C. Second embodiment:
次に本発明の第 2実施例としての印刷装置について説明する。 第 2実施例の 印刷装置のハードウェア構成は第 1実施例の印刷装置 (図 6〜図 12参照) と 同じである。 また、 ドット形成制御処理も第 1実施例と同じである (図 13参 照)。 第 2実施例では、 ハーフトーン処理 (図 1 3のステップ S 200) の内容 が第 1実施例と相違する。 第 2実施例では、 誤差拡散法を用いてハーフトーン 処理を行う。  Next, a printing apparatus according to a second embodiment of the present invention will be described. The hardware configuration of the printing apparatus according to the second embodiment is the same as that of the printing apparatus according to the first embodiment (see FIGS. 6 to 12). The dot formation control process is the same as in the first embodiment (see FIG. 13). In the second embodiment, the content of the halftone process (step S200 in FIG. 13) is different from that of the first embodiment. In the second embodiment, a halftone process is performed using an error diffusion method.
第 2実施例におけるハーフトーン処理、 即ち誤差拡散法によるハーフトーン 処理の内容を図 18に示す。 この処理が開始されると CPU 8 1は、 画像デー 夕 CDを読み込み (ステップ S 250)、 画素番号 (k x, k y) の双方に値 0 を代入して初期化を行う (ステップ S 252)。 これらの処理内容は第 1実施例 におけるハーフトーン処理 (図 14のステップ S 202, S 204) と同じで ある。  FIG. 18 shows the contents of the halftone process in the second embodiment, that is, the halftone process by the error diffusion method. When this process is started, the CPU 81 reads the image data CD (step S250), and performs initialization by substituting the value 0 into both the pixel numbers (kx, ky) (step S252). These processing contents are the same as the halftone processing (steps S202 and S204 in FIG. 14) in the first embodiment.
CPU 8 1は初期化された画素番号 (0, 0) の画像データに基づき、 拡散 誤差補正データ CDXの生成を行う (ステップ S 254)。誤差拡散処理は処理 済みの画素について生じた階調表現の誤差をその画素の周りの画素に所定の重 みを付けて予め配分しておくので、 ステップ S 254では該当する誤差分を読 み出し、 これを今から処理しようと着目している画素に反映させるのである。 着目している画素 PPに対して、 周辺のどの画素にどの程度の重み付けで、 こ の誤差を配分するかを、 図 1 9に例示した。 着目している画素 PPに対して、 キャリッジ 3 1の走査方向で数画素、 および用紙 Pの搬送方向後ろ側の隣接す る数画素に対して、 濃度誤差が所定の重み (1Z4, 1Z8、 1/16) を付 けて配分される。 誤差拡散処理については後で詳述する。 The CPU 81 generates the diffusion error correction data CDX based on the initialized image data of the pixel number (0, 0) (step S254). In the error diffusion process, an error in the gradation expression generated for the processed pixel is assigned in advance to pixels surrounding the pixel with a predetermined weight, so that in step S254, the corresponding error is read out. This is reflected in the pixel of interest to be processed now. Fig. 19 shows an example of how to assign this error to which pixel in the surrounding area and to what degree of weighting the pixel PP of interest. With respect to the pixel PP of interest, several pixels in the scanning direction of the carriage 31 and an adjacent pixel Density errors are distributed to several pixels with a predetermined weight (1Z4, 1Z8, 1/16). The error diffusion processing will be described later in detail.
次に、 CPU 8 1はマトリックスの成分番号 (X t , y t ) を算出する (ス テツプ S 256)。成分番号(X t , y t)の算出は第 1実施例で説明した式(2) を用いて行う。 本実施例において使用するマトリックスのサイズおよびずらし 量 d yも第 1実施例と同じである。 従って、 マトリックスと画像デ一夕との対 応関係も第 1実施例と同じとなる。 つまり、 マトリックスを方眼状から副走査 方向に 1画素分だけ階段状にずらした対応関係となる。  Next, the CPU 81 calculates a component number (Xt, yt) of the matrix (step S256). The calculation of the component number (X t, y t) is performed using the equation (2) described in the first embodiment. The size and displacement d y of the matrix used in this embodiment are the same as those in the first embodiment. Therefore, the correspondence between the matrix and the image data is the same as in the first embodiment. In other words, the correspondence is such that the matrix is displaced stepwise from the grid by one pixel in the sub-scanning direction.
こうして設定されたマトリックスの成分 DM (x t, y t ) をステップ S 2 54で求められた拡散誤差補正デ一夕 CDX (kx, ky) に対しノイズとし て付加する。ノィズが付加された後の画像デー夕をノィズ付加データ C D N ( k X, k y) とすると、 次式 (3) を演算するのである。 このようにノイズを付 加する理由は後述する。  The matrix component DM (xt, yt) thus set is added as noise to the diffusion error correction data CDX (kx, ky) obtained in step S254. Assuming that the image data after the noise is added is the noise added data C DN (kX, ky), the following equation (3) is calculated. The reason for adding noise in this way will be described later.
CDN (k X, ky) =CDX (k x, ky) +DM (x t , y t) … (3) こうして生成されたノイズ付加デ一夕 CDNと予め定められた閾値 THとの 大小を比較し(ステップ S 260)、データ CDNが閾値 THよりも大きい場合 には、 結果値 CDR (kx, ky) にドットのオンを意味する値を代入し、 閾 値 TH以下の場合には結果値 CDR (kx, ky) にドットのオフを意味する 値を代入する (ステップ S 240)。 閾値 THはこのようにドットのオン ·オフ を判定する基準となる値である。 この閾値 THはいずれの値に設定することも できるが、 本実施例では画像データ CDが採りうる 0〜 1 5の 1 6段階の階調 値の中間の値である値 7に設定した。  CDN (k X, ky) = CDX (kx, ky) + DM (xt, yt)… (3) Compare the magnitude of the noise-added CDN generated in this way with a predetermined threshold TH (step S 260), if the data CDN is greater than the threshold value TH, substitute a value indicating that the dot is on into the result value CDR (kx, ky) .If the data CDN is less than the threshold value TH, the result value CDR (kx, ky) Substitute a value indicating that the dot is off into ky) (step S240). The threshold value TH is a value that serves as a reference for judging on / off of a dot as described above. This threshold value TH can be set to any value. In this embodiment, the threshold value TH is set to a value 7 which is an intermediate value between 16 gradation values of 0 to 15 which can be taken by the image data CD.
以上の処理により一つの画素についてドッ卜のオン ·オフが判定されたこと になる。 次に、 CPU8 1は、 ハーフトーン処理により生じた誤差を計算し、 その誤差を周辺の画素に拡散する処理を実行する (ステップ S 266)。誤差と はハーフトーン処理後の各ドットにより表現される濃度の評価値から原画像デWith the above processing, ON / OFF of the dot is determined for one pixel. Next, the CPU 81 calculates an error generated by the halftone process, and executes a process of diffusing the error to peripheral pixels (step S266). Error and Is the original image data from the evaluation value of the density represented by each dot after halftone processing.
—夕の階調値を引いた値をいう。 例えば、 原画像データにおける階調値 1 5の 画素を考え、 ドットの形成による濃度の評価値を階調値 1 5相当とする。 ドッ トを形成しない場合の濃度評価値は階調値 0相当である。 この画素について、 大ドットを形成するものと判定された場合は、 原画像データの階調値と表現さ れる濃度評価値は共に値 1 5で一致しているため誤差は生じない。 一方、 ドッ トを形成しないものと判定された場合は E r r = 0 - 1 5 = - 1 5の誤差を生 じることになる。 —The value obtained by subtracting the evening tone value. For example, consider a pixel having a gradation value of 15 in the original image data, and assume that the evaluation value of the density by forming dots is equivalent to a gradation value of 15. When no dot is formed, the density evaluation value is equivalent to the gradation value 0. If it is determined that a large dot is to be formed for this pixel, no error occurs because the tone value of the original image data and the density evaluation value to be expressed coincide with each other at a value of 15. On the other hand, if it is determined that no dot is formed, an error of Err = 0-15 =-15 is generated.
こうして演算された誤差は図 1 9に示した割合で周辺の画素に拡散される。 例えば、 着目している画素 P Pにおいて階調値 4に相当する誤差が算出された 場合には、 隣の画素 P 1には誤差の 1 4である階調値 1に相当する誤差が拡 散されることになる。 その他の画素についても同様に図 1 9で示した割合で誤 差が拡散される。 こうして拡散された誤差が、 先に説明したステップ S 2 5 4 で画像データ C Dに反映され、 拡散誤差補正データ C D Xが生成されるのであ る。  The error calculated in this way is diffused to peripheral pixels at the rate shown in FIG. For example, if an error corresponding to the gradation value 4 is calculated at the pixel PP of interest, the error corresponding to the gradation value 1 which is the error 14 is diffused to the adjacent pixel P1. Will be. The errors are similarly diffused for the other pixels at the rate shown in FIG. The error thus diffused is reflected on the image data CD in step S254 described above, and diffusion error correction data CDX is generated.
以上の処理が終了すると、 C P U 8 1は画素番号 k xを値 1だけ増大し (ス テツプ S 2 6 8 )、主走査方向の画素数 n Xとの大小関係を比較する (ステップ S 2 7 0 )。画素番号 k xが画素数 n x以上である場合には、 に値0を代入 した後、 副走査方向の画素番号 k xを値 1だけ増大し (ステップ S 2 7 2 )、 副 走査方向の画素数 n yとの大小関係を比較する(ステップ S 2 7 4 )„ これらの 処理により全画素について処理が終了するまで、 処理対象となる画素を順次移 動させるのである。 かかる処理については第 1実施例と同様である。 こうして 全画素について処理が終了すれば、 ハーフトーン処理ルーチンを終了しドット 形成制御処理ルーチン (図 1 3 ) に戻る。 以後の処理は第 1実施例と同様であ る。 以上で説明したハーフトーン処理では、 ステップ S 2 5 8において拡散誤差 補正データ C D Xにノイズを付加している。 誤差拡散法は本来、 ノイズの付加 を行わなくてもハーフトーン処理をすることができる。 しかし、 閾値 T Hとド ッ卜の濃度評価値との関係によっては、 階調値の変化に応じてドットの発生率 が急激に変化することがある。 例えば、 一様な階調値 8を有する画像データで は、 ドッ卜がオンとなる場合もオフとなる場合も大きな誤差を生じることにな るため、 ドットのオン ·オフの判定は非常に不安定なものとなりやすい。 ドッ 卜の発生率が急激に変化すれば、 そこで疑似輪郭が生じ、 画質が低下すること がある。 本実施例では、 かかる現象を避けるためにノイズを付加しているので ある。 画像データにノイズを付加すれば、 上述の不安定な階調値が広範囲に亘 つて存在するのを避けることができるため、 ドッ卜の発生率の急変を抑制する ことができるのである。 When the above processing is completed, the CPU 81 increases the pixel number kx by the value 1 (step S268) and compares the magnitude relationship with the number nX of pixels in the main scanning direction (step S270) ). If the pixel number kx is equal to or larger than the pixel number nx, the value 0 is substituted into, and the pixel number kx in the sub-scanning direction is increased by the value 1 (step S2722), and the pixel number ny in the sub-scanning direction (Step S2744) The pixels to be processed are sequentially moved until the processing for all the pixels is completed by these processes. When the processing has been completed for all the pixels, the halftone processing routine ends, and the process returns to the dot formation control processing routine (FIG. 13) The subsequent processing is the same as in the first embodiment. In the halftone processing described above, noise is added to the diffusion error correction data CDX in step S258. The error diffusion method can originally perform halftone processing without adding noise. However, depending on the relationship between the threshold value TH and the dot density evaluation value, the dot generation rate may suddenly change according to the change in the gradation value. For example, in the case of image data having a uniform gradation value of 8, a large error occurs when the dot is turned on and when the dot is turned off. Therefore, it is very difficult to determine whether the dot is on or off. It is easy to be stable. If the occurrence rate of dots changes rapidly, false contours may occur and the image quality may decrease. In this embodiment, noise is added to avoid such a phenomenon. By adding noise to the image data, it is possible to prevent the above-mentioned unstable gradation values from being present over a wide range, and thus it is possible to suppress a sudden change in the incidence of dots.
本実施例では、 各成分の値の平均値が 0となるように設定されたマトリック スを用いている。 平均値が 0以外の値である場合には、 全体として表現される 濃度が変化してしまうからである。 本実施例では、 べィャ型のマトリックスの 各成分を— 7〜7の範囲に収まるようにシフトしたマトリックスを用いた。 も ちろん、 ブルーノイズマスク型のマトリックスなど種々のマトリックスを閾値 の平均値が 0となるようにシフトして用いることもできる。  In the present embodiment, a matrix set so that the average value of each component value is 0 is used. If the average value is a value other than 0, the density expressed as a whole will change. In this example, a matrix in which each component of the bayer type matrix was shifted so as to fall within the range of -7 to 7 was used. Of course, various matrices such as a blue noise mask type matrix can be used by shifting them so that the average value of the threshold value becomes zero.
以上で説明した第 2実施例の印刷装置によれば、 マトリックスに基づいてノ ィズを付加することにより、 高画質なハーフトーン処理および印刷を行うこと ができる。 この際、 マトリックスを画像データに対して方眼状に対応させた場 合には、 加えられるノイズが規則正しいパターンの繰り返しとなるため、 ドッ トが規則的なパターンで形成されることもある。 第 2実施例の印刷装置によれ ば、 マトリックスを画像データに対して階段状にずらして対応させるため、 か かる規則的なパターンの形成を回避することができ、 さらに高画質な印刷を行 うことができる。 かかる効果は、 各ラスタを 1回の主走査で完成する記録を行 う場合でも、 オーバラップ方式による記録を行う場合でも得ることができる。 なお、 第 2実施例の印刷装置では、 副走査方向に階段状にずらしながらマト リックスを対応させているが、 主走査方向にずらすものとしても構わないし、 双方にずらして対応させるものとしても構わない。 According to the printing apparatus of the second embodiment described above, high-quality halftone processing and printing can be performed by adding noise based on a matrix. In this case, if the matrix is made to correspond to the image data in a grid pattern, the added noise will be a repetition of a regular pattern, so that the dots may be formed in a regular pattern. According to the printing apparatus of the second embodiment, the matrix is shifted stepwise with respect to the image data so that the formation of such a regular pattern can be avoided, and high-quality printing can be performed. I can. Such an effect can be obtained regardless of whether printing is performed by completing each raster in one main scan or printing by the overlap method. In the printing apparatus of the second embodiment, the matrix is made to correspond to the matrix while being shifted stepwise in the sub-scanning direction. However, the matrix may be shifted in the main scanning direction, or may be shifted to both. Absent.
以上で説明した画像処理装置および印刷装置は、 コンピュータによる処理を 含んでいることから、 かかる処理を実現するためのプログラムを記録した記録 媒体としての実施の態様を採ることもできる。 このような記録媒体としては、 フレキシブルディスクや C D— R O M、 光磁気ディスク、 I Cカード、 R O M カートリッジ、 パンチカード、 バーコードなどの符号が印刷された印刷物、 コ ンピュー夕の内部記憶装置 (R AMや R O Mなどのメモリ) および外部記憶装 置等の、 コンピュータが読取り可能な種々の媒体を利用できる。 また、 コンビ ユー夕に上記で説明した画像処理等を行うコンピュータプログラムを通信経路 を介して供給するプログラム供給装置としての態様も可能である。  Since the image processing apparatus and the printing apparatus described above include processing by a computer, the embodiment can be adopted as a recording medium on which a program for realizing such processing is recorded. Such recording media include flexible disks, CD-ROMs, magneto-optical disks, IC cards, ROM cartridges, punched cards, printed materials on which codes such as barcodes are printed, and internal storage devices (such as RAM and Various computer-readable media can be used, such as a memory such as a ROM) and an external storage device. Further, an embodiment as a program supply device that supplies a computer program for performing the above-described image processing and the like at the time of combination via a communication path is also possible.
D . マトリックスの設計方法: D. How to design the matrix:
上述した各実施例の画像処理装置および印刷装置では、 ハーフトーン処理の 際に一般によく知られているべィャ型のマトリックスを用いていた。もちろん、 ブルーノイズマスク型のマトリックスを用いることもできることは説明した通 りである。 かかる公知のマトリックスの他、 上記画像処理装置および印刷装置 のために設計されたマトリックスを用いることもできる。  In the image processing apparatus and the printing apparatus of each of the above-described embodiments, a generally well-known bayer type matrix is used for halftone processing. Of course, as described, a blue noise mask type matrix can also be used. In addition to the known matrix, a matrix designed for the image processing device and the printing device can also be used.
図 2 0に本発明実施例としてのマトリックスの設計方法の手順を流れ図的に 示す。 また、 図 2 1〜図 2 4に具体的な設計例を示す。 これらの図を用いて本 実施例におけるマトリックスの設計方法を説明する。  FIG. 20 is a flowchart showing the procedure of a matrix design method according to an embodiment of the present invention. FIGS. 21 to 24 show specific design examples. The matrix design method in this embodiment will be described with reference to these drawings.
まず最初にマトリックスのサイズを設定し、 マトリックスに記憶される閾値 の範囲を設定する(ステップ S 1 0 )。マトリックスサイズはハーフトーン処理 により表現すべき階調値およびマトリックスを記憶するメモリ容量に応じて設 定する。 また、 閾値はハーフトーン処理により表現すべき階調値に応じて設定 する。 本実施例ではマトリックスサイズを 4 X 4に設定し、 閾値を値 0〜1 5 までの範囲に設定した。 なお、 本実施例では、 閾値は値 0〜 1 5までの範囲で 連続の整数としたが、 離散的な閾値を記憶するものとしても構わない。 また、 重複する閾値が存在しても構わない。 First, set the size of the matrix and the threshold stored in the matrix Is set (step S10). The matrix size is set according to the gradation value to be expressed by halftone processing and the memory capacity for storing the matrix. The threshold is set according to the gradation value to be expressed by the halftone processing. In this embodiment, the matrix size is set to 4 × 4, and the threshold value is set in a range of values 0 to 15. In the present embodiment, the threshold value is a continuous integer in the range of values 0 to 15. However, a discrete threshold value may be stored. Also, overlapping thresholds may exist.
次に、 マトリックスの配置を設定する (ステップ S 1 2 )。 マトリックスの配 置とは画像データへのマトリックスの対応関係をいう。 マトリックスを画像デ —夕に対して方眼状に配置するものとしてもよいし、 階段状にずらして配置す るものとしても構わない。 本実施例では後述する通り、 階段状に配置するもの とした。  Next, the arrangement of the matrix is set (step S12). The arrangement of the matrix refers to the correspondence of the matrix to the image data. The matrix may be arranged in a grid pattern with respect to the image data, or may be arranged in a stair-like manner. In the present embodiment, as described later, they are arranged stepwise.
.次に、 閾値 0, 1をマトリックス内の成分に割り当てる (ステップ S 1 4 )。 本実施例における閾値の割り当てを図 2 1に示す。 成分 (0, 0 ) に値 0を割 り当て、 成分 (2, 1 ) に値 1を割り当てた。 マトリックス内に配置される全 閾値のうち小さい方から 2つの閾値を割り当てたことになる。 小さい方から 3 つ以上の閾値を割り当てるものとしても構わないし、 最も小さい闞値のみを割 り当てるものとしても構わない。 閾値は任意の成分に割り当てることができる が、 ドットの分散性を考慮して割り当てることが望ましい。  Next, thresholds 0 and 1 are assigned to components in the matrix (step S14). FIG. 21 shows the assignment of thresholds in the present embodiment. The value 0 was assigned to component (0, 0) and the value 1 was assigned to component (2, 1). This means that two thresholds are assigned from the smaller of all thresholds arranged in the matrix. Three or more thresholds may be assigned in ascending order, or only the smallest 闞 value may be assigned. The threshold value can be assigned to an arbitrary component, but is desirably assigned in consideration of the dispersibility of dots.
こうして一部の閾値を設定した後は、 以下に示す処理を繰り返し実行して計 算により残りの閾値を設定する。 閾値は小さい方から順次設定する。 上述の通 り、閾値 0, 1は既に設定されているため、次は閾値 2を設定することになる。 図 2 0では、 この意味で設定対象となる閾値 n cに値 2を代入するステップを 示した。  After setting some thresholds in this way, the following processing is repeatedly executed, and the remaining thresholds are set by calculation. The threshold value is set sequentially from the smaller one. As described above, thresholds 0 and 1 have already been set, so threshold 2 will be set next. FIG. 20 shows the step of substituting the value 2 for the threshold value nc to be set in this sense.
次に、 マトリックス内でまだ閾値が設定されていない成分を一つ選択し (ス テツプ S 1 8)、この成分から既に閾値が設定された成分までの距離の評価値を 算出する (ステップ S 20)。 本実施例では最初に成分 (3, 0) を選択した。 この成分の画像データ上での位置を図 22に示した。 図 22は、 本実施例での マトリックスと画像データとの対応関係を示している。 成分 (3, 0) は図 2 2中の画素 DDに対応する。 もちろん、 図 22中にはマトリックスが階段状に 配置されているため、 成分 (3, 0) に対応する画素も多数存在するが、 その 中の一つを選択すればよい。 Next, select one component in the matrix for which the threshold has not yet been set. At step S18), the evaluation value of the distance from this component to the component for which the threshold has already been set is calculated (step S20). In this embodiment, the component (3, 0) is selected first. FIG. 22 shows the position of this component on the image data. FIG. 22 shows the correspondence between the matrix and the image data in the present embodiment. The component (3, 0) corresponds to the pixel DD in FIG. Of course, since the matrix is arranged stepwise in FIG. 22, there are many pixels corresponding to the component (3, 0), but one of them may be selected.
既に設定された闞値は値 0, 1の 2種類あるので、 それぞれについて距離の 評価値を算出する。 距離の評価値は、 後述するように既に閾値が設定された画 素との距離を算出するというステップと、 この距離に基づいて距離の評価値を 求めるステップを経て算出される。  Since there are two types of 闞 values already set, the values 0 and 1, the distance evaluation value is calculated for each. The evaluation value of the distance is calculated through a step of calculating a distance to a pixel for which a threshold has already been set, as described later, and a step of obtaining an evaluation value of the distance based on the distance.
距離の算出は次の要領で行う。 閾値が未定義の画素 DDの周囲には、 マトリ ックスの配置に応じて閾値 0が割り当てられている画素が多数存在する。 この ように多数存在する画素の中から最も距離の短い画素を選択して距離を算出す るのである。 図 22では、 画素 DDの右上に隣接する画素が最も近接する画素 となっている。 両者の距離は図 22中で d i 0で示されており、 主走査方向の 距離 dxと副走査方向の距離 d yとを用いて (d x · d x + d y · dy) に より求められる。 図 22の場合は d i 0= 2となる。 同様にして閾値 1が割 り当てられている画素と画素 DDとの距離も算出する。 本実施例では、 画素 D Dの左下に隣接する画素が最も近接する画素となる。 この画素への距離を d i 1とすれば、 d i l= "2となる。 この段階では、 設定された閾値は 0, 1の 2つのみであるため、 d i 0, d i 1の 2つの距離を算出して次のステップに 進む。 設定された閾値が増えた場合には、 それぞれの閾値に対応した距離を算 出することになる。 以上で説明した通り、 閾値が割り当てられた画素との距離 は、 画像データへのマトリックスの配置を考慮した上で算出する。 この理由は 後述する。 The calculation of the distance is performed in the following manner. Around the pixels DD with undefined thresholds, there are many pixels to which threshold 0 is assigned according to the arrangement of the matrix. The distance is calculated by selecting the pixel with the shortest distance from among such a large number of pixels. In FIG. 22, the pixel adjacent to the upper right of the pixel DD is the closest pixel. The distance between the two is indicated by di 0 in FIG. 22, and is obtained by (dx · dx + dy · dy) using the distance dx in the main scanning direction and the distance dy in the sub-scanning direction. In the case of FIG. 22, di 0 = 2. Similarly, the distance between the pixel to which threshold value 1 is assigned and the pixel DD is calculated. In the present embodiment, the pixel adjacent to the lower left of the pixel DD is the closest pixel. If the distance to this pixel is di1, then dil = "2. At this stage, since there are only two thresholds, 0 and 1, the two distances di0 and di1 are calculated. When the set thresholds increase, the distance corresponding to each threshold is calculated. As described above, the distance from the pixel to which the threshold is assigned is calculated as follows. , Calculated taking into account the arrangement of the matrix in the image data. It will be described later.
こうして算出された距離に基づいて、 距離の評価値 e v lを次式 (4) によ り求める。 ここで、 「 -」 はべき乗演算子である。  Based on the distance thus calculated, a distance evaluation value e vl is obtained by the following equation (4). Where "-" is a power operator.
ev l = l/d i 0 " 2+ l/d i l " 2 - (4)  ev l = l / d i 0 "2+ l / d i l" 2-(4)
つまり、 各距離の 2乗分の 1の総和を評価値 e V 1とする。 設定された閾値 が増え、 距離が d i 2, d i 3 · · · と算出された場合には、 それぞれ lZd i 2 " 2, 1 /d i 3 " 2 · - - も加えた値が評価値 e v 1となる。 上述の通 り、 成分 (3, 0) に対しては距離 d i 0 = d i 1=Γ2であるから、 ev l = 1である。 以上の演算を閾値が割り当てられていない全ての成分について行 う (ステップ S 22)。 こうして算出された評価値を図 23に示す。  In other words, the sum of the square of each distance is set as the evaluation value e V 1. If the set threshold value increases and the distance is calculated as di 2, di 3 · · · ·, the value added with lZd i 2 "2, 1 / di 3" 2 ·--is the evaluation value ev 1 Becomes As described above, the distance d i 0 = d i 1 = Γ2 for the component (3, 0), so that ev l = 1. The above operation is performed for all components to which no threshold is assigned (step S22). FIG. 23 shows the calculated evaluation values.
次に、 評価値が最小となっている成分を選択する (ステップ S 24)„図 23 から明らかな通り、 本実施例では成分 (2, 3) が評価値 0. 45で最小とな つている。 従って、 この成分に閾値 n cを設定する。 この段階では nc = 2で あるから閾値 2を成分 (2, 3) に割り当てるのである。 上式 (4) から明ら かな通り、 評価値 e V 1が最小の成分は、 既に閾値が設定されたいずれの画素 からも距離が遠い画素に対応する。 従って、 かかる成分に閾値を割り当てて設 計されたマトリックスを用いてハーフトーン処理を行えば、 画像データ全体で ドットの分散性を確保することができるのである。 本実施例では、 画像データ 上のマ卜リックスの配置も考慮した上で、 既に閾値が設定された画素と未定義 の画素との距離の算出を行っている。 この理由は、 画像データ全体でのドット の分散性を確保するためなのである。  Next, the component having the smallest evaluation value is selected (step S24). As is clear from FIG. 23, in this embodiment, the component (2, 3) has the smallest evaluation value of 0.45. Therefore, a threshold value nc is set for this component, and at this stage, since nc = 2, threshold value 2 is assigned to the component (2, 3) As is clear from the above equation (4), the evaluation value e V A component having a minimum value of 1 corresponds to a pixel that is farther from any pixel for which a threshold has already been set, so if halftone processing is performed using a matrix designed by assigning a threshold to such a component, In this embodiment, it is possible to secure the dispersibility of the dots in the entire image data.In this embodiment, taking into account the arrangement of the matrix on the image data, the pixels for which the threshold is already set and the pixels which are not defined are used. Is calculated for the reason This is to ensure dot dispersibility throughout the image data.
以上の処理により閾値 0, 1, 2が成分に割り当てられたことになるため、 次の閾値を設定対象とする。 本実施例でいえば、 閾値 n cを値 1だけ増やすこ とになる(ステップ S 26)。 この閾値について上述したステップ S 18〜S 2 4までの処理を行って、 マトリックスのいずれかの成分に閾値 ncを割り当て る。 全ての成分に閾値が割り当てられるまでこの処理を繰り返し実行する (ス テツプ S 2 8 )。 Since the thresholds 0, 1, and 2 have been assigned to the components by the above processing, the next threshold is set as the target. In this embodiment, the threshold nc is increased by 1 (step S26). Perform the processing of steps S18 to S24 described above for this threshold and assign a threshold nc to any component of the matrix You. This process is repeatedly executed until threshold values are assigned to all components (step S28).
こうして閾値が割り当てられた結果を図 2 4に示す。 これが、 本発明のマト リックスの設計方法により設計されたマトリックスの一例である。 図 2 4に示 されるマトリックスはべィャ型ともブルーノイズマスク型とも異なるマトリッ クスとなっている。 なお、 こうして得られたマトリックスに対し、 処理対象と なる画像データとの関係に応じた補正を施すものとしてもよい。 例えば、 画像 データが 0〜2 5 5までの階調値を有している場合には、 図 2 4のマトリック スが最大 2 5 5の閾値を採るように、 各閾値を係数倍する補正を施すものとし てもよい。 また、 図 1 8で示したハーフトーン処理におけるノイズマトリック スとして用いる場合には、 平均値が 0となるように各成分の値をシフトさせる 補正を施すものとしてもよい。 その他、 画像デ一夕との関係等に応じて種々の 捕正を施すことが可能である。  Figure 24 shows the result of the threshold assignment. This is an example of a matrix designed by the matrix design method of the present invention. The matrix shown in Fig. 24 has a different matrix from both the bayer type and the blue noise mask type. The matrix obtained in this manner may be corrected according to the relationship with the image data to be processed. For example, if the image data has gradation values from 0 to 255, the correction of multiplying each threshold by a factor is performed so that the matrix in Fig. 24 adopts a maximum of 255 thresholds. It may be applied. In addition, when the noise matrix is used as the noise matrix in the halftone processing shown in FIG. 18, correction for shifting the value of each component so that the average value becomes 0 may be performed. In addition, various corrections can be made according to the relationship with the image data.
以上で説明したマトリックスの設計方法によれば、 画像データに対するマト リックスの配置を考慮した上で、 ドットの分散性の高いマトリックスを得るこ とができる。 こうして設計されたマトリックスを用いてハーフトーン処理を行 えば、 画像データ全体におけるドットの分散性の高い高画質なハーフトーン処 理が可能となる。 また、 上記設計方法によれば、 マトリックスを画像データに 対して図 2 2に示すような階段状に配置することを前提としたマトリックスを 得ることができる。 この結果、 先に説明した本実施例の画像処理装置や印刷装 置に最も適したマトリックスを得ることが可能となる。  According to the matrix design method described above, it is possible to obtain a matrix with high dot dispersibility in consideration of the arrangement of the matrix with respect to the image data. If halftone processing is performed using the matrix designed in this way, high-quality halftone processing with high dot dispersibility in the entire image data becomes possible. Further, according to the above design method, it is possible to obtain a matrix on the premise that the matrix is arranged in a stepwise manner as shown in FIG. 22 with respect to the image data. As a result, it is possible to obtain a matrix most suitable for the image processing apparatus and the printing apparatus of the present embodiment described above.
以上、 本発明の種々の実施例について説明してきたが、 本発明はこれらに限 定されるものではなく、 その要旨を逸脱しない範囲で、 種々の形態による実施 が可能である。 例えば、 上記実施例で説明した種々の制御処理は、 その一部ま たは全部をハードウェアにより実現してもよい。 産業上の利用可能性 Although various embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various embodiments can be implemented without departing from the gist of the present invention. For example, various control processes described in the above embodiments may be partially or entirely realized by hardware. Industrial applicability
本発明は、インクジエツトプリンタなど、ドットを用いて画像を出力する種々 の画像出力装置に供給する出力データを生成する画像処理装置に適用可能であ る。  INDUSTRIAL APPLICABILITY The present invention is applicable to an image processing apparatus that generates output data to be supplied to various image output apparatuses that output images using dots, such as an ink jet printer.

Claims

請求の範囲 The scope of the claims
1. 2次元的な画素の配列により構成され、 各画素ごとに予め定めた範 囲の階調値を有する画像データに対し、 前記各画素ごとに前記階調値と所定の 閾値との大小関係に応じてドッ卜のオン ·オフを判定し、 所定の画像出力装置 に対応した出力データを生成する画像処理装置であって、  1. For image data having a two-dimensional array of pixels and having a predetermined range of gradation values for each pixel, a magnitude relationship between the gradation value and a predetermined threshold value for each pixel An image processing device that determines whether a dot is on or off according to a predetermined image output device and generates output data corresponding to a predetermined image output device.
前記 2次元的な画素の配列により構成された画像データの大きさよりも小さ いサイズで、 予め設定された値を成分とするドット分散型の 2次元マトリック スを記憶する記憶手段と、  Storage means for storing a dot-dispersion type two-dimensional matrix having a size smaller than the size of the image data formed by the two-dimensional pixel array and having a predetermined value as a component;
前記マトリックスを前記画像データに対して、 ドットのオン ·オフと前記画 像出力装置のドット形成特性の変動周期との干渉によって生じる画質の劣化を 回避可能な範囲で方眼状からずらして配置し、 該マトリックスの成分を前記画 像データの前記階調値または前記閾値に反映させて、 ドッ卜のオン ·オフを判 定するハーフトーン手段とを備える画像処理装置。  The matrix is arranged with respect to the image data so as to be deviated from a grid in a range where image quality deterioration caused by interference between on / off of dots and a fluctuation cycle of dot forming characteristics of the image output device can be avoided, An image processing apparatus comprising: halftone means for judging on / off of a dot by reflecting a component of the matrix on the gradation value or the threshold value of the image data.
2. X方向に n x個、 y方向に n y個 (n x, n yは 2以上の整数) らなる合計 n xxn y個の画素で構成され、 各画素ごとに予め定めた範囲の階 調値を有する画像データに対し、 前記各画素ごとに前記階調値と所定の閾値と の大小関係に応じてドッ卜のオン ·オフを判定し、 所定の画像出力装置に対応 した出力データを生成する画像処理装置であって、 2. It is composed of a total of n xxn y pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values Image processing for determining the on / off of a dot for image data according to the magnitude relationship between the gradation value and a predetermined threshold value for each pixel, and generating output data corresponding to a predetermined image output device A device,
予め設定された値を成分とする mx Xmy ( 1≤mx<n x, 1≤my<n yなる整数) のドット分散型のマトリックスを記憶する記憶手段と、  Storage means for storing a dot-dispersed matrix of mx Xmy (an integer of 1≤mx <nx, 1≤my <ny) having components set in advance,
前記各画素ごとに前記階調値または前記閾値に前記マトリックスの成分を反 映させて、 ドッ卜のオン ·オフを判定するハーフトーン手段とを備え、  Halftone means for judging on / off of dots by reflecting the components of the matrix on the gradation value or the threshold value for each pixel,
前記 X方向に k x番目(k Xは 0≤ k x≤n Xなる整数)、 y方向に k y番目 の画素(k yは 0≤k y≤n yなる整数)に反映させるマトリックスの成分は、 次式で与えられる (x t, y t ) (0≤x t≤mx, 0≤y t≤myの整数) で ある画像処理装置。 The matrix components to be reflected on the kx-th pixel in the X direction (k X is an integer of 0≤ kx≤n X) and the ky-th pixel in the y direction (ky is an integer of 0≤ky≤ny) are as follows: An image processing device given by (xt, yt) (0≤xt≤mx, 0≤yt≤my) given by the following equation.
X t = (r x · d x l + r y · d x 2 + kx) %mx ;  X t = (r x · d x l + r y · d x 2 + kx)% mx;
y t = (r x · dy l + r y · d y 2 + ky) %my ;  y t = (r x · dy l + r y · d y 2 + ky)% my;
r x = k x d i v mx ;  r x = k x d i v mx;
r y = k y d i v my ;  r y = ky d i v my;
し し し、  And then
a d i v bは aZbの商を整数値で求める演算子、  a d i v b is an operator that calculates the quotient of aZb as an integer,
a%bは aZbの余りを求める剰余演算子、  a% b is the remainder operator to find the remainder of aZb,
d X 1 , d X 2, d y l, d y 2は 0以上の整数であって、 d x l, d x 2, dy 1, d y 2のうち少なくとも一つは 0以外の値である整数。  d X 1, d X 2, d y l, d y 2 are integers greater than or equal to 0, and at least one of d x l, d x 2, dy 1, d y 2 is an integer other than 0.
3. 請求の範囲第 1項又は請求の範囲第 2項記載の画像処理装置であつ て、 3. The image processing apparatus according to claim 1 or claim 2,
前記ハーフトーン手段は、 前記閾値として前記マトリックスの成分を用いる ディザ法によりドットのオン ·オフを判定する手段である画像処理装置。  The image processing apparatus, wherein the halftone unit is a unit that determines on / off of a dot by a dither method using a component of the matrix as the threshold.
4. 請求の範囲第 3項記載の画像処理装置であつて、 4. The image processing apparatus according to claim 3,
前記マトリックスは、 べィャ型のディザマトリックスである画像処理装置。  The image processing device, wherein the matrix is a Bayer-type dither matrix.
5. 請求の範囲第 3項記載の画像処理装置であって、 5. The image processing apparatus according to claim 3, wherein
前記マトリックスは、 ブルーノイズマスク型のマトリックスである画像処理 装置。  The image processing device, wherein the matrix is a blue noise mask type matrix.
6. 請求の範囲第 3項記載の画像処理装置であって、 前記マトリックスは、 前記マトリックスの大きさに対応する領域よりも広い 画像領域で、 ドッ卜の分散性が高いハーフトーン処理を行うことが可能なマト リックスである画像処理装置。 6. The image processing apparatus according to claim 3, wherein An image processing apparatus, wherein the matrix is a matrix capable of performing halftone processing with high dot dispersibility in an image area wider than an area corresponding to the size of the matrix.
7. 請求の範囲第 1項又は請求の範囲第 2項記載の画像処理装置であつ て、 7. The image processing apparatus according to claim 1 or claim 2, wherein
前記ハーフト一ン手段は、 前記マトリックスの成分をノィズデ一夕として前 記画像データに反映させた上でドッ卜のオン ·オフを判定する手段である画像 処理装置。  The image processing apparatus, wherein the halftone means is a means for determining the on / off of the dot after reflecting the components of the matrix as noise data in the image data.
8. X方向に n x個、 y方向に n y個 (n x, n yは 2以上の整数) か らなる合計 n X X n y個の画素で構成され、 各画素ごとに予め定めた範囲の階 調値を有する画像デ一夕に対し、 前記各画素ごとに前記階調値と所定の閾値と の大小関係に応じて特定されたドットのオン ·オフに応じて、 へッドを駆動し てドットを形成することにより印刷媒体上に画像を印刷する印刷装置であって、 予め設定された値を成分とする mx Xmy ( 1≤mx<n x, 1≤my<n yなる整数) のドット分散型のマトリックスを記憶する記憶手段と、 8. It is composed of a total of n XX ny pixels consisting of nx pixels in the X direction and ny pixels in the y direction (nx, ny is an integer of 2 or more). With respect to the image data having a dot, the head is driven to form a dot according to the on / off state of the dot specified according to the magnitude relationship between the gradation value and a predetermined threshold value for each pixel. A printing device that prints an image on a print medium by performing a matrix of a mx Xmy (1≤mx <nx, an integer 1≤my <ny) dot dispersion type having components set in advance. Storage means for storing;
前記各画素ごとに前記階調値と前記閾値のいずれか一方に前記マトリックス のいずれかの成分を反映させて、 ドッ卜のオン ·オフを判定するハーフトーン 手段とを備え、  Halftone means for judging on / off of dots by reflecting any component of the matrix in one of the gradation value and the threshold value for each of the pixels,
前記 X方向に; k x番目 (k Xは 0≤ k x≤ n Xなる整数)、 y方向に k y番目 の画素(k yは 0≤ k yく n yなる整数)に反映させるマトリックスの成分は、 次式で与えられる (x t , y t ) (0≤ x t≤mx、 0≤y t≤myの整数) で ある印刷装置。  In the X direction, the components of the matrix to be reflected on the kx-th pixel (k X is an integer of 0 ≤ kx ≤ n X) and the ky-th pixel in the y direction (ky is an integer of 0 ≤ ky and ny) are given by A printing device that is given (xt, yt) (0≤xt≤mx, 0≤yt≤my integer).
X t = ( r x · d x l + r y · dx 2 + k x) %mx ; y t = ( r x · d y l + r y · d y 2 + ky) %my ; X t = (rx · dxl + ry · dx 2 + kx)% mx; yt = (rx · dyl + ry · dy 2 + ky)% my;
r x = k x d i v mx ;  r x = k x d i v mx;
r y = k y d i v my ;  r y = ky d i v my;
ここで、  here,
a d i v bは aZbの商を整数値で求める演算子、  a d i v b is an operator that calculates the quotient of aZb as an integer,
a%bは aZbの余りを求める剰余演算子、  a% b is the remainder operator to find the remainder of aZb,
d X 1 , d X 2, d y 1 , d y 2は 0以上の整数であって、 d x l, d x 2, d y 1, d y 2のうち少なくとも一つは 0以外の値である整数。  d X 1, d X 2, d y 1, d y 2 are integers greater than or equal to 0, and at least one of d x l, d x 2, d y 1, d y 2 is a non-zero integer.
9. 請求の範囲第 8項記載の印刷装置であって、 9. The printing device according to claim 8, wherein
前記へッドは、 前記 y方向に並ぶ複数のノズルを備えるへッドであり、 前記へッドを前記 X方向に前記印刷媒体に対して相対的に往復動する主走査 手段と、  Main scanning means for reciprocating the head relative to the print medium in the X direction, wherein the head comprises a plurality of nozzles arranged in the y direction;
前記へッドと前記印刷媒体を前記 y方向に相対的に移動する副走査手段と、 前記主走査手段、 副走査手段およびヘッドの駆動を制御して、 前記 X方向に 並ぶ各ドット列を 2以上のノズルを用いて形成する駆動制御手段とを備え、 少なくとも前記 d y 1≠ 0である印刷装置。  A sub-scanning unit that relatively moves the head and the print medium in the y-direction; and a main scanning unit, a sub-scanning unit, and a drive of the head are controlled to form each dot row aligned in the X-direction by 2 A printing apparatus comprising: a drive control unit formed by using the nozzles described above; and at least dy 1 ≠ 0.
1 0. 2次元的な画素の配列により構成され、 各画素ごとに予め定めた 範囲の階調値を有する画像データに対し、 前記各画素ごとに前記階調値と所定 の閾値との大小関係に応じてドッ卜のオン 'オフを判定し、 所定の画像出力装 置に対応した出力デ一夕を生成する画像処理方法であって、 10. With respect to image data having a two-dimensional arrangement of pixels and having a predetermined range of gradation values for each pixel, a magnitude relationship between the gradation value and a predetermined threshold value for each pixel is described. An image processing method for determining whether a dot is on or off in accordance with an image and generating output data corresponding to a predetermined image output device.
予め設定された値を成分とするドット分散型の 2次元マトリックスを前記画 像デ一夕に対し、 ドッ卜のオン ·オフと前記画像出力装置のドット形成特性の 変動周期との干渉によって生じる画質の劣化を回避可能な範囲で方眼状からず らして配置し、 該マトリックスの成分を前記画像データの前記階調値または前 記閾値に反映させて、 ドッ卜のオン ·オフを判定する画像処理方法。 A two-dimensional dot-dispersion matrix having a predetermined value as a component is used to generate an image quality that is generated by interference between the on / off of dots and the fluctuation cycle of the dot forming characteristics of the image output device with respect to the image data. Not grid-shaped as long as deterioration of the material can be avoided An image processing method for judging on / off of dots by reflecting components of the matrix on the gradation value of the image data or the threshold value.
11. X方向に nx個、 y方向に n y偭 (n x, n yは 2以上の整数) からなる合計 nxxny個の画素で構成され、 各画素ごとに予め定めた範囲の 階調値を有する画像データについて、 ドッ卜のオン ·オフを判定する際に前記 階調値または所定の閾値に反映させる値を予め記憶した mx Xmy ( 1≤mx <n x, l≤my<nyなる整数) のマトリックスの設計方法であって、11. Image data consisting of a total of nxxny pixels consisting of nx pixels in the X direction and ny 偭 in the y direction (nx and ny are integers of 2 or more), and having a predetermined range of gradation values for each pixel The design of a matrix of mx Xmy (integer 1≤mx <nx, l≤my <ny) that stores in advance the values to be reflected in the gradation value or the predetermined threshold value when determining the on / off of the dot The method
(a) 前記ハーフトーン処理における各画素と該マトリックスの成分との対 応を設定する工程と、 (a) setting a correspondence between each pixel and the matrix component in the halftone processing;
(b) 該マトリックスに割り当てられる値を大小関係に応じて並べた場合の 先頭から n個 (nは 1以上の整数) の値を、 閾値の分散性を考慮して前記マト リックスの任意の成分として設定する工程と、  (b) When the values assigned to the matrix are arranged according to the magnitude relation, the first n (n is an integer of 1 or more) values are determined by taking into account the dispersibility of the threshold value and the arbitrary components of the matrix. A step of setting as
(c) 該マトリックスに割り当てられるべき値として残っている値を、 所定 の演算により求められた成分に順次設定する工程とを備え、  (c) sequentially setting values remaining as values to be assigned to the matrix to components determined by a predetermined operation,
前記工程 (c) は、 The step (c) comprises:
(c— 1) 該マトリックスのうち値が割り当てられていない各成分と既に値 が設定された前記マトリックスの成分との距離を、 前記画像デ一夕を構成する 各画素に対応付けられた複数のマトリックスに亘つて評価する工程と、  (c-1) The distance between each component of the matrix to which no value is assigned and the component of the matrix for which the value has already been set is determined by a plurality of pixels associated with each pixel constituting the image data. Evaluating over the matrix;
(c - 2) 既に値が設定された成分からの距離が最も遠いと評価される成分 に、 前記残っている値を前記大小関係に応じて並べた場合の先頭の値を設定す る工程とからなるマトリックスの設計方法。  (c-2) a step of setting a leading value in a case where the remaining values are arranged in accordance with the magnitude relation, for a component evaluated to be the longest from a component for which a value has already been set; and Matrix design method.
12. 請求の範囲第 11項記載のマトリックスの設計方法であって、 前記工程 (a) における対応は、 前記 x方向に kx番目 ( は0≤1^ ≤ 11 なる整数)、 y方向に ky番 目の画素 (k yは 0≤k y≤n yなる整数) に反映させるマトリックスの成分 が、次式で与えられる(x t, y t ) (0≤x t≤mx 0≤y t≤myの整数) 対応である設計方法。 12. The method for designing a matrix according to claim 11, wherein the correspondence in the step (a) is: The matrix component to be reflected to the kx-th pixel in the x-direction (where is an integer 0≤1 ^ ≤11) and the ky-th pixel in the y-direction (ky is an integer 0≤ky≤ny) is given by the following equation. (Xt, yt) (0≤xt≤mx 0≤yt≤my integer) Design method that is compatible.
X t = (r x · dx l + ry · d x 2 + kx) %mx;  X t = (r x · dx l + ry · d x 2 + kx)% mx;
y t = (rx · dy l + ry · dy 2 + ky) %my;  y t = (rx · dy l + ry · dy 2 + ky)% my;
r x = k x d i v mx;  r x = k x d i v mx;
r y = k y d i v my ;  r y = ky d i v my;
ここで、  here,
a d i v bは aZbの商を整数値で求める演算子、  a d i v b is an operator that calculates the quotient of aZb as an integer,
a%bは aZbの余りを求める剰余演算子、  a% b is the remainder operator to find the remainder of aZb,
d X 1 , d X 2, d y 1 , d y 2は 0以上の整数であって、 d x l, d x 2, dy 1, dy 2のうち少なくとも一つは 0以外の値である整数。  d X 1, d X 2, d y 1, d y 2 are integers greater than or equal to 0, and at least one of d x l, d x 2, dy 1 and dy 2 is an integer other than 0.
13. X方向に nx個、 y方向に ny個 (nx, nyは 2以上の整数) からなる合計 n X X n y個の画素で構成され、 各画素ごとに予め定めた範囲の 階調値を有する画像データについて、 前記各画素ごとに前記階調値と所定の閾 • 値との大小関係に応じてドッ卜のオン ·オフを判定するためのプログラムをコ ンピュー夕読みとり可能に記録した記録媒体であって、 13. It is composed of a total of n XX ny pixels consisting of nx in the X direction and ny in the y direction (nx and ny are integers of 2 or more), and each pixel has a predetermined range of gradation values With respect to image data, a program for judging on / off of a dot in accordance with a magnitude relation between the gradation value and a predetermined threshold value for each pixel is recorded on a computer-readable recording medium. So,
予め設定された値を成分として記憶された mx Xmy ( 1≤mx<n x, 1 ≤my<n yなる整数) のドット分散型のマトリックスと、  An mx Xmy (1≤mx <nx, an integer 1≤my <ny) dot-dispersion matrix stored with preset values as components,
前記 X方向に kx番目 (k Xは 0≤ k x≤n Xなる整数)、 y方向に k y番目 の画素 (kyは 0≤ky≤nyなる整数) の前記階調値または前記閾値に、 前 記マトリックスのうち次式で与えられる (x t, y t ) (0≤x t≤mx, 0≤ y t≤myの整数) 成分を反映させてドットのオン 'オフを判定する機能を実 現するためのプログラムを記録した記録媒体。 The grayscale value or the threshold value of the kx-th pixel (kX is an integer satisfying 0≤kx≤nX) in the X direction and the ky-th pixel (ky is an integer satisfying 0≤ky≤ny) in the y direction are as described above. A function to determine the dot on / off by reflecting the (xt, yt) (0≤xt≤mx, 0≤yt≤my) component of the matrix given by A recording medium on which a program to be implemented is recorded.
X t = (r x · dx l + ry · dx2 + kx) %mx;  X t = (r x · dx l + ry · dx2 + kx)% mx;
y t = (r x · dy l + ry - dy2 + ky) %my;  y t = (r x · dy l + ry-dy2 + ky)% my;
r x = k x d i v mx;  r x = k x d i v mx;
r y = k y d i v my ;  r y = ky d i v my;
ここで、 here,
a d i v bは aZbの商を整数値で求める演算子、  a d i v b is an operator that calculates the quotient of aZb as an integer,
a%bは aZbの余りを求める剰余演算子、  a% b is the remainder operator to find the remainder of aZb,
d x l, d X 2, d y l , d y 2は 0以上の整数であって、 d x l, d x 2, d y 1, d y 2のうち少なくとも一つは 0以外の値である整数。  dxl, dx2, dyl, dy2 are integers greater than or equal to 0, and at least one of dxl, dx2, dy1, and dy2 is an integer other than 0.
PCT/JP1999/005241 1998-09-25 1999-09-24 Image processing device and method, and printer WO2000019704A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10/288748 1998-09-25
JP28874898A JP3767209B2 (en) 1998-09-25 1998-09-25 Image processing apparatus and method, and printing apparatus

Publications (1)

Publication Number Publication Date
WO2000019704A1 true WO2000019704A1 (en) 2000-04-06

Family

ID=17734200

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1999/005241 WO2000019704A1 (en) 1998-09-25 1999-09-24 Image processing device and method, and printer

Country Status (2)

Country Link
JP (1) JP3767209B2 (en)
WO (1) WO2000019704A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008028406A1 (en) * 2006-08-22 2008-03-13 Peking University Founder Group Co., Ltd A scanning and processing image method and system belonging to the error diffusion image network suspersion technique

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7251060B2 (en) 2000-12-12 2007-07-31 Ricoh Company, Ltd. Image-processing device using quantization threshold values produced according to a dither threshold matrix and arranging dot-on pixels in a plural-pixel field according to the dither threshold matrix
JP2007062099A (en) * 2005-08-30 2007-03-15 Seiko Epson Corp Image formation method and image forming apparatus
JP4779510B2 (en) * 2005-08-30 2011-09-28 セイコーエプソン株式会社 Image forming method and image forming apparatus
JP4779509B2 (en) * 2005-08-30 2011-09-28 セイコーエプソン株式会社 Image forming method and image forming apparatus
JP5077138B2 (en) * 2008-08-13 2012-11-21 カシオ電子工業株式会社 Image forming apparatus
JP5515987B2 (en) * 2010-04-05 2014-06-11 株式会社リコー Image forming apparatus
JP5832350B2 (en) * 2012-03-28 2015-12-16 株式会社Screenホールディングス Threshold matrix generation method, image data generation method, image data generation device, image recording device, and threshold value matrix
US9064202B2 (en) * 2012-06-06 2015-06-23 Canon Kabushiki Kaisha Data processing apparatus and print data generating method
JP2018012278A (en) 2016-07-21 2018-01-25 株式会社ミマキエンジニアリング Solid body molding method, and solid body molding device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6345974A (en) * 1986-08-12 1988-02-26 Ricoh Co Ltd Image processing unit
JPS6429170A (en) * 1987-07-24 1989-01-31 Nec Corp Method and apparatus for recording dot picture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6345974A (en) * 1986-08-12 1988-02-26 Ricoh Co Ltd Image processing unit
JPS6429170A (en) * 1987-07-24 1989-01-31 Nec Corp Method and apparatus for recording dot picture

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008028406A1 (en) * 2006-08-22 2008-03-13 Peking University Founder Group Co., Ltd A scanning and processing image method and system belonging to the error diffusion image network suspersion technique
US8411310B2 (en) 2006-08-22 2013-04-02 Peking University Founder Group Co., Ltd. Methods and systems for scanning and processing an image using the error diffusion screening technology

Also Published As

Publication number Publication date
JP2000101837A (en) 2000-04-07
JP3767209B2 (en) 2006-04-19

Similar Documents

Publication Publication Date Title
JP3414325B2 (en) Printing device and recording medium
JP3846133B2 (en) Image processing apparatus and printing apparatus
JP2000225716A (en) Printer and method for printing
JPH11314383A (en) Manufacture of print driver and color print system
JP4660436B2 (en) Printing apparatus and printing method
JP2004284279A (en) Image processing device/method and image processing program
JP3981480B2 (en) Printing apparatus and recording medium
JP2008162151A (en) Printer with a plurality of nozzle groups which eject ink of the same color, and printing method
JP2001150651A (en) Printer, printing method and recording medium
JP3767209B2 (en) Image processing apparatus and method, and printing apparatus
JP2003094693A (en) Printer and recording medium
JP3541668B2 (en) Printing apparatus, printing method, and recording medium
JP3687381B2 (en) Printing apparatus, printing method, and recording medium
JP2005278209A (en) Image processing apparatus and method therefor, and printer
JP5292889B2 (en) Printing apparatus, printing method, computer program, and recording medium
JP4016572B2 (en) Adjustment of misalignment between dots formed at different timings
JP4075241B2 (en) Printing apparatus, printing method, and recording medium
JP4154865B2 (en) Printing with multiple pixels as one unit of gradation reproduction
JP2000071439A (en) Image processor, image processing method and recording medium
JP3772525B2 (en) Printing apparatus and printing method
JP4168523B2 (en) Printing apparatus, printing method, and recording medium
JP4535081B2 (en) Printing apparatus and recording medium
JP4521909B2 (en) Printing apparatus and printing method
JP3757650B2 (en) Image processing device
JP4710775B2 (en) High quality halftone processing

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase