METHOD FOR PERFORMING CHARACTER RECOGNITION ON A PIXEL MATRIX

Abstract: Character recognition is effected by categorizing a cipher by a unique description using three feature sets. In the process of the invention, lines are located by expanding or contracting the original image of the cipher to fit into a sparse space pixel matrix. The image is thinned to define lines (32) and so as not to obliterate lines which give the cipher its uniqueness. Once the cipher is thinned, fuzzy logic is used to define a set of coordinates for each line in a cartesian coordinate system. After all the lines are located, the endpoints of each line are located and the intersection points are located (44). These three feature sets are encoded, resulting in three values, such as 64-bit integers (50). These three integers are used as search keys to query a relational database which contains the integer sets for known characters (53).

Description: M ETHOD FOR PERFORMING CHARACTER RECOGNITION ON A PIXEL MATRIX BACKGROUND OF THE INVENTION The present invention relates to pattern ana cipher recognition, especially line-based character recognition by offline techniques, particularly where a hand-written character has ceen digitized and is presented m the form of a sparse space pixel matrix. By sparse matrix, t is meant a ma t rix having relatively few occupied or non-null cells. While Known systems claim nign accuracy in reading nand-wπtten naracters of any language, actual use snows these products achieve a much lower accuracy. Attempts nave been made to improve accuracy by requiring the writer to write in an unnatural manner that simplifies recognition by computer (e.g. connect the dot schemes and methods where the standard alpnabet is modified.) Another problem of known scnemes is the requirement that a character have a minimum resolution of 200 hundred dots per inch wner. read offline. If the cnaracter s Demg read on-line, algorithms expect cnaracters to oe formed with a predetermined sequence of strokes . Known metnods are typically cnaracter set sensitive, e.g., a method designed to recognize characters of the English alphabet will have a lower accuracy reading Asian ideological cnaracters. Finally, there are known metnods which rely on matching words n a post processing dictionary to improve recognition accuracy Such a method is acceptable for processing text or prose. However, if cnaracters are m fields which do not form words e.g. part numoers or serial r_umDers m an orαer form) the dictionary etnod s rendered useless. SUMMARY OF INVENTION According to the present invention, pattern recognition , particularly cnaracter recognition is effected DV ._. ca t eσorizmg a cipher by a unique description using tnree feature sets identifying the type and location of lines which form the cipher, the location cf tne endpomts of eacn of the lines, and the location of the intersections of the lines. In the process according to the invention, lines are located by expanding or contracting the original image of the cipher to fit into a sparse space pixel matrix. The image is then thinned to define lines and so as not to obliterate lines which give the cipher its uniqueness. Once the cipher is thinned, fuzzy logic is used to "locate", that is, define a set of coordinates for, each line relative to an x-y coordinate system. (As each line is located, it is removed from the matrix image to facilitate locating the remaining lines.; After all the lines are located, the endpoints of each line are located and the intersect points are located. These three feature sets are encoded, resulting in three values, such as 64-bit integers. These three integers are then used as search keys to query a relational database which contains the integer sets for known characters. If a direct match is not found, a matching algorithm uses partial matches to extrapolate the correct character. Because the matrix is sparse, the likelihood of identifying the correct character is enhanced. The invention will be better understood upon reference to the following detailed description m connection with the accompanying drawings . BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a flow chart of a process according to the invention. Figs. 2A, 2B , 2C together are a flow chart of a thinning algorithm. Figs. 3A, 3B, 3C together are a flow chart of an algorithm for finding features. Figs. 4A, 4B, 4C, 4D together are a flow cnart of an algorithm for getting line sections. Figs. 5A, 5B, EC, ΞD together are a flow cnart of an aiαcntnm fcr getting l ne ~ ype. Fig. 5 is a flow cnart cf an aigoπtnra for finding intersect points. Fig. 7 is a flow cnart of an algorithm for finding enαpomts . Fig. 8 is a flow cnart of an algorithm for finding a valid line. Figs. 9A, 9B, 9C together are a flow chart of a σuantization algorithm. Fig. 10 is a diagram illustrating the definition of the eight nearest neighbor pixels. Fig. 11 s a diagram illustrating the definition of the forty-eight nearest neighbor pixels. Fag. 12 is a diagram illustrating the definition of co t tcm six nearest neighbor pixels. Fig. 13 is a diagram illustrating the definition of top six nearest neighbor pixels. Fig. 14 is a diagram illustrating the definition of twelve nearest neignbor pixels . Fig. 15 is a diagram illustrating a pixel to oe turned off. Fig. 16 is a diagram illustrating a pixel at a top gap closure. Fig. 17 is a diagram illustrating an extraneous top row . Fig. 18 is diagram illustrating pattern raatcnes for locating skeletal pixels. Fig. 19 is a diagram illustrating line segment deviations . Fig. 20 is a diagram illustrating gap filing. Figs. 21A, 21B, 21C are three fuzzy logic tables. DETAILED DESCRIPTION OF SPECIFIC EMBODIMENTS The process of the invention is oest descrioeα with reference to flow cnarts beginning with Fig. 1. There are five input parameters in the process, eacn oeing -llustrateα _n terms cf a step cf the process The first parameter s an array of blocκs of information, typically oytes, wnicn is a ιi-:ιtal representation cf tr.e image 10, ^nere eacn vte s eignt oits long. The second input parameter is the numDer of bits that represent a pixel of the cnaracter image 12. If the image was originally m black and wnite , the bits to pixel ratio (bpr) will be one. The third input parameter is the number of pixels contained m a row of the character image 14. The fourth input parameter is the number cf rows contained in the character image 16. The fifth parameter indicates if the rows begin on byte boundaries 18. If the rows begin on byte boundaries then the fifth parameter s set to one, otherwise the parameter is set to zero. The first step in the recognition process is to unpack the input array so that one block, such as a byte represents one pixel 20, as follows: If the bpr equals one, eacn bit m the input array is examined separately. If a bit equals one, a corresponding byte in a secondary array (A2) is set to one else the corresponding byte is set to zero. If the bpr is greater than one, the bits are examined in groupings equal to the bpr. The bits m the grouping are logically ORed together. If the result of this ORing is equal to one then the corresponding byte in A2 is set to one; otherwise it is set to zero. The image is then reduced so that it fits within a 38x18 matrix. If the image is initially smaller than 38x18 then no image reduction is necessary. The image reduction is accomplished by first smoothing the image Dy deleting any gaps that may have been introduced during the scanning process 22. Each byte representing a pixel is examined individually. If the byte is equal to one , the corresponding pixel is considered to be "on", and the next byte is examined. If the byte is equal to zero, the corresponding pixel is considered to be "off". If the value A2(xn,yτrw represents the pixel in σuestion, and if A2(xn,ym)=0 then the following pixels are examined (the nearest eight neighbors, as illustrated m Fig 10) : A2 (xn-l,ym-l) A2 (xn,ym-l) A2 (xn+l,ym-l) A2 (xn-l,ym) A2 (xn+l,ym) A2 (xn-l,ym+l) A2 (xn,ym+l) A2 (xn+l,ym+l) If any of these pixels are off, A2(xn,ym)=0 is considered valid. If all of these pixels are on then the nearest forty-eight neighbors will be examined (see Fig. 11) i.e., the following pixels will be examined: A2 (xn-3 ,ym-3 A2 (xn+3 , m+1) A2 (xn-2,yτn-3 A2 (xn- ,ym+2) A2 (xn-l,ym-3 A2 (xn-2,ym+2) A2 (xn,ym-3) A2 ( xn-1, yτn+2) A2 (xn+l,ym-3 A2 (xn,ym+2) A2 (xn+2 ,ym-3 A2 (xn+l,ym+2) A2 (xn+3 ,ym-3 A2 (xn+2 , ym+2) A2 (xn-3,ym-2 A2 (xn+3 ,ym+2) A2 (xn-2,ym-2 A2 (xn-3 ,yn+3) A2 (xn-l,ym-2 A2 !xn-2,ym+3) A2 (xn,ym-2) A2 (xn-I ,ym+3) A2 (xn+1, ym-2 A2 (xn,ym+3) A2 (xn+2,ym-2 A2 (xn+l,ym+3) A2 (xn+3 ,ym-2 A2 (xn+2 ,ym+3) A2 {xn-3 ,ym-l A2 (xn+3 ,ym+3) A2 (xn-2,ym-l A2 (xn+2,ym-i A2 (xn+3 ,ym-l A2 (xn-3 ,ym) A2 (xn-2,yτn) A2 (xn+2,ym) A2 (xn+3 ,ym) A2 (xn-3 ,yτn+l) A2 (xn-2,ym+l) A2 (xn+2 , γm+1) If one cf the aoove pixels is off then A2(xn,ym)=0 is considered invalid and A2(xn,ym) s set equal to one. If all the aoove pixels are on, A2(xn,yτn)=0 is considered valid. After the image has been smoothed, the location of each "enclosure" is found 24. An "enclosure" s defined as a set cf contiguous pixels which are off and which are totally surrounded by a set of contiguous pixels which are on. In other words, an enclosure defines a boundary. The locations of the boundary pixels of each enclosure are saved m an array. Once the enclosures have been identified, the image is sized 26. The horizontal length of the image ( Λ x) and the vertical length of the image ( A y) are computed. Next divisors are calculated such that the divisor for the x direction (x_dιv) is equal to Λ χ/37 and the divisor for the y direction (y_div) is equal to y/17. A correspondence is then established such that any pixel located at (x,y) m array A2 is located m the reduced array (A3) at (x',y'; wnere x'=x/x_div and y'=y/y_div. If a condition occurs such that A2 (xl,yl) ,A2 (x2,y2) , A2 (xn,yn) ==>A3 (x' , y ' ) then the value of A3(x',y') will bet set to the logical or of [A2 (xl,yl) ,A2 (x2,y2) , ... ,A2 (xn,yn) ] . Next the boundaries of each enclosure are reexammed . The πoundaries of eacn enclosure are rransformed into DOints m A . If all the points of the enclosure are on m A3 , the center of the transformed enclosure is computed and set to zero. Thus, any enclosure that is erased by the reduction is restored 28. The image is now ready to go through a normalization process 30. The normalization process erases pixels that belong to stray marks. The normalization process s cased on the assumption that intentional marks have a width greater than one tixel ( > . lmm . Establisned rules are followed during the normalization process: 1. If a pixel m the top row of the image s on and the bottom six neighbors are ail off then the pixel s turned off (see Fig. 12) . 2. If a pixel in tne top row cf the image s off and the pixels on botn sides are on tnen the pixel is turned on. 3. If a pixel is on and is not m the top or 5 bottom row of the image and the top six neighbors are off then the pixel is turned off (see Fig. 13) . 4. If a pixel in the bottom row of the image is on and the top six neighbors are all off then the _0 pixel is turned o f. 5. If a pixel m the bottom row of the image is off and the pixels on both sides are on then the pixel is turned on. 6. If a pixel is en and t is not m the top or 15 bottom row and it is not in the first or last column, if the top six neighbors or the bottom six neighbors are all off then the pixel is turned off. 7. If a pixel is off and is not part of an 20 enclosure and the twelve nearest neighbors are on then the pixel is turned on (see Fig. 14) . 8. If a pixel is on and fewer than two cf the nearest eight neighbors are on then the pixel is turned off (see Fig. 15) . 25 S . If a row is separated from tne image oy a blank row immediately above and below then the row is deleted. 10. Let a row segment be defined as a set of consecutive pixels m the same row which are 30 on. Let a row gap DS defined as a set of consecutive pixels m the same row which are off. If the first tnree rows of an image each contain one and only one gap and eacn gap is directly aoove the gap in the succeeding row 35 and each gap is shorter m length than the succeeding gap and tne gap m the tcp row is less than five pixels m length then tne pixels _n tne tCD αao are :.rneα en see Fie . 16) 11. If a row segment m the top row is less tnan five pixels long and it is adjacent to a row segment in the succeeding row and the start column of the row segment is to the right of the start column of the adjacent row segment and the end column of the row segment s to the left of the end column of the adjacent row segment then the row segment is deleted (see Fig. 17) . 12. If a row segment in the bottom row is less than five pixels long and it is adjacent to a row segment in the preceding row and the start column of the row segment is to the right of the start column of the adjacent row segment and the end column of the row segment ..Ξ to the left of the end column of the adjacent row segment then the row segment is deleted. Once the image has been normalized, the entire image is shifted to the left so that the first non-blank column of the image begins in column zero. The image can now be thinned 32. Thinning removes extraneous pixels from the image so that only the basic skeleton image remains. By performing recoσnition on a skeleton image, mistakes in recognition due to varying stroke width and size are eliminated. The t.iinning algorithm is based on work of Theo Pavlidis. Figs. 2A, 2B, 2C are a detailed flow chart of the algorithm used herein, which is self-explanatory. The algorithm presented by Pavlidis, in some instances, causes important features of alphanumeric characters to be lost. To avoid feature loss, major modifications were made to the algorithm as herein disclosed. The significant aspects and steps of the modified algorithm are as follows : 1 . The image is examined for pixels to delete, one edge at a time. The pixels are examined beginning with the right side followed in sequence by the top, left side and bottom. 2. During each examination, pixels are determined to ce sKeletal pixels (36) by comparing the pixel and its eight nearest neighbors to a predetermined set of patterns. If tne pixel 5 and its neighbors match any of the patterns, the pixel is said to be skeletal. There are twelve patterns against which the pixel and its neignbors are compared. (See Fig. 18.) 3. After the pixels m one row have been examined, 0 they are then reexammed to determine if any row segments in the row are skeletal If a row segment is longer than three pixels (40) and the pixels m the rows directly above and below the row segment are off (38) tnen all pixels in 1 5 the row segment are considered to oe sKeletal (42) . 4. At the end of the processing of eacn edge, vertical lines are examined to ensure that no vertical line will be deleted erroneously. If ^0 a line is longer than two rows and the line is not greater than two pixels wide, then the line is considered to be skeletal . 5. After the processing of each edge is complete, pixels on the edge wnich have neen examined, 25 which are not skeletal, are set to zero. 6. The entire process is repeated until the image contains only skeletal pixels . 7. The edges of the skeletal image are examined for line deviations, i.e., pixels that are 30 shifted by one pixel out of a row segment or a line segment (see Fig 19) . Sucn pixels are brought back into alignment with the row or line segment. 8. The s eletal image s scanned for row segments 35 whicn can oe moved into a gap oetween two row segments m either the preceding or succeeding row to form a single row segment. In addition rc τ eetιr.σ tne arcrementioneα criteria, for a row segment to be moveo, the row segment cannot De part of a diagonal line and the movement of the row segment cannot create a blank line unless the blank line is at the top cr bottom of the image (see Fig. 12) . 9. The image is shifted and reduced/enlarged so that it fits exactly m a sparse space (20x12) matrix. After thinning, the image is examined for features (44) (see Figs. 3A, 3B, 3C) . The first features examined are horizontal lines. A horizontal line is defined as a row segment that is ust as long or longer than the average length of ail tne row segments m the image. The trocesε Dεgins by scanning each row for row segments. If a row segment is found, the segment's length, row, starting column and ending column are recorded in a table (46) . After all rows nave been scanned, the table is sorted by length in descending order (48) . The length of each row segment is added to a total. The longest length and shortest length are subtracted from the total . The total is then divided by the total number of row segments minus two to determine the average length (51) . If the average length is less than four pixels long (52) , the average length is assigned a value cf three (54) . 3y forcing the average length to oe three, the possibility of finding horizontal lines where none exist is eliminated. The sorted horizontal table is processed nex . Each entry's length is checked against tne average length (56) . If the entry's length is greater than or equal to the average length, the entry is examined for connectivity. If a row segment is adjacent (above or belo i a smaller row segment whose length is longer than or equal to the average then the second row segment s said to be part of tne first. This chain of row segments is continued until tnere are no adnacent row seqments or until there s more than one adiacent row seσment or until the starting column of a row segment is out of sequence with tne start columns cf tne previous row ≤eαments . Le t SO, SI, S2 and S3 represent the starting columns of row seσment zero, row segment one, row segment two and row segmen t t hree. If Ξ0>=S1>=S2 and S2<S3 or if S0<=S1<=S2 and S2 > =S3 then S3 is said to be out of sequence. If the number of row segments m the chain is greater than three, the chain is D rocessed as a vertical /diagonal . If the number of row seσments m the chain is less than or equal to three , the chain is processed as a horizontal. To finish the norizontal processing, the beginning and ending rows of the chain and the beqmning and ending columns of the chain are recorded in the "found features" table. After the thinned image has been saved the chain is erased from the image, i.e., all tne pixels in t he cnam are set to zero. Next, the partially erased image is searcned for ver t ical/diagonal lines. Chains of row segments are found n the same manner as discussed above. Only chains wnose ver t ical lengths are greater than or equal to three rows are used. Once a valid chain has been found, it must be determined f the chain is a vertical or diagonal . This determination is made by using fuzzy logic (see Figs. 4 and 5 ) . Three components of the chain are examined to determine the line t ype. The three components are the slope of the line, the maximum change in the horizontal direction oetween t wo rows .maximum delta x) and the maximum number of consecutive rows wnere there was no change in the norizontal direction divided by the total change in the vertical direction (zero slope) . Based on its computed value, each co D onent is assigned a value between 0.1 and 1.0. Tables n Fiσs. 21, 21B, and 21C show the correlation between a component's actual value and its assigned value. Once the values have been assigned, each component value is multiplied bv a relevancy factor. For the slope and zero slope the relevancy factor is 0.4. For the maximum delta x the reievancv factcr is 0.2. After the component values nave seen fac t ored, t hey are added together. If the total (as rounded ) is less than O.Ξ, the line s considered to oe a vertical. If tne t otal is greater than or equal to 0.5, the line is rcr.sioerεa ro De a diagona.. For diagonals, _f tne starting column increases with eacn succeeding row then the diagonal is a left diagonal. Otherwise, the diagonal is a right diagonal. The locations and types of the verticals and diagonals are recorded m the "found features" table and the lines are erased from the image. The remaining row segments are considered to be connecting lines. The row segment locations are recorded in the "found features" table. After all lines have been cataloged, a searcn is made for intersect points (47) (see Fig. 6) . An intersect point is an end point of a line segment that is adiacent to a point on another line segment . Since the location of each end point is recorded m the "found features" table, it is easy to searcn the table to find which end points intersect witn other line segments. As each intersect point s found, tne location is recorded in an intersect table (see Fig. 6) . Once ail the intersect points have been found, the locations of the end points which do not intersect other line segments are recorded in an end point table (49) (see Fig. 7) . To avoid placing too much emphasis on what might be errant strokes , the end points of connecting lines can be marked as intersect points. However, the end points of connecting lines are not placed in the end point table . At this point in the process, the information needed to identify the character nas been gathered. However, this information must be quantized to maκ.e an efficient αataoase search possible (50, Fig. 1) . The quantization is done by assigning numerical values to the features, intersect points and endpoints (50) (see Figs. 9A, 9B, 9C) . For the features, if a horizontal line is in the top four rows of the image, it is assigned a value of 1. If it is in the middle four rows it is assigned a value of 16. If the norizontal line is m the bottom four rows it is assigned a value of 256. If a vertical line is in the left six columns it _s assigned a va ue of 4096. If it is m the middle eignt columns it is assigned a vaiue of 65536. If the vertical line is in the rignt six columns, it is assigned a vaiue of 1048576 A left diagonal s assigned a value of 16777216 ana a rignt diagonal is assiqned the vaiue 268435455 Connecting lines are assigned a null value. The values for the features are added and the total saved as the feature value (FV) . Values for tne end points (EV) and intersect points are calculated m the same manner . Next the locations of the diagonal lines are further quantized to assist in character selection when identical FV,EV and IV values assigned to more than one character. First, each diagonal is assigned an octal number based upon its norizontal and vertical locations. The values for all left diagonals are placed in a 64 -bit integer (LV) . The value for all right diagonals are placed in a second 64-bit integer (RV) . Before each value is added into its correct integer, tne integer is multiplied by 64, effectively shifting the integer by 5 bits to make room for a new vaiue. The method allows for twelve right diagonals and twelve left diagonals. In most cases no symbol in any character set will have more than twelve diagonals of any one kind. When such an instance does arise, a second set of integers is used to accommodate the overflow. The next step in the process depends on the type of operating mode. When operating in training mode, the character is added, along with the FV, EV, IV, LV and RV values into a relational database. Since this method of character recognition is not context sensitive, characters from more than one language can be loaded into the same database allowing for more than one language to be recognized from the same database. Databases can also be built to allow for optical character recognition of typed fonts and the like, as the principles underlying this invention are not limited to hand-written character recognition. When operating m character recognition mode, we perform database searches to identify images (53) . The database is queried using the FV, ΞV and IV values as Keys. If mere is a unique character that corresponds to ail tnree Keys, the character is returned as the interpretation cf the unknown image. If more than one cnaracter is found to correspond to ail tnree keys, a second query s made adding tne LV and RV values to the Key list. If mere is a unique cnaracter that corresponds to ail five keys, the cnaracter is returned. If no unique character is found, a symbol iusually a " "' but it can be any cnaracter) is returned to the user indicating the cnaracter is unknown. If no cnaracter was found in response to the original three Key query, a series of queries can be made to determine a "high probability" answer. The number of queries is determined by the user. The probability that a cnaracter will be found increases as more queries are made. However, the probability that the wrong character will be chosen also increases as more queries are made. The first set of queries are queries made with FV and EV as the keys . For each of these queries FV is modified to reflect the value it would nave if one cf the vertical lines was actually a diagonal or if one of the diagonal lines was actually a vertical. These substitutions are based on the fact that character slants vary from writer to writer. Therefore, a line that would be vertical in a perfectly formed character could actually appear as a diagonal and vice versa . During these queries , a count is kept of the numoer of times a particular character is matched to the search keys . At the end of the series of queries, if a cnaracter count is greater than all the other character counts by at least two then that cnaracter is returnee. Otherwise the next series cf queries is executed. The next series begins with a query that only uses FV as the key. If only one character is returned from this query, that character is returned to the user. If more than one character is returned, each character is entered into a table. If no characters are returned from the query the table s left null. The next query uses only EV as the search key. If the table is null tne characters that are found are entered into the table. If the table is not null, the cnaracters in the table are compared to the characters returned from the σuery. If a character m the table is not m the query results, the cnaracter is erased from the table, i.e., a logical "AND" is performed using the cnaracters m the table and tne cnaracters returned from the query If only one cnaracter remains m the table at the end of the process, that character is returned. If no character remains in the table, the "unknown character" symbol is returned. If more than one character 5 remains m the table or if the return of the query was null, the next query is executed. The next query uses only IV as the search key. The previous process is then repeated for the results of this query. If no unique character is found the process is repeated using the following key combinations: 0 1. FV and IV 2. EV and IV 3. FV and EV At this point if a unique cnaracter has net oeen 5 found a query is made using FV and each table entry as search keys. The number of times each character from the table is in the database with the given FV value, is the results of the σuery. If the count for any character is greater than all the others by five then that character is returned. 0 The invention has now been explained with reference to specific embodiments . Other embodiments will be apparent to those of ordinary skill in the art. For example, while this invention has been disclosed in the context of recognizing characters, particularly hand-written cnaracters, _5 the inventive techniques may also find application m recognition of other patterns which have been reduced to pixels and which contain information to which keys may be directed. It is therefore not intended that this invention be limited, except as indicated by the appended claims.

Claims: WHAT IS CLAIMED IS: 1. A method for recognizing ciphers, said method comprising the steps of: inputting a digital representation of a cipher, along with a bits to pixel ratio of said digital representation, the number of pixels per row of said digital representation, the number of rows in said digital representation, and an indicator which represents a block boundary condition of said digital representation; transforming said digital representation so that one pixel of image information is represented by a block; smoothing said transformation; locating enclosures in said smoothed transformation, said enclosures defining spatial boundaries; sizing said smoothed transformation, resulting m selected erased enclosures; restoring all erased enclosures m said sized transformation; normalizing said enclosure-restored transforma ions so that stray marks are erased, to form a normalized image; thinning said normalized image; storing said thinned image m a sparse space matrix; locating significant features in said thinned image; αuantizmg location of said significant features; and performing database searches using said quantized values as search keys to identify ciphers associated with said search keys. 2. The method of claim 1 wherein said smoothing step comprises the steps of: testing the nearest eight neighbors of eacn "off" pixel; testing the nearest forty-eight neighbors cf said "off" pixel if said nearest eight neighbors are ail "on"; and turning said pixel on f any of the said nearest fortv-eiσnt neignbors are "off." 3. The method of claim 1 wnerein said locating enclosures step comprises the steps of : locating a set of at least one pair of contiguous pixels which are off; testing for a set of pixels which surround said off pixels and which are on; and recording locations of said off pixels. 4. The method of claim 1 wherein said sizing step comprises the steps of : calculating a horizontal factor; calculating a vertical factor; and calculating for each pixel m said smoothed transformation a new norizontal and vertical position Dased on said horizontal and vertical factors. 5. The method of claim 1 wherein said restoring step comprises : calculating preferred locations of enclosures n the restored image ; testing said preferred locations to determine if the enclosures are present at said preferred locations; and restoring said enclosures if said enclosures are not present . 6. The method of claim 1 wherein said normalization step comprises: testing whether a subject pixel m the top row of said restored image is on; if said subηect pixel is on, testing the nearest six bottom neighbor pixels ; and turning said top row subject pixel on if ail of said oottom six neighDor pixels are off. 7. The method of claim 1 wherein said normalization step further comprises the steps of: testing wnetner a suoiect pixel m the tcp row of said restored image is off, if said suDject pixel is off, testing side pixels ad j acent ooth sides of said suoject pixel; and turning said subject pixel on if both said side pixels are on. 8. The method of claim 1 wherein said normalization step further comprises the steps of : testing whether a subject pixel in any row except the top row of said restored image is on; 5 if said subject pixel is on, testing the nearest top 6 six neighbor pixels ; and 7 turning said subject pixel off if all of the said S nearest top six neighbor pixels are off. A 9. The method of claim 1 wnerem said 2 normalization step further comprises the steps of: 3 testing whether a subject pixel m the Dottom row of 4 said restored image is off; 5 if said subject pixel is off, testing side pixels 6 adjacent said subject pixel; and 7 turning said subject pixel on if both said side 8 pixels are on. 1 10. The method of claim 1 wherein said 2 normalization step further comprises the steps of : 3 testing whether a subject pixel in any row except 4 the top or bottom row of said restored image is on and is not 5 m the first or last column of said restored image; 6 if said subject pixel is on, testing the top six 7 nearest neighbors and the bottom six nearest neighbors; and θ turning said subject pixel off if said top six 9 nearest neighbors or said bottom six nearest neighbors are all 10 off. 1 11. The method of claim 1 wnerem said 2 normalization step further comprises the steps of: 3 testing wnether a suo ect pixel s part cf an πc.osure ; if said pixel is not part of an enclosure, resting whether said subject pixel is off; if said pixel is off, testing said pixels twelve nearest neighbors ; and turning on said subject pixel, if ail of the said twelve nearest neighbors are on. 12. The method of claim 1 wherein said normalization step further comprises the steps of : testing whether said subject pixel is on; if said subject pixel is on, testing the nearest eight neighbors; and turning off said subject pixel if fewer than two of said nearest eight neighbors are on. 13. The method of claim 1 wherein said normalization step further comprises the steps of : testing for a blanking condition, said blanking condition being where a non-blank row in said restored image is between two blank rows ; and deleting said non-blank row and said two blank rows if said blanking condition is true. 1 . The method of claim 1 wherein said normalization step further comprises the steps of : testing for gaps in the first row, the second row and the third row of said restored image; if said gaps exist and there is only one gap per row, computing the length of each gap; and filling in the gap m the first row if said gaps are directly above the succeeding gap and said lengths increase from top to bottom and the length of the top gap is less than five pixels. 15. The method of claim 1 wherein said normalization step further comprises the steps of : testing top row segment length of a top row segment m me COD row; if said top row segment length _s less tnan five, testing next row segment length of the next row segment immediately below the top row segment in the top row; and if the top row segment length is greater tnan five and the next row segment is completely beneath the top row segment, tnen deleting the top row segment. 16. The method of claim 1 wherein said normalization step further comprises the steps of : testing bottom row segment length of a bottom row segment m the bottom row; if said bottom row segment length is less than five, testing previous row segment lengtn of the previous row segment immediately above the Dottom row segment tne oottom ro ; and if the bottom row segment length is greater than five and the previous row segment is completely above the bottom row segment, deleting the bottom row segment. 17. The method of claim 1 wherein said thinning step comprises the steps of : examining edges of the image, one edge at a time, for skeletal pixels; thereafter deleting pixels wnich are not sκeletai; repeating the process until only sκeleta_. pixels remain ; and reducing final skeletal image to fit into a uniform size matrix. IB . The method of claim 17 wnerem said examining step comprises the steps of : comparing each edge pixel and ts eight nearest neighbors to a set of twelve patterns; and marking each said edge pixel as SKeletal if said edge pixel and its eight nearest neighbors match any of said Datterns. 1 19 The method of c aim 17 wnere said examining 2 step further comprises the steps of : Z searcning eacn row for a row segment longer then 4 three pixels ; 5 if a three-pixel row segment exists, examining 6 pixels directly above and below said three-pixel row segment; 7 and 8 if the position of a three-pixel row segment is 9 blank, marking all pixels position of the three-pixel row 0 segment as skeletal. 1 20. The method of claim 17 wnerem said examining 2 step further comprises the steps of: Z examining vertical lines, and 4 marking said vertical lines as SKeletal if said 5 vertical lines are longer than two rows and are less than three pixels wide. 1 21. The method of claim 1 wherein said locating 2 step comprises the steps of : 3 computing an average length over all row segments m 4 the image ; 5 scanning for row segments which are greater m 6 length than said average length; 7 for said row segments whose lengths are greater than 8 average , scanning for row segment chains ; 9 recording the location and length of said row 0 segment chains, 1 determining type of line said row segment cnains 2 represent using fuzzy logic; 3 deleting said row segment chains from the ..mage; 4 examining the remaining image for vertical lines; 5 determining wnether said vertical lines are 6 verticals or diagonals by using fuzzv logic, 7 recording the location, _engtn and type cf said 8 lines; 19 erasing said lines from the image; 13 -.ocat g me remaining rev; segments, recording the location of said row segments; computing the locations of all intersect points; recording said points; computing the locations of all endpoints; and recording said points. 22. The method of claim 1 wherein said quantizing steD comprises the steps of : assigning numeric values to each feature based upon x-y coordinate location of said each feature; totaling said numeric values for line types; totaling said numeric values for endpoints; totaling said numeric values for intersect points; totaling said numeric values for right diagonals; and totaling said numeric values for left diagonals. 23. The method of claim 1 further comprising the steps of: adding a known cipher and its quantized values to an relational database.

Inventors: THOMPSON ARCHIE L, VAN SAUN RICHARD A, THOMPSON, ARCHIE, L., VAN SAUN, RICHARD, A.
Applicants: FAXTRIEVE INC, FAXTRIEVE, INC.
Application year: 1997
Main classification: G06K9
IPC codes: G06K9