Photographic image reproduction using digital halftoning

Abstract: In the generation of screened halftones of photographic images for low resolution marking devices, conventional screen techniques are too coarse, and adaptive dither techniques are too fine. The present invention preserves the advantages of the adaptive dither techniques, while creating screen patterns with an adjustable degree of coarseness. The invention applies a hysteresis constant and recursion techniques previously limited to adaptive screening with fixed dot patterns to vary the size of dots in the screened image, thereby allowing adjustment of the image coarseness by adjusting the hysteresis constant.

Description: This invention is concerned with the reproduction of images, particularly though not exclusively photographic images, and relates to method and apparatus for such purposes. The invention has a particular application to a method and apparatus for producing a half-tone image. This invention will be described in relation to the reproduction of photographic images, and more particularly, to electronically generating a screened image, which at any point can be either black or white, but not an intermediate gray level. Such applications include thermal transfer fax machines, laser electrostatic, and inkjet printers. The invention further relates to adjusting the coarseness of the resulting screened image. A typical electronic device for reproducing photographic images consists of a scanning module, a screening module, and a marking module. The scanning module is used to sense the gray shade of each point of the original photographic image, and report it in electronic form. The screening module processes this data into a form suitable for marking. Because many marking devices can only reproduce black or white at any given point, and not intermediate shades of gray, the screening module must generate a screened image containing only black and white points. Electronic signals representing the screened image are then routed to the marking module, which marks a medium such as paper or photographic film with the black and white points corresponding to the image generated by the screening module. One technique used in a screening module is electronic simulation of a conventional screening technique. The conventional technique is described in U.S. Patent US-A-4,498,127, "Screen For Making Photomechanical Printing Plates." A state-of-the art electronic simulation is described in U.S. Patent US-A-4,012,584. This technique simulates gray shades by varying the size of the dots. However, the number and position of the dots remains constant. When used with marking modules exhibiting low spatial resolution, this technique suffers two problems. First, the screen patterns are coarse. Second, the number of shades that can be distinguished is small, also causing degradation in the reproduction quality. Conventional techniques which vary the size of the dots have not employed adaptive or recursive methods. Conventional screening techniques have been employed with repeated cells of pixels in fixed locations. Often these fixed cells are rotated to enhance the pattern to the viewer. Since fixed cells have a finite number of pixels, it is only possible to obtain a limited number of gray shades. For example, where thirteen pixels are in a cell only thirteen shades of gray are possible. This is because each of the 13 pixels must be either on or off. Adaptive dither is another technique that can be used in a screening module. With this technique, gray shades are simulated using very small dots. Lighter shades are represented with fewer dots than darker shades. An early example of this technique is given in U.S. Patent US-A-1,790,722 "Duplex photo modulator." Other popular examples are shown in Floyd, R.W., and L. Steinberg, "An Adaptive Algorithm For Spatial Grayscale", Proc. SID, vol. 17/2, pp. 75-77 and Ulichney, R, "Digital Halftoning", pp. 279-283. Adaptive techniques seek to cause an error signal representing the difference between the screened output and the input to approach zero. Typically, adaptive techniques generate a screened image exhibiting a large number of very small uniform size dots. While the adaptive technique often provides better detail reproduction, less objectionable patterns, and a larger number of distinguishable shades of gray than the conventional screening technique, it has the further disadvantage of generating screen patterns that are too fine to be well reproduced by most marking devices. This problem is especially severe in reproducing gray shades in the 50% gray region. EP-A-0201674 discloses a method for reproducing multi-level divital image on a bi-level printer of fixed dot size. As discussed above nothing in the state of the art suggests varying the size of dots generated by an adaptive technique. It will be shown hereinafter how this present invention can be put into practice to provide a photographic image reproduction device wherein photographic images are reproduced with good reproduction of detail. The preferred practice of this invention enables me to: provide a photographic reproduction device wherein a large number of gray shades can be distinguished; provide a photographic reproduction device wherein the resulting screening patterns appear pleasing to the eye; provide a photographic reproduction device wherein the resulting screening patterns can be reproduced accurately by common types of marking devices; and vary the size of dots generated by an adaptive technique in photographic reproduction. There will be described hereinafter a screening method and apparatus in accord with this invention, which allows the use of recursive or adaptive techniques to vary the size of dots used in producing the image. It should be noted that the dots can be produced by marking (e.g.,black) and not marking (e.g., white) the medium storing the image produced. Any printing, electronic, or other storage medium which can represent an image by stored values is within the scope of the invention. In addition, although black and white dots are contemplated, other color dots can also be used within the scope of the invention. The resulting irregular placement of the dots significantly improves the number of gray shades which can be produced by the marking device. The recursive technique operates in two dimensions and employs a "hysteresis" or adjustable coarseness constant which is used with an error signal to determine the coarseness of the image. A photographic reproduction device embodying to the invention has a random access memory (RAM), a scanning device, a screening device which uses the RAM for input, output, and temporary storage of intermediate results, and a marking device. The screening device cycles through three phases of operation. In the first phase, image data from the scanning device is stored in an input area of the RAM. During the second phase, the screening patterns are computed, and stored in an output area of the RAM. During the third phase, the resulting screening patterns stored in the output area of the RAM are output to the marking device. Each of these phases of operation comprises an iteration through the same number of data elements as there are pixels in one scan line. During alternate screening processing phases, the scanning proceeds left-to-right, then right-to-left, to avoid objectionable diagonal line patterns. It would be known to one of ordinary skill in the art that processing for the screening device can be implemented using a software program running on a general or special purpose computer or can be implemented using special purpose electronic circuitry. Both such implementations would be within the scope of the invention. Aspects and features of this invention are set out in the claims at the end of this specification. One implementation of the invention provides a photographic image reproducing system comprising: a scanning device receiving an input array i(x,y) corresponding to an original image to be reproduced, wherein x and y represent scanning directions; a marking device receiving output signals o(x,y) from a screening device for marking indicia on an output medium in accordance with said output signals o(x,y); the screening device using said input array i(x,y) in a recurrence relation calculation means, the recurrence relation being: (a) e′(x,y)= (e(x-d,y) + e(x,y-1))/2 + i(x, y); (b) o(x,y)= 1 if (e′(x,y) + h* (o(x-d,y) + o(x,y-1)) > = 0); = 0 otherwise (c) e(x,y)= e′(x,y) - fs * o(x,y); and (d) d= -1 y = 1 - 2 * (y mod 2); wherein o(x,y) is an output array, fs is a maximum allowable value of members of said array i(x,y), and h is a hysteresis constant. In this implementation of the invention, the following relationships may be applied: e(x,-1)=0; e(-1,y)=0; e(width,y)=0; o(x,-1)=0; o(-1,y)=0; and o(width,y)=0. In the implementation of the invention to be described below, there will be generally disclosed a method of producing a halftone image comprising the steps of: scanning a plurality of input points of an original image and generating a numerical value representing a shade of gray for each input point scanned; outputting a screened image having a plurality of dots, each dot of said plurality of dots being one of black or white, the size of each plurality of dots being determined from a recursive relationship between a value of a current input point, a previous output, and an error representing a difference between a value of a previous input point and the previous output; and transmitting signals representing the screened image to a marking device for marking on an output medium. Preferably the recursive relationship of the preceding paragraph employs a hysteresis constant that determines the coarseness of the screened image. In the preferred embodiment the hysteresis constant defines an allowable excursion of the error around zero; the scanning is performed in two dimensions; and the error is allocated in two dimensions, and more particularly is allocated equally in each of the two dimensions. The recursive relationship may be more particularly defined as: e′(x,y)= (e(x - d, y) + e(x, y - 1)) / 2 + i(x, y) o(x,y)= 1 if (e(x-d, y) + h*(o(x - d, y) + o(x,y-1)) > = 0) = 0 otherwise e(x,y)= e′(x,y) - fs * o(x,y) d= -1 y = 1 - 2 * (y mod 2) where x refers to pixels in a scan line, y refers to the scan lines, i(x, y) and o(x, y) are the input and output arrays, respectively, fs is the full scale input value, typically 255 in the cas e of an eight bit array, and h is an hysteresis constant typically of value 0.5 times the value of fs and where larger values of h result in a coarser screen. In the above definition of the recursive relationship, f s may be a value representing a maximum gray shade, being the product of f s and a number not less than zero. Brief Description of the Drawings The invention and its practice will now be described further with reference to the accompanying drawings in which: Fig. 1 shows an error curve for a constant gray shade input from a scanner and corresponding black and white outputs. Fig. 2 shows a curve similar to that of Figure 1 with a larger value hysteresis constant. Fig. 3 illustrates the quantization effect of measuring discrete points. Fig. 4 illustrates scanning according to a serpentine raster procedure. Fig. 5 is a block diagram of a preferred embodiment of the photographic image reproduction system; Fig. 6 is a block diagram of the screening device; Fig. 7 is a tabulation of the signals produced by the sequencer module; Figs. 8-8A are a flowchart describing how a general purpose computer is programmed to carry out the functions of the screening device. Description of the Preferred Embodiments While the invention is applicable to a two dimensional (x, y) screening process, for purposes of simplifying its illustration, a one dimensional case (x) is assumed. Inputs from the scanning device are represented as i(x). Assume that i(x) is a fraction between 0 and 1 having 256 possible values, with each value representing one of 256 gray shades (e.g., 0 corresponding to white and 255 corresponding to black). For convenience, the gray shades can be represented by 256 integer values ranging from zero (white) to a full scale value, fs, of 255 (black). Of course, the representations of black and white are arbitrary and can be reversed. Recognizing that the marking device can only produce black and white dots, further assume that at any point x, the output of the screening device, O(x), is a 0 if the marking device is to produce a white dot at point x and O(x)=1 if the marking device is to produce a black dot at point x. If i(x) is scaled to be an integer between 0 and 255, O(x)=0 corresponds to i(x)=0 while O(x)=1 corresponds to i(x)=255. Since i(x) can have any value gray shade value between 0 and 255, it is necessary for the screening device to determine the size and number of black and white dots required to produce the desired shade of gray read by the scanning device at i(x). The number and size of black and white dots for a given gray shade can be determined, from a recursive relation that considers the effect of the previous output and a secondary error, which itself is a function of the previous error and the current input. Assume that fs represents full scale as discussed above and that e(x) represents an error between inputs i(x) and outputs O(x). In order to obtain a shade of gray at the output that is equal to the shade at the input, it is desired that the average of the differences between the inputs i(x) and outputs O(x), the error, approach zero. Since i(x) can be any integer between zero and 255 while O(x) can take on only the discrete values zero and one, mathematical relationships between i(x) and O(x) must include a scaling for O(x). Thus, on average, the difference between i(x) and the product of O(x) and fs representing full scale must approach zero to achieve the desired effect. Assume e(x) defines an error and e′(x) defines a secondary error as: e(x) = e′(x) - fs * O(x) e′(x) = e(x-1) + i(x) Then, for example, if x=3, e(3) = e′(3) -fs * O(3) = e(3-1) + i(3) -fs * O(3) = e(2) + i(3) - fs * O(3) where e(2) = e′(2) - fs * O(2) = e(2-1) + i(2) - fs * O(2) = e(1) + i(2) -fs * O(2) Therefore, e(3) = e(1) + i(2) - fs*O(2) + i(3) - fs*O(3) where e(1) = e′(1) - fs * O(1) = e(1-1) + i(1) -fs * O(1) = e(0) + i(1) - fs * O(1) Therefore, e(3) = e(0) + i(1) - fs*O(1) + i(2) - fs*O(2) + i(3) - fs*O(3) where e(0) = e′(0) - fs * O(0) = e(0-1) + i(0) - fs * O(0) assuming e(-1) = 0, then e(0) = i(0) - fs * O(0) Therefore, e(3) = i(0) -fs*O(0) + i(1) - fs*O(1) + i(2) - fs*O(2) + i(3) - fs*O(3) Thus, and generally, Now define the output from the screening device O(x) as follows: O(x) = 1 if e′(x) + h * O(x-1) > = 0 = 0 if e′(x) + h * O(x-1) < 0 where h is a hysteresis constant which defines allowable excursion of the error around zero. Thus, as defined above, O(x) is a function of the secondary error e′(x) and the previous output, O(x-1). The secondary error e′(x) is a function of the previous error e(x-1) and the input i(x). As demonstrated above, the previous error is a functon of the sums and differences between the inputs i(x) and the outputs O(x). As the summation equation above shows, if e(x) is maintained in the general range of zero, the output O(x) approximates the input i(x). The hysteresis constant defines an allowable excursion of the error around zero and thus represents the difference between the output and the input. Over an arbitrarily large number of points the average error, which is e(x) divided by the number of points, approximates zero. Thus, the output gray shade would be approximately equal to the input gray shade. The effect of the hysteresis constant h is illustrated in the plots of e(x) vs. x shown in Figures 1-2. Assuming for simplicity a constant shade of gray input from the scanning device, all values of i(x) are equal. In Figure 1, a first constant gray shade produces a ramp like error curve between 0 and -h. The positive slope of the ramp is i(x) and causes a single white dot to be generated for all x where e(x) is between 0 and -h. Thus, if the positive slope of the ramp spans three points in the x direction, a single white dot of size 3 is generated. When e(x) reaches zero, the inequality in the equation for O(x) flips and a single black dot whose size corresponds to the number of points in the x direction spanned by the negative slope of the curve is generated. The negative slope of the ramp during black dot generation is i(x)-1. It should be noted that the slope of the ramp is a function of the shade of gray. Thus, for a constant shade of gray halfway between white and black, the positive and negative slopes would be equal. For a lighter constant shade of gray the positive slope of the ramp would decrease, causing more white pixel output. It will be understood by those of ordinary skill that the above directions and slopes are arbitrary and could be reversed within the scope of the invention. Figure 2 illustrates the effect of changing the hysteresis constant h. Figure 2 shows that, for the same constant gray shade assumed in Figure 1, an increase in the value of h causes an increase in the size of the white and black dots produced. This is because as h increases it requires a further traversal of the x axis to go up and down the ramp. Thus, fewer transitions from black to white dots occur and the screened image produced is more coarse. While Figures 1 and 2 show a continuous curve, Figure 3 more accurately illustrates the case of discrete steps as points x are individually read and processed. The quantization is a function of the scanning and does not change the principles of described above. The invention thus far has been described in a single dimension for purposes of simplifying its illustration. In expanding to a typical two dimensional halftone, the scanning procedure and the distribution of the error must be addressed. One scanning approach is the serpentine raster shown in Figure 4. Here, scanning of points (or pixels) in the x or horizontal direction takes place first from left to right followed by right to left scanning on the next line down in the y or vertical direction in the frame. Thus, the scanning from the right and left directions alternates between the lines in the vertical direction. One approach to distributing the error is to allocate half the error in each scanning direction. Thus, for each two dimensional point (x,y) scanned, the point immediately preceding it in the x direction (x-d, where d = +1 or -1 depending on the present left to right or right to left direction of the scan) and the point immediately above it (x, y-1) each are allowed to contribute one half of the error. Accordingly, in the two dimensional case, the following recurrence relations apply: e′(x,y)= (e(x-d, y) + e(x, y-1))/2 + i(x,y) o(x,y) = 1 if (e(x-d, y) + h*(o(x-d, y) + o(x,y-1)) > = 0) = 0 otherwise e(x,y)= e′(x,y) - fs * o(x,y) d= -1 y = 1 - 2 * (y mod 2) where x refers to points or pixels in a scan line, y refers to the scan lines, i(x, y) and o(x, y) are the input and output arrays, respectively, fs is the full scale input value, typically 255 in the case of an eight bit array, and h is an adjustable coarseness value typically of value 0.5 times the value of fs and where larger values of h result in a coarser screen. It will be appreciated by those of ordinary skill that numerous scanning methods and error distributions are possible and that corresponding equations can be developed for these scanning and error distrbution methods which fall within the scope of the invention herein. In addition, several approaches to implementing the screening method are possible. These include electronic circuits specifically designed to carry out the method and software programs which can be stored and executed on special and general purpose computing devices. Fig. 5 is a block diagram of a preferred embodiment of an image reproduction device, e.g., a photographic image reproduction device, employing the method according to the invention. The photographic reproduction device includes scanning device 20 to measure gray shades of points of an image, convert these measurements to digital form (e.g., 8 bit digital words representing intergers from zero to 255) and transmit them to screening device 22. Screening device 22 processes these data, and generates a screen pattern having only two output possible signals, one corresponding to black, and one to white. As previously mentioned, these signals could correspond to marking and not marking a medium for black and white, respectively. In addition, any marking color could be employed. Any of these embodiments are within the scope of the invention described herein. These signals from the screening device are transmitted to marking device 24, which marks a medium such as a piece of paper or photographic film accordingly. It should be noted that, for convenience, in the implementations described below the screening device reads sequences of all the points or pixels on one line of the image, then computes the required errors and outputs and generates the corresponding signals to the marking device before moving on to the next line of the image. Thus, in the flow diagram of Figure 8 and 8A, the equations show only one subscript x, defining points of the array. The second subscript, y, used in the preceding equations to describe the two dimensional case is accounted for by the line to line scanning. For example, e(x) in the flowchart refers to storing error values for only one line, y, of the array e(x,y) at a time. Figure 6 illustrates an implementation of a screening device in special purpose electronic circuitry. The circuitry includes an input register 29, an error register, a past error register 32, an output register 60, and a past output register 54. During the screening processing phase, for each pixel or picture element in the image, the screening processing device carries out the following sequence of operations: (1) The contents of the error RAM 30, corresponding to the present pixel are read into the past error register 32. (2) The contents of the output RAM 48, corresponding to the present pixel are read into the past output register 54. (3) The contents of the input RAM 26 corresponding to the present pixel are read into the input register 28. (4) The contents of the error register 46 and past error register 32 are added together, as in adder 34, divided by two , for example by shifting right one bit position, as in divider 36 and then added to the contents of the input register 28. (5) The contents of the output register 60 and past output register 54 are added together, as in adder 56, and multiplied, as shown by multiplier 58 by an adjustable coarseness value or hysteresis constant h, as shown at reference designator 62. (6) The results of steps 4 and 5 are added together. If the result is greater than or equal to zero, then step (7a) below is performed. Otherwise, step (7b) below is performed. (7a) The constant 1 is stored into output register 60 corresponding to the marking device marking a black dot at the location corresponding to the present pixel. In addition, a constant equal to the value of the input corresponding to black is subtracted from the result of step 4 and stored in error register 46. In a typical case, eight bits are used to represent the input value, so this constant is 2⁸-1, or 255. (7b) The constant 0 is stored into the output register 60, corresponding to a white dot at the location corresponding to the present pixel. In addition, the result of step 4 is stored in error register 46. (8) The contents of output register 60 is stored into the output RAM 48 corresponding to the present pixel. (9) The contents of error register 46 is stored into the error RAM 30 corresponding to the present pixel. (10) The process is repeated for the next pixel which could either be to the right or to the left of the present pixel, depending on the direction of the scan. As described above, the hysteresis constant h affects the coarseness of the patterns formed by the screening device by influencing the size of the dot produced by the marking device. A hysteresis constant value of zero corresponds to the finest possible screen. A hysteresis constant value of one times the value of full scale fs corresponds to a coarse screen. A typical value is 0.5 of full scale, fs, for a screening of medium coarseness. It should be noted however, that h can be any value which is not less than zero. Figure 6 shows the connections of a circuit which performs the steps outlined above. As shown in Figure 6, the screening device 22 has a connection to the scanning device 20 that allows data values to be written to an input RAM 26. It will be known to those of ordinary skill that input RAM 26, error RAM 30 and output RAM 48, although shown as seperate elements, could be implemented as portions of a single memory device. Another connection from input RAM 26 is used to write a data value read from RAM 26 into input register 28. This activity is triggered by the B output of sequencer 64, as indicated by B on the signal line between input RAM 26 and input register 28. Error RAM 30 has a connection to past error register 32, which is used to write a data value read from error RAM 30 into past error register 32. This activity is triggered by the B output of sequencer 64, as indicated by B on the signal line between error RAM 30 and past error register 32. An additional connection is used to store in error RAM 30 the contents of error register 46. This activity is triggered by sequencer 64 output D, as indicated by D on the connection between error RAM 30 and error register 46. The contents of past error register 32 and the contents of error register 46 are added together by adder 34. The result of this operation is divided by two by divider 36. One example of dividing by two is shifting right by one bit position. It will be known to those of ordinary skill that other means of dividing by two are also possible and may be more convenient if, for example, computations are performed in floating point arithmetic. Such approaches are within the scope of the invention described herein. The result of this operation is further added to the contents of input register 28 by adder 38. This result is then carried to three other components, which are constant subtractor 40, switch 44 and adder 50. Output RAM 48 has a connection to past output register 54, which is used to write a data value read from output RAM 48 into past output register 54. This activity is triggered by the B output of sequencer 64, as indicated by B on the signal line between output RAM 48 and past output register 54. An additional connection is used to store in output RAM 48 the contents of output register 60. This activity is triggered by sequencer 64 output D, as indicated by D on the connection between output RAM 30 and output register 60. A still further connection causes a data value read from output RAM 48 to be sent to the marking device. This activity is triggered by sequencer 64 output E, as indicated by E on the signal line from output RAM 48 to the marking device. The contents of past output register 54 and the contents of output register 60 are added together by adder 56. This result is then multiplied with the adjustable coarseness value 62 by multiplier 58. The result of this multiplication is then added with the result produced by adder 50. This result is then tested for being greater than or equal to zero by tester 52. A connection allows sequencer 64 output C to store the result which is either a 1 or a 0 into output register 60. Thus, the output register 60 now stores a 1 if the marking device is to mark a black dot at the location corresponding to the present input pixel. The constant 0 is stored into the output register 60, if a white dot is to be placed at the location corresponding to the present input pixel. A constant subtractor 40 stores a constant equal to the value of the input corresponding to black to be subtracted from the error register. In a typical case, eight bits are used to represent the input value, so this constant is 2⁸-1, or 255. The result from tester 52 is used to switch between the outputs of adder 38 and the constant subtractor 40, the result of which is simply the result of adder 38 from which the constant 255 has been subtracted. If the result from tester 52 is one, then switch 42 will be closed, and a result of constant subtractor 40, triggered by sequencer 64 output C, will be stored in error register 46. If the result of tester 52 is zero, then switch 44 will be closed, and a result of adder 38, again triggered by sequencer 64 output C, will be stored in error register 46. Upon signalling of sequencer 64 output D, the new output register 60 value is stored in RAM 48, and the new error register 46 value is stored in RAM 30. The entire process is now repeated for the next pixel which could either be to the right or to the left of the present pixel, depending on whether the present line is an even or odd numbered scan line. Fig. 7 is a tabulation of the signals produced by the sequencer module. As described above, the sequencer 64 in Fig. 6 has the function of controlling the sequence of operations performed by the screening device circuitry. The sequence module generates the address signals for input RAM 26, error RAM 30, and output RAM 48. The sequencer module operates in three phases. During the first phase, sequencer module 64 signals its output A, for each pixel in the line, while counting the address up from 0. This has the effect of causing a line of data values from scanning device 20 to be stored in input RAM 26. During the second phase, the sequencer module will count the address from 0 to n-1, and from n-1 to 0, during alternate invocations of the second phase, where n is understood to be the number of pixels in each scan line. While counting in the second phase, the sequencer module pulses its outputs B, C, and D. Signal B has the effect of loading values from the corresponding RAMs into registers 28, 32, and 54. The loaded values are then processed by the various circuitry discussed above, in order to produce new output and error values. The new output and error values are stored in output register 60 and error register 46, respectively, upon signalling of sequencer 64 output C. Sequencer 64 output D causes the stored values to be finally stored in output RAM 48, and error RAM 30, respectively. During the third phase, sequencer 64 counts its address from 0 to n-1, while signalling its E output once for each pixel in the line. This has the effect of transmitting the contents of output RAM 48 to marking device 24. Figs. 8-8A show a flowchart describing how a general purpose computer can be programmed to carry out the functions of the screening device. It will be obvious to those skilled in the art that the flowchart depicted in Figs. 8-8A is a faithful simulation of the hardware depicted in Fig. 6 and Fig. 7. The flowchart can be implemented by software which can be run on a general purpose computer. It should be noted that the flow diagram in Figures 8 and 8A also illustrate that an entire line is scanned by the scanning device before the screening process takes place. Thus, as previously discussed, it is not necessary in the equtions to show a second subscript, y, since this is accounted for in the implementation which operates on an entire scan line before moving on to the next line. In function block 801, the top line is designated as line zero and scanning from left to right is designated by setting variable dir equal to one. In function block 803, the current value of the line number y is tested to determine if all the lines of the image have been processed and further processing can be stopped. If not, the horizontal variable X is set equal to zero in function block 805. In function block 807 the current value of X is tested to determine if all the points i(x) on line Y have been read. If not, in function block 809 an input is received from the scanning device and in function block 811 the measured value in(x) at point x is stored and X is incremented, as shown in block 813. These steps are repeated until the entire line has been read. Upon completion of reading the line, screen processing begins. The direction of the scan is tested as shown in block 815. If the direction is 1, indicating the left to right portion of the scan, X is set equal to zero and a variable endX is set equal to the width of the frame. Otherwise, in block 816, X is set equal to width minus one and endX is set equal to negative one. As shown in block 817, if the end of the scan line has not been reached in this phase of the processing, as indicated by the value of X not being equal to endX, as shown in block 818, the recursive relationships previously discussed (now without needing the second subscripts) are applied in blocks 819 and 821. Function block 821 shows a temporary variable T representing an intermediate value which can be stored in a register. In function block 823, if T is greater than or equal to zero, the output O is set equal to one and the error is set equal to the error minus 255, where 255 represents full scale output, i.e., black, as shown in function blocks 825 and 827. Otherwise the output O is set equal to zero, as shown in function block 829. It will be clear to those of ordinary skill that the variable T and any corresponding temporary storage register can be eliminated by consolidating steps 821 and 823 into a single step. e(x) and o(x) are next set equal to the error and O respectively in block 831. X is incremented in block 833 and the process repeats until the line is completed. When processing of the line is completed, processing to provide output signals for the line to the marking device can take place. Variable dir is negated, as shown in block 835. X is again set equal to zero in block 837 and tested in block 839 to determine if all the values for the scan line have been reported to the marking device. If not, O is set equal to o(x) in block 841, O is output to the marking device in block 843 and X is incremented as shown in block 845. When testing in block 839 indicates that the entire scan line has been output to the marking device, the scan line is incremented, as shown in block 847. As previously discussed, function block 803 directs processsing of the next line according to the same steps until all lines are exhausted. Thus, scanning, screening and output to the marking device is completed for each scan line before the next scan line is read. Although the invention has been described above with particularity, this was merely to teach one of ordinary skill in the art how to make and use the invention. Many modifications will fall within the scope of the invention, as that scope is defined by the following claims. For example, the recurrence relations could be written in the C programming language, an assembly language of a particular computer, or in another language such as FORTRAN.

Claims: Apparatus for reproducing an input image as an output image comprised of output points having binary values, comprising scanning means for providing a respective input value on a gray scale for each of a plurality of input points on the input image and processing means responsive to the input values to provide a binary output value for each of a plurality of output points for producing the output image, characterized in that: the processing means comprises decision means (50-58) for deciding on an output binary value (0(x)) to be accorded to each input value (i(x)) on the basis of the input value (i(x)) and an accumulated error value (e(x-1)), and means (30-46) for incrementing the accumulated error value (e(x-1)) in dependence upon the difference between the input value (i(x)) and the gray scale value of the output binary value (0(x)) accorded by said decision means, said decision means and incrementing means being arranged to operate in a recursive relationship in which the accumulated error value (e(x)) tends toward a zero average value, and said decision means including bias means (54, 60, 62) responsive to a previous binary output O(x-1) to bias the operation of said decision means towards said previous binary output value thereby introducing a hysteresis into transitions from a binary output of one value to a binary output of the other value. Apparatus as claimed in Claim 1 in which said input points form a two-dimensional array and said decision means is responsive to a combined accumulated error value which has two components, a first component being derived from the accumulated error value established by operation of said incrementing means at an immediately preceding input point on a first axis of said two-dimensional array and the second component being derived from the accumulated error value established by said operation of said incrementing means at an immediately preceding input point on a second axis of said two-dimensional array. Apparatus as claimed in Claim 1 in which said bias means provides a bias value for influencing the operation of said decision means, said bias value being the product of a selected constant and the gray scale value of said previous output binary value, said bias value being supplied to said decision means for combining with said input value and accumulated error value in a sense that biases the output binary value decision towards said previous output binary value. Apparatus as claimed in Claim 1 or 3 in which said processing means processes said input points in a predetermined sequence and for each input value processed by said processing means, the previous output binary value to which said bias means responds is that accorded to the immediately preceding input value. Apparatus as claimed in Claim 1, 3 or 4 in which said scanning means is operable to scan the input image in a succession of lines to obtain a two-dimensional array of input points. Apparatus as claimed in Claim 5 in which input points on one line are processed in the opposite direction to input points on the immediately succeeding line. Apparatus as claimed in Claim 2 further in which said bias means provides a bias value for influencing the operation of said decision means, said bias value being the product of a selected constant and the sum of the respective gray scale values of the binary output values at said immediately preceding input points on said first and second axes, said bias value being supplied to said decision means for combining with said input value and said combined accumulated error value in a sense that biases the output binary value decision towards the previous output binary values obtained for said immediately preceding input points where both such output binary values are the same. Apparatus as claimed in Claim 7 in which said scanning means is operable to scan said two-dimensional array as a succession of lines extending in the direction of one axis of the array. Apparatus as claimed in Claim 8 in which input points on one line are processed in the opposite direction to input points on the immediately succeeding line. Apparatus for reproducing an input image as an output image comprised of output points having binary values, comprising scanning means for providing a respective input value on a gray scale for each of a plurality of input points on the input image lying in a two-dimensional array and processing means responsive to provide a binary output value for each of a plurality of output points for producing the output image, characterized in that: the processing means comprises decision means for deciding on an output binary value to be accorded to each input value on the basis of the input value and an accumulated error value derived from the respective accumulated errors established for the two immediately preceding input points of the array in the two dimensions thereof, and means for incrementing the accumulated error value in dependence upon the difference between the input value and the gray scale value of the binary output value accorded to said input value, said decision means and said incrementing means being arranged to operate in a recursive relationship in which said accumulated error value tends towards a zero average value, and said decision means including bias means responsive to a respective previous binary output in each dimension of said array to bias the operation of said decision means towards said respective previous binary output values where both such values are the same. Apparatus as claimed in Claim 10 in which said bias means provides a bias value for influencing the operation of said decision means, said bias value being the product of a selected constant and the sum of the respective gray scale values of the binary output values accorded to said two immediately preceding input points, said bias value being supplied to said decision means for combining with said input value and said accumulated error value in a sense that biases the output binary value decision towards the previous output binary values obtained for said two immediately preceding input points where both such output binary values are the same. Apparatus as claimed in any preceding claim further comprising means for marking a plurality of output image points on a display medium with a first or second marking indicia, said marking means being responsive to said binary output values to mark a respective output image point for each input image point with a first or second indicia in accord with the binary output value accorded to the input image point. Apparatus as claimed in Claim 12 in which one of said first and second marking indicia is no mark made on the display medium. A method for reproducing an input image as an output image comprised of output points having binary values, comprising scanning an input image to provide a respective input value on a gray scale for each of a plurality of input points on the input image and processing the input values to provide a binary output value for each of a plurality of output points for producing the output image, characterized in that: the processing of the input values comprises the steps of deciding on an output binary value (0(x)) to be accorded to each input value (i(x)) on the basis of the input value (i(x)) and an accumulated error value (e(x-1)), and incrementing the accumulated error value (e(x-1)) in dependence upon the difference between the input value (i(x)) and the gray scale value of the output binary value (0(x)) accorded by said deciding step, said deciding and incrementing steps being performed in a recursive relationship in which the accumulated error value (e(x)) tends toward a zero average value, and said deciding step includes the step of providing a bias value dependent on a previous output binary value which bias value biases the deciding step towards said previous binary output value thereby introducing a hysteresis into transitions from a binary output of one value to a binary output of the other value. A method as claimed in Claim 14 in which said input points form a two-dimensional array and said deciding step is responsive to a combined accumulated error value which has two components, a first component being derived from the accumulated error value established by said incrementing step at an immediately preceding input point on a first axis of said two-dimensional array and the second component being derived from the accumulated error value established by said incrementing step at an immediately preceding input point on a second axis of said two-dimensional array. A method as claimed in Claim 14 in which said bias value is the product of a selected constant and the gray scale value of a previous output binary value, said bias value being combined with said input value and accumulated error value in a sense that biases the output binary value accorded to said input value towards said previous output binary value. A method as claimed in Claim 16 in which said input points are processed in a predetermined sequence and for each input value processed by said processing means, the previous output binary value is that accorded to the immediately preceding input value. A method as claimed in Claim 14, 16 or 17 in which said input image is scanned in a succession of lines to obtain a two-dimensional array of input points. A method as claimed in Claim 18 in which input points on one line are processed in the opposite direction to input points on the immediately succeeding line. A method as claimed in Claim 15 in which said bias value is the product of a selected constant and the sum of the respective gray scale values of the binary output values at said immediately preceding input points on said first and second axes, said bias value being combined with said input value and said combined accumulated error value in a sense that biases the output binary value accorded to said input value towards the previous output binary values obtained for said immediately preceding input points where both such output binary values are the same. A method as claimed in Claim 20 in which said two-dimensional array is scanned as a succession of lines extending in the direction of one axis of the array. A method as claimed in Claim 21 in which input points on one line are processed in the opposite direction to input points on the immediately succeeding line. A method for reproducing an input image as an output image comprised of output points having binary values, comprising scanning an input image to provide a respective input value on a gray scale for each of a plurality of input points on the input image lying in a two-dimensional array and processing the input values to provide a binary output value for each of a plurality of output points for producing the output image, characterized in that: the processing of the input values comprises the steps of deciding on an output binary value to be accorded to each input value on the basis of the input value and an accumulated error value derived from the respective accumulated errors established for the two immediately preceding input points of the array in the two dimensions thereof, and incrementing the accumulated error value in dependence upon the difference between the input value and the gray scale value of the binary output value accorded to said input value, said deciding step and incrementing step being performed in a recursive relationship in which the accumulated error value tends toward a zero average value, and said deciding step includes the step of providing a bias value dependent on a respective previous binary output value in each of said two array dimensions, which bias value biases the deciding step towards said respective previous binary output values where both such values are the same. A method as claimed in Claim 23 in which said bias value is the product of a selected constant and the sum of the respective gray scale values of the binary output values accorded to said two immediately preceding input points, said bias value being combined with said input value and said accumulated error value in a sense that biases the output binary value decision towards the previous output binary values obtained for said two immediately preceding input points where both such output binary values are the same. A method as claimed in any one of Claims 14 to 24 further comprising the step of marking a plurality of output image points on a display medium with a first or second marking indicia, such that a respective output image point is marked for each input image point with a first or second indicia in accord with the binary output value accorded to the input image point. A method as claimed in Claim 25 in which one of said first and second marking indicia is no mark made on the display medium.

Inventors: LEVIEN RAPHAEL L, LEVIEN, RAPHAEL L.
Applicants: LEVIEN RAPHAEL L, LEVIEN, RAPHAEL L.
Application year: 1991
Main classification: H04N1
IPC codes: H04N1