Abstract:
A method of capturing the coordinates of a handwritten signature and compressing the coordinate data so obtained. The signature is captured in real time by a device such as a stylus-operated digitizer. Compression is performed by examining the location of the signature points relative to a series of guide lines extending in the strokewise direction. The data is stored in compressed form for use in subsequent transactions requiring authorization by the signature which has been so captured.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a method of recording a handwritten message such as a signature in digitized form. It has particular application to commercial transactions wherein a handwritten signature is captured at a point of sale and is stored for later use to authenticate the transaction, authorize an automatic account debit or the like. The invention is particularly well suited for use with merchandising systems of the type disclosed in Allgeier et al, application Ser. No. 575,096, filed Aug. 30, 1990 and in Kapp et al, application Ser. No. 640,199, filed Jan. 11, 1991, the disclosures of which are incorporated herein by reference. 
     Merchandising systems as described in the above-mentioned patent applications are equipped with a transparent glass screen having a resistive coating fused to its surface. A linearized voltage field is established on the surface of the screen. A human signature is captured by providing a hand-held stylus which is moved across the surface of the screen during writing of the signature. A digitizer senses the position of the stylus during writing of the signature and generates digital signals representing the X-Y coordinates of the stylus. The digitized coordinates are stored in a memory and are also used to drive a liquid crystal display positioned below the glass screen. This produces a visual display of the signature, as the handwriting progresses. Means are provided for maintaining the signature in registration with the movement of the stylus, as disclosed in detail in the above-mentioned patent applications. Preferably, a skew correction is employed in the signature registration as disclosed in Crooks et al, Ser. No. 640,321, filed Jan. 11, 1991, also incorporated herein by reference. 
     The system of the above applications preferably includes a work station such as an NCR 7052 Work Station equipped with a built-in microprocessor and a keyboard for entering transaction data. A printer may be provided for printing transaction data and a replica of the signature on a suitable paper receipt. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method of recording a signature by sensing the writing of the signature and generating a series of positional coordinates in digital format. The digitized coordinate information is stored sequentially in an ordered arrangement as generated. Thereafter the stored data is strokewise compressed. Such compression improves the recording process by reducing the amount of memory required for storage of the resulting data file. This makes the signature record particularly adapted for use in subsequent merchandising, billing or fund transfer operations. 
     Strokewise data compression is accomplished by examining the coordinate data on a sequential basis in accordance with the ordered storage arrangement thereof. A digital computing device progressively selects start points and stop points and examines the coordinates of all midpoints situated therebetween. The computing device establishes guide lines between the start points and their associated stop points and selectively saves the coordinate data only for those midpoints which are not situated at predetermined locations relative to their associated guide lines. Midpoints which are situated at such predetermined locations are considered to be redundant and are discarded. 
     In preferred embodiment the computer selects the first data point as a start point and the second data point as a stop point. The stop point is moved progressively in a strokewise direction along the signature, and at each stop point position the computer examines all intervening midpoints. If all midpoints are found to be redundant, then the stop point is advanced one position, and all midpoints are again examined. Whenever a midpoint is found to be located beyond the bounds of redundancy, the coordinate data for the previous stop point are saved, and all coordinate data for midpoints between that saved stop point and the last start point are discarded. The &#34;saved&#34; stop point then becomes a new start point, and the stop point is again advanced. 
     In preferred embodiment the line which is established between each start point and the successively established stop points is a straight line. Also, in the preferred embodiment an X-Y rectangular coordinate system is employed and a &#34;linear fit&#34; rejection criterion is utilized. This criterion involves calculating the equation of a straight line between the start point and the stop point in terms of a slope and a Y-intercept. For each examined midpoint, the X coordinate thereof is substituted into the equation for the line, and the line equation is solved to determine a Y value. The calculation is performed using floating point arithmetic, and the result is converted to an integer. If the resulting integer value of Y is equal to the Y coordinate of the point being examined, then the rejection criterion is satisfied. An alternative embodiment of the invention utilizes a rejection criterion which is based upon a calculated perpendicular distance between a midpoint under examination and a straight line between the start point and the stop point. 
     In the preferred embodiment of the invention the coordinate data for the signature points are scaled prior to performance of the compression routine. Scaling is performed by multiplying all coordinate data by a preselected constant. The scaling factor represents a desired reduction in resolution for the resulting data. 
     It is therefore an object of the invention to provide an improved method of recording handwritten signature information in digital form. 
     It is another object of the invention to provide a method of compressing data representing a handwritten signature. 
     Other and further objects and advantages of the invention will be apparent from the drawing, the following specification and the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a perspective view of a write input apparatus and its associated printer. 
     FIG. 2 is a partially sectioned elevational view of the write input apparatus of FIG. 1. 
     FIG. 3 is a block diagram of a signature recording system. 
     FIG. 4A and 4B are a flowchart of a digital computer routine for capturing positional coordinates for a handwritten signature. 
     FIGS. 5A through 5E are a flowchart for a digital computer program which reads, compresses and stores signature data. 
     FIG. 6 is a schematic illustration of a linear fit criterion for discarding midpoint coordinate data. 
     FIG. 7 is a schematic illustration of a trigonometric criterion for discarding midpoint coordinate data. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Reference now is made to FIG. 1 wherein there is shown a perspective view of a write input apparatus 200 which is coupled to a printer 202 by a cable 204. Cable 204 may also connect printer 202 to other point-of-sale devices as disclosed in detail in Kapp et al., Ser. No. 640,199. A hand-held stylus 208 is connected to write input apparatus 200 by a suitable electrical line 210. Stylus 208 may be grasped by a human participant and brought into contact with a glass screen 206. Stylus 208 is held in contact with the glass screen 206 while the human participant makes a handwritten signature. 
     A resistive coating is fused upon the surface of glass screen 206 and a linearized voltage field is applied thereto. A digitizer 201 (FIG. 3) installed within write input device 200 senses the position of the stylus tip relative to screen 206 and generates a corresponding sequence of digital data bytes. These data bytes carry 8-bit binary codes representing the X-Y coordinates for a series of sequentially written signature points; each signature point being displaced from its neighbors along a line running in the strokewise direction (i.e. in the direction of the path traveled by the stylus). 
     As illustrated in FIG. 2, a liquid crystal display unit 214 having a display surface 216 is positioned below the surface of the digitizer screen 206. The screen 206 is transparent, so that a display presented on surface 216 of LCD 214 may be observed therethrough. Positional coordinate information from digitizer 201 is applied to LCD 214 for creating a visual image of the progressively written signature. The signature coordinate information is also stored in a suitable digital memory for further processing, as described in detail below. 
     In the preferred embodiment of the invention digitizer 201 is a Scriptel RDT Sillo-ette™ Model 1212. As illustrated in FIG. 3 digitizer 201 sends stylus position and status information via a serial RS232 link to the COM1 serial port of a digital computing device 205. A suitable device for this purpose is an NCR PC810 personal computer, but other personal computers may be used. Computer 205 generates image control signals for LCD 214 and print control signals for printer 202. A keyboard 218 supplies transaction information to computer 205. 
     Digitizer 201 captures stylus positional information for a series of discrete points at regularly timed intervals. These time intervals are short enough to capture a high quality record of a fast-moving handwritten input. A digitizer of the above mentioned type is capable of capturing a rapidly written signature at a resolution of 1,000 dots per inch (dpi). However, a resolution of only about 75 dpi is satisfactory for many signature recording requirements, and therefore the system may generate redundant data. The amount of such redundant data will be increased if the handwriting proceeds at a slow pace. The redundant signature data is discarded as hereinafter described, and the data which remains is stored in a digital storage device 207 such as a conventional floppy disk. 
     The serial data generated by a digitizer of the above-mentioned type is organized into 7-byte messages, each representing a single position/status report for the stylus. Message organization is as shown in Table I below: 
     
                       TABLE I______________________________________Byte bit 7  bit 6   bit 5                    bit 4 bit 3                               bit 2 bit 1                                          bit 0______________________________________1    1      ST1     ST2  PA    PB8  PB4   PB2  PB12    0      0       0    0     0    SGN   X15  X143    0      X13     X12  X11   X10  X9    X8   X74    0      X6      X5   X4    X3   X2    X1   X05    0      0       0    0     0    SGN   Y15  Y146    0      Y13     Y12  Y11   Y10  Y9    Y8   Y77    0      Y6      Y5   Y4    Y3   Y2    Y1   Y0______________________________________ 
    
     where: 
     X0-X15 form the x-position coordinate value. X15 is the most significant bit, while X0 is the least significant bit. 
     Y0-Y15 form the y-position coordinate value. Y15 is the most significant bit, while Y0 is the least significant bit. 
     SGN is the sign of the value which follows. SGN=0 indicates a positive value while SGN=1 indicates a negative value. 
     PA is a flag bit which indicates what type of input device is being used with the digitizer (puck, stylus, etc.). It is equal to 0 when a stylus is being used. 
     PB2, PB4, and PB8 are not used for the stylus input device. 
     PB1 indicates the state of the stylus tip switch. When the stylus is pressed against the digitizer tablet, PB1=1. When the stylus is not pressed against the digitizer tablet, PB1=0. 
     ST1 and ST2 are proximity flags. When the stylus is close enough to the digitizer pad to sense stylus position, ST1=ST2=0. When the stylus is too far away from the pad to sense stylus position, ST1=ST2=1. 
     A computer program for capturing the signature data generated by digitizer 201 may be written to follow the flowchart of FIGS. 4A and 4B. Such a program may store the digitizer data in three arrays as follows: 
     (1) &#34;x[n]&#34;, which is the horizontal position or x-coordinate of a data point. 
     (2) &#34;y[n]&#34;, which is the vertical position or y-coordinate of a data point. 
     (3) &#34;stylus[n]&#34;, which provides stroke information. &#34;stylus[n]=0 indicates that point n is part of a continuing stroke; that is, the stylus was in contact with the digitizer surface at point n-1. &#34;stylus[n]=1 indicates that point n is at the beginning of a new stroke. 
     The value of the variable n begins at 0 and is incremented for each new data point. The program uses an integer known as &#34;length&#34; which has an initial value of 0 and which progressively increases until it reaches a value equal to the highest value of n plus 1. Thus, &#34;length&#34; takes on a value equal to the total number of data points. Each of the above-mentioned arrays contains data for &#34;length&#34; points after completion of the sequence illustrated in FIGS. 4A and 4B. It is common programming practice to assign the value 0 to the first element of an array, so the index value for the last element of each array is equal to length-1. 
     Referring again to the flowchart of FIGS. 4A and 4B, execution starts at block 7 and then continues to block 9 where the variable &#34;length&#34; is initialized at a value of 0. This value is incremented as each new data point is read. The program performs a keyboard scan at decision point 11 to detect a keystroke indicating that the handwritten input is complete. If the input is complete, then the program exits to point 13. The value of &#34;length&#34; at that point in time is stored in memory as a constant. 
     If decision point 11 results in a conclusion that the handwritten input is not complete, then the program progresses to decision point 15 to determine whether the next message is available. If a complete message is not yet available, execution proceeds to node 10 and loops back through decision point 11 until a message is available. The program then continues to block 17 where x and y coordinates, as well as stylus status information, are extracted from the complete message via conventional bit manipulation. Reference may be made to Table I for guidance in the preparation of an appropriate bit manipulation routine. 
     Following extraction of coordinate data and stylus status information from the message, the program continues to decision point 19 where the BP1 bit of the current message is examined to determine whether the stylus is pressed against the digitizer tablet. If not, a flag known as the liftoff flag is set &#34;true&#34; (block 20). If the stylus is found to be touching the digitizer, then execution proceeds to block 21, where the x and y coordinate values are stored in the x and y arrays at index locations indicated by the current value of &#34;length&#34;. Following this, an inquiry is made at decision point 23 as to whether the liftoff flag is set to a logical &#34;true&#34; OR if &#34;length&#34; is equal to 0. If either condition is true, execution continues to block 25, where the liftoff flag is set to a logical &#34;false&#34;. Execution continues to block 27, where a &#34;1&#34; is stored in the &#34;stylus[]&#34; array at position &#34;length&#34;, after which &#34;length&#34; is incremented at block 31. Execution then continues to node 10. 
     Returning to decision point 23, if neither the liftoff flag is set to a logical &#34;true&#34; nor is &#34;length&#34; equal to 0, execution proceeds to node 29 after setting &#34;stylus[length]&#34; equal to 0 in block 24. The specifics of implementing the above-outlined procedure will be readily apparent to anyone versed in personal computer programming. 
     After completing the procedure illustrated by the flowchart of FIGS. 4A and 4B, the method of this invention continues by compressing the data stored in arrays x[n], y[n] and stylus[n]. Compression proceeds on a strokewise basis, so that the data stored in the above-noted arrays is examined in the order in which it was stored. It will be appreciated that the stored data files may be examined in a reversed order or on a piecewise basis, either of which are equivalent to examination from beginning to end. All such equivalent examination sequences are referred to herein by the term &#34;strokewise&#34;. 
     In accordance with the preferred embodiment of the invention, the compression involves two general phases, the first of which is a scaling phase. In this connection the program uses a variable &#34;old --  res&#34; to refer to the resolution of the data as initially captured. Thus each count in x[n] and y[n] represents a distance of 1/old --  res from the origin. The location of the origin is unimportant so long as all points are specified with reference to the same origin. A common point for the origin is the center of the digitizer panel, and old --  res is determined by the digitizer pad used. For example, if the digitizer has a resolution of 1,000 dpi, each count in x[n] and y[n] initially represents a distance of 0.001 inches. A value of x[n] equal 500 therefore represents a horizontal distance of 0.5 inches from the origin, and a value of 250 for y[n] represents a vertical distance of 0.25 inches from the origin. 
     Reference is now made to FIGS. 5A through 5E which are a flowchart for the compression procedure. Variables used in this procedure are as follows: 
     1. &#34;x[]&#34; and &#34;y[]&#34; are arrays of length &#34;length&#34; which contain the horizontal and vertical coordinates respectively of each point in the handwriting record, as described previously. After compression, these arrays contain the horizontal and vertical coordinates of the compressed handwriting record. 
     2. &#34;stylus[]&#34; is an array of length &#34;length&#34; which contains the action of the stylus at the point specified by x[n] and y[n], as described previously. After compression, this array contains the stylus action for each point in the compressed handwriting record. 
     3. &#34;length&#34; represents the number of elements in the handwriting records, as described previously. 
     4. &#34;new --  res&#34; is the handwriting record resolution after compression has been applied. 
     5. &#34;old --  res&#34; is the handwriting record resolution before compression has been applied. 
     6. &#34;new&#34; is an array index which points to the next open position in either &#34;x[]&#34;, &#34;y[]&#34;, or &#34;stylus[]&#34; after the last point in the new, compressed handwriting record. For example, &#34;x[new-1]&#34; is the last x-coordinate in the handwriting record after compression. &#34;new&#34; is also equal to the length of the compressed handwriting record. 
     7. &#34;start&#34; is an array index used during compression. 
     8. &#34;midpoint&#34; is an array index used during compression. 
     9. &#34;stop&#34; is an array index used during compression. 
     10. &#34;n&#34; is an array index used during compression. 
     Referring to FIG. 5A, the procedure starts at block 33. The different variables used later on in the procedure are then initialized in block 35: &#34;new&#34; is set to 1, &#34;start&#34; is set to 0, &#34;stop&#34; is set to 0, and &#34;n&#34; is set to 0. 
     The procedure continues to decision point 37, where an inquiry is made as to whether &#34;n&#34; is not equal to &#34;length&#34;. If so, the procedure continues to block 39, where the coordinates &#34;x[n]&#34; and &#34;y[n]&#34; are scaled to the new resolution, &#34;new --  res&#34;. This is done by multiplying each coordinate in turn by the scalar (&#34;new --  res&#34;/&#34;old --  res&#34;). Following this, &#34;n&#34; is incremented by one in block 41, and the procedure branches to node 36. 
     Returning to decision point 37, if &#34;n&#34; is not equal to &#34;length&#34;, the procedure continues to decision point 43, where an inquiry is made as to whether &#34;length&#34; is less than or equal to 2. If so, there is no use trying to compress this handwriting record, as it is already as small as it could possibly be. In this case, the procedure continues to block 45, where &#34;new&#34; is set equal to &#34;length&#34;. The procedure then terminates at block 47. 
     Returning to decision point 43, if length is not less than or equal to 2, the procedure continues to block 51, where &#34;stop&#34; is incremented by one. Following this, an inquiry is made at decision point 53 as to whether &#34;stylus[stop]&#34; is equal to 1. if not, this indicates that the presently processed point is a continuation of a previous stroke. In that case, the procedure continues to block 55, where &#34;midpoint&#34; is set equal to &#34;start&#34; plus one. An inquiry is then made at decision point 59 as to whether &#34;midpoint&#34; is not equal to &#34;stop&#34;. If this is so, the procedure branches to node 70. Otherwise, the procedure continues to decision point 61, where an inquiry is made as to whether the point (x[midpoint], y[midpoint]) can be discarded. 
     Two different types of test have been employed to determine whether (x[midpoint], y[midpoint] can be discarded. The preferred test is a linear fit test as illustrated in FIG. 6 for a midpoint 118. In this test, a linear equation for a guide line 113 connecting point 115 (x[start], y[start]) to point 117 (x[stop], y[stop]) is calculated. This linear equation takes the form Y=slope* X+intercept, where &#34;Y&#34; is a vertical coordinate along the line, &#34;X&#34; is the corresponding horizontal coordinate, and &#34;slope&#34; and &#34;intercept&#34; are constants calculated as follows: 
     
         slope=(y[start]-y[stop])/(x[start]-x[stop]) 
    
     
         intercept=y[start]-slope * x[start] 
    
     Computer 205 calculates &#34;slope&#34; and &#34;intercept&#34; using floating point math and then solves the equation: 
     
         Y=slope * x[midpoint]+intercept 
    
     This produces an estimate for y[midpoint] in floating point format. The calculated value of Y is converted to an integer and compared to y[midpoint]. If the two values are equal, then point 118 is assumed to be located on or near guide line 113, and its coordinate data is (at this point) considered redundant. However, the coordinate data for point 118 are not discarded until after a strokewise subsequent point is found to be non-redundant and a new start point has been determined. This is discussed in more detail below. 
     The second type of redundancy test is a perpendicular distance test as illustrated in FIG. 7. In this test a guide line 99 is drawn between the points (x[start], y[start]) 101 and (x[stop], y[stop]) 103. The distance between guide line 99 and a midpoint (x[midpoint],y[midpoint]) 105 is measured along line 107 extending through point 105 and perpendicular to guide line 99. The length of line 107 is calculated via the equation: 
     
         D=l.sub.start-midpoint * sin (2 * acos(square root(P * (P-l.sub.midpoint-stop)/(l.sub.start-midpoint * l.sub.start-stop)))) 
    
     where: 
     
         l.sub.start-midpoint =((&#34;x[start]&#34;-&#34;x[midpoint]&#34;).sup.2 +(&#34;y[start]&#34;-&#34;y[midpoint]&#34;).sup.2).sup.1/2 
    
     
         l.sub.midpoint-stop =((&#34;x[midpoint]&#34;-&#34;x[stop]&#34;).sup.2 +(&#34;y[midpoint]&#34;-y[stop]&#34;).sup.2).sup.1/2 
    
     
         l.sub.start-stop =((&#34;x[start]&#34;-&#34;X[stop]&#34;).sup.2 +(&#34;y[start]&#34;-&#34;y[stop]&#34;).sup.2).sup.1/2 
    
     
         P=(l.sub.start-midpoint +l.sub.midpoint-stop +l.sub.start-stop)/2 
    
     If guide line 99 is drawn such that it is one unit wide (as shown by the dotted line boundaries of the path 109), the point 105 will be encompassed thereby if D is less than or equal to 1/2. Therefore, if D is calculated as described above and found to be less than or equal to 1/2, the coordinate data (x[midpoint],y[midpoint]) for point 105 can be discarded. 
     The cutoff point for D need not be set to 1/2. The algorithm can be strengthened by making D less than 1/2 or weakened by making D greater than 1/2. Making the algorithm stronger will not make any noticeable difference in the appearance of the reconstructed handwritten figure. However, it will increase the length of the record. Making the algorithm weaker will decrease the length of the record but will degrade the reconstructed figure by making it appear as a series of discrete straight lines instead of a continuous curve. 
     Both the perpendicular distance method and the linear fit method offer satisfactory results, but the linear fit method has a clear advantage in that it is simpler and thus much faster. However, the perpendicular distance method has the useful feature of adjustable selectivity by varying the cutoff point for the distance d. 
     Returning to decision point 61 of FIG. 5C, if the point (x[midpoint],y[midpoint]) can be discarded, execution continues to block 63, where &#34;midpoint&#34; is incremented by one, and the procedure continues at node 57. Otherwise, the procedure continues to block 65. In block 65, the point indexed by &#34;stop&#34; minus 1 is stored in the compressed handwriting record by setting &#34;x[new]&#34; equal to &#34;x[stop-1]&#34;, &#34;y[new]&#34; equal to &#34;y[stop-1]&#34;, and &#34;stylus[new]&#34; equal to &#34;stylus[stop-1]&#34;. 
     Following block 65, &#34;new&#34; is incremented by one in block 67 and start is set equal to stop-1 in block 69, following which the procedure continues to decision point 71. At decision point 71, an inquiry is made as to whether stop is not equal to length minus 1. If so, execution continues at node 49. If not, the entire handwriting record has been processed, and the procedure continues to decision point 73 where an inquiry is made as to whether stylus[stop] does not equal one. If not, the procedure continues to node 79 and then terminates at block 81. Otherwise, the point indexed by &#34;stop&#34; is added to the end of the compressed handwriting record in block 75 by setting &#34;x[new]&#34; equal to &#34;[stop]&#34;, setting &#34;y[new]&#34; equal to &#34;y[stop]&#34;, and setting &#34;stylus[new]&#34; equal to &#34;stylus[stop]&#34;. New is then incremented by one in block 77 and the procedure continues to node 79. 
     Returning to decision point 53, if &#34;stylus[stop]&#34; is equal to one, the procedure continues instead to block 83, where an inquiry is made as to whether &#34;stylus[stop-1]&#34; is not equal to one and &#34;stop&#34; is not equal to one. If either condition is false, execution continues to node 89. Otherwise, execution continues to block 85, where the point indexed by &#34;stop&#34; minus one is stored in the compressed handwriting record by setting &#34;x[new]&#34; equal to &#34;x[stop-1]&#34;, &#34;y[new]&#34; equal to &#34;y[stop-1]&#34;, and &#34;stylus[new]&#34; equal to &#34;stylus[stop-1]&#34;. &#34;new&#34; is then incremented by one in block 87. Following this, the point indexed by &#34;stop&#34; is stored in the compressed handwriting record by setting &#34;x[new]&#34; equal to &#34;x[stop]&#34;, setting &#34;y[new]&#34; equal to &#34;y[stop]&#34;, and setting stylus[new]&#34; equal to &#34;stylus[stop]&#34; . &#34;new&#34; is then incremented by one in block 93. Following this, the procedure continues to node 95, where &#34;start&#34; is set equal to &#34;stop&#34;. The procedure then continues to node 70. 
     It is not necessary that the guide lines used in accordance with this invention be straight lines. It is also practical to determine the redundancy of a midpoint based upon its location relative to a curved guide line extending in the strokewise direction. Such a curved guide line may be generated, for instance, by computing the coefficients of a polynomial function passing through the stop point, the start point and one or more previous start/stop points. It could also be generated through use of a non-rectangular coordinate system. For example, a curved guide line could be constructed in a circular coordinate system as an arc of constant radius. 
     It is also apparent that a guide line may be projected beyond a stop point and used for checking the redundancy of &#34;midpoints&#34; which are beyond the stop point. 
     Furthermore, it is possible to generate the handwritten signature with the aid of devices other than a stylus-activated digitizer. For example, a mouse or a puck activated digitizer could be used. 
     While the methods herein described constitute preferred embodiments of this invention, it is to be understood that the invention is not limited to these precise methods, and that changes may be made therein without departing from the scope of the invention, which is defined in the appended claims.