Abstract:
An apparatus and method are provided for processing image data using error diffusion. The apparatus and method decode image data compressed in a joint photographic experts group (JPEG) format, convert the image data into color coordinates without storing the image data in a memory, and perform a binarization by calculating error values in accordance with the image data in the unit of block to generate a final output data which is  1  bit long. Since the apparatus and method for processing image data using error diffusion do not require an operation of transmitting and storing the image data to a system memory through a DMA controller, the performance of a system is improved. Also, since the memory does not require a large storage space to store the decoded image data, its utility is improved.

Description:
CROSS-REFERENCE TO RELATED APPLICATION  
       [0001]     This application claims the benefit under 35 U.S.C. §119(a) of Korean Patent Application No. 2005-97577, filed in the Korean Intellectual Property Office on Oct. 17, 2005, the entire disclosure of which is hereby incorporated by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     The present invention relates to an apparatus and method for processing image data using error diffusion. More particularly, the present invention relates to an apparatus and method for processing image data using error diffusion, which decodes image data compressed in a joint photographic experts group (JPEG) format, converts the image data into color coordinates without storing the image data in a memory, and performs a binarization by calculating error values in accordance with the image data in the unit of block to generate a final output data which is 1 bit long.  
         [0004]     2. Description of the Related Art  
         [0005]     Typically, an image processing apparatus compresses image data corresponding to an image input from an external device in a joint photographic experts group (JPEG) format. The image processing apparatus stores the compressed image data to a memory by performing a direct memory access (DMA) operation. Also, the image processing apparatus reads out the image data from the memory by performing the DMA operation at the external device&#39;s request. The DMA operation is controlled by a DMA processor, not by a central processing unit (CPU), and directly transmits data from the memory connected to a bus which is connected to a channel or vice versa.  
         [0006]      FIG. 1A  is a block diagram illustrating a conventional image processing apparatus capable of decoding image data.  
         [0007]     The conventional image processing apparatus  100  comprises an image data pre-processor  110 , a memory  120 , a DMA controller  130 , an image compressor  140 , and an image data decoder  150 .  
         [0008]     The image data pre-processor  110  outputs a luminance component Y and chrominance components Cb and Cr of image data at any one of the following sampling ratios: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1. The image data pre-processor  100  outputs the image data in the order of Y, Cb, Cr in the form of a raster image which is represented in the unit of line.  
         [0009]     The DMA controller  130  stores the image data output in the unit of line to each area of the memory  120  according to the components of the image data. The DMA controller  130  reads out the image data components Y, Cb, Cr from the memory  120  at any one of the following sampling ratios: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1 in the unit of block consisting of 8×8 pixels, and transmits the image data components Y, Cb, Cr to the image compressor  140 .  
         [0010]     The image compressor  140  encodes and compresses the transmitted image data components into binary data using a discrete cosine transform (DCT), a quantization, and Huffman code, sequentially. The compressed image data is stored in the memory  120 .  
         [0011]     The image data decoder  150  performs the reverse operation of that of the image compressor  140 , thereby decoding the image data into any one of the following formats: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1. Also, the DMA controller  130  stores the respective image data components in the memory  120 . The respective image data components are decoded into any one of the following formats: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1, to the memory  120 . Next, the DMA processor  130  converts the image data into CMYK color coordinates that are compatible with a printer when the decoding of a certain amount of image data is completed. The DMA processor  130  then binarizes the image data into a final image data of 1 bit that is compatible with the printer.  
         [0012]     An error diffusion method is frequently used to binarize image data. As shown in  FIG. 1B , a conventional error diffusion binarization method performs a calculation according to image data consisting of 8×8 pixels in the unit of line. More specifically, a calculation in accordance with a first row of image data consisting of pixels a 00 , a 10 , a 20 , a 30 , a 40 , a 50 , a 60 , a 70  is performed and stored in the memory  120 . Next, a calculation with respect to a second row of image data consisting of pixels a 01 , a 11 , a 21 , a 31 , a 41 , a 51 , a 61 , a 71  is performed and stored in the memory  120 . Next, calculations are performed in the order of third, fourth, fifth, sixth, and seventh rows. A final calculation is calculated and stored in the memory  120  with respect to a final row of image data consisting of pixels a 0n , a 1n , a 2n , . . . , a (m−1)n , a mn .  
         [0013]     According to the error diffusion binarization performed in the unit of line as described above, the first row of image data may have a correlation with the second row of image data as shown in  FIG. 1 , although the image data consisting of 8×8 pixels is converted into the CMYK color coordinates. Therefore, if the calculations for the error diffusion binarization are stopped, an error occurs in the unit of row and a final printed image data is difficult to perceive.  
         [0014]     Accordingly, there is a need for an improved system and method for processing image data using error diffusion.  
       SUMMARY OF THE INVENTION  
       [0015]     An aspect of exemplary embodiments of the present invention is to address at least the above problems and/or disadvantages and to provide at least the advantages described below. According to an aspect of exemplary embodiments of the present invention, an apparatus and method for processing image data using error diffusion is provided. Image data compressed in a JPEG format is decoded and converted to color coordinates without storing the image data in a memory. A binarization is performed by calculating error values with respect to the image data in the unit of block in a diagonal direction to generate a final output data which is 1 bit long.  
         [0016]     The above aspect of the exemplary embodiments of the present invention is achieved by providing an image data processing apparatus. The image data processing apparatus includes an image decoder that decodes image data compressed in a joint photographic experts group (JPEG) format into a predetermined block form according to a sampling ratio. A color coordinates converter and an error diffusion binarization unit are also included. The color coordinates converter converts the decoded image data into color coordinates and the error diffusion binarization unit performs a binarization by calculating error values in a diagonal direction with respect to the image data which is converted into the color coordinates.  
         [0017]     The above aspect is also achieved by providing a method for processing image data using error diffusion. Image data compressed in a JPEG format is decoded into a predetermined block form according to a sampling ratio. The decoded image data is converted into color coordinates and an error diffusion binarization is performed by calculating error values in a diagonal direction with respect to the image data which is converted into the color coordinates.  
         [0018]     Preferably, the predetermined block form consists of 8×8 pixels, and the color coordinates are CMYK color coordinates including cyan, magenta, and yellow. Preferably, the sampling ratio is one of the following: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1. With reference to the sampling ration, Y denotes a luminance component and Cb and Cr denote a chrominance component.  
         [0019]     The error diffusion binarization unit performs a binarization by calculating a first error value using a pixel lying in a first row and a first column and a pixel lying in the first row and a second column. A second error value is calculated using the pixel lying in the first row and the second column and a pixel lying in a second row and the first column. A third error value is calculated using a pixel lying in the first row and a third column, a pixel lying in the second row and the second column, and a pixel lying in a third row and the first column. The subsequent error values are calculated using the same pattern as described above.  
         [0020]     Preferably, but not necessarily, the error diffusion binarization unit performs a binarization by calculating row-directional error values using pixels lying in each row, wherein a last pixel used to calculate a certain row-directional error value is diagonally ahead of one used to calculate a previous row-directional error value of the certain row-directional error value.  
         [0021]     Other objects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0022]     The above and other exemplary objects, features and advantages of certain exemplary embodiments of the present invention will become apparent and more readily appreciated from the following description of the embodiment, taken in conjunction with the accompanying drawings of which:  
         [0023]      FIG. 1A  is a block diagram illustrating a conventional image processing apparatus having the capability of decoding image data;  
         [0024]      FIG. 1B  is a view explaining a conventional error diffusion binarization method to perform a calculation in the unit of line;  
         [0025]      FIG. 2  is a block diagram schematically illustrating an image data processing apparatus according to an exemplary embodiment of the present invention;  
         [0026]      FIG. 3  is a view illustrating an error diffusion binarization method according to a first exemplary embodiment of the present invention; and  
         [0027]      FIG. 4  is a view illustrating an error diffusion binarization method according to a second exemplary embodiment of the present invention. 
     
    
       [0028]     Throughout the drawings, the same drawing reference numerals will be understood to refer to the same elements, features, and structures.  
       DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS  
       [0029]     The matters defined in the description such as a detailed construction and elements are provided to assist in a comprehensive understanding of the embodiments of the invention. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.  
         [0030]     A general error diffusion method will be described for the sake of understanding the exemplary embodiments of the present invention.  
         [0031]     An image displayer displays a grayscale image on a display panel according to a sequence of incoming image data. A quantization process is required to represent an original image having grayscale values by color on the image displayer which may have low grayscale values. This is due to the fact that the grayscale values reproducible on the image displayer are limited. Therefore, a difference occurs between the grayscale value of the original image and the grayscale value output to the display panel.  
         [0032]     One approach to reducing the difference occurring between the grayscale value output to the display panel and the grayscale value of the original is error diffusion. Error diffusion refers to the process of diffusing an error occurring in a certain pixel during the quantization to neighboring pixels and thereby generating support for grayscales with respect to the neighboring pixels within a predetermined area. Error diffusion greatly improves a driving performance of the image displayer at a low cost and also easily obtains a sufficient image grayscale.  
         [0033]      FIG. 2  is a block diagram illustrating an image data processing apparatus  200  according to an exemplary embodiment of the present invention.  
         [0034]     As shown in  FIG. 2 , the image data processing apparatus  200 , according to an exemplary embodiment of the present invention, comprises an image data decoder  150 , a color coordinates converter  210 , and an error diffusion binarization unit  220 .  
         [0035]     The image data processing apparatus  200 , according to an exemplary embodiment of the present invention, does not have a DMA controller  130 . Alternatively, the conventional image processing apparatus  100  may have a DMA controller  130 . Accordingly, the image data processing apparatus  200  does not require an operation of storing decoded image data in the memory  120  through the DMA controller  130 .  
         [0036]     Since the image data pre-processor  110  and the memory  120  were described with reference to  FIG. 1A , they are omitted from  FIG. 2  for clarity and conciseness.  
         [0037]     The image data decoder  150  decodes compressed image data into specific formats according to a sampling ratio. For example, the image data decoder  150  decodes compressed image data into any one of the following formats: Y:Cb:Cr=4:4:4; Y:Cb:Cr=4:2:2; or Y:Cb:Cr=4:1:1 according to a sampling ratio. The decoded image data is in the unit of block consisting of 8×8 pixels.  
         [0038]     The color coordinates converter  210  converts the image data which is decoded by the image data decoder  150  into CMYK color coordinates which are compatible with a printer.  
         [0039]     A color printer mixes three ink colors of cyan, magenta, yellow based on the CMYK color coordinates and thereby prints a color image. There are 7 combinations of colors available for one pixel, such as cyan (C), magenta (M), yellow (Y), blue (B=cyan+magenta; C+M), red (R=magenta+yellow; M+Y), green (G=yellow+cyan; Y+C), and black (B=cyan+magenta+yellow; C+M+Y). If white is added in the combinations, it is possible to print 8 colors of image. To perform a color error diffusion binarization, a target pixel is designated in the raster scanning order, and color components of the target pixel are divided and converted into C, M, and Y.  
         [0040]     The error diffusion binarization unit  220  performs a binarization by calculating error values with respect to image data consisting of blocks. Each block consists of 8×8 pixels in a diagonal direction as shown in  FIG. 3 .  
         [0041]     Also, the error diffusion binarization unit  220  performs a binarization by calculating error values in a row direction. Herein, a last pixel used to calculate a certain error value is diagonally ahead of one used to calculate the previous error value of the certain error value.  
         [0042]      FIG. 3  is a view illustrating an error diffusion binarization method according to a first exemplary embodiment of the present invention.  
         [0043]     There are well-known error diffusion methods such as Floyd-Steinberg and Stucki. The Floyd-Steinberg error diffusion method is commonly used to convert grayscale or continuous-tone color images into something with a small number of bits per pixel. The exemplary embodiments of the present invention employ the Floyd-Steinberg error diffusion method.  
         [0044]     As shown in  FIG. 3 , the error diffusion binarization method according to the first exemplary embodiment of the present invention calculates a first error value e 00  using a pixel a 00  lying in the first row and the first column and a pixel a 10  lying in the first row and the second column. The error diffusion binarization method calculates a second error value e 10  using a pixel a 10  lying in the first row and the second column and a pixel a 01  lying in a diagonal direction to the pixel a 10 , that is lying in the second row and the first column.  
         [0045]     A third error value e 20  is calculated using a pixel a 20  lying in the first row and the third column, a pixel a 11  lying in a diagonal direction to the pixel a 20 , that is lying in the second row and the second column, and a pixel a 02  lying in a diagonal direction to the pixel a 11 , that is lying in the third row and the first column.  
         [0046]     A fourth error value e 30  is calculated using a pixel a 30  lying in the first row and the fourth column, a pixel a 21  lying in the second row and the third column, a pixel a 12  lying in the third row and the second column, and a pixel a 03  lying in the fourth row and the first column. A fifth error value e 40  is calculated using a pixel a 40  lying in the first row and the fifth column, a pixel a 31  lying in the second row and the fourth column, a pixel a 22  lying in the third row and the third column, a pixel a 13  lying in the fourth row and the second column, and a pixel a 04  lying in the fifth row and the first column.  
         [0047]     A sixth error value e 50  is calculated using a pixel a 50  lying in the first row and the sixth column, a pixel a 41  lying in the second row and the fifth column, a pixel a 32  lying in the third row and the fourth column, a pixel a 23  lying in the fourth row and the third column, a pixel a 14  lying in the fifth row and the second column, and a pixel a 05  lying in the sixth row and the first column. A seventh error value e 60  is calculated using a pixel a 60  lying in the first row and the seventh column, a pixel a 51  lying in the second row and the sixth column, a pixel a 42  lying in the third row and the fifth column, a pixel a 33  lying in the fourth row and the fourth column, a pixel a 24  lying in the fifth row and the third column, a pixel a 15  lying in the sixth row and the second column, and a pixel a 06  lying in the seventh row and the first column.  
         [0048]     An eighth error value e 70  is calculated using a pixel a 70  lying in the first row and the eighth column, a pixel a 61  lying in the second row and the seventh column, a pixel a 52  lying in the third row and the sixth column, a pixel a 43  lying in the fourth row and the fifth column, a pixel a 34  lying in the fifth row and the fourth column, a pixel a 25  lying in the sixth row and the third column, a pixel a 16  lying in the seventh row and the second column, and a pixel a 07  lying in the eighth row and the first column. Briefly, the binarization is performed by calculating error values in the diagonal direction.  
         [0049]      FIG. 4  is a view illustrating an error diffusion binarization method according to a second exemplary embodiment of the present invention.  
         [0050]     The error diffusion binarization method according to the second exemplary embodiment of the present invention performs a binarization by calculating error values with respect to image data in the unit of block in a horizontal direction, such as, calculating row-directional error values using pixels in each row. At this time, the last pixel used to calculate a certain error value is diagonally ahead of one used to calculate the previous error value of the certain error value.  
         [0051]     More specifically, as shown in  FIG. 4 , a first row error value is calculated using pixels a 00 , a 10 , a 20 , a 30 , a 40 , a 50 , and a 60  lying in the first to the seventh columns of the first row, respectively. A second row error value is calculated using pixels a 01 , a 11 , a 21 , a 31 , a 41 , and a 51 , lying in the first to the sixth columns of the second row, respectively.  
         [0052]     A third row error value is calculated using pixels a 02 , a 12 , a 22 , a 32 , and a 42  lying in the first to the fifth column of the third row which is diagonally ahead of the last pixel a 51 (sixth column) used to calculate the second row error value. A fourth row error value is calculated using pixels a 03 , a 13 , a 23 , and a 33  lying in the first column to the fourth column of the fourth row which is diagonally ahead of the last pixel a 42  used to calculate the third row error value. The fifth, the sixth and the seventh error values are calculated using the same pattern. Preferably, the seventh error value is calculated using only the first column pixel a 06  of the seventh row so that the calculation of error values for the first block ‘a’ is completed.  
         [0053]     The calculation of a first row error value for the second block ‘b’ begins with seven pixels a 70  to b 50  lying in the eighth column of the first row to the sixth column of the second block ‘b’. That is, one row consisting of seven pixels is used to calculate each error value.  
         [0054]     A second row error value is calculated using seven pixel a 61  to b 41  lying in the seventh column of the second row of the first block ‘a’ to the fifth column of the second row of the second bock ‘b’ which is diagonally ahead of the last pixel b 50  used to calculate the first row error value.  
         [0055]     A third row error value is calculated using seven pixel values a 52  to b 32  lying in the sixth column of the third row of the first block ‘a’ to the fourth column of the third row of the second block ‘b’ which is diagonally ahead of the last pixel b 41  used to calculated the second row error value.  
         [0056]     The fourth row error value is calculated using pixels a 43  to b 23  which is diagonally ahead of the last pixel b 32  used to calculate the third row error value. The fifth row error value is calculated using pixels a 34  to b 14 , and the sixth row error value is calculated using pixels a 25  to b 05 .  
         [0057]     Next, the error diffusion binarization unit  220  calculates a seventh row error value using pixel a 16  to a 76 , and calculates an eighth row error value using pixels a 07  to a 67 .  
         [0058]     Briefly, the error diffusion binarization unit  220  performs a binarization by calculating error values with respect to the image data in the unit of block in the horizontal direction using the pixels in each row, wherein the last pixel used to calculate a certain error value is diagonally ahead of one used to calculate the previous error value of the certain error.  
         [0059]     According to exemplary embodiments of the present invention as described above, the performance of the system can be improved since the apparatus and method for processing image data using error diffusion does not require an operation of transmitting and storing the image data in a system memory through a DMA controller. Also, since the memory does not require a large storage space to store the decoded image data, utility can be improved.  
         [0060]     While the present invention has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.