CA2099371C - Method and apparatus for comparing a test handwritten signature with a reference signature - Google Patents

Method and apparatus for comparing a test handwritten signature with a reference signature Download PDF

Info

Publication number
CA2099371C
CA2099371C CA002099371A CA2099371A CA2099371C CA 2099371 C CA2099371 C CA 2099371C CA 002099371 A CA002099371 A CA 002099371A CA 2099371 A CA2099371 A CA 2099371A CA 2099371 C CA2099371 C CA 2099371C
Authority
CA
Canada
Prior art keywords
signature
test
threshold value
calculating
rc2i
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CA002099371A
Other languages
French (fr)
Other versions
CA2099371A1 (en
Inventor
Rejean Plamondon
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SIGN@METRIC Inc
Original Assignee
SIGN@METRIC Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SIGN@METRIC Inc filed Critical SIGN@METRIC Inc
Publication of CA2099371A1 publication Critical patent/CA2099371A1/en
Application granted granted Critical
Publication of CA2099371C publication Critical patent/CA2099371C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/30Individual registration on entry or exit not involving the use of a pass
    • G07C9/32Individual registration on entry or exit not involving the use of a pass in combination with an identity check
    • G07C9/35Individual registration on entry or exit not involving the use of a pass in combination with an identity check by means of a handwritten signature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/30Writer recognition; Reading and verifying signatures

Abstract

Apparatus and method for comparing a test handwritten signature with a reference signature where each of the test and reference signatures have been acquired by generating three electrical digital position signals characterizing a trajectory of a handwritten signature. The apparatus comprises a device for calculating variations of simple dynamic parameters of the test sign-ature with respect to the simple dynamic parameters of the reference signature, by calculating a first evaluating function C1; a de-vice for comparing C1 with a first threshold value, and rejecting said test signature if C1 passes the first threshold value; a device for calculating local intrinsic correlations of V.sigma. and V~ values of the test and reference signatures for each pair of characteristic segments, by calculating a second evaluating function C2; a device for comparing C2 with a third threshold value, and rejecting the test signature if C2 passes the third threshold value; a device for calculating a classifying function C b; and a device for com-paring the classifying function C b with a fourth threshold value, and rejecting the test signature if C b passes the fourth threshold value.

Description

METHOD AND APPARATUS FOR CO!lPARING A TEST HANDWRITTEN
SIGNATURE WITH A REFBRENCE SIGNATURE
The present invention is concerned with an apparatus and a method for comparing a test handwritten signature with a reference signature to verify a signature.
Known in the art, there is the US patent no. 3,699,517 of James W. DYCHE granted on October 17, 1972, and the US patent no. 4,028,674 of Ping-Chien CHUANG, granted on June 7, 1977, in which there are described the basic principle for verifying a signature.
Also known in the art, there is the US patent no. 4,190,820 of Hewitt D. CRANE et al., granted on February 26, 1980, in which there is described a method for verifying a signature. This method consists in breaking into segments test and reference signatures according to landmarks. A series of correlation calculations is made between the analog segments of each signature in order to verify said test signature. It can be noted that the segments of each signature are normalized before the correlation calculations.
Also known in the art, there are the following US
patents that describe different apparatuses and methods for verifying a signature: 3,955,178; 3,962,679; 4,040,010;
4,078,226: 4,128,829: 4,286,255; 4,475,235; 4,495,644:
4,553,258: 4,703,511; 4,736,445; 4,789,934; and 4,856,077.
An object of the present invention is to provide 2U9~371 . ..
an apparatus and method for verifying a signature with more precision than the apparatuses and methods known in the art.
SUI~ARY OF THE INVENTION
According to the present invention, there is provided an apparatus for comparing a test handwritten signature with a reference signature where each of said test and reference signatures have been acquired by:
generating three electrical digital position signals characterizing a trajectory of a handwritten signature by means of n + 1 samplings of period T, by means of a pencil provided with a point and an analog-to- digital tablet, said three signals being Dx(kT), Dy(kT) and D,(kT) where k = 0, 1, 2, .., n, where D,(kT) and D,,(kT) are respectively position signals according to X and Y axes of a Cartesian reference with respect to time, and D,(kT) is an on/off signal indicating whether or not said point is contacting said tablet;
low-pass filtering said Dx(kT) and D,,(kT) electrical signals;
taking the derivative of said Dx ( kT ) and DY ( kT ) electrical signals f or generating V,~ ( kT ) and V,, ( kT ) electrical components which represent respectively speeds of said point according to X and Y axes of a Cartesian reference;
calculating Ve(kT), V,(kT) and sign(kT) values from V, ( kT ) and V,, ( kT ) values where Vo(kT) - Vx2(kT) + Vy2(kT) _ V (kT)V ((k+1)T)+V (kT)V ((k+1)T) V8(kT) = sign(kT) * cos 1 x x y y * T-1 Vo(kT)Vo((k+1)T) WO 92/13816 ~~~ PCT/CA92/00052 Y (kT)11 ((k+1)T)-V ((k+1)T)N (kT) sign(kT) - sign sin-1 x y x y Va(kT)11o( (k+1 )T) 10 calculating handwritten components and handwritten strings, where each of said handwritten components is delimited by two successive liftings of said point along said trajectory, and each of said handwritten strings is delimited by two successive portions of said trajectory where said V, value is higher than a predetermined angular speed value and where said V, value is lower than a predetermined curvilinear speed value, said handwritten strings and components having beginnings and ends defining temporal marks along said~trajectory by which duration of said handwritten signature is determined:
calculating simple dynamic parameters characterizing said test and reference signatures:
applying respectively a first predetermined rotation operator and a second predetermined rotation operator to said D,(kT) and D,,(kT) signals for correcting inclination of said trajectory and aligning a base line of said trajectory with a horizontal base line: and scaling said D,(kT) signal according to said X Cartesian axis, and scaling said D,,(kT) according to said Y Cartesian axis:
said apparatus comprises:
means for calculating variations of said simple dynamic parameters of said test signature with respect to said simple dynamic parameters of said reference signature, by calculating a first evaluating function C1 where:
C1 - E piFCli(RCli) a [0,1]
i=1 WO 92/13816 ~ U 9~ 3 7;1: ~ PCT/CA92/00052 where FC1,(RC1,) is a function representative of the variations of a particular dynamic parameter where i indicates the parameter in question, and p, is a weight given to a particular parameter of said simple dynamic parameters:
means for comparing C1 with a first threshold value, and re jecting said test signature if C1 passes said first threshold value;
means for calculating a classifying function C, where:
C, = al ~ C1 where a1 is a weight given to said first evaluating function C1:
means for comparing said classifying function C, with a second threshold value, and rejecting said test signature if C, passes said second threshold value:
first means for comparing durations of said test and reference signatures, and effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature:
second means for comparing sequences of said temporal marks of said test and reference signatures and for coupling temporal marks of said test and reference signatures if and only if two corresponding temporal marks have between them a minimal temporal distance which is reciprocally the shortest between the sequences in question, and said minimal distance is shorter than a predetermined distance so that coupled temporal marks form a pair of characteristic segments of said test and reference signatures;
means for processing in an iterative manner remaining temporal marks, that have not been coupled, of said test and reference signatures by means of said first and second means for comparing until no characteristic segment is coupled:
means for calculating local intrinsic correlations of said Ve and V, values of said test and reference signatures for each of said pairs of characteristic segments, by WO 92/13816 ~ ~ a g 3 71 ' calculating a second evaluating function C2 where:

C2 - E piFC2i(RC2i) a [-1,1]
5 i=1 where FC21 ( RC2, ) is a f unction representative of the local intrinsic correlation of either said Ve or V, values for said pairs of characteristic segments where i indicates the component in question, and p, is a weight given to the particular component in question:
means for comparing C2 with a third threshold value, and rejecting said test signature if C2 passes said third threshold value;
means for calculating a classifying function Cb where:
Cd = aiCl + a,C2 where a, is a weight given to said second evaluating function C2: and means for comparing said classifying function Cb with a fourth threshold value, and rejecting said test signature if Cb passes said fourth threshold value. The symbol "E" means that the result of the precedent sum to the following interval defined by the numbers in square brackets. When either of the square brackets are turned toward the inside of the interval, it means the limit adjacent to the bracket is included in that interval. A square bracket turned away from the inside of the interval means the limit adjacent to the bracket is not included in that interval. For example, [0,1[ indicates an interval of 0 to 1, inclusive of zero and exclusive of one.
Also according to the present invention, there is provided a method for comparing a test handwritten signature with a reference signature where each of said test and reference signatures have been acquired by:
generating three electrical digital position signals I I ~1 I ~ r characterizing a trajectory of a handwritten signature by means of n + 1 samplings of period T, by means of a pencil provided with a point and an analog-to-digital tablet, said three signals being D,~ ( kT ) , D,, ( kT ) and D, ( kT ) where k = 0 , 1, 2, ... n, where Dx(kT) and DY(kT) are respectively position signals according to X and Y axes of a Cartesian reference with respect to time, and D,(kT) is an on/off signal indicating whether or not said point is contacting said tablet;
low-pass filtering said D~(kT) and D,,(kT) electrical signals;
taking the derivative of said D,~ ( kT ) and D" ( kT ) electrical signals for generating Vx(kT) and VY(kT) electrical components which represent respectively speeds of said point according to X and Y axes of a Cartesian reference;
calculating Ve(kT), V,(kT) and sign(kT) values from Vx ( kT ) and Vy ( kT ) values where Vo(kT) - ~Vx2(kT) + Vy2(kT) V (kT)V ((k+1)T)+V (kT)V ((k+1)T) Ve(kT) = sign(kT) * cos-1 x xV (kT)V ((k+1)T)y * T-1 v (kT)v ((k+i)T)-v ((k+1)T)Vy(kT) 3 o sign(kT) - sign sin-1 x y x Va(kT)Vo((k+1)T) calculating handwritten components and handwritten strings, where each of said handwritten components is delimited by two successive liftings of said point along said trajectory, and each of said handwritten strings is delimited by two successive portions of said trajectory where said V, value is higher than a predetermined angular speed value and where said Vo value is lower than a predetermined curvilinear speed value, said handwritten 2099~'~ 1 ~O 92/13816 , ~ PCT/CA92/00052 strings and components having beginnings and ends defining temporal marks along said trajectory by which duration of said handwriting signature is determined;
calculating simple dynamic parameters characterizing said test and reference signatures;
applying respectively a first predetermined rotation operator and a second predetermined rotation operator to said D"(kT) and D,,(kT) signals for correcting inclination of said trajectory and aligning a base line of said trajectory with a horizontal base line: and scaling said D,(kT) signal according to said X Cartesian axis, and scaling said D,,(kT) according to said Y Cartesian axis;
said method comprises steps of:
calculating variations of said simple dynamic parameters of said test signature with respect to said simple dynamic parameters of said reference signature, by calculating a first evaluating function C1 where:

C1 - E piFCli(RCii) E [0,1]
i=1 where FC1,(RCl,) is a function representative of the variations of a particular dynamic parameter where i indicates the parameter in question, and p, is a weight given to a particular parameter of said simple dynamic parameters;
comparing C1 with a first threshold value, and rejecting said test signature if C1 passes said first threshold value;
calculating a classifying function C, where:
Ce = al ' C1 where al is a weight given to said first evaluating function C1:
comparing said classifying function Ce with a second WO 92/ 13816 . , ,~
threshold value, and rejecting said test signature if C, passes said second threshold value:
comparing durations of said test and reference signatures, and effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature:
comparing sequences of said temporal marks of said test and reference signatures and coupling temporal marks of said test and reference signatures if and only if two corresponding temporal marks have between them a minimal temporal distance which is reciprocally the shortest between the sequences in question, and said minimal distance is shorter than a predetermined distance so that coupled temporal marks form a pair of characteristic segments of said test and reference signatures;
processing in an iterative manner remaining temporal marks, that have not been coupled, of said test and reference signatures by repeating said steps of comparing durations and comparing sequences until no characteristic segment is coupled;
calculating local intrinsic correlations of said Ve and V, values of said test and reference signatures for each of said pairs of characteristic segments, by calculating a second evaluating function C2 where:

C2 - E piFC2i(RC2i) a [-1,1]
i=1 where FC2, ( RC2, ) is a function representative of the local intrinsic correlation of either said Vo or Ve values for said pairs of characteristic segments where i indicates the component in question, and pi is a weight given to the particular component in question;
comparing C2 with a third threshold value, and rejecting said test signature if C2 passes said third ~,ICO 92/13816 ~ 0 9 9 3 71 p~/CA92/00052 threshold value:
calculating a classifying function Cb where:
Cb = alC1 + a=C2 where a, is a weight given to said second evaluating function C2; and comparing said classifying function Cb with a fourth threshold value, and rejecting said test signature if Cb passes said fourth threshold value.
In the following description and claims, D,~ ( kT ) , D,, ( kT ) and D, ( kT ) are also ref erred to as D= ( t ) , D" ( t ) and D,(t), and (kT) can be replaced by (t). Also, to facilitate the reading of the text, the expression (t) is sometimes omitted.
The objects, advantages and other features of the present invention will become more apparent upon reading of the following non restritive description of preferred embodiments thereof, given for the purpose of examplification only with reference to the accompanying drawings.
Figure 1 is a schematic bloc diagram illustrating different elements of an apparatus for comparing a test signature with a reference signature to verify the test signature according to the present invention;
Figures 1A through 1F are a flowchart showing the various steps according to the invention:
Figure 2 is a diagram illustrating the frequency response of a low-pass filter that can be used in the present apparatus:
Figure 3 is a table illustrating the characteristics of two analog-to-digital tablets that can be used with the present invention;
Figure 4 is a table illustrating the transmission 2 U'9~.3.7;1. ~ ,, 2 l0 format of the output of one of the analog-to-digital tablet presented in Figure 3;
Figure 5 is a table illustrating the transmission format of the output of the other analog-to-digital tablet presented in Figure 3;
Figure 6 is a diagram illustrating the trajectory of a movement after that it has been filtered;
Figure 7 is a diagram illustrating the trajectory of a movement after that it has been filtered and l0 normalized;
Figure 8 is a diagram illustrating the displacement according to the X axis of the movement shown in Figure 6, versus time;
Figure 9 is a diagram illustrating the displacement according to the X axis of the movement shown in Figure 7, versus time;
Figure 10 is a diagram illustrating the displacement along the Y axis of the movement shown on Figuxe 6, versus time;
Figure 1i is a diagram illustrating the displacement along the Y axis of the movement shown on Figure 7, versus time;
Figure 12 is a diagram illustrating the Cartesian speed Vx of the movement shown on Figure 6, versus time;
Figure 13 is a diagram illustrating the Cartesian speed VY of the movement shown on Figure 6, versus time: ' Figure 14 is a diagram illustrating the curvilinear speed Vs of the movement shown on Figure 6, versus time;
Figure 15 is a diagram illustrating the angular speed Vs of the movement shown on Figure 6, versus time;
Figure 16 is a diagram illustrating the signal representative of the lifting of the pen of the analog-to-digital tablet shown on Figure 1;
Figure 17 is a diagram illustrating dynamic segmentation according to the present invention;
Figure 18 is a diagram illustrating an exponential WO 92/13816 Df~~ ~~,i PCT/CA92/00052 function F(X) with respect to X for different values of the growth factor n:
Figure 19 is a diagram illustrating a function FC(RC) with respect to RC:
Figure 20 is three tables illustrating how personalized threshold values are determined from three reference signatures:
Figure 21 is a table illustrating the parameters of the function FC(RC) that have been found preferable for a particular case:
Figure 22 is a table illustrating preliminary test results for a first group of signers:
Figure 23 is a table illustrating preliminary test results for a second group of signers;
Figure 24 is a diagram illustrating a general model of rapid-aimed movement: and Figure 25 is two types of log-normal velocity profile v(t) versus time.
DETrrILD DSSCRI~'T_gt~1 OF THE DR~WIHGS
First we will describe how a signature is acquired, and then after we will describe how a test signature is verified with respect to a reference signature.
The acquisition and the processing of data relating to a handwriting movement, can be divided in two parts. The first part is concerned with acquisition, filtering and derivation of the data provided by the tablet, and the second part is concerned with pre-processing of the data obtained from the first part. The acquisition of the coordinates can be made from two different types of input devices. First, they can be provided from the tablet, and second they can be provided from the disc unit which contains data relating to the acquisition of previous movements. The processing of the data comprises the following operation: converting from a Cartesian reference to an intrinsic reference, dynamic segmentation, extraction of simple dynamic parameters, and pre-processing of the image formed by the movement.
During the acquisition of a handwriting movement, the data transmitted by the tablet characterize the trajectory of the point of the pencil by means of a sampling. This sampling is done according to fixed frequency and resolution and with respect to a Cartesian reference oriented with respect to the positioning of the tablet. Also, the acquisition mode of the tablet is set to "proximity" as it will be explained in the description of Figure 3.
Validation of the acquisition is done when the point of the pencil has moved along a minimal of 0.025 cm with an acquisition time superior to 0.5 second. The maximal duration of an acquisition is 9.9 seconds. It is essential to know the sampling frequency and the resolution of the tablet for each acquisition so that the signature can be properly classified. Different studies have shown that the frequency spectrum of a signature has a bandwith of 0 to 20 Hz. Thus, a sampling frequency of at least 100 Hz would be sufficient. A stop is characterized by a displacement inferior to .008 cm.
Even if we use a resolution of 393.7 x dotsjan, it is necessary to filter the signal by a low-pass filter to reduce the acquisition noise. This low-pass filter should have a bandwidth of 20 to 50 tiz.
Referring now to Figure 1, there is shown the apparatus for digitizing and segmenting a handwriting movement, and for comparing a test signature with a 3o reference signature. This apparatus comprises an electrical transducer for generating three electrical digital positions signals characterizing a trajectory of the handwritten signature by means of n + 1 samplings of period T. The transducer includes a pencil (not shown) provided with a point and an analog-to-digital tablet 2. The three signals are D"(kT) , DY(kT) and D,(kT) where k = 0, 1, 2, . . , n, where D, ( kT) and Dy ( kT ) are respectively position signals according to X and Y axes of a Cartesian reference with respect to time, and D,(kT) is an on/off signal indicating whether or not the point is contacting the tablet. The tablet 2 has a sampling frequency of 119.5 Hz and a resolution of 393.7 dots/om.
The apparatus also comprises means for low-pass filtering the D,(kT) and Dy(kT) electrical signals, this means for low-pass filtering being performed by the processing unit 4. This means for low-pass filtering is a l0 low-pass filter having a bandwidth of 20 to 50 Hz.
Referring now to Figure 2, there is shown the low-pass filter which has been found preferable. This low-pass filter is of the GAUSSIAN type. The low-pass filter has a predetermined time function F,(t~) where:

P(ti_3) + 3P(ti_2) + 6P(ti+1) + 7P(ti) + 6P(ti+1) + 3P(ti+2) + P(tl+3) P2~ti) This low-pass filter has also a predetermined transfer function H, ( w ) where 7 + 12 cos (w) + 6 cos (2w) + 2 cos (3w) H2 (w) a 27 The present apparatus also comprises means for deriving the D,(kT) and Dy(kT) electrical signals by predetermined time and transfer functions for generating V, and Vy electrical components which represent respectively speeds of the point according to X and Y axes of a Cartesian reference. This means for deriving being performed by the processing unit 4. Derivation allows the calculation of Cartesian speeds from the Cartesian coordinates that have been sampled. These speeds provide more information about the dynamic aspects of the signature. This means for deriving is a filter having a predetermined time function WO 92/13816 ~ DI ~~9~~~~~~~ PCT/CA92/00052 F5' ( is ) where N
F5'(ti) - ~ ~Kti_K
K=-N
sin (nIC/N) sin (K~c) ~c cos (K~rc) to where CK = -~-~-- --~-- - and N=9 ( ~r K/N ) K K
This means for deriving has also a predetermined transfer function H6(e) where:
N sin2(nfC/N) s~~ ~c cos (Kc~c) 2o H5(~) 2K~1 (n K/N) K K sin (K~u), 2xF
where: ~c = c and N = 9 F
S
FQ is a cut off frequency of 20 Hz, and F, is a sampling frequency of 119.5 Hz.
The apparatus also comprises means for calculating Ve ( kT ) , V, ( kT ) and sign ( kT ) values from the V, ( kT ) and Vy ( kT ) values where:
Yo(kT) = YX2(kT) + Yy2(kT) Ve(kT) = sign(kT) * cos'1 Yx(kT)VX((k+1)T)+Vy(kT)Vy((k+1)T) * T-1 4 o Va(kT)Vo((k+1)T) _ V (kT)V ((k+1)T)-V ((k+1)T)Yy(kT) sign(kT) - sign sin 1 4 5 Va(kT)Vo((k+1)T) The next step is the dynamic segmentation step 50 which consists in calculating handwritten components and .
handwritten strings. In order to calculate these handwritten components and handwritten strings four threshold values have to be set. The first of these threshold values is the predetermined angular speed value 5 which is preferably 50 rad/s. The second of these values is the predetermined curvilinear speed value which is preferably V,/2 cm/s. where V, is the average curvilinear speed of the pencil point during the trajectory. The third of these values is the minimal period of time of a 10 handwritten string which is preferably 0.05 s. The fourth of these values is the minimal period of time of a lifting of the pencil point which is preferably 0.03 s.
To this effect, the apparatus comprises means for calculating handwritten components and handwritten strings 15 where each of the handwritten components is delimited by two successive liftings of the point along the trajectory of the movement, and each of the handwritten strings is delimited by two successive portions of the trajectory of the movement where the V, value is higher than the predetermined angular speed value and the V, value is lower than the predetermined curvilinear speed value. This means for calculating is performed by the processing unit 4.
The next step is the calculation of four simple dynamic parameters. These parameters allow a better classification of the signature. The percentages of the second, third and fourth dynamic parameters are normalized according to the duration of the whole duration of acquisition of a signature with liftings of the pencil point. The stops are characterized by a displacement inferior to a predetermined threshold vale which can be preferably of 0.008 cm by sampling period. This means that the pencil point is considered as being immobile if the speed is inferior to 0.8 cm/seconds. These threshold values have been fixed to the above-mentioned values because of the noise generated by the tablet. Of course, these threshold values can vary with the use of another tablet having different characteristics.

,, .

To this effect, the apparatus comprises means for calculating, by means of the D,(t), the first simple dynamic parameter consisting of a period of time of the trajectory during which the point of the pencil is contacting the tablet 2; means for calculating, by means of D,(t), the second simple dynamic parameter consisting of a percentage representative of a period of time of the trajectory during which the point is lifted: means for calculating, by means of the D,~ ( t ) and Dy ( t ) , the third simple dynamic parameter consisting of a percentage representative of a period of time of the trajectory during which the point is stopped;
and means for calculating, by means of the V, value, the fourth simple dynamic parameter consisting of a percentage representative of a period of time of the trajectory during which the V, value is positive. All the above-mentioned means for calculating are performed by the processing unit 4.
The next step is concerned with the processing of the image formed by the trajectory of the movement. This processing of the image of the movement consists of a rotation of the trajectory according to its base line, and a normalization of the dimensions of the trajectory by a scaling. The rotation of the trajectory is needed to correct the effects of the orientation of a trajectory according to the Cartesian reference of the tablet. The base line of a trajectory is estimated by establishing a straight line of regression applied to local minimums according to the Y Cartesian axis. The straight line indicates the orientation of the trajectory with respect to the Cartesian reference. A first rotation is made by applying a rotation operator to correct the inclination of the trajectory, and a second iteration is made so that the base line of the trajectory is aligned with a horizontal base line.
It has been rioted that the dimensions of the signature of one person vary with a great magnitude from time to time. A normalization of the dimensions of the WO 92/13816 ~ D 9 3 3 ? 1 . P~/CA92/00052 movement by means of a scaling can correct these variations.
The dimensions of the normalized trajectories will be from 0 to 10,000 along the X Cartesian axis, and have a value of 0 at the base line of the trajectory along the Y Cartesian axis.
To this effect, the apparatus comprises calculating means for applying respectively a first predetermined rotation operator and a second predetermined rotation operator to the D,~ ( t ) and Dy ( t ) signals for correcting inclination of the trajectory and aligning a base line of the trajectory with a horizontal base line: and calculating means for scaling the D,(t) signal according to the X
Cartesian axis with values varying from 0 to 10,000 and for scaling the D,.(t) according to the Y Cartesian axis with a value of 0 when Dy(t) signal crosses the base line of the trajectory. Again, all these calculating means are performed by the processing unit 4.
To complete this processing unit 4, there is provided a keyboard 6, a monitor 8 and a disc unit 10. The processing unit 4, the keyboard 6, the monitor 8 and the disc unit 10 form a microcomputer 12.
The analog-to-digital tablet 2 is of the electromagnetic type. This tablet 2 comprises a receiving surface and an emitting pencil (not shown) provided with a point detector and a command button. The function of this tablet 2 is to sample according to a constant frequency the handwriting movement of a user. The frequency of the tablet must be very stable to allow extraction of dynamic characteristics such as, for example, displacement speeds according to a Cartesian reference.
The interface device forming the communication link between the tablet 2 and the microcomputer 10 is of the serial type. Accordingly, it is important to know the format of the output signal of the tablet 2. It has to be noted that this format is variable, thus allowing several modes of operation in which different parameters can be modified, such as the resolution of the tablet, the sampling 2 n 9'9v3~7.1~.

frequency of the tablet, the transmission speed of the information generated by the tablet to the microprocessor, and the presence of parity.
The keyboard 6 is an input device comprising several control and alphanumeric keys. The keyboard allows a selection of different commands available with the possibility to enter personal information concerning the person under test. The keyboard associated with its serial controller can be of the IBM PC", AT, or extended type.
The monitor 8 is a video display allowing the display of the commands that are available, instructions and results associated with operations that have been performed.
The display can be of the Monochrome Adapter, Color Graphic Adapter, Enhanced Graphic Adapter of Video Graphic Array type.
The disc unit 10 is of the magnetic type. This unit 10 allows the storage of the software as well as the different data associated with the system. The disc unit 10 has a minimum capacity of 20 Mb. Each acquisition index includes the information relating to the previous acquisition of a movement by the same user. The disc unit 10 is connected to its controller in a regular manner known in the art.
The processing unit 4 allows the operation of the software. This operation can be divided in three parts.
The first part is concerned with the control of the inputs which are provided by the tablet 2, the keyboard 6, and the disc unit 10. The second part is concerned with the processing of the information itself. And the third part is concerned with the command outputs for the monitor 8 and the disc unit 10.
The microprocessor of the processing unit is an INTEL 80286 or 80386'" having an internal clock of at least 12 MHz. This microprocessor which constitutes the central microprocessor is connected to a mathematical processor which is an INTEL 80287"' with a fast RAM memory (100 ns) and a serial port RS-232 for the connection of the tablet 2.

f!'0 92/13816 ~ ~ ~~ ~ ~, ; PCT/CA92/00052 The operating system for this microcomputer 12 is a MS-DOS
Version 3.0"' or a more recent version.
For example, the present system can be implemented with the following material: a central microprocessor 80286(12 MHz), an additional mathematical microprocessor 80287(8 MHz), a RAM memory of 512 Kb(100 ns), a serial port RS-232, an internal clock with a calendar, a keyboard of the IBM PC'" type, a hard disc of 20 Mb and its controller ( 80 ms), a monitor with a video controller Monochrome Adapter, a SUMMAGRAPHIC MM1201"' or PENCEPT 300"' tablet, and a MS-DOS
Version 3.0 operating system.
The present system can be also implemented with the following material: central microprocessor 80386 (16 MHz), an additional mathematical microprocessor 80287(8 MHz), a RAM memory of 640 Kb + 256 Kb (100 ns), two serial ports RS-232 + one parallel port, internal calendar and clock, a keyboard of the extended type, a hard disc of 40 Mb and its controller (28 ms), a monitor with a video controller Enhanced Graphic Adapter, a SUMMAGRAPHIC MM1201 and PENCEPT 300 tablets, a MS-DOS Version 3.10'" operating system, an C microsoft version 5.10"' compiler, and a CODE
EXPERT Version 1.11"' software.
Among the different acquisition modes available, it has been decided to use the proximity acquisition mode, which means that the sampling and the transmission of the information from the tablet to the microcomputer 12 is done only if the position of the pencil point is below 2.5 cm of the surface of the tablet 2.
The present system can be used with two types of tablets which are the SUrB~IAGRAPHIC MM1201 tablet and the PENCEPT 300 tablet. These tablets have several characteristics, which comprise, among others, the proximity which is the maximal distance below which the information is considered valid, this distance being measured perpendicularly to the surface of the tablet; the precision which relates to the error associated with the difference of position between the measured position and the actual . ~.. v ~- ~ 20 position of the pencil; the noise which relates to the error associated with fluctuations of position, measured during successive acquisition of the same position when the pencil is maintained at this position; and the constancy which relates to the error associated with the difference of position measured during the repetition of the same experience.
Figures 1A through 1F are a flowchart showing the various steps according to the invention.
Referring now to Figure 3, there are shown the principal characteristics of the SU1~IAGRAPHIC I~i1201 and PENCEPT 300 tablets in view of the characteristics discussed above.
Referring now to Figure 4, there is shown the transmission format of the output of the SUI~iAGRAPHIC
1~I1201 tablet. The X13-XO represents the X co-ordinates, where XO is the least significant bit. The Y13-YO
represents the Y co-ordinates where Yo is the least significant bit. When DWN = 1, this means that the point of the pencil is in a position to operate. When SID = 1, this means that the command button of the pen has been pressed.
When Prx = 0, this means that the point of the pencil is out of the operational proximity, and when this value equals 1, this means that the point of the pencil is inside the operational proximity.
Referring now to Figure 5, there is shown the transmission format of the PENCEPT 300 tablet. The X13-XO
represent the X co-ordinates where XO is the least significant bit, and the Y13-YO represents the Y co-ordinates where YO is the least significant bit. The Ax9-Ax0 represents the X angle where Ax0 is the least significant bit, and the Ay9-Ay0 represents the Y angle where Ay0 is the least significant bit, the value of 512 being representative of a vertical position.
The values of Dwn, Sid and Prx have the same meaning that the one described for the Figure 4.
Referring now to Figure 6, there is shown a hand-1310 92/13816 ~ ~ PCT/CA92/00052 writing movement detected by the tablet and filtered by the low-pass filter of the GAUSSIAN type which has the frequency spectrum shown on Figure 2. The X axis is representative of the Dx value, and the Y axis is representative of the Dy value. This movement has not been normalized.
Referring now to Figure 7, there is shown the trajectory presented on Figure 6 after that it has been normalized. As described earlier, this normalization consists of a rotation of the trajectory with a scaling.
Referring now to Figure 8, there is shown the variations of the Dx value shown on Figure 6, with respect to time.
Referring now to Figure 9, there is shown the variations of Dx value shown on Figure 7, with respect to time.
Referring now to Figure 10, there is shown the variations of Dy value of Figure 6, with respect to time.
Referring now to Figure 11, there is shown the variations of Dy value of Figure 7, with respect to time.
When comparing Figure 10 and Figure 11, it can be noted that there is an important variation of the value of Dy along the Y axis.
Referring now to Figure 12, there is shown the Cartesian speed Vx of the trajectory shown on Figure 6, with respect to time. As explained earlier, this Vx is obtained by means of a derivation filter.
Referring now to Figure 13, there is shown the Cartesian speed Vy of the trajectory shown on Figure 6, with respect to time.
Referring now to Figure 14, there is shown the curvilinear speed Vo of the trajectory shown on Figure 6, with respect to time.
Referring now to Figure 15, there is shown the angular speed Vs of the trajectory shown on Figure 6, with respect to time.
Referring now to Figure 16, there is shown an example of the signal indicating the state of the pencil e<i..v. w.~ cra-aWt.W tt.v . . ~.- a-~~ : '?l: 1~ : +1 0l~ 845 7874, .~~..;~
ti9 '?a3~~-~8a:.#10 ~ I
,1.
~~99371 point with respect to time. When the pencil point is contacting the tablet, the amplitude of the signal is equal to 4 which is indicative of an ON signal.
Referring now to Figure I7, there is shown, as an (5 example, the result of dynamic segmentation with respect to I time. In this example, the trajectory has been divided in four handwritten strings HS1, H52, HS3 and HS4 and two handwritten com onents HC1 and HC2.
The handwritten components HCl and HC2 are separated by a lifting of the pen ~.0 Lp. The first handwritten component is composed of three l handwritten strings HS1, HS2 and HST which terminate at T"
T, and T,. The second handwritten component HC2 is constituted of only one handwritten string HS4 which terminates at T, .
l Now concerning the verification of a signature, i~
consists oP the acquisition of a test handwriting signature, and the verification of this test signature. This l l verification is made wer three distinct levels. A first ' level consists in calculating the variations of the simple l 0 dynamic parameters of the test signature with respect to the l corres ondin P g parameters of the reference signature. The second Level of verification consists in calculating I intrinsic local correlation between portions of the test signature velocit with corres ondin y p g portions of the ~5 reference signature velocity. The third level of l verification consists in calculating distances between the test signature image and the reference signature image Dy dynamic pattern matching. These levels of verification are based on a discriminating function determined by threshold 0 values which are preferably personalized threshold values that are calculated from the acquisition of ~oore than one reference signatures, If necessary, a correction of the l seg~sentation of the test signature is done to improve its classification. _ Referring now again to Figure 1, there is shown the apparatus for comparing a test signature with a reference signature Where each of the test and reference l . -i SUBSTITUTE.Si~~E~
..
. . . .

~O 92/13816 ~ ~ ~ ~ ~ PCT/CA92/00052 signatures have been acquired, as described earlier, by generating three electrical digital position signals characterizing a trajectory of a handwritten signature by means of n + 1 samplings of period T, by means of a pencil provided with a point and an analog-to-digital tablet, the three signals being Dx ( kT ) , D,, ( kT ) and D, ( kT ) where k = 0 , 1, 2, ... n:
low-pass filtering the D,(kT) and D,,(kT) electrical signals;
taking the derivative of the D, ( kT ) and D,, ( kT ) electrical signals for generating Vx(kT) and Vy(kT) electrical values;
calculating V,(kT), V,(kT) and sign(kT) values from V,~ ( kT ) and VY ( kT ) values where Va(kT) m Vx2(kT) + Vy2(kT) V (kT)V ((k+1)T)+V (kT)V ((k+1)T) 2o V8(kT) = sign(kT) * cos-1 x xV (kT)V ((k+1)T)y * T-1 o a V (kT)V ((k+1)T)-V ((k+1)T)V (kT) sign(kT) = sign sin-1 x y x y Vo(kT)Vo((k+1)T) calculating handwritten components and handwritten strings, the handwritten strings and components having beginnings and ends determining temporal marks along the trajectory by which duration of the handwritten signature is determined;
calculating, by means of the D~(t), a first simple dynamic parameter Pl consisting of a period of time of the trajectory during which the point of the pencil is contacting the tablet;
calculating, by means of D=(t), a second simple dynamic parameter P, consisting of a percentage representative of a period of time of the trajectory during which the point is WO 92/13816 ~ ~ ~. , , ~ ~ PCT/CA92/00052 lifted;
calculating, by means of the Dx ( t ) and D,, ( t ) , a third simple dynamic parameter P, consisting of a percentage representative of a period of time of the trajectory during which the point is stopped:
calculating, by means of the V, value a fourth simple dynamic parameter P, consisting of a percentage representative of a period of time of the trajectory during which the V, value is positive:
applying respectively a first predetermined rotation operator and a second predetermined rotation operator to the D,(t) and DY(t) signals for correcting inclination of the trajectory and aligning a base line of the trajectory with a horizontal base line; and scaling the D,(t) signal according to the X Cartesian axis, and scaling the D,.(t) according to the Y Cartesian axis.
The apparatus for comparing a test signature with a reference signature comprises means for calculating variations of the simple dynamic parameters of the test signature with respect to the simple dynamic parameters of the reference signature, by calculating a first evaluating function C1 where:

C1 - E piFCli(RCii) a [0,1]
i=1 where FCli(RCls) is a function representative of the variations of a particular dynamic parameter where i indicates the parameter in question, and pi is a weight given to a particular parameter of the simple dynamic parameters;
means for comparing C1 with a first threshold value, and rejecting the test signature if C1 passes the first threshold value; means for calculating a classifying function C, where:
Ca = al ~ C1 ~'O 92/13816 where al is a weight given to the first evaluating function C1; and means for comparing the classifying function C, with a second threshold value, and rejecting the test signature if Ca passes the second threshold value. All of the above-5 mentioned means for calculating and means for comparing are performed by the processing unit 4.
To compare a reference signature with a test signature, the temporal marks of each signature have to be adapted. A correction of the temporal marks of each 10 signature is done by deleting temporal marks that are not shared with the corresponding signature. Thus, concatenation of certain temporal marks will be done to form a group of characteristic segments of the test and reference signatures. This coupling is made by dynamic pattern 15 matching by effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature, and by concatenating characteristic segments by rejecting liftings of the pen that are not shared by both signatures.
20 These characteristic segments are determined by dynamic pattern matching which consists in calculating a distance d based on the position and the duration of the characteristic segments, where:
v 2 5 d = d'ppS + ( 2 * dpUR ~ s where d~ is the temporal position difference of the beginning of the corresponding pen liftings, and d~,R is the duration difference of the corresponding pen liftings.
To this effect, the apparatus comprises first means for comparing durations of the test and reference signatures, and effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature; second means for comparing sequences of the temporal marks of the test and reference signatures and for coupling temporal marks of the test and reference signatures WO 92/13816 2 U 9 9 ~ 7 f ~J ~ j ["" P~/CA92/00052 if and only if two corresponding temporal marks have between them a minimal temporal distance which is reciprocally the shortest between the sequences in question, and said minimal distance is shorter than a predetermined distance so that coupled temporal marks form a pair of characteristic segments of the test and reference signatures; and means for processing in an iterative manner remaining temporal marks, that have not been coupled, of the test and reference signatures by means of the first and second means for comparing until no characteristic segment is coupled. The above-mentioned first and second means for comparing, and the means for processing are performed by the processing unit 4.
The apparatus also comprises means for calculating local intrinsic correlations of the Ve and V, values of the test and reference signatures for each of the pairs of characteristic segments, by calculating a second evaluating function C2 where:

C2 - E piFC2i(RC2i) a [-1,1) i=1 where FC2s (RC2, ) is a function representative of the local intrinsic correlation of either the Vo or V, values for the pairs of characteristic segments where i indicates the component in question, and p, is a weight given to the particular component in question; means for comparing C2 with a third threshold value, and rejecting the test signature if C2 passes the third threshold value; means for calculating a classifying function Cb where:
Cb = aiCl + a2C2 where a2 is a weight given to the second evaluating function C2; and means for comparing the classifying function Cb with a fourth threshold value, and rejecting the test signature WO 92/13816 ~ 0 9 9 3 71 P~/CA92/00052 if Cb passes the fourth threshold value. Again, the above-mentioned means for comparing and means for calculating are performed by the processing unit 4.
The apparatus also comprises means for calculating variations of Dx and DY components of the test and reference signatures for each of the pairs of characteristic segment, by calculating a third evaluating function C3 where:
C3 = FC3(RC3), a[-1,1]
where FC3(RC3) is a function representative of variations of Dx and D,, components for the pairs of characteristic segments: means for comparing C3 with a fifth threshold value, and rejecting the test signature if C3 passes the fifth threshold value; means for calculating a classifying f unction C~ where C~ = alC1 + aZC2 + a,C3 where a, is a weight given to the third evaluating function C3; and means for comparing the classifying function C~ with a sixth threshold value REJ, and either rejecting the test signature if Co is higher than the sixth threshold value REJ, or emitting a signal indicating that no conclusive result has been achieved if Ca is within a first range of values limited by REJ and a threshold value UNC, or accepting the test signature if Ca is lower than UNC. Again, the above-mentioned means for calculating and means for comparing are performed by the processing unit 4. The processing unit 4 rejects the test signature when the first evaluating function C1 equals zero and the second evaluating function C2 equals 1, because it is known that two signatures cannot be exactly the same. Also, for the same reason, the processing unit 4 rejects the test signature when the first evaluating function C1 equals zero and the third evaluating function C3 equals zero.
Each of the classifying functions C~, Cb and C~ is WO 92/13816 ~ U 9 9 3 71 PCT/CA92/00052 formed by the linear combination of weighed functions C1, C2 and C3 associated respectively with the levels of verification. This classifying function is:

C - E aiCi i=1 These functions Cl are discriminating functions based on an exponential function which is:
(eh(x) _ 1) N
F(x) _ + cte a[cte, cte + 1]
(e - 1) where h(x) is a linear function with respect to x which is comprised in the interval [0,1], N is a growth factor, and cte is a shift.
Referring now to Figure 18, there is shown an example of this function where h(x) = 1-x, cte = 0, and N =
0, l, 2, 3, 0.5. The variation effect of the factor "N" on the level of growth is clearly shown.
Referring now to Figure 19, there is shown four ranges of possible results associated with the functions C,.
Firstly, if F(x)SSC" then the test signature is immediately rejected; secondly, if SC,<F(x)<SCE, then a penalty weight is associated with this result; thirdly, if SCE<_F(x)SSC", then a compensation weight is associated with this result; and fourthly, if SC"<F(x) , then the test signature is immediately accepted. SCR is a rejection threshold value, SCE is an equilibrium threshold value, and SC, is an acceptation threshold value. The evaluation of these threshold values SCR, SCE and SC,, are based on experimentation.
Preferably, these threshold values SCR, SCE and SC,, can be based on personalized threshold values determined from several reference signatures. To determine these personalized threshold values, the acquisition of a group of xagg371 ,CVO 92/13816 PCT/CA92/00052 three reference signatures is done. The acquisition of each of these reference signatures is done in the regular manner as described earlier in the disclosure. An acquisition index is created for each of these reference signatures, allowing an analysis of the variations between each of these reference signatures.
Then, personalized threshold values are determined from this analysis. These personalized threshold values allow an auto-adaptation of the discriminating functions C, with respect to the stability of the reference signatures that are provided.
The determination of these personalized threshold values is based on the worst results of verifications obtained by comparing the three reference signatures among themselves, taken two by two. Each of these reference signatures is considered, at one time of the comparison, as a reference signature, and at another time, as a test signature. Seven personalized threshold values SP1" SP1"
SP1,. SP1" SP2l, SP2, and SP3 can be determined. SP1, represents a maximum variation of the duration of the acquisition of a signature without lifting of the pen, SP1, is a maximum variation of the normalized percentage of the duration of the stops of the pen, SP1, is a maximum variation of the normalized percentage of the duration of the liftings of the pen, SP1, is a maximum variation of the normalized percentage of the duration during which V, is positive, SP2, is the lower intrinsic local correlation of the curvilinear speed V" SP2, is the lower intrinsic local correlation of the angular speed V" and SP3 is the greater distance between two compared signatures, obtained by dynamic pattern matching.
Referring now to Figure 20, there is shown in the upper table, the average values of Pl, P" P, and P,. In the middle table, there is shown the variations of the parameters. The upper array indicates the level of verification where these variations are determined. The first column indicates the six permutations possible as WO 92/13816 ~ ~.~ " PCT/CA92/00052 there are three reference signatures. In the lower table, there is shown the personalized threshold values that are determined from the middle table. As it can be seen, these personalized threshold values are determined from the worst 5 results obtained in the middle table.
Now, there will be described the means for calculating RC1, and FC1,(RC1,) . As there are four simple dynamic parameters, the term "i" of the expression RC1, varies from 1 to 4.
10 The apparatus comprises means for calculating RCiI, RC1" RC1, and RC1, where RC1, _ ( P, of the test signature - P, of the reference signature)/P, of the reference signature;
RC1= = P, of the test signature - P= of the reference 15 signature;
RCl, = P, of the test signature - P, of the reference signature: and RC1, = P, of the test signature - P, of the reference signature. The above-mentioned means for calculating is 20 also performed by the processing unit 4.
The apparatus also comprises means for calculating FC1, ( RC1, ) for each of the four dynamic parameters where RC1, is the variation of a particular dynamic parameter, where:
FC1, (RC1, ) - 0 if RC11<-SC1" where SCla, is a seventh 25 predetermined threshold value for a particular dynamic parameter, FC1,(RC1,) _ ((eh(RCls)- 1)/(e - 1))"i if SClE,<RC1,<SC1R, where SC1R, is an eighth predetermined threshold value for a particular dynamic paramater, or 30 FC1, ( RC1, ) - 1 if SC1R,_<RC1,; where h ( RC1, ) - ( RC1, -SClt, ) / ( SC1R, - SC1$, ) , and where Ni is a growth f actor f or a particular dynamic parameter: and means for generating a signal indicative of a rejection of the test signature if FC1,(RC1,) - 1. The above-mentioned means for calculating unit 4. _._. _._. _._ .... _.
__... _ . ___ ___. .. __ ..
_- .___._.__..__ _. _ _T~ -t~~.~-.._v~~

ftCl. ~U~:EP.4-YtIE.'vC:HE\ ~_> .~- 5-93 : ~1 : 16 : +1 X14 i345 7E374-. *49 39 ~?~39~Ei~:~l1 l I
~~9371 . .

and means for generating are performed by the processing unit 4.
I In the case where the equilibrium threshold value SC1=1 and the rejection threshold value SCl,s are determined by personalized threshold values, SClu = MAX(cte, p(SCly1)) E [0$,SCl"(, and SCl~ - MAX(cte,q(SCipi)) a )SChi,~~.
g ( SCipi ) and q ( SClD1 ) are 1 inear functions of the type ' y = a - SClp~ + b, where SClp, is the personalized threshold value "l" which is respectively SP11, SPl~, SPl, or SP1,. a, b and cte are predetermined constants. The threshold values l SCE, and SC,u can also be set from precedent experiences.
l The local correlation is an algorithm that j measures the similarity between two signals with respect to ' their coefficient of linear correlation. This local correlation is applied to Ve and V, values for each pai~f of characteristic segments. The wanted result is the weighed summation of its application:
N
RC21 = . ~ Cycj . 1j , ~[-1,1J
1r j=1 N

RC22 =_ . E CVe~ . 1~ , a[-l, l]
1r j=1 where RC21 is the intrinsic local correlation of the curvilinear speed Vo, RC2, is the intrinsic local correlation of the angular speed V" N is the number of characteristic segments , 1r is the total number of samples for obtaining the ( reference signature, 1j is the number of samples for obtaining a particular characteristic segment identified by "7". ~.i is the partial intrinsic local correlation of the I 40 curvilinear speed V" and Cv" is the partial intrinsic local correlation of the angular speed V" where:
SIIBS~'i~'U~'~ ~~~~-~

KC.v . wv : t~r:~-st~e~..writ.., 'k- ~-9.i : ' 1 : 1 r . +1 a 14 Li45 7fi i4- +4J 89 '?3994465 : * l:
i ~09937~

COVARai(K) - L(K) . E (VaR(t) - VaR) ~ (VaT(t) VaT) t where K is a phase shifting between the signals, L(x) is a shared portion of the signals with respect to the phase shifting R, V",(kT) and Va,.(kT) are respectively the curvilinear speeds of the reference and test signatures, V,s 1 and V,.s are respectively the average curvilinear speeds of the reference and test signatures, and VAR"~i and V~R~, are respectively the variances of the curvilinear speed of the reference and test signatures, where:
vARQRi = ~ (VOR(t~ VaR)Z
t VARaTi - ~ (VaT(t) ' VaT)2 t Similar ea3.culations can be done for calculating CV", with respect to intrinsic angular speeds V" and V,r.
Now, there will be described the means for calculating RC21 and FC2s(RC2s) where "if' varies from 1 to 2.
The apparatus comprises means for calculating RC21 and RC2=
0 where:
N
v 1 RC21 = 1 . E CVo~ - 1j , E[-l,l~
r ~=1 N

RC22 = . E CV$j . 1~ , 6[-1,1J
1r _ j=1 where N is the number of pairs of characteristic segments, 1= is the number of samples used for acquiring the reference WO 92/13816 ~ ~ ~ ~ ~ PCT/CA92/00052 signature, j identifies a particular pair of the pairs of characteristic segments , 1 j is the number of samples used for acquiring a particular segment of the reference signature, CVe~ is a partial intrinsic local correlation of the Ve value for a particular pair of the pairs of characteristic segments, and CV,~ is a partial intrinsic local correlation of the Va value for a particular pair of the pairs of characteristic segments. The above-mentioned means for calculating is performed by the processing unit 4.
The apparatus also comprises means for calculating FC2, ( RC2, ) for each of the Ve and V, values of the pairs of characteristic segments where RC2, is an intrinsic local correlation of either the Ve or V, value for the pairs of characteristic segments, where:
FC2, ( RC2, ) - 1 if RC2,<_SC2R, where SC2R, is a ninth predetermined threshold value, FC2,(RC2,) - ( (eh1(RC2,)- 1)/(e - 1) )"l' if SC2"<RC2,<SC2~, where SC2E, is a tenth predetermined threshold value, h2 ( RC2, ) -FC2,(RC2,) _ ( ( (e 1)/(e - 1) )"'s- 1) if SC2E,SRC2,<SC2", or FC2, ( RC2, ) - -1 if SC2"5RC2, where SC2" is an eleventh threshold value; where hi ( RC2, ) - ( SC2s, - RC2, ) / ( SC2e, -SC2", ) , h2 ( RC2, ) - ( SC2" - RC2, ) / ( SC2" - SC2e, ) , and N1 i and N2i are predetenained growth factors: means for generating a signal indicative of a rejection of the test signature if FC2,(RC2,) = 1; and means for generating a signal indicative of an acceptation of the test signature if FC2,(RC2,) - -1.
The above-mentioned means for calculating and means for generating are performed by the processing unit 4.
In the case where the equilibrium threshold value SC2t" the rejection threshold value SC2R, and the acceptation threshold value SC2,s are determined by personalized threshold values, m - . p ~i-~'~~~x-r~~-r--- -SC2Ri. _ MIN ( cte ,, q.(.SC~PS-) ) _ _ . ~.~..~..~.gC26s-(-~ and.. ..
.._.._.. ..
_._. ..~._._-.-. .._.~a~~~ . .. . .. . .. ~.. . . . _ w, ..__ iW'. vU~:EP4-HL'E.'aCHE\ '? . .~- ~-,c.~3 : '01:17 . +1 014 84~ 7874- +4g 89 '?39944Eiu:#13 l ..

SC2~ = MAX ( cte , p ( SC 2p, ) ) a ] SC2,~ , SC2,1 [ , SC2,w = MIN ( cte , q ( SC2pt ) ) a [ 0% , SC2~s [ , and SC2", = MIN(cte,r(SC2D1) ) E]SC2s"100$].
p ( SC2ps ) , q( SC2yi ) and r ( SC2yi are linear functions of the type y = a'SC2yi + b, where SC2D1 is the personalized_ threshold value "l" which is SP2, or SP2,. a b and cte are j predetermined constants. The threshold values SC2s" SC2,~
and SC2~1 can also be set from precedent experiences.
Now, there will be described the third level of verification in which a distance is calculated by dynamic pattern matching, and a minimal residual distance RC3 is deteratined between two signals by means of a function distorting the temporal scale. This function i.s applied to the si l gnals of the Dx and D,, values for each pair of characteristic segments. The wanted result is the raei~hed l summation of its application:
N

RC3 = ~ E RC3ii ' lii a[O, m]
1r ii=I
where RC3 is the minimal residual distance obtained by dynamic pattern matching.
q( l .j-1) + d(i,j) 3a RC3ii = MIN q(i-l,j-1) + d(i,j) q(i-1. 7 ) + d(i.~) where d ( l , j ) - ( eD".,. -4 D,~" )' + ( SD"s - 4D,,. )' ;
q(1,1) = d(1,1);
D,~ and D" are respectively the D, components of the test and reference signatures of a particular pair of characteristic segments; -D~,.i, and D,,, are respectively the DY components of the test and reference signatures of a particular pair of characteristic segments; and d is a linear operator of difference.
S~B~TiTI!'TE ~HEEI

RCr. ~O'v:t;f'w-sll;~~CHE\ ~_> . ~~- ,.-,-c'.:~ : w1 : 18 : ~-1 014 845 7874-t.~c~ t39 '_'3994465:#14 ~Og93 ~' 1 N

RC3 = ~ ~ RC3ii ' lii E [ 0,°°]
w 1r ii=1 i where RC3i1 is the minimal residual distance of the Dx and D,, components between the craracteristic segments of a 10 particular pair of the pairs of characteristic segments.
The above-mentioned means for calculating is performed by the processing unit 4.
The apparatus also comprises means for calculating FC3 (RC3 ) for each of the DY and D,, components of the pa~.rs of 15 characteristic segments where' RC3 is representative of the minimal residual distance of the D" and D,, components between the characteristic segments of each of the pairs rof characteristic segments, where:
FC3 (RC3 ) = Z if RC3>-SC3,~ where SC3, is a twelfth 20 threshold value, FC3(RC3) - ( (eh'''a~"_ 1)/(e ' 1) )"' if SC3,SRC3<SC3R where SC3, is a thirteenth threshold value, FC3(RC3 ) - ( ( (e°'~""'- 1)/(e - 1) )'°- 1) if SC3,<RC3<SC3, where SC3, is a fourteenth threshold value, 25 or FC3(RC3)=-1 if RC3SSC3,; where hl(RC3)=(RC3 - SC3,)/(SC3~
- SC3, ) , h2 ( RC3 ) _ ( SC3, - RC3 ) / ( SC3, - SC3,) , and Nl and N2 are predetermined growth factors; means for generating a signal -.indicative of a rejection of the test signature if 30 FC3(RC3) = l; and means. for generating a signal indicative of as acceptation of the test signature if FC3(RC3) _ -1.
j The above-mentioned means for calculating and means for generating are performed by the processing unit 4.
In the case where the equilibrium threshold value 35 .SC3" the rejection threshold value SC3, aad the acceptation i threshold value SC3~ are determined by personalized threshold values, SC3,aMIN(cte,p(SC3p) ) s]SC3,,SC3;[, SC3==MAX(Cte,q(SC3D) ) E]SC3"~], and SUBSTITUTE SH~~~

KC:',. i~t.::,YA-:'Y~L~.,~.ttr_., . -~- ~-b:; . _a lei : ,-i Jiø E345 7E3'r4-+ø~J- d~ 2a3~94.465:#15 . ,.

SC3,=MAX ( cte , r ( SC3D ) ) E [ 0 , SC3, [ .
p ( SC39 ) , q ( SC3P ) and r ( SC3P ) are 1 inset functions of the type y = a~SCp + b where SC3p is the personalized threshold value ', SP3. a,- b and cte are predetermined constants. The ~'S personalized threshold values can also be set from precedent experiences.
' To determine the personalized threshold values, more than one reference signatures are acquired, and ' compared among themselves, taken twv by two, to obtain ZO several groups of RCl" RC1" RC1" RC1" RC21, RC2~ and RC3 values. To this effect, the apparatus further .comprises means for comparing each of said RC11, RCl" RC1" RC1, and RC3 values with other corresponding values of its own group, and determining maximum values of each group which ;15 constitutes respectively personalized threshold values SP1~, SP1=, SPT" SPl, and SP3 ; and means for comparing each of said RC21 and RC2a values with other corresponding values of its own group, and determining minimum values of each group which constitutes respectively personalized threshold values 20 SP2l and SP2,; means fvr calculating SCl,s = M~rX (cte, p(SCI9~) ) ~ a [0%,SCl,~,j , and SC1"t = M,~X (Cte,q(SCloi)) a]SClil,m], where p(SCi,i) and q(SCiP,) are linear functions of the type y = a.SClP, + b, where SClos is the personalized threshold 25 value "l" which is respectively SPl" SPI=, SP1, or SP1, and ~a. b and cte bein g predetermined constants, means far calculating l SC2,i = MAX (cte,p(SC2as) ) E ]SC2"i, SC2,~[, SC2,~~ = MIN (cte,q(SC2p,)) E[0%,SC2t~[, and ;30 SC2"1 = MIN (cte,r(SC2pl)) f]SC2u, 100%], where p ( SC2p, ) , q ( SC2,~ ) and r 5C2 ( ~,) are linear functions of the type y = a~SC2~i + b, where SCZ,, is the personalized threshold value "l" which is r~spectively SP21 or SP2, and a, b and cte being predetermined constants: and means for 35 calculating SC3s ~ MIN(cte,p(SC3~) ) E]SC3",SC3,[, SC3" = MAX(cte,q(SC3t) ) E JSC3"~] , and -SUSSi'~TUTE 5~~1 sc3A = MAx(cte,r(scap)) ECo,sc3eC, where p(SC3p), q(SC3~,) and r(SC3p) are linear functions of the type y = a ~ SC3a + b, where SC3p is the personalized threshold value SP3 and a, b and cte being predetermined constants.
All of the above-mentioned means for comparing and means for calculating are performed by the processing unit 4.
The present apparatus and method have been preliminarily tested with two groups of signatures which are the IM and IN groups. The IM group has been created during examination of plagiarism, arid is characterized by containing excellent false signatures. This group comprises eiqht right-handed signers consisting of one European, one Asian and six North Americanst and eight right-handed imitators consisting of eight right-handed North Americans.
Each signer has provided three signatures which have been stored in 24 acquisition indexes. Each imitator. has provided three signatures fox each signature of the signers, which have been stored in i92 acquisition indexes.
The IN group comprises six right-handed signers consisting in one European and five North Americans. Each signer has provided nine signatures that have been stored in 54 acquisition indexes. Several tests have been done for adjusting the discriminating function to minimize errors.
Referring now to Figure 21, there is shown the discriminating function that has been found preferable.
Referring now to Figures 22 and 23, there are illustrated the results obtained for each group of signatures.
It can be noted that ~in the IN group, all of the true signatures have been recognized as such. In the IM
group, false signatures have been accepted in 0.5% of the cases, which is relatively low. Those false acceptations can be explained by the fact that the reference signatures were from an Asian signer, which were quite unstable since he was not familiar with occidental way of signing. This instability has provided a group of very permissive personalized threshold values.

Other preliminary tests with different data base show that the performances are dependent on the data base and that accordingly, it is important to adjust the discriminating functions to prevent rejection of good signatures at the exception of those resulting from a bad manipulation of the system.
In the case where no decision can be made (uncertain result), the signer can be invited to sign again f or verification.
The strings shown on Figure 17 can be subdivided into subunits called strokes. A general way to look at the origin of the strokes of a movement is depicted in Figure 24. The overall sets of neural and muscle networks involved in the generation of a single aimed-movement is assumed to result from the sequential actions of a set of n stochastic processes.
The internal description of these processing units is irrelevant to the model only their global statistical behavior is of interest. Sdme of them might be composed of neural networks, others of muscle fiber networks, some might incorporate internal feedback, etc.., As long as they are in sufficient number, the theory holds. Considering the overall sets of neural and muscle networks involved in the production of a single rapid movement as a linear system producing a velocity profile from an impulse command UO(t-t0) of amplitude D occurring at time t0. In this case, one can write:
t v(t) = JD UO(t-t0+T).H(t0-t) dT (1) t - D H(t-t0) with t>_t0 (2) This equation shows that in this context, the velocity profile directly reflects the impulse response H(t-t0) of the global system. Since rapid movement generation involves the activation of neuromuscular systems having 3~1'O 92/13816 2 ~ ~ ~ 3 ~ 1 PCT/CA92/00052 similar impulse response, the similarity of the velocity profiles and their invariance follows automatically from this equation. The mathematical description of H(t-t0) can be specified if one considers that it reflects the density function of the response time T of the different subprocesses involved in the activation of the system. If one assumes that the global system is made up of a cascade of n linear subsystems acting in such a way that the response time Tj of the jth stage is related to the response time Tj-1 of the (j-1)th stage by a law of proportional ef f ects Tj = (1 + Ej)Tj-1 (3) where ej is a random variable, then, for an n stage system, Tn = (1 + e1) (1 + E2) (1 + e3) ... (1 + En) TO (4) where TO defines the time resolution of the global system.
Then, it can be shown that, if n is sufficiently large and if some general mathematical conditions are met by each of the subsystem impulse responses, the central-limit theorem applies and predicts that H(t-t0) will tend toward a log-normal curve and thus, the whole velocity profile will be described by such a curve.
In this context, two types of equations can be used to represent a stroke:

vi(t) - exp - [ln(t-t )-~]2 , and (5) Q~2n' (t-t0) 2a2 0 D(t -t ) 1 _ t v2(t) = 1 0 eXp _ 2 In (t t0) -I~
a~'(t-t0) (tl-t) Zo (tl-t) These two equations represent log-normal curves but differ slightly in their description.
Equation (5) is the classical log-normal equation WO 92/13816 ~ 0 9 9 3'71 ~ ~ PCT/CA92/00052 where D represents the total displacement of the movement, t0, the time occurrence of the impulse command, ~ and a2 the mean and variance of ln(t-t0), the random variable in this case. This equation is unbounded that is, zero velocity is 5 asymptotically reached at t = ~. This means that one has to use a percentile criterion that is minimum value below which the velocity can be considered as negligible, to estimate the end of movement and the set of parameters that best fit the stroke original data.
10 Equation (6) represents a support-bounded log-normal. This curve takes into account a time axis compression to make sure that the velocity reaches zero at the end of movement (t=tl). All the other parameters have meanings similar to those of the unbounded log-normal.
15 Equation (5) or (6) constitutes a mathematical description of an asymmetric bell-shaped velocity profile where the shape of the profile can be theoretically affected by five parameters: D, to, t" ~ and o. These parameters can be easily combined to rescale the velocity profiles under 20 different changes of experimental conditions, keeping the general appearance of the profile invariant under these conditions. The following parameter values were used in the bell-shaped velocity profile shown on Figure 25: D=5 cm, u=
2, a=0.5, to 0.15 s. The support bounded equation (6) has 25 been limited to t,=0.9 s.
A rapid-aimed movement described by log-normal velocity profiles can be seen as the fundamental unit of a learned movement or a stroke. Because of the direct relationship between the distance and some velocity control 30 parameters, there is an equivalence between spatial and timing representation of movement through the log-normal velocity profile. More complex movements or strings can be planned and generated by summing up these bell-shaped velocity profiles. This immediately suggests two types of 35 execution processes: an anticipation process, where complex velocity profiles can be described in terms of superimposed log-normal curves and a correction process where velocity 1~!(O 92/13816 2 0 9 ~ 3 71 PCT/CA92/00052 can be reproduced by a sequence of independent log-normal curves without superimposition.
The asymmetric bell-shaped velocity profiles result from the global stochastical behavior of the large number of processes involved in the velocity control, in other words the invariance of these profiles can be interpreted as resulting from the global self-organization of the system. In the same context, it is shown that the previously reported relationship between movement time and l0 spatial or timing accuracy are no conflicting observations of different independent phenomena but results from the intrinsic properties of the log-normal velocity profiles.
Asymmetric bell-shaped velocity profiles can be used as fundamental units for representing a signature.
Accordingly, the curvilinear speed V, and the angular speed V, along the trajectory of a handwriting movement can be represented by asymmetric bell-shaped curvilinear velocity profiles v,(t) (curvilinear strokes) and asymmetric bell shaped angular velocity profiles v,(t) (angular strokes) respectively.
By means of the processing unit 4, the following parameter values: D" to" t,°, ~Se and ae are calculated so that ve(t) matches with the Ve values along the trajectory of the curvilinear stroke where:
Da 1 vio(t) = exp - 2 (ln(t-t0a)-~°~2 a~2 (t-tOQ) 2a or _ 2 ~2°(t) _ ~o(tl° tU°) exp - 12 ~n (t t~°) - I~o ~(t-t0°) (tla t) 2° (tl°-t) Also, by means of the processing unit 4, the fol lowing parameter values D, , t~, , t" , ~, and Q, are calculated so that v,(t) matches with the V, values along the trajectory of the angular stroke where:

r~C\ . ~U\ : EY.~-VIIE\u.HE\ ~? . 4- .:~-~.3 : _ ; y' 1 . +1 5 l4 845 78?4-.
+ø9 89 _';3994~3.g;u: t~ 18 4z Da vIe(t) = exp _ 2 ~ln(t_t08)_ue~2 aV 2a ( t-tag ) 2a or 09~t19 t06~ eXp - ~ in ~t t08~ - a Z
oY2~ tt-tpe) (tie-t~ Zo tie-t~ B
An approximate mode 1 by means of v, ( t ) and ve ( t ) offers an advantage for data compression since only a few parameter ' values are needed for characterizing the trajectory of a handwriting stroke. Accordingly, the microcomputer 12 comprises a memory for registering the parameter values D, , to, , t~, . ~, . a, , De , ta, , t,~ , ~e~ and Q~ , _i _ whereby_said handwriting movement is memorized and d~'ta ~2o compression is achieved.
As previously noted, the data processing of the j present method for di itizin and se 9 9 gmenting a handwriting movement is erformed b the p y processing unit which operates according to a proper programming stored in the disc unit I0 .
A set of programs have been written to perform this task for use with the computer equipment previously described. The following brief description of these programs follows before an explicit listing of the actual program statements:
/*Listing file vds.h*/: defines and initializes different variables, parameters and procedur~s that are used in the other programs;
/*Listing file vds.c*/; system management;
j ' / Listin abonne.c*
* g /: registers a user;
SUBSTITUTE S~iEE'!

/*Listing file acqui.c*/: performs all the data processing necessary for digitizing and segmenting a handwriting movement;
/*Listing file verifi.c*/: performs all the data processing necessary for comparing a test handwriting signature with a reference signature, where each of the test and reference signatures has been acquired by the /*Listing file acqui.c*/ program.

WO 92/13816 2 U g 9 3 ~ 1 , PCT/CA92/00052 /* Listing -> file vds.h */
include <stdio.h>
include <stdlib.h>
include <malloc.h>
~jinclude <roath.h>
include <dos.h>
include <conio.h>
/include <time.h>
include <direct.h>
#include <string.h>
include <io.h>
typedef int Ch_car[200J[2J;
define NB_CH_MAX 100 $define NB PT MAX 1000 /* verifi.c */
extern void ver_sign(struct BANQUE *);
extern struct RESULTAT *verifie(struct BANQUE *,struct FA *);
extern void var_param-sp(struct SIG *,struct SIG *,struct RESULTAT *);
extern void corr_segm(struct SIG *,struct SIG *, Ch car, Ch car);
extern double cor reg sig(struct SIG *,struct SIG *, Ch car, Ch car,int);
extern double cor reg ch(double *, double *,int,int,double);
extern void pd comp(int [100J[3],int [100J[3J,int [100J[ZJ,double);
extern double pd im_sig(struct SIG *,struct SIG *, Ch car, Ch car);
extern double pd_im-ch(float [2J[1000],float [2][1000],int,int);
/* acqui.c */
extern struct SIG *acqui sig(int,struct FA *);
extern int acquisition(int,struct SIG *,struct FA *);
extern void conver(struct SIG *);
extern void seg dyn(struct SIG *);
extern void param sp(struct SIG *);
extern void pretraite_i(struct SIG *);
extern void filtre(int,double [NB PT MAXJ[2J,struct SIG *);
extern void derive(int,double [NB PT HAXJ[2J,struct SIG *);
extern int synchronise(int,int *,int *,int *);
extern void acqui_coor(int,int *,int *,int *,int *);
extern int recoie(void);
extern double var_angle(double *,double *);
extern int reg lin(double [100J[2],int,double *,double *);
/* abonne.c */
extern void abonne(struct BANQUE *);
extern struct ETIQ *lect etiq(struct BANQUE *);
extern void ecri_etiq(struct ETIQ *,struct BANQUE *);
extern void ecri_ref(struct SIG *,struct BANQUE *);
extern struct SIG *lect ref(struct BANQUE *);
/* vds.c */
extern void main(int,char *[J);

1~Y0 92/13816 2 0 9 9 3 ~ 1 _ PCT/CA92/00052 extern void init_coml(int);
extern void transmet(int);
extern void prebanque(struct BANQUE *);
/* lib.c */
extern void efface(void);
extern void cadre(void);
extern void delai(double);
extern int acceptation(void);
extern void cls(void);
define CARRE(x) (float)((x)*(x)) define sign(x) ((x) > 0 7 1 : ((x) - 0 ? 0 : (-1))) define PI 3.141592653 define ESC 27 define RETURN 13 /define HAUT 72 ~jdefine BAS 80 define GAUCHE 75 define DROITE 77 define PAUSE (printf("\nPRESSER UNE TOUCHE");bdos(1,0,0);) /define VRAI Oxffff define FAUX 0 define KFILTRE 3 define X . 0 ~Jdef ine Y 1 ~/def ine CURVI 0 ~'def ine ANG 1 define XMIN 0 define XMAX 1 define YMIN 2 ~/def ine YMAX 3 define HIN 0 define MAX 1 /define PENCEPT '1' define SUMMA '2' define TEST 1 ~/def ine REF 0 ~jdefine DIAG_BAS 0 define DIAG_HAUT 1 define DIAG_OBLIQUE 2 define FICHIER 3 define OUI 1 ~/def ine NON 0 ~/def ine NO_OP 9 ~jdefine ESC 27 /define NB_MAX_ABONNE 100 /define NB_PT_CH 100 struct BANQUE
char fichier[80];
char reperto(60J;
char source(3J;

WO 92/13816 2 U 9 9 3 71 ~ .~~ 1J /~~ ~ ~ PCT/CA92/00052 char ext[4];
int nb_abonne;
int nip~ref;
).
struct ETIQ
char etat;
char nb_sig;
char nom[30j;
chgr date[9];
char heure[9j;
float SDtot;
float SDlv;
float SDar;
float SDap;
float SCVs;
float SCVt;
float SDpd;
1.
struct SIG( struct( float cc[2j;
float vc[2J;
float vi[2];
int pointer dyn[NB PT MAXj;
atruct( int nb_point;
int nb chaine;
int nb composante;
float vit moy;
float Dtot;
float Dar;
float Dlv;
float Dap;
info;
int ch[Nn CH MAX][2];
1.
struct RESULTAT( struct( float VDtot;
float VDlv;
float VDar;
float VDap;
float s[3][4J;
int niveau[4j;
float cout;
1 a:
struct( float CVs;
float CVt;
float s[3j[2j;
float cout;

WO 92/13816 2 Ow9~9 ~3 ~ ~ PCT/CA92/00052 b;
struct( float Dpd;
float s[3);
float cout;
c;
int niveau[SJ;, char essai;
float duree;
float cout;
1;
struct ERREUR( struct( char typel;
char type2;
char type3;
)d;
int usager;
float t1[8)[15);
float t2[8)[15];
float t3[8][15];
float g1(3][15];
int tl_nb;
int t2_nb;
int t3 nb;
int g1 tl_nb;
int gl_t2_nb;
int g1 t3 nb;
);
struct FA( int n_sig;
int n_imi;
int n_essai;
char fich[80j;
char source[60];
1;
/define DEBUG 0x01 /*0000 0001*/
/define ASCII 0x02 /*0000 0010*/
define CRAPHIQUE 0x04 /*0000 0100*/
define TEMPS_REEL 0x10 /*0000 0000*/
define TEMPS_REEL_P 0x20 /*0100 0000*/
define TEMPS_DIFFERE 0x40 /*1000 0000*/
define TEMPS_DIFFERE_P 0x80 /*1100 0000*/
/define VIT_CUR 0 define VIT_ANG 1 define NB_POINT 2 #define ECHEC 'F' define SUCCES 'S' /define REJETEE 'R' /define S_NB_POINT S.0 /define S_VIT_CURVI 5.0 //define S VIT ANG 1.0 WO 92/13816 ~ ~ '' PCT/CA92/00052 /define VERTICAL
/define HORIZONTAL
define DIAGONAL
~/def ine LF_PB
~jdefine LF FD
/define REJET 0 define ACCEPT 1 #define EQUIL 2 1V0 92/13816 ~ ~ ~ ~ 3 ~ ~ : PC'T/CA92/00052 /* Listing -> file vds.c */
include "vds.h"
int faute - FAUX;
int tab_num;
int ve[lOJ;
char mode vds;
void main(argc,argv) int argc;
char *argv[J;
struct BANQUE Bs;
int i;
int choix;
int sortie;
char Ligne[80J;
char Commande DOS[80J;
FILE *Ptr;
1 - 1;
if(argc >- 2 )( for(;;)( 1f(1 >- argc)break;
if(latrcmp(argv[iJ,"d") ~; Istrcmp(argv[iJ,"D"))( mode vds ;- DEBUG;
) else if(Istrcmp(argv[iJ,"g") ~~ Istrcmp(argv[iJ,"G"))( mode vds ;- GRAPHIQUE;
) else if(Istrcmp(argv[iJ,"asc") " Istrcmp(argv[i],"ASC"))( mode vds ;- ASCII;

else if(Istrcmp(argv[iJ,"auto+") ~~ Istrcmp(argv[iJ,"AUTO+"))( mode vds ;- TEMPS DIFFERS P;
else if(Istrcmp(argv[i],"auto") ~~ Istrcmp(argv[iJ,"AUTO"))( node vds ~- TEMPS DIFFERS;

i++;

if((mode vds & TEMPS DIFFERE'P) ~~ (mode vds & TEMPS~DIFFERE))( (.
if((Ptr - fopen("protoc.tdi","r")) -- NULL)( printf("Erreur a 1'ouverture du fichier PROTOC.TDI\n");
exit(1);
fgets(Ligne,BO,Ptr);
sscanf(Ligne,"Xs", Bs. source);
fgets(Ligne,80,Ptr);

,.
WO 92/13816 2 U 9 9 3'~ 1 PCT/CA92/00052 w sscanf(Ligne,"Xs'',Bs.ext);
fgets(Ligne,80,Ptr);
sscanf(Ligne,"Xs", Bs.reperto);
i - 0;
for(;;)( 1f(1 > 9)break;
fgets(Ligne,80,Ptr);
sscanf(Ligne,"Xd",&ve[iJ);
++i;
fclose(Ptr);
cls();
sprintf(Bs.fichier,"Xsbanque.Xs\0", Bs.reperto,Bs.ext);
if((mode vds ~ TEMPS DIFFERS P))( sprintf(Commande_DOS,"del Xs\0",Bs.fichier);
system(Commande_DOS);
sprintf(Commande_DOS,"del *.cor\0");
system(Commande-DOS);
prebanque(~Bs);
Bs.nb_abonne - ve[lJ;
abonne (dabs ) ;
printf("OK\n");
if(access(Bs.fichier,0) - -1)( prebanque(~Bs);
exit(1);
) ver sign(~Bs);
else( printf("\033[Om\033[2J\033[lm");
1 - 1;
for(;;)( 1f(1 > 2)break;
printf(" ");
printf(" \033[24;1H");
++i;
_ printf("~\033[1;1H~\033[1;80H~\033[24;80H~\033[2;1H");
i - 2;
for(;;)( if(i > 23)break;
printf ("~I \033 [ Xd; 80H~~" , 1 ) ;
++i;
) printf("\033[3;21H\033[4m");

printf(~LOGICIEL.DE VERIFICATION DE SIGNATURE");
printf("\033[Om\033[4;34H");
printf(~Version 3.0");
printf("\033(lm\033[6;25HDEPARTEMENfi DE GENIE ELECTRIQUE~);
printf("\033(ll;lOH\033(Om");
printf("Programmeur: Louis Brassard (automne 1984)");
printf(~\033[l2;lOH(version TI-FS990/4)");
printf("\033[l4;lOHRevise et modifi~ par: Jean Besudoin (hives 1987)");
printf("\033[lS;lOH(version IBM-PC et compatibles)") ;
printf(~\033[l7;lOHRevis~ et am~liore par: Jean Beaudoin et Alain \
Gladu (ete 1987)");
printf("\033[lB;lOH(version COMPAQ 386)");
printf("\033[7m\033[22;23H Presser une touche pour continues");
printf("\033[Om");
bdos(1,0,0);
printf("\033[Om");
printf("\033[6;25H "
printf("\033[ll;lOH");
printf(" ")~
printf("\033[l2;lOH ");
printf("\033[l4;lOH ~);
printf("\033[lS;lOH ") ;
printf("\033[l7;lOH \
").
printf("\033[lB;lOH ~) printf("\033(22;23H ");
if((Ptr - fopen("protoc.tre","r")) - NULL)( printf("Erreur a 1'ouverture du fichier PROTOC.TRE\n");
exit(1);
fgeta(Ligne,80,Ptr);
sscanf(Ligne,"Xs", Bs. source);
fgets(Ligne,80,Ptr);
sscanf(Ligne,~Xs", Bs.ext);
fgets(Ligne,80,Ptr);
sscanf(Ligne,"Xs", Bs.reperto);
fgets(Ligne,80,Ptr);
sscanf(Ligne,"Xd",6tab num);
fclose(Ptr);
sprintf(Bs.fichier,"Xsbanque.Xs\0", Bs.reperto,Bs.ext);
if(access(Bs.fichier,0) - -1)( prebanque(&Bs);
sortie - FAUX;
for(;;)( choix - 0;
cadre();

printf("\033[1;4m\033[2;21H");
printf("PROGRAMME DE VERIFICATION DE SIGNATURE\033[O;lm");
printf("\033[4;1H~~ ");
printf("- .
printf("\033[1;3N Xs ",Bs.fichier);
printf("\033[Om\033(6;lOH");
printf("1) Abonner un usager, a,jouter des references, ");
printf("activer un code");
printf("\033[7;lOH sur 1'usager");
printf("\033(9;lOH");
printf("2) Consulter les references de 1'usager");
printf("\033[l2;lOH3) Desactiver un code, desabonner 1'usager");
printf("\033[lS;lOH4) Verifier la signature de 1'usager");
printf("\033[lB;lOHS) Sortie du logiciel\033[O;lm");
printf ("\033 ( 20;1FI~~ ") ;
printf ( " ~" ) ;
printf("\033(0;7m\033(22;5H Num~ro de la commande:");
printf("\033[Om ");
choix - bdos(1,0,0) ~ Oxff;
if(choix -- '1')( efface();
printf("\033[4;32H mode abonnement ");
printf("\033(B;lOHl. Abonner un usager au systeme");
printf("\033(l2;lOH2. Ajouter des signatures de references");
printf("\033(l6;lOH3. R~activer 1e nuro~ro d'un abonn~");
printf("\033[0;7m\033[22;5H Num~ro de la commande:");
printf(" \033[2D");
printf("\033[Om ");
for(;;)( chofx - bdos(1,0,0) ~ Oxff;
if(choix -- '1')( abonne(&Bs);
break;) else( printf("\033[lm\033(22;5H");
printf("COMMANDE INVALIDE\033[Om ");
delai(1.0);
printf("\033[0;7m\033[22;5H NumEro de la commande:");
printf("\033[Om ");
else if(choix -- '2')( ) else if(choix -- '3')( else if(choix -- '4')( 1300 92/13816 9 3' '~ ~PCT/CA92/00052 ver sign(&Bs);
else if(choix -- 'S')( sortie - VRAI;
) elae( printf("\033[lm\033[22;SH");
printf("COMMANDE INVALIDE\033[Om ");
delai(1.0);
if(sortie)break;
printf("\033[2J\033[lm\033[12;35HAU REVOIR I\033[Om\033[24;1H");
) void init coml(Mode) int Mode;
( union REGS regs;
if ( Mode - PENCEPT ) regs.h.ah - 0x00;
rega.h.al - Oxe3;
regs.h.dh - 0x00;
rega.h.dl - 0x00;
int86(Oxl4,&regs,&regs);
transmet(Ox20);
transmet(Ox20);
) else if(Mode - SUMMA)( regs.h.ah - 0x00;
regs.h.al ~ Oxeb;
regs.h.dh - 0x00;
rega.h.dl - 0x00;
int86(Oxl4,~regs,~regs);
transmet(Ox20);
transmet(Ox40);
transmet(Ox68);
transmet(Ox51);
) 1_ void prebanque(Bs) atruct BANQUE *Bs;
int 1;
int Erreui-0;

~~~g371 char Mess[55J;
long Decalage;
struct ETIQ Es;
FILE *Ptr;

Es.etat - 0;
Es.SDtot - (float)0.001;
Es.SDlv - (float)0.001;
Es.SDar - (float)0.001;
Es.SDap - (float)0.001;
Es.SCVs - (float)0.999;
Es.SCVt - (float)0.999;
Es.SDpd - (float)0.001;

if((Ptr - fopen(Bs->fichier,"w+b")) -- NULL)( Erreur - 1;
) sprintf(Hess,"Progranuoeur: Pierre Yergeau,Version 1.OO,Mars 1988\0");
if(fwrite(Mess,50,1,Ptr) I- 1 b~ lErreur)( Erreur - 2;
if(fseek(Ptr,50L,SEEK SET) I- 0 ~ IErreur)( Erreur - 3;

i - 0;
if(fwrite(~i,sizeof(int),l,Ptr) I- 1)( Erreur - 4;
) i - 1;
for(;;)( 1f(1 > NB_MAX_ABONNE)break;
Decalage - (long)((i-1)*sizeof(struct ETIQ)+50L+sizeof(int));
if(fseek(Ptr,Decalage,SEEK_SET) I- 0 &b~ IErreur)( Erreur - 5;

if(fwrite(&Es,sizeof(struct ETIQ),l,Ptr) I- 1 b~ IErreur)( Erreur - 6;
) ++i;
if(Erreur)( f printf(stderr,"\nFonction: prebanque(), Erreur: X2d",Erreur);
fcloae(Ptr);

void transmet(Octet) int Octet;
int Drapeau;
outp(Ox3F8,Octet);
for(;;)( .1V0 92/13816 ~ ~ ~ 9 3 71 . P~/CA92/00052 Drapesu - inp(Ox3FD);
if(Drapeau & Ox20)break;

/* Listing -> abonne.c */
include "vds.h"

extern char mode vds;

extern int tab_num;

extern int ve[];

char *ent "
abonne[]
-n " Renseignements ", personnels de 1'abonn6 "

n "
f n r " n r " Valeurs ", des param~tres du ler niveau " ., " ., " n " r " Variations ", des n param~trea "

" lx 2x ix ", lx 3 lx lx n n " /PermdDtotdDardDlvdDapCVs CVtDpd", " n " "

" n r n n " n, n ..

n "
n n r n n r r Valeurs des seuils bDtotdDardDlvdDapCVs CVtDpd void abonne(Bs) struct BANQUE *Bs;
( int 1;
int int k;
int n;
int Rep;
int Sortie;
int Erreur-0;
int Nb_sig;
float Seuil[6][7J;
char commande[50];
char Fich ent[60];
struct FA Fa;
struct BANQUE Ba;
struct ETIQ *Ea;

13'O 92/13816 ~ 0 9 9 3 71 pCT/CA92/00052 struct ETIQ *Es;
struct SIG *Sra;
struct RESULTAT *Re;
FILE *Ptr;
( sprintf(Ba.source,"ab");
sprintf(Ba.ext,"abt");
sprintf(Ba.reperto,"");
sprintf(Ba.fichier,"banque.abt");
prebanque(~Ba);
sprintf(Fa.source,"XsXs\0",Bs->reperto,Bs->source);
if((mode vds & TEMPS REEL))( Ba->nip ref - 0; .
lect_etiq(Bs);
if(Bs->nb abonne -- 0)( Bs->nip ref - 0;

else if(Ba->nb abonne < (NB MAX ABONNE-1))( Bs->nip ref - 0;
Sortie - FAUX;
for(;;)( if((Es - lect etiq(Bs)) -- NULL)( Erreur - 1;
else( if(1(Es->etat ~ 0x80))( Sortie - VRAI;

else( free(Es);
++Bs->nip ref ;
if(Sortie ;; Erreur)break;

else( efface();
printf("\033[l2;lOH\033[lm");
printf("LA CAPACITE MAXIMALE DE 100 ABONNES A ETE ATTEINTE. ") ;
printf(~DESOLE ...");
printf("\033[7m\033[22;5HPresser une touche pour continues");
printf("\033[Om");
bdos(1,0,0);
return;

efface();
printf("\033[lm\033[6;32HNOUVEL ABONNEMENT\033[Om");

WO 92/13816 ~ ' PCT/CA92/00052 printf("\033[9;1OH1. Fournir les renseignements suivants:");
printf("\033[11;20E1- Nom et prenom:");
printf("\033[13;20H- Date d'abonnement:");
printf("\033(l7;lOH2. L'usager devra signer son nom 3 fois");
printf("\033[22;5H\033[7m");
printf(" Nom et pr~nom: \033(25D");
fflush(stdin);
for(;;)( gets(Es->nom);
if(atrlen(Es->nom) > 0)break;

strupr(Es->nom);
printf("\033[Om\033[11;38HX-26s",Es->nom);
_strdate(Es->date);
strtime(Es->heure);
printf("\033[Om\033[13;42HX-lOs",Es->date);
printf("\033[Om\033[22;5H \
").
t printf("\033[7m\033[22;5HPresser une touche pour continues ");
printf("\033[Om");
bdos(1,0,0);
Fa.n sig - Fa.n imi - Bs->nip ref;
Nb_eig - 1;
for(;;)( Fa.n_essai - Nb_sig;
if((Sra - acqui sig(tab num,~Fa)) -- NULL)( Erreur - 2;
else( free(Sra);
++Nb_sig;
I
efface();
printf("\033[23;16H(Presser ESC pour annuler la stance)");
printf("\033[22;16H");
prihtf("La signature est-elle valide 7 (0/N): ");
if((Rep - acceptation()) - 0)( sprintf(commande,"del Xs",Fa.fich);
system(commande);

if(Rep -- ESC)( efface();
printf("\033[l2;lOH");
printf("LE PROCESSUS D'ABONNEMENT A ETE INTERROMPU");
printf("\033[l4;lOH");
printf("L'abonnement est donc annule !");
printf("\033[l6;lOH");
printf("Vous pouvez cependant faire une autre demande si vous");
printf(" 1e desirez");
free(Es);

X30 92/13816 . pCT/CA92/00052 59 , return;
break;) if(Nb sig - 4)break;
efface();
printf("\033[l2;lOH");
printf("LE PROCESSUS D'ABONNEMENT EST EN COURS D'OPERATION...");
pt'intf("\033[Om\033[22;5H ~);
mode_vds - (mode vds ~ OxOf) ~ TEMPS_REEL_P;
ve[OJ ~ ve[lJ - Bs->nip ref;
++Bs->nb abonne;
1 - ve[OJ;
for(;;)( 1f(1 > ve[1])break;
if(mode_vds ~ TEHPS DIFFERS P)( printf("\n Abonnenent -> usager ~X3d",i);
) Ba.nip ref - 0;
if((Es - lect etiq(&Ba)) -- NULL)( Erreur - 3;
) strdate(Ea->date);
_atrtime(Ea->heure);
Ea->etat ~ OxFF;
Ea->nb sig - 3;
if(mode_vds & TEMPS_DIFFERE_P)( sprintf(Ea->nom,"USAGER ~X3d",i);
) else( sprintf(Ea->nom,"Xs~, Es->nom);
~ ~ 1;
for(;;)( if(~ > 3)break;
Ba.nip_ref -Fa.n sig ~ Fa.n_imi ~ i;
Fa.n essai ~ ~;
if((Sra ~ acqui sig(FICHIER,~Fa)) - NULL)( Erreur - 4 ;
else( ecri_etiq(Ea,~Ba);
free(Ea);
ecri_ref(Sra,~Ba);
free(Sra);
++~j ) if(Erreur)break;
) WO 92/13816 ~ ~ ~ ~ ~ ~ 60 PCT/CA92/00052 Ba.nb abonne - 3.
n - 0;
~ - 1;
for(;;)( if(~ > 3)break;
k - 1;
for(;;)( if(k > 3)break;
if(,j I- k)( Ba.nip ref - j;
Fa.n_sig - Fa.n_imi - 1;
Fa.n_essai - k;
Re - verifie(~Ba,~Fa);
Seuil(nJ[OJ - Re->a.VDtot;
Seuil[nJ(1J - Re->a.VDlv;
Seuil[nJ[2J - Re->a.VDar;
5eui1(nJ[3J - Re->a.VDap;
Seuil(nJ[4J - Re->b.CVs;
Seuil[nJ[SJ - Re->b.CVt;
Seuil[n++J[6J - Re->c.Dpd;
free(Re);
++k;
++~;
) Ba.nip ref - i;
if((Es - lect etiq(~Ba)) - NULL)( Erreur - 5;
) Es->SDtot - Seuil(OJ[OJ;
Es->SDlv - Seuil(O)[lJ;
Es->SDar - Seuil[OJ[2J;
Es->SDap - Seuil[OJ(3);
Es->SCVs - Seuil(OJ[4J;
Es->SCVt - Seuil[OJ[5J;
Es->SDpd - Seuil[O](6];
.i-1;
for(;;)( if(~ -- n)break;
if(Es->SDtot < Seuil[~J(OJ)( Es->SDtot - Seuil[~](OJ;
) if(Es->SDlv < Seuil[~J(1J)( Es->SDlv - Seuil[jJ[lJ;
if(Es->SDar < Seuil[~][2J)( Es->SDar - Seuil[~J(2J;
) ~!.'.O 92/13816 PCT/CA92/00052 if(Es->SDap <.Seuil[~J(3J)( Es->SDap - Seuil[,jJ[3];
if(Es->SCVs > Seuil[j](4J)( Es->SCVs - Seuil[~J[4J;
if(Es->SCVt > Seuil(~J(5J)( Es->SCVt - Seuil[~J[5];

if(Es->SDpd < Seuil(~)(6J)( Es->SDpd - Seuil[~J[6J;

~.J

Es->etat - OxFF;
Ba.nip ref - 1;
if((Sra - lect~ref(bBa)) - NULL)( Erreur - 6;

else( Bs->nip ref - i ;
ecri_etiq(Es,Bs);
ecri ref(Sra,Bs);
sprintf(Fich ent,"XsXs_X02d.ent\0",Bs->reperto,Bs->ext,Bs->nip ref);

if((Ptr ( - fopen(Fich_ent,"v+")) -- NULL) Erreur - 5;

fprintf(Ptr,"Xa\n",ent abonne[OJ);

f printf(Ptr,"Xs\n",ent abonne(1J);

fprintf(Ptr,"Xs\n",ent abonne[2J);

fprintf(Ptr,"Nom complet.......: X-20s~1\n",Es->nom);

fprintf(Ptr,"Date d'abonnement.: Xs \n",Es->date);

fprintf(Ptr,"Heure d'abvnnement: Xs II\n",Es->heure);

fprintf(Ptr,"Xs\n",ent abonne(4]);

fprintf(Ptr,"Xs\n",ent abonne(SJ);

fprintf(Ptr,"Xs\n",ent abonne[6J);

fprintf(Ptr,"Xs\n",ent abonne(7J);

fprintf(Ptr,"~~Duree s ~~\n", sans levee de crayon:
X5.2f Sra->info.Dtot);

fprintf(Ptr,~~~Dur6e XX ~~\n", des temps d'arr~t...:
X4.lf Sra->info.Dar*100);

fprintf(Ptr,"~~Duree XX ~~\n", des levies de crayon:
X4.lf Sra->info.Dlv*100);

fprintf(Ptr,"~IDur6e XX ~~\n", de la vit. ang.
pos.:
X4.lf Sra->info.Dap*100);

fprintf(Ptr,"Xs\n",ent abonne(9J);

WO 92/13816 ° ~ 3 PCT/CA92/00052 fprintf(Ptr,"Xs\n",ent abonne[10]);
fprintf(Ptr,"Xs\n",ent abonne[11].);
fprintf(Ptr,"Xs\n",ent abonne[12]);
fprintf(Ptr,"Xs\n",ent abonne[13J);
fprintf(Ptr,"Xs\n",ent abonne[14]);
fprintf(Ptr,"Xs\n",ent abonne[15J);
fprintf(Ptr,"Xs\n",ent abonne[16J);
- 0;
for(;;)( if(~ > 5)break;
fprintf(Ptr,"~~ Xld ~XS.lf~X4.1f~X4.lf", j+l,Seui1[,j][OJ*100,Seui1 ~][1J*100,Seui1[j][2)*100);
fprintf(Ptr,"~X4.1ffX3.Of~X3.Of~X3.Of~~\n", Seuil[~J[3]*100,Seui1[,jJ[4]*100, Seuil[~][5]*100,Seui1[j][6]);

fprintf(Ptr,"Xs\n",ent abonne[17]);
fprintf(Ptr,"Xs\n",ent abonne[18]);
fprintf(Ptr,"Xs\ri",ent abonne[19]);
fprintf(Ptr,"Xs\n",ent abonne[20]);
fprintf(Ptr,"Xs\n",ent abonne[21]);
fprintf(Ptr,"Xs\n",ent abonne[22J);
fprintf(Ptr,"Xs\n",ent abonne[23]);
fprintf(Ptr,"Xs\n",ent abonne[24]);
fprintf(Ptr,"~~XS.if~X4 if~X4.lf", Es->SDtot*100,Es->SDlv*100,Es->SDar*100);
fprintf(Ptr,"~X4.1f~X3.Of~X3.Of~X3.Of~~\n", Es->SDap*100,Es->SCVs*100, Es->SCVt*100,Es->SDpd);
fprintf(Ptr,"Xa\n",ent abonne[25]);
free(Sra);
free(Es);
fcloae(Ptr);
++i;
if((mode_vda ~ TEMPS_REEL_P))( mode vds - (mode vda ~ OxOf) ; TEMPS REEL;
printf("\033[l2;lOH");
printf("LE PROCESSUS D'ABONNEMENT S'EST TERMINE NORMALLEMENT");
printf("\033[l4;lOH");
printf("Le num~ro d'identification du nouvel abonn~ est: ");
printf("Xd",Bs->nip ref);
printf("\033[7m\033-[22;5H Presser une touche pour continues ");
printf("\033[Om");
bdos(1,0,0);
else if(mode vds & TEMPS_DIFFERE P)( mode vds - (mode vds ~ OxOf) ~ TEMPS DIFFERS;

~!O 92/13816 2 0 9 9 3 71 p~/CA92/00052 struct ETIQ *lect etiq(Bs) struct BANQUE *Bs;
( int Erreur-0;
long Decalage;
struct ETIQ *Es;
FILE *Ptr;
if((Es - (struct ETIQ *)calloc(l,sizeof(struct ETIQ))) -- NULL)( Erreur - 1;
) if((Ptr - fopen(Bs->fichier,"r+b")) -- NULL && IErreur)( Erreur - 2;
if(faeek(Ptr,50L,SEEK SET) 1- 0 ~~ IErreur)( Erreur - 3;
if(fread(b(Bs->nb abonne),sizeof(int),l,Ptr) I- 1 ~ IErreur)( Erreur - 4;
) Decalage - (long)((Bs->nip ref)*aizeof(struct ETIQ)+50L+sizeof(int));
if(fseek(Ptr,Decalage,SEEK SET) I- 0 b~ IErreur)( Erreur - 5;

if(fread(~(*Es),sizeof(struct ETIQ),l,Ptr) 1- 1 6~& IErreur)( Erreur - 6;
if(Erreur)( fprintf(stderr,"\nFonction: lect etiq(), Erreur: X2d",Erreur);
if(Erreur 1- 1)( free(Es);
Es - NULL;

fclose(Ptr);
return(Es);
void ecri_etiq(Es,Bs) struct ETIQ *Es;
struct BANQUE *Bs;
int Erreur-0;
long Decalage;
FILE *Ptr;
if((Ptr - fopen(B~->fichier,"r+b")) -- NULL)( Erreur - 1;
l if(fseek(Ptr,SOL,SEEK SET) I- 0 ~ IErreur)( Erreur - 2;

WO 92/13816 ._ _ _ _ _ . ~ ~4$ ~ ~ ~ ~ P~'/CA92/00052 ) if(fwrite(~(Bs->nb abonne),sizeof(int),l,Ptr) I- 1 ~~ lErreur)( Erreur - 3;

Decalage - (long)((Bs->nip ref)*sizeof(struct ETIQ)+SOL+sizeof(int));
if(fseek(Ptr,Decalage,SEEK SET) 1- 0 b.& lErreur)( Erreur - 4;
if(fwrite(&(*Es),sizeof(struct ETIQ),l,Ptr) I- 1 && lErreur)( Erreur - 5;
if(Erreur)( fprintf(stderr,"\nFonction: ecri etiq(), Erreur: X2d",Erreur);
fclose(Ptr);

void ecri_ref(Sr,Bs) struct BAIJQUE *Bs ;
struct SIG *Sr;
( int Erreur-0;
char Fich[81J;
FILE *Ptr;
sprintf(Fich,"XsXs_X02d.COR\0",Bs->reperto,Bs->ext,Bs->nip ref);
if((Ptr - fopen(Fich,"w+b")) -- NULL)( Erreur - 1;

if(fwrite(Sr,sizeof(struct SIG),l,Ptr) I- 1 b~b~ IErreur)( Erreur - 2;
) if ( Erreur ) fprintf(stderr,"\nFonction: ecri ref(), Erreur:.X2d",Erreur);
fclose(Ptr);

20993'~~
~3!O 92/13816 PCT/CA92/00052 /* Listing -> file verifi.c */
#~include "vds.h"
extern int tab_num;
extern char mode vds;
extern int ve[j;
extern char *pagel[J;
extern char *page2[J;
extern char *entete fich[J-n " "
"~ .25 .25 .25 .25 .10 .85 .15 .60", " 1.0 .30 Niveaux " ~~~ "~T~T~T'T ~~
"~ /)S1 n ~dDtot~dDar~dDlv~dDap~1234~ C1 (Ccu~Can~ C2", " ~Dpdfi C3 ~Cout~123 GR~Dur.~~", "Ii ~ ~ ~ t i ~ i t ~ ., ~"
"1_I 1 1 1 1 1 1 1 I 1 "
".1 t 1 1 I 1~" .
r void ver_sign(Bs) struct BANQUE *Bs;
( char Fich real[40J;
char Commande[81];
int i;
int k;
int 1;
int Rep;
int Erreur;
long int Num_test;
struct RESULTAT *Re;
struct ETIQ *Es;
struct FA Fa;
FILE *Ptrl;
sprintf(Fa.source,"XsXs\0",Bs->raperto,Bs->source);
if(mode vds ~ TEHPS REEL)( for(;;)( efface();
printf("\033[4;30H\033[Om mode verification ");
printf("\033[7;1OH1. Identifiez-vous en entrant votre numero ");
printf("d'abonn6 au clavier");
printf("\033[lO;lOH2. Presser ensuite la touche 'RETURN'");
printf("\033[l3;lOH");
printf("3. Signer votre nom sur la feuille depostse sur la tablette ");
printf("numerique");
printf("\033[l6;lOH4. Suivre la procedure qui sera affich~e");
1 - 0;
for(;;)( WO 92/13816 ~ PCT/CA92/00052 ).
printf("\033[22;5H\033[7m NUMERO D'ABONNE: \033[22;23H");
fflush(stdin);
scanf("Xd",&Bs->nip ref);
printf("\033[Om");
if((Es - lect etiq(Bs)) -- NULL)( Erreur - 1;
if(I(Es->etat & OxcO))( printf("\033[22;5HNUMERO INVALIDE: ");
delai(1.0);
printf("\033[22;5H ") ;
) if(Es->etat & OxcO)break;
++i;
if(i > 2)( efface();
printf("\033[l2;lOHPLUS DE TROIS ESSAIS DE NUMERO INVALIDES ONT"
printf(" ETE COMPOSES...");
printf("\033[17;30HHode verification annul ...");
printf("\033[7m\033[22;5H Presser une touche pour continuer ");
printf("\033[Om");
bdos(1,0,0);
Rep - NON;
break;) if(Rep -- NON)break;
Fa.n sig - Fa.n_imi - Ba->nip ref;
Fa.n_essai - Es->nb sig + 1;
if((Re - verifie(Bs,&Fa)) -- NULL)( printf("Erreur ~ la verification\n");
efface();
printf("\033[10;5H");
if(Re->niveau[3J ~ SUCCES)( printf("LA SIGNATURE DE \033[lmXs\033[Om EST RECONNUE COMME ETANT \
AUTHENTIQUE I",Es->nom);

else if(Re->niveau[3] - 'I')( printf("LE RESULTAT DE LA VERIFICATION EST INCERTAIN...");
else( printf("CETTE SIGNATURE NEST PAS RECONNUE COMME CELLE DE ");
printf("Xs il",Es->nom);
printf("\033[22;16H");
printf("La signature est-elle valide T (0/N): ");
if((Rep - acceptation()) - NON)( 20993'1 ucp 92/13816 PCT/CA92/00052 sprintf(Commande,"del Xs",Fa.fich);
system(Commande);
else( ++Es->nb-sig;
ecri_etiq(Es,Bs);
Num_test - Bs->nip_ref * 101000 + Fa.n easai;
sprintf(Fich_resl,"Xsres X02d.man\0",Bs->reperto,Bs->nip ref);
if(access(Fich_resl,0) -- 0)( if((Ptrl - fopen(Fich_resl,"a+")) -- NULL)( printf("Erreur a 1'ouverture du fichier resultat ~1");

else( if((Ptrl - fopen(Fich_real,"w+")) - NULL)( printf("Erreur a 1'ouverture du fichier resultat ~1");
fprintf(Ptrl,"Xs",entete fich[OJ);
fprintf(Ptrl,"Xs\n",entete fich[1J);
fprintf(Ptrl,"Xs",entete fich[2]);
fprintf(Ptrl,"Xs\n",entete fich[3]);
fprintf(Ptrl,"Xs",entete fich[4]);
fprintf(Ptrl,"Xs\n",entete fich[5J);
fprintf(Ptrl,"Xs",entete fich[6J);
fprintf(Ptrl,"Xs\n",entete fich[7J);
fprintf(Ptrl,"~~ ----- ~XS.lf~X4.1f~X4.1f~X4.lf~----~----", Es->SDtot*100,Es->SDlv*100, Es->SDar*100 ,Es->SDap*100);
f printf(Ptrl,"~X3.Of~X3.Of~----~X3.Of~----~----~--- --~----~~\n", Es->SCVs*100,Es->SCVt*100,Es->SDpd);
fprintf(Ptrl,"Xs",entete fich[8J);
f printf(Ptrl,"Xs\n",entete fich[9J);
fprintf(Ptrl,"~X071d~X5.1f~X4.1f~X4.1f~X4.lf~XcXcXcXc~X4.Of", Num_test,Re->a.VDtot*100,Re->a.VDlv*100, Re->a.VDar*100,Re->a.VDap*100,Re->a.niveau[OJ, Re->a.niveau[1],Re->a.niveau[2],Re->a.niveau[3J,100*Re->a.cout);
fprintf(Ptrl,"~X3.Of~X3.Of~X4.Of~X3.Of~X4.Of~X4.Of", Re->b.CVs*100,Re->b.CVt*100,Re->b.cout*100, Re->c.Dpd,Re->c.cout*100,Re->cout*100);
fprintf(Ptrl,"~XcXcXc XcXc~X4.lf~~\n", Re->niveau[OJ,Re->niveau[1],Re->niveau[2J,Re->nivesu[3J, Re->niveau[4J,Re->duree);
fclose(Ptrl);
free(Es);
free(Re);
printf("\033[22;SH");
printf("D~sirez-vous verifier une autre signature (0/N): ");
Rep - acceptation();

WO 92/13816 1 ' PCT/CA92/00052 __ if(Rep -- NON)break;
else( i - ve[3];
for(;;)( 1f(1 > ve[4])break;
Bs->nip_ref - i;
if((Es - lect etiq(Bs)) - NULL)( Erreur - 4;
sprintf(Fich_resl,"Xsres_X02d.aut\0",Bs->reperto,Bs->nip ref);
if((Ptrl - fopen(Fich_resl,"w+")) -- NULL)( printf("Erreur a 1'ouverture du fichier resultat ~/1");

fprintf(Ptrl,"Xs",entete fich[0]);
fprintf(Ptrl,"Xs\n",entete fich[1]);
fprintf(Ptrl,"Xs",entete fich[2]);
fprintf(Ptrl,"Xs\n",entete fich[3]);
fprintf(Ptrl,"Xs",entete fich[4]);
fprintf(Ptrl,"Xs\n",entete fich[5]);
fprintf(Ptrl,"Xs",entete fich[6]);
fprintf(Ptrl,"Xs\n",entete fich[7]);
fprintf(Ptrl,"~) ----- ~XS.lf~X4.1f~X4.1f~X4.lf~----~---_", Es->SDtot*100,Es->SDlv*100, Es->SDar*100 ,Es->SDap*100);
fprintf(Ptrl,"~X3.Of~X3.Of~----~X3.Of~----~----~--- --~----~~\n", Es->SCVs*100,Es->SCVt*100,Es->SDpd);
fprintf(Ptrl,"Xs",entete fich[8]);
fprintf(Ptrl,"Xs\n",entete fich(9]);
k - 1;
for(;;)( if(k > i)break;
1 - ve[5];
for(;;)( 1f(1 > ve[6])break;
Num_test - Bs->nip ref * 100000 + k * 1000 + 1;
Fa.n_sig - i;
Fa.n_imi - k;
Fa.n_essai - 1;
printf("test: X071d\n",Num test);
if((Re - verifie(Bs,&Fa)) -- NULL)( printf("Xs ->verification impossible\n",Fa.fich);

else( fprintf(Ptrl,"~~X071d~X5.1f~X4.1f~X4.1f~X4.lf~XcXcXcXc~X4.Of", WO 92/13816 2 0 9 9 3 71 p~/CA92/00052 Num_test,Re->a.VDtot*100,Re->a.VDlv*100, Re->a.VDar*100,Re->a.VDap*100,Re->a.niveau[OJ, Re->a.niveau[lJ,Re->a.niveau[2J,Re->a.niveau[3],100*Re->a.cout);
fprintf(Ptrl,"~X3.Of~X3.Of~X4.Of~X3.Of~X4.Of~X4.Of", Re->b.CVs*100,Re->b.CVt*100,Re->b.cout*100, Re->c.Dpd,Re->c.cout*100,Re->cout*100);
f printf(Ptrl,"~XcXcXc XcXc~X4.lf~~\n", Re->niveau[O],Re->niveau[lJ,Re->niveau[2],Re->nivesu[3J, Re->niveau[4],Re->duree);
free(Re);
++1;
~+k ;
) k - ve[7];
for(;;)( if(k > ve[8J)break;
1 - 1;
for(;;)( 1f(1 > ve[9])break;
Num_test - Bs->nip ref * 100000 + k * 1000 + 1;
Fa.n sig - i;
Fa.n imi - k;
Fa.n_essai - 1;
printf("test: X071d\n",Num_test);
if((Re - verifie(Bs,~Fa)) - NULL)( .
printf("Xs ->verification i~poasible\n",Fa.fich);
) else( fprintf(Ptrl,"uX071d~X5.1f~X4.1f~X4.1f~X4.lf~XcXcXcXc~X4.Of"
Num_test,Re->a.VDtot*100,Re->a.VDlv*100, Re->a.VDar*100,Re->a.VDap*100,Re->a.niveau[OJ, Re->a.niveau[lJ,Re->a.niveau[2J,Re->a.niveau[3),100*Re->a.cout);
fprintf(Ptrl,"~X3.Of~X3.Of~X4.Of~X3,Of~X4.Of~X4.Of", Re->b.CVs*100,Re->b.CVt*100,Re->b.cout*100, Re->c.Dpd,Re->c.cout*100,Re->cout*100);
fprintf(Ptrl,"~XcXcXc XcXc~X4.lf~~\n", Re->niveau[OJ,Re->niveau[lJ,Re->niveau[2],Re->niveau[3J, Re->niveau[4],Re->duree);
free(Re);
++1;
) ++k;

WO 92/13816 ~ ~ ~ ~ 3 71 pCT/CA92/00052 fprintf(Ptrl,"Xs", entete fich[10]);
fprintf(Ptrl,"Xs\n",entete fich[11]);
fprintf(Ptrl,"Q");
fclose(Ptrl);
free(Es);
++i;
struct RESULTAT *verifie(Bs,Fa) struct BANQUE *Bs;
struct FA *Fa;
struct RESULTAT *Re;
struct SIG *Sr;
struct SIG *St;
Ch car R_ch,R chl;
Ch car T_ch,T chl;
struct ETIQ *Es;
int 1;
int Type;
int Reset-FAUX;
int Accept-FAUX;
float Parametre[4];
float Poids[4];
clock-t T_ini,T fin;
float a,b,c;
float Poids_niveau[3];
float Cout;
int Erreur;
Re - (struct RESULTAT *)calloc(l,sizeof(struct RESULTAT));
if(Re - NULL)( printf("Erreur a 1'allocation de r\n");

( if((Sr - lect ref(Bs)) - NULL)( printf("Erreur ~ la lecture de la r~f~rence\n");
if((Es - lect etiq(Bs)) - NULL)( printf("Erreur ~ la lecture dune etiquette\n");
) if(mode vds & TEMPS_REEL ;; mode vds ~ TEMPS REEL_P)( Type - tab num;

else( Type - FICHIER;
if((St - acqui sig(Type,Fa)) -- NULL)( ~"'' 92/13816 ~ ~ PCT/CA92/00052 free(Sr);
free(R_ch);
free(T_ch);
return(NULL);

T_ini - clock();
Re->g.niveau[OJ - '-'' Re->a.niveau(lJ - '-'' Re->a.niveau(2J - '-'' Re->a.nivesu(3J - '-'' Re->niveau(O] - '-'' Re->niveau[lJ - '-'' Re->niveau[2J - '-'' Re->niveau[3J - '-'' Re->nivesu[4J - ' '~
Poids niveau[OJ - 0.10;
Poids_niveau[1J - 0.60;
Poids_niveau(2J - 0.30;
Re->a.cout - 0.0;
Re->b.cout - 0.0;
Re->c.cout - 0.0;
Re->cout - 0.0;
Re->b.CVs - 0.0;
Re->b.CVt - 0.0;
Re->c.Dpd - 0.0;
Re->a.s[EQUILJ[OJ - max(0.10,4*Es->SDtot);
Re->a.s[EQUILJ[lJ - max(0.05, Es->SDlv);
Re->a.s[EQUILJ(2J - max(0.05, Es->SDar);
Re->a.s[EQUILJ(3J ~- max(0.05, Es->SDap);
Re->a.s[REJETJ(OJ - 0.25;
Re->a.s(REJETJ[lJ - 0.20;
Re->a.s[REJETJ(2J - 0.20;
Re->a.s[REJETJ(3J - 0.20;
Re->a.s[ACCEPT)[0] - 0.0;
Re->a.s[ACCEPT)[1J - 0.0;
Re->a.s(ACCEPTJ[2J - 0.0;
Re->a.s[ACCEPT)[3] - 0.0;
Re->b.s(EQUILJ(OJ - min(max(0.6,0.9*Es->SCVs),Es->SCVs);
Re->b.s[REJETJ(OJ - 0.40;
Re->b.s[ACCEPT](OJ - 0.90;
Re->b.s[EQUILJ[lJ - max(0.3,0.8*Es->SCVt);
Re->b.s[REJETJ[1J - 0.25;
Re.->b.s[ACCEPTJ(1J - 0.90;
Re->c.s(EQUILJ - Es->SDpd;
Re->c.s[REJET] - min(2*Es->SDpd,50.0);
Re->c.s(ACCEPT] - 5.0;
var_param_sp(Sr,St,Re);
Parametre[O] - Re->a.VDtot;

WO 92/13816 ~ 3 7 ~ ' PCT/CA92/00052 Parametre[lJ - Re->a.VDlv;
Parametre[2] - Re->a.VDar;
Parametre[3] - Re->a.VDap;
Poids(OJ - Poids[1] - Poids[2] - Poids[3] - 0.25;
i - 0;
for(;;)( if(i - 4)break;
if(Re->a.s[REJET](iJ<-Parametre(iJ)( Re->a.niveau[iJ - 'F';
Re->niveau[0] - 'F';
Re->a.cout - 1.00;
Re,jet - VRAI;
break;) else if(Re->a.s[EQUILJ[iJ<Parametre[iJ6~6~Parametre[iJate->a.s(REJET](i])( a - Parametre[i] - Re->a.s[EQUILJ(iJ;
b - Re->a.s[REJETJ[i] - Re->a.s[EQUILJ[i];
Cout - Poids(i)*(exp(a/b)-1.)/(exp(1.0)-1.0);
Cout - sqrt(Cout);
Cout - sqrt(Cout);
Re->a.cout +- (Poids[i]*Cout);
Re->a.niveau[i] - 'C';
Re->niveau[OJ - 'C';
) else if(Re->a.s[ACCEPTJ[ij<-Parametre(i]&&Parametre[iJ<-Re->a.s[EQUIL][1])( Re->a.niveau[i] - 'S';
Re->niveau[OJ - 'S';
Cout - 0.0;
else if(Parametre[i]Qte->a.s[ACCEP~J[iJ)( Re->a.niveau[i] - 'A';
Re->nivesu[OJ - 'A';
Accept - VRAI;
Re->a.cout - 0.0;
break;) ++i;
Re->cout +- (Poids niveau[OJ*Re->a.cout);
if(Re~et -- VRAI)( Re->niveau[3] - 'F';
Re->niveau[4] - '1';

if(Accept - VRAI)( Re->niveau[3J - 'A';
Re->niveau[4J - '1';

if(Re->cout >- 0.25 ~& Reset -- FAUX)( Rejet - VRAI;
Re->niveau[3] - 'F';
Re->niveau[4] - '1';
) if((Re~et - FAUX ~& Accept -- FAUX) " (mode vds & OxaO))( ~'"" 92/13816 ~ ~ ~ 9 3 71 P~'/CA92/00052 corr_segm(Sr,St,R ch,T ch);
corr segml(9r->ch,St->ch,R chl,T chl);
Erreur - 0;
if(R_ch[OJ[OJ I- R c~l(O](OJ ;; T ch[OJ[OJ 1- T chl[OJ[O])( Erreur - 100;
printf("erreur\n");
]
1 - 1;
for(;;)( if(i > R_ch[Oj(O])break;
if(R_ch[iJ[OJ !- R chl[iJ[OJ ;; R ch[iJ(1J I- R_chl[iJ[1])( Erreur - 100;
printf("erreur\n");
++i;
1 - 1;
for(;;)( if(i > T_ch[OJ[OJ)break;
if(T ch[iJ(OJ I- T chl[iJ[OJ ;; T ch[iJ[1J !- T_chl[i](1])( Erreur - 100;
printf("erreur\n");

++i;
if(Erreur -- 0)( printf("Ok 1\n");
else( exit(0);

if(mode_vds ~ GRAPHIQUE)( Parametre[OJ - Re->b.CVs - cor reg sig(Sr,St,R ch,T ch,CURVI);
Parametre[1J - Re->b.CVt - cor reg sig(Sr,St,R_ch,T ch,ANG);
Poida[OJ - 0.85;
Poids[lj - 0.15;
1 - 0;
for(;;)( 1f(1 - 2)break;
if(Parametre[i]<-Re->b.s[REJET][iJ)( Re->niveau[lJ - 'F';
Re->b.cout - 1.0;
Re~jet - VRAI;
break;) else if(Re->b.s[REJETJ(iJ<Parametre[i]~&Parametre[iJ<Re->b.s(EQUIL][i])( a - Re->b.s[EQUILJ[iJ - Parametre(i];
b - Re->b.s(EQUILJ[i] - Re->b.s[REJETJ[i];
Cout - Poids(i]*(exp(a/b)-1.)/(exp(1.0)-1.0);

WO 92/13816 ~ ' PCT/CA92/00052 Cout - sqrt(Cout);
Re->nivesu[1] - 'C';
Re->b.cout +- (Poids[i]*Cout);
else if(Re->b.s[EQUIL][iJ<-Parametre[iJ&~Parametre[iJ<-Re->b.s[ACCEPT][i])( a - Re->b.s[ACCEPT)(iJ - Parametre[iJ ;
b - Re->b.s(ACCEPTJ(i] - Re->b.s[EQUILJ(iJ;
Cout - Poids[i]*(exp(a/b)-1.)/(exp(1.0)-1.0);
Cout - Cout*Cout*Cout*Cout -1.0;
Re->b.cout +- (Poids[1J*Cout);
Re->niveau(1J - 'S';

else if(Re->b.s[ACCEPTJ(i]GParametre[iJ)( Accept - VRAI;
Re->b.cout - 0.0;
Re->niveau(1J - 'A';
break;) i++;
Re->cout +- (Poids nivesu[lJ*Re->b.cout);
if (Re~jet - VRAI ) Re->niveau(3] - 'F';
Re->niveau[4J - '2';
if(Accept -- VRAI)( Re->nivesu(3J - 'A';
Re->niveau(4J - '2';
if(Re->cout >- 0.25 &~ Rejet -- FAUX)( Re,jet - VRAI;
Re->niveau(3J - 'F';
Re->niveau[4J - '2';

if((Rejet -- FAUX && Accept - FAUX) ;~ (mode vds & OxaO))( Parametre[OJ - Re->c.Dpd - pd_im sig(Sr,St,R ch,T ch);
Poids(OJ - 1.0;
if(Re->c.s[REJETJ<-Parametre[OJ)( Re->niveau[2J - 'F';
Re->c.cout - 1.0;
Rejet - VRAI;

else if(Re->c.s[EQUILJ<Parametre[OJ~~Parametre(OJQte->c.s[REJETJ)( a - Parametre[OJ - Re->c.s[EQUIL];
b - Re->c.s[REJETJ - Re->c.s[EQUILJ;
Cout - Poids[OJ*(exp(a/b)-1.)/(exp(1.0)-1.0);
Cout - sqrt(Cout);
Cout - sqrt(Cout);
Re->niveau[2J - 'C';
Re->c.cout +- Cout;

~'"~ 92/13816 ' PCT/CA92/00052 else if( Re->c.s(ACCEPTJ<-Parametre(OJ&&Parametre(OJ<-Re->c.s(EQUIL])( a - Re->c.s[ACCEPT] - Parametre(OJ;
b - Re->c.s[ACCEPT] - Re->c.s[EQUILJ;
Cout - Poids[OJ*(exp(a/b)-1.)/(exp(1.0)-1.0);
Cout - Cout*Cout*Cout*Cout - 1.0;
Re->c.cout +- Cout;
Re->nivesu(2] - 'S';
else if(Parametre(OjQte->c.s[ACCEPT))( Accept - ~IRAI ;
Re->c.cout - 0.0;
Re->niveau[2J - 'A';
Re->cout +- (Poids niveau[2J*Re->c.cout);
if(Re~et -- VRAI)( Re->niveau(3] - 'F';
Re->niveau[4J - '2';

if(Accept -- VRAI)( Re->niveau[3J - 'A';
Re->nivesu[4J - '2';
if(Re->cout >- 0.25 ~6 Rejet -- FAUX)( Re~jet - VRAI;
Re->niveau[3J - 'F';
Re->nivesu[4J - '2';

if(Re->cout > 0.25 6~& Reset - FAUX 6r& Accept -- FAUX)( Re->niveau[3J - 'F';
Re->niveau[4J - 'G';

else if(Re->cout > 0.1 ~ Reset - FAUX b~ Accept -- FAUX)( Re->niveau[3J - 'I';
Re->niveau[4J - 'G';

else if(Re->cout <- 0.1 && Reset - FAUX ~& Accept -- FAUX)( Re->niveau[3J - 'S';
Re->niveau[4J - 'G';
free(Sr);
free(St);
free(R ch);
free(R_ch);
T_fin - clock();
Re->dtlree - (float)(T fin - T_ini)/1000.;
return(Re);

WO 92/13816 ~ PCT/CA92/00052 struct SIG *lect ref(Bs) struct BANQUE *Bs;
I
int Erreur-0;
char Fich[81];
struct SIG *Sr;
FILE *Ptr;
if((Sr - (struct SIG *)calloc(l,sizeof(struct SIG))) -- NULL)( Erreur - 1;
) sprintf(Fich,"XsXs_X02d.COR\0",Bs->reperto,Bs->ext,Bs->nip_ref);
if((Ptr - fopen(Fich,"r+b")) -- NULL ~& IErreur)( Erreur - 2;

if(fread(Sr,sizeof(struct SIG),l,Ptr) 1- 1 b~& IErreur)( Erreur - 3;
if(Erreur)( fprintf(stderr,"\nFonction: lect ref(), Erreur: X2d",Erreur);
if(Erreur 1- 1)( free(Sr);
Sr - NULL;
) fclose(Ptr);
return(Sr);

void var-param'sp(Sr,St,Re) struct SIG *Sr;

struct SIG *St;

struct RESULTAT
*Re;

( Re->a.VDtotfabs(St->info.Dtot- Sr->info.Dtot) / Sr->info.Dtot;
-Re->a.VDlv - fabs(St->info.Dlv- Sr->info.Dlv );

Re->a.VDar fabs(St->info.Dar- Sr->info.Dar );
-Re->a.VDap - fabs(St->info.Dap- Sr->info.Dap );

void corr_segm(sr,st,r_i,r_j) struct SIG *sr;
struct SIG *st;
Ch car r_1;
Ch car r-~;
l int i,,j,nl,n2,il,i2,nb_levee,ntl,nt2;
int ch_i[200J[2J,ch_j[200J[2J,levee_i[100J[3J,levee_,j[100J[3];
int ch[100][2];
int d_i[200J,d_~j[200J,p-i[200][2],,p_j[200J[2J;, float d,dist,d ref,a,b;

zo9~~71 ~'"" 92/13816 PCT/CA92/00052 int indice,pair,levee,ch cour;
float ratio,depll,depl2;
int passe,sortie,fin;
sortie - 0;
ch_i[1](0] - sr->ch[1J(O];
ch_,j(lJ[O] - st->ch[1][O];
ntl - nt2 - 1;
levee - 0;
1 - 2;
for(;;)( if(i > sr->ch(OJ[OJ)break;
ch_i[ntl][1] - sr->ch[i-1][lJ;
if((sr->ch(i][O]-1) I- sr->ch(i-1][1])( ++levee;
++ntl;
levee_i(leveeJ(OJ - ch_i[ntlJ(OJ - sr->ch[i-1][1J+1;
levee_i[levee](1J - ch_i[ntl](1J - sr->ch[i](O)-1;
levee-i[levee)[2] - ntl;
) ch_i(++-ntl](OJ - sr->ch[iJ(OJ;
++i;
ch_i[ntl](lJ - levee i(levee+1][O] - sr->ch[i-1][1];
ch i[0](0] - ntl;
levee_i(0][OJ - levee;
levee - 0;
~ - 2;
for(;;)( if(~ > st->ch(O][O])break;
ch_j[nt2J[1J - st->ch(j-1][1];
if((st->ch[,J][OJ-1) I- st->ch[~-1][1])1 ++levee;
++nt2;
levee_j(leveeJ[OJ - ch_,j[nt2](OJ - st->ch[~-1](lJ+1;
levee_j[leveeJ(1] - ch_j[nt2][1J - st->ch[,j][O]-1;
levee_,j(leveeJ[2J - nt2;
ch_j[++nt2J(O] - st->ch[j](O];
++~.

ch_~j[nt2)[1] - levee_j[levee+1](O] - st->ch[~-1](1];
ch-j[OJ[OJ - nt2;
levee_j[0][OJ - levee;

ratio - (ch_j(nt2](1]-ch-,j(1J[O])/
(float)(ch_i[ntl][1]-ch_i[1][OJ);
if(levee_i[OJ[0] -- 0 ;; levee_~(O](O] -- 0)( ch[OJ(OJ - 0;

else( pd comp(levee_i,levee_~,ch,ratio);

fin - max(ntl,nt2);
i - 0;
for(;;)( 1f(1 > fin)break;
d_i(iJ - 1000;
d-~(iJ - 2000;
++i;

pair - 1;
1 - i1 - i2 - 1;
nb_levee - ch[0](OJ;
for( ; ; ) ( if(i I- 1)( p_i[pair][1J - ch_i[il][1J;
p_,j[pair][1J - ch_~[12J(lJ;
++1l;
++i2;
++pair;
p i[pairJ(OJ - ch_i(il][OJ;
p-,j[pair][OJ - ch_,j{12][O);
if(nb_levee > 0)( n1 - levee i(ch[nb levee][OJJ[2J-1;
n2 - levee_~(ch[nb levee][1]][2]-1;
--nb levee;
else( n1 - ntl;
n2 - nt2;
sortie - VRAI;
a - ch-~j[n2](1]-p_~(pairJ[OJ;
b - ch_i[n1J(1J-p_i[pair){OJ;
if(b I- 0.0)( ratio - a/b;
d ref - max(fabs(a-b),5);
)_ else ratio - 1000.;
d ref - 0. ;
1_ depll - p i[pair][O];
depl2 - p-,j[pair][0];
for(;;)( 1f(1 > nl)break;
1 - i1;

20993'1 ""192/13816 PCT/CA92/00052 for(;;)( 1f(1 > nl)Lreak;
- 12-1;
if(j < 1)( j - 1;
diet - 99999;
for(;;)( if(j > n2)break;
d - (ch i[i][lJ-depll)*ratio+depl2 - ch_j[~j][lJ;
if(fabs(d) < diet)( diet - fabs(d);
indice - ~;
++~:

if(dist <- d_ref)( d 1[1J - indices else( d i[i] - 1000;
1_ ++i;
. 1 j - i2;
for(;;)( if(~ > n2)break;
1 - 1l-1;
if(i < 1)( i -1;

diet - 99999;
for(;;)( 1f(1 > nl)break;
d - (ch i[iJ(1J-depll)*ratio+depl2 - ch_,j[jJ[1];
if(fabs(d) < diet)( diet - fabs(d);
indice - 1;
++i;
if(dist <- d_ref)( d_~j [ ~ J - indice ;
else( d_,~ [ ~ J - 2000 ;
++~;
i - i1;

for(;;)( if(i > nl)break;
indice - d_i[i];
if(d-~(indice] -- 1 &6 indice >- i2)( 1l - 1;
i2 - indices p_i[pair][1J - ch_i[i1J[1J;
P_.j[Pair][1J - ch-,j[12][1J;
++pair;
p_i(pairJ[OJ - ch_i[i1J(1]+1;
p_~[pair][OJ - ch_j[i2][1]+1;
1f(1 < n1)( ratio - (ch_j(n2J[lJ-p_~[pair][OJ)/
(float)(ch i[n1J[1]-p_i[pair)[OJ);
depll - p i[pair][0];
depl2 - p_,j[pair][O];
) else( ratio - 0;
depll - depl2 - 0;

++i1 ;
++i2 ;
break;) ++i;
) if(sortie)break;
p i(O][OJ - p-~[OJ[OJ - pair-1;
parse - 0;
ch_cour - 1;
1l - 1;
i - ch[O](O];
for(;;)( if(i -- 0 is ch_cour > pair ;i passe)break;
if(p-i(ch_courJ[OJ -- levee_i[ch[iJ[O]J[OJ ~
p i(ch cour](1J > levee_i[ch[iJ(0]](1J)( p_i[ch court[OJ - levee-i(ch[iJ(OJJ[lJ+1;
--i;
else if(p-i[ch cour][OJ - levee_i(ch[iJ[O]J[OJ &~
p_i[ch court[1] -- levee_i[ch[iJ[OJJ[lJ)( --i;
++ch cour;

else if(p_i[ch court[OJ < levee_i[ch[i][OJ][O] &&
p-i[ch court[1] > levee_i[ch[i][OJ](1]){
r_i(il][0] - p-i[ch cour][O];
r_i[il++j[1] - levee_i[ch[i](0]J(O];

V~"~ 92/13816 ~ ~ 9 g 3 ~ ~ v PCT/CA92/00052 p_i[ch tour][OJ - levee_i[ch[i][OJJ(1J+1;
--i;
else if(p-i[ch court[OJ < levee_i(ch[ij(OJJ[Oj 6~b~
p-i[ch tour][1] -- levee i[ch(iJ[OJ][1J)( r_i[i1J(0] - p_i[ch tour][OJ;
r_i[il++j(1] - levee i[ch[i][0]][OJ;
++ch tour;
--i;
else( r_i[11J[O] - p i(ch_courj(OJ;
r_1[11++ -][1] - p_i(ch tour][1J;
++ch tour;

for(;;)( if(ch_cour -- pair)break;
r_i[ilj[Oj - p_i[ch cour](O];
r_i[il++J(lj - p i[ch~courJ(1];
++ch tour;

r 1(0][O] - 1l-1;
)_ ch_cour - 1;
12 - 1;
i - ch(OJ[OJ;
for(;;)( if(i -- 0 " ch_cour > pair ;~ passe)break;
if(p-j[ch tour][OJ -- levee_~[ch(1J(lJJ(OJ 6~&
p_~[ch tour][1] > levee_~[ch[iJ[lj](lJ)( p_f(ch_court[oJ - levee-][ch(i][1JJ(1]+1;
--i;
else if(p_j[ch cour](OJ -- levee_f[ch[ij[1J][0] d~d~
p_j[ch court[1] - levee-][ch[i][1]j[1])( --i;
++ch tour;
else if(p_j[ch tour][OJ < levee-][ch[i][ljj[O] b~
p_j[ch court[LJ > levee_j(ch[ij[1]J(1])( r_~(12J[O] - p_~[ch tour][OJ;
r_~j(i2++J[1] - levee_~[ch[ij[1]][O];
p-j(ch court[Oj - levee-][ch(iJ[1]J(1J+1;
--i;

else if(p_j(ch cour](O] < levee_~j[ch(iJ[1JJ(OJ &&
p-~[ch court[1J -- levee_~[ch[i][1JJ[1J)( r_j(i2J[OJ - p_j[ch court[OJ;
r_~(i2++)[1J - levee-][ch(i)[1))(OJ;
++ch tour;

--i;
else[
r_j[i2][O] - p_j[ch tour][O];
r_j[12++](1] - p_j(ch tour][1];
++ch tour;

for(;;)( if(ch_cour -- pair)break;
r_j[i2][O] - p_j[ch tour][0];
r-j(12++][1] - p_j(ch cour](1];
++ch tour;
r_j(0][O] - i2-1;
) double cor_reg sig(Sr,St,R_ch,T ch,Type) struct SIG *Sr;
struct SIG *St;
Ch car R_ch;
Ch car T_ch;
int Type;
( int i;
int j;
int k;
int Indice_initial-0;
int Ajust_nb_ech -1;
int Nb_ech_local;
int Nb ech-global-0;
int Nb_ech_ref;
int Nb_ech_test;
int Nb_chaine;
double Decal-0.25;
double V_ref[1000];
double V_test(1000];
double Cor reg local;
double Cor_reg_global-0.;
if(Type -- ANG)( Indice_initial - 1;
Ajust nb ech - 0;

Nb chaine - R ch[O][O];
i -- 1;
for(;;)( if(i > Nb chaine)break;
Nb_ech_ref - (R ch[iJ[1]-R_ch[i][0])+Ajust nb ech;
Nb_ech test - (T ch[i][1J-T_ch[i][0])+Ajust nb ech;
Nb ech local - max(Nb_ech ref,Nb ech_test);

"""92/13816 ~~$93~ 1 ~j - 0;
k - Indice-initial + R ch[ij[O];
for(;;)[
if(~ -- Nb_ech_ref)break;
V ref[~++] - (double)Sr->dyn[k++].vi[Type];
1_ - 0;
k - Indice_initial + T ch[i][Oj;
for(;;)( if(~ - Nb_ech_test)break;
V test[,j++] - (double)St->dyn[k++].vi[Type];
)_ Cor reg local-cor_reg ch(V ref,V test,Nb_ech ref,Nb ech teat, Decal);
Cor reg-global +- (Cor reg loca1 * Nb ech_local);
Nb_ech_global +- Nb ech local;
++i;
Cor reg_global /- (double)Nb ech_global;
return(Cor reg-global);
double pd_im sig(Sr,St,R ch,T ch) struct SIG *Sr;
struct SIG *St;
Ch_car R ch;
Ch car T ch;
f int 1;
int ~;
int k;
int Nb chaine;
int Nb_ech_ref;
int Nb_ech_test;
double Dpd-0.0;
double Dc-0.0;
float V_ref[2](1000];
float V_test[2j[1000];
Nb chaine - R ch[O][O];
1 -- 1;
for(;;)( 1f(1 > Nb chaine)break;
Nb ech_ref - (R ch[i](lj-R_ch[i](Oj)+1;
Nb ech test - (T ch[i][1]-T ch[i)[0])+1;
k - R ch[i][0];
for(;;)( if(j++ -- Nb_ech_ref)break;
Dc +- hypot(Sr->dyn(kj.vc[X],Sr->dyn[k].vc[Y]);

WO 92/13816 ~ ~ ~4~ ~ ~ ~ PGT/CA92/0005?
k++;
j-0;

k - R ch[i](OJ;

for(;;)( if(j - Nb_ech ref)break;

V_ref[OJ[~J Sr->dyn[kJ.vc[XJ;
-V_ref(lJ(jJ Sr->dyn[k++J.vc(Yj;
-~ - 0;

k - T ch[i](O];

for(;;)( if(~ -- Nb_ech-test)break;

V_test[OJ(~J - St->dyn[k].vc[XJ;

V_test(lJ[,jJ - St->dyn[k++J.vc[YJ;

Dpd +- pd_im-ch(V_ref,V_test,Nb ech ref,Nb ech_teat);
++i;

Dpd *- (50./Dc);
return(Dpd);

void pd_comp(1_i,l_j,ch,ratio) int 1 i[100][3J,1_~[100][3J,ch(100J[2J;
double ratio;
int i,~,k,n,sortie;
int i_o,j o,ch_precede;
int match[SOJ(50J;
double diet[100J[2J;
float dist_temps,dist duree;
float d,d o;
int diet lev i,dist lev ~,lev_i,lev j,lev 1 o,lev ~ o;
_ _ _ 1 - 0;
for(;;)( if(i > l i[0][O])break;
diet[iJ[OJ - 1.0e+30;
..++i;
) dist(OJ(1] - 1.0e+30;
dist_temps - l i[1J[0]*ratio - 1_~[1][OJ;
dist_duree - 2*((1_i[lJ[lJ-1_i(1][O])-(1-~j[1][1]-1_~j[lJ[0]));
diet[1J[1J - hypot(dist temps,dist duree);
mat ch[lJ[lJ - DIAGONAL;
I

20993'1 ""' 92/13816 PCT/CA92/00052 i - 2;
j - 1;
for(;;)( if(j > 1_j[OJ[OJ)break;
for(;;)( if(i > 1_i(OJ[OJ)break;
dist_temps - l i[iJ[O)*ratio - 1-j[j][OJ;
dist_duree - 2*((1 i[i](1J-1_i[1J(OJ)-(1_~[jJ[1J-1_j(jJ(O]));
diet[iJ(1J - hypot(dist_temps,dist_duree);
if((dist[iJ(OJ < dist(i-1J(OJ) &~ (dist(iJ[OJ < dist(i-lJ(1J))( dist(iJ[1] - diet[iJ[lJ + dist(iJ[OJ;
mat ch[iJ(jJ - VERTICAL;

else if((dist(i-1J[1J < dist(i-1](OJ) b~& (diet[i-1J[1J < diet[iJ[OJ))( diet[iJ(lJ - dist(iJ[1J + diet[i-1](lj;
mat ch[iJ(jJ - HORIZONTAL;
else( dist(iJ(1J - dist(1J(1] + dist(i-1J[OJ;
mat ch[iJ(~J - DIAGONAL;

i++ ;
++~;
if(j > 1-~[OJ[OJ)break;
k - 0;
for(;;)( if(k > l i[OJ[OJ)break;
dist(k](O] - diet[kJ[1J;
k++;

1 - 1;
sortie - FAUX;
n - 1;
1 - l 1[0J(0];
~ - 1_~[01[OJ.
ch_precede - DIAGONAL;
if((dist(i-lJ(1J < diet[iJ[1J) ~& (dist(i-lJ[1J < dist(iJ(O]))( --i;

else if((dist(iJ(O] < dist(i-1J(lJ) && (dist(iJ[OJ < dist(i][1J))( __j;

for(;;)( if(sortie -- VRAI)break;
if(mat_ch(iJ(j] -- DIAGONAL && ch_precede -- DIAGONAL)( ch(nJ[OJ - i;
ch(n++J[1J - j;

WO 92/13816 ' --i;
if(i -- 0 ~& ,j -- 0)( sortie - VRAI;

else if(mat_ch[i][j] -- VERTICAL)( d_o - 1.0e+30;
for(;;)( dist_temps - l i[i][OJ*ratio - 1-~[~J[OJ;
dist_duree -2*((1_i[ij[1]-1 i[iJ[O])-(1_j[,jj[lJ-1_j[~][OJ));
d - hypot(dist_temps,dist duree);
if(d < d_o)( d o - d;
,J
if(mat ch[i][,jJ !- VERTICAL)break;
_-ch(nJ[OJ - 1;
ch[n++][1] - ~ o;
if(mat ch[iJ[~] - DIAGONAL)( --i;
--j;
ch-precede - DIAGONAL;
else if(mat ch[1J[jj -- HORIZONTAL)( --i;
ch_precede - HORIZONTAL;

if ( i -- 0 b~b~ ~ -- 0 ) sortie - VRAI;
) else if(mat_ch[iJ[~J ~ HORIZONTAL)( d_o - 1.0e+30;
for(;;)( dist temps - l i[iJ[0]*ratio - 1_,j[~J[OJ;
dist~_duree-2*((1 i[ij[lj-1 i[iJ[0])-(1_~[jJ[lJ-1_,j[,jj[OJ));
d - hypot(dist temps,diat duree);
if(d < d_o)( d_o - d;
i o - i;
)_ if(mat ch[ij[~] I- HORIZONTAL)break;
--i;

ch[n][O] - i_o;
ch[n++J[1]
if(mat ch(iJ[jJ -- DIAGONAL)( --i;
__ 2 0 9 9 3 71 p~/CA92/00052 '"'~ 92/13816 ch precede - DIAGONAL;
1 _ else if(mat ch[i](jJ -- VERTICAL)( --j;
ch_precede - HORIZONTAL;

if(i--06~d~ j--0)( sortie - VRAI;

ch[OJ[OJ - n -1;
if(mode_vds & DEBUG)( i - 0;
for(;;)i if(i > ch[OJ[OJ)break;
printf("X3d - X3d",ch[iJ[OJ,ch[iJ[1J);
++i;

printf("\n");
return;
( n - 1;
1 - 1;
lev_i - ch[1J(O];
lev_j - ch[i](1J;
lev 1 o - 1 1(0][O)+1;
lev_~ o - 1-j[OJ[OJ+1;
dist_lev_i - l i[lev i o][O] - 1 1[lev iJ[1J;
diet lev_j - 1_j[lev j oJ(OJ - 1_j[lev_jJ[1J;
for(;;)( if(dist_lev_i > dist lev_j)( if(dist_lev_i * ratio < 1.33 * dist lev_j)( ch(nJ(O] - lev_i_o - lev_i;
ch[nJ[1J - lev_j o - lev_j;
++n;

else( if(dist_lev_i * ratio > 0.75 * tlist lev_j)( ch(nJ[OJ - lev_i o - lev_i;
ch[nJ[1J - lev_~ o - lev_j;
++n;
) ++i;
if(i > ch[OJ[OJ)break;
lev_i - ch[iJ(OJ;
lev-~j - ch[i](1J;
ratio - (1 i[lev_i_oJ(OJ-7)/(float)(1_j[lev_j of[O]-7);
dist lev_i - 1_i[lev_i of[OJ - 1-i[lev_iJ(1];

dist lev-~j - 1_~[lev-~ of[OJ - 1-,j[lev_~jJ[1J;
ch(OJ[O] - n-1;
if(mode_vds & DEBUG)( i - 0;
for(;;)( if(i > ch[0](OJ)break;
printf("X3d - X3d",ch[iJ(0],ch[i](lJ);
++i;

printf("\n");
) double cor reg ch(V ref,V_test,Nr,Nt,Decal) double *V ref;
double *V test;
int Nr;
int Nt;
double Decal;
l int 1;
int f ;
int s;
int Decalage;
int Indl;
int Ind2;
int L_recouv;
double Crr;
double Ctt;
double Crt;
double Cor reg;
double Cor_reg o;
double Racine_crr ctt;
double Moy ref;
double Moy_test;
Moy ref - Moy test - 0.0;
1 - 0;
for(;;)( if(i -- Nr)break;
Moy ref +- V ref[i++J;

Moy ref /- Nr;
i - 0;
for( ; ; ) if(i -- Nt)break;
Moy-test +- V_test[i++J;
Moy test /- Nt;

~'~ 92/13816 PCT/CA92/00052 Crr - 0.0;
i - 0;
for(;;)( 1f(1 -- Nr)break;
Crr +-~ (CARRE(V ref[i] - Moy_ref)) ;
i++;

Ctt - 0.0;
1 - 0;
for(;;)( if(i - Nt)break;
Ctt +- (CARRE(V_test[i] - Moy_test)) ;
i++;

if( Crr * Ctt - 0.0)( return((double)1.0);

if(Nt > Nr)( a - 0;
f - (Nt - Nr) / 2;
Decalage - (int)(Decal * Nt);
) else if(Nr > Nt)( f - 0;
s - (Nr - Nt) / 2;
Decalage - (int)(Decal * Nr);

else( f - s - 0;
Decalage - (int)(Decal * Nr);
) ( Cor_reg - -1.0;
Racine_crr_ctt - sqrt(Crr*Ctt);
i - -(Decalage);
for(;;)( 1f(1 > Decalage)break;
Crt - 0.0;
L_recouv - 0;
- Indl - s+i;
Ind2 - f ;
for(;;)( if(Indl -- Nr ~; Ind2 -- Nt)break;
if(Indl >- 0 ~& Ind2 >- 0)( Crt +- ((V ref[Indl]-Moy ref)*(V-test[Ind2J-Moy test));
++L-recouv;
) ++Indl;
++Ind2;

if((Cor_reg o - Crt / Racine crr ctt) > Cor reg)( Cor_reg - Cor_reg o;
i++;
return(Cor reg);
double pd_im_ch(V_ref,V-test,Nr,Nt) float V_ref[2][1000];
float V_test[2][1000];
int Nr;
int Nt;
int i;
int j;
int k;
int Decal_min;
int Decal_max;
int Lim_inf_fen;
int Lim_sup fen;
float Dist[[1000][2];
double Dvc x;
double Dvc_y;
Decal_min - Nr-Nt - max(max(Nr,Nt)/2.,abs(Nr-Nt));
Decal_max - Nr-Nt + max(max(Nr,Nt)/2.,abs(Nr-Nt));
Lim-inf fen - max(1+Decal min,2);
Lim_sup fen - min(1+Decal_max,Nr);
i - 0;
for(;;)( if(i > Nr)break;
Dist[i++J[O] - 1.0e+30;
i - 0;
for(;;)( 1f(1 > Nr)break;
Dist[i++][lj - 0.0;

Dist[OJ[1J - 1.0e+30;
Dvc x - V ref[Oj[OJ - V test[Oj[OJ;
Dvc~ - v_ref[1][Oj - v_test[lj[OJ;
Dist[lj[1] - hypot(Dvc x,Dvc,_y);

- 1;
for(;;)( if(~j > Nt)break;
1 - Lim_inf fen;

2x99371 ""'"192/13816 , . PCT/CA92/00052 for(;;)( if(i > Lim-sup_fen)break;
Dvc x - v_ref[Oj[i-lJ-v_test[0][~j-1J;
Dvc_y - V_ref[1J(i-lJ-V_test(1J[~-1J;
Diet[i](1J - hypot(Dvc_x,Dvc_y);
if((Dist[iJ[OJ < Dist[i-lJ[OJ) 6~ (Diet[iJ[O] < Dist[i-lJ[1J))( Dist(iJ[1J +- Dist[iJ[OJ;
else if((Dist[i-1J[1J < Dist(i-1J[O]) ~~ (Diet[i-1](1J < Dist[iJ[OJ))( Dist(iJ[1J +- Dist[i~lJ[1J;
else( Diat[i](1J +- Diat[i-1J[OJ;
i++;

Lim_inf fen - max(j+Decal min, l);
Lim_sup fen - min(+Decal max,Nr);
k - Lim_inf fen;
for(;;)( if(k > Lim_sup fen)break;
Diet[kJ[OJ - Dist[kJ[1J;
k++;

~++;
return(Dist[Nrj[1]);

/define DEB 0 ~idefine FIN 1 define GRAND 9999 define NIL_r 5000 define NIL_t 3000 int corr aegml(Ch_r,Ch_t,Ch_rc,~h_tc) Ch car Ch r;
Ch_car Ch_t;
Ch car Ch_rc;
Ch car Ch_tc;
int i,~,Nr,Nt,Ir,It;
int Nlev r-0;
int Nseg_r-1;
int Nlev_t-0;
int Nseg_t-1;
int Seg_r(200J[2J;
int Seg t[200J[2J;
int Lev_r[100J[3J;

WO 92/13816 1 : PCT/CA92/OOOSZ

int Lev_t[100J[3];

int Pair r[200](2];

int Pair_t[200][2];

int Dr(200J;

int Dt[200J;

int ch(100J[2];

float d,dist,d_ref,a,b;

int indice,Npair,Lev,chtour;

float ratio,Tr,Tt;

int fin;

int Nlev;

int sortie-FAUX;

Seg r[Nseg r][DEBJ r(Nseg rJ[DEBJ;
- Ch 1 - 2;

for(;;)( if(i > Ch r[O][O])break;

Seg r[Nseg rJ[FINJ Ch_r[i-1J(FINJ;
-if((Ch_r(iJ[DEBJ-1) - Ch r[i-1J(FINJ)( I

++Nlev r;

++Nseg_r;

Lev r(Nlev rJ[DEBJ - Seg r[Nseg rJ[DEBJCh_r[i-1](FINJ+1;
-Lev r[Nlev r](FIND - Seg r(Nseg r][FIN]Ch-r[iJ[DEB]-1;
-Lev r(Nlev r)[2] - Nseg r;

5eg r(++Nseg rJ[DEBJ- Ch r[i++J(DEBJ;

Seg r[Nseg rJ[FINJ r[i-lJ[FINJ;
- Lev_r[Nlev r+lJ(DEBJ
- Ch Seg-t[Naeg tJ(DEBJ t[Nseg_tJ[DEBJ;
- Ch j-2;

for(;;)( if(j > Ch t[OJ(OJ)break;

Seg_t[Nseg t][FINJ Ch_t[~-lJ[FINj;
-if((Ch_t[~J[DEBJ-1) - Ch t[~-lj(FINJ)( I

++Nlev t;

++Nseg_t;

Lev_t[Nlev_tJ(DEB] - Seg_t[Nseg_t][DEB]- Ch_t(~-1][FIN]+1;

Lev-t[Nlev tJ[FINJ - Seg_t[Nseg tJ[FINJ- Ch_t[~j][DEBJ-1;

Lev t[Nlev_tJ(2J - Nseg_t;

Seg t[++Nseg_tj[DEBJ- Ch t[~++][DEB];

Segit[Nseg_tJ[FIND - Lev_t[Nlev t+1][DEB] - Ch_t[~j-1J[FIND;
( ..
if(Nlev_r -- 0 ;; Nlev_t -- 0)( ch[O][OJ - 0;
else( ratio - (Seg_t[Nseg-t][FIND-Seg-t[1J[DEBJ)/
(float)(Seg-r[Nseg r][FINJ-Seg r[1][DEBJ);
pd compl(Lev r,Lev-t,Nlev r,Nlev_t,ch,ratio);

''~' 92/13816 PCT/CA92/00052 ( fin - max(Nseg r,Nseg_t);
1 - 0;
for(;;)1 1f(1 > fin)break;
Dr[ij - NIL r;
Dt[ij - NIL t;
++i;

Npair - 1;
1 - Ir - It - 1;
Nlev - ch(Oj[Oj;
for(;;)( ( if(i !- 1)( Pair_r[Npair][lj - Seg r[IrJ[lJ;
Pair_t(Npair][lj - Seg t[ItJ[lJ;
++Ir;
++It;
++Npair;
if(Nlev > 0)( Nr - Lev r[ch[NlevJ[OJJ[2J-1;
Nt - Lev t[ch[Nlevj[1Jj[2J-1;
--Nlev;
) else( Nr - Nseg r;
Nt - Nseg_t;
sortie - VRAI;
Tr - Pair_r(NpairJ[DEB] - Seg r[Irj(DEBJ;
Tt - Pair_t(Npair][DEB] - Seg t(ItJ[DEBj;
a - Seg_t(NtJ[FIND - Seg_t(ItJ(DEBJ;
b - Seg r[Nrj[FIN] - Seg r[Irj[DEBJ;
if(b !- 0.0)( ratio - a/b;
d ref - max(fabs(a-b),5);
)_ else( ratio - 1000.;
d ref - 0.;
)_ for(;;)( if(i > Nr)break;
i - Ir;

WO 92/13816 ~ PCT/CA92/00052 for(;;)( 1f(1 > Nr)break;
,j - max(It-1,1);
diet - GRAND;
for(;;)( if(~ > Nt)break;
d - fabs((Seg_r(i][FINJ-Tr)*ratio+Tt-Seg_t[~J[FINJ);
if(d < dist)( dist - d;
indice - ,j;
) if(dist <- d_ref)( Dr[i] - indices ) else( Dr[i] - NIL r;

++i;
) ~-It;
for(;;)( if(~ > Nt)break;
1 - max(Ir-1,1);
dist - GRAND;
for(;;)( if(i > Nr)break;
d - fabs((Seg r[iJ[FINJ-Tr)*ratio+Tt-Seg t[~J[FINJ);
if (d .< dist) dist - d;
indice - 1;
++i;
) if(dist <- d_ref)( Dt[,j] - indices else( Dt[~jJ - NIL t;
++,~ ;
) 1 - Ir;
for(;;)( if(i > Nr)break;
indice - Dr[i];
if(Dt[indiceJ -- 1 ~~ indice >- It)( Ir - is It - indices ~'"~ 92/13816 PCT/CA92/00052 Pair_r[Npairj(FINJ - Seg_r[IrJ(FINJ;
Pair_t(Npair][FINJ - Seg_t[ItJ(FINJ;
++Npair;
Pair_r[Npair](DEBJ - Seg r[IrJ[FIN]+1;
Pair_t(Npair](DEBJ - Seg_t[ItJ[FIND+1;
if(i < Nr)( ratio - (Seg_t(Nt][FIND-Pair_t[NpairJ[DEBJ)/
(float)(Seg r[NrD[FIND-Pair_r[NpairJ[DEBJ);
Tr - Pair r(NpairJ(DEB];
Tt - Pair_t[NpairJ[DEBD;
else( ratio - 0.0;
Tr - Tt - 0 ;

i+Ir ;
++It ;
break;) ++i;
if(sortie -- VRAI)break;
Pair r(OJ(Oj - Pair t(OJ[O] - Npair-1;

ch cour - 1;
Ir - 1;
i - ch[OJ(OD;
for(;;)( 1f(1 -- 0 " ch cour > Npair)break;
if(Pair_r[ch court[DEBJ -- Lev_r(ch[iJ(O]J[DEBJ ~~
Pair r[ch cour](FINJ > Lev_r(ch[iJ[O]J(FINJ)( Pair r[ch cour][O] - Lev r(ch[iJ[OJD(1]+1;
__i;
else if(Pair_r(ch_courJ(DEBJ -- Lev_r[ch(iJ(OJ][DEBJ ~&
Pair r[ch courD[FIND - Lev r(ch(iJ(OJ][FIND)( --i;
++ch cour;

else if(Pair_r[ch court[OJ < Lev_r[ch[iD[OJJ(OJ &&
Pair_r(ch_courJ[lD > Lev r[ch[iJ[OJJ[1J)( Ch_rc(Ir][O] - Pair_r(ch_courJ[OD;
Ch_rc[Ir++J[lJ - Lev_r(ch[iD[O]J[O];
Pair r[ch courJ(O] - Lev r[ch(i](OJJ[1]+1;
--i;
else if(Pair_r[ch court[OJ < Lev_r(ch[iJ(OJJ[OJ ~~
Pair_r(ch cour](1J -- Lev_r[ch[iJ[O]J[1J)( Ch_rc(IrJ(0] - Pair r(ch_courJ[OJ;

WO 92/13816 ~ ~ ~ ~ ~ ~ 9 6 PCT/CA92/00052 Ch_rc[Ir++](1] - Lev r[ch[i][O])[0];
++ch cour;
--i;

else( Ch rc[Ir][OJ - Pair r(ch cour](0];
Ch_rc[Ir++j[1] - Pair r[ch cour][1j;
++ch cour;

for(;;)( if(ch_cour -- Npair)break;
Ch rc(Ir][O] - Pair_r[ch courJ(O];
Ch_rc(Ir++][1J - Pair r(ch court[lJ;
++ch cour;
Ch rc[OJ[OJ - Ir-1;

ch cour - 1;
It - 1;
1 - ch(OJ[O];
for(;;)( 1f(1 -- 0 " ch cour > Npair)break;
if(Pair t[ch cour](Oj - Lev_t[ch[iJ[ljj[Oj &b~
Pair_t[ch court[1] > Lev_t[ch(ij(1jJ[1J)( Pair t[ch cour][0] - Lev_t[ch[iJ[1j][1]+1;
--i;
) else if(Pair_t[ch cour][OJ - Lev_t[ch(iJ[1jJ[OJ d~&
Pair_t(ch court[1] -- Lev t[ch(ij[1J][1J)( __i;
++ch cour;
else if(Pair_t(ch_courj(0] < Lev_t[ch[iJ[lJ][OJ 6~6~
Pair_t[ch courJ(1J > Lev_t(ch[i][1]J[1])( Ch_tc(It][O] - Pair-t[ch cour](O];
Ch_tc[It++j[1j - Lev_t[ch[ij(1Jj(Oj;
Pair-t(ch court(O] - Lev t[ch[ij[1jj(1]+1;
__i~ ' _ else if(Pair_t(ch cour][0] < Lev_t[ch(iJ[lJ](OJ ~~
Pair_t[ch court[1] - Lev_t[ch[i][1]j[1])( Ch_tc(It](O] - Pair t[ch tour][O];
Ch_tc(It++j[1] - Lev_t[ch(iJ[1j][OJ;
++ch tour;
__i;

else( Ch tc[It][O] - Pair t[ch tour][0];
Ch tc[It++][1] - Pair_t[ch tour][1];
++ch tour;

2~9937i ~'J~~' 92/13816 for(;;)( if(ch_cour -- Npair)break;
Ch_tc(It][0] - Pair_t[ch cour][OJ;
Ch_tc[It++J[1] - Pair t(ch cour](1];
++ch cour;
Ch tc(OJ[0] - It-1;
int pd compl(1_i,l_j,Nlev r,Nlev_t,ch,ratio) int Nlev_r,Nlev_t;
int 1 i[100](3],1_][100][3],ch[100][2];
double ratio;
( int i,~,k;
int n-1;
int sortie-FAUX;
int 1_o,] o;
int mat ch[50](50] ;
int ch_precede-DIAGONAL;
double diet[100][2J;
float dist_temps,dist_duree;
float d,d o;
int diet lev i,dist lev_~,lev i,lev_j,lev i o,lev_j o;
_ _ _ i - 0;
for(;;)( 1f(1 > Nlev r)break;
diet[i][0] - 1.0e+30;
++i;
) diet[OJ[1] - 1.0e+30;
dist_temps - l i(1J[O]*ratio - 1_~[1J(O];
dist_duree - 2*((1_i(1][1]-1_i[1][0])-(1_j(1][1]-1_j[1J[O]));
diet[lJ(1] - hypot(dist temps,dist duree);
mat ch[1][lJ - DIAGONAL;

i - 2;
j - 1;
for(;;)( if(] > Nlev t)break;
_for(;;)( if(i > Nlev_r)break;
dist_temps - l i[i][OJ*ratio - 1-j[jj[0];
dist_duree - 2*((1_i[iJ[1]-1_i[i](OJ)-(1_j[j][lJ-1_j[j][O]));
dist(i][1] - hypot(dist_temps,dist_duree);
if((dist(iJ(O] < dist(i-1J[O]) d~b~ (dist(i][OJ < diet[i-lJ[1]))( diet[iJ[1] - dist[iJ[1J + diet[i][OJ;
mat ch[i][j] - VERTICAL;

WO 92/13816 ~ p g 9 3 9 g PCT/CA92/00052 else if((dist[i-1J(1J < diet[i-1](O]) && (diet[i-1](1] < diet[iJ[OJ))( diet[i][1] - diet[i](1] + diet[i-1][1];
mat ch[iJ(j] - HORIZONTAL;
else( dist(i][1] - diet[i](1J + dist(i-1](O];
mat ch(i)[j] - DIAGONAL;

i++;
++j;
if(j > Nlev t)break;
k - 0;
for(;;)1 if(k > Nlev_r)break;
diet[k][O] - diet[kJ[lJ;
k++;

1 - 1;

i - Nlev r;
j - Nlev_t;
if((dist[i-lJ[1] < diet[iJ[lJ) && (diet[i-1J[1J < diet[iJ[0]))( --i;

else if((dist(i][O] < diet[i-1][1]) && (diet[i][OJ < diet[iJ[1]))( __j;

for(;;)( if(sortie -- VRAI)break;
if(mat ch[iJ[jJ - DIAGONAL)( if(ch_precede - DIAGONAL)( ch[nJ[OJ - i;
ch[n++J[lJ - j;
--i;
__j~
1f(1 -- 0 ~~ j - 0)( sortie - VRAI;
else if(mat ch[iJ[j] -- VCRTICAL)( d o - 1.0e+30;

~Qg9~'~~.
1' ~- 92/13816 PCT/CA92/00052 for(;;)( dist_temps - l i(i][OJ*ratio - 1_~[~J(OJ;
dist_duree -2*((1_i[iJ(lJ-1 i[iJ[OJ)-(1_~[,j](1]-1_~j[~J[O]));
d - hypot(dist-temps,dist duree);
if(d < d_o)( d o - d;
o. - ,J

if(mat ch(i][~J !- VERTICAL)break;
ch(nJ(OJ - 1;
ch[n++J [ 1 J - ,J o;
if(mat ch[iJ(~J -- DIAGONAL)( --i;
--3.
ch_precede - DIAGONAL;

else if(mat ch[i][jJ - HORIZONTAL)( --i;
ch precede - HORIZONTAL;
if(i -- 0 ~~ ~ -- 0)( sortie - VRAI;
) ) else if(mat ch[i][~J -- HORIZONTAL)( d_o - 1.0e+30;
for(;;)( dist_tempa - l i[i](0]*ratio - 1_,j(j][OJ;
diat_duree-2*((1_i[1J[1J-1 i[iJ[OJ)-(1_j[jJ(1]-1_j[,JJ(O]));
d - hypot(dist temps,diat_duree);
if(d < d_o)( d_o - d;
i o - 1;
)_ if(mat ch(i][~J I- HORIZONTAL)break;
--i;
I
ch[nJ[O] - 1_o;
ch[n++J(1J - ,J;
if(mat ch[iJ[~J -- DIAGONAL)( --i;
ch-precede - DIAGONAL;
) else if(mat ch[iJ[~J - VERTICAL)( ch_precede - HORIZONTAL;

1.00 1f(1 -- 0 ~~ j -- 0)~
sortie - VRAI;
ch(OJ(OJ - n-1;

V ~" 92/13816 PCT/CA92/00052 /* Listing -> file acqui.c */
/include "vds.h"
extern char mode vsl;
struct SIG *acqui sig(Mode,Fa) int Mode;
struct FA *Fa;
( struct SIG *Sig;
if((Sig - (struct SIG *)calloc(l,sizeof(struct SIG))) -- NULL)( printf("Erreur ~ 1'allocation de sig\n");
return(NULL);
if(Mode -- PENCEPT ~~ Mode -- SUMMA)( efface();
printf("\033[6;30H\033[lmPROCEDURE POUR SIGNER\033[Om");
printf("\033[9;1OH1. Prendre 1e crayon et signer votre signature.");
printf("\033[ll;lOH");
printf("2. Lorsque vous aurez termini, presser 1'interrupteur");
printf("\033[l2;lOH du crayon.");
printf("\033[l4;lOH");
printf("3. Un signal sonore, se fera entendre pour signifier la fin"
).
printf("\033[lS;lOH de 1'acquisition de la signature");
printf("\033[l7;lOH4. Un message sera alors affich~ ~ 1'~cran.");
printf("\033[22;SH\033[7m COMMENCER LA PROCEDURE I \033[Om");

if(acquisition(Hode,Sig,Fa))( free((char *)Sig);
return(NULL);

conver(Sig);
param_sp(Sig);
seg dyn(Sig);
pretraite-i(Sig);
( if(Mode - PENCEPT ;; Mode - SUMMA)( efface();
printf("\033[1;4m\033[12;31HS I G N A T U R E");
printf("\033[14;29HE N R E G I S T R E E\033(Om");
printf("\a");
return(Sig);

int acquisition(Mode,Sig,Fa) int Mode;
struct SIG *Sig;

WO 92/13816 v PCT/CA92/00052 struct FA *Fa;
int 1;
int Proxi;
int Commut;
int Etat_pointe;
int Dx;
int Dy;
int Angx;
int Angy;
int Desynchro;
char Date[10];
char Heure[lOJ;
char Ligne[81J;
double Coor(NB PT MAX](2];
FILE *Ptr;
if(Mode ~ PENCEPT ;; Mode -- SUMMA)( ( for(;;)( synchronise(Mode,&Proxi,~Commut,&Etat_pointe);
if(Proxi 6~& Etat-pointe)( Sig->dyn(OJ.pointe - Etat_pointe;
acqui_coor(Mode,~Dx,~Dy,&Angx,~Angy);
Coot[O][XJ - (double)(Dx)*.00254;
Coot[O][YJ - (double)(Dy)*.00254;
break;) ) for(;;)( synchronise(Mode,&Proxi,~Commut,~Etat_pointe);
if(Proxi)( Sig->dyn(1].pointe - Etat-pointer acqui_coot(Mode,&Dx,&Dy,b~Angx,~Angy);
Coot[1J[XJ - (double)(Dx)*.00254;
Coor(1][YJ - (double)(Dy)*.00254;

if(hypot(Coor[1][X]-Coor[O][X],Coor(1](Y]-Coor[0][Y]) > 0.0127)break;
Desynchro - FAUX;
1 - 2;
for(;;)( if(synchronise(Mode,~Proxi,&Commut,&Etat_pointe))( Desynchro - VRAI;
if(Proxi)( acqui coot(Mode,&Dx,&Dy,&Angx,b~Angy);
if ( Desyrichro - VRAI ) ++i;
Sig->dyn(iJ.pointe - Etat_pointe;
Sig->dyn[i-lJ.pointe - Etat pointer Coot[i][X] - (double)(Dx)*.00254;
Coot[i][YJ - (double)(Dy)*.00254;

20~93'~~ , ~""~ 92/13816 PCT/CA92/00052 Coor(i-1J[XJ - (Coot[iJ[XJ + Coor[i-2J[XJ) / 2.;
Coot[i-1][YJ - (Coot[iJ(YJ + Coor(i-2J(Y]) / 2.;
Desynchro - FAUX;
filtre(i-l,Coor,Sig);
filtre(i ,Coor,Sig);
derive(i-l,Coor,Sig);
derive(i ,Coor,Sig);
else( Sig->dyn[iJ.pointe - Etat_pointe;
Coot[iJ[XJ - (double)(Dx)*.00254;
Coot[i][YJ - (double)(Dy)*.00254;
filtre(i,Coor,Sig);
derive(i,Coor,Sig);
++i;

if((Commut b~ i > 50) " (1 >- 990))break;
for(;;)( --i;
if(Sig->dyn[iJ.pointe ;; 1 < 51)break;
) Sig->info.nb point - i+1;
sprintf(Fa->fich,"XsX03dX03d.aX02d\0",Fa->source,Fa->n sig, Fa->n imi ,Fa->n essai);
if((Ptr - fopen(Fa->fich,"w+")) -- NULL)( printf("\nErreur a 1'ouverture de Xs\n",Fa->fich);
else( strdate(Date);
_strtime(Heure);
fprintf(Ptr,"@ X03d X03d AX02d X04d Xa Xs\n",Fa->n sig, Fa->n imi,Fa->n essai,Sig->info.nb_point,Date,Heure);
_1 i - 0;
for(;;)( if(i -- Sig->info.nb_point)break;
fprintf(Ptr," Xld X05d X05d\n",Sig->dyn[i].pointe, (int)Coot[i](XJ,(int)Coor[i](Y]);
++i;
I
fclose(Ptr);
) else if(Mode -- FICHIER)( ( sprintf(Fa->fich,"XsX03dX03d.aX02d\0",Fa->source,Fa->n_sig, Fa->n_imi ,Fa->n essai);

1.0 4 if((Ptr - fopen(Fa->fich,"r+")) -- NULL)( return(1);
I
else( fgets(Ligne,80,Ptr);
) for(;;)( if(fscanf(Ptr,"Xd Xd Xd\n",&Etat_pointe,&Dx,&Dy) -- EOF)break;
if(Etat-pointe)( Sig->dyn(O].pointe - Etat_pointe;
Coor[OJ(XJ - (double)(Dx)*.00254;
Coor[OJ[YJ - (double)(Dy)*.00254;
break;) for(;;)( if(fscanf(Ptr,"Xd Xd Xd\n",bEtat_pointe,&Dx,~Dy) -- EOF)break;
Sig->dyn[lJ.pointe - Etat_pointe;
Coor[1][X] - (double)(Dx)*.00254;
Coor[1J[Y] - (double)(Dy)*.00254;
if(hypot(Coor[lJ[XJ-Coor(OJ[XJ,Coor[1][YJ-Coor[OJ[Y]) > 0.0127)break;
1 - 2;
for(;;)( if(fscanf(Ptr,"Xd Xd Xd\n",~Etat_pointe,&Dx,~Dy) -- EOF ;~ i >
990)break;
Sig->dyn[ij.pointe - Etat_pointe;
Coor[ij[X] - (double)(Dx)*.00254;
Coor[ij[Y] - (double)(Dy)*.00254;
~iltre(i,Coor,Sig);
derive(i,Coor,Sig);
++i;

for(;;)( --i;
if(Sig->dyn[iJ.pointe)break;
Sig->info.nb_point - i+1;
fclose(Ptr);
) return(0);

void conver(Sig) struct SIG *Sig;
int i;
int n;
double a[2J;
double b[2J;

~' ~" 92/ 13816 n - Sig->info.nb_point - LF FD;
i - LF_FD;
for(;;)( if(i -- n)break;
Sig->dyn[iJ.vi[CURVIJ-hypot(Sig->dyn[i].vc[X],Sig->dyn[iJ.vc[Y]);
a[OJ - Sig->dyn[i-lJ.vc[XJ;
a[1] - Sig->dyn[i-lJ.vc[YJ;
b[OJ - Sig->dyn[iJ.vc[XJ;
b[lJ - sig->dyn[iJ.vc[YJ;
Sig->dyn[iJ.vi[ANGJ - var angle(a,b);
++i;

void seg dyn(Sig) struct SIG *Sig;
int 1;
int n;
int Nb_ch-1;
int Nbpt ch-1;
int Nbpt 1v-0;
Sig->info.nb composante - 0;
1 - Sig->ch[Nb chJ[OJ - LF FD;
n - Sig->info.nb_point - LF FD;
for(;;)( if(i -- n)break;
if(Sig->dyn[i-1].pointe > 0 ~& Sig->dyn[iJ.pointe > 0)( if( Sig->dyn[i].vi[CURVIJ <- (Sig->info.vit moy/S VIT CITRVI))( if(fabs(Sig->dyn[i].vi[ANGJ) >- S VIT_ANG)( if(Nbpt ch >- S_NB_POINT)( Sig->ch[Nb chJ[lJ - i-1;
Sig->ch[++Nb chJ[OJ - 1;
Nbpt ch - 0;

Nbpt ch++;
else if(Sig->dyn[i-1].pointe > 0 &6~ Sig->dyn[i].pointe - 0)( Nbpt 1v - 1;
else if(Sig->dyn[i-lJ.pointe -- 0 ~& Sig->dyn[iJ.pointe -- 0)( if(++Nbpt 1v -- 3)( ++(Sig->info.nb composante);
if(Nbpt ch >- S_NB_POINT)( Sig->ch[Nb ch++J[lJ - i-4;

~ U ~ 9 3'~ ~. l06 else if(Sig->dyn[i-1].pointe -- 0 ~& Sig->dyn[iJ.pointe > 0)( if(Nbpt 1v >- 3)( Sig->ch[Nb chJ[O] - i;
Nbpt ch - 1;

else( Nbpt ch +- Nbpt 1v;

++i;
if(Nbpt ch >- S_NB_POINT)( Sig->ch[Nb chJ(lJ - i-1;
else( Nb ch--;
Sig->info.nb chaine - Sig->ch[O][O] - Sig->ch(OJ[1] - Nb ch;
void param_sp(Sig) struct SIG *Sig;
( int i;
int n;
Sig->info.Dlv - Sig->info.Dar - Sig->info.Dap - 0.0;
Sig->info.vit moy - 0.0;
1 - LF_FD;
n - Sig->info.nb_point - LF FD;
for(;;)( 1f(1 - n)break;
if(Sig->dyn(i].pointe -- 0)( Sig->info.Dlv +- 1.;
if(Sig->dyn[i].vi(CURVI] < 0.8)( Sig->info.Dar +- 1.;
if(Sig->dyn[iJ.vi[ANG] >- 0.0)( Sig->info.Dap +- 1.;

Sig->info.vit moy +- Sig->dyn[iJ.vi(CURVIJ;
++i ;

Sig->info.Dtot - (Sig->info.nb-point - Sig->info.Dlv - 2 * LF PB)/100.;

209~3'~~
V~° 92/13816 PCT/CA92/00052 Sig->info.Dlv /- (double)(Sig->info.nb_point - 2 * LF_PB);
Sig->info.Dar /- (double)(Sig->info.nb_point - 2 * LF_FD);
Sig->info.Dap /- (double)(Sig->info.nb_point - 2 * LF_FD);
Sig->info.vit moy /- (double)(Sig->info.nb-point - 2 * LF FD);
void pretraite i(Sig) struct SIG *Sig;
( int 1;
int ~;
int n;
int.Nb_min-1;
int Nb-pt-1;
int Recherche-MIN;
double Vect[100][2J;
double Xmin;
double Xmax;
double Del_x;.
double Angle;
double Angle o-3.0;
double m;
double b;
double Cos angle;
double Sin_angle;
double X_rot;
double Y_rot;
double X_temp;
double Y_temp;
f - 0;
for(;;)( if(~ - 2)break;
1 - LF_PB;
n - Sig->info.nb_point - LF PB ;
for(;;)( if(Recherche -- MIN)( for(;;)( if(Sig->dyn[i+1].cc[YJ > Sig->dyn[i].cc[YJ
6~ Nb pt > 5 d~ Sig->dyn[iJ.pointe)( Recherche - MAX;
if(Nb min < 100)( Vect[Nb minJ[xJ - sig->dyn[iJ.cc[xJ;
Vect[Nb min++J[YJ - Sig->dyn[iJ.cc[YJ;
Nb_pt - 1;
) i++;
break;) i++;
Nb_ptf+;
if(i -- n)break;

) 1f(1 -- n)break;
if(Recherche -- MAX)( for(;;)( if(Sig->dyn[i+1].cc[Y] < Sig->dyn[iJ.cc[Y) &&
Sig->dyn[i].pointe)( if(Nb_pt > 5)( Nb_pt - 1;

else( Nb min--;
Recherche - MIN;
i++;
break;) i++;
1f(1 -- n)break;
) if(i -- n)break;
if(Nb_min < 2)( Vect[OJ[XJ - Sig->dyn[LF PBJ.cc[X];
Vect[O)[Y] - Sig->dyn[LF PB).cc[Y);
Vect[1[[X] - Sig->dyn[n]-cc[X];
Vect[1J[Y] - Sig->dyn[n).cc[Y];
Nb min - 2;
if(reg lin(Vect,Nb min,b~m,&b))( printf("\nErreur suite au calcul de la ligne de base\n");

X_rot - Sig->dyn(LF PB].cc[X];
Y_rot - m * X_rot + b;
Angle - -atan(m);
if(fabs(Angle) < fabs(Angle o))( Angle_o - Angle;
if(fabs(Angle) < 1.0)( Cos angle - cos(Angle);
Sin_angle - sin(Angle);
i - LF_PB;
for(;;)( if(i -- n)break;
X_temp - Sig->dyn[i].cc[XJ - X_rot;
Y temp - Sig->dyn[i].cc[YJ - Y_rot;
Sig->dyn(iJ.cc[X] - X_temp * Cos angle - Y_temp * Sin angle;
Sig->dyn[i].cc[Y] - X temp * Sin angle + Y_temp * Cos angle;
++i;

~~09g3 ~ ~

~~ 92/13816 ++~.
( Xmin - 20000.;
Xmax - -20000.;
i - LF_PB;
for(;;)( if(i -- n)break;
if(Sig->dyn[i].cc[XJ < Xmin)( Xmin - Sig->dyn[i].cc[XJ;
) if(Sig->dyn[iJ.cc[X] > Xroax)[
Xmax - Sig->dyn[iJ.cc[XJ;
++i;

Del x - Xmax - Xmin;
1 - LF_PB;
for(;;)( if(i -- n)break;
Sig->dyn(i].cc[XJ - (Sig->dyn[i].cc[XJ-Xmin)*10000./Del x;
Sig->dyn[iJ.cc[YJ - Sig->dyn[iJ.cc[YJ*5000./Del x;
++i;

void filtre(i,Coor,Sig) int i;
double Coor[J[2J;
struct SIG *Sig;
( int Indices int Depha;
int k;
int Nb_coef;
static double Coef[]-0.03704, 0.11111, 0.22222, 0.25926, 0.03704, 0.11111, 0.22222);
Nb_coef - 2 * LF_PB + 1;
if(i >- Nb_coef-1)( Indice - i - (Nb coef - 1) / 2;
Depha - Indice - (Nb coef - 1) / 2;
Sig->dyn[IndiceJ.cc[X) - Sig->dyn[IndiceJ.cc[YJ - 0.0;
k - 0;
for(;;)( if(k -- Nb_coef)break;
Sig->dyn[IndiceJ.cc[X] +- (Coef(k] * Coor[Depha+k][XJ);

WO 92/13816 , 1 PCT/CA92/00052 Sig->dyn[IndiceJ.cc[YJ +- (Coef[kJ * Coor[Depha+kJ[YJ);
++k;

) void derive(i,Coor,Sig) int i;
double Coor[J[2];
struct SIG *Sig;
int Indices int Depha;
int k; ' int Nb_coef;
static double Coef[J--0.00459, -0.01316, 0.00504, 0.04514, 0.03514, -0.07201, -0.19204, -0.17550, 0., 0.17550, 0.19204, 0.07201, -0.03514, -0.04514, -0.00504, 0.01316, 0.00459);
Nb_coef - 2 * LF_FD + 1;
if(i >- Nb coef-1)( Indice - 1 - (Nb coef - 1) / 2;
Depha - Indice - (Nb coef - 1) / 2;
Sig->dyn[Indice).vc[X] - Sig->dyn[Indice].vc[YJ - 0.0;
k - 0;
for(;;)( if(k -- Nb_coef)break;
Sig->dyn[Indice].vc[X] +- (Coef[kJ * Coor[Depha+kJ[X]);
Sig->dyn[IndiceJ.vc[Y] +- (Coef[kJ * Coor[Depha+kj[YJ);
++k ;
Sig->dyn[IndiceJ.vc[X] *- 100.;
Sig->dyn[IndiceJ.vc[YJ *- 100.;
int synchronise(Mode,Proxi,Commut,Etat_pointe) int Mode;
int *Proxi;
int *Commut;
int *Etat_pointe;
( .
int is int Octet;
if(Mode -- PENCEPT)( ( i - 0;
for(;;)( Octet - recoie();

9 3 71 pCT/CA92/00052 ~'~ ~ 92/13816 if((Octet ~ Ox40))break;
1f(++1 -- 9)break;

if(i I- 9)( *Proxi - Octet & 0x01;
*Commut - Octet & 0x02;
*Etat-pointe - Octet ~ 0x04;
return(0);

else( return(i);

else if(Mode -- SUMMA)( i - 0;
for(;;)( Octet - recoie();
if((Octet ~ Ox80))break;
if(++i -- 6)break;
1f(1 1- 6)( *Proxi - 1(Octet ~ 0x40);
*Commut - Octet ~ 0x02;
*Etat_pointe - Octet ~ 0x01;
return(0);

else( return(i);

void acqui coor(Mode,Dx,Dy,Ax,Ay) int Hode;
int *Dx;
int *Dy;
int *Ax;
int *Ay;
int Octet;
if(Mode -- PENCEPT)( ( _ Octet - recoie();
*Dx - (Octet & Ox3f) ; ((Octet ~ 0x80) » 1);
Octet - recoie();
*Dx ;- (((Octet & Ox3f) ; ((Octet & 0x80) » 1)) « 7);
Octet - recoie();
*Dy - (Octet ~ Ox3f) ; ((Octet ~ 0x80) » 1);
Octet - recoie();

WO 92/13816 , - -*Dy ;- (((Octet & Ox3f) ; ((Octet 6 0x80) » 1)) « 7);
Octet - recoie();
*Ax - (Octet ~ Ox3f) ; ((Octet ~ 0x80) » 1);
Octet - recoie();
*Ay - (Octet & Ox3f) ~ ((Octet & 0x80) » 1);
Octet - recoie();
*Ax - (((Octet & 0x07) « 7) i *Ax ) b Ox03ff;
*Ay - (((Octet d~ 0x38) « 4) ; *Ay ) ~ Ox03ff;

elae if(Mode - SUMMA)( ( Octet - recoie();
*Dx - Octet ~ Ox7f;

Octet- recoie();

*Dx - ((Octet ~ Ox7f) i 7);

Octet- recoie();

*Dy - Octet ~ Ox7f;

Octet- recoie();

*Dy - ((Octet ~ Ox7f) i 7);

int recoie() int Octet;
int Drapeau;
for(;;)( Drapeau - inp(Ox3FD);
if(Drapesu & Ox01)break;
Octet - inp(Ox3F8);
return(Octet);

double var_angle(vl,v2) double vl[2J;
double v2[2J;
( double Theta;
double Prod_norme;
double Prod scal;
double Prod vect;
Prod_scal - vl[OJ*v2[0~ + vl[1]*v2[1J;
Prod_norme - hypot(vl[O],vl[1])*hypot(v2[OJ,v2[1]);
if(Prod_norme -- 0.0)( return(0.0);

if((Prod_scal / Prod norme) > 1.0)( return(0.0);

Wa.92/13816 ~ PCT/CA92/00052 else( Theta - acos(Prod_scal / Prod norme);
Prod_vect - vl[OJ*v2[lJ - vl[lJ*v2[OJ;
if(Prod vect < 0.0)( return(-Theta);
else( return(Theta);
int reg lin(Vect,n,m,b) double Vect[J[2];
int n;
double *m;
double *b;
int 1;
double Som x;
double Some;
double Som_x carte;
double Som_x_y;
double Det;
Som_x - Som_y - Som_x_carre - Som_x~~ - 0.0;
i - 0;
for(;;)( if(i -- n)break;
Som_x +- Vect[iJ[X];
Som_y +- Vect[iJ[Y];
Som_x carte +- (CARRE(Vect[i][XJ));
Som_x_y +- (Vect[iJ[XJ*Vect[iJ[YJ);
i++;

Det - n * Som_x_carre - CARRE(Som_x);
if(Det -- 0.0)( *m - *b - 0.0;
return(1);
) else( *m - (n * Soro x_y - Som_x * Som_y) / Det;
*b - (Som x carte * Som_y - Som x_y * Som x) / Det;
return(0);
)_ WO 92/13816 2 p g g 3 r( 1 114 PCT/CA92/00052 /* Listing -> file lib.c */
/include "vds.h"
void efface(void) int 1;
printf("\033[Om");
1 - 5;
for(;;)( if(i > 19)break;
printf("\033[Xd;2H ",1);
printf (" " ) ' i ++i;
printf("\033[21;2H ");
printf (" ") ;
printf("\033[22;2H ");
printf(" ");
printf("\033[23;2H ");
printf (" ") ;
printf("\033[lm\033[23;1H~I\033[22;80H~~\033[Om");
void cadre(void) ( int ~;
printf("\033[Om\033[2J\033[lm");
j-1;
for(;;)( if(~ > 2)break;
printf(" ");
printf(" \033~24;1H");
++~;
printf("~\033[1;1H~\033[1;80H~\033[24;80H~\033[2;1H");
,j-2;
for(;;)( if(,j > 23)break;
printf("~\033[Xd;80H~~",~);
++~;
void delai(duree) double duree;
( time_t start, fini;
time(&start);
for(;;)( time(~fini);
if(difftime(fini,start) > duree)break;

~ 92/13816 ~ ~ ~ ~ 3 71 PCT/CA92/00052 int acceptation(void) ( int rep;
for(;;)( rep - getch();
if(rep -- 'o' ii reP
return(1);
break;) else if(rep - 'n' ;; rep -- 'N')( return(0);
break;) if(rep -- 27)( return(rep);
break;) void cls(void) f printf("\033[Om\033[2J");

WO 92/13816 PCT/CA92/00052 ...
U 9 9 ~3'~ 1 Although the present invention has been explained hereinabove by way of a preferred embodiment thereof, it should be pointed out that any modifications to this preferred embodiment, within the scope of the appended claims is not deemed to alter or change the nature and scope of the present invention.

Claims (26)

WHAT IS CLAIMED IS
1. Apparatus for comparing a test handwritten signature with a reference signature where each of said test and reference signatures have been acquired by:
means for generating three electrical digital position signals characterizing a trajectory of a handwritten signature by means of a pencil provided with a point and an analog-to-digital tablet, said three signals being D x(t), D y(t) and D z,(t), where D x(t) and D y(t) are respectively position signals according to X and Y axes of a Cartesian reference with respect to time, and D x (t) is a discrete signal indicating whether or not said point is contacting said tablet;
means for low-pass filtering said D x(t) and D y(t) electrical signals;
means for taking the derivative of said D x(t) and D y(t) electrical signals for generating V x and V y electrical components which represent respectively speeds of said point according to X and Y axes of a Cartesian reference;
means for calculating V.sigma. and V.theta. values from V x and V y components where:
where V.theta. has a sign determined by:
and means for calculating handwritten components and handwritten strings, where each of said handwritten components is delimited by two successive liftings of said point along said trajectory, and each of said handwritten strings is delimited by two successive portions of said trajectory where said V.theta. value is higher than a predetermined angular speed value and where said V.theta. value is lower than a predetermined curvilinear speed value, said handwritten strings and components having beginnings and ends defining temporal marks along said trajectory by which duration of said handwriting signature is determined;
means for calculating simple dynamic parameters characterizing said test and reference signatures;
means for applying respectively a first predetermined rotating operator and a second predetermined rotating operator to said D x(t) and D y(t) signals for correcting inclination of said trajectory and aligning a base line of said trajectory with a horizontal base line;
and means for scaling said D x(t) signal according to said X Cartesian axis, and scaling said D y(t) signal according to said Y Cartesian axis, said apparatus comprises:
means for calculating variations of said simple dynamic parameters of said test signature with respect to said simple dynamic parameters of said reference signature, by calculating a first evaluating function C1 where:
FC1i(RC1i) is a function representative of the variations of a particular dynamic parameter where i indicates the parameter in question, and pi is a weight given to a particular parameter of said simple dynamic parameters;
means for comparing C1 with a first threshold value, and rejecting said test signature if C1 passes said first threshold value;
means for calculating a classifying function C a where:
C a = al - C1 where al is a weight given to said first evaluating function C1;
means for comparing said classifying function C a with a second threshold value, and rejecting said test signature if C a passes said second threshold Value;
first means for comparing durations of said test and reference signatures, and effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature;
second means for comparing sequences of said temporal marks of said test and reference signatures and for coupling temporal marks of said test and reference signatures if and only if two corresponding temporal marks have between them a minimal temporal distance which is the shortest distance between the sequences in question, and said minimal distance is shorter than a predetermined distance so that coupled temporal marks form a pair of characteristic: segments of said test and reference signatures;
means for processing in an iterative manner remaining temporal marks, that have not been coupled, of said test and reference signatures for forming additional pairs of characteristic segments by means of said first and second means for comparing until no characteristic segment is coupled;
means for calculating local intrinsic correlations of said V.sigma.,and V.theta. values of said test and reference signatures for each of said pairs of characteristic segments, by calculating a second evaluating function C2 where:

where FC2i(RC2i) is a function representative of the local intrinsic correlation of either said V..sigma. or V.theta.
values for said pairs of characteristic segments where i indicates the component in question, and p i is a weight given to the particular component in question;
means for comparing C2 with a third threshold value, and rejecting said test signature if C2 passes said third threshold value;
means for calculating a classifying function C b where:
C b = a1C1+a2C2 where a2 is a weight given to said second evaluating function C2; and means for comparing said classifying function C b with a fourth threshold value, and rejecting said test signature if C b passes said fourth threshold value.
2. Apparatus according to claim 1, wherein said simple dynamic parameters consist of:
a first simple dynamic parameter P1 consisting of a period of time of said trajectory during which said point of said pencil is contacting said tablet;
a second simple dynamic parameter P2 consisting of a percentage representative of a period of time of said trajectory during which said point is lifted;
a third simple dynamic parameter P3 consisting of a percentage representative of a period of time of said trajectory during which said point is stopped; and a fourth simple dynamic parameter P4 consisting of a percentage representative of a period of time of said trajectory during which said V.theta. value is positive.
3. Apparatus according to claim 2, comprising means for comparing said simple dynamic parameters of said test signature with the corresponding simple dynamic parameters of the reference signature, and rejecting said test signature if said simple dynamic parameters are the same.
4. Apparatus according to claim 1, further comprising:
means for calculating variations of D x and D y components of said test and reference signatures for each of said pairs of characteristic segment, by calculating a third evaluating function C3 where:
C3 = FC3(RC3), E [-l, l]
where FC3(RC3) is a function representative of variations of D x and D y components for said pairs of characteristic segments:
means for comparing C3 with a fifth threshold value, and rejecting said test signature if C3 passes said fifth threshold value;
means for calculating a classifying function C o where:
C o = a1C1 + a2C2 + a3C3 where a, is a weight given to said third evaluating function C3; and means for comparing said classifying function C o with a sixth threshold value REJ, and either rejecting said test signature if C o is higher than said sixth threshold value REJ, or emitting a signal indicating that no conclusive result has been achieved if C o is within a range of values limited by REJ and a threshold value UNC, or accepting said test signature if C o is lower than UNC.
5. Apparatus according to claim 4, comprising means for calculating RC1 1, RC1 2, RC1 3 and RC1 4 where:
RC1 1 = (P1 of said test signature - P1, of said reference signature)/P1 of said reference signature;
RC1 2 = P2 of said test signature - P2 of said reference signature:
RC1 3 = P3 of said test signature - P3 of said reference signature; and RC1 4 = P4 of said test signature - P4 of said reference signature.
6. Apparatus according to claim 5, comprising:
means for calculating FC1 1(RC1 1) for each of said four dynamic parameters where RC1 1 is the variation of a particular dynamic parameter, where:
FC1 1,(RC1 1) = 0 if RC1 1<=SC1Ri where SC1Ri is a seventh predetermined threshold value for a particular dynamic parameter, FC1 1(RC1 1)= ((e h(RC1 1)- 1)/(e - 1))Ni if SC1RiRC1 1<SC1Ri where SC1Ri is an eighth predetermined threshold value for a particular dynamic paramater, or FC1 1 s(RC1 1) = 1 if SC1Ri <= where h(RC1 1) = (RC1 1 -SC1Ri)/(SC1Ri - SC1Ri), and where Ni is a growth factor for a particular dynamic parameter; and means for generating a signal indicative of a rejection of said test signature if FC1 1(RC1 1) = 1.
7. Apparatus according to claim 6, comprising means for calculating RC2 2, and RC2 2 where:
where N is the number of pairs of characteristic segments, 1= is the number of samples used for acquiring said reference signature, j identifies a particular pair of said pairs of characteristic segments , 1j is the number of samples used for acquiring a particular segment of said reference signature, CV oj is a partial intrinsic local correlation of said V o value for a particular pair of said pairs of characteristic segments, and CV 8j is a partial intrinsic local correlation of said V o value for a particular pair of said pairs of characteristic segments.
8. Apparatus according to claim 7, comprising:
means for calculating FC2 1(RC2j) for each of said V.sigma. and Vo values of said pairs of characteristic segments where RC2i, is an intrinsic local correlation of either said V.sigma. or V.theta.
value for said pairs of characteristic segments, where:
FC2i(RC2i) = 1 if RC2<=SC~i where SC2~i is a ninth predetermined threshold value, FC2i(RC2i) = ((e h1(RC2i)- 1)/(e - 1) )Nij if SC2Ri<RC2i<SC2Ri where SC2Ri is a tenth predetermined threshold value, FC2i(RC2i) = ( ( (e h2(RC2i)- 1)/(e-1) )Nzi- 1) if SC2Ri<=RC2i<SC2Ri, or FC2i(RC2i) = -1 if SC2Ri<=RC2i where SC2Ri is an eleventh threshold value; where h1 ( RC2i) - (SC2Ri - RC2i) / ( SC2Ri -SC2Ri), h2 (RC2i) = ( SC2Ai - RC2i)/( SC2Ai - SC2Ri) , and N1i and N2i are predetermined growth factors;
means for generating a signal indicative of a rejection of said test signature if FC2i(RC2i)= 1; and means for generating a signal indicative of an acceptation of said test signature if FC2i(RC2i) = -1.
9. Apparatus according to claim 8, comprising means for calculating RC3 where:
where RC3ii is a minimal residual distance of said D x and D y components between the characteristic segments of a particular pair of said pairs of characteristic segments where:
where i refers to a characteristic segment of the reference signature;
j refers to a characteristic segment of the test signature;
d(i,j) = q(1,1)=d(1,1) D~ and D ~ are respectively said D, components of said test and reference signatures of a particular pair of characteristic segments;
D y~ and D y~ are respectively said D y components of said test and reference signatures of a particular pair of characteristic segments;
and .DELTA. is a linear operator of difference.
10. Apparatus according to claim 9, comprising:
means for calculating FC3(RC3) for each of said D, and D y components of said pairs of characteristic segments where RC3 is representative of a minimal residual distance of said and D x and D y components between said characteristic segments of each of said pairs of characteristic segments, where:
FC3 (RC3 ) - 1 if RC3>=SC3R where SC3" is a twelfth threshold value, FC3(RC3) =((e b1(RC3)-1)/(e-1))~
if SC3<=RC3<SC3R where SC3R is a thirteenth threshold value, FC3(RC3)=(((e h2(RC3)- 1)/(e -1)~-1) if SC3A<RC3<SC3A where SC3A is a fourteenth threshold value, or FC3 (RC3)= -1 if RC3<=SC3A; where h1 (RC3 )=(RC3 -SC3~)/(SC3R - SC3~), h2(RC3) = (SC3A - RC3)/(SC3A - SC3~), and N1 and N2 are predetermined growth factors;
means for generating a signal indicative of a rejection of sand test signature if FC3(RC3) - 1; and means for generating a signal indicative of an acceptation of said test signature if FC3(RC3) = - 1.
11. Apparatus according to claim 10, wherein more than one reference signatures are acquired, and compared among themselves, taken two by two, to obtain several groups of RC1 1, RC1 2, RC1 3, RC1 4, RC2 1, RC2 2, and RC3 values, said apparatus further comprising:
means for comparing each of said RC1 1, RC1 2, RC1 3, RC1 4.
and RC3 values with other corresponding values of its own group, and determining maximum values of each group which constitutes respectively personalized threshold Values SP1 1, SP1 1, SP1 3, SP1 4, and SP3; end means for comparing each of said RC2 1 and RC2 2, values with other corresponding values of its own group, and determining minimum values of each group which constitutes respectively personalized threshold values SP2 1 and SP2 2;
means for calculating SC1~ = MAX (cte,p(SC1p1)) .epsilon.[0%,SC1Ri[, and SC1Ri = MAX (cte,q(SC2P1)) .epsilon. ]SC1~,oo], where p(SC1Pi) and g(SC1Pi) are linear functions of the type y = a SC1pi + b, where SC1Pi is the personalized threshold value "i" which is respectively SP1 1, SP1 2, SP1 3, or SP1 4, and a, b and cte being predetermined constants;
means for calculating SC2~ = MAX (cte, p( SC2pi)) .epsilon. ] SC2Ai, SC2Ai [, SC2Ri = MIN (cte,q(SC2Pi)) .epsilon.[0%,SC2~i[, and SC2Ai = MIN (cte,r(SC2pi)) .epsilon.]SC2~, 100%], where p( SC2pi , q ( SC2pi) and r ( SC2pi) are linear functions of the type y = a~SC2Pi + b, where SC2pi, is the personalised threshold value "i" which is respectively SP2 1 yr SP2 2 and a, b and cte being predetermined constants; and means for calculating SC3~= MIN (cte,p( SC3p)) .epsilon. ]SC3A,SC3R[, SC3~ = MAX (cte,q(SC3p)) .epsilon.]SC3~~], and SC3A = MAX (cte,r(SC3p)) .epsilon.[O,SC3~[, where p(SC3p), q(SC3P) and r(SC3p) are linear functions of the type y = a~SC3p + b, where SC3p is the personalized threshold value SP3 and a, b and cte being predetermined constants.
12. Method for comparing a test handwritten signature with a reference signature where each of said test and reference signatures have been acquired by:
generating three electrical digital position signals characterizing a trajectory of a handwritten signature by means of n + 1 samplings of period T, by means of a pencil provided with a point and an analog-to-digital tablet, said three signals being D x(kT), D y(kT) and D s(kT) where k = 0, 1, 2, ... n, where D x (kT) and D y(kT) are respectively position signals according to X and Y axes of a cartesian reference with respect to time, and D x(kT) is an on/off signal indicating whether or not said point is contacting said tablet;
low-pass filtering said D x(kT) and D y(kT) electrical signals;
taking the derivative of said D x(kT) and D y(kT) electrical signals for generating V x(kT) and V y(kT) electrical components which represent respectively speeds of said point according to X and Y axes of a cartesian reference;
calculating v x(kT), V y(kT) and sign(kT) values from V x(kT) and V y(kT) values where:
V o(kT) - V x2(kT) + Vy2(kT) calculating handwritten components and handwritten strings, where each of said handwritten components is delimited by two successive liftings of said point along said trajectory, and each of said handwritten strings is delimited by two successive portions of said trajectory where said V~ value is higher than a predetermined angular speed value and where said V~ value is lower than a predetermined curvilinear speed value, said handwritten strings and components having beginnings and ends defining temporal marks along said trajectory by which duration of said handwriting signature is determined:
calculating simple dynamic parameters characterizing said test and reference signatures:
applying respectively a first predetermined rotation operator and a second predetermined rotation operator to said D x(kT) and D y(kT) signals for correcting inclination of said trajectory and aligning a base line of said trajectory with a horizontal base line: and scaling said D x(kT) signal according to said x X cartesian axis, and scaling said D y(kT) according to said y cartesian axis;
said method comprises steps of:
calculating variations of said simple dynamic parameters of said test signature with respect to said simple dynamic parameters of said reference signature, by calculating a first evaluating function C1 where:
where FC1 1(RC1 1) is a function representative of the variations of a particular dynamic parameter where 1 indicates the parameter in question, and p1 is a weight given to a particular parameter of said simple dynamic parameters:
comparing C1 with a first threshold value, and rejecting said test signature if C1 passes said first threshold value;
calculating a classifying function C a where:
C a = al .cndot. C1 where al is a weight given to said first evaluating function C1;
comparing said classifying function C a with a second threshold value, and rejecting said test signature if C a passes said second threshold value;
comparing durations of said test and reference signatures, and effectuating temporal expansion of the temporal marks of the signature having the shortest duration so that its duration matches the duration of the other signature;
comparing sequences of said temporal marks of said test and reference signatures and coupling temporal marks of said test and reference signatures if and only if two corresponding temporal marks have between them a minimal temporal distance which is reciprocally the shortest between the sequences in question, and said minimal distance is shorter than a predetermined distance so that coupled temporal marks form a pair of characteristic segments of said test and reference signatures;
processing in an iterative manner remaining temporal marks, that have not been coupled, of said test and reference signatures by repeating said steps of comparing durations and comparing sequences until no characteristic segment is coupled;
calculating local intrinsic correlations of said V ~ and V ~ values of said test and reference signatures for each of said pairs of characteristic segments, by calculating a second evaluating function C2 where:

where FC2 i(RC2 i) is a function representative of the local intrinsic correlation of either said V o or V~ values for said pairs of characteristic segments where i indicates the component in question, and p i is a weight given to the particular component in question;

comparing C2 with a third threshold value, and rejecting said test signature if C2 passes said third threshold value;
calculating a classifying function C b where:
C b = a1C1 + a2C2 where a2 is a weight given to said second evaluating function C2; and comparing said classifying function c b with a fourth threshold value, and rejecting said test signature if C b passes said fourth threshold value.
13. Method according to claim 12, wherein said simple dynamic parameters consist of:
a first simple dynamic parameter P1 consisting of a period of time of said trajectory during which said point of said pencil is contacting said tablet;
a second simple dynamic parameter P2 consisting of a percentage representative of a period of time of said trajectory during which said point is lifted;
a third simple dynamic parameter P3 consisting of a percentage representative of a period of time of said trajectory during which said point is stopped; and a fourth simple dynamic parameter P4 consisting of a percentage representative of a period of time of said trajectory during which said V~ value is positive;
14. Method according to claim 13, comprising steps of comparing said simple dynamic parameters of said test signature with the corresponding simple dynamic parameters of the reference signature, and rejecting said test signature if said simple dynamic parameters are the same.
15. Method according to claim 12, further comprising steps of calculating variations of D x and D y components of said test and reference signatures for each of said pairs of characteristic segment, by calculating a third evaluating function C3 where:
C3 = FC3(RC3), .epsilon.[-1,1]
where FC3(RC3) is a function representative of variations of D x and D y components for said pairs of characteristic segments:
comparing C3 with a fifth threshold value, and rejecting said test signature if C3 passes said fifth threshold value;
calculating a classifying function C o where:
C o = a1C1 + a2C2 + a3C3 where a3 is a weight given to said third evaluating function C3; and comparing said classifying function C o with a sixth threshold value REJ, and either rejecting said test signature if C o is higher than said sixth. threshold value REJ, or emitting a signal indicating that no conclusive result has been achieved if C o is within a range of values limited by REJ and a threshold value UNC, or accepting said teat signature if C o is lower than UNC.
16. Method according to claim 15, comprising a step of calculating RC1 1, RC1 2,RC1 3 and RC1 4 where RC1 1 = (P1, of said test signature - P1 of said reference signature)/P1 of said reference signature;
RC1 2 = P2 of said test signature - P2 of said reference signature;

RC1 3 = P3 of said test signature - P3 of said reference signature; and RC1 4 = P4 of said test signature - P4 of said reference signature.
17. Method according to claim 16, comprising steps of:
calculating FC1i(RC1i) for each of said four dynamic parameters where RC1i is the variation of a particular dynamic parameter, where:
FC1i(RC1i) = 0 if RC1i<=SC1xi where SC1xi is a seventh predetermined threshold value for a particular dynamic parameter, FC1i(RC1i) = ((e h(RC1i)-1)/(e - 1))Ni if SC1xi<RC1i<SC1xi where SC1xi is an eighth predetermined threshold value for a particular dynamic parameter, or FC1i(RC1i) = 1 if SC1xi<=RC1i; where h(RC1 i) = (RC1 i -SC1xi)/(SC1xi - SC1xi), and where Ni is a growth factor for a particular dynamic parameter; and generating a signal indicative of a rejection of said test signature if FC1i(RC1i) = 1.
18. Method according to claim 17, comprising a step of calculating RC2 1 and RC2 2= where:
where N is the number of pairs of characteristic segments, 1x is the number of samples used for acquiring said reference signature, j identifies a particular pair of said pairs of characteristic segments, 1 j is the number of samples used for acquiring a particular segment of said reference signature, CV oj is a partial intrinsic local correlation of said V o value for a particular pair of sand pairs of characteristic segments, and CV oj is a partial intrinsic local correlation of said V~ value for a particular pair of said pairs of characteristic segments.
19. Method according to claim 18, comprising steps of calculating FC2i(RC2i) for each of said V.sigma. and V.theta. values of said pairs of characteristic segments where RC2i is an intrinsic local correlation of either said V.sigma. or V.theta. value for said pairs of characteristic segments, where:
FC2i(RC2i) = 1 if RC2i<=SC2R xi where SC2xi is a ninth predetermined threshold value, FC2i(RC2i) = ((e h1(RC2i)- 1)/(e - 1))N1i if SC2xi<=RC2i<SC2xi, where SC2xi is a tenth predetermined threshold value, FC2i(RC2i) - (((e h1(RC2i)- 1)/(e - 1))N1i- 1) if SC2xi<=RC2i<SC2xi, or FC2i(RC2i) = -1 if SC2xi<=RC2i where SC2xi is an eleventh threshold value; where h1(RC2i) = (SC2xi - RC2i)/(SC2xi -SC2xi), h2(RC2i)=(SC2xi, - RC2i)/(SC2xi - SC2xi), and N1i and N2i are predetermined growth factors:
generating a signal indicative of a rejection of said test signature if FC2i(RC2i) - 1: and generating a signal indicative of an acceptation of said test signature if FC2i(RC2i) = -1.
20. Method according to claim 19, comprising a step of calculating RC3 where:
where RC3ii is a minimal residual distance of said D x and D y components between the characteristic segments of a particular pair of said pairs of characteristic segments where:
where i refers to a characteristic segment of the reference signature;
j refers to a characteristic segment of the test signature;
D xT and D xR are respectively said D x components of said test and reference signatures of a particular pair of characteristic segments;
D yT and D yR are respectively said D y components of said test and reference signatures of a particular pair of characteristic segments;
and .DELTA. is a linear operator of difference.
21. Method according to claim 20, comprising steps of calculating FC3(RC3) for each of said D x and D y components of said pairs of characteristic segments where RC3 is representative of a minimal residual distance of said D x and D y components between said characteristic segments of each of said pairs of characteristic segments, where:
FC3(RC3) = 1 if RC3>=SC3 R where SC3 x is a twelfth threshold value, FC3(RC3) x<=RC3<SC3 R ((e hi(RC3)-1)/(e - 1))~1 if SC3 x<=RC3<SC3 R where SC3 ~ is a thirteenth threshold value, FC3(RC3) ~ (((e h~(RC3)-1)/(e - 1))~~- 1) if SC3 A<RC3<SC3 ~, where SC3 A is a fourteenth threshold value, or FC3(RC3) = -1 if RC3<=SC3 A: where h1(RC3) = (RC3 -SC3 ~)/(SC3 R - SC3 R), h2(RC3) = (SC3 A - RC3)/(SC3 A - SC3 R), and N1 et N2 are predetermined growth factor ;

generating a signal indicative of a rejection of said test signature if FC3(RC3) = 1; and generating a signal indicative of an acceptation of said test signature if FC3(RC3) = -1.
22. Method according to claim 21, wherein more than one reference signatures are acquired, and compared among themselves, taken two by two, to obtain several groups of RC1 1, RC1 2, RC1 3, RC1 4, RC2 1, RC2 2, and RC3 values , said method further comprising steps of:
comparing each of said RC1 1, RC1 2, RC1 3, RC1 4, end RC3 values with other corresponding values of its own group, and determining maximum values of each group which constitutes respectively personalized threshold values SP1 1, SP1 2, SP1 3, SP1 4, and SP3; and comparing each of said RC2 1 and RC2 2, values with other corresponding values of its own group, and determining minimum values of each group which constitutes respectively personalized threshold values SP2 1 and SP2 2;
calculating SC1 ~i = MAX (cte, p(SC1 pi)) ~ [0%, SC1 Ri[, and SC1 Ri = MAX (cte, q(SC1 pi)) ~ ]SC1 Ei, .infin.], where p(SC1 pi) and q(SC1 pi) are linear functions of the type y = a~SC1 pi + b, where SC1 pi is the personalized threshold value "i" which is respectively SP1 1, SP1 2, SP1 3 or SP1 4, and a, b and cte being predetermined constants;
calculating SC2 ~i = MAX (cte, p(SC2 pi)) ~ ]SC2 Ri, SC2 Ri[, SC2 ~i = MIN (cte, q(SC2 pi)) ~ [0%,SC2 Ei[, and 5C2 ~i = MIN (cte, r(SC2 pi)) ~ ]SC2 Ei, 100%] , where p(SC2 pi), q(SC2 pi) and r(SC2 pi) are linear functions of the type y = a~SC2 pi + b, where SC2 pi is the personalized threshold value "l" which is respectively SP21 or SP2, and a, b and cte being predetermined constants; and calculating SC3 ~ = MIN (cte,p(SC3 p)) ~ ]SC3 A, SC3 R[, SC3 R = MAX (cte,q(SC3 p)) ~ ]SC3 R, .infin.], and SC3 A = MAX (cte,r(SC3p)) E[0,SC3e[, where p(SC3p), q(SC3p) and r(SC3p) are linear functions of the type y = a ~ SC3p + b, where SC3p is the personalized threshold value SP3 and a, b cte being predetermine constants.
23. Apparatus according to claim 1, comprising means for rejecting said test signature when said first evaluating function C1 equals zero and said second evaluating function C2 equals 1.
24. Apparatus according to claim 4, comprising means for rejecting said test signature when said first evaluating function C1 equals zero and said third evaluating function C3 equals zero.
25. Method according to claim 12, comprising a step of rejecting said test signature when said first evaluating function C1 equals zero and said second evaluating function C2 equals 1.
26. Method according to claim 15, comprising a step of rejecting said test signature when said first evaluating function C1 equals zero and said third evaluating function C3 equals zero.
CA002099371A 1991-02-11 1992-02-10 Method and apparatus for comparing a test handwritten signature with a reference signature Expired - Lifetime CA2099371C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US653,656 1984-09-21
US07/653,656 US5101437A (en) 1991-02-11 1991-02-11 Method and apparatus for comparing a test handwritten signature with a reference signature by using information relative to curvilinear and angular velocities of the signature
PCT/CA1992/000052 WO1992013816A1 (en) 1991-02-11 1992-02-10 Method and apparatus for comparing a test handwritten signature with a reference signature

Publications (2)

Publication Number Publication Date
CA2099371A1 CA2099371A1 (en) 1992-08-12
CA2099371C true CA2099371C (en) 2003-10-14

Family

ID=24621797

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002099371A Expired - Lifetime CA2099371C (en) 1991-02-11 1992-02-10 Method and apparatus for comparing a test handwritten signature with a reference signature

Country Status (3)

Country Link
US (1) US5101437A (en)
CA (1) CA2099371C (en)
WO (1) WO1992013816A1 (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6487310B1 (en) 1991-09-06 2002-11-26 Penop Ltd. Signature matching
JPH0676117A (en) * 1992-08-25 1994-03-18 Canon Inc Method and device for processing information
WO1994027251A1 (en) * 1993-05-18 1994-11-24 Massachusetts Institute Of Technology Automated reading system and method
US5623555A (en) * 1994-04-18 1997-04-22 Lucent Technologies Inc. Method and apparatus for handwriting decompression using estimated timing information
GB2307085B (en) * 1994-09-09 1998-09-23 Motorola Inc Method and system for recognizing a boundary between characters in handwritten text
AU3625095A (en) * 1994-09-30 1996-04-26 Motorola, Inc. Method and system for extracting features from handwritten text
JP3508252B2 (en) * 1994-11-30 2004-03-22 株式会社デンソー Signature recognition device
US5730602A (en) * 1995-04-28 1998-03-24 Penmanship, Inc. Computerized method and apparatus for teaching handwriting
AU6759998A (en) 1997-03-06 1998-09-22 Skylight Software, Inc. Cryptographic digital identity method
WO1998039719A1 (en) 1997-03-06 1998-09-11 Skylight Software, Inc. Automated software metering of digital payloads
US6694045B2 (en) * 2002-01-23 2004-02-17 Amerasia International Technology, Inc. Generation and verification of a digitized signature
GB0123547D0 (en) * 2001-10-01 2001-11-21 Marconi Software Solutions Ltd A system for identifying a user
GB0201232D0 (en) * 2002-01-19 2002-03-06 Queen Mary & Westfield College Authentication systems
US20040010529A1 (en) * 2002-07-15 2004-01-15 Adc Dsl Systems, Inc. Digital correlation
US20040057536A1 (en) * 2002-09-20 2004-03-25 Adc Dsl Systems, Inc. Digital correlator for multiple sequence detection
US20040098605A1 (en) * 2002-11-15 2004-05-20 Adc Dsl Systems, Inc. Prospective execution of function based on partial correlation of digital signature
US20050276454A1 (en) * 2004-06-14 2005-12-15 Rodney Beatson System and methods for transforming biometric image data to a consistent angle of inclination
US9686183B2 (en) 2005-12-06 2017-06-20 Zarbaña Digital Fund Llc Digital object routing based on a service request
US7894447B2 (en) * 2005-12-06 2011-02-22 Lippershy Celestial Llc Digital object routing
US8194701B2 (en) * 2005-12-06 2012-06-05 Lippershy Celestial Llc System and/or method for downstream bidding
US8055897B2 (en) * 2005-12-06 2011-11-08 Lippershy Celestial Llc Digital object title and transmission information
US20070136209A1 (en) * 2005-12-06 2007-06-14 Shabbir Khan Digital object title authentication
US8014389B2 (en) * 2005-12-06 2011-09-06 Lippershy Celestial Llc Bidding network
US10032065B2 (en) 2013-10-25 2018-07-24 Wacom Co., Ltd. Dynamic handwriting verification, handwriting-based user authentication, handwriting data generation, and handwriting data preservation
SG11201601314RA (en) 2013-10-25 2016-03-30 Wacom Co Ltd Dynamic handwriting verification, handwriting-baseduser authentication, handwriting data generation, and handwriting data preservation
US9235748B2 (en) * 2013-11-14 2016-01-12 Wacom Co., Ltd. Dynamic handwriting verification and handwriting-based user authentication
CN110427886B (en) * 2019-08-02 2022-02-08 福建天晴数码有限公司 Automatic verification method and system for handwriting recognition

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3699517A (en) * 1970-09-24 1972-10-17 Sylvania Electric Prod Handwriting authentication technique
US3962679A (en) * 1974-06-06 1976-06-08 Rca Corporation Handwriting identification technique
US3955178A (en) * 1974-10-09 1976-05-04 Warfel George H Signature authentication system
US4040010A (en) * 1975-11-06 1977-08-02 Stanford Research Institute Identification by handwriting verification
US4156911A (en) * 1975-11-18 1979-05-29 Stanford Research Institute Dynamic re-creation of signatures
US4028674A (en) * 1976-06-04 1977-06-07 Recognition Equipment Incorporated Automated signature verification system
US4190820A (en) * 1976-08-20 1980-02-26 Stanford Research Institute International Signal train verification system using landmarks
US4078226A (en) * 1977-03-16 1978-03-07 The United States Of America As Represented By The United States Department Of Energy Input apparatus for dynamic signature verification systems
US4128829A (en) * 1977-12-30 1978-12-05 International Business Machines Corporation Signature verification method and apparatus utilizing both acceleration and pressure characteristics
US4286255A (en) * 1979-02-22 1981-08-25 Burroughs Corporation Signature verification method and apparatus
US4495644A (en) * 1981-04-27 1985-01-22 Quest Automation Public Limited Company Apparatus for signature verification
US4475235A (en) * 1982-01-04 1984-10-02 Rolm Corporation Signature verification sensor
JPS594382A (en) * 1982-06-30 1984-01-11 Nippon Telegr & Teleph Corp <Ntt> Encoding system of drawn picture
GB8314889D0 (en) * 1983-05-31 1983-07-06 Rediffusion Computers Ltd Signature verification system
US4553258A (en) * 1983-12-30 1985-11-12 International Business Machines Corporation Segmentation algorithm for signature vertification
US4562592A (en) * 1983-12-30 1985-12-31 International Business Machines Corporation Shifting technique for signature verification
US4646351A (en) * 1985-10-04 1987-02-24 Visa International Service Association Method and apparatus for dynamic signature verification
US4736445A (en) * 1986-01-21 1988-04-05 International Business Machines Corporation Measure of distinguishability for signature verification
US4789934A (en) * 1986-01-21 1988-12-06 International Business Machines Corporation Signature verification algorithm
SE450604B (en) * 1986-04-28 1987-07-06 Eric Rothfjell PROCEDURE FOR A SIGNATURE VERIFICATION DEVICE
US4703511A (en) * 1986-10-09 1987-10-27 Paul Conoval Writing input and dynamics regeneration device
JPH087788B2 (en) * 1989-04-10 1996-01-29 株式会社キャディックス Signature verification method
FR2649510B1 (en) * 1989-07-06 1991-12-20 Collot Richard METHOD AND SYSTEMS FOR VERIFYING SIGNATURES WITH OPTIMIZATION OF STATIC PARAMETERS

Also Published As

Publication number Publication date
US5101437A (en) 1992-03-31
CA2099371A1 (en) 1992-08-12
WO1992013816A1 (en) 1992-08-20

Similar Documents

Publication Publication Date Title
CA2099371C (en) Method and apparatus for comparing a test handwritten signature with a reference signature
Gerdes et al. Device identification via analog signal fingerprinting: A matched filter approach
CA2099370C (en) Apparatus and method for digitizing and segmenting a handwriting movement based on curvilinear and angular velocities
Gerdes et al. Physical-layer identification of wired ethernet devices
Bigun et al. Multimodal biometric authentication using quality signals in mobile communications
US5054083A (en) Voice verification circuit for validating the identity of an unknown person
Dorizzi et al. Fingerprint and on-line signature verification competitions at ICB 2009
US20060106571A1 (en) Biometric apparatus and method using bio signals
BR0007250A (en) Method and device for authenticating signatures and e-learning methods and comparing them with previously stored representations
GB2465782A (en) Biometric identity verification utilising a trained statistical classifier, e.g. a neural network
EP3248188B1 (en) Authentication method
KR20010009081A (en) Speaker verification system using continuous digits with flexible figures and method thereof
JPH08507398A (en) High accuracy online dynamic signature verification system
CN110459226A (en) A method of voice is detected by vocal print engine or machine sound carries out identity veritification
Merchant et al. Toward receiver-agnostic RF fingerprint verification
Rafi et al. A new approach for robust replay spoof detection in ASV systems
CN112861082A (en) Integrated system and method for passive authentication
CN104240348B (en) Admittance identity authentication method based on image identification
CN114423011A (en) Open set WIFI equipment identification method and device
Wang et al. User capacity of wireless physical-layer identification: An information-theoretic perspective
Singh et al. Quantitative evaluation of normalization techniques of matching scores in multimodal biometric systems
CN108416592B (en) High-speed voice recognition method
Kartik et al. Multimodal biometric person authentication system using speech and signature features
RU2399102C2 (en) Method and device for identity verification using voice
CN108550368A (en) A kind of processing method of voice data

Legal Events

Date Code Title Description
EEER Examination request
FZDC Discontinued application reinstated
MKEX Expiry