Image processing apparatus

Abstract: Multivalued data enters and is converted into binary (two-valued) data in accordance with plural types of binary-conversion methods. Among the plural types of data obtained by such binary conversion, one is adopted as the object of coding and is coded. The object of coding to be stored in a memory is decided based upon the quantity of coded data.

Description: BACKGROUND OF THE INVENTION Field of the Invention: This invention relates to an image processing apparatus such as a facsimile apparatus having at least two binary-conversion processing methods and the method thereof. Description of the Related Art: Fig. 1 is a block diagram illustrating the construction of a facsimile apparatus according to an example of the prior art. The apparatus includes a solid-state image pick-up device 101 such as a CCD for reading an original and outputting an analog image signal indicative of the original, an A/D converter 102 for converting the analog image signal into a digital signal (in which one pixel is represented by n bits) and outputting the digital signal, a gamma (γ) correcting unit 103 for applying a γ correction to the n-bit digital image signal, namely a multivalued image signal, an error diffusing processor 104 for diffusing, to peripheral pixels, an error which occurs when subjecting the n-bit multivalued image signal to binary-conversion processing and outputting an acceptable binary (two-valued) image signal (in which one pixel is represented by one bit), a coding processor 105 for coding the binary image signal as by a modified Huffman (MH), modified read (MR) or modified-modified read (MMR) of a facsimile coding method, namely a run-length coding method, an operation panel 106 comprising a display for displaying the status of the apparatus and a key input unit which the operator uses to enter instructions, a memory controller 107 controlling the writing or reading of image data relative to an image memory 108, the image memory 108 for accumulating the image data, and a communication controller (CCU) 109 for transmitting and receiving data via a communication line 120. In the arrangement described above, the analog image signal, which is obtained by scanning the original by means of the solid-state image pick-up device 101, is converted into n-bit digital data by the A/D converter 102. Next, the n-bit digital signal, namely the multivalued image signal, is acted upon by the γ correcting unit 103 to convert the quantity of light into density, then the signal is subjected to error diffusing processing by the error diffusing processor 104, whereby the signal is converted into a one-bit binary image signal. This binary image signal is coded by the coding processor 105 in accordance with the above-mentioned run-length coding method, and the signal is accumulated in the image memory 108 as coded data by the memory controller 107. When the operator uses the operation panel 106 to designate transmission at the end of the accumulating operation, the coded data accumulated in the image memory 108 is sent to the CCU 109 via the memory controller 107, and the CCU 109 sends the coded data to another party's apparatus through the communication line 120 in accordance with a facsimile transmission procedure. However, in the example of the prior art described above, the multivalued image signal is coded following the error diffusing processing, and the coded data is accumulated in the memory 108. As a consequence, the following problems arise: When coding by the run-length coding method is applied to the binary image signal that has been subjected to error diffusing processing, the data compression ratio declines. This results in memory overflow in the image memory 108 and sometimes makes it impossible to transmit an original. In order to accumulate the coded data in the image memory 108 reliably, the number of pages accumulated at one time is limited. Moreover, in a case where the number of pages accumulated is the maximum possible, communication lime is prolonged and the cost of communication becomes quite high. Furthermore, depending upon the kind of the binary-conversion processing method described above, there is a case for the pixels of the output image to concentrate or scatter. And in an ordinary image printing apparatus, the pixels are enlarged somewhat so that mutually adjacent pixels are caused to overlap before the image is printed out. As a consequence, a difference in density occurs. A concern of the present invention is to provide an image processing apparatus which alleviates the aforementioned problems encountered in the prior art. An embodiment of the present invention provides an image processing apparatus in which the data compression ratio is improved, the probability of a transmission failure is reduced, and transmission is performed with reliability. EP Patent Specification No. EP-A-0,286,414 discloses colour image processing apparatus which can convert image data either by edge enhancement or by data compression but is not directed to meeting the above problems. According to the present invention, there is provided an image processing apparatus as set out in claim 1. Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating the construction of a facsimile apparatus according to an example of the prior art; Fig. 2 is a block diagram illustrating the construction of a facsimile apparatus according to a first embodiment of the present invention; Fig. 3 is a diagram illustrating the details of an operation panel according to the first embodiment; Fig. 4 is a diagram illustrating an example of a matrix for dither processing; Fig. 5 is a diagram illustrating an example of a matrix for error diffusing processing; Fig. 6 is a flowchart for describing a processing procedure in the first embodiment; Fig. 7 is a block diagram illustrating the construction of a facsimile apparatus according to a second embodiment of the present invention; Fig. 8 is a diagram illustrating the γ characteristic of a γ correcting unit for dither processing; and Fig. 9 is a diagram illustrating the γ characteristic of a γ correcting unit for error diffusing processing. DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. <First Embodiment> Fig. 2 is a block diagram illustrating the construction of a facsimile apparatus according to a first embodiment of the present invention. As shown in Fig. 2, the facsimile apparatus according to this embodiment includes the solid-state image pick-up element 101 such as a CCD, the A/D converter 102, the gamma (γ) correcting unit 103, the error diffusing processor 104, the coding processor 105, the operation panel 106, the memory controller 107, the image memory 108, the CCU 109, a dither processor 110, a multiplexer (MUL) 111, and a controller 112. The controller 112 includes a CPU 113 for performing overall control of the facsimile apparatus in accordance with a program, a ROM 114 which stores a program, illustrated by the flowchart of Fig. 6, for operating the CPU 113, and a RAM 115 used as a work area for executing various programs. Numeral 116 denotes an original detector for detecting whether an original has been set in a scanning portion in either a fixed mode, in which an original is placed upon a platen and an image reading operation is performed, or an automatic document feeder (ADF) mode, in which more than one original is placed in a feeder and images are read in successive fashion. Fig. 3 is a diagram illustrating the details of a panel face on the operation panel 106. As shown in Fig. 3, the panel includes a message display section for displaying messages, a read key 202 for designating reading of an image, a transmit key 203 for entering a dial-input procedure, dial keys 204 for entering a telephone number, and a start key 205 for starting transmission. The flow of data in the facsimile apparatus thus constructed and the processing executed by the various components will now be described. The analog image signal, which is obtained by scanning the original by means of the solid-state image pick-up element 101, is converted into an n-bit digital signal by the A/D converter 102. Next, the n-bit digital signal, namely the multivalued image signal, is γ-converted by the γ correcting unit 103, and the resulting signal is outputted to the dither processor 110 or the error diffusing processor 104, whereby the signal is subjected to binary conversion to be converted into a one-bit binary image signal. The method of dither processing will now be described. Fig. 4 is a diagram illustrating one example of a dither matrix for dither processing. By way of example, it is assumed that the image data outputted by the A/D converter 102 is composed of six bits (n = 6), and that values are extracted over a level range of 0 (white) - 63 (black). The six-bit multivalued image signal is inputted to the dither processor 110, where it is successively compared with threshold values of the 4 x 4 dither matrix shown in Fig. 4. If the result of the comparison is that the signal is equal to or greater than a threshold value of the dither matrix, it is digitized as a black pixel and the value thereof is 63. If the signal is less than a threshold value of the 4 x 4 dither matrix, it is digitized as a white pixel and the value thereof is 0. The dither matrix of Fig. 4 has a size of 4 x 4 and indicates a case where the array pattern of the threshold values is of the vortex type. However, the size of the matrix and the array pattern of the threshold values are not limited to those of Fig. 4, and any pattern may be employed. The error diffusion processing performed by the error diffusing processor 104 will now be described. Fig. 5 is a diagram showing an example of an error diffusion matrix which illustrates the diffused destination of an error exhibited by a pixel of interest. The numerals in this matrix indicate weighting assigned to peripheral pixels at the lime of error diffusion. The asterisk "*" indicates the position of the pixel of interest. In the error diffusing processor 104, the multivalued image signal which has entered is compared with a prescribed threshold value. If the signal is equal to or greater than the threshold value, the data is treated as being black. If the signal is less than the threshold value, the data is treated as being white. Thus, the signal is converted into a two-value or binary signal. The error in the pixel of interest, which error arises in this binary-conversion process, is diffused in accordance with the error diffusion matrix of Fig. 5. Specifically, one-half of the error is allotted to the neighboring pixel on the right side, and the remaining half of the error is allotted to the neighboring pixel on the lower side. When the next pixel is processed, binary conversion is performed in the same manner upon first adding this allotted error to the inputted multivalued image signal. Thus, the error diffusing processor 104 repeatedly allots the successively generated errors to succeeding pixels to perform binary conversion. For example, in a case where the threshold value is 32 and the multivalued image signal inputted first is 45 (the input value), this inputted multivalued image signal is binary-converted as black and a value of 63 (output value) is obtained. The error produced at this time is: (input value) - (output value) = 45 - 63 = -18. Accordingly, the error (-18) produced is diffused in accordance with the matrix of Fig. 5. That is, "-9" is allotted to the neighboring pixel on the right, and "-9" is allotted to the neighboring pixel below the pixel of interest. If the multivalued image signal inputted next is 30, then the aforesaid error "-9" is added to this signal to give 30 - 9 = 21, the allotment of the error is completed, and then the above-described binary conversion and error diffusion are carried out with "21" serving as the level of the pixel of interest, i.e., the input value. With regard to pixels from the second onward, the value of the multivalued image signal to which the error has been allotted is adopted as the input value. Though the foregoing description has been rendered with regard to the error diffusion matrix shown in Fig. 5, there is no limitation upon the matrix used. In other words, error diffusion processing can be executed in accordance with any matrix. With reference again to Fig. 2, the MUL 111 selects the binary image signal outputted by either the dither processor 110 or error diffusing processing 104, in accordance with a command from the memory controller 107. The selected binary image signal is coded in the coding processor 105 by the MH, MR or MMR run-length coding method, as described earlier, and the resulting signal is accumulated in the image memory 108 via the memory controller 107. In response to an instruction entered from the operation panel 106, the memory controller 107 causes the image data outputted by the coding processor 105 to be accumulated in the image memory 108, or causes the image data accumulated in the image memory 108 to be outputted to the CCU 109. Further, the memory controller 108 outputs a selection signal 150, which is for selecting the binary image signal, to the MUL 111. Here the selection signal 150 is assumed to be a one-bit signal. In general, the error diffusion method is characterized by a high resolution and a low coding compression ratio, whereas the dither method is characterized by a low resolution and a high coding compression ratio. In this embodiment, greater importance is attached to resolution rather than the coding compression ratio. Accordingly, the selection signal 150 usually selects error diffusion processing. Then, if the image memory 108 overflows when the image data is accumulated, the selection signal 150 selects the dither processor 110, which executes dither processing. In response to a command for changing over the selection, the MUL 111 selects the output of the dither processor 110. In order for the image to be read again at the same time that the selection signal 150 is changed over, the memory controller 107 instructs the controller 112 to read the image again. In a case where the scanner is currently in the fixed mode when the image is being read again, the message display section 201 displays the message "RE-READING" and scanning is performed again to,read the image. Alternatively, if the scanner is in the ADF mode, the message display section 201 displays the message "RESET ORIGINAL READ LAST AND THEN PRESS START KEY". This is message which requests that the operator retrieve the original scanned last from an original ejection tray (not shown), return the retrieved original to an original feed tray (not shown) and then press the start key. The original can thus be read again. In a case where the image memory 108 overflows in spite of the re-reading operation described above, the message display section 201 of the operation panel 109 displays an error to the effect that the image memory 108 has overflowed, and operation is terminated. When the start key 205 is pressed, the CCU 109 accepts, via the memory controller 107, the coded data accumulated in the image memory 108, and transmits the data to the communication line 120 in accordance with the facsimile transmission procedure. The control procedure of this embodiment will now be described in accordance with the flowchart shown in Fig. 6. It should be noted that Fig. 6 illustrates the flow of a series of steps based not upon operations controlled completely by the CPU 113 but upon operations performed by the CPU 113 and each of the other components. It should also be noted that the flowchart of Fig. 6 represents only one example of a transmitting function according to the present invention. First, at step S11 of the flowchart, the original is set upon an original reading section (not shown) of the apparatus and the system waits for the read key 202 to be pressed. When the key 202 is pressed, the program proceeds to step S12, where error diffusion processing is selected. Processing executed when a key other than the read key 202 is pressed is outside the scope of the invention and need not be described here. The set original is read at step S13. The processing of step S13 is as follows: First, the original is read by the solid-state image pick-up device 101. When this has been accomplished, the resulting signal is converted into a six-bit digital signal, namely a multivalued image signal, by the A/D converter 102, and the multivalued image signal is γ-corrected by the γ correcting unit 103. The multivalued image signal thus corrected is converted into a two-valued signal by the error diffusing processor 104 in the manner described above, after which the resulting signal is coded by the coding processor 105. The coded signal is accumulated in the image memory 108 via the memory controller 107. Next, at step S14, it is determined whether the image memory 108 has overflowed at accumulation of the image data in the image memory 108. If overflow is not detected, then the program proceeds to step S19. If overflow of the image memory 108 is detected, however, the program proceeds to step S15, where the MUL 11, under the control of the memory controller 107, selects the dither processor 110. The same original is read again at step S16 in conformity with each mode. This is followed by step S17, at which it is determined whether the image memory 108 has overflowed owing to the-above-described re-reading processing. If the decision rendered is that the memory has not overflowed, then the program proceeds to step S19. On the other hand, if overflow of the memory is detected even at re-reading, the transmitting function is terminated. To this end, the program proceeds from step S17 to step S18, where the message "CANNOT BE READ BECAUSE OF MEMORY OVERFLOW" is displayed on the message display section 201, after which the program returns to step S11 to restore the system to the state in which is awaits a key input. If overflow is not detected at step S17, then the program proceeds to step S19, where it is determined, based upon depression of the read key 202, whether the next original is to be read. If the read key 202 has been pressed, the program returns to step S12, where read processing is resumed. If the read key 202 has not been pressed, then it is determined at step S20 whether the transmit key 203 has been pressed. When the transmit key 203 has been pressed, the program proceeds to step S21, where the system wails for depression of the dial keys 204, which are for specifying the destination of the transmission. When the dial keys 204 are subsequently pressed to specify the destination of the transmission, the program proceeds-to step S22, where the system waits for depression of the start key 205 to designate the start of transmission. When the start key 205 has been pressed, the program proceeds to step S23, at which transmission of the coded data accumulated in the image memory 108 is started. At the end of transmission, the program returns to step S11, where the system waits for depression of the read key 202. In the embodiment described above, the binary-conversion processing is changed depending upon whether the image memory 108 overflows when the image of the original is read. However, an arrangement can be adopted in which a usable memory area having a capacity of one page is decided beforehand. Then, the binary-conversion processing can be changed, even if the image memory 108 does not overflow, depending upon whether this memory area has accommodated the coded data. Thus, in order to convert an inputted multivalued image signal into a two-valued image signal, at least two types of binary-conversion processing are used. Of the binary image signals obtained by these two types of processing, one is selected based upon the effectiveness of the resolution or data compression rate. This makes it possible to code the selected binary image signal and to accumulate the signal effectively. As a result, the probability of transmission is improved and so is the efficiency of accumulation in the image memory 108. In other words, the possibility of a successful transmission is improved by making it possible to select either error diffusion processing or dither processing in dependence upon the amount of storage area remaining in the image memory 108. According to the first embodiment described above, two types of binary-conversion processors are providing, namely the dither processor 11 and the error diffusing processor 104. However, the invention is not limited to this embodiment. An example of a modification would be to provide three or more binary-conversion processors, and the number of bits in the select signal 150 can be increased or decreased depending upon the type of processing. In addition, the changeover can be made in stages in dependence upon a predetermined priority. A density preservation method used in printers can be mentioned as one example of another type of binary-conversion processing. Further, in the first embodiment described above, the changeover between the dither processor 110 and the error diffusing processor 104 is performed in response to detection of memory overflow. However, this does not pose a limitation upon the present invention. A modification would be to provide the operation panel 106 with a changeover key for changing over the binary-conversion processor or a selection key for selecting the binary-conversion processor, in which case the binary-conversion processor would be decided compulsorily. <Second Embodiment> A problem is encountered in the first embodiment since the same γ correction is applied to both the dither processor and the error diffusing processor. Specifically, the pixels of the output image lend to concentrate in the case of dither processing and to diffuse in the case of error diffusion processing. Furthermore, in the usual image printing apparatus, output pixels are enlarged somewhat so that mutually adjacent pixels overlap. As a result, there is a difference in density between the output image of the type employing dither processing and the output image of the type employing error diffusion processing. Accordingly, the second embodiment of the present invention will be described taking as an example a case in which processing is executed upon applying different γ corrections, one for dither processing and the other for error diffusing processing. Fig. 7 is a block diagram illustrating the construction of a facsimile apparatus according to a second embodiment of the present invention. Components already describing in connection with Fig. 2 are designated by like reference characters and need not be described again. In Fig. 7, numeral 117 denotes a γ-corrector for dither processing, and numeral 118 represents a γ-corrector for error diffusing processing. Fig. 8 is a graph illustrating the characteristic of a γ correction performed by the γ-corrector 112 for dither processing. This correction is processing mainly for effecting a conversion from light quantity to density. The data following the conversion is outputted as a six-bit multivalued image signal having a range of "0" - "63". Fig. 9 is a graph illustrating the characteristic of a γ correction performed by the γ-corrector 113 for error diffusing processing. In comparison with the graph of Fig. 8, this graph has a lower output level overall. Thus, in accordance with the second embodiment, as described above, a γ characteristic for dither processing and a γ characteristic for error diffusing processing are provided, and a γ correction conforming to the selection made by the memory controller 107 is performed. This makes it possible to reduce the difference in density between dither processing and error diffusing processing at the time of output. In this embodiment also, it goes without saying that the modifications described in connection with the first embodiment can be applied.

Claims: Image processing apparatus comprising: input means for inputting image data; correction means (103) for γ-converting the input image data; binarization means for binarizing the converted image data; and encoding means (105) for encoding the binarized image data; characterised in that the output of said correction means is connected in parallel to at least two binarization means (104, 110) for binarizing the corrected image data, said binarizing means comprises first binarization means (110) for binarizing the data converted by said first converting means (117) in accordance with a first binarization method; and second binarization means (104) for binarizing the data converted by said second converting means (118) in accordance with a second binarization method which is different from the first binarization method, wherein the first and second conversion characteristics are specified in a manner such that the density of the output image obtained from the binary data binarized by said first binarization means (110) based on said input image data is approximately equal to that of an output image obtained from the binary data binarized by said second binarization means (104) based on said input image data. Apparatus according to claim 1, wherein a first of said binarization means binary-processes the corrected image data means in accordance with a dither method. Apparatus according to claim 2, wherein a second of said binarization means binary-processes the corrected image data in accordance with an error diffusion method. Apparatus according to claim 3, and comprising at least two γ correction means (117, 118) connected in parallel to said input means, one (117) correction means being connected to said first binarization means, and a second (118) of said correction means being connected to said second binarization means. Apparatus according to claim 4, wherein the characteristics of the correction circuits are matched to the nature of the processing carried out by the first and second binarization means to reduce the difference in density between dither and error diffusion processing. Apparatus according to any preceding claim, further comprising: memory means (108) for storing the coded data provided by said coding means (105); and selecting means selecting the binary data from one of said binarization means in accordance with the amount of data stored in said memory means (108). Apparatus according to claim 6, wherein said selecting means includes detecting means (107) for detecting an overflow condition of said memory means due to the coded data from said coding means and selects binary data from said first binary converting means when said detecting means detects the overflow. Apparatus according to any preceding claim, comprising sending means for sending image data coded by said coding means.

Inventors: HASHIMOTO YASUNORI, HASHIMOTO, YASUNORI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H04N1
IPC codes: H04N1