Image processing apparatus and method

Abstract: Upon gradation converting input m-bit image information into n-bit image information (m and n are integers; m > n), random numbers, the maximum values of which are changed in accordance with the input values of the m-bit image information, are generated at periods of two or more pixels, and the random numbers are selectively output while switching their signs to positive/negative within the period of two or more pixels. The output signal values and the input values of the m-bit image information are added to each other, and the sum signal values are converted into n-values by a density preservation type quantization method. With this control, the problems of sweeping, texture, and the like of the conventional density preservation type quantization method can be solved without emphasizing the granularity of an image.

Description: BACKGROUND OF THE INVENTION The present invention relates to an image processing method and apparatus, which process image data to allow a FAX apparatus, a digital copying machine, a printer, and the like to form a high-quality image. More specifically, the present invention relates an image processing apparatus and method which perform gradation conversion processing on a multi-value image which is expressed by m bits (m is an integer equal to or larger than 2) per pixel, so as to obtain an image which is expressed by the number of bits smaller than m bits per pixel. Conventionally, in a digital copying machine, an original is illuminated with light emitted by, e.g., a halogen lamp, light reflected by the original is photoelectrically converted into an electrical signal using a charge coupled device such as a CCD, the electrical signal is subjected to predetermined processing, and thereafter, an image is formed using a printing apparatus such as a laser printer, a liquid crystal printer, or the like. As an image forming method, in recent years, a method of expressing multi-gray levels of high-resolution pixels is adopted. For example, pulse-width modulation, luminance modulation, and the like are known. Along with the improvement of performance of devices that constitute such printing apparatus, more developments are being made to attain higher resolution. In an electrophotography type digital copying machine using a laser beam, as the resolution increases, the exposure time on the surface of a photosensitive body becomes very short, and a sufficient potential cannot be obtained on the surface of the photosensitive body after exposure, as shown in Fig. 20. As a consequence, attachment of toner on the surface of the photosensitive body becomes very unstable with respect to a highlight portion (a portion to which a exposure time is short) upon development. For this reason, the amount of toner attached to the photosensitive body varies depending on the positions of pixels to be exposed, resulting in density unevenness. As apparatuses have been digitalized and systemized, the number of models adopting a binary output method as an image forming method which is stable in terms of data handling and the circuit scale, is increasing, and hence, some techniques such as the dither method, the error diffusion method, and the like have been proposed. As for the dither method, the period of itself interferes with that of image data, thus causing image quality deterioration such as moiré, and its periodicity causes reproduction errors of thin lines, characters, and the like. As an image binarization method that can assure higher image quality, an error diffusion method (to be simply referred to as an ED method hereinafter), a mean density preservation method (to be referred to as an MD method hereinafter), and the like, which binarize an image while preserving the density, are known. These methods express halftones macroscopically by attaining area gradation expression using a smaller number of gray levels. That is, these methods are pseudo halftone expression methods. Since these methods allow image formation with a smaller number of gray levels, the load on hardware that processes image data can be reduced. However, when the number of gray levels (m bits) of an image is decreased in consideration of a simple hardware arrangement and a system configured via a network, problems such as sweeping, texture, and the like are posed upon forming, especially, a 1-bit image. These problems are unique to the ED and MD methods. More specifically, no dots are formed on a low-density portion following a black character, or a pattern like a bug creep mark is formed. Figs. 21 and 22 are enlarged views of these states. Fig. 21 is an enlarged view of a low-density portion. When a high-density line or character is present in an even low-density portion, no dots are formed after the line or character (the above-mentioned sweeping) (the arrow indicates the point of interest). Fig. 22 is an enlarged view of a high-density portion. When an even middle-density portion is subjected to ED processing, a unique texture is generated (the arrow indicates the point of interest). These problems stand out in the low- and middle-density portions. There is also a problem not only in forming a 1-bit image, but also in forming a 2-bit image, that a pseudo edge not shown, called switching noise is generated. In the hardware arrangement, a FIFO memory for several bits (in depth direction) × several lines is required to hold errors caused by n-value conversion of the ED method, resulting in high cost. EP-A-0507356 discloses an apparatus which functions to produce a bi-level output value in response to each input level value from an input image signal corresponding to picture elements. Each input level value is amended by adding thereto successively generated values which vary in amplitude and polarity independently of said input level values. These amended input level values are determined from predetermined density levels in a random access memory with the density levels being selected such that the average change in density within each modulation region is zero and are added to an accumulated error (whose value is determined by a combination of accumulated error values) to produce a corrected input level for the object picture element. The corrected input level is compared with a threshold value to produce an output bi-level value. The difference between the corrected input level and the bi-level value is computed to thereby derive a bi-level conversion error for the object picture element. This bi-level conversion error is apportioned among a set of picture elements which have not yet been processed and are peripherally adjacent to the object picture element. SUMMARY OF THE INVENTION According to the present invention there is provided an image processing apparatus as set out in claim 1. According to the present invention there is provided an image processing method as set out in claim 6. An embodiment of the present invention provides an image processing apparatus and method which are free from any problems such as sweeping, texture, and the like even when the number of gray levels of an image is decreased. An embodiment of the present invention provides an image processing apparatus and method, which can remove sweeping and texture as problems unique to the ED method or screen method without emphasizing granularity, solve the problem of a pseudo edge, and suppress moiré. An embodiment of the present invention provides an image processing apparatus and method which can solve problems of sweeping and texture while suppressing granular noise by generating random numbers whose maximum value is controlled at intervals of several pixels with respect to the value of an input video signal, and adding random pairs of positive and negative or negative and positive random numbers having equal absolute values to the value of a video signal at intervals of several pixels. An embodiment of the present invention provides an image processing apparatus and method which can solve the problems such as sweeping, texture, and the like without emphasizing granularity, while holding edge information by adding, to input image information, a random number generated based on edge information detected from the input image information. An embodiment of the present invention provides an image processing apparatus and method, which can remove sweeping and texture as problems unique to the ED method without emphasizing granularity, solve the problem of a pseudo edge, and suppress moiré. An embodiment of the present invention provides an image processing apparatus and method, which can decrease the number of bits required for a memory that holds errors and can also reduce cost by executing the following processing. That is, after pseudo halftone processing of L level is performed, by setting the quotient and remainder, which are obtained by dividing an input video signal by an arbitrary constant, respectively to be upper- and lower-bit signals, binarization is performed by comparing it with a random number or a dither signal, and errors generated as a result of error diffusion processing of the pseudo halftone signal of the L level are corrected as accumulated errors of neighboring pixels with respect to the input video signal. An embodiment of the present invention provides an image processing apparatus and method which can remove texture unique to the density preservation method by adding a pseudo random number to image data, and reproduce a stable halftone for a halftone image such as a photograph by varying the period of the random number, thus obtaining a sharp image for an edge portion. The above and other aspects of the present invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing the arrangement of an image forming apparatus according to an embodiment of the present invention; Fig. 2 is a block diagram showing the arrangement of an image processing unit 104; Fig. 3 is a block diagram showing in detail the arrangement of a gradation conversion processing unit 204 in the first embodiment; Fig. 4 is a view showing the concept of the table arrangement of a maximum value controller 503; Fig. 5 is a block diagram showing the arrangement of a gradation conversion processing unit according to a modification of the gradation conversion processing unit 204 according to the first embodiment; Fig. 6 is a block diagram showing the arrangement of a gradation conversion processing unit according to the second embodiment; Fig. 7 is a block diagram showing the arrangement of a gradation conversion processing unit according to a modification of the second embodiment; Fig. 8 is a block diagram showing the arrangement of a gradation conversion processing unit according to the third embodiment; Fig. 9 is a block diagram showing the arrangement of a gradation conversion processing unit according to a modification of the third embodiment; Fig. 10 is a block diagram showing the arrangement of a gradation conversion processing unit according to the fourth embodiment; Fig. 11 is a block diagram showing the arrangement of a gradation conversion processing unit according to a modification of the fourth embodiment; Fig. 12 is an enlarged view of an output image obtained by each of the first to fourth embodiments when a high-density line or character is present in an even low-density portion; Fig. 13 is an enlarged view of an output image obtained when an even middle-density portion is subjected to ED processing of each of the first to fourth embodiments; Fig. 14 is a block diagram of a gradation conversion processing unit according to the fifth embodiment; Fig. 15 is a block diagram of a gradation conversion processing unit according to the sixth embodiment; Fig. 16 is a block diagram of a gradation conversion processing unit according to the seventh embodiment; Fig. 17 is a block diagram of a gradation conversion processing unit according to the eighth embodiment; Fig. 18 is an explanatory view of amplitude control in the eighth embodiment; Fig. 19 is a view showing the memory map of a memory that stores image processing program codes according to the present invention; Fig. 20 is a graph showing the potential on the surface of a photosensitive body; Fig. 21 is an enlarged view showing a low-density portion according to the conventional ED processing; and Fig. 22 is an enlarged view of a high-density portion according to the conventional ED processing. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The preferred embodiments of the present invention will be described in detail hereinafter with reference to the accompanying drawings. [First Embodiment] Fig. 1 is a block diagram showing the arrangement of an image forming apparatus according to the first embodiment of the present invention. Referring to Fig. 1, an image reading unit 109 is constituted by a CCD sensor 102, an analog signal processing unit 103, and the like, and an original image formed on the CCD sensor 102 via a lens 101 is converted into R (Red), G (Green), and B (Blue) analog electrical signals by the CCD sensor 102. The converted image signals are input to the analog signal processing unit 103, and are subjected to sample & hold processing, dark level correction, and the like in units of R, G, and B colors. Thereafter, the analog signals are analog-to-digital (A/D) converted into digital signals. The full-color signals thus digitized are input to an image processing unit 104. The image processing unit 104 performs correction processing required for the reading system such as shading correction, color correction, γ correction, and the like, and other processing operations such as smoothing processing, edge emphasis, and the like, and outputs the processing result to a printer unit 105. The printer unit 105 is constituted by, e.g., an exposure control unit including a laser unit (not shown) and the like, an image forming unit, a feed control unit for a transfer paper sheet, and the like, and records an input image signal on a transfer paper sheet as an image. A CPU circuit unit 110 shown in Fig. 1 is constituted by a CPU 106, a ROM 107, a RAM 108, and the like, and systematically controls the sequence of the apparatus of this embodiment by controlling the image reading unit 109, the image processing unit 104, the printer unit 105, and the like. The image processing unit 104 shown in Fig. 1 will be described below. Fig. 2 is a block diagram showing the arrangement of the image processing unit 104. In the image processing unit shown in Fig. 2, digital image signals output from the analog signal processing unit 103 shown in Fig. 1 are input to a shading correction circuit unit 201. The shading correction circuit unit 201 corrects variations of sensors that read an original image, and the light distribution characteristics of a lamp for illuminating an original. The corrected image signals are input to a gradation correction unit 202 to be converted from luminance signals into density data, thus generating density image data. The image signals converted into density data are input to a color/monochrome conversion unit 203 which outputs monochrome data. The monochrome data output from the color/monochrome conversion unit 203 are input to a gradation conversion processing unit 204, and are subjected to error diffusion processing (density preservation type quantization processing) to attain pseudo halftone expression. When color image signals are to be output, Y, M, and C data output from the gradation correction unit 202 are respectively subjected to the conversion processing in the gradation conversion processing unit 204. The gradation conversion processing unit will be described in detail below. Fig. 3 is a block diagram showing in detail the arrangement of the gradation conversion processing unit 204 according to the first embodiment. In the gradation conversion processing unit shown in Fig. 3, a counter 501 alternately generates timing signals of 0 and 1 at a 2-pixel period with reference to an Hsync signal. The timing signals output from the counter 501 are input to a random number generator 502, which generates a positive random number value only when the timing signal is 0. The signal output from the random number generator 502 is input to a maximum value controller 503 simultaneously with a signal (W/B) from the color/monochrome conversion unit 203. The maximum value controller 503 comprises a 255 × 255 × 8-bit look-up table, and controls the amplitude of an 8-bit signal from the random number generator 502 in accordance with an 8-bit signal from the color/monochrome conversion unit 203. That is, when the 8-bit signal value input from the color/monochrome conversion unit 203 is small, the maximum value controller 503 performs output control to forcibly decrease the 8-bit signal value input from the random number generator 502. On the other hand, when the 8-bit signal value input from the color/monochrome conversion unit 203 is large, the maximum value controller 503 performs output control to amplify the 8-bit signal value input from the random number generator 502. Note that the upper limit value of amplification of the signal value from the random number generator 502 is determined using an arbitrary value. Fig. 4 is a view showing the concept of the table arrangement of the maximum value controller 503. Fig. 4 shows the state wherein 8-bit output values are written in a matrix memory. That is, the matrix memory receives an 8-bit signal from the color/monochrome conversion unit 203 and an 8-bit signal from the random number generator 502, and outputs a memory value at the coordinate position defined by the two signals. Note that an input A of a selector 505 receives data from a memory 504, and an input A thereof receives data from the maximum value controller 503. The signal output from the maximum value controller 503 with the above arrangement is input to the memory 504 and the selector 505. The memory 504 temporarily stores the 8-bit signal value. The selector 505 switches its inputs A and A on the basis of the signal from the counter 501, which is synchronized with the timing of the maximum value controller 503, and outputs the input signal value. More specifically, when the signal from the counter 501 is 0, the selector 505 directly outputs the signal from the maximum value controller 503; when the signal from the counter 501 is 1, the selector 505 outputs the signal from the memory 504. With this arrangement, an identical signal value can be output for two consecutive pixels. In this manner, the signal value output from the selector 505 is input to a positive/negative inverter 506. The positive/negative inverter 506 performs control to switch the algebraic sign of the signal value input from the selector 505 to positive or negative on the basis of the timing signal from the counter 501. For example, when the signal value from the counter 501 is 0, the inverter 506 directly outputs the signal value from the selector 505 while leaving it "plus"; when the signal value from the counter 501 is 1, the inverter 506 inverts the sign of the signal value from the selector 505 to "minus", and outputs the inverted signal value. The signal value output from the positive/negative inverter 506 is added to a VIDEO signal output from the color/monochrome conversion unit 203, which has been timing-corrected in a latch 510, by an adder 507, and the sum is input to an error diffusion processor 508. Although not shown, when the signal value as a result of addition of the adder 507 exceeds 255 (8 bits) or becomes equal to or smaller than 0, processing for clipping the signal value to 255 or 0 is performed. The error diffusion processor 508 performs processing based on a normal 1-bit error diffusion method, though a detailed description thereof will be omitted. Note that the number of bits of the error diffusion processing is not limited to 1 bit, but error diffusion processing to 2 to 4 bits may be performed. Also, the error diffusion processor 508 diffuses errors generated upon conversion of m-bit input data into n-bit output data (m and n are integers and m > n) to surrounding input data by multiplying them with predetermined weighting coefficients. The VIDEO signal subjected to the above-mentioned processing is output from the image processing unit 104, and is finally output from the printer unit 105. As described above, according to the first embodiment, as the pre-processing of the error diffusion method as the density preservation type quantization method, the signal value of the random number generator is controlled in accordance with the input VIDEO signal value. That is, in a high-density portion, a normal random number is added to the VIDEO signal value while changing its sign to positive or negative. In a low-density portion, since granularity is conspicuous, a random number is added to the VIDEO signal value while gradually suppressing the amplitude of the random number and changing its sign to positive or negative as the density changes from high density to low density. In this manner, the granularity of images can be suppressed in consideration of the visual characteristics. <Modification of First Embodiment> Fig. 5 is a block diagram showing the arrangement of the gradation conversion processing unit according to a modification of the gradation conversion processing unit 204 according to the first embodiment shown in Fig. 3. Note that the same reference numerals in Fig. 5 denote the same parts as in Fig. 3, and a detailed description thereof will be omitted. In the gradation conversion processing unit shown in Fig. 5, a signal output from the color/monochrome conversion unit 203 is also input to an edge detector 511. The signal from color/monochrome conversion unit 203 is input to the maximum value controller 503 simultaneously with the signal output from the random number generator 502 and the signal output from the edge detector 511. The maximum value controller 503 according to this modification controls the amplitude of an 8-bit signal from the random number generator 502 in accordance with an 8-bit signal from the color/monochrome conversion unit 203 and the signal from the edge detector 511. In this modification, when the signal from the edge detector 511 is input to the maximum value controller 503, the 8-bit signal value input from the random number generator 502 is controlled to be forcibly decreased and output, independently of the magnitude of the 8-bit signal value input from the color/monochrome conversion unit 203. As described above, according to the modification of the first embodiment, since the signal value of the random number generator is controlled in accordance with edge information of the input VIDEO signal so as not to decrease the edge information by adding a random number to an edge portion of a thin line, a character, or the like, the edge information of input image information can be held, and an increase in granularity can be suppressed. [Second Embodiment] The second embodiment according to the present invention will be described below. Note that the same reference numerals in the arrangement of an image processing apparatus of this embodiment denote the same parts as in the arrangement of the first embodiment, and a detailed description thereof will be omitted. Fig. 6 is a block diagram showing the arrangement of a gradation conversion processing unit according to the second embodiment. Referring to Fig. 6, a counter 901 generates timing signals of 0, 1, and 2 in turn at a 3-pixel period with reference to an Hsync signal. The timing signal output from the counter 901 is input to a random number generator 902, which generates a positive random number only when the timing signal is 0. The signal output from the random number generator 902 is input to a maximum value controller 503 simultaneously with the signal from a color/monochrome conversion unit 203. The maximum value controller 503 performs the same processing as in the first embodiment, and thereafter, outputs the obtained signal value to a selector 903. The selector 903 performs processing for switching three signal values in accordance with the timing signal from the counter 901, which has been timing-corrected in a latch 509. The three signals are a signal having data value 0, the signal from the maximum value controller 503, and the signal from a memory 504. When a switching signal is 0, the selector 903 directly outputs the signal from the maximum value controller 503; when the switching signal is 1, the selector 903 outputs the signal from the memory 504; and when the switching signal is 2, the selector 903 outputs the value 0. In this manner, the signal output from the selector 903 is input to a positive/negative inverter 904, and its sign is switched to positive/negative/0 in accordance with the timing signal from the counter 901. More specifically, when the signal value from the counter 901 is 0 or 2, the inverter 904 directly outputs the signal value from the selector 903 while leaving it "plus"; when the signal value from the counter 901 is 1, the inverter 904 inverts the sign of the signal value from the selector 903 to "minus" and outputs the inverted signal value. The signal value output from the positive/negative inverter 904 is processed in the same manner as in the first embodiment, and the processed signal is output from an error diffusion processor 508. The VIDEO signal subjected to the above-mentioned processing is output from an image processing unit 104, and is finally output from a printer unit 105. As described above, according to the second embodiment, since texture patterns generated upon n-value conversion processing tend to be connected vertically as compared to the first embodiment, and dots are connected vertically, stable image formation in terms of the process can be realized. <Modification of Second Embodiment> Fig. 7 is a block diagram showing the arrangement of the gradation conversion processing unit according to a modification of the second embodiment. As shown in Fig. 7, in the gradation conversion processing unit according to this modification, an edge detector 911 is added to the gradation conversion processing unit shown in Fig. 6. More specifically, in this modification, the signal output from the random number generator 902 is input to the maximum value controller 503 simultaneously with the signal from the color/monochrome conversion unit 203 and the signal from the edge detector 911. In this manner, since the random number value to be added to the signal value of an original image is controlled in accordance with edge information, the edge information of the original image can be preserved. [Third Embodiment] The third embodiment according to the present invention will be described below. Note that the same reference numerals in the arrangement of an image processing apparatus of this embodiment denote the same parts as in the arrangement of the first embodiment, and a detailed description thereof will be omitted. Fig. 8 is a block diagram showing the arrangement of a gradation conversion processing unit according to the third embodiment. Referring to Fig. 8, a maximum value controller 1002 comprises a 255 × 255 × 8-bit look-up table as in the first embodiment, and controls the amplitude of an 8-bit signal from a random number generator 502 in accordance with an 8-bit signal from a color/monochrome conversion unit 203. More specifically, when the 8-bit signal value input from the color/monochrome conversion unit 203 is small, the maximum value controller 1002 performs output control to forcibly decrease the 8-bit signal value input from the random number generator 502. On the other hand, when the 8-bit signal value input from the color/monochrome conversion unit 203 is large, the maximum value controller 1002 performs output control to amplify the 8-bit signal value input from the random number generator 502. However, the point which differentiates the maximum value controller 1002 according to the third embodiment from the maximum value controller of the first embodiment is that the amplification limit value of the output signal value is set to be a value equal to or smaller than a value twice as large as a level of a first threshold value of an error diffusion processor 1001. The signal value subjected to the same processing as in the first embodiment, as described above, is output from a positive/negative inverter 506, and is input to the error diffusion processor 1001 simultaneously with the signal from the color/monochrome conversion unit 203, which has been timing-corrected in a latch 510. This error diffusion processor 1001 performs processing for adding the signal value input from the positive/negative inverter 506 to a threshold value for an n-value conversion, although not shown. The signal value output from the error diffusion processor 1001 is output from an image processing unit 104, and is finally output from a printer unit 105. As described above, according to this embodiment, since the processed random number is added to a threshold value for the n-value conversion in accordance with the ED method, the granularity of an image can be suppressed in consideration of the visual characteristics. <Modification of Third Embodiment> Fig. 9 is a block diagram showing the arrangement of the gradation conversion processing unit according to a modification of the third embodiment. As shown in Fig. 9, in the gradation conversion processing unit according to this modification, an edge detector 1011 is added to the gradation conversion processing unit shown in Fig. 8. More specifically, when a signal from the edge detector 1011 is input to the maximum value controller 1002, the 8-bit signal value input from the random number generator 502 is controlled to be forcibly decreased and output, independently of the magnitude of the 8-bit signal value input from the color/monochrome conversion unit 203. As described above, according to this modification, since the signal value of the random number generator is controlled in accordance with edge information of the input VIDEO signal, the edge information of input image information can be held, and an increase in granularity can be suppressed. [Fourth Embodiment] The fourth embodiment according to the present invention will be described below. Note that the same reference numerals in the arrangement of an image processing apparatus of this embodiment denote the same parts as in the arrangements of the first and second embodiments, and a detailed description thereof will be omitted. Fig. 10 is a block diagram showing the arrangement of a gradation conversion processing unit according to the fourth embodiment. Referring to Fig. 10, a maximum value controller 1102 comprises a 255 × 255 × 8-bit look-up table as in the second embodiment, and controls the amplitude of an 8-bit signal from a random number generator 902 in accordance with an 8-bit signal from a color/monochrome conversion unit 203. In the maximum value controller 1102, the amplification limit value of the output signal value is set to be a value equal to or smaller than a value twice as large as a level of a first threshold value of an error diffusion processor 1101. The signal value obtained as a result of the same processing as in the second embodiment is output from a positive/negative inverter 904, and is input to the error diffusion processor 1101 simultaneously with the signal from the color/monochrome conversion unit 203, which has been timing-corrected in a latch 510. This error diffusion processor 1101 performs processing for adding the signal value input from the positive/negative inverter 904 to a threshold value for an n-value conversion, although not shown. The signal value output from the error diffusion processor 1101 is output from an image processing unit 104, and is finally output from a printer unit 105. As described above, according to this embodiment, since the processed random number is added to a threshold value of the n-value conversion, the same effect obtained upon adding the processed random value to the VIDEO signal is obtained, i.e., texture patterns generated upon n-value conversion processing tend to be connected vertically, thus allowing image formation which is stable in terms of the process. <Modification of Fourth Embodiment> Fig. 11 is a block diagram showing the arrangement of the gradation conversion processing unit according to a modification of the fourth embodiment. As shown in Fig. 11, in the gradation conversion processing unit according to this modification, an edge detector 1111 is added to the gradation conversion processing unit shown in Fig. 10. More specifically, in this modification, the amplitude of an 8-bit signal from the random number generator 902 is controlled in accordance with an 8-bit signal from the color/monochrome conversion unit 203 and a signal from the edge detector 1111. When a signal from the edge detector 1111 is input to a maximum value controller 1102, the 8-bit signal value input from the random number generator 902 is controlled to be forcibly decreased and output, independently of the magnitude of the 8-bit signal value input from the color/monochrome conversion unit 203. As described above, by controlling the random number to be added to the signal value of an original image in accordance with edge information, the edge information of the original image can be preserved. Note that Figs. 12 and 13 show the gradation conversion processing results according to the above embodiments and their modifications. Fig. 12 shows an output image obtained when a high-density line or character is present in an even low-density portion. Fig. 13 shows an output image obtained when an even middle-density portion is subjected to an ED processing. As can be seen from a comparison between Figs. 12 and 13 and Figs. 46 and 47, problems such as sweeping, texture, and the like can be solved by applying the present invention to the gradation conversion processing. As described above, according to the first to fourth embodiments, since the maximum value of a random number is changed in accordance with the data value of input image information, and the random numbers, the signs of which change from positive to negative or from negative to positive at a predetermined period, are added to the data value, the problems such as sweeping, texture, and the like can be solved without emphasizing the granularity of an image. Addition of a random number generated based on edge information which is detected from input image information to the input image information solves the problems such as sweeping, texture, and the like, without emphasizing the granularity of an image, while preserving the edge information. In each of the first to fourth embodiments, the maximum value controller comprises a look-up table, as described above. However, the present invention is not limited to such specific arrangement. For example, the maximum value controller may comprise a logic arithmetic circuit. In each of the first to fourth embodiments described above, generation of sweeping, texture, and the like in the ED method is prevented by adding random number values, the signs of which change periodically, to image data. However, when the input image is a dot image, moire may be generated due to interference between the random value and the dot image. In view of this problem, the fifth to eighth embodiments to be described below show, an example that can remove sweeping and texture as problems unique to the ED method or screen method without emphasizing granularity. The example described below can also solve the problem of a pseudo edge, and suppress moiré. [Fifth Embodiment] The fifth embodiment according to the present invention will be described below. In an image processing apparatus according to this embodiment, the same reference numerals denote the same parts as in the image processing apparatus according to the first embodiment, and a detailed description thereof will be omitted. <Arrangement of Gradation Conversion Processing Unit> Fig. 14 is a block diagram showing in detail a gradation conversion processing unit 204 as the characteristic feature of this embodiment. The gradation conversion processing unit 204 shown in Fig. 14 alternately generates timing signals of 0 and 1 at a 2-pixel period using a counter 1301. The counter 1301 generates a signal in synchronism with each pixel of an image, and generates 0 at an edge portion. The timing signal output from the counter 1301 is input to a random number generator 1302, which generates a positive random number only when the timing signal is 0. The signal output from the random number generator 1302 is input to a random number sign controller 1303, in which its sign is randomly converted to positive or negative one, and the converted signal is output. The signal value output from the random number sign controller 1303 is input to an amplitude controller 1304, which controls the amplitude of that value in accordance with an 8-bit signal output from a color/monochrome conversion unit 203. More specifically, the output signal value from the controller 1304 acts as a function of the signal from the color/monochrome conversion unit 203, and the amplitude of the output signal is controlled to be decreased in low- and high-density portions with respect to density data. Fig. 18 shows an example of this amplitude control. An illustration denoted (a) in Fig. 18 shows a case wherein no amplitude control is performed, and an illustration (b) in Fig. 18 shows a case wherein the amplitude control is performed. That is, in (b), by controlling the amplitude, the function which acts to decrease the amplitudes of random values in the low- and high-density portions is applied. The signal output from the amplitude controller 1304 is input to a memory 1305 and a selector 1307. The memory 1305 temporarily stores the signal value output from the amplitude controller 1304. The selector 1307 switches inputs A and A on the basis of the signal from the counter 1301. When the signal from the counter 1301 is 0, the selector 1307 directly outputs the signal output from the amplitude controller 1304; when the signal from the counter 1301 is 1, the selector 1307 outputs the signal output from a sign inverter 1306. The sign inverter 1306 outputs the signal from the memory 1305 while inverting its sign. More specifically, when data from the memory 1305 has the negative sign, the inverter 1306 inverts the sign to the positive one and outputs the inverted data; when data from the memory 1305 has the positive sign, the inverter 1306 inverts the sign to the negative one and outputs the inverted data. With this arrangement, a pair of positive and negative or negative and positive random number values having equal absolute values can be output for two consecutive pixels. In this manner, the signal value output from the selector 1307 is added to a VIDEO signal output from the color/monochrome conversion unit 203 by an adder 1309, and the sum signal is input to an error diffusion processor 1308. Although not shown, when the sum signal value calculated by the adder 1309 exceeds 255 (8 bits) or becomes equal to or smaller than 0, processing for clipping the signal value to 255 or 0 is performed. The error diffusion processor 1308 performs processing based on normal error diffusion for binary data, screen processing such as dithering for binary data, or the like, although its details are not shown. The VIDEO signal subjected to the above-mentioned processing is output from an image processing unit 104 shown in Fig. 1, and is finally output from a printer unit 105. As described above, according to the fifth embodiment, in order to solve the problem associated with granularity that becomes more enhanced when a random number is added to normal image density data, the signal value output from the random number generator is controlled to be a function of the VIDEO signal value, as shown in the illustration (b) in Fig. 18. Furthermore, when random numbers, which have equal absolute values and regularly change their signs in the order from positive to negative, are added to a VIDEO signal in units of two pixels, there is another problem that the random numbers interfere with the read dot image, thus generating moiré. In order to solve this problem, signals according to this embodiment, which have equal absolute values and randomly change their signs in the order from positive to negative or from negative to positive, are added to a VIDEO signal in units of two pixels. As described above, according to the fifth embodiment, sweeping and texture as the problems unique to the n-bit ED method or screen method can be removed without emphasizing granularity, the problem of a pseudo edge can also be solved, and moiré can be suppressed. In the fifth embodiment, the signs of random number values are randomly switched in the order from positive to negative or from negative to positive in units of two pixels. However, the present invention is not limited to the two-pixel system, but the signs may be switched in units of three pixels. In this case, the signs of random number values may be randomly switched in the order of (positive, 0, negative) or (negative, 0, positive). [Sixth Embodiment] An image processing apparatus according to the sixth embodiment of the present invention will be described below. The same reference numerals in the sixth embodiment denote the same parts as in the first and fifth embodiments, and a detailed description thereof will be omitted. Fig. 15 is a block diagram showing in detail the arrangement of a gradation conversion processing unit 204 of the sixth embodiment. Referring to Fig. 15, a signal value output from a random number sign controller 1303 is input to a memory 1305 and a selector 1307. The memory 1305 temporarily stores the signal value output from the random number sign controller 1303 as in the fifth embodiment. The selector 1307 switches inputs A and A on the basis of the signal from a counter 1301. More specifically, when the signal from the counter 1301 is 0, the selector 1307 directly outputs the signal from the random number sign controller 1303; when the signal from the counter 1301 is 1, the selector 1307 outputs the signal from a sign inverter 1306. The sign inverter 1306 outputs the signal from the memory 1305 while inverting its sign as in the fifth embodiment. More specifically, when data from the memory 1305 has the negative sign, the inverter 1306 inverts the sign to positive and outputs the inverted data; when data from the memory 1305 has the positive sign, the inverter 1306 inverts the sign to negative and outputs the inverted data. With this arrangement, random number values having equal absolute values but different signs can be output for two consecutive pixels. The signal output from the selector 1307 is input to an amplitude controller 1304, and the ratio of the amplitude of a random number is controlled in units of pixels, as shown in the illustration (b) in Fig. 18. Thereafter, the amplitude-controlled signal is output. In this manner, as in the fifth embodiment, the signal value output from the amplitude controller 1304 is added to a VIDEO signal from a color/monochrome conversion unit 203, by an adder 1309, and the sum signal is input to an error diffusion processor 1308. Then, the signal is subjected to processing such as normal n-bit error diffusion, screen processing, or the like. The VIDEO signal subjected to the above-mentioned processing is output from an image processing unit 104 shown in Fig. 1, and is finally output from a printer unit 105. In the sixth embodiment, since the amplitude control by the amplitude controller 1304 is performed on each pixel, which does not result in adding random number values having equal absolute values but different signs to odd- and even-numbered pixels, and hence, density data cannot be accurately preserved, as compared to the fifth embodiment. However, it is capable of controlling not to add unnecessary data to the edge of a character portion or an image portion, and the reproducibility of the edge portion can be improved. [Seventh Embodiment] An image processing apparatus according to the seventh embodiment of the present invention will be described below. Note that the same reference numerals in the seventh embodiment denote the same parts as in the first and fifth embodiments, and a detailed description thereof will be omitted. Fig. 16 is a block diagram showing in detail a gradation conversion processing unit 204 according to the seventh embodiment. Referring to Fig. 16, a counter 1301 alternately generates timing signals of 0 and 1 at a two-pixel period as in the fifth embodiment. The counter 1301 generates a signal in synchronism with each pixel of an image, and generates 0 at an edge portion. The timing signal from the counter 1301 is input to a random number generator 1501, which generates a random number only when the timing signal is 0. The signal output from the random number generator 1501 is a random number value that has either the positive or negative sign. The signal from the random number generator 1501 is input to a memory 1305 and a selector 1307. The selector 1307 selects and outputs one of the signal value from the random number generator 1501 and a signal from a sign inverter 1306, which are inputs at terminals A and A of the selector 1307, on the basis of the signal from the counter 1301. The sign inverter 1306 outputs the signal from the memory 1305 while inverting its sign, as in the fifth embodiment. In this manner, as in the fifth embodiment, the signal value output from the selector 1307 is added to a VIDEO signal from a color/monochrome conversion unit 203 by an adder 1309, and the sum signal is input to an error diffusion processor 1308. Then, the signal is subjected to processing such as normal n-bit error diffusion, screen processing, or the like. The VIDEO signal subjected to the above-mentioned processing is output from an image processing unit 104 shown in Fig. 1, and is finally output from a printer unit 105. In the seventh embodiment, since the random number generator 1501 generates both positive and negative random number values, a random number sign controller 1306 can be omitted, and the hardware arrangement can be simplified, as compared to the fifth embodiment. [Eighth Embodiment] An image processing apparatus according to the eighth embodiment of the present invention will be described below. Note that the same reference numerals in the eighth embodiment denote the same parts as in the first and fifth embodiments, and a detailed description thereof will be omitted. Fig. 17 is a block diagram showing in detail a gradation conversion processing unit 204 according to the eighth embodiment. Referring to Fig. 17, a counter 1301 alternately generates timing signals of 0 and 1 at a two-pixel period as in the fifth embodiment. The timing signal from the counter 1301 is input to a random number generator 1501, which generates a random number only when the timing signal is 0. The signal output from the random number generator 1501 is a random number which may have either the positive or negative sign, as in the seventh embodiment. The signal value from the random number generator 1501 is input to a memory 1305 and a selector 1307. The selector 1307 selects and outputs signal values which are inputs at its terminals A and A , on the basis of the signal from the counter 1301. More specifically, when the signal from the counter 1301 is 0, the selector 1307 directly outputs the signal from the random number generator 1501; when the signal from the counter 1301 is 1, the selector 1307 outputs a signal from a sign inverter 1306. The sign inverter 1306 outputs the signal from the memory 1305 while inverting its sign, as in the fifth embodiment. With this arrangement, random number values having equal absolute values but different signs can be output for two consecutive pixels. The signal from the selector 1307 is input to an amplitude controller 1304, and the ratio of the amplitude of a random number is controlled in units of pixels, as shown in the illustration (b) in Fig. 18. Thereafter, the amplitude-controlled signal is output. As in the fifth embodiment, the signal value output from the amplitude controller 1304 is added to a VIDEO signal from a color/monochrome conversion unit 203 by an adder 1309, and the sum signal is input to an error diffusion processor 1308. Then, the signal is subjected to processing such as normal n-bit error diffusion, screen processing, or the like. The VIDEO signal subjected to the above-mentioned processing is output from an image processing unit 104 shown in Fig. 1, and is finally output from a printer unit 105. In the eighth embodiment, since the amplitude controller 1304 performs amplitude control on each pixel as in the sixth embodiment, density data cannot be accurately preserved as compared to the fifth embodiment. However, it is possible to perform control that does not add unnecessary data to the edge of a character portion or an image portion, and the reproducibility of the edge portion can be improved. Furthermore, as in the seventh embodiment, since the random number generator 1501 generates random numbers having both the positive and negative signs, a random number sign controller can be omitted, and the hardware arrangement can be simplified. As described above, an image processing apparatus according to each of the fifth to eighth embodiments comprises a random number generation means for generating positive random number values at every other pixel, a random number sign control means for randomly converting the signs of the random number values generated by the random number generation means to positive or negative, an amplitude control means for changing the ratio of the amplitude of each of the random number values output from the random number sign control means as a function of a signal value of input image data, a sign inversion means for generating at a pixel position where no random number value is generated by the random number generation means, a value which has the same absolute value as but a different sign from a value output from the amplitude control means at an immediately preceding pixel position, and an addition means for alternately adding the signal values generated by the amplitude control means and the sign inversion means to signal values of the input image data. When 8-bit input image information is binarized by the ED method or screen method, problems such as sweeping, texture, and the like are posed. However, each of the above embodiments solves these problems, since the ratio of the amplitude value of a random number generated every other pixels is controlled in correspondence with the input image data value, and random number values are added to each pixel value of input image data while randomly changing the sign pattern of random number values to be a pair of positive and negative sign or negative and positive sign, in which these values having equal absolute values which are to be added to each pixel in units of two pixels. Also, the image processing apparatus is characterized in that moiré can be suppressed while solving the problem associated with granularity that worsens upon adding a random number to normal image density data. This invention is not limited to an image formation in which gradation conversion from 8 bits to 1 bit is performed. It is also characterized remove switching noise, i.e., a pseudo edge generated when performing gradation conversion to other gray levels (e.g., n bits such as 2 bits, 3 bits, and the like). As described above, according to the fifth to eighth embodiments, sweeping and texture as the problems unique to the n-bit ED method or screen method can be removed without emphasizing granularity, and the problem of a pseudo edge can also be solved, and moiré can be suppressed. In each of the embodiments described above, the gradation conversion processing for one color data has been described. By providing the above-mentioned gradation conversion circuits in correspondence with each of a plurality of color data, a full-color image can be output. Note that the present invention may be applied to either a system constituted by a plurality of equipments such as a FAX apparatus, a digital copying machine, a printer, and the like, or an apparatus consisting of a single equipment (e.g., a FAX apparatus, a digital copying machine, a printer, or the like). The present invention is also attained by describing the processing sequence of the image processing unit 104 represented by Fig. 1 above in a software manner, pre-storing the program in the ROM 107, and executing the program by the CPU. The present invention may also be implemented by supplying a storage medium, which records a program code of a software program that can realize the functions of the above-mentioned embodiments to the system or apparatus, and reading out and executing the program code stored in the storage medium by a computer (or a CPU, MPU, or the like) of the system or apparatus. In this case, the program code itself read out from the storage medium realizes the functions of the above-mentioned embodiments, and the storage medium which stores the program code constitutes the present invention. As the storage medium for supplying the program code, for example, a floppy disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, and the like may be used. The functions of the above-mentioned embodiments may be realized not only by executing the program code read out by the computer but also by some or all of actual processing operations executed by an OS (operating system) running on the computer on the basis of an instruction of the program code. Furthermore, the functions of the above-mentioned embodiments may be realized by some or all of actual processing operations executed by a CPU or the like arranged in a function extension board or a function extension unit, which is inserted in or connected to the computer and receives the program code read out from the storage medium. When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the above-mentioned image processing. These program codes will be briefly described below. The storage medium stores modules shown in an example of the memory map in Fig. 19. That is, the storage medium stores program codes of at least a random number generation module, a control module, an addition module, and an n-value conversion module.

Claims: An image processing apparatus for processing an image signal comprising image pixel data representing a plurality of pixels such that each pixel is represented by one of a first number of different m-bit values into output image data in which each pixel is represented by one of a second number of different n-bit values, smaller than the first number, where n is smaller than m, the apparatus comprising: conversion means (204) for converting the value of an input image pixel from a first value consisting of one of said first number of different m-bit values into a second value consisting of one of said second number of different n-bit values to produce said output image information, said conversion means being operable to effect a comparison using a first value representing one of said first number of values and one or more threshold values to determine which value of said second number of different values corresponds most closely to said first value and to output that one of said second number of different values as said second value for that pixel, wherein said conversion means includes means (508; 1001; 1101; 1308) for diffusing an error representing the difference between said first value and said second value determined by said conversion means to further input image information to be converted by said conversion means, characterised by : random number generation means (502; 902; 1302; 1501) for generating a first signal representing a random number; control means (503) for receiving the first signal from said random number generating means and for receiving the m-bit input image signal, the control means being operable to modify the amplitude of the first signal in accordance with the m-bit input image signal to produce a second signal; and said conversion means being operable to add to said first value or said one or more threshold values the second signal output by the control means to produce a further value and to effect the comparison using the further value. An apparatus according to claim 1, wherein said random number generation means (502; 902; 1302; 1501) is arranged to generate the random number in correspondence with the image pixel data. An apparatus according to claim 1, wherein said random number generation means (502; 902; 1302; 1501) is arranged to generate each random number at a period of not less than two pixels, and an inversion means (506) is arranged to invert the sign of the random number from positive to negative or from negative to positive within the period of not less than two pixels and to output selectively the inverted signal value as the first signal. An apparatus according to claim 1, wherein said random number generation means (502; 902; 1302; 1501) is arranged to generate the random number with a period of not less than three pixels, and an inversion means (506) is arranged to invert the sign of the random number generated by said random number generation means from positive to negative or from negative to positive within the period of not less than three pixels and to selectively output the inverted signal value and a signal value "0" as the first signal. An apparatus according to claim 1, 2, 3 or 4, further comprising edge detection means (911) for detecting edge information from the image pixel data, wherein said random number generation means (902) is arranged to control the value of a random number to be generated in accordance with the edge information. An image processing method for processing an image signal comprising image pixel data representing a plurality of pixels such that each pixel is represented by one of a first number of different m-bit values into output image data in which each pixel is represented by one of a second number of different n-bit values, smaller than the first number, where n is smaller than m, comprising the steps of: converting the value of an input image pixel from a first value consisting of one of said first number of different m-bit values into a second value consisting of one of said second number of different n-bit values to produce said output image information by effecting a comparison using the first value and one or more threshold values to determine which value of said second number of different values corresponds most closely to said first value, and outputting that one of said second number of different values as said second value for that pixel, wherein said conversion step includes diffusing an error representing the difference between said first value and said second value to further input image information to be converted, characterised by the steps of: generating a first signal representing a random number; receiving, in a control means (503), the first signal and the m-bit input image signal; modifying in said control means, the amplitude of the first signal in accordance with the m-bit input image signal to produce a second signal; adding to said first value or said one or more threshold values the second signal to produce a further value; and effecting the comparison using the further value. A method according to claim 6, wherein said random numbering generating step generates the random number in correspondence with the image pixel data. A method according to claim 6, wherein said random number generation step generates each random number at a period of not less than two pixels, and an inverting step inverts the sign of the random number from positive to negative or from negative to positive within the period of not less than two pixels and selectively outputs the inverted signal value as the first signal. A method according to claim 6, wherein said random number generating step generates the random number at a period of not less than three pixels, and an inverting step inverts the sign of the random number generated by said random number generation step from positive to negative or from negative to positive within the period of not less than three pixels and selectively outputs the inverted signal value and a signal value "0" as the first signal. A method according to claim 7, 8, 9 or 10, further comprising a step of detecting edge information from the image pixel data, wherein said random number generation step controls a value of a random number to be generated in accordance with the edge information. A computer program product carrying processor implementable instructions for causing a processor to carry out a method in accordance with any one of claims 7 to 10.

Inventors: ICHIKAWA HIROYUKI, KABURAGI HIROSHI, YAMAGATA SHIGEO, ICHIKAWA, HIROYUKI, KABURAGI, HIROSHI, YAMAGATA, SHIGEO
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1996
Main classification: H04N1
IPC codes: H04N1