Abstract:
A method and system generates a reconstructed gray scale image of pixels from a binary image of pixels by reverse propagating an error, in a diffused manner, to the pixels of the binary image to create pixels representing a reconstructed gray scale image. The reverse propagation of the error determines if a current pixel has a first predetermined value; sets an error value to a first error value if the current pixel has the first predetermined value; sets the error value to a second error value if the current pixel does not have the first predetermined value; and propagates a diffused error value to a pixel neighboring the current pixel to create an error diffused pixel, the diffused error value being a product of the set error value and a weighting coefficient associated with the pixel neighboring the current pixel. A Gaussian filter may be utilized to filter the pixels representing a gray scale image to create a filtered reconstructed gray scale image of pixels.

Description:
BACKGROUND AND SUMMARY 
       [0001]    In a conventional digital multifunction reprographic system, a scanner accepts a document to be copied, scanned, or otherwise subsequently processed and converts the document into an electronic image or images. These images, usually in the form of pages, are then passed to a central control unit which may re-order or reorganize these pages and then, depending on the request of the user of the device, send the pages or images to a destination. Often this destination is an attached printing unit which makes one or more copies of the original document. 
         [0002]    The conventional multifunction digital device includes an image path. This is the combination of software and hardware elements. The software and hardware elements accept the electronic images from a multiplicity of sources and perform a plurality of operations needed to convert the images to the format desired for the various output paths. 
         [0003]    The image path for a conventional multifunction device usually has several constraints. On one hand, there is a desire to make the image path utilize data in a multi-bit per pixel format so as to provide for maximum image quality and a minimum loss of critical information in the transformation of documents from paper to electronic form. On the other hand, cost constraints and performance limits on the devices or software may comprise the image path. 
         [0004]    A conventional image path may also utilize a binary image path. In this situation, if the input information is scanned or otherwise obtained in a binary manner at sufficiently high resolution, and if the need arises for further image processing that can be performed only on multi-bit per pixel then the scanned image can be reconstructed with little or no perceptible loss of image quality. 
         [0005]    Another conventional image path uses analog data in the image path. In this conventional image path, the data from the scanner is digitized, processed in contone, and then converted to binary. 
         [0006]    All of the intermediate elements of the image path are designed to work with multi-bit per pixel data which is converted as a last step to binary or with the compact binary data format. Only at the final output is the binary data converted to a multi-bit (gray scale) format. 
         [0007]    It is further noted that in such conventional systems, which convert gray scale image data to binary image data (so as to be processed by the binary data image path) and back to gray scale image data for rendering, a halftone process is conventionally utilized which includes the utilization of error diffusion to convert gray scale image data to binary image data. 
         [0008]    In this process, a pixel of gray scale image data is compared to a threshold values or threshold values and depending upon the relationship of the value of the pixel of gray scale image data, a binary data value is generated. 
         [0009]    For example, if the possible pixel value of the gray scale image data has a value between 0 and 255, the threshold value may be 128 such that a pixel value of the gray scale image data that is equal to or greater than 128 would generate a binary value of 1 (representing a gray scale value of 255) and a pixel value of the gray scale image data that is equal less than 128 would generate a binary value of 0 (representing a gray scale value of 0). In each instance, there would be a difference between the original a pixel value of the gray scale image data and the converted value. This difference is the error of the conversion process. 
         [0010]    In a conventional conversion process that utilizes error diffusion, the error is diffused (scattered or propagated) to neighboring pixels of the gray scale image data. More specifically, the error may be conventionally propagated to the next pixel in the scanline and to adjacent pixels in the next scanline. 
         [0011]    Moreover, in conventional error diffusion processes, the error is weighted such that an adjacent pixel does not necessarily receive all the error, only a portion thereof. 
         [0012]    Examples of conventional error diffusion processes and various weighting methods are disclosed in U.S. Pat. No. 5,608,821; U.S. Pat. No. 5,696,601; U.S. Pat. No. 5,809,177; U.S. Pat. No. 5,880,857; U.S. Pat. No. 6,144,775; U.S. Pat. No. 6,325,487; U.S. Pat. No. 6,608,700; U.S. Pat. No. 7,719,722; and U.S. Pat. No. 7,869,095. 
         [0013]    The entire contents of U.S. Pat. No. 5,608,821; U.S. Pat. No. 5,696,601; U.S. Pat. No. 5,809,177; U.S. Pat. No. 5,880,857; U.S. Pat. No. 6,144,775; U.S. Pat. No. 6,325,487; U.S. Pat. No. 6,608,700; U.S. Pat. No. 7,719,722; and U.S. Pat. No. 7,869,095 are hereby incorporated by reference. 
         [0014]    With respect to converting the binary image data to gray scale image data, low pass filtering and look-up table based approaches are conventional implementations of reconstructing gray scale image data (gray scale image data) from halftone image data (binary image data). Examples of different conventional lowpass filters are halfband lowpass, Gaussian lowpass, and lowpass filtering based on singular value decomposition. 
         [0015]    However, if the halftone image data (binary image data) is initially generated from gray scale image data (gray scale image data) using an error diffusion process, the error diffusion can inject noise into the gray scale image primarily in the high frequency range. In other words, since an error diffusion process injects high frequency noise, a low pass filter cannot necessarily remove all of the noise purposefully introduced by the error diffusion process. 
         [0016]    However, if a high pass filter is utilized to address the noise injected by the error diffusion [process, there may have been high frequency components in the original gray scale image, such that removal of noise by a high pass filter would also remove these desirable high frequency components of the original image data, particularly a text region may lose sharpness due to the removal of the desirable high frequency components of the original image data. 
         [0017]    In the above-mentioned conventional look-up table based approaches for reconstruction of gray image from error diffused binary, a small window is slid over the error diffused image data. The content of the binary pixels in the window serves as an address to a look-up table. A gray level value is then retrieved as the constructed gray level of the center pixel in the window. 
         [0018]    The conventional look-up table is constructed by a training algorithm using a collection of test images. The training of the conventional look-up table is time consuming. 
         [0019]    Moreover, since conventional error diffusion produces a binary image in which the local average within any small area of the image approximates the gray level of the corresponding small area of the original gray scale image, very different bit patterns corresponding to the same local gray level can be obtained by simply shifting a halftoning window a small amount in any direction. The different bit patterns will result in different addressing to the look-up table during inverse halftoning. Also, very different binary images from the same gray scale image can be generated by merely changing the initial condition in the error diffusion process. 
         [0020]    Therefore, it is desirable to provide a system and method for converting binary image data to gray scale image data that removes noise injected during an error diffusion process. 
         [0021]    Moreover, it is desirable to provide a system and method for converting binary image data to gray scale image data that does rely upon a time consuming training algorithm. 
         [0022]    In addition, it is desirable to provide a system and method for converting binary image data to gray scale image data that does not generate different bit patterns corresponding to the same local gray level by simply shifting a halftoning window a small amount in any direction. 
         [0023]    It is also desirable to provide a system and method for converting binary image data to gray scale image data that does not generate different binary images from the same gray scale image by merely changing the initial condition in the error diffusion process. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWING 
         [0024]    The drawings are only for purposes of illustrating various embodiments and are not to be construed as limiting, wherein: 
           [0025]      FIG. 1  shows the image path for a conventional multifunction reprographic system; 
           [0026]      FIG. 2  shows a flowchart of the image processing utilized in a conventional multifunction reprographic system; 
           [0027]      FIG. 3  shows a block diagram of a conventional error diffusion process; 
           [0028]      FIG. 4  shows a graphical representation of an inverse error diffusion process; and 
           [0029]      FIG. 5  shows a block diagram of an example of a binary image data to gray scale image data conversion process using an inverse projection with inverse error diffusion; and 
           [0030]      FIG. 6  shows a flowchart of an example of a binary image data to gray scale image data conversion process using an inverse projection with inverse error diffusion. 
       
    
    
     DETAILED DESCRIPTION 
       [0031]    For a general understanding, reference is made to the drawings. In the drawings, like references have been used throughout to designate identical or equivalent elements. It is also noted that the drawings may not have been drawn to scale and that certain regions may have been purposely drawn disproportionately so that the features and concepts could be properly illustrated. 
         [0032]      FIG. 1  shows, in schematic form the general, image path of a conventional multifunction reprographic system. The image path is a combination of hardware and software elements that generate, process, and store the digital page images. A control system (not shown) configures each element of the image path depending on the user job. The control system also schedules the various jobs and functions of the entire system. 
         [0033]    As illustrated in  FIG. 1 , digital scanner  101  accepts a hardcopy version of the page or pages to be copied and converts each page to a digital image, in gray scale form, at some moderately high resolution. Within the scanner  101 , there are usually electronic elements that do some initial processing of the image, correcting, if needed, for any optical or illumination defects in the scanner  101 . 
         [0034]    The digital page image is then passed to a preprocessor  102  that performs further manipulations of the page image, such as editing, or tone curve correction. The preprocessor  102  converts the gray scale image from the scanner  101  to a binary image  109 . The preprocessor  102  also can form a tag image  110 . This tag image  110  can identify, at a pixel level, various characteristics of the underlying page image. For example, the tag image can indicate whether a pixel in the page image is part of a sharp edge or not. Further details of the tag image will be described below. 
         [0035]    After the preprocessing, the page and tag images are passed through a compression circuit  103  which losslessly compresses the page and tag images to a smaller size. The compressed images are then passed to a memory  104 . The memory  104  stores each page image and its associated tag image, and keeps track of all the relevant sets of images that comprise the document being copied. The memory  104  can be used for many purposes, including for example, the ability to print multiple copies of an input document with a single scan. There are many other functions of the memory  104  that are well known to those skilled in the art. 
         [0036]    At the time of marking, the compressed page and tag image in memory are first decompressed using the decompressor circuit  105  and the resultant image and tag are passed to the binary to gray scale converter  106 . The binary to gray scale converter  106  is conventionally implemented as a two-dimensional digital filter. 
         [0037]    The filter may be altered by incorporating one or more adaptive elements that are used to enhance edges that are characteristic of text and line art copy. With suitable tagging apparatus upstream, the filter may be switched between one of several modes to adapt to the content of the portion of the image being converted. 
         [0038]      FIG. 2  shows a flowchart of the image processing utilized in a conventional multifunction reprographic system. As illustrated in  FIG. 2 , initially, gray scale image data is received, at step S 10 . 
         [0039]    At step S 20 , the gray scale image data is converted to binary image data. Thereafter, the binary image data may be processed by various image processing routines, at step S 30 . 
         [0040]    At step S 40 , the processed binary image data is converted to gray scale image data. Thereafter, the converted (reconstructed) gray scale image data may be rendered by a printing device, at step S 50 . 
         [0041]      FIG. 3  illustrates a conventional error diffusion process. More specifically, a gray scale image F=f(i, j) is an N×M two dimensional matrix of pixels taking real intensities number in the range [0, 1] (1≦i≦N, 1≦j≦M). A binary image B=b(i, j) is a two dimensional matrix of pixels taking a binary value 0 (black) or 1 (white). 
         [0042]    It is noted that the binary value may be 1 (black) or 0 (white). The actual binary value representation depends upon whether the printing device is a write black printing device or a write white printing device. 
         [0043]    Error diffusion is designed to preserve the average intensity level between input and output images by propagating the quantization error to unprocessed neighboring pixels according to some fixed ratios (weighting coefficients). In error diffusion, the pixel values b(i, j) of binary image is determined in raster scan order. The value of b(i, j) may be determined by simply thresholding as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     b 
                      
                     
                       ( 
                       ij 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           0 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 f 
                                  
                                 
                                   ( 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             ≤ 
                             
                               1 
                               / 
                               2 
                             
                           
                         
                       
                       
                         
                           1 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 f 
                                  
                                 
                                   ( 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             &gt; 
                             
                               1 
                               / 
                               2 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
       
         [1] The quantization error e(i, j), is computed by: 
       
     
         [0000]        e ( i, j )= f ( i, j )− b ( i, j ).   (2)
   [2] The error diffusion process selects the pixel values of binary image which minimize the absolute value of error |e(i, j)|, and then distributes the weighted error to a set of unprocessed pixels, as shown below.   
 
         [0000]        f ( i+k, j+l )← f ( i+k, j+l )+ h ( k, l )· e ( i, j )   (3)
 
         [0046]    As illustrated in  FIG. 3 , a gray scale image data value {circumflex over (f)}(i, j) is converted (quantized) to a binary image data value b(i, j) by a quantization circuit  220 . The binary image data value b(i, j) and the gray scale image data value {circumflex over (f)}(i, j) are received by an error generation circuit  230  to generate the quantization error e(i, j). The error generation circuit (Q)  230  may be an adder which determine the absolute difference between the binary image data value b(i, j) and the gray scale image data value {circumflex over (f)}(i, j) 
         [0047]    The quantization error e(i, j) is received by a diffusion circuit (H)  240  which diffuses the quantization error e(i, j) to adjacent pixels based upon a set of predetermined weighting coefficients. 
         [0048]    As illustrated the initial gray scale image data value f(i, j) is modified based upon adding a quantization error value received from the diffusion circuit (H)  240  to the initial gray scale image data value f(i, j) at adder  210  to generate {circumflex over (f)}(i, j). 
         [0049]    In an inverse error diffusion process, for a given binary image b(i, j) and an error diffusion kernel h(i, j) (weighting coefficients), a gray scale image {circumflex over (f)}(i, j) is determined so that when {circumflex over (f)}(i, j) is error diffused, {tilde over (b)}(i, j) is obtained. The mathematical relationship governing {circumflex over (f)}(i, j), h(i, j), and b(i, j) are given above in equations (1)-(3) where f(i, j) in equation (1) is replaced by {circumflex over (f)}(i, j). Due to the quantization process in equation (3), the problem of determining {circumflex over (f)}(i, j), for a given b(i, j) and h(i, j), does not have a unique solution. 
         [0050]    To address this issue, a reversal of the error diffusion mechanism is utilized, as illustrated in  FIG. 4 . As illustrated in  FIG. 4 , a gray scale image is obtained from an error diffused binary image generated by reverse propagation of predicted errors weighted using an error diffusion filter kernel. An example of the reverse error diffusion process will be described in more detail below utilizing  FIG. 4 , wherein the example utilizes a Floyd-Steinberg error diffusion kernel (set of weighting coefficients). However, it is noted that any error diffusion kernel (set of weighting coefficients) can be utilized 
         [0051]    In this example, as illustrated in  FIG. 6 , the reverse error diffusion process sets {circumflex over (f)}=b, at step S 115 . Thereafter, at step S 120 , the current pixel (i, j) is set to the (M−1, N−1) th  pixel of the M×N image, as illustrated in  FIGS. 4 and 6 . At step S 125 , it is determined if b(i, j)=0. If it is determined that b(i, j)=0 at step S 125 , the process sets, at step S 135 , the error to −0.25, else, at step S 130 , the process sets error to 0.25. 
         [0052]    A weighted error, using an error filter coefficient, is added ( 310  of  FIG. 4 ) to the (M−1, N) th  pixel of the M×N image, at step S 140 . Moreover, at step S 140 , weighted errors, using an error filter coefficients, are added ( 320  of  FIG. 4 ) to the (M, N) th  pixel of the M×N image, the (M, N−1) th  pixel of the M×N image, and the (M, N−2) th  pixel of the M×N image. It is noted that the diffusion may include additional pixels depending upon the error diffusion kernel utilized. The following equation represents the reverse error diffusion process for the neighboring pixel: {circumflex over (f)}(i+k, j+l)←{circumflex over (f)}(i+k, j+l)+h(k, l)*error. 
         [0053]    In the reverse error diffusion process, at step S 145 , it is determined if b(i+1, j+1)=0 and {circumflex over (f)}(i+1, j+1)&gt;0.5. If it is determined that b(i+1, j+1)=0 and {circumflex over (f)}(i+1, j+1)&gt;0.5, the error is decreased, at step S 155 , new error=error−(error/2). 
         [0054]    At step S 150 , it is determined if b(i+1, j+1)=1 and {circumflex over (f)}(i+1, j+1)&lt;0.5. If it is determined that b(i+1, j+1)=1 and {circumflex over (f)}(i+1, j+1)&lt;0.5, the error is increased, at step S 160 , new error=error+(error/2), else the process goes to step S 175 . 
         [0055]    If the error is changed (decreased or increased), the neighborhood pixels values, at step S 165 , are changed to old values, {circumflex over (f)}(i+k, j+1)←{circumflex over (f)}(i+k, j+l)−h(k, l)*error. 
         [0056]    Thereafter, at step S 170 , the error is set to the new error, and the new error value is used to obtain neighborhood pixels values, {circumflex over (f)}(i+k, j+1)←{circumflex over (f)}(i+k, j+1)+h(k, l)*error. 
         [0057]    The error value is subtracted, at step S 175 , from current pixel, {circumflex over (f)}(i, j)={circumflex over (f)}(i, j)−error. At step S 180 , the process now moves ( 330  of  FIG. 4 ) to the next pixel in reverse order. For example, if the current pixel is the (M−1, N−1) th  pixel of M×N image, the process moves to the (M−1, N−2) th  pixel of M×N image. 
         [0058]    When the process moves to the first pixel of the scanline ((1, N−1) th  pixel of M×N image), the process moves to the (M−2, N−1) th  pixel of M×N image. 
         [0059]    After moving to the next pixel, the reverse error diffusion process is repeated until the first pixel (step S 185 ) is processed. 
         [0060]    A block diagram of this overall process is illustrated in  FIG. 5 . As illustrated in  FIG. 5 , the inverse projecting with error diffusion filter  420  receives a binary image  410 . The inverse projecting with error diffusion filter  420  converts the binary image into a gray scale image utilizing the above-described reverse error diffusion process. 
         [0061]    The converted gray scale image may pass through a Gaussian filter  430  to create a reconstructed gray scale image  440 . 
         [0062]    It is noted that other filters, such as sigma filters, may be used instead of the Gaussian filter. Examples of filters which can process the converted gray scale image data are: (1) 3×3 sigma 0.5 filter; (2) 3×3 sigma 1.0 filter; (3) 3×3 sigma 2.0 filter; (4) 3×3 Gaussian sigma 0.5 filter; (5) 3×3 Gaussian sigma 1.0 filter; (6) 3×3 Gaussian sigma 2.0 filter; or (7) 5×5 Gaussian sigma 0.5 filter. Each of these filters will generate a different a Peak Signal to Noise Ratio (PSNR) for the reconstructed image. 
         [0063]    The Peak Signal to Noise Ratio (PSNR) for a given original image X of size M×N and its reconstructed image X est  is defined as follows: 
         [0000]    
       
         
           
             PSNR 
             = 
             
               10 
                
               
                   
               
                
               
                 log 
                 10 
               
                
               
                 
                   255 
                   2 
                 
                 
                   
                     ( 
                     
                       1 
                       NM 
                     
                     ) 
                   
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       
                         N 
                         - 
                         1 
                       
                     
                      
                     
                         
                     
                      
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           0 
                         
                         
                           M 
                           - 
                           1 
                         
                       
                        
                       
                           
                       
                        
                       
                         
                           ( 
                           
                             
                               X 
                               ij 
                             
                             - 
                             
                               X 
                               ij 
                               est 
                             
                           
                           ) 
                         
                         2 
                       
                     
                   
                 
               
             
           
         
       
     
         [0064]    It is noted that images may become more blurred with increasing sigma. Inverse projection with filtering produces high Peak Signal to Noise Ratio images for lesser sigma values compared to a process using only a Gaussian low pass filter. Thus, inverse projection with filtering provides better edge quality images with a higher Peak Signal to Noise Ratio without requiring edge detection from a segmentation process. 
         [0065]    It will be appreciated that various of the above-disclosed and other features and functions, or alternatives thereof, may be desirably combined into many other different systems or applications. Also that various presently unforeseen or unanticipated alternatives, modifications, variations or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.