1. Field of the Invention
The present invention relates to an image processing method and apparatus and, more particularly, to an image processing method and apparatus for quantizing input data to binary or multi-value data while preserving a difference between an input image density and an output image density or the like by an error diffusion method or the like.
2. Related Background Art
Hitherto, an error diffusion method is known as a pseudo half tone process for expressing input multi-value data by multi-values of levels smaller than those of binary or input multi-value data. The error diffusion method has been proposed in "An Adaptive Algorithm for Spatial Gray Scale", the Society for Information Display 1975 Symposium Digest of Technical Papers, 36, 1975. According to the above method, when it is assumed that a target pixel is set to (P) and a density of the pixel is equal to (v) and the densities of non-binarized pixels P0, P1, P2, and P3 around the point (P) are equal to v0, v1, v2, and v3, and a threshold for binarization is set to (T), a binarization error (E) at the target point (P) is weighted by coefficients W0, W1, W2, and W3 which were experientially obtained, and the resultant weighted errors are allocated to the peripheral pixels P0, P1, P2, and P3, thereby equalizing the average density of an output image with the density of the input image in a macro manner. In this instance, when output binary data assumes (o), errors E0, E1, E2, and E3 for the peripheral pixels P0, P1, P2, and P3 can be obtained by the following equations. EQU When v.gtoreq.T, o=1, E=v-Vmax EQU When v&lt;T, o=0, E=v-Vmin (equation 1)
(where, Vmax: maximum density, Vmin: minimum density) EQU E0=E.times.W0 EQU E1=E.times.W1 EQU E2=E.times.W2 EQU E3=E.times.W3
(Example of the weight coefficients: W0=7/16, W1=1/16, W2=5/16, W3=3/16)
When the above method is realized by a logic circuit, however, as will be understood from the above-mentioned example, there are drawbacks such that since a multiplier and a divider are necessary for every weight coefficient, the circuit scale is large, and that when an integer arithmetic operation is executed, the average density of the output image is not equal to the density of the input image because of a round error [E-(E0+E1+E2+E3)].
As a method to solve such drawbacks, methods of reducing the circuit scale by using a shift register in place of the multiplier and divider by setting into a fraction of the power of 2 of the weight coefficient have been disclosed in the Official Gazettes of Japanese Patent Application Laid-open Nos. 58-215169, 61-52073, and 61-293068. A method such that a value of a preliminarily weighted binary error is determined for every value of density information and the sum of the values is equalized to the binary error, thereby simplifying the multiplication and division and eliminating a round error has also been proposed in Japanese Patent Application Laid-open No. 63-35074.
A method of equalizing the average density of an output image to the density of an input image by adding a round error to the weighted peripheral pixels has also been proposed in Japanese Patent Application Laid-open No. 63-155950.
The above method of using the shift register, however, has a drawback such that the weight coefficient is fixed to the fraction of the power of 2, so that a flexibility is small. In the method in which the value of the preliminarily weighted binary error is decided and the round error is added into the error which is distributed to the weighted peripheral pixels so as to equalize the total of the above values with the binary error, the average density of the output image is equal to the density of the input image. Since integer arithmetic operation is performed, however, the value of the round error itself is equal to 0 or is larger than at least 1, so that there is a drawback such that the picture quality deteriorates by the distribution of the round error in the highlighted portion which is easily influenced by the error.
Hitherto, a method of quantizing input multi-value data to data of three levels or more by using an error diffusion method is also known. In case of using such a method in an ink jet printer or the like which expresses a pseudo gradation by using a plurality of inks having the same hue and different densities, as shown in FIG. 6, it is necessary that the input image data is once inputted to look-up tables (LUTs) 15-0, 15-1, . . . , and 15-N corresponding to the respective inks, and the densities are corrected and, after that, the data is inputted to binary processing circuits 16-0, 16-1, . . . , 16-N, and a binarization process is executed to each ink. There is, consequently, a drawback such that when the number of kinds of inks increases, an amount of processes increases by an amount corresponding to the number of inks and the processing circuit is also enlarged in proportion to it. Further, there is a similar drawback in case of using those methods in recording means having the same kind of ink and a resolution of (N) times in the main scanning direction, recording means having the same resolution for recording twice at the same dot recording position, further, a multi-droplet method of recording by changing the dot diameter of the ink, or the like.