Parallel error diffusion method and apparatus

Abstract: In order to display continuous tone colour image on a discrete colour level display, methods of halftoning must be used. The high display rate of colour output devices means that serial methods of real time halftoning are difficult to use. A method and apparatus (Fig. 9) are disclosed for reducing the speed with which a halftoning method must be performed by performing the halftoning of an output image in parallel by simultaneously error diffusing (53,54) more than one line of input (60) at a time.

Description: Field of Invention The present invention relates to a colour display apparatus such as colour computer displays and colour printers, and, in particular, to the display of colour images on a raster colour display apparatus. Description of the Prior Art The prior art will now be described with reference to the following drawings in which: Fig. 1 is view of a conventional single pixel of a CRT type display; Fig. 2 is a representation of a normalized colour cube; and Fig. 3 is a diagrammatic view of the Floyd and Steinberg error diffusion process. Colour raster graphic display devices are well known in the art. The display of colour images in these devices is normally achieved by means of a pixel map. A pixel map normally consists of individual pixels with each pixel in turn consisting of a collection of bits which represent the colour value of that pixel on the display device. The number of different possible bits in this collection corresponds with the number of different colours which may be displayed by the display device and hence the resolution with which the device can display a given image. Common colour systems generally store 8 or 24 bits per pixel, although other variations are possible. A display device displays the corresponding colour value of the pixel data input thereto, often to a high resolution. Common screen displays are capable of displaying a number of different pixels in the range of 1280 x 1024 pixels with each pixel capable of displaying generally up to 2 24 different colour values. Colours are often displayed on a computer display according to a particular model. The red, green, blue (RGB) colour model is one that is in common use with Cathode Ray Tubes (CRT) and colour raster display devices. Other colour display models include cyan, magenta, yellow (CMY) often used in colour-printing devices. An example of the use of the RGB model is in the NTSC picture display standard in common use with computer displays. In this standard, each pixel element is divided into 3 separate elements. These separate elements represent the Red, Green and Blue portion of a given pixel respectively. As seen in Fig. 1, the viewing surface of a colour CRT often consists of closely spaced, pixels. Each pixel 20 is made up of a red (R), green(G) and blue (B) phosphor dot or pixel element 19. These dots are generally sized sufficiently small that light emanating from the individual dots is perceived by the viewer as a mixture of the corresponding three colours. A wide range of different colours can thus be produced by a given pixel by varying the strength with which each phosphor dot is excited. A conversion arrangement (not shown, but known in the art) is normally provided so that the strength of each phosphor dot's excitation has some proportionality to the value of each of the above mentioned pixel element subgrouping. By way of example, a 24 bit per pixel colour display system divided into 8 bits for each of the three colours red, green and blue can be assumed. This corresponds to 2 8 or 256 separate intensity levels of each of red, green and blue respectively and therefore a total of 2 24 different colour values. A colour display capable of displaying this many colours can approximate a continuous tone image to such a degree that for all practical purposes the display can be considered to be a continuous tone display. In order to conceptualize the range of colours that can be printed by this method it is helpful to map these colours into a unit cube as shown in Fig. 2. The individual contributions of each of the 3 separate subgroups at any one particular point are added together to yield the final colour. For example, the main diagonal of the cube, with equal amounts of each primary, represents the different grey levels or grey scale, from black (0,0,0) to white (1,1,1) Many display devices are unable to actually display the full range of colours provided by, for example, a 24 bit input pixel. For example, a black and white raster image display can only display two colours, namely black and white, and is known as a bi-level device. Other colour display devices can only display a finite number of discrete intensity levels for each primary colour. By way of further example, in a colour bi-level device, such as a bi-level ferroelectric liquid crystal display (FLCD), each pixel element on the screen can be at just two intensity levels, either fully on or fully off. If, for example, a display device can display bi-level red, green, blue and white primary colours the total number of different colours that each pixel can display will be 2 4 = 16 different colours. If the input to the display device assumes that there is a larger number of intensity levels then there will be an error in the colour displayed, with the error being the difference between the exact pixel value required to be displayed and the approximated value actually displayed. Methods have been developed to increase the perceived number of colours displayable on an discrete colour display device such as a bi-level colour display. The methods used are known generally as halftoning. For an explanation of the different aspects of halftoning the reader is referred to the book 'Digital Halftoning' by Robert Ulichney, published in 1991 by MIT Press. One method described by Ulichney to improve the quality of a displayed image is called error diffusion. This process was developed by Floyd and Steinberg for a single colour (black or white) display and is described in "An Adaptive Algorithm for Spatial Gray Scale", Society for Information Display 1975 Symposium Digest of Technical Papers, 1975, 36. In the Floyd and Steinberg process, the error associated with each pixel value is added to the values of some of the neighbouring pixels of the given current pixel in such a manner that the sum of these additions is equal to the error associated with the pixel value. This has the effect of spreading, or diffusing, the error over several pixels in the final image to give an improved quality image. An example of this process is shown in Fig 3. In this example a decision is made to spread the error associated with a current pixel 21, such that two eighths of the error is assigned to a pixel 22 on the right of the current pixel 21, one-eighths is assigned to its neighbour 23, two eighths is assigned to a pixel 24 below the current pixel 21 and one eighths is assigned to pixels marked 25, 26, 27 respectively. High resolution displays in use commonly have pixel resolutions in the order of 1,280 x 1,024 = 1,310,720 pixels and a refresh rate in the order of 60 Hz. As mentioned previously, each pixel can have 24 bits associated with its colour value. It therefore follows that, if any processing of the pixels must be undertaken, then the high input rate of pixels would require this to be done at high speeds. In the above example, a total capacity of over 235 mega bytes per second would have to be handled by a system wishing to process the display input data. Error diffusion is an example of a process which requires high processing rates, as each pixel must be looked at and the errors diffused to neighbouring pixels. Additionally, the error diffusion process is difficult to implement in any other than a serial manner as the error diffusion of one pixel element will influence all subsequent elements that are to be processed By the choice of neighbouring pixels that are below or to the right of a current pixel in a rasterized image, the error diffusion can be achieved by one top-to-bottom pass over the image, as the errors diffused from a current pixel can then only influence subsequent pixels. It is a concern of the present invention to provide a means for reducing the speed with which the error diffusion process must be carried out through the provision of multiple error diffusion processes simultaneously error diffusing different portions of the image. United States Patent Specification No US-A-4733230 discloses an error diffusion process in which error diffusion data is added only to the pixels on the next line of the currently selected pixels so that all the other pixels of the same line can be processed simultaneously. In accordance with one aspect of the present invention, there is provided a method as set out in claim 1. In accordance with another aspect of the present invention, there is provided a parallel error diffusion apparatus as set out in claim 4. BRIEF DESCRIPTION OF THE DRAWINGS A number of preferred embodiments of the present invention will now be described with reference to the accompanying drawings in which: Fig 4 is an illustration of the operation of the preferred embodiment of the present invention; Fig. 5 is an illustration of an alternative embodiment of the present invention; Fig. 6 is a generalised block diagram of an apparatus incorporating the preferred embodiment; Fig. 7 is a schematic view of the operation of the preferred embodiment; Fig. 8 is a schematic view of the operation of an alternative embodiment of the present invention; Fig. 9 is a schematic block diagram representation of an apparatus incorporating the preferred embodiment; Fig. 10 is a schematic block diagram of the Error Diffusion Unit of Fig. 9; Fig. 11 is a schematic block diagram representation of the Input Correction Unit of Fig. 9; Fig. 12 is a schematic view of an initial state of the apparatus of Fig. 9; Fig. 13 is a schematic view of a further second state of the apparatus of Fig. 9; and Fig. 14 is a schematic view of a further third state of the apparatus of Fig. 9. Description of the Preferred and Other Embodiments In the present embodiment, a real time error diffusion process is achieved by parallelizing the error diffusion process so that there are a multitude of error diffusion processes which are able to work on the overall error diffusion process simultaneously, thereby reducing the speed requirements with which an input image must be handled. As mentioned previously, Fig. 3 shows the normal Floyd and Steinberg error diffusion process operating on one line of the input image. In this process, the current pixel 21, is thresholded according to the error diffusion process to be used and an output colour O, is obtained in addition to an error measure for distribution to adjacent pixels. This error is added to the value of adjacent pixels 22,23,24,25,26,27 in the nature as shown. As a result of this process the values of these pixels are changed. Subsequently, the error diffusion process continues along the current line and the pixel 22, is used for the process of error diffusion, followed by pixel 23 and so forth. At the start and end of a line, the error values which would be diffused to non-existent elements are most often discarded. Referring now to Fig. 4, in the preferred embodiment, a first and second error diffusion unit 28, 29 respectively operate on different portions of the input data simultaneously. In this process, a first error diffusion process 28, error diffuses the input pixels on the nth line of the input while a second error diffusion unit 29 simultaneously error diffuses information on the (n+1)th line. Error diffusion process 29, preferably is timed to stay far enough behind the first error diffusion unit 28 that no two error diffusion processes are required to write to the same pixel cell at the same time and hence the need for complex interlocking is avoided. Referring now to Fig. 5, the error diffusion of the input image can be further made parallel by the inclusion of further error diffusion processes, for example, a third error diffusion process 30, operates simultaneously on the (n+2)th line of input data. The method used to produce the error diffusion value is a three-dimensional full colour error diffusion process as set out in 'Colour Image Quantization for Frame Buffer Display' by Paul Heckbert, published in Computer Graphics, Volume 16, Number 3, July 1982, pages 297-304. In the Heckbert process, the different possible output values of the display are chosen as the representative colours of the colour gamut of displayable images. A vector measure in a 3-dimensional colour space representing the distance between the nearest displayable colour value and a current input colour value is computed and this value is then preferably added to neighbouring pixels using the Floyd and Steinberg process. Referring now to Fig. 6, showing a first example operation of a parallel error diffusion apparatus of the preferred embodiment. An input device 31 inputs 24-bit pixels into an input frame buffer 32, which is capable of storing the input pixels on a line by line basis. Two error diffusion units 33,34 read pixels from the input frame buffer and output error diffused values 35, to an output frame buffer 36, for displaying on an FLCD output device 90. In addition to clearing the current value of the pixel of the input frame buffer 32, the error diffused values are added to the neighbouring pixels of the current pixel, via two buses 37. The error diffusion units 33,34 operate in parallel as mentioned previously. By means of this parallel processing, the error diffusion units are able to work at a slower rate than the rate at which the input device is inputting values into the frame store. Referring now to Fig. 7, by way of example, shows one state of a simplified 18 x 15 frame buffer during operation of the preferred embodiment. The input device 31, is inputting pixels 41 into the input frame buffer 32 at a high rate. The error diffusion processes 38, 39, are error diffusing previous lines of the input data at a speed approximately half that which the input device 31, is inputting data. When the error diffusion process 38, finishes with its current line, it will immediately begin on the next line 40 requiring error diffusion. The overall effect of the two error diffusion processes is the same as that of a single error diffusion process operating at a higher speed approximately equivalent to the input device 31. In a further embodiment, depicted in Fig. 8, further parallelization of the error diffusion process is achieved by error diffusion processes 42,43,44 error diffusing the current input screen. When the error diffusion process 42 finishes with its current line, it will immediately begin on the next line 45 requiring error diffusion. The input device is inputting values into the frame buffer 46 at a higher rate than the error diffusion processes can maintain. Once the input device has completed the last line, it starts again on the first line. Although the error diffusion units 47,48,49 are still working on the previous image of input values, they are able to keep far enough ahead of the input device that they complete the processing of the previous screen of input values before the input device is required to write to the same pixel value. The output values '0' are written to an output frame buffer 36 as they are produced by the error diffusion units and are later read out to the Output Display 31, as required. As can be seen from the above description, the use of multiple staged error diffusion processes allows the error diffusion process to be carried out in parallel while still being able to keep up with a high input data rate which may be required. The preferred embodiment is particularly useful with RGB colour systems and has particular application to a Red, Green, Blue, White (RGBW) ferro-electric liquid crystal display devices an application of which will now be described. In this further embodiment, a real time error diffusion process is achieved by parallelizing the error diffusion process so that there are two units work on the error diffusion process at the same time. Hence each unit is able to work at half the data rate than that which would normally be required. Additionally, by careful and flexible use of memory, only the equivalent of a single line store is needed for temporary storage of input pixels and an optional single line store is used for the temporary storage of output pixels. By use of such storage means and parallel error diffusion units, incoming pixel values can be processed at half the speed than would normally be required and storage requirements are substantially reduced. In this particular embodiment, input data is assumed to be received in the form of two 24-bit samples each cycle. The output device is also assumed to have 4 colours, Red, Green, Blue, White (RGBW), each able to display 2 levels of colour (on or off). Hence the output values to be sent to the display are conveniently in the form of 4-bits with one bit for each relevant colour. Turning now to Fig. 9, the overall structure of the Parallel Error Diffusion Device is shown, and consists of a Line Store Memory 50, a Red Green Blue White (RGBW) Buffer Unit 51, an Input Correction Unit 52, Error Diffusion Units 53, 54 and a Output Sequencer 55. The Line Store Memory 50, is capable of storing a complete line of pixels for the display, and in this particular embodiment, the memory 50 is capable of storing 1280 × 24 = 30720 bits, representing 1280 pixels on a line by 24 bits per pixel. The Line Store Memory 50 is configured such that it can be read from, or written to, once each cycle. A Read Data Bus 56 and a Write Data Bus 57, are each capable of reading or writing 192 bits (i.e. 8 pixels) of data during any one cycle. The RGBW buffer unit 51, can also be read or written once each cycle, and is arranged as a 1280 pixel by 4 bit RGBW buffer, and has write data 58 and read data 59 buses which are both 20 bits wide. The two identical Error Diffusion units 53,54 are capable of taking information from the Line Store Memory 50 and each produce two outputs. The first output is in the form of 4-bits per pixel RGBW data, which is fed to the RGBW Buffer Unit 51 and the second output is 24-bit per pixel error data, which is written back to the line store. The Input Correction Unit 52 receives an input bus 60 in the standard RGB format consisting of 8 bits of Green, Red and Blue input levels respectively. The input bus 60, contains two sets of pixel data at a time and therefore is 2 × 24 = 48 bits wide. As will be explained further below, the Input Correction Unit 52, combines the RGB input data with error data for that pixel which is contained in the Line Store Memory 50, generating corrected RGB data to be written back to the Line Store Memory 50. The Output Sequencer 55, is responsible for reading data out of the RGBW Buffer Unit 51, and for driving an RGBW display (not shown, but known in the art) in the correct sequence by buffering the data and outputing same on the Output Bus 61. Because the input rate is 2 pixels per cycle, in order to maintain the output rate at the same rate, the Output Sequencer 55 reads output data out of the RGBW Buffer Unit 51 at the rate of five 4-bit samples every 2.5 cycles (i.e. two 20-bit reads every five cycles), and latches and buffers the data before driving it on the Output Bus 61 at the required rate. Referring now to Fig. 10, the operation of the substantially identical Error Diffusion Units 53,54 will now be explained in more detail. The Error Diffusion Units 53,54 each contain two Address Generators 62,63 for sequencing 192-bit (8 x 24 bit RGB pixel groups) wide data from the Line Store Memory 50 and 20 bit (5 x 4 bit RGBW) output data to the RGBW Buffer Unit 51. Data is sequenced through the Error Diffusion Units 53,54 in line pixel order. The 192 bit wide corrected input data is shifted by an 8-stage shift register 64 which resequences the data into 24-bit form. An Error Determination Unit 65 takes 24 bit input data in a RGB format and produces output data in the form of 4-bit RGBW data 66 forwarded to an RBGW Shift Register 84, and 24-bit RGB correction error data 67 by preferably determining which output colour pixel is the closest to the input data and determining a vector distance between the output RGBW data and the RGB input data. This error information is written back to the next line of the Line Store Memory 50 as will be better described. The resultant error data is diffused into the neighbouring pixels according to the schema outlined previously and depicted in Fig. 3. This resultant error is output on the error bus 67. An adder 68, which consists of three 8 bit adders that add two eighths of the error to the next pixel of the input stream, is provided. Similarly, an adder 69 takes one eighth of the value of the error result and adds this to the pixel value corresponding to 23 in Fig. 3. Similarly, the error information is added to the next line of the Line Store Memory 50 by adding the portions of the error result being one eighth at 70, one eighth at 71, two eighths at 72 and one eighth at 73. This corresponds to adding the portion of error information shown at 25,26,24,27 of Fig. 3. The errors from each other pixel is also accumulated in this 4-stage pipeline, which produces the total error to be added in each pixel position on the next line. These accumulated error values are written back into the Line Store Memory 50 via an Output Shift Register 74, to be accessed in the following line by the Input Correction Unit 52. The RGBW values are written to the RGBW Buffer Unit 51 via an RGBW shift register 84. Referring now to Fig. 11, there is shown the Input Correction Unit 52 which corrects incoming RGB data for each pixel by adding the error values diffused from the previous line. The resulting corrected input values are stored back into the Line Store Memory 50. The correction of input values before they are stored in the Line Store Memory 50 avoids the requirement for separate line stores for input and error values. The Input Correction Unit 52 consists of two sets of Correction Units 75,76 which each consisting of three adders 77,78,79, one for each of the RGB values. Input and Output Shift Registers 80,81 (respectively) are provided to sequence the data to and from the Line Store Memory 50. The Input Correction Unit 52 works on two RGB values per clock cycle in order to correct input data at the rate at which it is input. It has twice the bandwidth requirement of the Error Diffusion Units 53,54, both for reading and writing the Line Store Memory 50. Referring now to Figs. 12, 13, 14, in order to better understand the operation of the Parallel Error Diffusion Device of Fig. 9, an example operation will now be described. Fig. 12 shows the state of the error diffusion processing before the start of line N. The first half of the previous line (line N-1) has been error diffused; the results from this are in the RGBW buffer 51. The second half of line N-1 has been input corrected, and is ready for error diffusion. This data is stored in one half of the line store memory 50. The other half of the line store is occupied by the error values diffused from the first half of line N-1 into the first half of line N (the line about to be processed). When the Parallel Error Diffusion Device starts processing line N, four operations are started almost in parallel. The time taken for one line to be processed is conveniently termed a line time. Data from some operations is reused by other operations within the same line time, so the commencement of the operations is staggered slightly (by a few clock cycles). The horizontal blanking time (time between lines when no data is input to the Parallel Error Diffusion Device) allows the extra clock cycles required to stagger the operations and still have them complete within a single line time. Fig. 13 shows the state of the Line Store Memory 50 and RGBW Buffer Unit 51, part of the way through the line, and indicates the current working position within the Line Store Memory 50 and RGBW Buffer Unit 51 of each of the Error Diffusion Units 53,54. The first operation occurring during line N is the error diffusion of the second half of line N-1, which is done by Error Diffusion Unit 53. Previously input corrected values are read out of the line store into the Error Diffusion Unit 53. The RGBW results from the error diffusion are written into the RGBW Buffer Unit 51. Error data diffused into the second half of line N is written back to the Line Store Memory 50. The second operation during line N is the reading of the RGBW values for line N-1 by the Output Sequencer 55. At the start of line N, the RGBW values for the first half of line N-1 are in the RGBW Buffer Unit 51. The Output Sequencer 55 reads these values at the rate of two values per clock cycle, so that by the end of the line all of the RGBW values for line N-1 have been output. It is necessary to ensure that the error diffusion of the second half of line N-1, which is proceeding in parallel, always stays far enough ahead of the Output Sequencer 55, so that the last RGBW values for the line are written into the RGBW Buffer Unit 51 before the time at which the Output Sequencer 55 reads the end values of the line. This is accomplished by staggering the starting time of the Output Sequencer Unit 55 relative to the RGBW Buffer Unit 51 by a few clock cycles. The third operation on line N is the input correction of the incoming line N data. The Input Correction Unit starts at the beginning of the line, reading error values from the line store at the rate of two per cycle, adding them to the incoming data, and writing two corrected inputs back into the line store in each cycle. The entire line is input corrected at the rate at which it comes into the Input Correction Unit. As seen in Fig. 12, the error values from line N-1 required for the correction are in place for the first half of line N before the operation starts; the remaining error values are being generated by Error Diffusion Unit 1 53 as the line proceeds. Again, it is necessary to ensure that the Error Diffusion Unit 1 53 always produces the error values in advance of the time they are required by the Input Correction Unit 52. The fourth operation that takes place during line N is the error diffusion of the first half of line N. This works from the beginning of the line, and is timed to start immediately after the input correction has corrected the first pixel input. This error diffusion is done in Error Diffusion Unit 54. RGBW data produced is written into the RGBW Buffer Unit 51, behind the position where the output sequence is reading. Errors to be diffused to the next line are written back into the Line Store Memory 50. Fig. 14 shows that at the end of the line, the contents on the Line Store Memory 50, are in the same configuration as they were at the start of the line with the overall side effect of error diffusion of one line having occurred. Figs 12 to 14 show that the four operations can proceed in parallel with only one Line Store Memory 50 location for each pixel position in the line. Each Line Store Memory 50 location is read twice and written twice for each line; each RGBW Buffer Unit 51 location is written and read once for each line. The locations of Line Store Memory 50 in the second half of the line are first read by Error Diffusion Unit 53, and the error values for the next line written back. These error values are subsequently read by the Input Correction Unit 52, and the corrected input written back to the same location. Locations in the first half of the line are accessed in the opposite order, that is a read and a write for the Input Correction Unit 52, followed by a read and a write for the Error Diffusion Unit 54. The two Error Diffusion Units 53, 54, Input Correction Unit 52, and Output Sequencer 55 read and write the data in the Line Store Memory 50 and the RGBW Buffer Unit 51 to match the input and output requirements to successfully error diffuse the input image. As mentioned previously, the half-speed Error Diffusion Units 53,54 individually take two line periods to complete the error diffusion calculation for a line. In each line period, each Error Diffusion Unit 53,54 calculates the error diffusion results for half of one line, the Input Correction Unit 52 corrects and stores the data for an entire line, and the Output Sequencer 55 writes out an entire line of RGBW data. The foregoing describes only a number of embodiments of the present invention particular to the RGB model for use with a RGBW ferro-electric liquid crystal display, use of other models and modifications, obvious to those skilled in the art, can be made thereto without parting from the scope of the invention.

Claims: A method of processing pixel image data by error diffusion, said pixel image data comprising a plurality of lines of input pixels, the method comprising performing simultaneously a plurality of error diffusion processes, each said error diffusion process comprising: receiving (24) input pixels from a current line and adding (76) previously calculated error diffusion data from the preceding adjacent line to produce input corrected pixels for said current line; wherein said error diffusion processes are performed on respective adjacent ones of said lines and each said process further comprises: determining (53) for the input corrected pixels of the respective current line, display output pixels for the respective current line and error diffusion data for subsequently adding to the input pixels of the next adjacent line and to subsequent input corrected pixels of said current line; and storing (50) the error diffusion data and the input corrected pixels associated with the said adjacent lines in a line memory. A method as claimed in claim 1, characterised in that said method further comprises the step of: storing (51) the display output pixels produced by the plurality of said error diffusion processes. A method as claimed in claim 1 or claim 2, characterised in that said method further comprises the step of: outputting (55) the display output pixels produced by the plurality of said error diffusion processes in a predetermined order. An image processing device for processing image data formed by input pixels by error diffusion, said image comprising a plurality of lines of input pixels, the device comprising a plurality of error diffusing means for simultaneously performing a plurality of error diffusing processes, each said error diffusing means comprising: means (24,76) for receiving input pixels from a current line of the line image and adding previously calculated error diffusion data from the preceding adjacent line to produce input corrected pixels for the respective current line; wherein said error diffusing means performs said error diffusing processes on respective adjacent ones of said lines and each said error diffusing means further comprises: means (53) for determining for the input corrected pixels of the respective current line, display output pixels for the respective current line and error diffusion data for subsequently adding to the input pixels of the next adjacent line and to subsequent input corrected pixels of said current line; and a line memory (50) for storing the error diffusion data and the input corrected pixels associated with the said adjacent lines. A device as claimed in claim 4, characterised in that said device further comprises: means (51) for storing the display output pixels produced by the plurality of said error diffusing means. A device as claimed in claim 4 or claim 5, characterised in that said device further comprises: means (55) for outputting the display output pixels, produced by the plurality of said error diffusing means, in a predetermined order.

Inventors: NAYLOR JR WILLIAM CLARK, WEBB MICHAEL, NAYLOR JR., WILLIAM CLARK, WEBB, MICHAEL, NAYLOR JR., WILLIAM CLARK C/O CANON K. K., WEBB, MICHAEL C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1994
Main classification: H04N1
IPC codes: G06T1, G09G5, H04N1, G06T5