Abstract:
The contour fidelity of reproduction of images is enhanced by matching groups of pixels with templates based on a hierarchical set of patterns. This is accomplished by isolating a symmetrical window of pixels in the image including a central pixel and matching the groups of pixels in the window with hierarchical templates. Enhancement values for the central pixel are provided based on the results of the comparison. Windows are formed so that each pixel in the image is a central pixel for at least one window. The hierarchial set of patterns is developed so that each pattern in the hierarchy is a combination of an extension pattern and the pattern immediately below it in the hierarchy. This significantly reduces the hardware requirements for implementation of the technique. Templates are developed by creating horizontal, vertical, reversed and inverted permutations of each pattern in the set. Correctable pixel locations are identified for each template, and the central pixel receives enhancement values when it is in the correctable location of at least one template. In an microaddressable printer, overscanning and increased clock frequency provide multiple segments for representing each pixel, and spot width compensation allows multiple intensity levels for each segment.

Description:
This is a continuation of application Ser. No. 07/811,550, filed Dec. 20, 1991, abandoned. 
    
    
     FIELD OF INVENTION 
     The present invention relates to improvement in the display of raster images, and in particular to enhancing the exposure fidelity in increased precision optical display systems. More specifically, the invention pertains to economical and technically attractive methods and means for enhancing the contour fidelity of exposures on a microaddressable optical printer. 
     BACKGROUND OF THE INVENTION 
     Others have proposed template matching techniques for more precisely controlling the size, positioning and number of picture elements (&#34;pixels&#34;) that are printed on a xerographic photoreceptor to render bitmapped images. 
     Walsh et al., U.S. Pat. No. 4,437,122, describes a method of enhancing the resolution and quality of characters of a system receiving video display pixel information and providing hard copy output. The system accomplishes this by storing at least three successive lines of video data in successive parallel connected shift registers, applying the output of the shift registers to a decoder, and generating driving signals for a printer head. As described in column 2, lines 6-10, the decoder &#34;compares the pixels on the same lines as well as in preceding and succeeding lines that surround each specific input pixel to generate the printer head driving signal according to whether straight or curved line segments are to be formed&#34;. As described in column 3, line 67, to column 4, line 1, the enhancement of the central pixel may be determined by &#34;progressively examining an ordered table of matches to find an equivalent image and its related enhancement.&#34; 
     Tung, U.S. Pat. No. 4,847,641, describes a technique for enhancing the printing of bitmapped images by piecewise matching of the bitmap with predetermined stored templates of patterns to detect occurrence of preselected bitmap features. Templates representing compound error elements common to all bitmap images, associated compensation signals for each template, and the rules governing the relationships between the matched templates and the associated compensation signals are compiled into an index matching table implemented in a high speed parallel logic array. 
     Template matching effectively overcomes some of the sampling errors that are caused by the use of input data that is too coarse to accurately represent the higher spatial frequency content of the image. It does not, however, solve the problems that may be encountered in existing printers due to non-linearity in the way in which the spatial positioning of the transitions in printed images tracks changes in the intensity of the transitional boundary scans. 
     Many of the ROSs (raster output scanners) that have been developed for xerographic printing employ a single beam or a multi-beam laser light source for supplying one or more intensity modulated light beams, together with a scanner (such as polygon scanner) for cyclically deflecting the modulated laser beam or beams across a photoreceptor in a &#34;fast scan direction&#34; while the photoreceptor is being advanced simultaneously in an orthogonal &#34;process direction.&#34; In practice, each of the laser beams typically is brought to focus on or near the photoreceptor surface to provide a substantially focused &#34;scan spot.&#34; The scan spot, in turn, scans the photoreceptor in accordance with a predetermined scan pattern because the fast scan deflection of the laser beam or beams vectorially sums with the process direction motion of the photoreceptor. Indeed, the scan pattern is dependent upon and is determined by the scan rate (scan/sec) of the scanner, the spot size that is employed, and the process speed (inches/sec) of the photoreceptor. Such a scan pattern produces an exposure pattern because the scans are superpositioned on the photoreceptor, regardless of whether the scans simultaneously or sequentially expose the photoreceptor. Accordingly, it is to be understood that the present invention applies to printers and other display means that employ single beam or multi-beam ROSs, even though this disclosure features the single beam/single scan spot case for the sake of simplification. 
     Microaddressable printers and other types of display systems operate in an overscanned mode to render images by scanning one or more intensity modulated scan spots over a high gamma, photosensitive recording medium in accordance with a scan pattern that causes the spot or spots to superimpose multiple discrete exposures on the recording medium on centers that are separated by a pitch distance that is significantly less than the effective spatial diameter of the scan spot (i.e., the full width/half maximum (FWHM) diameter of a gaussian scan spot). Overscanned systems have substantially linear addressability responses, so boundary scans that are intensity modulated in accordance with the preselected offset values are used by these systems for spatially positioning the transitions that are contained by the images they render to a sub-pitch precision. 
     With older techniques of FWHM printing, the output resolution is limited to the scan resolution. With double overscanned printing, there are twice as many scans, effectively doubling the resolution scans in the process direction. The power to the laser diode, or &#34;intensity&#34; of each scan, can be controlled during the scan, giving subscan addressability. For example, in a printer with a spot size of 1/400 inch, scanning would take place at 800 scans per inch. At four levels of gray, the addressability of the printer increased to 3200 bits per inch. 
     Overscanning that results from the use of finer pitch scan patterns degrades the spatial frequency response of the printer in the process direction. A limited overscan is, however, consistent with the printing of high quality images because it permits the image transitions (i.e., the high spatial frequency content of the images) to be mapped onto the scan pattern with increased spatial precision. 
     The technique of microaddressability via overscanned illumination is more fully described in the copending, coassigned U.S. patent application Ser. No. 07/736,989 of D. N. Curry and D. L. Hecht, entitled &#34;Microaddressability via overscanned Illumination for Optical Printers and the Like Having High Gamma Photosensitive Recording Media,&#34; incorporated herein by reference. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method for enhancing the contour fidelity of images. The method includes isolating a window of pixels in a portion of the image and comparing pixels in the window with a hierarchical set of standard pixel patterns which include correctable pixel positions. Matching patterns are identified, and the central pixel of the window is enhanced when it lies in a correctable position in the highest priority pattern that is matched. 
     The present invention also provides a template matching technique with a double overscanned ROS to achieve enhanced fidelity exposures. Furthermore, the technique of the present invention may compensate for the width of a spot in both the fast scan and process directions. The technique of the present invention serves to smooth contours and jagged or stair-stepped edges commonly found in bitmapped images. 
     One aspect of the invention is based on the recognition of a problem with conventional and overscanned printing utilized to render enhanced exposure fidelity to a photoreceptor or other recording media. Normally the source of the high fidelity information is a sampled image or a high resolution bitmap. But many raster data sources provide low resolution bitmaps at 300 or 400 bits per inch, which is not enough resolution to eliminate unwanted artifacts induced by the coarseness of the information, such as stairstepping. 
     Another aspect of the invention is based on the recognition of a problem with other techniques in a conventional printer where the scan spacing is the same as the spot resolution, which does not compensate for the width of the spot. This aspect is further based on the discovery that this problem can be solved by an extension to a 2× overscanned printer, which gives the advantage of having a more linear edge positioning response with respect to intensity, thereby reducing the number of required correction intensities, as well as simplifying and making the edge positions more predictable. 
     The technique of the invention further compensates for the width of the spot when rendering all bitmapped data, thereby reducing distortion of shapes when the object being rendered is one or two bits wide. 
     The hierarchial and permutation strategy of the invention has the advantage of simplifying the implementation. Pattern templates are implemented in a hierarchial arrangement, in which the largest pattern which receives a match will have priority over smaller patterns. Patterns are arranged so that a match on any pattern in general is simply the combination of a match on the next lowest pattern plus two additional bits, saving gate resources in the decoding logic. 
     The following description, the drawings and the claims further set forth these and other objects, features and advantages of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows general features of a laser printer. 
     FIG. 2 shows an application of microaddressability in 2× overscanned output device to a portion of a bitmap. 
     FIG. 3 shows set of patterns which represent a hierarchy of patterns for recognition of low fidelity bits which are to be enhanced. 
     FIG. 4 shows a set of horizontal and vertical templates based on permutations of pattern 4 from FIG. 3. 
     FIG. 5 shows a set of horizontal and vertical templates based on permutations of impulse match pattern 4 from FIG. 3. 
     FIG. 6 shows an input window used to determine the area of the image. 
     FIG. 7 shows a portion of an image in an input window similar to FIG. 6. 
     FIG. 8 illustrates an enhancement application in a group of pixels. 
     FIG. 9 shows the resulting enhancement values of pixels in a pattern as a result of the operations shown in FIG. 8. 
     FIG. 10 shows pixels, indicated in bold, which need to be corrected when horizontal templates are matched. 
     FIG. 11 shows pixels, indicated in bold, which need to be corrected when vertical templates are matched. 
     FIG. 12 shows a flowchart illustrating steps in enhancing a portion of an image. 
     FIG. 13 shows an example of multiple templates permutated from pattern 5 matching a portion of text. 
     FIG. 14 shows a block diagram of an apparatus for performing the image enhancement in accordance with the present invention. 
     FIG. 15 shows a portion of an image. 
     FIGS. 16-19 show typical implementations of template detecting circuitry. 
     FIG. 20 shows an improved circuit implementation which detects matches with hierarchial templates. 
    
    
     DETAILED DESCRIPTION 
     An &#34;image&#34; is a pattern of light. An image may include characters, words, and text as well as other features such as graphics. An &#34;image output device&#34; is a device that can provide an image as output. A &#34;display&#34; is an image output device that provides information in visible form. The visible pattern presented by a display is an &#34;image&#34;. 
     Each location in an image may be called a &#34;pixel.&#34; In an array defining an image in which each item of data provides a value, each value indicating the color or intensity of a location may be called a &#34;pixel value&#34;. The two-dimensional array of pixels defining the image may be &#34;binary form&#34; or &#34;bitmapped,&#34; or a &#34;gray-scale form.&#34; Each pixel value is a &#34;bit&#34; in the binary form or bitmap of the image, or a &#34;gray-scale intensity value&#34; in a gray-scale form of the image. An edge of an image may be described as a &#34;contour&#34; that may have a &#34;slope&#34; or angle. 
     FIGS. 1 and 2 show general features and application of an overscanned laser printer. 
     In FIG. 1, there is illustrated a more or less conventionally configured optical system 10 of a xerographic print engine (not shown). The flying spot ROS scans a data modulated light beam 12 over a xerographic photoreceptor 14 in accordance with a predetermined raster scanning pattern. To that end, the ROS comprises a laser diode 16 for emitting the light beam 12 in the visible or invisible (e.g., infrared) band of the spectrum, together with a polygon scanner 18 that has a plurality of nearly identical, mirror-like exterior sidewalls or &#34;facets&#34; 20. 
     In keeping with standard practices, there is a motor 22 for rotating the scanner 18 about its central axis, as indicated by the arrow 24, at a substantially constant angular velocity. The scanner 18 is optically aligned between the laser 16 and the photoreceptor 14, so its rotation causes the laser beam 12 to be intercepted and reflected from one after another of the scanner facets 20, with the result that the beam 12 is cyclically swept across the photoreceptor 14 in a fast scan direction. The photoreceptor 14, on the other hand, is advanced (by means not shown) simultaneously in an orthogonal, process direction at a substantially constant linear velocity, as indicated by the arrow 26, so the laser beam 12 scans the photoreceptor 14 in accordance with a raster scan pattern. As shown, the photoreceptor 14 is coated on a rotating drum 28, but it will be apparent that it also could be carried by a belt or any other suitable substrate. 
     Typically, the ROS additionally includes pre-scan optics 30 and post-scan optics 32 for bringing the laser beam 12 to a generally circular focus proximate the photoreceptor 14 and for providing any optical correction that may be needed to compensate for scanner wobble and other optical irregularities. Preferably, the optical aperture of the ROS is sufficiently large to avoid excessive truncation of the laser beam 12 because the beam 12 then comes to a generally circular or elliptical focus with a gaussian intensity profile. However, the broader aspects of this invention are not limited to any specific scan spot geometry or intensity profile. Accepted design principles indicate that the spatial frequency power spectrum of the scan spot profile should not have significant spatial frequency components outside the spatial frequency passband of the imaging system, but the scan spot can otherwise be tailored to satisfy a variety of system requirements. 
     The amplitude, duty cycle, and/or pulse width of the laser beam 12 is serially modulated (collectively referred to herein as &#34;intensity modulation&#34;) in accordance with successive multi-bit digital data values. These data values are clocked out of a data source 36 serially in response to data clock pulses which are time synchronized with the scan of the scan spot from bitmap location-to-bitmap location within the raster scan pattern. Thus, the data clock frequency can be selected (by means not shown) to map the data onto the raster scan pattern at any desired magnification, using either the same or different magnifications in the fast scan and the process directions. The data may be preprocessed (by means not shown) for the printing of halftoned images and/or text and other types of line art, so the data source 36 generically represents any suitable source of raster data for intensity modulating the laser beam 12. The drive current for the laser diode 16 is serially modulated by modulator 38 in accordance with the data values that are clocked out of the data source 36, thereby intensity modulating the laser beam 12 at the data clock rate in accordance with those data values. 
     The fast scan positioning precision of the print engine 10 can be increased, if desired, by dynamically adjusting the frequency of the data clock to compensate for positioning errors that tend to be caused by &#34;motor hunt&#34; (i.e., variations in the angular velocity of the scanner 18), &#34;polygon signature&#34; characteristics (variations in the angular velocities at which the different facets 20 of the scanner 18 sweep the scan spot across the photoreceptor 14 from a start-of-scan position to an end-of-scan position), and &#34;scan non-linearities&#34; (i.e., localized variations in the linear velocity of the fast scan, which are caused by variances in the geometric relationship of the scanner 18 to spatially distinct segments of any given scan line). 
     The pitch of the scan pattern for the printer 10 is selected to be significantly finer (i.e., smaller) than the FWHM diameter of the scan spot that is formed from the scan beam 12. This relatively fine pitch scan pattern causes the printer 10 to operate in an &#34;overscanned&#34; mode because the FWHM central core of the scan spot sweeps across spatially overlapping segments of the photoreceptor 14 during the scanning of spatially adjacent, neighboring scan lines. Overscanning slightly degrades the spatial frequency response of the printer 10 in the process direction. However, it has been found that the linearity of the addressability response of ROS printers, such as printer 10, increases rapidly as the ratio of the scan pitch to the FWHM diameter of the scan spot is reduced to progressively smaller, sub-unity values (i.e., increasing the overscan). In other words, it has been found that overscanning is the key to providing the essentially linear position control that enables discrete exposures to map image transitions onto a scan pattern at a sub-resolution precision. Thus, in the printer shown in FIG. 1, a relatively small loss of process direction frequency response is accepted to achieve substantially increased process direction addressability. 
     FIG. 2 shows an example of the application of microaddressability by overscanning in a 2× overscanned output device. Central pixel 50 is surrounded by other pixels, such as pixel 52. In this case, the fast scan direction 54 is shown in a horizontal direction, and the slow scan, or process direction 58 is shown vertically. In the slow scan direction 58, scan trajectories 56 and 57 show how double scanning increases the addressability of segments of each pixel by a factor of two. 
     Additionally, the addressability in the slow scan direction is increased by another factor of four due to four levels of intensity adjustment in the ROS. In the fast scan direction 54, the addressability is increased by a factor of four by increasing the clock frequency. Each pixel is thereby represented by eight segments, each of which may have one of four different intensity levels. By compensating for the width of the scan spots at different intensities, the technique may reduce shape distortion when the object being rendered is one or two bits wide. 
     In this example, if the bitmap input were 400 bpi (bits per inch), then the enhanced printer would have 1600 addressability in the fast scan direction, and 3200 addressability in the slow scan direction. These parameters may be modified depending on target design goals. 
     Scan spots 60-66 show example scan spot sizes corresponding to a 2× overscanned printer, as described in copending, coassigned U.S. patent application Ser. No. 07/736,989, incorporated herein by reference. Scan spot 60 shows an example scan spot size corresponding to intensity 1. Scan spot 62 shows an example scan spot size corresponding to intensity 2. Scan spot 64 shows an example scan spot size corresponding to intensity 3. Scan spot 66 shows an example scan spot size corresponding to intensity 4. 
     FIG. 3 shows a pattern set 70 of &#34;patterns&#34; which represent a hierarchy of patterns for recognition of low fidelity bits which are to be enhanced. Printers or other devices which use template matching can use these patterns to detect edge lines which may be slightly horizontal or slightly vertical. The set is a &#34;hierarchy&#34; of ten patterns, in which the next higher member of the set is a composite of the previous member in the hierarchy and an extension pattern of two additional bits. This method of obtaining patterns saves gate resources in implementation, in that any pattern is simply the combination of the next lower priority pattern plus two additional bits, one &#34;on&#34; and the other &#34;off&#34;. In the ten pattern set shown in FIG. 3 the highest priority pattern is pattern 9, but fewer or more patterns may be utilized. 
     The patterns are designed to find the slope of portions of edges, or contours, in an image. In the method of the invention the largest, or highest, pattern which receives a match will have priority over smaller patterns, and the enhancement called for by that particular pattern will be utilized. If no pattern matches, then the portion of the image being examined is not an edge, and no enhancement action is taken. Pattern 0 will be identified as a match at any edge transition from white to black. Higher priority patterns are extensions of pattern 0, each with two additional bits, which will match edges that are not precisely horizontal or vertical. For example, line 74 shows an edge line that is precisely horizontal which is matched by pattern 0. Pattern 1, which has a &#34;run-length&#34; of 1, will match an edge approximately 45° from horizontal, shown by line 76. As the run-length of patterns increases, the angle of the edge that each pattern will match gets closer to horizontal. Pattern 9 has a run-length of 9. 
     Each pattern in the hierarchical set may further be used to define a set of templates. FIGS. 4 and 5 show a set of templates created from pattern 4. In FIG. 4, pattern 4 is rotated and mirrored in the horizontal and vertical directions to produce a set of 16 templates. Template a h  describes the basic pattern. Template b h  is the complement of the basic pattern. Together, these two templates are called an &#34;impulse pair&#34; 
     When templates a h  and b h  are rotated 180° another impulse pair is created by templates c h  and d h . These four templates are then mirrored, creating two additional impulse pairs made up of templates e h  and f h  and templates g h  and h h . 
     Eight additional templates, or 4 impulse pairs, are created when templates a h  -h h  are rotated 90°. Templates a h  -h h  are herein referred to as &#34;horizontal&#34; templates, and templates a v  -h v  are herein referred to as &#34;vertical&#34;  templates. Templates a h  -h h  and a v  -h v  are herein referred to as &#34;permutations&#34; of pattern 4. 
     A match of both templates of an impulse pair, as shown in FIG. 5, denotes the existence of an &#34;impulse match&#34; denoting a black or white line with a width of one bit. When matches for both templates in an impulse pair occur, they may be treated differently that when only one template from the impulse pair is recognized or if both templates in the pair were matched independently, and different enhancement information may be output. Matches for single templates of an impulse pair denote transitions from black to white or white to black over widths wider than a single bit. A basic impulse match may be rotated and mirrored in both the horizontal and vertical directions in the same way that the basic pattern was in FIG. 4, to create an additional 16 templates. 
     Each pattern in the hierarchical set 70 may be used to create a similar set of 32 templates of different permutations. Additional patterns or combinations of patterns or templates with different extension patterns may be combined to recognize other objects such as crossed lines and corners. 
     FIG. 6 shows an input window 80 to be used to determine the area of the image to be matched by the templates. An input window is defined as the area of the input low resolution bitmap over which patterns can be found. Central pixel 82 is the pixel which will receive enhanced correction information. Input window 80 is shown with a size of 11×11 pixels. However, size of the input window is important only to the extent that it allows the recognition of all patterns, It may be adjusted up or down in size in the design as required. The technique of the invention makes symmetrical corrections-that is, corrections can be made to the vertical direction with the same precision as in the horizontal direction, to either side of the center point. A window that is as tall as it is wide, with an equal number of pixels along each axis to each side of the center point, is called a &#34;symmetrical&#34; window. For pixels which are near the edge of the image, the side of the window that is truncated by the edge of the image is considered to be filled with &#34;off&#34; pixels. 
     An input window of size 11×11 is appropriate for the hierarchical set of patterns 70 in FIG. 3. Pattern 6, with a run-length of 6, fits entirely within the window at its first correctable pixel at the center pixel location. It can be shown that patterns of larger run-length, such as pattern 9, will also fit. In consideration of current economics of design and of output resolution capabilities, patterns of run-lengths of greater than 6 may not give discernibly better results than achieved using a hierarchy that includes patterns 0-6. 
     FIG. 7 shows a portion of an image 90 in input window 80. As shown, a portion of the image matches pattern 7, but only the portion matching pattern 6 is visible inside the window. Pixel 82, the central pixel, is in a correctable position for both pattern 6 and 7, but will receive enhancement information corresponding to pattern 6. As the window shifts locations over the image, other correctable pixels in the pattern may be detected. 
     FIG. 8 illustrates an enhancement of a group of pixels forming a portion of an image. Group 110 encompasses a group of pixels that matches pattern 4, permutation a h , as shown in FIG. 4. For this example, it is assumed that this portion of the image does not match any impulse match template (i.e., the width of the image represented in part by the pixel group is greater than 1 pixel wide), or any higher priority template. Lines 122 and 124 illustrate the first and second scan lines, respectively, of the overscan. Marks 126 show the clock frequency in the fast scan direction. Line 132 shows the trajectory of the line of the edge illustrated by the group of pixels. Line 134 shows the corrected edge in the enhancement. The enhanced edge is one half of the maximum spot diameter from the original trajectory. 
     As discussed above, the central pixel can be divided into eight segments, each with a different gray level or intensity value. The first pixel to be corrected is pixel 120. In the original image input, pixel 120 is entirely white. The first, or top scan of this pixel will also be entirely white. Correction of the pixel to the enhanced edge will be made in the second, or bottom scan of pixel 120. Scan spot 136 shows a spot of intensity 2 that significantly fills in the area between the original trajectory and the enhanced edge to correct the line at the first clock cycle. Scan spot 138 of intensity 1 significantly fills in the area to the enhanced edge at the second clock cycle. Scan spot 140 also has an intensity of 1 at the third clock cycle. At the fourth clock cycle, mark 142, no correction spot is required because the intensity 4 spots in the black pixel below it significantly fill in the area to the enhanced edge at that location, so the intensity value at that point is zero. The expanded segment pattern of corrected values for pixel 120 is then 0000 and 2110 for the first and second scans, respectively. 
     Correction may also be made to pixel 128. At the first clock cycle in the fast scan direction, a scan spot of intensity 4, shown by scan spot 144, is needed. Scan spot 146 at the second clock cycle has an intensity of 3. Scan spot 148, at the third clock cycle, also has an intensity of 3. Scan spot 150 has an intensity of 2 at the fourth clock cycle. The second scan of pixel 128 needs no correction, so scan spots of intensity 4 will be output at each clock cycle. The expanded segment pattern of corrected values of pixel 128 is then 4332 and 4444 for the first and second scans, respectively. 
     FIG. 9 shows the resulting expanded pattern of intensity values according to the method performed in FIG. 8. When pixel 120 is in the central pixel position of window 80 of FIG. 6 when a match with template 4 permutation a h  is found, it will be enhanced with segments with gray level intensities of 0 0 0 0 in the first scan, and 2 1 1 0 in the second scan. Similarly, when pixel 128 is the central pixel, it will be enhanced with segments with gray level intensities of 4 3 3 2 and 4 4 4 4, shown in Table 1. If a match with this pattern is made when pixel 130 is in the central pixel position, no enhancements are made according to this pattern and the segments represent the original pixel. However, pixel 130 is likely to fall in the correctable range of another template. 
     If a different permutation template of pattern 4 was the highest priority match, Tables 1 or 2 could be used to determine the enhancement values of segments for the central pixel. If a permutation of an impulse match of pattern 4 was the highest priority match, Tables 3 or 4 could be used to determine the enhancement values of segments for the central pixel. 
     The results of the kind of operation shown in FIGS. 8 and 9 are shown in Table 1. As shown in the table, pixels 120 and 128 are the only pixels to be corrected in this pixel group. Values for pixel 120 are shown in the Pixel 2 column in Table 1. Values for pixels which occur in the position of pixel 128 are shown in the Pixel 1 column. 
     Tables 1-4 show enhancement values of segments for the pixels which will be enhanced in pattern 4 for different permutations and impulse match permutations. Similar tables of enhancement values for horizontal, vertical and impulse match templates up to run-length of 6 are found in Appendix A. The tables in Appendix A may be used to find the enhancement values for correctable pixels in templates of different run-lengths. 
     
                       TABLE 1______________________________________Enhancement values for horizontal templates                   Enhancement levelTemplate                value of center pixelPermutation      Example      Pixel1    Pixel2______________________________________a.sub.h       ##STR1##    B     4332 4444                               W   0000 2110b.sub.h    See FIG. 4   B     2334  B   4444                         0000      0112c.sub.h    See FIG. 4   B     4444  W   0112                         2334      0000d.sub.h    See FIG. 4   B     0000  B   2110                         4332      4444e.sub.h    See FIG. 4   B     4444  W   2110                         4332      0000f.sub.h    See FIG. 4   B     0000  B   0112                         2334      4444g.sub.h    See FIG. 4   B     2334  W   0000                         4444      0112h.sub.h       ##STR2##    B     4332 0000                               B   4444  2110______________________________________ 
    
     Tables 1 and 2 show templates which are permutations of basic pattern 4, Table 1 showing enhancement values for horizontal permutations, and Table 2 showing enhancement values for vertical permutations. As discussed above, the enhancement value for the central pixel is shown in one of the two columns, Pixel1 or Pixel2, depending on where in the pattern the central pixel lies. The data in these tables has been determined empirically. Small variations in the intensity of enhancement values of segments are likely to be imperceptible when output. Similarly, patterns which are longer than run-length 6 may not produce perceptibly better enhanced results when output, depending on the resolution of the output medium. 
     
                       TABLE 2______________________________________Enhancement values for vertical templates                   Enhancement levelTemplate                value of center pixelPermutation    Example        Pixel1     Pixel2______________________________________a.sub.v  b.sub.v  c.sub.v     ##STR3##      B B B 4440 4430 0003 0004 0344 0444                                W B W                                    3000 0000 0034 0044 0000 0003d.sub.v  See FIG. 4 for B     4000   B   4400    b.sub.v -g.sub.v     3000       4300e.sub.v                 B     0444   W   0003                         0344       0000f.sub.v  g.sub.v  h.sub.v     ##STR4##      B B B 3000 4000 4430 4440 0004  0003                                B W B                                    4300 4400 0000 3000 0044______________________________________                                    0034 
    
     Tables 3 and 4 show enhancement values for the segments for pixels in impulse matches for pattern 4. For each impulse match template which is permuted from pattern 4, the enhancement values for the central pixel are shown in one of the four columns, according to where in the pattern the central pixel lies. Table 3 shows the values for horizontal impulse match templates, and Table 4 shows the values for vertical impulse match templates. 
     
                       TABLE 3______________________________________Enhancement values for horizontal impulse match templatesTemplate  Enhancement level value of center pixelPermutation     Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.h   W     0000    B   2334  B   4332      no fixblack line      2110        0000      0112b.sub.h   B     2334    B   4444  W   0000  B   4332white line      0000        0112      2110      4444c.sub.h   W     0112    B   0000  B   2110      no fixblack line      0000        4332      2334d.sub.h   B     0000    B   2110  W   0112  B   4444white line      4332        4444      0000      2334e.sub.h   W     2110    B   0000  B   0112      no fixblack line      0000        2334      4332f.sub.h   B     0000    B   0112  W   2110  B   4444white line      2334        4444      0000      4332g.sub.h   W     0000    B   4332  B   2334      no fixblack line      0112        0000      2110h.sub.h   B     4332    B   4444  W   0000  B   2334white line      0000        2110      0112      4444______________________________________ ##STR5##    Template permutation for pattern a.sub.h, c.sub.h, e.sub.h,    g.sub.h  black line impulse pair. One white and 2 black pixels    have to be corrected for this template.Template permutation for pattern b.sub.h, d.sub.h, f.sub.h, h.sub.hwhite line impulse pair. One white and 3 black pixels have to becorrected for this template.                      ##STR6## 
    
     
         TABLE 4______________________________________Enhancement values for vertical impulse match templatesTemplate  Enhancement level value of center pixelPermutation     Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.v   W     3000    B   0003  B   0033      no fixblack line      0000        0004      0040b.sub.v   W     0000    B   4000  B   0400      no fixblack line      0003        3000      3300c.sub.v   W     0003    B   3000  B   3300      no fixblack line      0000        4000      0400d.sub.v   W     0000    B   0004  B   0040      no fixblack line      3000        0003      0033e.sub.v   B     0003    B   0034  W   3000  B   4440white line      0004        0044      0000      4430f.sub.v   B     4000    B   4400  W   0000  B   0344white line      3000        4300      0003      0444g.sub.v   B     3000    B   4300  W   0003  B   0444white line      4000        4400      0000      0344h.sub.v   B     0004    B   0044  W   0000  B   4430white line      0003        0034      3000      4440______________________________________ ##STR7##   Template permutation for pattern a.sub.v, c.sub.v, e.sub.v,   g.sub.v  black line impulse match. One white and 2 black pixels   have to be corrected for this template.Template permutation for pattern b.sub.v, d.sub.v, f.sub.v, h.sub.vwhite line impulse match. One white and 3 black pixels have to becorrected for this template.                       ##STR8##FIGS. 10 and 11 show pixels, in bold outline, which need to be correctedwhen a template is matched as the highest priority template. FIG. 10shows the correctable pixel positions for horizontal patterns, and FIG.11 shows the correctable pixel positions for vertical patterns. In orderfor an enhancement to be made, the pixels matching the template must bepositioned in the input window 80 of FIG. 6 such that the central pixel82 is in the position of one of the correctable pixel positions as shownin FIGS. 10 or 11. For example, if a horizontal permutation a.sub.h,c.sub.h, e.sub.h, or g.sub.h of pattern 5 is matched in the input window,the pixels in locations corresponding to pixels 180, 182, and 184 will becorrected. Corrections are defined only for pixels of the inside half ofthe run-length, because the pixels outside that range are expected to becorrected by other permutations of the pattern, or by different patterns.If the center pixel does not fall in a correctable pixel position, thenno correction is made for that template. Pixels 186 and 188 may becorrectable in a mirror image permutation template, and pixels 190 and192 may be correctable by a rotated or vertical permutation template. Ifthe pixel does not lie in a correctable position in any of the templates,the segments will represent the original pixel with no enhancement, forexample (0000,0000) for an entirely white pixel, or (4444,4444) for an 
    
     The flowchart of FIG. 12 shows steps in enhancing a portion of an image. The step in box 220 stores consecutive lines of an image. The step in box 222 isolates a portion of the image. The step in box 224 forms a window in the isolated portion of the image. This window may be a symmetrical set of pixels around a central pixel. 
     The step in box 226 generates an identifier describing the pixel pattern. The step in box 228 compares the identifier of the window with the identifiers of known pixel patterns, or templates. The step in box 230 finds the highest priority template that is matched. The step in box 232 enhances the central pixel, according to the correction data for the highest priority matched template. If more than one template for a given pattern is detected and a pixel is correctable in both, enhancement information for the template corresponding to the lowest alphanumeric is given priority. 
     For example, in FIG. 13 a portion of an image 250 is shown. Template 252 shows that template a h  based on pattern 5 matches on the portion of the image. Template 254 shows that template d h  of pattern 5 also matches on the portion of the image. From FIG. 10, pixel 256 falls in a correctable pixel position in both templates 252 and 254. In this case, the enhanced segment values for the correctable pixel position of template a h , template 252, would be used. 
     FIG. 14 shows a block diagram of an apparatus 280 for performing the image enhancement in accordance with the present invention. Raster Data Source 282 provides serial raster data to Band Buffer 284, formed by RAM 286 controlled by Address Counter 288. RAM 286 stores a field of (L×N-1), where L is the number of bits in a line of the input, and N is the height of the input window. The Nth line is shifted directly into the shift register to form an N height window. The number of bits in a line L will vary by the input data source, for example for a CRT the line length may be 1000 bits, but for a large-scale printer the number of bits in a line may be such as much as 8000 bits. On a typical laser printer with number of bits per line L of 300 and an 11 inch line, a typical RAM size for implementing an 11×11 window may be about (3300 bits×11 lines). RAM 286 and Address Counter 288 form a circular band buffer which steps line by line through the input. Alternatively, the band buffer could be made up of a series of shift registers which perform the same function. Band Buffer 284 provides input data lines to Template Logic 290. 
     Template Logic 290 is made up of a plurality of shift registers 292. There are N shift registers, one for each line of the input window. The shift registers 292 input data into Template Decoding Logic 294 to form the input window. In Template Decoding Logic 294, the input window is examined for matches with a hierarchical set of templates. Template Decoding Logic 294 examines primarily the pixels around the center axis of the input window, but data for the entire input window may be received from the shift registers 292. Template Decoding Logic 294 may compare the data with templates either serially or in parallel. The enhanced segment data for the corrected pixel is output from Template Logic 290 to output means 296, which may be a microaddressable display means. 
     FIGS. 15-20 describe methods of implementing Template Decoding Logic 294. FIG. 15 shows a portion of an input window 310 with pixel locations labeled A-H. For this example, pixel A 312 is taken to be in the central pixel position. Each pixel location will provide a signal A-H to the template decoding logic describing the bit value of the pixel. 
     FIGS. 16-19 describe a typical way in which templates may be decoded. FIG. 16(a) shows the first template to be decoded in this example, a two pixel template in which the top pixel 320 has a bit value of &#34;1&#34;, and the bottom pixel 322 has a bit value of &#34;0&#34;. FIG. 16(b) shows a typical implementation of logic to detect the presence of this template. Gate 324 tests signals A and B. Gates 326, 328, and 330 also test signals C and D, E and F, and G and H, respectively, for matches with the template. If the signals from A and B describe a match with template 1 and none of the other signals match the template, the output 334 from gate 332 will indicate a match for template 1. 
     FIG. 17(a) shows the second template, template 2. Circuit 340 in FIG. 17(b) surveys signals A, B, C, and D for a match with template 2. If the signals match template 2 and signals E, F, G, and H do not indicate a match with the next template, the output signal 342 will indicate a match with template 2. The circuit in FIG. 18(b) similarly tests for a match with template 3 in FIG. 18(a), and the circuit in FIG. 19(b) similarly tests for a match with template 4 in FIG. 19(a). Clearly, the circuitry increases exponentially with the size of the template set. 
     FIG. 20 shows a circuit 360 that may be employed in the template decoding logic using templates related to patterns similar to set 70 of FIG. 10. The hierarchical nature of the pattern set allows the circuit to build upon itself for each successive pattern in the hierarchy, thereby significantly reducing the number of gates necessary for the implementation. Gate 370 detects a match of template 1 by signals A and B. Gate 374 uses the output of gate 370 indicating a match of template 1 and input from signals C and D to detect a match of template 2. Gate 380 uses the output of gate 374 indicating a match of template 2 and input from signals E and F to detect a match of template 3. Gate 386 uses the output of gate 380 indicating a match of template 3 and input from signals G and H to detect a match of template 4. 
     If only template 1 is matched, gate 372 will indicate a match to output signal 373. If gate 374 indicates a match with template 2, the output signal from 374 will be input to gate 378, which will disable gate 372 and inhibit signal 373 from indicating the match with template 1, so only the match with the highest priority template will be indicated. Similarly, if the output signal from gate 380 indicates a match with template 3, gate 384 will turn off the output of gate 376 and inhibit signals 377 and 373 from indicating a match with template 2 of template 1. Signal 388 output from 386 will also inhibit the previous template match signals if gate 386 indicates a match with template 4. 
     Due to the hierarchical nature of pattern types of the invention, the number of gates in circuit 360 will naturally increase linearly with the size of the template set, rather than exponentially. 
     Conclusion 
     In view of the foregoing, it now will be evident that the present invention provides economical and technically attractive methods for ernhancing the contour fidelity of exposures in microaddressable display systems. These methods employ hierarchical template matching and spot width compensation techniques to smooth contours and jagged edges commonly found in bit-mapped images. 
     Although the invention has been described in relation to a single beam operation, the technique could be performed independently by each beam of a multi-beam operation. Although the invention has been described in relation to a 2× overscanned printer, the technique could be performed to enhance the contour fidelity on any optical display system, including but not limited to increased precision or microaddressable optical printers. 
     In addition, although the invention has been described in relation to various implementations, together with modifications, variations and extensions thereof, other implementations, modifications, variations and extensions are within the scope of the invention. The invention is therefore not limited by the description contained herein or by the drawings, but only by the claims. 
     Enhancement Table Appendix 
     Appendix A contains tables of enhancement values for templates up to run length of 6. Table 1 shows enhancement values for templates made of pattern 0, and impulse match templates based on pattern 0. Tables 2 and 3 show enhancement values for templates based on basic pattern 1. Tables 4-7 show enhancement values for templates based on basic pattern 2. Tables 8-11 show enhancement values for templates based on basic pattern 3. Tables 12-15 show enhancement values for templates based on basic pattern 4. Tables 16-19 show enhancement values for templates based on basic pattern 5. Tables 20-23 show enhancement values for templates based on basic pattern 6. The values in the tables have been determined empirically, and small variations in the intensity of enhancement values are likely to be imperceptible when output. 
     APPENDIX A 
     
                       TABLE 1______________________________________APPENDIX AEnhancement values for Pattern 0                  Enhancement levelTemplate               value of center pixelPermutations      Example     Pixel 1    Pixel 2______________________________________av       ##STR9##   B     4430 4430bv       ##STR10##  B     0344 0344ah       ##STR11##  B     4444 2222bh       ##STR12##  B     2222 4444av black line       ##STR13##  B     0330 0330bv white line       ##STR14##  B     4430 4430                               B   0344 0344ah black line       ##STR15##  B     2222 2222bh white line       ##STR16##  B     4444 2222                               B   2222 4444______________________________________ 
    
     
                       TABLE 2______________________________________Enhancement values for templates based on Pattern 1                  Enhancement levelTemplate               value of center pixelPermutations      Example     Pixel1     Pixel2______________________________________a c       ##STR17##  W     0000 1000                               B   4000 4440b d       ##STR18##  W     0001 0000                               B   0444 0004e h       ##STR19##  W     1000 0000                               B   4440 4000f g       ##STR20##  W     0000 0001                               B   0004 0444______________________________________ 
    
     
                       TABLE 3______________________________________Enhancement values for impulses matches based on Pattern 1              Enhancement levelTemplate           value of center pixelPermutations    Example   Pixel1       Pixel2______________________________________Black line     ##STR21##              W     0000 1000 0001 0000                         top bottom                               B   2300 0123Black line     ##STR22##              W     0000 0001 1000 0000                         top bottom                               B   0023 3210White line     ##STR23##              W     0001 1000  B   0444 0004 4000 4440                                        top bottomWhite line     ##STR24##              W     1000  0001 B   4440 4000 0004 0444                                        top bottom______________________________________ 
    
     
                       TABLE 4______________________________________Enhancement values for horizontal templates based on Pattern 2                   Enhancement levelTemplate                value of center pixelPermutations      Example      Pixel1    Pixel2______________________________________a.sub.h       ##STR25##   B     4432 4444                               W   0000 2100b.sub.h       ##STR26##   B     0344 0012c.sub.h       ##STR27##   B     4444 2344                               W   0012 0000d.sub.h       ##STR28##   B     2100 4430e.sub.h       ##STR29##   B     4444 4432                               W   2100 0000f.sub.h       ##STR30##   B     0012 0344g.sub.h       ##STR31##   B     2344 4444                               W   0000 0012h.sub.h       ##STR32##   B     4430 2100______________________________________ 
    
     
                       TABLE 5______________________________________Enhancement values for vertical templates based on Pattern 2                    Enhancement levelTemplate                 value of center pixelPermutations      Example       Pixel1______________________________________a.sub.v       ##STR33##    B        4444 4440b.sub.v       ##STR34##    B        0004 0044c.sub.v       ##STR35##    B        0444 4444d.sub.v       ##STR36##    B        4400 4000e.sub.v       ##STR37##    B        4444 0444f.sub.v       ##STR38##    B        4000 4400g.sub.v       ##STR39##    B        4440 4444h.sub.v       ##STR40##    B        0044 0004______________________________________ 
    
     
                       TABLE 6______________________________________Enhancement values forhorizontal impulses matches based on Pattern 2Template  Enhancement level value of center pixelPermutations        Pixel1    Pixel2  Pixel3______________________________________a.sub.h  black line      ##STR41##               W     0000 2100                           B   0330 0012b.sub.h  white line      ##STR42##               W     0000 2100                           B   4432 4444                                     B   0344 0012c.sub.h             W     0012  B   2100  Bblack line                0000      0330d.sub.h             W     0012  B   4444  B   2100white line                0000      2344      4430e.sub.h             W     2100  B   0012  Bblack line                0000      0330f.sub.h             W     2100  B   4444  B   0012white line                0000      4432      0344g.sub.h  black line      ##STR43##               W     0000 0012                           B   0330 2100                                     Bh.sub.h  white line      ##STR44##               W     0000 0012                           B   2344 4444                                     B   4430 2100______________________________________ 
    
     
                       TABLE 7______________________________________Enhancement values forvertical impulses matches based on Pattern 2                   Enhancement levelTemplate                value of center pixelPermutations            Pixel1     Pixel2______________________________________a.sub.v  black line       ##STR45##   B     0004 0040b.sub.v  white line       ##STR46##   B     4444 4440                                B   0004 0044c.sub.v                 B     0400black line                    4000d.sub.v                 B     0444   B   4400white line                    4444       4000e.sub.v                 B     4000black line                    0400f.sub.v                 B     4444   B   4000white line                    0444       4400g.sub.v  black line       ##STR47##   B     0040 0004h.sub.v  white line       ##STR48##   B     4440 4444                                B   0044 0004______________________________________ 
    
     
                       TABLE 8______________________________________Enhancement values forhorizontal templates based on Pattern 3                   Enhancement levelTemplate                value of center pixelPermutations      Example      Pixel1     Pixel2______________________________________a.sub.h       ##STR49##   B     3221 4444                                W   0000 2100b.sub.h                 B     0344   B   4444                         0000       1223c.sub.h                 B     4444   W   0012                         1223       0000d.sub.h                 B     0000   B   3221                         4430       4444e.sub.h                 B     4444   W   2100                         3221       0000f.sub.h                 B     0000   B   1223                         0344       4444g.sub.h                 B     1223   W   0000                         4444       0012h.sub.h       ##STR50##   B     4430 0000                                B   4444 3221______________________________________ 
    
     
                       TABLE 9______________________________________Enhancement values forvertical templates based on Pattern 3                   Enhancement levelTemplate                value of center pixelPermutations      Example      Pixel1     Pixel2______________________________________a.sub.v       ##STR51##   B     4444 4443                                B   4440 4400b.sub.v                 B     0004   B   0044                         0034       0444c.sub.v                 B     3444   B   0044                         4444       0444d.sub.v                 B     4300   B   4440                         4000       4400e.sub.v                 B     4444   B   0444                         3444       0044f.sub.v                 B     4000   B   4400                         4300       4440g.sub.v                 B     4443   B   4400                         4444       4440h.sub.v       ##STR52##   B     0034 0004                                B   0444 0044______________________________________ 
    
     
                       TABLE 10______________________________________Enhancement values forhorizontal impulse matches based on Pattern 3Template Enhancement level value of center pixelPermutations    Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.h  W     0000    B   2344  B   3221black line     2100        0000      1223b.sub.h  W     0000    B   3221  B   0344  B   4444white line     2100        4444      0000      1223c.sub.h  W     0012    B   0000  B   3221black line     0000        4432      1223d.sub.h  W     0012    B   4444  B   0000  B   3221white line     0000        1223      4430      4444e.sub.h  W     2100    B   0000  B   1223black line     0000        2344      3221f.sub.h  W     2100    B   4444  B   0000  B   1223white line     0000        3221      0344      4444g.sub.h  W     0000    B   4432  B   1223black line     0012        0000      3221h.sub.h  W     0000    B   1223  B   4430  B   4444white line     0012        4444      0000      3221______________________________________ ##STR53##   Example: Templates a.sub.h, c.sub.h, e.sub.h, g.sub.h black line   impulse pair. One white and 2 black pixels have to be corrected   for this template. ##STR54##   Templates b.sub.h, d.sub.h, f.sub.h, h.sub.h white line impulse   pair. One white and 3 black pixels have to be corrected for this   template. 
    
     
                       TABLE 11______________________________________Enhancement values forvertical impulse matches based on Pattern 3Template Enhancement level value of center pixelPermutations    Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.v  B     0004    B   0040  B         Bblack line     0330        0400b.sub.v  B     4444    B   4440  B   0004  B   0044white line     4443        4400      0034      0444c.sub.v  B     0330    B   0040  B         Bblack line     4000        0400d.sub.v  B     3444    B   0044  B   4300  B   4440white line     4444        0444      4000      4400e.sub.v  B     4000    B   0400  B         Bblack line     0330        0040f.sub.v  B     4444    B   0444  B   4000  B   4400white line     3444        0044      4300      4440g.sub.v  B     0330    B   0400  B         Bblack line     0004        0040h.sub.v  B     4443    B   4400  B   0034  B   0444white line     4444        4440      0004      0044______________________________________ ##STR55##   Examples: Templates a.sub.v, c.sub.v, e.sub.v, g.sub.v black line   impulse pair. Two black pixel have to be corrected for this   template. ##STR56##   Templates b.sub.v, d.sub.v, f.sub.v, h.sub.v white line impulse   pair. Four black pixels have to be corrected for this template. 
    
     
                       TABLE 12______________________________________Enhancement values forhorizontal templates based on Pattern 4                   Enhancement levelTemplate                value of center pixelPermutations      Example      Pixel1    Pixel2______________________________________a.sub.h       ##STR57##   B     4332 4444                               W   0000 2110b.sub.h       ##STR58##   B     2334 0000                               B   4444 0112c.sub.h       ##STR59##   B     4444 2334                               W   0112 0000d.sub.h       ##STR60##   B     0000 4332                               B   2110 4444e.sub.h       ##STR61##   B     4444  4332                               W   2110 0000f.sub.h       ##STR62##   B     0000 2334                               B   0112 4444g.sub.h       ##STR63##   B     2334 4444                               W   0000 0112h.sub.h       ##STR64##   B     4332 0000                               B   4444 2110______________________________________ 
    
     
                       TABLE 13______________________________________Enhancement values forvertical templates based on Pattern 4                   Enhancement levelTemplate                value of center pixelPermutations      Example      Pixel1     Pixel2______________________________________a.sub.v  b.sub.v       ##STR65##   B B   4440 4430 0003 0004                                W B 3000 0000 0034 0044c.sub.v                 B     0344   W   0000                         0444       0003d.sub.v                 B     4000   B   4400                         3000       4300e.sub.v                 B     0444   W   0003                         0344       0000f.sub.v                 B     3000   B   4300                         4000       4400g.sub.v  h.sub.v       ##STR66##   B B   4430 4440 0004 0003                                W  B                                    0000 3000 0044 0034______________________________________ 
    
     
                       TABLE 14______________________________________Enhancement values forhorizontal impulse matches based on Pattern 4Template Enhancement level value of center pixelPermutations    Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.h  W     0000    B   2334  B   4332black line     2110        0000      0112b.sub.h  B     2334    B   4444  W   0000  B   4332white line     0000        0112      2110      4444c.sub.h  W     0112    B   0000  B   2110black line     0000        4332      2334d.sub.h  B     0000    B   2110  W   0112  B   4444white line     4332        4444      0000      2334e.sub.h  W     2110    B   0000  B   0112black line     0000        2334      4332f.sub.h  B     0000    B   0112  W   2110  B   4444white line     2334        4444      0000      4332g.sub.h  W     0000    B   4332  B   2334black line     0112        0000      2110h.sub.h  B     4332    B   4444  W   0000  B   2344white line     0000        2110      0112      4444______________________________________ ##STR67##    Example: Templates a.sub.h, c.sub.h, e.sub.h, g.sub.h black line    impulse pair One white and 2 black pixels have to be corrected    for this template. ##STR68##    Templates b.sub.h, d.sub.h, f.sub.h, h.sub.h white line impulse    pair One white and 3 black pixels have to be corrected for this    template. 
    
     
                       TABLE 15______________________________________Enhancement values for vertical impulse matchesbased on Pattern 4Template  Enhancement level value of center pixelPermutations     Pixel1    Pixel2    Pixel3  Pixel4______________________________________a.sub.v   W     3000    B   0003  B   0033black line      0000        0004      0040b.sub.v   B     0003    B   0034  W   3000  B   4440white line      0004        0044      0000      4430c.sub.v   W     0000    B   4000  B   0400black line      0003        3000      3300d.sub.v   B     4000    B   4400  W   0000  B   0344white line      3000        4300      0003      0444e.sub.v   W     0003    B   3000  B   3300black line      0000        4000      0400f.sub.v   B     3000    B   4300  W   0003  B   0444white line      4000        4400      0000      0344g.sub.v.sbsb.v     W     0000    B   0004  B   0040black line      3000        0003      0033h.sub.v   B     0004    B   0044  W   0000  B   4430white line      0003        0034      3000      4440______________________________________ ##STR69##   Example: Templates a.sub.v, c.sub.v, e.sub.v, g.sub.v black line   impulse pair. One white and 2 black pixels have to be corrected   for this template. ##STR70##   Templates b.sub.v, d.sub.v, f.sub.v, h.sub.v white line impulse   pair. One white and 3 black pixels have to be corrected for this   template. 
    
     
                       TABLE 16______________________________________Enhancement values for horizontal templates based on Pattern 5                 Enhancement levelTemplate              value of center pixelPermutations    Example      Pixel1   Pixel2 Pixel3______________________________________a.sub.h     ##STR71##   B     4433 4444                            B   3221 4444                                     W   0000 2111b.sub.h               B     2333 B   4444 B   4444                       0000     0011     1223c.sub.h               B     4444 B   4444 W   1112                       3344     1223     0000d.sub.h               B     0000 B   1100 B   3221                       3332     4444     4444e.sub.h               B     4444 B   4444 W   2111                       4433     3221     0000f.sub.h               B     0000 B   0011 B   1223                       2333     4444     4444g.sub.h               B     3344 B   1223 W   0000                       4444     4444     1112h.sub.h     ##STR72##   B     3332 0000                            B   4444 3221                                     B   4444 3221______________________________________ 
    
     
                       TABLE 17______________________________________Enhancement values for vertical templates based on Pattern 5                Enhancement level valueTemplate             of center pixelPermutations    Example     Pixel1   Pixel2  Pixel3______________________________________a.sub.v  b.sub.v     ##STR73##  W B   3000 0000 0003 0004                           B B 4443 4440 0034 0044                                     B B 4430 4400 0344 0444c.sub.v              W     0000 B   0444  B   0044                      0003     0344      0344d.sub.v              B     4000 B   4400  B   4440                      3000     4300      4430e.sub.v              W     0003 B   3444  B   0344                      0000     0444      0044f.sub.v              B     3000 B   4300  B   4430                      4000     4400      4440g.sub.v  h.sub.v     ##STR74##  W B   0000 3000 0004 0003                           B B 4440 4443 0044 0034                                     B B 4400 4430 0444 0344______________________________________ 
    
     
                                           TABLE 18__________________________________________________________________________Enhancement values for horizontal impulse matches based on Pattern 5Template   Enhancement level value of center pixelPermutations   Pixel1        Pixel2             Pixel3                   Pixel4                        Pixel5                             Pixel6__________________________________________________________________________a.sub.h W 0000        B 2333             B  4433                   B 3221black line     2111 0000  0011 1223b.sub.h W 0000        B 4433             B  3221                   B 2333                        B 4444                             B 4444white line     2111 4444  4444 0000 0011 1223c.sub.h W 1112        B 0000             B  1100                   B 3221black line     0000 3332  3344 1223d.sub.h W 0000        B 4444             B  4444                   B 0000                        B 1100                             B 3221white line     1112 3344  1223 3332 4444 4444e.sub.h W 2111        B 0000             B  0011                   B 1223black line     0000 2333  4433 3221f.sub.h W 2111        B 4444             B  4444                   B 0000                        B 0011                             B 1223white line     0000 4433  3221 2333 4444 4444g.sub.h W 0000        B 3332             B  3344                   B 1223black line     1112 0000  1100 3221h.sub.h W 0000        B 4444             B  1223                   B 3332                        B 4444                             B 4444white line     1112 3344  4444 0000 1100 3221__________________________________________________________________________ ##STR75##   Example: Templates a.sub.h, c.sub.h, e.sub.h, g.sub.h black line   impulse pair. One white and 3 black pixels have be be corrected   for this template. ##STR76##   Templates b.sub.h, d.sub.h, f.sub.h, h.sub.h white line impulse   pair. One white and 5 black pixels have to be corrected for this   template. 
    
     
                                           TABLE 19__________________________________________________________________________Enhancement values for vertical impulse matches based on Pattern 5Template   Enhancement level value of center pixelPermutations   Pixel1        Pixel2             Pixel3                   Pixel4                        Pixel5                             Pixel6__________________________________________________________________________a.sub.v W 3000        B 0033             B  0330                   B 0003black line     0000 0040  0330 0004b.sub.v W 3000        B 4443             B  4430                   B 0003                        B 0034                             B 0344white line     0000 4440  4400 0004 0044 0444c.sub.v W 0000        B 0400             B  0330                   B 4000black line     0003 3300  0330 3000d.sub.v W 0000        B 0444             B  0044                   B 4000                        B 4400                             B 4440white line     0003 3444  0344 3000 4300 4430e.sub.v W 0003        B 3300             B  0330                   B 3000black line     0000 0400  0330 4000f.sub.v W 0003        B 3444             B  0344                   B 3000                        B 4300                             B 4430white line     0000 0444  0044 4000 4400 4440g.sub.v W 0000        B 0040             B  0330                   B 0004black line     3000 0033  0330 0003h.sub.v W 0000        B 4440             B  4400                   B 0004                        B 0044                             B 0444white line     3000 4443  4430 0003 0034 0344__________________________________________________________________________ ##STR77##   Example: Templates a.sub.v, c.sub.v, e.sub.v, g.sub.v black line   impulse pair. One white and 3 black pixels have to be corrected   for this template. ##STR78##   Templates b.sub.v, d.sub.v, f.sub.v, h.sub.v white line impulse   pair. One white and 5 black pixels have to be corrected for this   template. 
    
     
                       TABLE 20______________________________________Enhancement values for horizontal templates based on Pattern 6                 Enhancement level valueTemplate              of center pixelPermutations    Example      Pixel1   Pixel2 Pixel3______________________________________a.sub.h     ##STR79##   B     3322 4444                            W   0000 2211b.sub.h               B     2233 B   3444 B   4444                       0000     0001     1122c.sub.h               B     4444 W   1122                       2233     0000d.sub.h               B     0000 B   1000 B   2211                       3322     4443     4444e.sub.h               B     4444 W   2211                       3322     0000f.sub.h               B     0000 B   0001 B   1122                       2233     3444     4444g.sub.h               B     2233 W   0000                       4444     1122h.sub.h     ##STR80##   B     3322 0000                            B   4443 1000                                     B   4444 2211______________________________________ 
    
     
                       TABLE 21______________________________________Enhancement values for vertical templates based on Pattern 6                Enhancement levelTemplate             value of center pixelPermutations    Example     Pixel1   Pixel2  Pixel3______________________________________a.sub.v  b.sub.v  c.sub.v     ##STR81##  W B W 3000 0000 0003 0004 0000 0003                           B B B                               4443 4443 0034 0034 3444 3444                                     B B B                                         4440 4430 0044 0344 0344                                         0444d.sub.v              B     4000 B   4300  B   4430                      3000     4300      4400e.sub.v              W     0003 B   3444  B   0444                      0000     3444      0344f.sub.v  g.sub.v  h.sub.v     ##STR82##  B W B 3000 4000 0000 3000 0004 0003                           B B B                               4300 4300 4443 4443 0034 0034                                     B B B                                         4400 4430 4430 4440 0344                                         0044______________________________________ 
    
     
                       TABLE 22______________________________________Enhancement values for horizontal impulsematches based on Pattern 6TemplatePermu-  Enhancement level value of center pixeltations Pixel1   Pixel2   Pixel3 Pixel4 Pixel5______________________________________a.sub.h W     0000   B   2233 B   4444 B   3322black line    2211       0000     0000     1122b.sub.h W     0000   B   3322 B   2233 B   3444 B   4444white line    2211       4444     0000     0001     1122c.sub.h W     1122   B   0000 B   0000 B   2211black line    0000       3322     4444     2233d.sub.h W     1122   B   4444 B   0000 B   1000 B   2211white line    0000       2233     3322     4443     4444e.sub.h W     2211   B   0000 B   0000 B   1222black line    0000       2233     4444     3322f.sub.h W     2211   B   4444 B   0000 B   0001 B   1122white line    0000       3322     2233     3444     4444g.sub.h W     0000   B   3322 B   4444 B   2333black line    1122       0000     0000     2211h.sub.h W     0000   B   2233 B   3322 B   4443 B   4444white line    1122       4444     0000     1000     2211______________________________________ ##STR83##  Example: Templates a.sub.h, c.sub.h, e.sub.h, g.sub.h black       line impulse pair. One white and 3 black pixels have to be       corrected for this template. ##STR84##  Templates b.sub.h, d.sub.h, f.sub.h, h.sub.h white line       impulse pair. One white and 4 black pixels have to be       corrected for this template. 
    
     
                                           TABLE 23__________________________________________________________________________Enhancement values for vertical impulse matches based on Pattern 6Template   Enhancement level value of center pixelPermutations   Pixel1        Pixel2             Pixel3                   Pixel4                        Pixel5                             Pixel6__________________________________________________________________________a.sub.v W 3000        B 0033             B  0040                   B 0003black line     0000 0033  0330 0004b.sub.v W 3000        B 4443             B  4440                   B 0003                        B 0034                             B 0044white line     0000 4443  4430 0004 0034 0344c.sub.v W 0000        B 3300             B  0330                   B 4000black line     0003 3300  0400 3000d.sub.v W 0000        B 3444             B  0344                   B 4000                        B 4300                             B 4430white line     0003 3444  0444 3000 4300 4400e.sub.v W 0003        B 3300             B  0400                   B 3000black line     0000 3300  0330 4000f.sub.v W 0003        B 3444             B  0444                   B 3000                        B 4300                             B 4400white line     0000 3444  0344 4000 4300 4430g.sub.v W 0000        B 0033             B  0330                   B 0004black line     3000 0033  0040 0003h.sub.v W 0000        B 4443             B  4430                   B 0004                        B 0034                             B 0344white line     3000 4443  4440 0003 0034 0044__________________________________________________________________________ ##STR85##  Templates a.sub.v, c.sub.v, e.sub.v, g.sub.v black line impulse  pair. One white and 3 black pixels have to be corrected for this  template. ##STR86##  Templates b.sub.v, d.sub.v, f.sub.v, h.sub.v white line impulse  pair. One white and 5 black pixels have to be corrected for this  template.