Abstract:
A tone dependent green-noise error diffusion method includes setting a first threshold and a second threshold, and determining a two-level value of a color level of an input image according to the first threshold and the second threshold; subtracting the two-level value from the color level value to generate an error value; performing an error diffusion on the error value to generate an error diffusion accumulation value; adjusting the color level according to the error diffusion accumulation value; performing a hysteresis filtering on the two-level value to generate an output dependent feedback value; and adjusting the color level according to the output dependent feedback value.

Description:
BACKGROUND OF THE INVENTION  
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a half-tone image processing technique, and more particularly, to a tone dependent green-noise error diffusion method capable of enhancing printing quality and printing apparatus thereof. 
         [0003]    2. Description of the Prior Art 
         [0004]    Half-tone image processing technique is extensively applied to printing apparatuses. Half-tone image processing technique transfers a continuous-tone image into a two-level half-tone image, and a printing apparatus selectively performs a printing operation according to pixels of the two-level image, thereby generating a printed result close to a continuous-tone image. Frequency modulation half-tone image processing method, e.g., an error diffusion method, is frequently used on inkjet printers. However, a laser printer that employs this method will suffer color shift. To prevent this color shift problem, laser printers usually employ an amplitude modulation half-tone image processing method. Nevertheless, the printer employing this method usually suffers from a moire pattern when performing a copying operation. 
         [0005]    The green-noise error diffusion method, which acquires a characteristic between the frequency modulation half-tone image processing method and the amplitude modulation half-tone image processing method, is capable of solving the phenomenon of color shift for laser printers as well as the moire pattern generated when performing copying operations. Please refer to  FIG. 1  and  FIG. 2 .  FIG. 1  and  FIG. 2  are diagrams of an operation of a conventional green-noise error diffusion method.  FIG. 1  (including sub-diagrams  FIG. 1A ,  FIG. 1B ,  FIG. 1C  and  FIG. 1D ) indicates pixel color level values modified by an output feedback apparatus, and  FIG. 2  (including sub-diagrams  FIG. 2A ,  FIG. 2B ,  FIG. 2C  and  FIG. 2D ) indicates pixel color level values diffused by an error diffusion apparatus. As shown in  FIG. 1A , (x, y) indicates a pixel which is currently being processed, wherein the color level value thereof is 155; (x−1, y−1), (x, y−1), (x+1, y−1), (x−1, y) are pixels which are already processed; and (x+1, y), (x−1, y+1), (x, y+1), (x+1, y+1) are pixels which are not processed yet.  FIG. 1B  is a diagram of a distribution of output feedback weighting values: the mark * indicates the pixel (x, y) which is currently processed, the value 0.8 indicates a second output feedback weighting value of the pixel (x, y), and the value 1.2 indicates a first output feedback weighting value of the pixel (x, y).  FIG. 1C  indicates output feedback values of neighboring pixels (x−1, y) and (x, y−1) of the pixel (x, y) in  FIG. 1A  that are derived according to the output feedback weighting values in  FIG. 1B .  FIG. 1D  indicates a modified color level value derived from the pixel (x, y) in  FIG. 1A  plus the output feedback values in  FIG. 1C . 
         [0006]    Please refer to  FIG. 2 . Since the modified color level value  359  of the pixel (x, y) in  FIG. 1D  is larger than a threshold  127 , a two-level value of the pixel (x, y) is set as 255, as shown in  FIG. 2A .  FIG. 2B  is a diagram of a distribution of error diffusion weighting values, where the mark * indicates the pixel (x, y) which is currently processed, and the two values 0.5 and 0.5 indicate a first error diffusion weighting value and a second error diffusion weighting value of the pixel (x, y), respectively. The error value between the color level value  155  of the pixel (x, y) in  FIG. 1A  and the two-level value  255  of the pixel (x, y) in  FIG. 2A  is (−100).  FIG. 2C  indicates error diffusion values derived from a calculation of the error value (−100) according to the error diffusion weighting values in  FIG. 2B . Finally, the error diffusion values in  FIG. 2C  are diffused to neighboring pixels (x+1, y) and (x, y+1) of the pixel (x, y) in  FIG. 2A  to thereby derive diffused pixel color level values as shown in  FIG. 2D . The respective flows in  FIG. 1  and  FIG. 2  are repeated until all the pixels are processed. 
         [0007]    The green-noise error diffusion method still suffers from image defects of a regular pattern in bright color level, middle color level and dark color level; therefore, there still remains room for improvement of this prior art method. 
       SUMMARY OF THE INVENTION  
       [0008]    One of the objectives of the present invention is to provide a tone dependent green-noise error diffusion method and a printing apparatus thereof to solve the problems encountered in the prior art. 
         [0009]    The present invention provides a tone dependent green-noise error diffusion method for processing a continuous-tone input image arranged as a two-dimensional matrix. A location of a specific pixel of the continuous-tone image is presented by (x, y), where the specific pixel may comprise a plurality of colors. The method comprises the following steps: generating a first output feedback weighting value and a second output feedback weighting value according to a color level value of a first color of the specific pixel; executing an output feedback operation to generate a modified color level value according to the first output feedback weighting value and the second output feedback weighting value of the specific pixel; generating a first threshold value and a second threshold value of the first color according to the color level value of the first color; determining an output two-level value of the first color according to the modified color level value of the first color, the first threshold value and the second threshold value; generating a first error diffusion weighting value and a second error diffusion weighting value of the first color according to the color level value of the first color of the specific pixel; and executing an error diffusion operation according to the output two-level value of the first color, the first error diffusion weighting value and the second error diffusion weighting value. 
         [0010]    The present invention also provides a printing apparatus for processing a continuous-tone input image arranged as a two-dimensional matrix. A location of a specific pixel of the continuous-tone image is presented by (x, y), where the specific pixel may comprise a plurality of colors. The printing apparatus includes a first adder, a second adder, a threshold comparing apparatus, a subtracter, an error diffusion apparatus, and an output feedback apparatus. The first adder has a first terminal and a second terminal, wherein the first terminal receives a color level value of a first color of the specific pixel and the second terminal receives an error diffusion value of the first color of the specific pixel to generate a first modified color level value of the first color of the specific pixel. The second adder has a first terminal and a second terminal, wherein the first terminal receives the first modified color level value of the first color and the second terminal receives a output feedback value which is fed back to the first color of the specific pixel, thereby generating a second modified color level value of the second color of the specific pixel. The threshold comparing apparatus has a first terminal and a second terminal, wherein the first terminal receives the color level value of the first color of the specific pixel to generate a first threshold value and a second threshold value, the second terminal receives the second modified color level value of the first color, and the threshold comparing apparatus compares the second modified color level value with the first and the second threshold value of the first color to generate a two-level value of the first color of the specific pixel. The subtracter has a first terminal and a second terminal, wherein the first terminal receives the first modified color level value of the first color of the specific pixel and the second terminal receives the two-level value of the first color of the specific pixel, thereby generating an error value of the first color of the specific pixel. The error diffusion apparatus has a first terminal and a second terminal, wherein the first terminal receives the color level value of the first color of the specific pixel to generate a first error diffusion weighting value and a second error diffusion weighting value, and the second terminal receives the error value of the first color of the specific pixel to generate an error diffusion value of the first color of the specific pixel. The output feedback apparatus has a first terminal and a second terminal, wherein the first terminal receives the color level value of the first color of the specific pixel to generate a first output feedback weighting value and a second output feedback weighting value, and the second terminal receives the two-level value of the first color of the specific pixel to generate an output feedback value of the first color of the specific pixel. The printing apparatus could be a laser printer or a multi-function printer. 
         [0011]    The green-noise error diffusion method and the related printing apparatus according to the present invention modify the prior art techniques to solve the defects of the regular pattern in bright color level, middle color level and dark color level, thereby greatly improving the quality of image printing. 
         [0012]    These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS  
         [0013]      FIG. 1  (including sub-diagrams  FIG. 1A ,  FIG. 1B ,  FIG. 1C  and  FIG. 1D ) is a diagram of an operation of a conventional green-noise error diffusion method. 
           [0014]      FIG. 2  (including sub-diagrams  FIG. 2A ,  FIG. 2B ,  FIG. 2C  and  FIG. 2D ) is a diagram of an operation of a conventional green-noise error diffusion method. 
           [0015]      FIG. 3  is a diagram of a printing apparatus for processing an input image according to an embodiment of the present invention. 
           [0016]      FIG. 4A  is a line chart of the values of the threshold comparing apparatus in  FIG. 3 . 
           [0017]      FIG. 4B  is a line chart of the values of the error diffusion apparatus in  FIG. 3 . 
           [0018]      FIG. 4C  is a line chart of the values of the output feedback apparatus in  FIG. 3 . 
           [0019]      FIG. 5  (including sub-diagrams  FIG. 5A  and  FIG. 5B ) is a diagram of a distribution of the weighting values of the error diffusion apparatus and the output feedback apparatus shown in  FIG. 3 . 
           [0020]      FIG. 6  is a diagram of a two-level image according to the present invention. 
           [0021]      FIG. 7  is a flowchart of an operational example of a tone dependent green noise error diffusion method according to the present invention. 
       
    
    
     DETAILED DESCRIPTION  
       [0022]    Please refer to  FIG. 3 .  FIG. 3  is a diagram of a printing apparatus for processing an input image according to an embodiment of the present invention. The continuous-tone image is arranged as a two-dimensional matrix, a location of a specific pixel of the continuous-tone image is presented by (x, y), and the specific pixel comprises three colors, e.g., cyan, magenta and yellow, whose color level values are represented by C(x, y), M(x, y), Y(x, y), respectively. In this embodiment, cyan C(x, y) is used as an exemplary example for illustrating features of the present invention, but this embodiment also applies to the magenta and yellow colors. As shown in  FIG. 3 , a printing apparatus  300  includes (but is not limited to) a first adder  310 , a second adder  320 , a threshold comparing apparatus  330 , a subtracter  340 , an error diffusion apparatus  350  and an output feedback apparatus  360 . 
         [0023]    The first adder  310  comprises a first terminal and a second terminal, and the first terminal receives a color level value C(x, y) of cyan of the specific pixel and the second terminal receives an error diffusion value C e (x, y) of cyan of the specific pixel to generate a first modified color level value C 11 ( x, y ) of cyan of the specific pixel. The second adder  320  comprises a first terminal and a second terminal, and the first terminal receives the modified color level value C 11 ( x, y ) of cyan and the second terminal receives a output feedback value C h (x, y) which is fed back to the specific pixel, thereby generating a second modified color level value C 12 ( x, y ) of the second color of the specific pixel. 
         [0024]    The threshold comparing apparatus  330  comprises a first terminal and a second terminal, and the first terminal receives the color level value C(x, y) of cyan of the specific pixel to generate a first threshold value t 1  and a second threshold value t 2 . Please refer to  FIG. 4A  in conjunction with  FIG. 3 .  FIG. 4A  is a line chart of the threshold values t 1  and t 2  of the threshold comparing apparatus  330  in  FIG. 3 . A corresponding threshold value can be derived according to the color level value C(x, y) of cyan. The second terminal of the threshold comparing apparatus  330  receives the second modified color level value C 12 ( x, y ) of cyan, and then the threshold comparing apparatus  330  compares the second modified color level value C 12 ( x, y ) with the first threshold value t 1  and the second threshold value t 2  of cyan to generate an output two-level value D(x, y) of cyan of the specific pixel. 
         [0025]    The subtracter  340  comprises a first terminal and a second terminal, and the first terminal receives the first modified color level value C 11 ( x, y ) of cyan of the specific pixel and the second terminal receives the two-level value D(x, y) of cyan of the specific pixel, thereby generating an error value D e (X, y) of cyan of the specific pixel. 
         [0026]    The error diffusion apparatus  350  comprises a first terminal and a second terminal, and the first terminal receives the color level value C(x, y) of cyan of the specific pixel to generate a first error diffusion weighting value b 1  and a second error diffusion weighting value b 2 . Please refer to  FIG. 4B  in conjunction with  FIG. 5 , wherein  FIG. 4B  is a line chart of the values of the error diffusion apparatus  350  in  FIG. 3 , and  FIG. 5  (including sub-diagrams  FIG. 5A  and  FIG. 5B ) is a diagram of a distribution of the weighting values of the error diffusion apparatus  350  and the output feedback apparatus  360  shown in  FIG. 3 . As shown in  FIG. 4B , a line chart of an error diffusion weighting values of b 1  and b 2  shows that a corresponding error diffusion weighting value can be derived according to the color level value C(x, y) of cyan.  FIG. 5A  is a diagram of a distribution of weighting values b 1  and b 2 . The second terminal of the error diffusion apparatus  350  receives the error value D e (x, y) of cyan of the specific pixel, and then the error diffusion apparatus  350  generates an error diffusion value C e (x, y) of cyan of the specific pixel. 
         [0027]    The output feedback apparatus  360  comprises a first terminal and a second terminal, and the first terminal receives the color level value C(x, y) of cyan of the specific pixel to generate a first output feedback weighting value a 1  and a second output feedback weighting value a 2 .  FIG. 4C  is a line chart of a distribution of the output feedback weighting values a 1  and a 2 . A corresponding output feedback weighting value therefore can be derived according to the color level value C(x, y) of cyan.  FIG. 5B  is a diagram of a distribution of the weighting values a 1  and a 2 . The second terminal of the output feedback apparatus  360  receives the two-level value D(x, y) of cyan of the specific pixel, and then the output feedback apparatus  360  generates an output feedback value C h (x, y) of cyan of the specific pixel. 
         [0028]    Please note that the aforementioned printing apparatus  300  could be a laser printer or a multi-function printer, but this is not meant to be a limitation to the scope of the present invention. 
         [0029]    Please be aware that the aforementioned first threshold value t 1  is larger than or equal to the second threshold value t 2 . A first value D 1  is output to serve as the output two-level value D(x, y) of cyan of the specific pixel when the second modified color level value C 12 ( x, y ) of cyan of the specific pixel is larger than the first threshold value t 1 , a first value D 1  is output to serve as the output two-level value D(x, y) of cyan of the specific pixel when the second modified color level value C 12 ( x, y ) of cyan of the specific pixel is smaller than the second threshold value t 2 , and the output two-level value D(x, y) of cyan of the specific pixel is determined according to a two-level image (as shown in  FIG. 6  which is a diagram of a two-level image) when the second modified color level value C 12 ( x, y ) of cyan of the specific pixel is between the first threshold value t 1  and the second threshold value t 2 . 
         [0030]    The aforementioned first value D 1  could be set as 255, and the second value D 2  could be set as 0, but this is not meant to be a limitation to the scope of the present invention. 
         [0031]    Please note that the aforementioned parameters, including a 1 , a 2 , b 1 , b 2 , t 1 , t 2 , could be set by fixed values for follow-up operations. 
         [0032]    Please refer to  FIG. 7 .  FIG. 7  is a flowchart of an operational example of a tone dependent green noise error diffusion method according to the present invention. Please note that if substantially the same result can be derived, the following steps are not required to be executed in the exact order shown in  FIG. 7 . The exemplary flow includes the following steps: 
         [0033]    Step  702 : Start. 
         [0034]    Step  704 : Derive a color level value of a first color of a specific pixel in a continuous-tone input image. 
         [0035]    Step  706 : Generate a first output feedback weighting value and a second output feedback weighting value according to the color level value of the first color of the specific pixel. 
         [0036]    Step  708 : Execute an output feedback operation to generate a modified color level value according to the first output feedback weighting value and the second output feedback weighting value of the specific pixel. 
         [0037]    Step  710 : Generate a first threshold value and a second threshold value of the first color according to the color level value of the first color. 
         [0038]    Step  712 : Determine whether the modified color level value of the first color is larger than the first threshold value: if yes, go to step  720 ; otherwise, go to step  730 . 
         [0039]    Step  720 : Output a first value, and proceed to step  760 . 
         [0040]    Step  730 : Determine whether the modified color level value of the first color is smaller than the second threshold value: if yes, go to step  740 ; otherwise, go to step  750 . 
         [0041]    Step  740 : Output a second value and proceed to step  760 . 
         [0042]    Step  750 : Determine an output two-level value of the first color of the specific pixel according to a two-level image, then proceed to step  760 . 
         [0043]    Step  760 : Generate a first error diffusion weighting value and a second error diffusion weighting value of the first color according to the color level value of the first color of the specific pixel. 
         [0044]    Step  762 : Execute an error diffusion operation according to the output two-level value of the first color, the first error diffusion weighting value and the second error diffusion weighting value. 
         [0045]    Step  764 : Determine whether the processing of the whole continuous-tone input image is finished: if yes, go to step  766 ; otherwise, go back to step  704 . 
         [0046]    Step  766 : End. 
         [0047]    Please refer to the steps in  FIG. 7  in conjunction with the elements in  FIG. 3  to obtain a detailed comprehension of interactions among each element. Further operation of steps in  FIG. 7  is omitted for succinctness. It should be noted that the aforementioned steps are only one applicable embodiment of the present invention, and are not meant to be a limitation to the scope of the present invention. Other steps can be inserted in between, or several steps can be combined into a single step without departing from the spirit of the present invention. 
         [0048]    The aforementioned embodiments are for illustrations of characteristics of the present invention, rather than limitations to the present invention. The green-noise error diffusion method and the printing apparatus thereof disclosed in this invention modify the prior art techniques to solve the defects of the regular pattern in bright color level, middle color level and dark color level, thereby greatly improving the quality of image printing. 
         [0049]    Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.