Image processing apparatus

Abstract: An image processing apparatus including an input circuit (12) for receiving image data, a binarizing unit (14) for binarizing a subject pixel of the image data supplied from the input circuit (12), an error detector (16) for detecting an error between a binarized image data obtained by the binarizing unit (14) and the image data, an error diffusing circuit (20, 22, 24) for diffusing the error on other image data associated with other pixels around the subject pixel, a compensating unit (10) for compensating the image data of the subject pixel by using a compensation data which is caused by a previous error diffusion of the diffusing circuit (20, 22, 24), a circuit (26, 32, 34) for detecting an image density of the image data for a prescribed image area surrounding the subject pixel and a controller (30) for controlling the compensating unit (10) in response to the image density detected by the detecting circuit (26, 32, 34).

Description: The present invention relates generally to an image processing apparatus, and more particularly, to an image processing apparatus for processing both continuous-tone images and two-tone images in a digital manner. Various conventional digital image processing apparatus are already known. In an image processing apparatus, it is relatively simple to binarize two-tone images, such as coded data images, two-tone graphic images and character images, i.e. to reduce it to a series of binary values with reference to a prescribed threshold value. Generally, such a system is called as a simple binarization system. However, it is rather difficult to binarize continuous-tone images, such as photograph images. Thus, many techniques or systems for binarizing such continuous-tone images, e.g., a quasi-gradation system such as the so-called "dither" system, have been proposed. The dither system operates to minimise distortion of image data. However, binarization systems for two-tone images and continuous-tone graphic images (the images will be referred to as character images and graphic images, hereafter) are mutually incompatible. That is, the gradation of such images deteriorates when a simple binarization system is employed. On the other hand, the resolution of character images deteriorates when the quasi gradation system is employed. Thus, in the practical apparatus the two systems are selectively employed by a manual selection. However, either one of the character image or the photographic image is inevitably damaged when the character image and the photograph image are mixed on the same document. To solve the problem, an Error Diffusion System has been proposed in the article "An Adaptive Algorithm for Spatial Grey Scale" in the magazine title "Proceeding of the S.I.D.", Vol. 17/2 Second Quarter 1976, pp. 75-77. This system makes the requirements of the gradation of the photograph image and the resolution of the character image more compatible. That is, according to the Error Diffusion System binarization errors occurring in the binarizing process of every pixel which is currently processed (the currently processed pixel will be referred as to subject pixel hereafter) are diffused on other pixels around the subject pixel after the binarization errors have been multiplied with a predetermined weighting factor. However, the Error Diffusion System still has a problem that when continuous-tone images and two-tone images are present on the same document, the resolution of the two-tone images is somewhat reduced. JP-A-63 288 566 suggests using a larger error diffusion matrix for continuous tone images than for two tone images. The present invention therefore seeks to provide an image processing apparatus which is capable of satisfying the binarization requirements of both continuous-tone images and two-tone images. The present invention also seeks to provide an image processing apparatus which is capable of improving efficiency of the binarization process for both the continuous-tone images and the two-tone images. An image processing apparatus according to the present invention accordingly comprises: means for receiving image data: means for compensating the image data for the subject pixel supplied from the receiving means by using compensation data: means for binarizing a subject pixel of the image data supplied from the compensating means: means for detecting the error between the binarized image data obtained by the binarizing means and the image data supplied from the receiving means: means for diffusing the error on other image data associated with other pixels around the subject pixel, the diffused error being supplied to the compensating means as compensation data; and means for discriminating whether the subject pixel is character data or graphics data, characterised in that the apparatus further comprises: gate means, arranged between the diffusing means and the compensating means, for selectively passing the compensation data to the compensating means in response to the discrimination result of the discriminating means, the gate means allowing the compensation data to be passed through when the subject pixel, is graphics data while prohibiting the compensation data to be passed through when the subject pixel is character data. For a better understanding of the present invention and many of the attendant advantages thereof reference will be now made by way of example to the accompanying drawings, wherein: FIGURE 1 is a diagram showing a first embodiment of the image processing apparatus according to the present invention; FIGURE 2 is a block diagram showing the pixel density calculator in FIGURE 1; FIGURE 3 is a timing chart showing the operation of a pixel density calculator of FIGURE 2; and FIGURE 4 is a diagram showing a second embodiment of the image processing apparatus according to the present invention. The present invention will be described in detail with reference to the FIGURES 1 through 4. Throughout drawings, like or equivalent reference numerals or letters will be used to designate like or equivalent elements for simplicity of explanation. Referring now to FIGURE 1, a first embodiment of the image processing apparatus according to the present invention and its binarizing operation will be described in detail. In FIGURE 1, an image data D1 of the subject pixel is applied to a line buffer memory 26 through an input terminal 12. The image data D1 is read by an image reader (not shown) such as an image scanner. The line buffer memory 26 has memory areas for storing image data of pixels which are successively read. The area marked by * indicates a memory position for storing the image data of the subject pixel which is currently being processed. The image data stored in the line buffer memory 26 is then applied to a compensator 10 through a delay unit 28. The operation of the delay unit 28 will be described below. The compensator 10 compensates the image data D1 by summing the input image data D1 with compensation data D2 which is applied to another input of the compensator 10. The compensation data D2 will be described later. compensated image data D3 output from the compensator 10 is applied to a binarizing unit 14 and a binarization error detector 16. The binarizing unit 14 is typically constituted by a comparator to which a first threshold voltage Th1 is also applied. Thus, the binarizing unit 14 binarizes the compensated image data D3 by comparing the compensated image data D3 with the first threshold voltage Th1. A binarized image data D4 output from the binarizing unit 14 is applied to the binarization error detector 16. The binarization error detector 16 is typically constituted by a subtractor. Thus, the binarization error detector 16 detects an error between the compensated image data D3 and the binarized image data D4 by subtracting the data D3 and D4 from each other. The error is output from the binarization error detector 16 as a binarization error data D5. That is, the binarization error data D5 is obtained according to the following equation: D5 = D3 - D4 This binarization error data D5 is applied to a weighting unit 20. The weighting unit 20 is typically constituted by a multiplier to which weighting factor store 22 is coupled. The weighting factor store 22 is typically constituted by a ROM (Read Only Memory). Some of the areas marked by A, B, C and D in the weighting factor storage 22 indicate positional relationships between a reference position associated with the subject pixel and memory positions which store weighting factors associated for four pixels in the neighbourhood of the subject pixel in the direction that follows the subject pixel. Here, we assume that the marks A, B, C and D represent the respective weighting factors stored in the memory positions. The four weighting factors A, B, C and D are exemplarily defined as that A = 7/16, B = 1/6, C = 5/16 and D = 3/16. The weighting factors A, B, C and D are applied to the weighting unit 20. The weighting unit 20 then applies the data D5. That is, the weighting factors A, B, C and D are individually multiplied with the binarization error data D5. Thus, the weighted error data D6 consists of following four data elements e A , e B , e C and e D which are calculated by the following equations: e A = A x D5 e B = B x D5 e C = C x D5 e D = D x D5 Alternatively, these four elements can be obtained by a following method. Any one of four elements, e.g., e D thus can be obtained by subtraction as follows, based on other three elements, i.e., the e A , e B and e C and e D after the three elements were obtained according to the equations (2), (3) and (4); e D = D5 - (e A + e B + e C ) Weighted error data D6 consisting of four elements e A , e B , e C and e D is output from the weighting unit 20. The weighted error data D6 is applied to a compensation data storage 24. The compensation data storage 24 is typically constituted by an accumulator (not shown) and a RAM (Random Access Memory). The compensation data storage 24 has areas for storing the compensation data D2, as described above. Some of the areas marked by *, c A , c B , c C and c D indicate memory positions which store compensation data associated for the subject pixel and its four neighbors in pixels which follow the subject pixel. Here, we assume that the marks *, C A , C B , C C and C D represent data stored in the memory positions. When the weighted error data D6 is applied to the compensation data storage 24, the accumulator accumulates the four elements e A , e B , e C and e D on the data c A , c B , c C and c D . The accumulated data are again stored in the weighted error data D6. Thus, the previously stored data c A , c B c C and c D are updated to the accumulated data in every time that the weighted error data D6 is applied, according to the following equations; c A = c A + e A c B = c B + e B c C = c C + e C c D = c D + e D These accumulations of the weighted error data D6 are repeated for every subject pixel. Thus the data * stored in the memory position associated to the subject pixel takes a resulted data of continuous accumulations carried out for four previously processed pixels. In other words the data * in the compensation data storage 24 is reflected by binarizing errors of the four previously processed pixels. The data * in the compensation data storage 24 is read as the above-mentioned compensation data D2 and then applied to a gate 30 which will be described in detail later. The line buffer memory 26 is also coupled to an image density detector 32. The image density detector 32 detects the image density at a prescribed image area surrounding the subject pixel *, e.g., the image area consisting of "4 × 4" pixels as shown by oblique line zone in the line buffer memory 26. An image density data D7 detected by the image density detector 32 is applied to a comparator 34. The comparator 34 compares the image density data D7 with a second threshold voltage Th2. Generally the image density data D7 takes a relatively large value when continuous-tone images such as photograph images are processed. On the other hand, the image density data D7 takes a relatively small value when two-tone images such as character images are processed. The comparator 34 then outputs a discrimination data D8 which changes between "1" and "0", in response to the process of photograph images or character images. The discrimination data D8 output from the comparator 34 is applied to the control terminal of the gate 30. When the discrimination data D8 is "1" thus discriminating photograph images, the gate 30 allows the compensation data D2 to pass therethrough. Then, the compensation data D2 from the compensation data storage 24 is applied to the compensator 10. On the other hand, when the discrimination data D8 is "0" thus discriminating character images, the gate 30 prohibits the compensation data D2 to pass therethrough. Accordingly, the compensation data D2 is selectively applied to the compensator 10 in response to whether the continuous-tone images such as photograph images are processed of the two-tone images such as the character images are processed. The discrimination is automatically carried out. The above-mentioned delay unit 28 delays the image data D1 for a prescribed period. Thus, the image data D1 is applied to the compensator 10 in synchronism with the compensation data D2 which is also applied to the compensator 10 through the gate 30. Thus, it is possible to prevent the resolution of the character images from deterioration due to the application of the compensation data D2. Referring now to FIGURES 2 and 3, an example of the image density detector 32 will be described in detail. FIGURE 2 shows the detail of the image density detector 32. FIGURE 3 shows a timing chart for explaining the operation of the image density detector 32. This example of the image density detector 32 obtains the above-mentioned discrimination data D8 by detecting pixels with maximum and minimum values within a prescribed image area surrounding the subject pixel *, e.g., the image area consisting of "4 × 4" pixels (see FIGURE 1). In FIGURE 3, all the image data stored in the line buffer memory 26 in association with the image area consisting of "4 × 4" pixels are consecutively applied to a distributor 32a in synchronism with a clock signal CLK (see FIGURE 3). We assume that each image data has a bit size of 8 bit/pixel. First, a set of four image data items associated with four pixels along the row direction, e.g., four image data associated with the pixels along the first row of the "4 × 4" matrix (see FIGURE 1) are applied to the distributor 32a through its first input terminal I0. The distributor 32a distributes the first set of the image data to a first comparator 32b through its output terminals A0, A1, A2 and A3. The distributing operation of the distributor 32a is managed by two control signals SE1 and SE2. These two control signals SE1 and SE2 are generated from the clock signal CLK by a 2-bit counter 32c. The first set of the four image data along the row direction are compared with each other in the first comparator 32b. Thus, the first comparator 32b outputs the maximum value and the minimum value in the first set of the four image data through its output terminals MAXb and MINb, respectively. Similarly, second, third and fourth sets of four image data which are associated with the pixels along the second, third and fourth rows of the "4 × 4" matrix are applied to the distributor 32a through its second, third and fourth input terminals I1, I2 and I3. These three sets of image data are consecutively distributed to second, third and fourth comparators 32d, 32e and 32f following the first set of the image data, respectively, Each of the comparators 32d, 32e and 32f also outputs the maximum value and the minimum value in the second, third or fourth set of the four image data. All of the maximum values output from the first through fourth comparators 32b, 32d, 32e and 32f are applied to a fifth comparator 32g at the timing of FTR1 (see FIGURE 3). Thus, the fifth comparator 32g outputs the maximum value in the maximum values applied thereto through its output terminal MAXg. On the other hand, all of the minimum values output from the first through fourth comparators 32b, 32d, 32e and 32f are applied to a sixth comparator 32h at the timing of FTR1 (see FIGURE 3). Thus, the sixth comparator 32h outputs the minimum value in the minimum values applied thereto through its output terminal MINh. The maximum value and the minimum value output from the fifth and sixth comparators 32g and 32h represent the maximum density Dmax and the minimum density Dmin of the image in the "4 × 4" matrix. The maximum value Dmax and the minimum value Dmin output from the fifth and sixth comparators 32g and 32h are applied to a subtractor 32i. The subtractor 32i subtracts the minimum density Dmin from the maximum density, Dmax Thus the difference between the maximum value Dmax and the minimum value Dmin, which represents the maximum density difference ΔDmax of the image in the "4 × 4" matrix is obtained by the subtractor 32i, according to the following equation: ΔDmax = Dmax - Dmin The maximum density difference ΔDmax is applied to the comparator 34 as the above-mentioned image density data D7. Using the first embodiment of the image processing apparatus according to the present invention, it is possible to binarize only continuous-tone images such as the photograph images by automatically detecting these continuous-tone images. Accordingly, it is possible to prevent the resolution of two-tone images such as character images from deteriorating due to the two-tone images being evenly binarized. Thus, even if continuous-tone images and the two-tone images are mixedly presented on a same document it is possible to suitably process the different types of images in response to the image density of the images. In the first embodiment, various data such as the image data D1 through D6 are provided for processing in every pixel. However, the data can be provided for processing an image ranging in the matrix of "N x N" pixels (N represents an integer more than 2). According to this modification, the image processing speed an be increased. Further, although the maximum density difference ΔDmax is used to distinguish continuous-tone images from two-tone images in the above embodiment, special pixel density data which has a different nature for a photograph part and a character part, such as a standardized maximum density difference, that is, a value obtained by dividing maximum density difference with a mean density or Laplacian value which is a secondary differential value of image, may be used. Referring now to FIGURE 4, a second embodiment of the image processing apparatus according to the present invention will be described. This embodiment of the image processing apparatus has a construction almost the same as the first embodiment except that the gate 30 in the first embodiment is replaced by a compensation data adjuster 36 and then the image density detector 32 is directly coupled to the compensation data adjuster 36 but does not pass through a comparator 34 as in the first embodiment. Accordingly, in regard to the second embodiment the compensation data adjuster 36 and its related portions will be described herein-below but other portions the same as those of the first embodiment will be omitted. In FIGURE 4, the compensation data adjuster 36 receives the compensation data D2 from the compensation data storage 24. Further, the compensation data adjuster 36 receives the image density data D7 from the image density detector 32. The compensation data adjuster 36 adjusts the compensation data D2 according to the image density data D7 from the image density detector 32. Thus, an adjusted compensation data D9 supplied is from the compensation data adjuster 36 to the compensator 10. The input image data D1 from the line buffer memory 26 is compensated at the compensator 10 by the adjusted compensation data D9 and then supplied to the binarizing unit 14. Now the calculation carried out in the compensation data adjuster 36 for obtaining the adjusted compensation data D9 will be described in detail. The compensation data adjuster 36 normalizes the image density data D7 from the image density detector 32, i.e., the maximum density difference ΔDmax. Thus, the maximum density difference ΔDmax ranges in "0" through "1". The compensation data adjuster 36 then calculates the adjusted compensation data D9 according to the following equation; D9 = D2 × (1 - (ΔDmax)norm) wherein (ΔDmax)norm represents the normalized data of the maximum density difference ΔDmax. The maximum density difference ΔDmax is large when two-tone images such as the character images is processed. Thus, the adjusted compensation data D9 takes a small value, as easily understood from the equation (12). On the other hand, the maximum density difference ΔDmax is small when the continuous-tone images such as photographic images are processed. Thus, the adjusted compensation data D9 takes a large value, as also understood from the equation (12). In the second embodiment, the adjusted compensation data D9 is applied to the compensator 10 for compensating the input image data D1 in place of the compensation data D2. Further, the adjusted compensation data D9 is a compensation data adjusted by the normalized data of the maximum density difference ΔDmax which varies in response to the image density. Thus, the adjusted compensation data D9 can be used for processing any kind of images. That is, the adjusted compensation data D9 can compensate image data of all kind of images including the continuous-tone images such as the photograph images and the two-tone images such as the character images. In the second embodiment, the adjusted compensation data D9 can be obtained in accordance with the following equation in place of the equation (12); D9 = D2/ΔDmax Furthermore, any other calculations are possible for obtaining the adjusted compensation data D9. For example, "maximum density difference/average density" or a Laplacian value representing a second order differentiation of image data can be used in the equations (12) and (13) in place of the "ΔDmax" and "(ΔDmax) norm". Further, although in the above embodiments the input image data are binarized by the binarizing unit 14, it is possible to code the input image data to multilevel image data by using a coding unit with multiple threshold voltages. Then, multilevel printers which are able to print continuous-tone images can be used to print the multilevel image data. Further, in this invention the detection of image density in the image density detector 32 is carried out by using an amount of optical reflections of image data. However, it is possible to convert the amount of optical reflections into a logarithm of its reciprocal and then use the converted data for detecting the image density. It is also possible to add a factor representing human visual characteristics into the conversion. As described above, the present invention can provide a greatly improved image processing apparatus capable of promoting picture quality by performing the binarization of image data corresponding to its image and furthermore, promoting process efficiency in various image processes by performing processes corresponding to pixel densities. While there have been illustrated and described what are at present considered to be preferred embodiments of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made, and equivalents may be substituted for elements thereof without departing from the true scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teaching of the present invention without departing from the central scope thereof. Therefore, it is intended that the present invention not be limited to the particular embodiment disclosed as the best mode contemplated for carrying out the present invention, but that the present invention include all embodiments falling within the scope of the appended claims. The foregoing description and the drawings are regarded by the applicant as including a variety of individually inventive concepts, some of which may lie partially or wholly outside the scope of some or all of the following claims. The fact that the applicant has chosen at the time of filing of the present application to restrict the claimed scope of protection in accordance with the following claims is not to be taken as a disclaimer or alternative inventive concepts that are included in the contents of the application and could be defined by claims differing in scope from the following claims, which different claims may be adopted subsequently during prosecution, for example for the purposes of a divisional application.

Claims: An image processing apparatus comprising: means (12) for receiving image data: means (10) for compensating the image data for the subject pixel supplied from the receiving means by using compensation data: means (14) for binarizing a subject pixel of the image data supplied from the compensating means (10): means (16) for detecting the error between the binarized image data obtained by the binarizing means (14) and the image data supplied from the receiving means (12): means (20, 22, 24) for diffusing the error on other image data associated with other pixels around the subject pixel, the diffused error being supplied to the compensating means (10) as compensation data; and means for discriminating whether the subject pixel is character data or graphics data, characterised in that the apparatus further comprises: gate means (30), arranged between the diffusing means and the compensating means, for selectively passing the compensation data to the compensating means in response to the discrimination result of the discriminating means, the gate means allowing the compensation data to be passed through when the subject pixel, is graphics data while prohibiting the compensation data to be passed through when the subject pixel is character data. An image processing apparatus of claim 1, wherein the error diffusing means comprises: a ROM (22) for storing a weighting factor for each of said other pixels: means (20) for individually weighting the error for each pixel in response to the corresponding weighting factor: and storage means (24) for accumulating weighted errors in successive operations of the weighting means and supplying the accumulated weighted errors as compensation data. An image processing apparatus according to claim 2, wherein the gate means (30) is arranged between the compensating means (10) and the storage means (24). Image processing apparatus according to any preceding claim, wherein the discrimination means includes means (32, 34) for detecting the density of the image and generating a discrimination signal which changes in response to a continuous-tone image or a two-tone image. Image processing apparatus of claim 4, wherein the image density detecting means comprises means (32) for detecting the maximum difference of pixels. A method of operating an image processing apparatus, comprising the steps of: receiving image data: compensating the received image data by applying stored compensation data: binarizing a subject pixel of the compensated image data: detecting an error between the binarized image data obtained in the binarizing step and the image data: diffusing the error on other image data associated with other pixels around the subject pixel: supplying the diffused error as a compensation data: and selectively passing or prohibiting the compensation data in response to whether the subject pixel is graphics data or character data respectively.

Inventors: KANNO HIROKI, YONEDA HITOSHI, KANNO, HIROKI, YONEDA, HITOSHI, KANNO, HIROKI, C/O TOSHIBA CORPORATION, YONEDA, HITOSHI, C/O TOSHIBA CORPORATION
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1990
Main classification: H04N1
IPC codes: H04N1