Image processing apparatus

Abstract: An image processing apparatus includes a digital data output device (1, 2) for outputting bi-level image data, a bi-level processor (4) for converting the bi-level image data into multi-level (eg 8-bit) image data, a multi-level processor (4) for performing spatial filter processing with respect to the multi-level image data output from the bi-level processor, and a PWM circuit (5) for processing the multi-level image data output from the multi-level processor using a pattern signal of a predetermined cycle and generating a PWM signal.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an image processing apparatus for processing an image signal. Related Background Art In a conventional digital printer (bi-level printer), since an output is constituted by bi-level data corresponding to on/off of dots, input image data (8 bits) from an input system, e.g., a CCD, is bi-level processed by a dither method, and gradation of an original image is expressed by a matrix consisting of a plurality of pixels. However, in the dither method, a resolution is degraded if gradation is improved. For example, in order to reproduce 17 gray levels including white, a threshold value matrix consisting of 4 x 4 pixels is necessary, and in order to reproduce 65 gray levels, a threshold value matrix consisting of 8 x 8 pixels is necessary. Since an output image is represented in units of threshold value matrices, the resolution of a halftone image is degraded as the size of the threshold value matrix increases. When the systematic dither method is used, a threshold value is periodically repeated in units of threshold value matrices. For example, if a dot image is scanned, a difference between original image data and a threshold value periodically varies, and a low-frequency moiré pattern is formed in an output image resulting in a degraded image quality. An averaging error minimization method, wherein an error in an output pixel against original image data is compensated for the surrounding pixels so as to satisfactorily reproduce gradation of the original image data, has been proposed. This method is effective for eliminating moiré pattern. However, pixels are unnaturally connected, and a micro texture structure is formed, resulting in a poor reproduced image. This method is improved by a CAPIX method (General Meeting of Institute of Electronic Communication 5-212, 1985) having good character reproducibility. However, with this method, a micro texture structure is formed again. In the above-mentioned systematic dither method, an edge of the reproduced image, in particular, an inclined thin line, becomes a zigzag pattern. In the bi-level methods, original image data is compressed at high density in view of data volume. For example, if input image data has 8 bits per pixel, bi-level image data has 1 bit per pixel, resulting in 1/8 compression. Therefore, an image memory, an electronic file system, and the like for accumulating image data need only have a small capacity, and this is advantageous for communication for transferring image data. Thus, the above-mentioned techniques are indispensable for image processing. With recent improvements in a digital multi-level printer, an image having a higher quality than that obtainable with a conventional digital bi-level printer can be obtained. For this reason, image data which is once compressed to bi-level data by the conventional dither method must be recovered to multi-level data by multi-level processing. As described above, various methods for outputting an image including a halftone image by a digital printer have been proposed. Such methods include, e.g., the dither method, a density pattern method, and the like. These methods have the following advantages: (1) An image including a halftone image can be displayed using a bi-level display device. (2) The hardware arrangement of an apparatus is simple. (3) A satisfactory image quality can be obtained. For these advantages, the above methods are widely applied in various fields. More specifically, as shown in Figs. 7A and 7B, pixels (input pixel data) 28 of an input image are assigned to components of a threshold value matrix 25, and black or white is determined in accordance with whether the input pixel data is larger or small than the threshold value. The obtained result is output to a display screen 26. Fig. 7A is for explaining the dither method. One input pixel 28 is assigned to one component of the threshold value matrix 25. Fig. 7B is for explaining the density pattern method. One input pixel 28 is assigned to all the components of the threshold value matrix 25. More specifically, in the density pattern method, one pixel of an input image is displayed by a plurality of cells on the display screen 26. The dither method and the density pattern method are not essentially different from each other, except that one input pixel is assigned to one or all the pixels of the threshold value matrix. Of course, an intermediate method therebetween is present. For example, a method in which one input pixel is assigned to a plurality of components (four (2 x 2) components in Fig. 7B) of the threshold value matrix, has been proposed. Therefore, no essential difference is present between the above methods, and the dither method, the density pattern method, and an intermediate method will be called a dither method. In the dither methods, since an image output is produced as bi-level data, it is constituted only by white or black, i.e., "0" or "1", and it is impossible to control the density of an image. However, various image output apparatuses, e.g., a laser beam printer, an ink-jet printer, a CRT device, and the like, are used. In this case, these output apparatuses respectively have their unique output characteristics, and an output density may often vary using the same bi-level signal. For example, in a laser beam printer, on/off operation of a laser beam onto a photosensitive drum is controlled so as to form an electrostatic latent image, and the latent image is developed, thereby obtaining a visible image. In this case, the potential of a latent image changes in accordance with an ON time of the laser beam. The ON time and the potential have a nonlinear relationship, and the potential and a developing density also have a nonlinear relationship. Since the laser beam printer alone poses such many variation factors, outputs from different output apparatuses vary widely, and an output reproduced image is often considerably different from an expected one using the same bi-level signal. In particular, this is prominent when an image data bi-level processing means is provided only to a controller (e.g., a host computer) outside the output apparatus, and a plurality of output apparatuses reproduce an image in response to the same bi-level signal from the controller. This applies not only to the bi-level image signal, but also to a multi-level signal, e.g., a four-level signal, received from the controller. EP-A-024902 discloses apparatus and a method for converting one bit image data into a multi-level image data output which may be used in a subsequent printing process (which is not disclosed). It comprises parallel area integration and edge extraction filters, and an adder adding the two multi-bit outputs thereof to produce a multi-bit signal, which is then either halftone converted or used directly. IBM Technical Disclosure Bulletin, vol 20, NO 1, 30 June 1977, New York (US), pages 31-32, XP002010717 A.L.: "Gray scale to pseudo halftone conversion" discloses the conversion of gray scale to pseudo half tone by comparing a video signal with a high frequency waveform. In accordance with one aspect of the invention there is provided image processing apparatus as set out in claim 1. In accordance with a second aspect the invention provides an image processing method as set out in claim 9. There follows a description by way of example of various embodiments of the present invention, reference being made to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention; Fig. 2 is a diagram schematically showing a laser printer to which the present invention can be applied; Fig. 3 is a detailed block diagram of a multi-level processor 4; Fig. 4 is a detailed block diagram of a PWM circuit 5; Fig. 5 is a timing chart for explaining signal waveforms of respective portions of the PWM circuit shown in Fig. 4; Fig. 6 is a view showing a second embodiment of the present invention; Figs. 7A and 7B are views for explaining the principle of the conventional dither method and density pattern method; Fig. 8 is a block diagram showing the basic arrangement according to a third embodiment of the present invention; Fig. 9 is a circuit diagram of the third embodiment; Fig. 10 is a timing chart for explaining the operation of the third embodiment; Fig. 11 is a block diagram of an image output system according to a fourth embodiment of the present invention; Figs. 12 and 13 are graphs showing a density conversion characteristic in the third embodiment; Fig. 14 is a diagram showing an output section of a laser beam printer according to the third embodiment; Fig. 15 is a memory map of a look-up table; Fig. 16 is a system block diagram of an image processing apparatus according to a fifth embodiment of the present invention; Figs. 17a to 17d are views for explaining the dither method and the multi-level method; Figs. 18a and 18b are views for explaining a primary differentiation filter; Figs. 19a and 19b are views for explaining the operation of the primary differentiation filter for a bi-level image; Fig. 20 is a view showing how image data is extracted for the primary differentiation; Fig. 21 is a view showing an internal arrangement of a discriminator; Fig. 22 is an operation flow chart of discrimination processing according to a sixth embodiment of the present invention; and Fig. 23 is a system block diagram of the sixth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT : Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. (First Embodiment) Fig. 1 is a circuit diagram of an image processing apparatus according to a first embodiment of the present invention. Referring to Fig. 1, a digital data output device 1 A/D converts image data from a CCD sensor or a video camera (neither are shown), and outputs digital data of a predetermined number of bits (in this embodiment, 8 bits). A bi-level processor 2 performs halftone processing for 8-bit pixel data output from the output device 1 using the systematic dither method or the average error minimization method, and compressed it to data having 1 bit per pixel. A memory 3 comprising a RAM or an electronic file stores a predetermined volume of bi-level data (1-bit data) output from the bi-level processor 2. A multi-level processor 4 converts the bi-level data output from the memory 3 into multi-level data having 8 bits per pixel. The multi-level data output from the multi-level processor 4 is input to a PWM (pulse width modulation) circuit 5. The operation of this embodiment will now be described. Data consisting of 8 bits per pixel output from the output device 1 is converted to bi-level data consisting of 1 bit per pixel, and is stored in the memory 3. The bi-level data output from the memory 3 is input to the multi-level processor 4, and is converted again to multi-level data consisting of 8 bits per pixel. The converted data is then transferred to the PWM circuit 5. The PWM circuit 5 performs pulse width modulation processing for the input 8-bit pixel data, and outputs it to a terminal 39 as a PWM signal. Note that numbers on respective lines in Fig. 1 represent the numbers of bits, and this also applies to Figs. 3, 4, and 6. The multi-level processor 4 will be described in more detail. Fig. 3 is a detailed block diagram of the multi-level processor 4. As shown in Fig. 3, bi-level data of "0" (white) or "1" (black), which is output from the memory 3 and is input to a terminal 6, is converted to 8-bit data by an 8-bit converter 7. Data 0 → Data 00 Data 1 → Data FF The converted 8-bit data is sequentially stored in a buffer memory 8 consisting of two lines (when one line is used for a write mode, the other one is used for a read mode) or several lines. The data stored in the buffer memory 8 is read out and is subjected to spatial filter processing by a smoothing circuit 9. As a spatial filter, a one-dimensional or two-dimensional spatial filter can be used, and a weighted averaging filter, a Gaussian filter, or a composite filter for averaging and edge emphasis is preferable. The spatial filter can be selected from a plurality of filters in accordance with image data to be processed. If bi-level data input to the multi-level processor 4 is obtained by various algorithms, one of several spatial filters can be appropriately selected, so that optimal multi-level data can be obtained from any bi-level data. Multi-level data output from the smoothing circuit 9 is input to the PWM circuit 5 through a terminal 10. The PWM circuit 5 will now be described in detail. Fig. 4 is a detailed block diagram of the PWM circuit 5. The multi-level data output from the multi-level processor 4 is converted to an analog signal by a digital-to-analog (D/A) converter 11, and each pixel data is sequentially input to one input terminal of a comparator 12. A pattern signal generator 13 produces a triangular wave signal 56 in a given cycle, e.g., for each predetermined number of pixels of the digital data, and inputs it to the other input terminal of the comparator 12. Master clocks 52 generated from an oscillator (master clock generator) 15 are counted down to, e.g., a 1/4 cycle by a timing signal generator 14, so as to be converted to pixel clocks 51, in synchronism with an H-SYNC signal 55 which is generated from an H-SYNC signal generator 16 for each line. The pixel clocks 51 serve as transfer clocks of pixel data, and as latch timing clocks of the D/A converter 11. The image processing apparatus of this embodiment is applied to a laser beam printer. Therefore, the H-SYNC signal 55 corresponds to a known BD (beam detect) signal indicating a scan position of a beam. The comparator 12 compares levels of an analog image signal 53 and the triangular wave signal 56, and outputs a PWM signal 39. The PWM signal 39 is input to a modulator (e.g., a laser driver 40 shown in Fig. 2). A laser beam is turned on or off in accordance with the pulse width, and a halftone image is formed on a recording medium (a photosensitive drum 45 shown in Fig. 2). Fig. 5 is a timing chart for explaining signal waveforms in the respective portion of the multi-level processor 5 shown in Fig. 4. Referring to Fig. 5, the master clocks 52 correspond to outputs from the oscillator 15, and the BD signal 55 corresponds to the H-SYNC signal, as described above. The pixel clocks 51 are obtained by counting down the master clocks 52 by the timing signal generator 14. More specifically, the pixel clocks 51 are obtained by counting down the master clocks 52 to a 1/4 cycle by the timing signal generator 14 in synchronism with the H-SYNC signal. Screen clocks 54 are obtained by counting down the pixel clocks 51 to a 1/3 cycle by the timing signal generator 14. More specifically, each screen clock has a cycle corresponding to the total duration of three pixel clocks 51, and is synchronous with the BD signal. The screen clocks 54 serve as a sync signal for generating the triangular wave signal 56, and are input to a pattern signal generator 13. Digital data input to the terminal 10 is multi-level (8-bit) data obtained by the multi-level processor 4. An analog video signal 53 is image data which is D/A converted by the D/A converter 11. As can be seen from Fig. 5, each pixel data of analog level is generated in synchronism with the pixel clocks 51. As shown in Fig. 5, the higher the analog level becomes, the higher the density becomes. The triangular wave signal 56 as the output from the pattern signal generator 13 is generated in synchronism with the screen clocks 54 as indicated by the solid line of "INPUT TO COMPARATOR 12" in Fig. 5, and is input to the comparator 12. The broken line in Fig. 5 indicates image data which is converted to analog image data by the D/A converter 11. This analog image data is compared with the triangular wave signal 56 from the pattern signal generator 13 by the comparator 12, and is converted to pulse-width modulated bi-level data, as indicated as the PWM output 39. In signal processing in this embodiment, after the multi-level digital data 10 is temporarily converted to analog image data, the image data is compared with the triangular wave signal 56 having a predetermined cycle, thereby allowing almost continuous pulse-width modulation. Therefore, a high-gradation image output can be obtained. According to this embodiment, the screen clocks 54 synchronous with the H-SYNC signal 55 are generated using the master clocks 52 which have a frequency (e.g., a frequency 12 times that of the triangular wave signal) higher than the frequency of the sync signal for generating a pattern signal (e.g., the triangular wave signal). Therefore, drift of the pattern (triangular wave) signals 56 generated from the pattern signal generator 13 (e.g., deviation between the pattern signals for the first and second lines) can be 1/12 the pattern signal cycle. Therefore, since gradation information is pulse-width modulated using the pattern signals with less drift, a high-quality reproduced image can be obtained. As described above, 8-bit multi-level image data is converted to bi-level data and is stored in the memory 3, and 8-bit multi-level data is reproduced from the bi-level data read out from the memory 3 and is further pulse-width modulated. Thus, a high-quality reproduction output can be obtained using a small-capacity memory. Fig. 2 schematically shows a laser beam printer to which the present invention can be applied. Referring to Fig. 2, a terminal 39 receives the PWM signal shown in Fig. 1. The PWM signal input to the terminal 39 is input to the laser driver 40. The laser driver 40 drives a semiconductor laser 41 in accordance with the PWM signal, so as to modulate a beam. A light beam emitted from the semiconductor laser 41 is collimated by a collimator lens 42, and is deflected by a rotary polyhedral mirror 43. Then, the light beam is scanned on a photosensitive drum 45 by means of an f lens 44. An optical image formed on the photosensitive drum 45 forms an electrostatic latent image, and an image output is performed by a normal process as in a copying machine. A beam detector 57 detects the scanning position of the light beam, and the BD signal 55 is formed based on the output from the beam detector 57. Fig. 6 is a block diagram of an image processing apparatus according to a second embodiment of the present invention. The same reference numerals in Fig. 6 denote the same parts as in Fig. 1, and a detailed description thereof will be omitted. Fig. 6 shows a case wherein image data is transferred through a communication line as in a facsimile system, and is output through a printer. Image data (8 bits output from a digital data output device 1 is converted to bi-level data by a bi-level processor 2, and is input to an encoder 17. The encoder 17 compresses the input bi-level data and transfers it onto a communication line 18. The transferred data is converted to the bi-level data by a decoder 19 on the reception end, and is still converted to multi-level data (8 bits) by a multi-level processor 4. Thereafter, the multi-level data is converted to a substantially continuous PWM signal by a PWM circuit 5, as described above, and is output to a printer. With this arrangement, a data volume upon communication can be greatly reduced, and a high-resolution image signal can be transferred in a short period of time. On the reception end, the decoded bi-level data is converted to the multi-level data, and the multi-level data is output to the printer as the PWM signal. Therefore, a high-quality output can be obtained. In this embodiment, bi-level data (1 bit) is converted to multi-level data (8 bits). However, three-level data (2 bits) can be converted to multi-level data (8 bits). In this case, data "0" (white), "1/2" (gray), and "1" (black) are respectively converted to data "00", "80", and "FF" by the multi-level processor 4. In this case, the memory capacity is slightly increased. However, an output of higher quality can be obtained. As described above, input image data of predetermined number of bits is converted to bi-level data so as to store it in a memory or to transfer it through a communication line. Thereafter, the bi-level data is converted to multi-level data of a predetermined number of bits so as to produce a PWM signal, thereby obtaining an image output. Therefore, the following effects can be obtained. 1. Even if a memory capacity and a data volume upon communication are small, a high-quality output can be obtained. 2. Data which is converted to bi-level data by various algorithms can be processed, and an output of higher quality can be obtained. A third embodiment of the present invention will now be described. Fig. 8 shows the basic arrangement of the third embodiment. An image output system including an image output device according to the third embodiment shown in Fig. 8 comprises an image data output device 100 for outputting digital image data 101, and a plurality of image output devices 200,..., 201 which are connected to the image data output device 100, and output digital image data 100 as an image. The digital image data 101 is, for example, a bi-level signal. Each image output device has a multi-level converter 202 for converting the digital image data 101 into multi-level density data 202a, a density converter 203 for density-converting the multi-level density data 202a, a bi-level converter 204, for converting density-converted multi-level density data 203a into bi-level data, and the like. The image output devices 200 can be different output devices such as a laser beam printer, an ink-jet printer, and the like. With the above arrangement, even if the digital image data 101 is a bi-level signal which cannot represent a gradation density by one pixel, it is converted to the multi-level density data 203a first and then to bi-level data by the bi-level converter 204. Therefore, if the output devices 200 are different output devices, density control is enabled in the output devices so as to obtain a desired final output density. The image output device 200 shown in Fig. 8 has the arrangement when the present invention is applied to a laser beam printer. As described above, after the input digital image data 101 is subjected to conversion processing, such as multi-level conversion, density conversion, bi-level conversion, and the like, its bi-level signal is input to a laser driver 240, and a laser beam is focused on a photosensitive drum through an optical system 241. The multi-level conversion, density conversion, and the like will be described with reference to Figs. 9, 12, 13 and 15, and the bi-level conversion will be described with reference to Figs. 9 and 10. The optical system will be described with reference to Fig. 14. Note that the multi-level converter 202 shown in Fig. 8 corresponds to a multi-level processor 109 shown in Fig. 9, the density converter 203 corresponds to an LUT 113, and the bi-level converter 204 corresponds to a D/A converter 102, a comparator 104, and the like. The optical system 241 shown in Fig. 8 corresponds to a semiconductor laser 131, the collimator lens 132, and the like shown in Fig. 14. (Third Embodiment) Fig. 9 is a block diagram of processing for converting dither data into a PWM output signal 104a. Multi-level conversion of input digital image data (dither data 110) is performed by a multi-level processor 109, and density conversion is performed by the LUT 113. Note that dither data indicates an image signal which has been subjected to dither processing (halftone processing) in a broad sense, as described above, and is normally a bi-level signal. in this embodiment, bi-level conversion by a PWM (pulse-width modulation) method which has been filed by the present applicant (e.g., U.S.P. No. 765,938, filed on August 15, 1985 and the like) is adopted. (Multi-level Conversion and Density Conversion) A description will be made with reference to Fig. 9. Dither data (bi-level data) 110 which is data "0" or "1" is converted to 8-bit BCD indication multi-level data 109a by the multi-level processor 109 as follows: Data "0"→ Data "0" Data "1"→ Data "FF" Such conversion can be easily realized by, e.g., a ROM (Read-Only Memory). Thereafter, the 8-bit multi-level data 109a is input to the look-up table (LUT) 113 for density conversion, and is converted to the following 8-bit density correction data 113a. In this case, since the data indicate only two states of "00" and "FF", the data are converted to two arbitrary 8-bit data "A" and "B". Data "00"→Data "A" Data "FF"→Data "B" Since the bi-level dither data 110 is converted to the multi-level data in this manner, density conversion, i.e., density control is enabled, and is performed by the LUT 113 in accordance with desired density conversion characteristics. As will be described later, the density conversion characteristics are as shown in Fig. 12 or 13. These characteristics are selected in accordance with a select signal 115a from a select signal generator 115. Density conversion will be described later in more detail. (Bi-level Conversion) The output signal 113a from the LUT 113 is converted to analog data by a digital-to-analog (D/A) converter 102, and each analog pixel data is sequentially input to one input terminal of a comparator 104 one by one. A pattern signal generator 103 generates a pattern signal 103a having a triangular waveform in a cycle corresponding to a predetermined number of pixels of the dither data 110, and the pattern signal 103a is input to the other input terminal of the comparator 104. The waveform of the pattern signal can be a sine waveform, sawtooth waveform, and the like. In the laser beam printer of this embodiment, the pattern signal 103a preferably has the same cycle as the pixel width. However, for the sake of simplicity, the pattern signal 103a has a cycle corresponding to a three-pixel width, as shown in the timing chart of Fig. 10. The pattern signal 103a input to the comparator 104 will now be described. An oscillator (master clock generator) 105 produces master clocks 105a. The master clocks 105a are counted down to a 1/4 cycle in synchronism with an H-SYNC signal 114 for each line generated from an H-SYNC generator 114 so as to be converted to pixel clocks 107a. The pixel clocks 107a are used as transfer clocks for image data, and latch timing clocks for the D/A converter 102. Note that the H-SYNC signal can be internally generated or can be externally supplied. Since this embodiment is applied to the laser beam printer, the H-SYNC signal corresponds to a known beam detect (BD) signal. A timing signal generator 107 also produces screen clocks 107b. Each screen clock 107b has a cycle corresponding to an integer multiple of the master clock 105a. In this embodiment, the screen clock 107b has a cycle three times that of the pixel clock 107a. The screen clocks 107b are input to the pattern signal generator 103. The pattern signal generator 103 comprises an integrator consisting of a capacitor, a resistor, and the like, and produces the pattern signal 103a of, e.g., a triangular waveform. The comparator 104 compares the levels of the analog image signal 102a and the pattern signal 103a, and outputs a PWM signal 104a. The PWM signal 104a is input to a modulator for modulating a laser beam (e.g., a laser driver 240 shown in Fig. 8 or 14). The laser beam is turned on or off in accordance with the pulse width, and a halftone image is formed on a recording medium (a photosensitive drum 135 in Fig. 14). In this embodiment, the screen clocks 107b synchronous with the H-SYNC signal 114a are generated using the master clocks 105a which have a frequency (e.g., a frequency 12 times that of the triangular wave signal) higher than the frequency of the sync signal for generating a pattern signal (e.g., the triangular wave signal). Therefore, drift of the pattern (triangular wave) signals 103a generated from the pattern signal generator 103 (e.g., deviation between the pattern signals for first and second lines) can be 1/12 the pattern signal cycle. Therefore, since gradation information is pulse-width modulated using the pattern signals with less drift, a high-quality reproduced image can be obtained. Fig. 10 is for explaining signal waveforms of the respective portion in the apparatus shown in Fig. 9. Referring to Fig. 10, the master clocks 105a correspond to the outputs from the oscillator 105, and the BD signal 114a corresponds to the H-SYNC signal described above. The pixel clocks 107a are obtained by counting down the master clocks 105a from the oscillator 105 by the timing signal generator 107. The screen clocks 107b are obtained by the timing generator 107. The screen clocks 107b have a cycle corresponding to the total duration of three pixel clocks 107a. The screen clocks 107b are used for generating the pattern signal 103a, and are input to the pattern signal generator 103. Assume that data "10011" is input as the dither data 110. By the multi-level conversion, the resultant multi-level data 109a is (FF) H (00) H (00) H (FF) H (FF) H . Note that "( ) H " represents hexadecimal notation. Then, the digital density correction data 113a is converted to data "BAABB" by the LUT 113 in accordance with the above-mentioned density conversion. Data "00"→ Data "A" Data "FF"→ Data "B" The analog data 102a is image data which is D/A converted by the D/A converter 102. In this case, a high density value corresponds to data "B", and a low density value corresponds to data "A". As shown in Fig. 10, the higher the analog level becomes, the higher the density becomes. The pattern signal 103a as the output from the pattern signal generator 103 has a triangular waveform, as indicated by the solid line of "INPUT TO COMPARATOR 104" in Fig. 10, and is compared with the analog data 102a. The comparison result is pulse-width modulated bi-level data, and is the PWM output signal 104a. In this manner, the bi-level data 110 input to the image output device of this embodiment is subjectd to conversion processing to be converted to multi-level data. After density correction, the multi-level data can be converted to a desired pulse width. Therefore, density control can be performed by the output device. (Output) As shown in Fig. 14, the PWM output signal 104a drives the laser driver 240, and pulse-width modulates the semiconductor laser 131 to emit a laser beam. The laser beam emitted from the semiconductor laser 131 is collimated by the collimator lens 132, is deflected by a rotary multi-surface mirror 133, and is scanned on the photosensitive drum 135 by an f lens 134. An optical image formed on the photosensitive drum forms an electrostatic latent image, and an image output is performed by a normal process of a copying machine. In signal processing of this embodiment, dither data is temporarily converted to analog image data, and thereafter, the analog image data is compared with the triangular wave pattern signal 103a having a predetermined cycle, thereby allowing variable pulse-width modulation. Therefore, an image output whose density can be controlled can be obtained. (Image Output System) Fig. 11 shows the arrangement in which the present invention is applied to an image output system. Fig. 11 exemplifies a system for causing a plurality of printers (22A to 22D) to output an identical image in response to an output signal from a single controller (host computer) 21. The printers (22A to 22D) respectively comprise the above-mentioned image output devices. The controller 21 outputs identical dither data 110 to the printers. In this case, there is a problem of different output densities of the printers. More specifically, if setting conditions of the respective printers are different, and a maximum density value Dmax is different for each printer, output image densities differ with respect to identical data. In dither data itself, density control cannot be performed, and in a printer, a density is controlled by, e.g., setting a potential on the photosensitive drum 135. However, in the embodiment shown in Fig. 11, the output densities of the printers can be controlled by setting or adjusting the LUT 113 shown in Fig. 9. The density control characteristics are selected by select dials 120 of the respective image output devices (22A to 22D) shown in Fig. 11. One of the density correction characteristics shown in Figs. 12 and 13 is selected by the select dial 120. Each printer has a circuit as shown in Fig. 9. For example, the LUT 113 comprising, e.g., a ROM has a plurality of tables ( a to e ), as shown in Fig. 15. In Fig. 15, the table a is allocated from address (00) H to (FF) H , the table b is allocated from address (100) H to (1FF) H , the table c is allocated from address (200) H to (2FF) H , and the table d is allocated from address (300) H to (3FF) H ,.... Fig. 12 shows the density conversion characteristics obtained by the conversion tables of the LUT 113. The LUT 113 has conversion characteristics where the multi-level data 109a is plotted along the ordinate and the digital data 113a is plotted along the abscissa, as shown in Fig. 12. Referring back to Fig. 9, when an operator of the output devices (22A to 22D) operates the select dial 120 to select an appropriate density conversion characteristics, the select signal generator 115 produces the select signal 115a in accordance with the dial position. In Fig. 12, since five tables are provided, the select signal 115a can be a 3-bit signal. The LUT 113 receives the select signal as an upper address (an MSD address in Fig. 15), and the multi-level data 109a as a lower address, and outputs the digital data 113a in accordance with the table shown in Fig. 15. In this manner, when a desired curve is selected by the select dial of each printer, an output density can be maintained uniform. (Fourth Embodiment) In the above embodiment, the case of bi-level data input has been described. However, the circuit shown in Fig. 9 can process multi-level data input (three-level, four-level,...). In this case, the multi-level processor 109 receives "0", "1/2", and "1" in the case of, e.g., three-level data, and converts them as follows: Input "0"→ Output "00" Input "1/2"→ Output "7F" Input "1"→ Output "FF" The following processing can be performed in the same manner as in bi-level conversion. The LUT 113 can be linearly changed as shown in Fig. 12. Only intermediate data (corresponding to 1/2) of the multi-level data 109a can be converted. This can be realized by preparing an LUT shown in Fig. 13. A fifth embodiment of the present invention will be described. Fig. 16 is a system block diagram of an image processing apparatus according to a fifth embodiment of the present invention. A receiver 301 receives pixel data (bi-level data) from an external device. A multi-level processor 302 converts input bi-level data (1-bit data) into 16 density levels (4-bit data) in the fifth embodiment, and outputs it. A level shifter 303 level-shifts the input bi-level data into a maximum density level or a minimum density level (both are 4-bit data) in a printer 309. A line buffer memory 304 can store several lines of input image data which is obtained through the receiver 301. Primary differentiation filters 305 and 306 calculate a feature amount of pixel of interest data from a plurality of pixel data around the pixel of interest data (in this embodiment, a matrix region of the pixel of interest data). A discriminator 307 discriminates, based on the feature amounts input from the primary differentiation filters 305 and 306, whether the input pixel of interest corresponds to halftone image information such as a photograph or unitone image data such as a character. The discriminator 307 outputs an instruction to a selector 308 in accordance with the discrimination result, thereby switching the selector 308. A multi-level printer 309 can perform gradation recording by one pixel. The multi-level processor 302 converts data of one pixel (pixel of interest) based on input bi-level data into multi-level data (e.g., four bits per pixel). In this embodiment, for data which is bi-level converted in accordance with a 4 x 4 dither matrix shown in Fig. 17a, bi-level data adjacent to the central pixel in a 4 x 4 dot region are added to calculate an average density in this region, and the average density is assigned to the central pixel data (equation 1). Multi-level data = maximum density x N/(m x m) Where N is the total number of "1"s in bi-level data, and m = 4 in this embodiment. Therefore, Maximum density x N/(4 x 4) Thus, data of 16 (= 4 x 4) gray levels can be reproduced as multi-level data. For example, as shown in Fig. 17b, when pixel data of 4 x 4 dots including a pixel of interest is bi-level converted using the dither matrix shown in Fig. 17a, image data shown in Fig. 17c is obtained. When image data shown in Fig. 17c is input through the receiver 301, the number of "1"s in Fig. 17c is counted (in this case, eight). Therefore, from equation 1, Maximum density x 8/(4 x 4) = maximum density x 1/2 When the number of "1"s is eight, a signal representing a density level half the maximum density (or eighth density level in the 16 gray levels) is output to the multi-level printer 309. This case is shown in Fig. 17d. The level shifter 303 converts bi-level data into the maximum or minimum density level of the multi-level printer. The outputs from the multi-level processor 302 and the level shifter 303 are switched by the selector 308. The selector 308 is controlled by the control signal from the discriminator 307, and the switched density level signal is output to the multi-level printer, thereby forming a visible image. The discrimination method of the discriminator 307 will be described below. Figs. 18a and 18b show the primary differentiation filters 305 and 306 used in this embodiment. Fig. 18a is used for vertical line detection, and Fig. 18b is used for horizontal line detection. As the size of the primary differentiation filters 305 and 306, if a matrix of (2 x M + 1) x M in the vertical direction and M x (2 x M + 1) in the horizontal direction is selected, line pattern detection which is not easily affected by the dither pattern is enabled. Fig. 19a shows the effect of the primary differentiation filter on the dither halftone portion of a bi-level image. In Fig. 19, a mark "o" represents a "1" (black) dot. Pixels have one-to-one correspondence with minus and plus terms of the filter, and the absolute value of the primary differentiated value becomes zero. In a dither halftone image in which a local change in density is small, a difference in the numbers of pixels corresponding to minus and plus terms is small, and as a result, the absolute value of the primary differentiated value is also small. Fig. 19b shows the effect of the primary differentiation filter in a line pattern and a character/symbol portion of a bi-level image. The difference in the numbers of pixels corresponding to the minus and plus terms of the filter becomes large, and hence, the absolute value of the primary differentiated value becomes large. Therefore, the primary differentiated value and an image have the following relationship. When the absolute value of the primary differentiated value is small it is discriminated that the bi-level image is a dither halfotne image. When the absolute value of the primary differentiated value is large it is discriminated that the bi-level image is a character or line pattern. Fig. 20 shows from which position image data is extracted for primary differentiation with reference to a hatched central pixel (pixel of interest) 310 (m,n). As for the filter shown in Fig. 18a, 16 pixels are extracted from each of matrices A and B. As for the filter shown in Fig. 18b, 16 pixels are extracted from each of matrices C and D. As shown in Fig. 21, "1" pixels in pixel groups of the matrices A, B, C, and D are counted by adders 311a, 311b, 311c, and 311d. The count results of the matrices B and D are supplied respectively through inverters 312a and 312b in order to invert the signs of the count results, so that the differences respectively between the matrices A and C and between the matrices B and D are then calculated. The absolute values of the differences are calculated by absolute value converters 314a and 314b, and the results are supplied to a comparator 315. For example, if either a vertical or horizontal line is detected, a signal indicating that the selector 308 is switched to the level shifter 303 is supplied to a discriminated result port 317. In a known method, if a larger one of the two absolute values is larger than a given threshold value 316, the discriminated result corresponds to a line pattern. In another known method, if the sum of the two absolute values is larger than the threshold value 316, a line pattern is determined. The selector shown in Fig. 16 is switched using this discriminated result. The multi-level processor 302 and the level shifter 303 each have line buffers to be synchronized with the discriminator 307. Instead, a common line buffer can be used. In the above description, hardware processing is made. A sixth embodiment for software processing will be described with reference to the flow chart shown in Fig. 22 and the block diagram shown in Fig. 23. In Fig. 22, a CPU 400 controls the entire apparatus. A ROM 401 stores the program corresponding to the flow chart shown in Fig. 22, and a RAM 402 is used for a work area of the CPU 400. Fig. 22 is the flow chart for switching processing of the selector 308 with respect to input image data. A description will be made with reference to this flow chart. In step S1, the total number of "1"s in the matrices A, B, C, and D of input pixel data is counted. It is then discriminated in step S2 if pixel of interest data is a halftone image or a unitone image. In this case, one of the above-mentioned two methods is used as discrimination standard. If it is discriminated that the pixel of interest data is the halftone image, the flow advances to step S3, and an instruction for switching the selector 308 to the multi-level processor is output. Then, the flow returns to step S1. If it is discriminated in step S2 that the pixel of interest data is the unitone image, the flow advances to step S4, and an instruction for switching the selector 308 to the bi-level processor is output. Then, the flow returns to step S1. Thereafter, this processing is repeated, and the density levels of the pixel of interest data are sequentially output to the printer 309, thereby forming a visible image. According to the present invention as described above, when image data is output to an apparatus for forming a visible image after multi-level conversion, it is discriminated if the input image information is halftone image information or unitone image information such as a character/symbol and a line pattern, and image data suited for the respect image information is output. Therefore, a high-quality image can be formed. In the above embodiments, a 4 x 9 or 9 x 4 matrix is used for the description. The present invention is not limited to this. In the above embodiments, the receiver 1 receives image data through a communication line. However, the present invention can be applied to a case wherein an image is scanned by a CCD and the like. In Figs. 16 and 23, input image data is 1-bit bi-level data, but can be 2-bit three-level data. The present invention is not limited to the above embodiments, and various other changes and modifications may be made within the spirit and scope of the appended claims.

Claims: An image processing apparatus comprising: generation means (1, 2) for generating m-bit image data from input image data; conversion means (4) for converting the m-bit image data generated from said generation means into n-bit (n>m) image data characterised by analog converting means (11) for converting the n-bit image data to analog image data in synchronism with a clock signal (51); and generation means (5) for generating a pulse-width modulation signal by comparing the analog image data converted by said analog converting means with a pattern signal of a predetermined cycle which is synchronized with the clock signal. Apparatus according to claim 1, wherein said generation means has halftone processing means (2) for halftone processing the input image data and outputting the m-bit image data, and memory means (3) for storing the m-bit image data output from said halftone processing means. Apparatus according to claim 1 or 2, wherein said generation means generates 1-bit image data. Apparatus according to any one of preceding claims has a converter (4) for converting the m-bit image data generated from said generation means into the n-bit image data, and means (8) for performing spatial filter processing with respect to the n-bit image data output from said converter. Apparatus according to any one of preceding claims, wherein said pattern signal is a triangular wave signal. Apparatus according to any one of preceding claims, further comprising means (40) for modulating a beam based on the pulse-width modulation signal so as to reproduce an image, and means (57) for generating a position signal indicating a scanning position of the beam, wherein said clock signal is synchronized with the position signal. Apparatus according to any one of preceding claims, wherein said conversion means includes density conversion means (113) for performing density conversion of the n-bit image data. Apparatus according to claim 6 or claim 7, wherein said density conversion means has a plurality of tables used for density conversion, and any one of said plurality of tables is selectively used in accordance with a predetermined instruction signal. An image processing method comprising: generating m-bit image data from input image data; converting the m-bit image data into n-bit (n>m) image data and including the steps of converting the n-bit image data to analog image data in synchronism with a clock signal (51); and generating a pulse-width modulation signal by comparing the analog image data with a pattern signal of a predetermined cycle which is synchronized with the clock signal. A method according to claim 9, wherein the step of generating the m-bit data includes halftone processing the input image data to output m-bit image data, and storing in memory means the m-bit image data. A method according to claim 9 or 10, wherein said m-bit data is 1-bit image data. A method according to any one of claims 9 to 11 including performing spatial filter processing with the n-bit image data. A method according to any one of claims 9 to 12, wherein said pattern signal is a triangular wave signal. A method according to any one of claims 9 to 13, for modulating a light beam based on the pulse-width modulation signal so as to reproduce an image, and generating a position signal indicating the scanning position of the beam, wherein said clock signal is synchronized with the position signal. A method according to any one of claims 9 to 14 including performing density conversion of the n-bit image data. A method according to claim 14 or claim 15, wherein said density conversion utilises a plurality of density conversion tables and any one of said plurality of tables is selectively used in accordance with a predetermined instruction signal.

Inventors: KAWAMURA NAOTO, NISHIGAKI YUJI, OHSAWA HIDEFUMI, KAWAMURA, NAOTO, NISHIGAKI, YUJI, OHSAWA, HIDEFUMI, Kawamura, Naoto, c/o Canon Kabushiki Kaisha, Nishigaki, Yuji, c/o Canon Kabushiki Kaisha, OHSAWA, HIDEFUMI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1987
Main classification: H04N1
IPC codes: H04N1, F02B75