Image processing method for processing an image signal differently depending on the range of an image characteristic thereof relative to the range within which an output device can reproduce the image characteristic
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to an input image signal processing method particularly useful for the case where the reproduction range of an output device is not sufficient for obtaining a complete reproduction of the image characteristics of an input image signal. 
     2. Related Background Art 
     The gradation range of a television signal, for example, is in general considerably wide. Conventionally, a gradation correction has been performed to obtain a hard copy with a printer when the gradation reproducing range of the printer is narrower than the gradation range of a television signal. In one example of the related art gradation correction methods, a histogram is formed in which an input image signal is represented by classifying it in accordance with its gradation level. Based upon the histogram, the maximum gradation level of the input image signal is made to coincide with that of a printer, and the minimum gradation level of the input image signal is made to coincide with that of the printer. With this method, it has been possible to always obtain a high contrast image. However, it involves some problems that even a flat image which inherently has no contrast is reproduced with contrast and an image of dark gradation is reproduced as a completely dark portion. 
     In the case where an input signal is a color image signal, to make the saturation range of an input color image signal agree with the saturation reproducing range of an output device such as a printer, the portion of an input color image signal exceeding the saturation reproducing range has been heretofore compressed to the maximum value of the reproducing range. As a result, saturation continuity of the input color image is destroyed, resulting in a deformed output image. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an image processing method capable of eliminating the above-described related art disadvantages and obtaining a reproduced image with high quality. 
     It is another object of the present invention to provide an image processing method for reproducing the image characteristic of an input image signal as faithfully as possible in the case where the input range of the input image characteristic is broader than the reproduction range of an output device. 
     It is further object of the present invention to provide an image processing method capable of reproducing an image having a similar gradation characteristic of the input image signal. 
     It is a still further object of the present invention to provide a color image processing method capable of color-processing most suitably for the saturation distribution of an input color image. 
     The above and other objects of the present invention will become apparent from the following detailed description and the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a monochrome printer applied to a first embodiment of the image processing method according to the present invention; 
     FIG. 2 is a flow chart showing the processes by CPU 12 of FIG. 1; 
     FIGS. 3A to 3C are graphs showing input and output histograms; 
     FIG. 4 is a block diagram of a color printer applied to a second embodiment of the image processing method according to the present invention; 
     FIG. 5 is a flow chart showing the processes performed by CPU 113 of FIG. 4; and 
     FIGS. 6A to 6C are graphs showing input and output histograms regarding saturation. 
    
    
     PREFERRED EMBODIMENTS 
     (First Embodiment) 
     The present invention will now be described in connection with a first embodiment wherein a television signal is recorded with a monochrome image printer. 
     FIG. 1 is a block diagram showing a monochrome image printer applied to the first embodiment of the image processing method according to the present invention. In the figure, Y represents a luminance signal of an input television signal, reference numeral 11 represents an analog/digital (A/D) converter, and 12 represents CPU for controlling a histogram process and gradation correction process. 13 represents a digital/analog (D/A) converter, 14 represents a record head capable of recording a gradated image, 15 represents a RAM for storing histogram data and values necessary for the processes by CPU 12, and 16 represents a ROM storing a process program of CPU 12. 
     The operation will now be described by referring to a flow chart of FIG. 2. 
     At step S1, a histogram of an input luminance signal Y is formed, i.e., a distribution of pixels constituting a one image frame is formed for each luminance level. At step S2, a dark or shadow point Y (1%) is set at the luminance level brighter by 1% from the minimum luminance level of all pixels, while a highlight point Y (99%) is set at the luminance level brighter by 99% from the minimum liminance level of all pixels. The more detailed description of steps S1 and S2 is disclosed in U.S. patent application Ser. No. 659,948 filed on Oct. 11, 1984, now U.S. Pat. No. 4,667,228, and assigned to the assignee of the present application. 
     At step S3, a reproducing range Dout of the printer and the gradation range Din=Y (99%)-Y (1%) of the input image signal are compared with each other, Dout being a difference between the maximum reproducing luminance Y max of the printer and the minimum reproducing luminance Y min thereof. If Dout&lt;Din at step S3, i.e., if the formed histogram is as shown in FIG. 3A, the reproducing gradation range of the printer is narrower than the gradation range of the input image signal so that the gradation correction is performed at step S4 in accordance with the following formula. ##EQU1## 
     Thus, it is possible to perform a gradation correction with a high contrast preserved in conformity with the original contrasted input image. 
     In case Dout≧Din at step S3 and it is judged at step S6 that Y (1%)≧Y min, it means that as shown in FIG. 3B the histogram distribution of the input image signal is within the reproducing gradation range of the printer. Therefore, without performing a gradation correction, the input luminance signal Y is directly output as an output signal Y&#39; at step S7. 
     As above, the input image signal whose histogram distribution is within the gradation limit range of the printer is not subjected to a gradation correction, and recorded without changing its signal characteristic. 
     If Din≧Dout and Y (1%)&lt;Y min at steps S3 and S6, i.e., if the input and output histograms are represented as shown in FIG. 3C, a gradation correction is performed in accordance with the following formula while preserving the gradation range of the input image signal. 
     
         Y+(Y min-Y(1%))→Y&#39; 
    
     Thus, it is possible to reproduce the input image of a dark gradation while preserving the same contrast and the same dark gradation. 
     The signal Y&#39; which is obtained at steps S4, S7 and S9 is output at steps S5, S8 and S10, respectively. 
     In FIG. 3, in indicates the input image signal histogram, while out indicates the output image signal histogram. 
     The above embodiment has been directed to a monochrome image. However, in the case of a color image, an RGB signal is subjected to the processing similar to the above, if a luminance signal and color-difference signals are to be used, the luminance signal is subjected to the similar processing. Instead of a printer used as an output device hereinabove, a display unit with a relatively narrow reproducing gradation range may also be used. Furthermore, instead of Y (1%) and Y (99%) in the histogram, other setting values including Y (0%) and Y (100%) may be used. 
     (Second Embodiment) 
     A second embodiment of the image processing method of the invention will be described which is applied to a color printer capable of obtaining a hard copy of input R, G and B color signals. 
     FIG. 4 is a block diagram of the color printer applied to the second embodiment, specifically showing how the signals are processed. In the figure, reference numeral 111 represents an encoder for obtaining a luminance signal Y and color-difference signals (R-Y) and (B-Y) from the input R, G and B signals in accordance with the following equations. 
     
         Y=0.3R+0.59G+0.11B 
    
     
         R-Y=R-Y 
    
     
         B-Y=B-Y 
    
     Reference numeral 112 represents an arithmetic operation circuit for obtaining a hue signal H and saturation signal C based on the color-difference signals (R-Y) and (B-Y) and in accordance with following equations. ##EQU2## 
     Reference numeral 113 represents a CPU which performs a saturation histogram forming process and a saturation conversion process, respectively for each hue signal. Reference numeral 114 represents a ROM storing a process program for the CPU, 115 represents a RAM for storing histogram data and values necessary for the process by CPU 113. Reference numeral 116 represents a masking circuit for performing a masking process based on the luminance signal Y, hue signal H and converted saturation signal C&#39; to obtain primary color signals of yellow Ye, magenta Ma and cyan Cy. 118 Ye, 118 Ma and 118 Cy represent record heads for recording respective primary colors. 
     The process operation of CPU 113 will now be described with reference to a flow chart of FIG. 5. 
     At step S11, a saturation histogram of an input color signal is formed by forming a distribution of pixels constituting an image frame for each hue signal H; in other words, the saturation distribution is checked with respect to each of a plurality of predetermined hues. Next, at step S12 the maximum saturation C(H)max and the minimum saturation C(H)min are detected for each hue signal H. At step S13,  the difference between C(H)max and C(H)min and the maximum reproducing saturation C(H) L  measured beforehand of the color printer for each hue signal H, are compared with each other. If C(H)max-C(H)min&gt;C(H) L  at step S13, then step S14 follows to perform a saturation compression process and obtain an output saturation C&#39;(H) in accordance with the following formula. ##EQU3## 
     As above, the saturation compression process as shown in FIG. 6A is carried out. Thus, it is possible to conduct saturation compression without destroying chromaticity continuity. 
     If it is judged that at step S13 C(H)max-C(H)min≦C(H) L  and at step S16 C(H) L  ≧C(H)max, it means that as shown in FIG. 6B the saturation range of the input image is fully within the reproducing saturation range of the printer. Therefore, C(H) is directly output as C&#39;(H) at step S17 without performing a saturation conversion. Thus, it is possible to reproduce the input image characteristics without any change. 
     If it is judged that at step S13 C(H)max-C(H)min≦C(H) L  and at step S16 C(H) L  &lt;C(H)max, it means that as shown in FIG. 6C the maximum saturation of the input image exceeds the maximum value of the reproducing saturation range. In this case wherein the saturation is shifted to a higher range, the distribution histogram as a whole is shifted at step S19 in accordance with the following formula. 
     
         C(H)-(C(H)max-C(H).sub.L)→C&#39;(H) 
    
     With this process, it is possible to reproduce the saturation shift of the output image and give a natural, visual impression due to the unchanged absolute value of the saturation range. 
     C&#39;(H) signals obtained at steps S14, S17 and S19 are respectively output at steps S15, S18 and S20. 
     In the above embodiment, the saturation conversion has been effected for each hue signal. However, a saturation conversion for both hue and luminance signals may be processed which results in a more precise but complicated conversion. 
     Instead of a luminance signal Y, hue signal H and saturation signal C, similar signals may be used such as Lab*, Luv* and else. 
     In the above embodiment, although the conversion has been directed to all of the hue signals a specific hue signal or signals may be used instead. 
     As seen from the foregoing description of the present invention, it is possible to realize a very natural image reproduction while preserving the characteristics of an input image signal. 
     Furthermore, in the application of the present invention to a color image processing it is possible to produce a color image while preserving the characteristic of an input color image signal, which is particularly useful for color printers or for color display units having a limited reproducing saturation range. 
     The present invention is not intended to be limited to the above embodiments, but various applications and modifications are possible without departing from the scope of the claims.