METHOD AND APPARATUS FOR IMPROVING THE QUALITY OF AN IMAGE PRODUCED BY A RASTER DISPLAY DEVICE

Abstract: The present invention relates to a method and apparatus for improving the quality of an image (13) produced by raster display device, which forms an image by a plurality of picture elements (pels), comprising modifying the intensity of selected pels in the image so as to tend to smooth an edge of the image. The method of the invention is characterised by selecting a plurality of arrays of pels from the pels forming at least one edge of the image the quality of which is to be improved, comparing the pattern of pels in each array with a stored set of patterns, each of which represents a pattern of pels forming at least one edge of an image and has rules associated with it relating to modifying the intensity of at least one pel of the pattern, so as to determine a matching pattern for each array, and modifying the intensity of at least one pel of each array in accordance with the rules relating to the matching stored pattern. The invention also relates to apparatus for performing a method as above.

Description: This invention relates to the improvement of the quality of an image produced by a raster display debice and formed from a plurality of picture elements. For an object to be reproduced as an image using a raster display device, the object must be sampled to provide raster scan data. Therefore, the object is scanned and sampled in a linear manner and sampled points of the object which are light may be represented by an 0, and sampled points of the object which are dark may be represented by a 1. This scan is repeated over the entire surface of the object to be displayed producing raster scan data in which each bit represents a sampled point within the object. The raster scan data is transmitted to a raster display device such as the printer shown in United States Patent No. US-A-4,031,519 to Findley. In such a device a laser beam writes out an image of the scanned text by setting up a pattern of electrostatic charge on a belt or drum according to the raster scan data. Thus the data is converted into an image by converting the electrostatic charge pattern into a pattern of picture elements (pels). When an edge of an object reproduced on an image by such a device is at an oblique angle with respect to the direction of the raster scan, jagged spots are produced in the corresponding edge in the image. This problem is called aliasing. An anti-aliasing technique is disclosed in United States Patent No. US-A-4,079,367 to Yonezawa et al which shows the detection of two adjacent pels of the image positioned in an oblique direction and the insertion of an additional pel to smooth a jagged edge portion of the image. Yonezawa et al use a sliding window to examine matrices of pels for such oblique pairs of pels. However, Yonezawa et al has limitations in anti-aliasing on more complex configurations of pels. It is also known to write a grey or halftone halo along the periphery of an image reproduced from raster scan data. This non-selective printing of grey pels at all edges creates a halo around the image thereby smoothing the image and enhancing resolution. Further, Architectures and Algorithms for Parallel Updates of Raster Scan Displays ; Satish Gupta; Carnegie-Mellon University, Department of Computer Science; December, 1981, teaches the selection of pel intensity depending upon the distance between the centre of the pel and the edge of the image. Gupta also shows a table look up to make anti-aliasing computations more efficient. "Digital Typography", Charles Bigelow, Scientific American , August, 1983, also shows the selection of one of a plurality of grey levels to enhance edges. It is also known to shift pels a half pel position when printing diagonals as described, for example, in "Character Edge Smoothing for Matrix Printing" by D. L. Ort in the Xerox Disclosure Journal , Volume 6, Number 1, January/February 1981. A more precise technique which shifts selected pels one half position is shown in United States Patent US-A-4,232,342 to R. Sommer in which a pel is shifted or not shifted depending on its position relative to the desired contour. IBM Technical Disclosure Bulletin, May 1983, p. 6434-6436, discloses a method using a PLA whereby 3 x 3 arrays from the image that match certain predetermined patterns have their central pixel intensity modified. The method is presented as a form of low pass filtering to prevent aliasing of text characters. The generation of the predetermined patterns is not discussed. The object of the present invention is to provide an improved method and apparatus for improving the quality of an image produced by raster display device. The present invention provides a method of improving the quality on a raster display device of an image formed from a plurality of picture elements (pels) by modifying the intensity of selected pels in the image so as to smooth an edge representing the boundary between two regions of different intensity in the image, said method comprising the steps of: selecting arrays of pels from the image; comparing the pattern of pels in each array with a set of predetermined patterns and determining a modified intensity for at least one pel in the array in the event of a match with particular predetermined patterns; changing the intensity of the at least one pel in the array to said modified intensity; and characterised by: the particular predetermined patterns each depicting an edge at a predefined angle to the horizontal and determining the modified intensity in the event of a match on the basis that said boundary intersects the at least one pel at the same angle as the predefined angle of the edge in the matched pattern. The invention also provides apparatus for improving the quality on a raster display device of an edge representing the boundary between two regions of different intensity in an image formed from a plurality of picture elements (pels) by modifying the intensity of selected pels in the image so as to smooth the edge, said apparatus comprising: means for selecting arrays of pels from the image; means for comparing the pattern of pels in each array with a set of predetermined patterns and determining a modified intensity for at least one pel in the array in the event of a match with particular predetermined patterns; means for changing the intensity of the at least one pel in the array to said modified intensity; and characterised in that: the particular predetermined patterns each depict an edge at a predefined angle to the horizontal, and the determining means determines the modified intensity in the event of a match on the basis that said boundary intersects the at least one pel at the same angle as the predefined angle of the edge in the matched pattern. In order that the invention may be more readily understood an embodiment will now be described with reference to the accompanying drawings, in which: FIGURE 1A shows an image displayed by a raster display device, FIGURE 1B shows an array of picture elements within a portion of the image of Fig. 1A extending over an edge of the image, FIGURE 2 shows the array of Fig. 1B by itself, FIGURES 3A-Q show pel (picture element) patterns having associated edge lines extending at angles relative to the horizontal which are multiples of 45°. FIGURES 4A-Q show pel patterns having associated edge lines extending at angles relative to the horizontal intermediate those of the edge lines of Figs. 3A-Q. FIGURE 5 illustrates in block diagram form a frame generator and a decoder for generating arrays of pels and enhancing pels. FIGURE 6 shows in diagrammatic form the output of the frame generator of Fig.5. FIGURE 7 shows pel patterns representing line images extending at angles relative to the horizontal which are multiples of 45° and intermediate line images. Referring now to Fig. 1A, there is shown an image display 11 of a raster display device. Display 11 is a graphic presentation device for displaying typical graphic patterns and graphic images such as an image 13 by conventional raster display techniques. Image 13 has an edge 16 which passes through display portion 10 at an angle to the horizontal and vertical edges of display 11. As well known, it is during raster image display of edges having such angles that aliasing causes an image edge 16 to be jagged rather than smooth. Therefore it is desirable to perform anti-aliasing techniques upon the edge 16 of image 13 to improve its quality. Portion 10 of image display 11 is shown in more detail in Fig. 1B and comprises five rows and five columns of pixels or pels 18. Conventional pels 18 are discrete picture elements of image display 11 which may be dark, light, or have intermediate intensities to form an image on the display 11. Each pel 18 has a geometric domain which may be, for example, square, circular or elliptical. The geometric centre of each pel 18 is indicated in Fig.1B by a "+". Within portion 10 there is illustrated a square 3 x 3 array 20 of nine pels P1,1 - P3,3. Each pel within array 20 may be referenced by its row and column address. For example P2,1 is in row 2, column 1. When a pel 18 is displayed in the image display 11, its entire domain must be displayed at the same intensity even if edge 16 passes through it. Thus, when a portion of a raster scan image, such as portion 10, is enlarged to the extent that the pel domains of pels 18 may be viewed, as in Fig.1B, it will be understood by those skilled in the art that edge 16 is not straight. Rather, the actual boundary between the background 12 and the foreground 14 of the image is a jagged line formed by the edges of the domains of a plurality of pels 18. Thus the boundary line or edge 16 represents the position which the boundary of image 13 would occupy if the raster scan data had infinite resolution and there were no jagged edges. The edge is therefore shown as a dotted line 16 in Fig.1B. Pels 18 whose domains are wholly to the right of edge 16 are entirely within the foreground 14 of the image and are printed dark. For example, pels P1,3, P2,3 and P3,3 within array 20. Pels 18 whose domains are wholly to the left of edge 16 are entirely within the background 12 and are printed light. For example pels P1,2 and P2,1. The edge 16 also passes through and bisects the domains of several pels 18 so that these domains lie partially in the foreground 14 and partially in the background 12. For example, edge 16 passes through pels P1,2, P2,2, P3,1 and P3,2 which are shown in Fig.1B in an idealized manner in which the portion of the domain of each pel which lies in foreground 14 is shown shaded and the portion of the domain of each pel which lies in the background 12 is shown not shaded. However, during the actual display of image 13, the entire domain of each pel 18 has the same intensity, as illustrated in Fig. 2. Pels 18 whose domain is bisected by edge 16 may be enhanced to smooth the jagged edges by selecting for each such pel an intensity or shade of grey intermediate the not shaded and the shaded pel intensities to optimize anti-aliasing. To determine the shades of grey for enhancement of pels P1,2, P2,2, P3,1 and P3,2, for each pel a 3 x 3 array of pels is selected which has that particular pel at its centre. For example, the pels of array 20 would be used to enhance pel P2,2 which is at its centre. In another example, in order to enhance pel P1,2, the 3 x 3 array selected would comprise P2,1, P2,2, P2,3; P1,1, P1,2, P1,3 and the three pels above P1,1, P1,2 and P1,3 respectively. Referring now to Fig.2, array 20 of Fig.1B is shown alone. An assumed boundary line 22 is shown bisecting array 20. Assumed boundary line 22 is to be distinguished from the edge 16 which separates background 12 and foreground 14 of image 13 as shown in Fig.1B. Assumed boundary line 22 is an approximation of a portion of edge 16 based upon the arrangement of pels within array 20. Thus assumed boundary line 22 is a reconstruction of edge 16 based upon the raster scan data in which all pels P1,1-P3,3 are entirely filled or entirely unfilled. An angle associated with line 22 is measured counter-clockwise from the upper horizontal edge of array 20. Array 20 has three rows and three columns. Because the entire domain of each pel 18 must be displayed at the same intensity, the domains of pels P1,1, P1,2, P2,1 and P3,1 are shown light or unfilled since the majority of the areas of these domains are to the left of edge 16 of Fig.1B. The domains of pels P1,3, P2,2, P2,3, P3,2 and P3,3 are shown dark or filled because the majority of their areas are to the right of edge 16. Thus before enhancement, the domain of each pel is either filled or unfilled depending on which side of edge 16 its centre lies. A jagged edge between the filled and unfilled domains of array 20 is formed by the left vertical edges of pels P1,3, P2,2 and P3,2 and the upper horizontal edge of pel 2,2. Assumed boundary line 22 is positioned to pass through a point 24 which is at the centre of the upper horizontal edge of the pel being enhanced, viz. centre pel P2,2. Depending on the angle of assumed boundary line 22 with respect to the horizontal edge of array 20, a certain percentage of the domain of pel P2,2 is on the left of boundary line 22 and a certain percentage is on the right. A determination is made of the percentage of the domain of pel P2,2 which is to the right of assumed boundary line 22. To enhance the domain of pel P2,2, it is printed at a percentage of full intensity or shade which is equal to the percentage of pel P2,2 which lies to the right of assumed boundary line 22. As previously described, the arrays of pels which form image 13 may contain a number of different pel patterns. As each array in turn is selected for enhancement of the domain of the centre pel, it is compared against each of the pel patterns shown in Figs. 3A-Q and 4A-Q. Each pattern in Figs. 3A-Q, 4A-Q has a respective line and angle associated with it. If a match is found between the array selected for enhancement and one of the pel patterns, the assumed boundary line 22 of the selected array is established as the line associated with the matched pattern. As described above, the line associated with the matched pattern is determined, and the intensity of the domain of the pel to be enhanced is selected in accordance with the angle of the determined line and the position of the line relative to the pel to be enhanced. As will later be described in detail, the pel patterns shown in Figs. 3A-Q have lines associated with angles which are multiples of 45° measured from the horizontal edges of the arrays 20. For example, Figs. 3A,B show pel patterns each having a line with an associated angle of 0°. Each has a top row of pels which is unfilled and has a filled pel area with an edge which is parallel to the horizontal line of the matrix. Figs. 3C,D show pel patterns having filled pel areas whose edges are on the diagonal or parallel to the diagonals of the patterns. Thus patterns 3C,D are 45° patterns and the assumed boundary line 22 associated with them has an angle of 45°. As will later be described in more detail, each of the remaining patterns in Figs. 3A-Q may be formed by rotating the patterns in Figs. 3A,B and 3C,D. For example, 90° counterclockwise rotation of the 0° patterns 3A,B produces the 90° patterns of Figs. 3E,F. A second 90° rotation, performed upon the 90° patterns of Figs. 3E,F, establishes the 180° lines shown in Figs. 3I,J. A 90° rotation of the patterns shown in Figs. 3I,J likewise produces the the 270° lines associated with the patterns shown in Figs. 3M,N. Similarly, three consecutive counterclockwise 90° rotations may be performed on the 45° patterns of Figs. 3C,D and their associated lines. The first 90° counterclockwise rotation of the patterns of Figs. 3C,D produces the patterns of Figs. 3G,H each having an associated line of 135°. A second rotation produces the 225° patterns of Fig. 3K,L and a third rotation produces the 315° patterns of Figs. 3P,Q. Figures 4A-Q show pel patterns having associated lines extending at angles intermediate between those of Figs. 3A-Q. For example, the angle of the line associated with the patterns of Figs. 4A,B is 22.5°, intermediate between the 0° and 45° patterns of Figs. 3A,B and 3C,D. Figures 4A,B have top rows which are unfilled and bottom rows which are filled. Pel patterns having lines with angles intermediate between 0° and 45° are those in which each row is filled with at least as many pels as the row above it. Transposing the patterns of Figures 4A,B around a vertical line at the centre of the pattern and rotating the resultant patterns 90° counterclockwise produces the patterns of Figs. 4C,D. The patterns of Figs. 4C,D have lines with angles of 67.5°, intermediate between 45° and 90°. In a manner similar to that described for the patterns of Figs. 3A-Q, Figs. 4A-D may be rotated to produce the remaining patterns of Fig. 4A-Q. A counterclockwise 90° rotation of the patterns of Figs. 4A,B produces the patterns of Fig. 4E,F. A second 90° rotation produces the patterns of Figs. 4K,L and a third produces the patterns of Figs. 4P,Q. A 90° counterclockwise rotation of the patterns of Figs. 4C,D produces the patterns of Figs. 4G,H. A second and a third rotation produce the patterns of Figs. 4I,J and 4M,N respectively. Each pel pattern of Figs. 3A-Q, 4A-Q thus has an associated line with an associated angle. For example, the patterns of Figs. 4M,N each have an associated line with an angle of 292.5°. When a 3 x 3 array 20 is selected to enhance a pel of the raster image, it is compared against each of the patterns of Figs. 3A-Q and 4A-Q. If a match is found, the centre pel P2,2 of the selected array is enhanced. If no match is found, then no enhancement is performed. Thus when a pattern from Figs. 3A-Q, 4A-Q is found which matches the selected array 20, the assumed boundary line 22 of the selected array 20 is also determined. The assumed boundary line 22 of the selected array 20 is the line associated with the pattern of Figs. 3A-Q, 4A-Q which matched the selected array 20. Assumed boundary line 22 is positioned to bisect the centre pel P2,2 of array 20 at the angle of the line of the matched pattern. The preferred position of the assumed boundary line 22 is at point 24, the centre of the upper horizontal edge which is understood to be the optimum position. However, the optimum positioning of the line may be adjusted in accordance with pel geometry. Thus the position of line 22 may be varied to the left or to the right of point 24. When boundary line 22 is positioned and centre pel P2,2 is bisected, two portions of the domain of pel P2,2 are produced. These two portions are centre pel domain portion X which lies to the left of assumed boundary line 22 and centre pel domain portion Y which lies to the right of assumed boundary line 22. Thus pel domain portion Y lies closer to the filled pel area of image 13 than pel domain portion X. A determination is made of the percentage of the total area of the domain of pel P2,2 which pel domain portion Y constitutes. Assumed boundary line 22 has zero width and, therefore, cannot occupy any area in the domain. This percentage may be represented by the fraction given as the area of Y divided by the sum of the areas of X plus Y. This calculated percentage determines the intensity at which the entire domain of pel P2,2 is printed. For example, if pel portion Y forms two-thirds of the total domain of pel P2,2 then the entire domain of pel P2,2 is printed at two-thirds of full intensity. Referring now to Figs. 3A-Q in more detail, the angle of an assumed boundary line 22 is established for each pel pattern with an assumed angle which is a multiple of 45°. The angles are measured counterclockwise from the horizontal edge in the preferred embodiment. However, the angles of Figs. 3A-Q, 4A-Q may be measured from any multiple of 90° from the horizontal in either a clockwise or counterclockwise direction. All pel patterns shown in Figs. 3A-Q, 4A-Q can represent part of the edge of an image such as image 13 of Fig.1. Without any enhancement, all such edge images contain only filled pels on one side of the edge and only unfilled pels on the other side. The pel domain geometry shown for each pel in Figs. 3A-Q, 4A-Q is square. However, pel enhancement using an assumed boundary line 22 may be performed on any pel domain geometry including circular and elliptical pels. Additionally assumed line 22 enhancement may be performed on pels having overlapping domains. Fig. 3A shows a pel pattern in which row 1 is unfilled and rows 2 and 3 are filled. The boundary between the unfilled pel area of row 1 and the filled pel area of rows 2 and 3 is thus perfectly horizontal and this pattern is defined to have an assumed boundary line 22 with an angle of 0°. Fig. 3B shows a pel pattern which is also defined as 0°. Rows 1 and 2 are unfilled and row 3 is filled. Thus the boundary line between the unfilled and filled pels is parallel to the line of Fig. 3A. Figs. 3A,B show the only two patterns which may be defined to be 0° for a 3 x 3 array since an array which is entirely filled or entirely unfilled would have no edge and thus would not be assigned an angle. The patterns shown in Figs. 3A-Q represent only 3 x 3 arrays. However, it will be seen by those skilled in the art that these angles may be defined for any n x n array. In a larger array additional 0° lines may be established. For example a 5 x 5 array may have 0° arrays in which the top row only, the top two rows, the top three rows or the top four rows are unfilled. A 0° associated line may be established for any array which has a completely unfilled top row if the boundary line formed by edges of the filled pels is horizontal. In Fig. 3C pels P1,1, P1,2 and P2,1 are unfilled. The remaining pels are filled. Filled pels thus form a diagonal connecting the lower left pel P3,1 with the upper right pel P1,3. All pels to the right of this diagonal are filled. The array of Fig.3C is thus a diagonal array. The pel pattern of Fig. 3C is thus defined to have an angle of 45°. In Fig. 3D pels P2,3, P3,2 and P3,3 are filled and the remaining pels are unfilled. This pattern is the same as the pattern of Fig. 3C except that the diagonal pels P1,3, P2,2 and P3,1 are unfilled. Thus the assumed boundary line 22 of the pel pattern of Fig. 3D is parallel to that of Fig. 3C and has an angle of 45°. In general the 45° angle pattern for any n x n array may be formed by filling the array to form a filled pel area whose edge is parallel to the diagonal but does not lie to the left of the diagonal. In the generalized n x n example, there may be more than two 45° arrays. Figs. 3E,F may be produced by rotating counter- clockwise the patterns of Figs. 3A,B, respectively, by 90° as previously described. This results in a pel pattern in which the pels of column 1 are unfilled and the pels of columns 2 and 3 are filled for Fig. 3E, and a pel pattern in which the pels of columns 1 and 2 are unfilled and the pels of column 3 are filled for Fig. 3F. A boundary line separating the unfilled areas from the filled areas is vertical and would thus have an angle of 0° + 90° = 90°. In this illustration, the pattern of Fig. 3A is rotated to produce the pattern of Fig. 3E and the pattern of Fig. 3B is rotated to produce the pattern of Fig. 3F. In the general n x n case, in which there may be more than two 0° patterns, each unique 0° pattern may be rotated 90° to produce a unique 90° pattern. In a similar fashion, Figs. 3G,H may be produced by rotating Figs. 3C,D counterclockwise 90° respectively. Thus the pel patterns shown in Figs. 3G,H are defined as having an angle of 45° + 90° = 135°. In the n x n case, if there are more than two 45° patterns, more than two 135° patterns are possible. All 0° pel patterns may be rotated 180° to produce 180° patterns. Thus, in the 3 x 3 example, the pel patterns of Figs. 3I,J may be produced by rotating the 0° pel patterns of Figs. 3A,B counterclockwise 180° to produce patterns having associated lines of 180°. Similarly, the 0° pel patterns of Figs. 3A,B may be rotated counterclockwise 270° to produce the 270° patterns of Figs. 3M,N. The pel patterns of Figs. 3K,L may be produced by rotating counterclockwise the pel patterns of Figs. 3C,D 180° to produce patterns of 225°. The pel patterns of Figs. 3C, D may be rotated counterclockwise 270° to produce the 315° patterns of 3P,Q. Thus all the patterns of Figs. 3E-Q may be established by successively rotating the patterns of Figs. A-D counterclockwise 90° in successive steps. All patterns which may be assigned an assumed boundary line 22 having an angle which is a multiple of 45° are shown in Fig.3. The establishment process may be performed using any size array and requires the initial establishment of pel patterns which are horizontal or diagonal and the rotation of these patterns. Figs. 4A-Q show pel patterns whose angles are intermediate between those of the pel patterns of Figs. 3A-Q. The resolution possible in a 3 x 3 array does not render the establishment of patterns representing more than one intermediate angle meaningful. However, for larger arrays, patterns representing a plurality of intermediate angles may be defined. For example, if two intermediate lines are meaningful they may be defined to have angles of 30° and 60°. The angles of Figs. 4A-Q are defined to be halfway between their nearest angles in Figs. 3A-Q since only one intermediate angle is defined in the 3 x 3 example. Figs. 4A,B show patterns whose associated lines have an angle of 22.5°. This angle is half way between the corresponding patterns of Figs. 3A,B and 3C,D which had associated lines of 0 and 45°, respectively. To produce the patterns shown in Fig. 4A,B and in general to produce patterns having angles intermediate between 0° and 45° for any n x n array, the diagonal pattern such as that shown in Fig. 3C may be used. All pels are removed from the top-most row of this pattern leaving it completely unfilled. The bottom-most row is required to remain completely full. Pels may then be removed from each row between the top-most row and the bottom-most row moving from left to right, such that there remains a number of filled pels on each row which is at least as large as the number of filled pels above it. In this manner a plurality of patterns having different intermediate angles may be produced. Patterns which fall into the definition of a 0° pattern must be eliminated. As shown in Figs. 4A,B there is only one intermediate angle in the 3 x 3 case, 22.5°, and there are two patterns which are associated with it. The next pattern to be established is the one associated with the angle between 45° and 90°. In the 3 x 3 case only one such intermediate angle is chosen and it is 67.5°. The 67.5° patterns shown in Figs. 4C,D may be produced by transposing the patterns of Figs. 4A,B about a vertical axis and rotating the resultant pattern 90° counterclockwise. In the 3 x 3 example, the transposition may be performed by swapping the first and third columns of a pattern. If there is more than one pattern representing an intermediate angle defined between 0° and 45°, each pattern may be transposed and a corresponding plurality of patterns associated with different angles intermediate between 45° and 90° may be produced. The patterns of Figs. 4A-D may then be rotated successively three times counterclockwise 90° to produce the patterns of Figs. 4E-Q in the manner previously described for the patterns of Figs. 3E-Q. The first rotation of the patterns of Figs. 4A,B produces the 112.5° patterns of Figs. 4E,F. The second and third rotations produce the 202.5° patterns of Figs. 4I,J and the 292.5° patterns of Figs. 4M,N respectively. The first rotation of the patterns of Figs. 4C,D produces the 157.5° patterns of Figs. 4G,H. The second and third rotations produce the 247.5° patterns of Figs. 4K,L and the 337.5° patterns of Figs. 4P,Q. The transpositions and rotations required to produce the patterns of Figs. 4A-Q, as well as the patterns of 3A-Q, may be performed by conventional computer aided design software and image processing software. With computer assistance, arrays and patterns may be visually displayed, rotated or transposed, and the results observed. Additionally the associated boundary line of a pattern, and its angle, may be rotated and observed. Alternatively, rotation and transposition of arrays and patterns may be performed by logic in hardware form. To implement an array rotation using hardware, a first set of nine latches may be used to represent the nine pels of the array which is to be rotated, each latch representing one pel within the array and storing a 1 if the pel is filled and a 0 is the pel is unfilled. These latches may be arranged into a 3 x 3 pattern to represent the rows and columns of the array to be rotated. The outputs of the first set of nine latches may be connected to the inputs of a second set of nine latches in a 3 x 3 array which represents the pattern that results from the rotation. The sets of latches are connected in the manner shown in column 1 of Table 1. For example, the output of the latch representing P1,1 in the first set of latches is connected to the input of the latch representing P3,1 of the second set of latches because a pel in a position P1,1 is transferred to position P3,1 by rotating an array or pattern. In a similar manner the remaining eight latches are connected according to Table 1. When the outputs of the nine latches in the first set of latches are supplied to the second set of latches, the second set represents a pattern which is a 90 degree rotation of the pattern represented by the first set. By connecting the outputs of the first set of latches to a third set of nine latches in a 3 x 3 array according to column 2 of Table 1, the latches may perform a transposition of the starting pattern. For example, the output of the latch representing P1,1 of the starting pattern is connected to the input of the latch representing P1,3 of the third set of latches. A pel in position P1,1 is transferred to position P1,3 by transposition. Thus whether a rotation or a transposition is performed the output of the latch representing a starting position is connected to the input of a latch representing the position to which it is transferred by the operation. Assumed boundary lines with angles such as those shown in Figs. 3A-Q, 4A-Q may also be established for pel patterns as shown in Figs. 7A-H which represent line images within an array 20. The line images of Figs. 7A-H are to be distinguished from the edge images of Figs. 3A-Q, 4A-Q. Line images are representations of narrow lines having two edges which pass through an array 20 and appear as patterns which have unfilled pel areas on two sides of the filled pel areas. In Figs. 3A-Q, 4A-Q which show edge images, all filled pel areas have unfilled pel areas on one side only. Figure 7A shows a horizontal line image passing through an array at 0° and is defined as a 0° or 180° line. Fig. 7B shows three arrays having pel patterns representing line images, a diagonal line image and two line images parallel to a diagonal line. These lines therefore have an angle of 45° or 225° . Each line in a line image pattern represents two angles. The angle defined and a 180° rotation of the angle defined. These are actually the same line. Figure 7C results from a 90° counterclockwise rotation of the 0° pattern of Fig. 7A and has an angle of 90° or 270°. Similarly, the patterns of Fig. 7D may be produced by 90° counterclockwise rotations of the patterns of Fig. 7B and have an angle of 135° or 315°. Figures 7E-H represent line images having angles intermediate between those of Figs. 7A-D. The pel patterns of Figs. 7E-H may be produced by conventional line drawing algorithms which convert vector data to raster form. The angle established for each pel pattern is the angle of the vector chosen for conversion by the line drawing algorithm. The patterns of Figs. 7E have angles of 22.5° or 202.5°. The patterns of Fig. 7F have angles of 67.5° or 247.5°. Figs. 7G,H show patterns of 112.5° or 292.5° and 157.5° or 337.5°, respectively. To enhance the centre pel of an array corresponding to one of the patterns of Figs. 7A-H, the intensity of the pel to be enhanced is determined by the angle of the assumed boundary line 22. The angle of the assumed boundary line 22, which is the angle of the vector, is an approximation of the angle of the line image. During enhancement of line images assumed boundary line 22 is defined to have a non-zero width which may be approximately one-half the width of a pel. The percentage of full intensity of the enhanced pel is the ratio of the area of the portion of the domain of a pel overlapped by assumed boundary line 22 to the area of the entire pel domain. The pels of the patterns of Figs. 3A-Q, 4A-Q and 7A-H may be represented as binary bits of data in which a filled pel may be represented by a 1 and an unfilled pel may be represented 0. Furthermore, image 13, as previously described for Fig. 1A, may be represented in conventional manner as binary bits and these binary bits may be processed for image enhancement using assumed boundary lines 22. Therefore, as known in the art, an image which is to be displayed on raster image display 11 is digitized to produce raster scan data. To enhance the quality of the image 13 on raster image display 11 using assumed boundary line 22, the raster scan data must be converted into arrays 20. Raster scan data is one dimensional data in the form of a sequence of 8 bit bytes in which each bit represents one pel and may be on or off depending on whether the pel it represents is filled or unfilled. When these bits are converted to the form of an array 20, they may be used to access a location in a Read Only Memory (ROM) or a Programmable Logic Array (PLA) decoder. The location accessed contains intensity information for the pel within array 20 to be enhanced. This intensity information may be determined as a percentage or fraction of full intensity which is equal to the percentage or fraction of P2,2 formed by Y as shown in Fig.2. Figure 5 illustrates a block diagram of quality enhancement data flow apparatus 29 which includes a frame generator 26 and a decoder 27. Unenhanced raster scan data, from a scanning and digitizing device, in serial form is applied to frame generator 26 by way of a line 26a, and after receiving assumed line enhancement by frame generator 26 and decoder 27, the enhanced raster scan data is applied to display 11 by way of output 54. Frame generator 26 receives raster scan data in serial form and generates a series of 3 x 3 arrays 20. Each of the 3 x 3 arrays 20 generated by generator 26 represents a window of the display on a raster display 11. Frame generator 26 may produce two different arrays 20 simultaneously to permit parallel processing of arrays, thereby increasing the speed of enhancement. Window decoder 46 receives the 3 x 3 arrays 20 generated by frame generator 26 and performs enhancement of the centre pel of each array 20. Decoder 27 performs this enhancement by matching the pel patterns of the arrays generated by generator 26 with the predetermined pel patterns and then performing enhancement according to the position of the assumed boundary line 22 as described above. If a match is found the intensity of the domain of the pel is determined by the percentage of the modified pel which lies to the right of the assumed boundary line 22 whose angle is chosen according to Figs. 3A-Q, 4A-Q. Whether a pel is enhanced or not, decoder 27 transmits its intensity information to a visual display device such as display 11. To receive and convert the raster scan data, frame generator 26 of quality enhancement data flow apparatus 29 shown in Fig. 5 includes an input register 28. Input register 28 stores this data and outputs it, one byte at a time, to first delay buffer 30 and registers 34a,b,c. Registers 34a,b,c each hold one of three successive bytes of raster scan data. When the first byte of raster scan data is received in input register 28, it is loaded into register 34a of row selector 40. It is also written into the zero location of first delay buffer 30 using line 56. First delay buffer 30 is a circular buffer with a length of 420 bytes. This length is chosen to correspond to the number of bytes of raster scan data produced for one raster scan and it depends on the width of the printing paper and the sampling rate. Second delay buffer 32 is also a circular buffer with a length of 420 bytes. Buffers 30,32 may be eight bit memories with a binary counter to serve as an address register. Both buffers 30,32 begin with their address register zeroed. When input register 28 loads data into register 34a, the addressed byte of each buffer 30,32 is simultaneously loaded into a register. The contents of location zero of buffer 30 are written into register 36a of row selector 42 and the contents of location zero of buffer 32 are written into register 38a of row selector 44. After the loading of registers 34a, 36a and 38a the input register byte is written into location zero of first buffer 30, and byte zero from first delay buffer 30 is written into location zero of second delay buffer 32 by line 58. The address register of delay buffers 30,32 is incremented to 1. A second byte of data is then loaded into input register 28. When the second byte of raster scan data is received by input register 28, it is loaded into register 34b of row selector 40. At the same time, the addressed byte of first delay buffer 30, byte one, is written into register 36b of row selector 42 and the addressed byte of second delay buffer 32 is written into register 38b. The byte stored in input register 38 is then written into location one of first delay buffer 30 and the contents of location one of first delay buffer 30 are written into location one of delay buffer 32. The address register is then incremented to two. This process is then repeated a third time. A third byte of scan data is received in input register 28 and this byte of data is written to register 34c. Simultaneously, the addressed byte of each buffer 30,32 is loaded into a register. The contents of location two of buffer 30 are written to register 36c and the contents of location two of buffer 32 are written into register 38c. The byte stored in input register 28 is then written into location two of buffer 30 and the contents of location two in buffer 30 are written to location two of buffer 32. The address register is incremented to three and a fourth byte of scan data is loaded into input register 28. The first three bytes of the scan input data are therefore stored in registers 34a,b,c. Additionally, they are stored at locations zero, one, and two of delay buffer 30. Since circular delay buffer 30 is 420 bytes long, the first three bytes of scan data are loaded into registers 36a,b,c 420 cycles later than they are loaded into registers 34a,b,c. When they are written to registers 36a,b,c, they are simultaneously loaded into second delay buffer 32. Since second delay buffer 32 is also 420 bytes long, it delivers the first three bytes of scan data to registers 38a,b,c 420 cycles after delivery to registers 36a,b,c. After a sufficient number of cycles, registers 34a,b,c, 36a,b,c and 38a,b,c contain a window or frame of the input scan data received by input register 28. Taken together, registers 34a,b,c contain the 24 most recently received bits of scan data. Registers 36a,b,c contain 24 bits which were received by input register 28 420 byte cycles prior to the data in registers 36a,b,c. Since each scan line is 420 bytes wide, the 24 bits of data in registers 36a,b,c represent the pels of display 11 which are directly above the pels represented by the bits in registers 34a,b,c. Similarly the bits in registers 38a,b,c were delayed an additional 420 byte-cycles beyond those of registers 36a,b,c and represent the scan data of the line immediately above registers 36a,b,c. Thus registers 34a,b,c, 36a,b,c, and 38a,b,c form a window or frame of the raster scan data. Row selector 40 selects four bits at a time successively from registers 34a,b,c. Row selector 40 may be a conventional data selector with a twenty-four bit input and logic for selecting which input bits are transmitted to its output at line 62. This selection logic may be responsive to a binary counter. The first time row selector 40 selects bits from register 34a, it selects the first four bits starting with the first bit of register 34a. The second time it skips a bit and selects four bits starting with the third bit of register 34a. This process of overlapping selection continues until it crosses over to register 34b. The process then continues through registers 34b,c. Before row selector 40 reaches the end of register 34c, a new byte from input register 28 is loaded into register 34a and row selector 40 crosses over from the last bits or register 34c to the first bits of register 34a. In a similar manner, input register 28 reloads registers 34b,c before row selector 40 returns for more bits. Simultaneously, row selector 42 selects four bits at a time from registers 36a,b,c. Because the data in registers 36a,b,c is delayed by delay buffer 30 for one scan line, the bits selected by row selector 42 represent the pels immediately above the pels represented by the bits selected by row selector 40. As row selector 42 proceeds through registers 36a,b,c first delay buffer 30 loads new bytes of input scan data into registers 36a,b,c. In the same manner, row selector 44 selects four bits at a time from registers 38a,b,c. As each register is exhausted, row selector 44 moves to the next. Second delay buffer 32 transmits bytes of raster scan data by line 60 to reload registers 38a,b,c. The four bits of data selected by row selector 44 are delayed by second delay buffer 32 for 420 bytes cycles more than the data selected by row selector 42. Therefore, the pels represented by the bits which are selected by row selector 44 are on the row immediately above the pels represented by the data selected by row selector 42. Each row selector 40, 42, 44 selects from three registers. While three is believed to be the optimum number of registers, it is known that two or more are required. Thus the bits selected by row selectors 40, 42, 44 of frame selector 26 form a 4 x 3 window 80 as shown in Fig.6 which shows the output of frame generator 26. This output, window 80, is a window of the image represented by the raster scan data. Row selector 40 selects the bottom row of array 80. Row selector 42 selects data which is delayed by one raster scan thereby selecting the middle row of window 80, and row selector 44 selects the top row. This permits frame generator 26 to transmit to window decoder 46 of look up table 27 a 3 x 3 window 82 which is composed of the first three columns of window 80. Frame generator 26 thus spatially associates the serial data received by input register 28. The first three of the four bits selected by row selector 40 are therefore transmitted to window decoder 46 through lines 62, 63. These three bits represent the bottom row of window 82. In the same manner, row selector 42 transmits the first three of its four bits to window decoder 46 through lines 64, 65 forming the middle row of window 82. Row selector 44 transmits the first three of the four bits it selected to window decoder 46 by lines 66, 67 forming the first row of window 82. Window 82 within window decoder 46 is thus a 3 x 3 window of bits each bit representing a pel. Each bit may be on or off indicating that the pel which it represents is filled or unfilled. Window 82 represents a pel pattern which may be enhanced as previously described for array 20. The enhancement may be performed by using the bits of window 82 to access a 512 x 2 ROM look up table or a programmable logic array within window decoder 46 which contains the predetermined intensity of the enhanced pel for the pel pattern represented by window 82. Programmable logic arrays are preferred because they allow faster access to the intensity information. This predetermined intensity is determined by the assumed boundary line 22 associated with the pel pattern of window 82 and is approximately equal to the percentage of the centre pel which lies to the right of assumed line 22. In this manner an array 82 is matched with one of the valid pel patterns of Figs. 3A-Q, 4A-Q and an intensity is determined for the centre pel. Arrays which do not correspond to any of the valid array patterns are passed through window decoder 46 unenhanced. Thus the angle and the placement of assumed boundary line 22 and the determination of the pel intensity may be simplified for a 3 x 3 array by deriving a look up table which may be acceded using bit patterns from frame generator 26. When a ROM look up table is used in decoder 46, the nine bits which are received from row decoders 40,42,44, and which represent a pel pattern of an array 20, are received by the address lines of the ROM. The contents of the location addressed is intensity information for the centre pel of the array 20. This intensity information is the percentage of full intensity which is determined by positioning assumed line 22 to bisect the centre pel as previously described. Thus, accessing the contents of the ROM is, in effect, a comparison of the array represented by window 82 with the predetermined patterns of Figs. 3A-Q, 4A-Q, for example. When an array 20 which is not to be enhanced is applied to decoder 46, the intensity information accessed indicates an intensity which is the same as the unenhanced intensity. Thus, all possible pel patterns cause decoder 46 to output bits onto decoder output lines 68,70. But only for the pel patterns to be enhanced do the output bits indicate an intensity other than the unenhanced intensity. In a similar manner, a programmable logic array may be programmed to output the same two bits of intensity information as the ROM for each pel pattern. Window decoder 46 thus processes one 3 x 3 array formed by row selectors 40, 42, 44 of frame generator 26. In the preferred embodiment a second 3 x 3 window may be processed simultaneously thereby doubling the speed of the processing of input raster data. To permit this increase in processing speed, window decoder 48 also receives data from row selectors 40, 42, 44. Row selector 40 transmits four bits of data on line 62. The first three bits, bits 1,2,3, are received by window decoder 46 over line 63. Simultaneously, the last three bits, overlapping bits 2,3,4, are received by window decoder 48 through line 69 and form the bottom row of window 84 as shown in Fig.6. In a similar manner, the last three bits of data transmitted by row selector 42 are received by window decoder 48 to form the middle row of window 84 and the last three bits of the data transmitted by row selector 44 through line 66 are received by window decoder 48 to form the top row of window 84. It is for this reason that row selectors 40,42,44 skip a bit when selecting data from their registers. Thus window 80 is divided into two overlapping windows 82, 84 which may be processed separately. It will be seen by those skilled in the art that the number of window decoders and the number of bits selected by row selectors may be varied to process a single pel at a time or to perform parallel processing of any number of pels. The manner of decoding within window decoder 48 or any additional window decoders may be the same as that of window decoder 46. Window decoder 46 outputs the intensity information corresponding to the received bit patterns on lines 68, 70. Lines 68, 70 are 1 bit wide, thereby permitting four levels of intensity. In the 3 x 3 edge image example, this process alters the intensity of the centre bit in 16 patterns out of the 512 possible pel patterns. These 16 patterns are those shown in Figs. 4A-Q. In these patterns, if the centre pel is filled, decoders 46,48 select two-thirds intensity. If the centre pel is unfilled, one-third intensity is selected. This is shown in table 2 which lists a portion of a ROM look up table which may be used in decoders 46,48. Table 2 contains only the entries for the pel patterns of Figs. 4A-Q, the 16 patterns which are modified in the 3 x 3 edge image example. The ROM addresses are formed by representing a filled pel with a 1 and an unfilled pel with a zero and proceeding through the pel pattern from left to right and from top to bottom. Thus P1,1 is high order bit, P1,2 is the next highest order bit and P3,3 is the low order bit. For all pel patterns other than the 16 shown in Table 2, the intensity information from the ROM look up table of decoders 46, 48 is 11 if the centre pel is filled before enhancement or 00 if the centre pel is unfilled before enhancement. The high order bit of the intensity indicia is transmitted by decoder 46 through line 70 to parallel to serial converter 52. The low order bit is transmitted by line 68 to parallel to serial converter 50. Simultaneously, the high order bit of intensity indicia from window decoder 48 is transmitted to converter 52 on line 74 and the low order bit is communicated by line 72 to converter 50. Parallel to serial converters 50, 52 therefore each receives two bits of parallel data at a time as input and each provides a single serialized data output stream. Thus information on two raster scan bits are transmitted to converters 50, 52 simultaneously. This information, including filled, unfilled and modified indicia, is transmitted by converters 50,52 in a serial manner. However the indicia are spatially associable as previously described for frame generator 26. Converters 50, 52 transmit the enhanced raster scan data of an image 13 to output port 54 which may be coupled to a raster driver, a driver for a video display tube or any visual display device such as image display 11, which requires a serial data stream and generates pels or pixels in response to the serial data stream. For example, quality enhancement data flow 29 may be used to convert data and enhance the quality of the image produced by a printer described in United States Patent No. A-4,031,519 issued to Findley and hereby incorporated by reference, in which a laser beam writes dot patterns of varying intensity in response to pel-indicating indicia. The binary input thus may modify the intensity or reflectance of the printed pels by modulating the beam produced by the raster to form a printed image having intermediate or grey levels at selected points on the edges between foreground and background. This enhancement permits a printer to print graphics at an apparent resolution higher than the capacity of the machine. By way of example, in data flow apparatus 29, Fig. 5, the following components may be used for the operation and function as described and shown.

Claims: A method of improving the quality on a raster display device of an image (13) formed from a plurality of picture elements (pels) by modifying the intensity of selected pels in the image so as to smooth an edge representing the boundary between two regions of different intensity in the image, said method comprising the steps of: selecting arrays of pels from the image; comparing the pattern of pels in each array with a set of predetermined patterns and determining a modified intensity for at least one pel in the array in the event of a match with particular predetermined patterns; changing the intensity of the at least one pel in the array to said modified intensity; and characterised by: the particular predetermined patterns each depicting an edge at a predefined angle to the horizontal, and determining the modified intensity in the event of a match on the basis that said boundary intersects the at least one pel at the same angle as the predefined angle of the edge in the matched pattern. A method as claimed in claim 1, wherein the selected arrays of pels are square. A method as claimed in claim 2, wherein the selected arrays of pels are 3x3, and in the event of a match with a particular pattern, the intensity of the central pel in the array is modified. A method as claimed in claim 3, wherein said predefined angle is 0 or 22.5 degrees, or a multiple thereof. A method as claimed in any preceding claim, wherein the modified intensity of the at least one pel in the array is calculated as the ratio of areas of the at least one pel on either side of the boundary intersecting at said predefined angle. A method as claimed in any preceding claim, wherein said particular pattern may alternatively depict a narrow line having a width of less than one pel at a prefined angle to the horizontal, and the modified intensity in the event of a match with such a particular pattern is determined on the basis that said boundary intersects the at least one pel et the same angle as the predefined angle of the line in the matched pattern. Apparatus for improving the quality on a raster display device of an edge representing the boundary between two regions of different intensity in an image (13) formed from a plurality of picture elements (pels) by modifying the intensity of selected pels in the image so as to smooth the edge, said apparatus comprising: means for selecting arrays of pels from the image; means for comparing the pattern of pels in each array with a set of predetermined patterns and determining a modified intensity for at least one pel in the array in the event of a match with particular predetermined patterns; means for changing the intensity of the at least one pel in the array to said modified intensity; and characterised in that: the particular predetermined patterns each depict an edge at a predefined angle to the horizontal, and the determining means determines the modified intensity in the event of a match on the basis that said boundary intersects the at least one pel at the same angle as the predefined angle of the edge in the matched pattern. Apparatus as claimed in claim 7, wherein the determining means comprises a plurality of registers (40, 42, 44) for storing the arrays of pels, and said storing means is a Read Only Memory device (46, 48).

Inventors: DOUMAS, WILLIAM MARK
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1986
Main classification: G09G1
IPC codes: G09G1, G09G5, G06K15