Abstract:
An image processing apparatus capable of generating multivalue image data to be reproduced by a laser printer and the like as a hard copy having high visual quality. A first character/line drawing data is separated from an input multivalue image data to be subjected to an image data processing for removing jaggies appearing in curved or straight lines of characters and lines, and then is synthesized with a patter data having data indicative of edge directions to generate an output multivalue image data, so as to provide the hard copy having high visual quality.

Description:
BACKGROUND OF THE INVENTION 
     The invention relates to an image processing apparatus in which an input multivalue digital image (gray scale) data is subjected to an image processing to improve an image quality, and the processed data is then output through a laser beam printer or the like. 
     Laser beam printers using the xerography (electrophotography) technique are widely employed as a printer which outputs a bit map (binary digital image). In such printers, an input bit map image is subjected to an image processing so that jaggies (aliasing) appearing in curved or diagonal lines are reduced by improving resolution to a higher level than that of the input image, or changing the period of time in which a laser beam is turned on. 
     U.S. Pat. No. 4,437,122 discloses a method of improving resolution, in which an input bit map image is divided or segmented into blocks of 3×3 pixels, and a pattern matching is conducted so that the density of center pixels is converted into the nine-fold one, thereby reducing jaggies. 
     Published Unexamined Japanese Patent Application (Kokai) No. Hei-2-62260 discloses means for conducting logical arithmetic operation on 2 lines by 7 pixels, i.e., 14 pixels so that data of 600 dpi (dots/inch) are calculated from data of 300 dpi. 
     U.S. Pat. No. 4,847,641 discloses a system of controlling the on period of a laser beam, in which binary image data are segmented into blocks of 9×11 pixels to be matched to a plurality of predetermined standard patterns. In the case where the data coincide with at least one of the standard patterns, the on period of a laser beam for printing center bits are controlled so as to reduce jaggies. 
     Recently, a pulse width modulation (PWM) system is employed in a digital copying machine to reproduce a half-tone image with high image quality. In the PWM system, as shown in FIG. 1, a D/A converter 1 converts multivalue digital image data into an analog signal, and a comparator 3 compares the converted analog signal with a reference triangular-wave signal supplied from a triangular-wave generator 2 to controlling a laser beam. 
     FIG. 2 is a diagram showing waveforms at points  2!,  3! and  4! of FIG. 1 in case of employing the xerography (electrophotography) technique of the image writing type in which laser emission is turned on during the period of adhering toners on a sheet. The comparator 3 compares the analog image signal with the reference triangular wave, so that the laser beam is turned on only when the image signal is higher in level than the triangular wave. In order to attain multifunction also serving as a printer and a facsimile machine, the digital copying machine is provided with an external interface in addition to the components for the copying function. A conventional laser printer merely reproduces a binary image, and therefore a half-tone portion is once converted into a pseudo half-tone portion by either an error diffusion method or a dither method and the converted data is then transmitted to the printer. In contrast, with a multifunction machine using a digital copying machine, multivalue data can be transmitted directly to a printing unit. 
     SUMMARY OF THE INVENTION 
     In the above-mentioned conventional system of reducing jaggies which appear in curved or diagonal lines, however, bit map (binary) image data are processed as an input data. Hence, these systems are not suitable for an image processing apparatus which processes multivalue digital image (gray scale) data. According to the data format of the multivalue digital image (gray scale) data, each of data which represents one pixel includes several bits indicative of density information. With the conventional system, jaggies are prevented from occurring in reproduced images by way of either subjecting the input bit map image data to pattern matching or logical arithmetic operation in order to improve image resolution, or controlling timing of turning on and off a lazer device. 
     Accordingly, it is an object of the present invention to provide an image processing apparatus capable of reducing jaggies which occur in not only a bit map image but also a multivalue digital image which is reproduced by subjecting input multivalue digital image (gray scale) data to image data processing. 
     The above, and other objects of the present invention is accomplished by the provision of an image processing apparatus comprising means for separating multivalue image data into first character/line drawing data, and first pattern data which are multivalue data other than the first character/line drawing data; means for subjecting the first character/line drawing data to an image processing of improving visual quality of reproduction image of character/line to generate second character/line drawing data; means for detecting edge directions of pixels from the first pattern data to add data indicative of the edge directions to the first pattern data thereby generating second pattern data; and means for synthesizing the second character/line drawing data with the second pattern data to generate second multivalue image data. 
     With respect to image data written by a page description language, an attribute indicating whether the corresponding pixel is a character or line drawing or not can be known during the process of expanding the page description language into raster image data. Accordingly, the first character/line drawing data may be selected from the multivalue image data in response to an input signal indicative of the attribute of pixels of the multivalue image signal, when the image data is of the page description language data. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the accompanying drawings: 
     FIG. 1 is a block diagram of a pulse width modulation type screen generator; 
     FIG. 2 is a diagram showing waveforms at points  2!,  3! and  4! of the screen generator shown in FIG. 1; 
     FIG. 3 is a block diagram showing the whole of a first embodiment of the present invention; 
     FIG. 4 is a block diagram of an edge detecting unit of the first embodiment; 
     FIG. 5 is an explanatory diagram illustrating the data format of multivalue image data and an edge direction flag; 
     FIG. 6 is a block diagram showing the edge detecting unit of the first embodiment; 
     FIGS. 7A and 7B are explanatory diagrams for the direction of an edge; 
     FIG. 8 is an explanatory table showing the meaning of an edge direction flag; 
     FIG. 9 is a block diagram of a pattern matching unit of the first embodiment; 
     FIG. 10 is a diagram illustrating a binarizing unit of the first embodiment; 
     FIG. 11 is a diagram illustrating a pattern matching unit of the first embodiment; 
     FIG. 12 is a diagram showing patterns used in pattern matching in the first embodiment; 
     FIG. 13 is also a diagram showing patterns used in pattern matching in the first embodiment; 
     FIG. 14 is a diagram illustrating a synthesizing unit of the first embodiment; 
     FIG. 15 is a block diagram of a waveform control screen generator; 
     FIG. 16 is a diagram illustrating triangular waves generated by the waveform control screen generator; 
     FIG. 17 is an explanatory table showing the meaning of an edge direction flag; 
     FIG. 18 is a diagram illustrating a laser control signal according to the invention; 
     FIG. 19 is a diagram illustrating a laser control signal according to the invention; 
     FIG. 20 is a diagram illustrating a laser control signal according to the invention; 
     FIG. 21 is a diagram illustrating a laser control signal according to the invention; 
     FIG. 22 is a block diagram showing the whole of a second embodiment; 
     FIG. 23 is a diagram illustrating an attribute flag in the second embodiment; 
     FIG. 24 is a block diagram of a pattern matching unit of the second embodiment; 
     FIG. 25 is a block diagram of the pattern matching unit of the second embodiment; 
     FIG. 26 is a diagram showing patterns used in pattern matching in the second embodiment; 
     FIG. 27 is a diagram showing patterns used in pattern matching in the second embodiment; 
     FIG. 28 is a diagram illustrating a multiplication coefficient used in the second embodiment; and 
     FIG. 29 is a diagram illustrating a synthesizing unit of the second embodiment. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Hereinafter, an image processing apparatus of the present invention such as a laser beam printer will be described in detail with reference to drawings. 
     First, data and signals used in the embodiment will be described. It is assumed that image data have gray scales of 8 bits and are quantized in such a manner that the density is increased with a larger value. Specifically, &#34;0&#34; indicates &#34;white&#34;, and &#34;255&#34; indicates &#34;black&#34;. In the following, description is made on multivalue black-and-white data. In the case of color image data, generally, data of one pixel are expressed by plural components such as &#34;red (R), blue (B), and green (G)&#34;, &#34;magenta (M), cyan (C), and yellow (Y)&#34;, &#34;luminosity (L*), hue (H*), and chroma (C*)&#34;, or &#34;L* a* b*&#34;. In such a case, the embodiment described below are applied to each of the components.= 
     FIG. 3 is a block diagram showing a first embodiment of an image processing apparatus according to the present invention. Input image data are supplied to an edge detecting unit 101 and also to a binarizing unit 102. The multivalue data are binarized by the binarizing unit 102 and then supplied to a pattern matching unit 103. The edge detecting unit 101 detects an edge and its direction from the input multivalue image data, adds an edge direction flag to the image data, and outputs the resulting image data. The pattern matching unit 103 conducts &#34;binary to multivalue conversion&#34; by which jaggies of binarized data are reduced, and generates a flag indicative of the direction of an edge. A synthesizing unit 104 synthesizes the output of the edge detecting unit 101 with that of the pattern matching unit 103, and supplies the resulting image data and the edge direction flag to a waveform control screen unit 105. The waveform control screen unit 105 generates an &#34;on/off&#34; signal for a laser beam, from the input image data and edge direction flag. 
     FIG. 4 shows the internal configuration of the edge detecting unit 101. Each of 1-line memories 106 and 107 is a memory which can store one line of image data, and conducts a blocking process for performing the spatial filtering process on input image data. A 3×3 filtering unit 108 conducts the filtering process on the blocked image data, detects of an edge direction of the image data, and outputs an edge direction flag of 2 bits. A delaying unit 109 synchronizes the input image data with the edge direction flag output from the 3×3 filtering unit 108. An edge signal adding unit 110 synthesizes an 8-bit image signal output from the delaying unit 109 with the 2-bit edge direction flag output from the 3×3 filtering unit 108, and outputs the synthesized 10-bit signal. In the output signal of the edge signal adding unit 110, as shown in FIG. 5, significant 2 bits of the 10 bits constitute a flag indicative of an edge direction, and least 8 bits thereof are image data. 
     Next, the 3×3 filtering unit 108 will be described in more detail with reference to FIG. 6. The input image data are segmented into blocks of 3×3 pixels with setting a pixel to be enhanced at the center. A blocked image 115 is subjected to convolutions with using four kinds of coefficients 116, 117, 118 and 119. The results of the convolutions are set to be four kinds of edge signals EG-1, EG-2, EG-3 and EG-4, respectively. In a maximum-edge detecting, unit 121, the absolute values of the four edge signals EG-1, EG-2, EG-3 and EG-4 is obtained. The maximum one of the four absolute values is supplied to an edge canceling unit 122, and the number (one of 1 to 4) of the edge signal having the maximum absolute value is supplied to an edge-direction flag generating unit 120. Supplied to the edge-direction flag generating unit 120 are the four edge signals EG-1, EG-2, EG-3 and EG-4, and the maximum-edge number output from the maximum-edge detecting unit 121. In accordance with the maximum-edge number, one of the four edge signals EG-1, EG-2, EG-3 and EG-4 is selected, and the edge direction is determined depending on the sign (positive or negative) of the selected edge signal to form the 2-bit edge-direction flag. When the maximum-edge number is &#34;2&#34; and the value of the edge signal EG-2 is &#34;positive&#34;, for example, the edge direction of a pixel to be enhanced is &#34;left&#34;. In the case where the density is decreased in the direction directed from the upper portion to the lower portion as shown in FIG. 7A is called as &#34;upward edge&#34;, and in the case where the density is decreased in the direction directed from the left portion to the right portion as shown in FIG. 7B is called &#34;leftward edge&#34;. As shown in FIG. 8, &#34;00&#34; of the 2-bit edge direction flag indicates edgeless, &#34;01&#34; indicates an upward or downward edge, &#34;10&#34; indicates a rightward edge, and &#34;11&#34; indicates a leftward edge. 
     As described above, in the edge-direction flag generating unit 120, the edge direction flag having one of &#34;01&#34;, &#34;10&#34; and &#34;11&#34; is generated for each of the all pixels. When the maximum-edge absolute value output from the maximum-edge detecting unit 121 is not greater than a fixed certain value, the edge canceling unit 122 resets the edge direction flag to &#34;00&#34;. 
     FIG. 9 is a block diagram illustrating the internal configuration of the pattern matching unit 103. As shown in FIG. 10, the binarizing unit 102 outputs &#34;1&#34; when the input image data is &#34;255&#34;, and &#34;0&#34; when the input image data is &#34;less than 255&#34;. The 1-bit signal generated by the binarizing unit 102 is blocked by using 1-line memories 112 and 113, and then supplied to a 3×3 pattern matching unit 114. 
     FIG. 11 is a diagram illustrating in more detail the 3×3 pattern matching unit 114. Data of 9 pixels which have been segmented into a 3×3 block by using 1-line memories 112 and 113 with setting a pixel to be enhanced at the center are coupled to addresses of a ROM 111 for a look-up table, respectively. The look-up table 111 is set so that, in the case of a pattern other than patterns shown in FIGS. 12 and 13, the image data &#34;0&#34; and the edge direction flag &#34;00&#34; are output when the value of the pixel to be enhanced &#34;e&#34; is &#34;0&#34;, and the image data &#34;255&#34; and the edge direction flag &#34;00&#34; are output when the value of the pixel to be enhanced &#34;e&#34; is &#34;1&#34;. In the case of the patterns shown in FIGS. 12 and 13, the image data and the edge direction flag shown in the tables are output, or output as the 10-bit data having the format shown in FIG. 5. 
     In the pattern matching unit 103, the continuity of the density of &#34;255&#34; in the multivalue image data attains the effect that, when pixels of the density of &#34;255&#34; are continuous in a diagonal direction, jaggies in that portion are reduced. 
     FIG. 14 shows the internal configuration of the synthesizing unit 104. The synthesizing unit 104 is a unit which synthesizes the outputs of the edge detecting unit 101 and the pattern matching unit 103 with each other. The synthesis is conducted in the following logic. The image data of the pattern matching unit 103 are checked. When the image data supplied from the pattern matching unit 103 to the synthesizing unit 104 have a value of &#34;0&#34; or &#34;255&#34;, the image data and the edge direction flag which are supplied from the edge detecting unit 101 are set to be the output of the synthesizing unit 104. When the image data supplied from the pattern matching unit 103 to the synthesizing unit 104 have a value which is neither &#34;0&#34; nor &#34;255&#34;, the image data and the edge direction flag which are supplied from the pattern matching unit 103 are set to be the output of the synthesizing unit 104. As seen from the above, when the pattern matching unit 103 outputs data other than &#34;0&#34; and &#34;255&#34; or when pixels of the density of &#34;255&#34; in multivalue image data are continuous in a diagonal direction, the synthesizing unit 104 preferentially outputs pixel values which are generated in order to reduce jaggies in a diagonal direction. 
     In the waveform control screen unit 105, as shown in FIG. 15, the 8-bit multivalue image data supplied from the synthesizing unit 104 are converted into an analog value through a D/A converter 123, so as to be compared in a comparator 128 with a triangular wave which is selected by a selector 127 in accordance with the edge direction flag, thereby generating a laser control signal. 
     As shown in FIG. 16, the triangular waves selected by the selector 127 are triangular waves A and B which have a period two times as much as that of the pixel clock signal and are shifted in phase from each other by 180 deg., and a triangular wave C which has the same period as that of the pixel clock signal. 
     FIG. 17 shows relationships between the edge direction flag and selected triangular waves. When image data and edge direction flags such as those shown in FIG. 18 are supplied to the waveform control screen unit, the triangular waves shown in the lowest row in FIG. 18 are selected. FIG. 19 diagrammatically shows the laser control signal which is generated from the thus selected triangular waves. The laser printer of the embodiment is a so-called image writing type printer in which toner is attracted to areas of a photoconductor that are irradiated by a laser beam and the areas are output as a black image formed on a sheet. FIG. 20 shows the case where the image data shown in FIG. 18 are not subjected to the waveform control and the laser control signal is generated by using the triangular wave C which has the same period as that of the pixel clock signal. When the waveforms shown in FIGS. 19 and 20 are compared with each other, the followings will be seen. In FIG. 19 where the wave control is conducted, the laser control signal exists at the center portion in more concentrated manner whereas in FIG. 20, the laser beam-on signal is divided into three parts resulting degrading the quality of an image. In other words, a cleaner electronic latent image is formed on the photoconductor in the case of FIG. 19. As shown in FIG. 17, the triangular wave C which has the same period as that of the pixel clock signal is selected only when the edge direction flag indicative of the upward or downward edge direction is input in synchronization with the image signal. In the usual case of edgeless or when the edge direction flag is &#34;00&#34;, the triangular wave A which has a period two times as much as that of the pixel clock signal is selected. This means that, for example, a printer which can perform the printing of a pixel density of 400 dpi (dots/inch) produces an output image by using a line screen of 200 lpi (lines/inch). The reason of the above is as follows: The cases where the laser control signal is generated by using a triangular wave which has the same period as that of the pixel clock signal (see a part (a) of FIG. 21), and where the laser control signal is generated by using a triangular wave which has a period two times as much as that of the pixel clock signal (see a part (b) of FIG. 21) are considered. When a highlight portion having a low density is to be output, particularly, the laser beam-on period in the former case is much shorter than that in the latter case as shown in FIG. 21. When the laser beam illumination period is very short as described above, it may be difficult to form an electronic latent image on a photoconductor stably. Consequently, it is difficult to output the gray scale of image data faithfully. 
     In the above, the system of reducing jaggies when pixels of the density of &#34;255&#34; appear continuously in a diagonal direction of a multivalue original has been described. When character data are to be inserted into usual multivalue image data (for example, a photograph), in most cases, the character data are written at the maximum density. Therefore, the present system as described above is very effective in improving the image quality of a character/line drawing in multivalue image data. 
     A second embodiment of the invention will be described. A multivalue image data may be subjected to a processing of separating characters from patterns in advance. Thereafter, the image data and an attribute signal of each pixel are simultaneously supplied to an image processing apparatus. Further, when image data written by a page description language (PDL) are to be output, the attribute (character, line drawing, pattern, etc.) of each pixel can be detected during the process of expanding the page description language into raster image data. Accordingly, both the image data and an attribute signal of each pixel may be supplied to an image processing apparatus at once. The second embodiment is effective in the case where both image data and a 1-bit attribute flag indicating that the corresponding pixel is &#34;a character or line drawing&#34; are simultaneously input. 
     FIG. 22 is a block diagram showing the second embodiment of the invention. Input image data are supplied to an edge detecting unit 201 and a pattern matching unit 202, respectively. An attribute flag which is input at the same time with the image data is supplied to the pattern matching unit 202. The edge detecting unit 201 detects an edge and its direction from the input multivalue image data, and then adds an edge direction flag to the image data to be output. The pattern matching unit reduces jaggies of an edge of &#34;a character or line drawing&#34; of the image data, and further generates a flag indicative of the direction of the edge. A synthesizing unit 203 synthesizes the output of the edge detecting unit 201 with that of the pattern matching unit 202, and supplies the resulting image data and the edge direction flag to a waveform control screen unit 204. The waveform control screen unit 204 generates an &#34;on/off&#34; signal for a laser beam, in accordance with the input image data and edge direction flag. The edge detecting unit 201 and the waveform control screen unit 204 are identical to the edge detecting unit 101 and the waveform control screen unit 105 of the first embodiment, and therefore their description is omitted. 
     FIG. 23 is an explanatory table showing the meaning of the attribute flag which is supplied at the same time with image data to the image processing apparatus. A 1-bit flag as shown in FIG. 23 is added to all pixels of input multivalue image data. A pixel to which an attribute flag &#34;0&#34; is added is a pixel other than &#34;a character or line drawing&#34;, and a pixel to which an attribute flag &#34;1&#34; is added is &#34;a character or line drawing&#34;. 
     FIG. 24 is a diagram illustrating the internal configuration of the pattern matching unit 202. The input 1-bit attribute flag signal is subjected to the blocking process into blocks by using 1-line memories 205 and 206, and then supplied to a 3×3 pattern matching unit 207. The multivalue image data are delayed by a period for one line by a 1-line memory 209. A delaying unit 210 synchronizes the input image data with the data output from the 3×3 matching unit 207. The 3×3 pattern matching unit 207 outputs a multiplication coefficient which will be multiplied by the multivalue image data in a multiplying unit 211. The 3×3 matching unit 207 outputs also a 2-bit edge direction flag in synchronization with the multiplication coefficient. A delaying unit 208 synchronizes the edge direction flag with the output of the multiplying unit 211. 
     FIG. 25 is a diagram illustrating in more detail the 3×3 pattern matching unit 207. Data of 9 pixels which have been segmented into a 3×3 block by using 1-line memories 205 and 206 with setting an pixel to be enhanced at the center are coupled to addresses of a ROM 212 for a look-up table, respectively. The look-up table 212 is set so that, in the case of a pattern other than patterns shown in FIGS. 26 and 27, the multiplication coefficient &#34;0&#34; and the edge direction flag &#34;00&#34; are output when the value of the interested pixel &#34;e&#34; is &#34;0&#34;, and the multiplication coefficient &#34;1&#34; and the edge direction flag &#34;00&#34; are output when the value of the interested pixel &#34;e&#34; is &#34;1&#34;. In the case of the patterns shown in FIGS. 26 and 27, the multiplication coefficient and the edge direction flag shown in the tables are output. The multiplication coefficient consists of 8-bit data having the integer part of 1 bit and the fraction part of 7 bits. The edge direction flag consists of 2-bit data as shown in FIG. 8 in the same manner as the first embodiment. The multiplication coefficient output from the look-up table 212 is multiplied in the multiplying unit 211 by the multivalue image data output from the delaying unit 210, and then sent to the synthesizing unit 203. 
     FIG. 29 shows the internal configuration of the synthesizing unit 203. The synthesizing unit 203 is a unit which synthesizes the outputs of the edge detecting unit 201 and the pattern matching unit 202 with each other. The synthesis is conducted in the following logic. The edge direction flag of the pattern matching unit 202 is checked. When the edge direction flag supplied from the pattern matching unit 202 to the synthesizing unit 203 is &#34;00&#34;, the image data and the edge direction flag which are supplied from the edge detecting unit 201 are set to be the output of the synthesizing unit 203. When the edge direction flag supplied from the pattern matching unit 202 to the synthesizing unit 203 has a value which is not &#34;00&#34;, the image data and the edge direction flag which are supplied from the pattern matching unit 202 are set to be the output of the synthesizing unit 203. As seen from the above, the pattern matching unit 202 detects the continuity of the edge direction flag indicative of a &#34;character&#34; or &#34;line drawing&#34; by means of pattern matching, and the synthesizing unit 203 preferentially outputs pixel values which are generated in order to reduce jaggies in a diagonal direction. 
     In the two embodiments described above, the blocks used in the edge detection and pattern matching have a size of 3×3 in order to illustrate the spirit of the invention. The size is not restricted to this value, and larger blocks may be employed. Further, in the above description, the pattern matching unit uses a ROM as the look-up table. Alternatively, a RAM, or logic circuits such as AND and OR circuits may be replaced therefor. 
     As described in the two embodiments, multivalue image data input to the image processing apparatus are divided into character/line drawing data, and other data, and an image processing of removing jaggies appearing in curved or diagonal lines is conducted on the divided character/line drawing data, whereby jaggies in curved or diagonal lines can be reduced in a multivalue image.