ON-LINE RECOGNITION METHOD AND APPARATUS FOR A HANDWRITTEN PATTERN

Abstract: Coordinates of a handwritten pattern drawn on a tablet (100) are sequentially sampled by a pattern recognition unit (200) to prepare pattern coordinate data. Based on an area encircled by segments created by the sampled pattern coordinate data of one stroke and a line connecting a start point and an end point of the one-stroke coordinate data, the sampled pattern coordinate data of the one stroke is converted to straight line and/or curved line segments. The converted segments are quantized and normalized. The segments of the normalized input pattern are rearranged so that the input pattern is drawn in a predetermined sequence. Differences between direction angles for the rearranged segments are calculated. Those differences are compared with differences of the direction angles of the dictionary patterns read from a memory (300) to calculate a difference therebetween. The matching of the input pattern and the dictionary pattern is determined in accordance with the difference. If the matching fails, the first or last inputted segment of the input pattern is deleted or the sampled pattern coodinate data of the next stroke are added, to continue the recognition process.

Description: The present invention relates to on-line recognition method and apparatus for a handwritten pattern, and more particularly to graphic data input method and apparatus suitable for an on-line handwritten document preparation system. As a large scale computer system has been populated and a performance of an information processing terminal equipment has been improved, users of the computers have been rapidly increasing and a handwritten pattern input device has been attracting a public attention as one of input means to the computer. Input information is classified into characters and graphics. Prior art examples are described below. Prior art example 1 General description on on-line recognition of a handwritten character is found in Nikkei Electronics, 1973, No. 5-7, pages 46 ∼ 59. A method for recognizing a handwritten character by representing the handwritten character by a series of short lines and comparing it with a characteristic in a dictionary is explained below. Fig. 1 shows a smoothing process of a handwritten pattern. P₀-P₁-P₂-P₃ represents an input pattern. The point P₀ at which a pen was first dropped is defined as a first sampling point S₀ and a circle centered at S₀ and having a predetermined radius (e.g., 5) is drawn to seek a next point P₁ which is outside of the circle. A distance between the points P₀ and P₁ is divided to have a ratio of n/m (e.g., 3/1) and the dividing point is defined as a new sampling point S₁. A circle centered at S₁ and having the radius 5 is drawn to seek a next point P₂ which is outside of the circle. A distance between the points P₁ and P₂ is divided to have a ratio of 3/1 and a dividing point is defined as a new sampling point S₂. The above process is continued until the pen is raised to define the sampling points S₀, S₁, S₂ and S₃. If an angle made by the line segment S₀S₁ and the line segment S₁S₂ is smaller than a predetermined angle, the line S₀S₂ is handled as one straight line segment S₀S₂. The above process is repeated so that the handwritten pattern is approximated by segments. The segment data which approximates the handwritten pattern is recognized as a specific character by a character recognition tree. This method is called a direction code method. The points S₀ ∼ S₃ sampled in the smoothing process are serially connected to divide the handwritten pattern into a plurality of segments. If the handwritten pattern consists of short segments (for example, KANJI character), the input pattern has little vibration and the pattern can be effectively converted to a straight segment, but if the pattern includes a relatively long stroke, it is not converted to a straight segment because of vibration included in the stroke. It is not sufficient to absorb the vibration which is included when a long stroke pattern is handwritten. In order to absorb the vibration, it is necessary to repeat the segmentation step several times for the segmented data. Since this example uses the number of strokes as one factor of classifying the characters, a new recognition method is necessary for a continuously written character. Prior art example 2 A candidate lattice method is explained. (See for example "On-line Recognition Algorithm for Hand-Sketched Flowchart by Candidate Lattice Method", Papers of Institute of Electronics and Communications of Japan, '83/6, Vol. J66-D, No. 6, p675-p681, or "On-Line Recognition Algorithms for Handwritten Chinese Characters and Hand-sketched Line Figures", Institute of Television of Japan, Vol. 6, No. 44 (1983), p43-p48, Mushashino Communication Laboratory.) Fig. 2 shows a flow chart of the candidate lattice method. Candidate Pattern Extraction (Step 1) Start and end point coordinates P of an input stroke are collated to characteristic points of a symbol G (to which all of the patterns in a dictionary 10 are applicable) and a plurality of sets of one-stroke sequences (candidate stroke sequences) each of which passes through all characteristic points P i (i = 1 ∼ n, n is the number of characteristic points of the symbol G) are generated. If the input stroke sequence and the generated candidate stroke do not differ (step 5), the symbol G is selected as a candidate pattern G c . In this manner, the dictionary patterns can be classified while modifications and distortions of the handwritten patterns being absorbed. Calculation of Difference (Step 2) The candidate lattice method uses a dynamic programming matching (DP matching) method which evaluates not only the Euclid distance between the characteristic point and the stroke but also a direction of a tangent line of the stroke corresponding to the characteristic point. The difference is represented by where (x m , y m ) is input stroke coordinate, (x' u(m) , y' u(m) ) is candidate stroke cordinate, α: constant The first and second terms in { } in the right side of the equation (1) represent the Euclid distance between the input stroke end point and the characteristic point of the dictionary pattern, and the third term represents a difference between directions of tangent lines of the input stroke and the candidate stroke at the characteristic point (x' m , y' m ). Searching of Candidate Lattice (Step 3) The difference in the step (2) is calculated for each pattern extracted in the step (1) and it is compiled to a table. A pattern having a smallest sum of the differences is selected from the patterns derived from the table. A candidate pattern which cannot exist judging from a connection rule 11 of an input stroke to another input stroke is eliminated, even if it has a small difference from the input stroke. Through the steps (1) to (6), the handwritten pattern can be recognized without relying on the number of strokes, the order of strokes and the segmentation. However, no recognition means is provided for 1 ○ contrinuous writing of two patterns, and 2 ○ rotation of pattern. Thus, those patterns are difficult to recognize. In TECHNOLOGY AND SCIENCE OF INFORMATICS, vol. 1, nos. 1 - 6, 1983, pages 121 - 134, Oxford, GB; A BELAID et al.: "Segmentation of line drawings for recogniton and interpretation", a segmentation process for line drawings is described which operates in three stages. A first sampling stage eliminates non-significant points in the drawing in order to facilitate control of the stock of points and to simplify segmentation into primitives. The second stage eliminates blurring produced by the graphic tablet, and inaccuracies attributable to the user. The identification of primitives constitutes the third stage. But in contrast to the present invention a recognition process is not indicated. In the light of the above, it is an object of the present invention to provide on-line recognition method and apparatus for a handwritten pattern which automatically separates patterns, which does not depend on the order of strokes, the number of strokes and the inclination of the pattern and which operates at a high speed. According to one aspect this object is achieved by the invention by the features indicated in claim 1, and according to another aspect by the features indicated in claim 9. Elements of a pattern are segments and a plurality of segments form one pattern. On the other hand, a handwritten pattern inputted from a tablet is read into a computer as a time-serial sample point sequence. In the present invention, a characteristic data derived from the sample point sequence and a line connecting two of the sample points is used to decompose the sample point sequence to segments while effectively absorbing vibration included in the handwritten pattern. The plurality of segments are used as a basic unit of data, which is processed in a manner described in an embodiment so that a boundary between the patterns is automatically recognized without depending on the number of strokes, the order of strokes and the rotation of the input pattern. The above and other objects, features and advantages of the present invention will be apparent from the following detailed description taken in conjunction with the accompanying drawings, in which: Fig. 1 shows a prior art method of smoothing, Fig. 2 shows a flow-chart of a prior art handwritten pattern recognition of a candidate lattice method, Fig. 3 shows one embodiment of an on-line handwritten pattern recognition apparatus of the present invention, Fig. 4 is a flow chart of one embodiment of an on-line handwritten pattern recognition method of the present invention, Fig. 5 is a flow chart of recognition method of the present invention, Fig. 6 shows a direction code, Figs. 7a, 7b, 7c and 7d illustrate segmentation of a handwritten pattern by the present invention (area method), Figs. 8a and 8b illustrate normalization of a pattern, Fig. 9 shows a connection list, Fig. 10 illustrates code wrapping, Fig. 11 shows a flow chart for calculation of analogy, Fig. 12 illustrates calculation of difference, Figs. 13a and 13b illustrate reconfiguration of elements, and Figs. 14a, 14b, 14c and 14d show examples of recognized patterns. Fig. 3 shows an on-line handwritten character recognition apparatus of the present invention. A user draws a pattern on a tablet 100 by using a pen 101. The tablet 100 periodically samples coordinates of the handwritten pattern and sends a coordinate signal to a pattern recognition apparatus 200. The pattern recognition apparatus 200 comprises a tablet data input unit 201 which sequentially reads in the coordinate signal for each stroke (from pen-down to pen-up), a segmentation unit 202 for converting the tablet data to straight line and curved line segments, a quatization unit 203 for quatizing an angle of a line connecting start and end points of each segment by direction codes (for example, 32 direction codes), a normalization unit 204 for normalizing a segmentation data from the segmentation unit 202 to a square having a side dimension of 100, a sequencing unit for sequencing the quatization data into a one-dimension input data sequence in accordance with the normalization data and sequencing a standard pattern information read from a memory 300 into a one-dimension standard data sequence, a difference calculation unit 206 for comparing the one-dimension input data sequence with the one-dimension standard data sequence to calculate a difference there between, a matching detection unit 207 for detecting matching of the input data and the standard data read out from the memory 300 by comparing the calculated difference with a predetermined value, a pattern output unit 208 for developing the standard pattern data, when the matching is detected by the matching detection unit 207, on a bit map memory (not shown) as a recognized pattern and displaying it on a CRT 400 by a video signal, and a number of segments altering unit 209 for decreasing the number of segments of the current stroke or adding the tablet input data of the next stroke to be compared with the standard pattern when non-matching is detected by the matching detection unit 207 to repeat the recognition process. Those steps are carried out by a CPU 210. The pattern output unit 208 outputs the content of the bit map memory to a printer 500 to make a hard copy of the recognized pattern. When the handwritten pattern inputted by the tablet data input unit 201 is to be displayed on the CRT 400, the tablet data may be sent to be pattern output unit 208 as shown by a broken line in Fig. 3. A flow chart of a program executed by the CPU 210 in the pattern recognition apparatus 200 of Fig. 3 is shown in Fig. 4. Steps in Fig. 4 will be described in detail and only brief explanation thereof is given here. In a step 10, work areas necessary for the following steps are initialized and user designation values are set. In a step 20, the coordinate point sequence P from the tablet 100 is sampled by using a distance between the coordinate points as a threshold and stores a coordinate data in the memory 300. The step 20 continues until the pen 101 on the tablet 100 is raised. An origin of the coordinate is located at left-bottom of the CRT 400 having 1700 dots in a horizontal line and 2300 dots in a vertical line, and the coordinate value corresponds to the dots of the screen of the CRT 400. In a step 30, a line connecting start and end points of the sequence of coordinate data for one stroke (from pen-down to pen-up) stored in the memory 300 is defined and an area A encircled by that line and the segments connecting the respective points of the data sequence is determined in order to convert the data sequence to a segment data. If the area A is smaller than a predetermined threshold A TH (e.g. 100), the segment sequence is substituted by the line connecting the start and end points of the data sequence. If A > A th , the data sequence is converted to a plurality of segmentation data by a mid-point method which will be described in detail. If an absolute value of change or difference of angle made by two contiguous segments of the segmentation data is smaller than a predetermined angle (e.g. 12 degrees) and a sign thereof is equal to that of the change or difference of angle made by immediately preceding two segments and a length ratio is within a predetermined range (e.g. 0.5 ∼ 2.0), those two segments are handled as a portion of a curve. The above process is carried out for all segment data so that the data sequence is converted to line and/or curve segmentation data. Since this process uses the area method in the segmentation, small vibrations in the input data sequence can be effectively absorbed by properly selecting the threshold A th . In a step 40, the angle of each straight line segment and the angle of the line connecting the start and end points of each curved line segment are quantized by direction codes, for example, 32 direction codes. For the curved segment, in order to distinguish it from the straight line segment, "32" is added if the segment rotation is clockwise (expanding leftward) and "64" is added if the segment rotation is counterclockwise (expanding rightward), to the direction code of the line. In a step 50, the segment data for one stroke is normalized to a square having a side dimension of 100, for example, in order to examine connection relation of the segments in the segmentation data produced in the step 30. If a distance between the end points of two segments in the segmentation data is shorter than a predetermined length (e.g. 5), they are determined to be in a connection relation, and information on the start and end points, destination segment number and information on the start and end points of the destination segment are registered in a connection list. In a step 60, in order to prepare a segment direction code sequence arranged in a predetermined forward direction based on the segment quantization data produced in the step 40 and the connection list produced in the step 50, the segmentation data is sorted in an ascending order of X coordinates of the end points of the segments, the direction codes are sequentially connected starting from the first segment in the sorted list based on the connection list to prepare a sequenced data, which is then registered. In a step 70, a difference between the sequenced data produced in the step 60 and a standard pattern G ST stored in the memory 300 is determined. In a step 80, in order to evaluate the matching, the difference F determined in the step 70 is compared with a predetermined threshold F₀ (e.g. 10), and if F ≦ F₀, the candidate pattern G ST which resulted in the difference F is outputted as a recognized pattern G r . On the other hand, if F > F₀, the recognition fails and the process proceeds to a step 90. In the step 90, for the dynamic programming (DP) processing of the segmentation data, the segment data having a small segment number or the last segment number is deleted to prepare a new segmentation data. Then, the process proceeds to the step 50. The above steps are repeated and when the segmentation data to be deleted is no longer present, all segmentation data are recovered and the process proceeds to a step 20 where a new segmentation data is added. Through the steps 10 to 90, the order of strokes, the number of strokes and the division of the input pattern are rendered independent and a man-machine operability is significantly improved as compared with the prior art pattern input method. Since the processing of the on-line recognition apparatus 200 of Fig. 3 is carried out on real time, the present apparatus functions as an on-line handwritten pattern recognition apparatus. In order to eliminate the restriction for the number of strokes, the order of strokes, the rotation and the boundary of the pattern inputted by the tablet 100, the present invention is constructed on the condition that the elements of the pattern are segments and the shape of the pattern is determined by the order of connection of the segments and the angle differences. The number of strokes is that required to draw the pattern by strokes with each stroke being defined by pen-down to pen-up, the order of strokes is that in drawing the pattern, the rotation is an angle of the input pattern relative to the standard pattern, and the boundary is an indication of an area corresponding to the pattern in the input strokes to be compared with the dictionary pattern. Two characteristic portions of the present invention are extracted from the flow chart of Fig. 4 and they are shown in Fig. 5. They are a segmentation step 600 for determining the matching to the dictionary pattern and a one-dimension segment dynamic programming (DP) step 700 for extracting the pattern from the input strokes. The segmentation step 600 comprises an sub-segmentation step 610 for segmenting the stroke into basic units for processing, a code wrapping step 620 for tracking the pattern to wrap it for generating a code list and a difference calculation step 630 by a change or difference of angle independent of the rotation of the input pattern. In the present invention, the step 600 relieves the restriction of the number of strokes and the rotation and the one-dimension segment DP step 700 reconfigures the elements to relieve the restriction of the boundary. (1) Outline of Processing The input handwritten pattern is processed in accordance with a flow shown in Fig. 5. Major steps of the present invention are described below. 1 ○ Subsegmentation of stroke (Step 610) The handwritten pattern inputted from the tablet 100 is read as a set of sample points for each stroke. It must be converted to more than one segment. The direction of the segment from the start point to the end point is quantized by the direction codes shown in Fig. 6. 2 ○ Code wrapping (Step 620) Based on connection information on the end points of the segmentation data extracted in 1 ○, a code list L₄ (Fig. 10) with the direction codes is prepared. The segmentation data is traced to wrap the input pattern. 3 ○ Calculation of difference by change of angle The dictionary patterns (classified by the number of segments) subsegmented in 1 ○ are read from the memory 300 and a code list (L₅) of the dictionary patterns is prepared by the processing 2 ○, and a difference between two adjacent direction codes in the code list L₄ is compared with that in the code list L₅. f i represents a unit difference. f i = |{L₄(i) - L₄(i-1)} - {L₅(i) - L₅(i-1)}| (1) where i = 2, 3, --- n and n is the number of segments of L₅. An average value of f i is defined as a difference F of the handwritten pattern. Ideally, if F = 0, it is regarded that the input pattern matches to the dictionary pattern. However, the value F is usually between 0 and 10 and a minimum value of F obtained from the differences between the input pattern and the dictionary patterns is used as a recognized pattern. 4 ○ Reconfiguration of elements (Step 700) When the input pattern contains continuation of the pattern and the connection line, the matching between the input pattern and the dictionary pattern is not attained because the patterns are registered in the dictionary pattern by pattern. Accordingly, after the handwritten pattern has been segmented, a combination of the elements corresponding to the pattern to be compared with the dictionary pattern should be extracted. The determination of the order of the particular segments to be deleted in the extraction process directly affects to the number of times of looping of the recognition process and hence to the process time. Accordingly, an efficient extraction is required. The extraction process has usually employed an all-combination method which uses all combinations of the segments. However, since it needs a large number of times of operations to extract the pattern, the one-dimension dynamic programming (DP) method which makes use of a characteristic of the handwritten pattern is used in the present invention. As a result, the number of times of operations to extract the pattern is reduced by a factor of several to ten or more as compared with the all-combination method. The extracted elements are processed in accordance with the recognition process described above. (2) Description of Process The basic pattern recognition algorithm described in (1) is now explained in detail. Subsegmentation of stroke (Figs. 7a ∼ 7f) The sample point coordinate data S₁ of the handwritten pattern inputted from the tablet 100 is read in for each stroke (from pen-down to pen-up). As shown in Fig. 7a, a start point SP₁ to an end point SP n of the sample point coordinate data S₁ derived from the handwritten pattern is defined as an unidentified area (UA), the start point SP₁ is defined as an unidentified area start point (UAS) and the end point SP n is defined as an unidentified area end point (UAE). Then, as shown in Fig. 7b, an area A defined by the handwritten line S and a line L connecting the start point and the end point of the line S is determined. The area A may be readily determined by a pedestal method in geography. If the calculated area A is smaller than a predetermined threshold A th , the handwritten line S is regarded as a straight line and a segment registration is carried out. If the area A is larger than the threshold A th , the end point is moved to a mid-point between the UAS point and the UAE point as shown in Fig. 7c and the area A' is recalculated. The area A' is again compared with the threshold A th , and if A' < A th , the current end point is selected as a new UAS point and a new line L is drawn. If A' ≧ A th , the current end point is selected as a new UAE point as shown in Fig. 7e and an area A'' is calculated. The above process is continued until the UA is exhausted, that is, the UAE point reaches the UAS point. Then, the start point to the end point is regarded as one line and the segment registration is carried out. This method is called a mid-point method. In the segment registration step, the end point of the registered segment is set as a new start point and the UAS point, and the end point of the handwritten line S is set as a new end point and the UAE point. Coordinates SP j and SP k of the start point and end point of the segment L, the pen up/down status ST j and ST k at each point and an angle ϑ j,k of the line connecting the start point and the end point are registered in the segment list as shown in Fig. 7f. Those steps are continued until all handwritten strokes S are registered. Code wrapping In this process, it is necessary to check a connection relation of the start and end points of the elements of the segments. The normalization of the input pattern and the preparation of the connection list are explained. Figs. 8a and 8b illustrate the normalization of the input pattern (e.g., triangle). As shown in Fig. 8a, a larger one (ℓ i ) of an x-direction dimension and a y-direction dimension of the input pattern is enlarged or reduced to a normalization size (ℓ n ). Thus, as shown in Fig. 8b, the start point and the end point in the segment list L₁ is magnified by a factor of ℓ n /ℓ i to prepare a normalized segment list L₂. The preparation of the connection information of the end points of the segment elements is now explained with reference to Fig. 9. Fig. 9(a) shows a normalized input pattern (triangle). As shown in Fig. 9(b), 5 ∼ 10% of the normalization size ℓ n is set as a connection distance of the end points of the segment elements. If the distance between the end points of the segments is shorter than the connection distance, it is regarded that the two end points are in connection. This information is written into a connection list L₃ shown in Fig. 9(c). In the illustrated example, the segment element 1 has two connection information, "the start point is in connection with the start point of the segment element 3" and "the end point is in connection with the start point of the segment element 2". The code wrapping by the segment connection list L₃ and the normalized segment list L₂ is explained with reference to Fig. 10. The start point of wrapping the segment elements may be on any segment element. In Fig. 10, the segment elements are traced clockwise starting from a leftmost end point. 1 ○ In Fig. 10(a), the segment element of the input pattern having the leftmost end point is determined. 2 ○ The end point determined in 1 ○ is selected as a new start point, and a segment element (element 1) which is most closely oriented to the y-direction is selected from the segment element which includes the start point and the segment elements connected to the start point, and a direction code (4 in this case, see Fig. 6) as viewed from the start point is registered in the code list L₄. 3 ○ It is seen from the segment connection list L₃ (Fig. 9(c)) that the start point of the segment element 1 is in connection with the segment element 3. Therefore, a direction code (28) as viewed in a tracing direction is registered in the code list L₄. 4 ○ The code list L₄ is prepared in the same manner as 3 ○. If there is an input segment element which has not been used for wrapping, the process starting from 1 ○ is repeated. If there is no such segment element, the process is terminated. Through this process, a clockwise code list L₄ with respect to the input pattern is prepared as shown in Fig. 10(d). A method for calculating a difference between the input pattern and the dictionary pattern is explained. Fig. 11 shows a flow chart for the difference calculation by the change of angle. In a step 651, a difference Δϑ' between the direction codes of two contiguous segments of the input pattern is calculated based on the code list L₄. In a step 652, a difference Δϑ between the direction codes of the dictionary pattern read from the memory 300 is calculated. In a step 653, an absolute value of a difference between the difference between the direction codes of the input pattern and the difference between the direction codes of the dictionary pattern is calculated. In a step 654, an average of the absolute values for all code differences is calculated to determine a difference F. In a step 655, the difference F is compared with a predetermined value, and if the difference F is equal to or smaller than the predetermined value, it is determined that the input pattern matches to the read dictionary pattern and the difference calculation step 630 is terminated. On the other hand, if the difference F is larger than the predetermined value, it is determined that the input pattern does not match to the read dictionary pattern and the process returns to the step 651 where the direction code differences of the dictionary pattern is rearranged and the difference calculation is repeated. Referring to Fig. 12, the difference calculation is specifically explained. Difference calculation by change of angle Based on the code list L₄ prepared in the code wrapping process, matching with the dictionary pattern is carried out. First, the following three angle difference data are obtained from the code list L₄. ϑ a = L₄(2) - L₄ (1) ϑ b = L₄(3) - L₄ (2) ϑ c = L₄(4) - L₄ (3) For the angle difference data ϑ a ∼ ϑ c of the input patterns shown in Fig. 12(a) and the angle difference data ϑ₁ ∼ ϑ₃ or ϑ₁' ∼ ϑ₃' of the dictionary pattern, sums f₁, f₂, --- of absolute values of differences between corresponding data are calculated as shown in Fig. 12(b). As shown in Fig. 12(c), the dictionary pattern which presents the minimum f i for the input pattern is determined and it is outputted as a recognized pattern (Fig. 12(d)). In Fig. 12, assuming that ϑ a = 24, ϑ b = -12, ϑ c = -12, ϑ₁ = 23, ϑ₂ = -12, ϑ₃ = -11, ϑ₁'= 20, ϑ₂'= -8 , ϑ₃'= -12 then f₁ = 2 for pattern A and f₂ = 8 for pattern B. By averaging f₁ and f₂ by the number of segment elements, we get f₁/3 = 0.67 for pattern A and f₂/3 = 2.67 for pattern B. Thus, the recognized pattern is the pattern A. Reconfiguration of segment elements The description on the subsegmentation of the stroke to the calculation of the difference (segmentation step 600 in Fig. 5) is based on the presumption that pattern portion is independently extracted from a plurality of handwritten patterns. However, it frequently occurs, when a handwritten flow chart is inputted as shown in Fig. 13(a), that a connecting line and a pattern are drawn in one stroke. The pattern extraction by the one-dimension segment DP step 700 of Fig. 5 which uses the dynamic programming (DP) method is now explained. The pattern extraction is based on the fact that the handwritten pattern is inputted in one of three input orders, (i) connecting line→pattern, (ii) pattern→connecting line, (iii) connecting line→pattern→connecting line. Namely, it is highly probable that the segment not necessary to the pattern recognition is inputted first or last. Accordingly, the first inputted segment and the last inputted segment are removed from the plurality of input segment elements so that the pattern portion is efficiently extracted. The above process is specifically explained with reference to Figs. 13a and 13b. Fig. 13a shows subsegmented input pattern. In this example, the element 1 should be deleted. Fig. 13b shows reconfiguration of the segment elements by the one-dimension segment DP method. First, segment elements 1 ∼ 4 are inputted. In the first step, only the last inputted segment element is deleted. In the second step, the first inputted segment element is deleted and the extraction successes. In the third and subsequent steps, the number of segment elements deleted is two and the pattern is not extracted whatever elements are deleted. In this manner, the first and/or last segment elements are deleted from the input segment elements so that the extraction is effected for the pattern having a high probability of success. Accordingly, the pattern is extracted efficiently. In accordance with the present invention, the handwritten pattern is divided into a plurality of segments in accordance with the characteristic data derived from the line connecting two of a plurality of sample points on the handwritten pattern. Accordingly, (1) the vibration in the handwritten pattern can be effectively absorbed, and (2) the handwritten pattern of any number of strokes is divided into segments so that the pattern is recognized independently from the number of strokes. Accordingly, the man-machine performance is improved. More specifically, as shown in Figs. 14a ∼ 14d, the restrictions of the number of strokes, the order of strokes, the rotation and the boundary of the handwritten pattern are significantly relieved. For example, as shown in Fig. 14a, whatever the number of strokes of the input handwritten pattern is, the pattern is decomposed to the segments and hence the pattern recognition is independent from the number of strokes. As shown in Fig. 14b, wherever the start point of the pattern is, the segments are sequenced clockwise by the code wrapping method. Therefore, the pattern recognition is independent from the order of strokes. Even if the input pattern is inclined, the difference is evaluated by the angle difference between the adjacent segments. Accordingly, the pattern recognition is independent from the rotation of the input pattern (Fig. 14c). Further, since the pattern portion can be extracted from the plurality of segments (by the one-dimension segment DP method), the pattern with the connecting line may be inputted without boundary (Fig. 14d).

Claims: An on-line recognition method for a handwritten pattern comprising the steps of: sampling (20) successively coordinate information of strokes of a handwritten pattern; segmenting (30) the coordinate information of a stroke into line segments consisting of at least either of straight line segments or curved line segments; quantizing (40) of the segments by assigning direction code values to the segments so that the direction of the line connecting start and end points of each segment is classified as being within one of predetermined ranges of angles to the x-axis; characterized in that the method further comprises the steps of: normalisation (50) of the input pattern constituted by the quantized segments and preparation of a normalised segment list (L2) containing the normalised start and end points of the segments and their direction codes; finding the presence and absence of connections between start or end points of the segments and preparing a connection list (L3) which indicates these connections; rearranging (60) the order of successively quantized line segments by selecting one segment which has a lowest end point x-coordinate value from said listed segments and arranging the order of the quantized data, starting in one direction from said end point of said selected segment and sequentially tracing the boundary, based on said connection list (L3), thereby preparing a code list (L4); reading out a dictionary pattern already stored in a memory (300); and calculating (70, 80) a degree of difference between the input pattern and the readout dictionary pattern by comparing both on the basis of the direction codes and the rearranged order of the quantized line segments in the code list (L4), to thereby recognize the input pattern. An on-line recognition method according to claim 1, further comprising, after said difference degree calculating step (70), a step of altering (90) the number of the line segments to continue the recognition processing when non-matching (80) is detected. An on-line recognition method according to claim 2, wherein in said segment number altering step (90), the first or last inputted segment is deleted to continue the pattern recognition processing. An on-line recognition method according to claim 2, wherein in said segment number altering step (90), the coordinate information of a next stroke is added to the coordinate information of the current stroke to continue the pattern recognition processing. An on-line recognition method according to claim 1, wherein in said segmenting step (30), segmentation is carried out by calculating an area (A) encircled by a fold line sequentially connecting the coordinate points on the coordinate information of one stroke and a line connecting the start coordinate point and the end coordinate point of the coordinate information. An on-line recognition method according to claim 5, wherein said segmenting step (30) includes the substeps of: comparing the calculated area (A) with a predetermined value (A th ); determining as a desired line segment the line connecting the start coordinate point and the end coordinate point of the coordinate information when the calculated area is smaller than the predetermined value; and dividing the fold line into two fold lines when the calculated area is not smaller than the predetermined value, to continue the segmenting step (30) by comparing with the predetermined value an area encircled by the divided fold line and a line connecting the start coordinate point and the end coordinate point of the divided fold line. An on-line recognition method according to claim 5, wherein in said segmenting step (30), two contiguous line segments are handled as a portion of a curve, when an absolute difference of angle made by the two segments is smaller than a predetermined angle and a sign thereof is equal to that of the difference of angle made by immediately preceeding two line segments and a length ratio thereof is within a predetermined range. An on-line recognition method according to claim 1, wherein in said difference degree calculating step (70), the difference of the quantized angles of each two contiguous rearranged line segments is compared with each corresponding difference of the readout dictionary pattern. An on-line handwritten pattern recognition apparatus for carrying out the method according to claim 1 comprising: a pen (101) for drawing a pattern to be recognized on a tablet (100); a coordinate input unit (201) for sampling serial coordinate information and pen-up and pen-down information of strokes of a handwritten pattern; a pattern recognition unit (200) for comparing the input information from said input unit for each input stroke starting from pen-down and ending at pen-up with standard pattern information stored in a memory (300) to determine analogy therebetween; a pattern generation unit (400, 500) for generating reshaped information of the pattern recognized by said pattern recognition unit; characterized in that said pattern recognition unit (200) includes: segmentation means (202) for converting the input information from said coordinate input unit to straight line and curved line segments; quantization data generating means (203) for quantizing the segments by assigning direction code values to the segments so that the direction of the line connecting start and end points of each segment is classified as being within one of predetermined ranges of angles to the x-axis; normalisation means (204) for normalising the input pattern constituted by the quantized line segments and preparing a normalized segment list (L2) containing the normalized start and end points of the segments and their direction codes; means (210) for finding and listing, on a connection list (L3), the presence and absence of connections between start or end points of the segments; sequencing means (205) for rearranging the quantized data by selecting one segment which has a lowest end point x-coordinate value from said listed segments and arranging the order of the quantized data in a predetermined direction starting from said end point of said selected segment, based on said connection list (L3) of the quantized segments, and for thereby preparing a code list (L4); difference calculation means (206) for calculating a degree of difference between the rearranged quantized data sequence with a data sequence derived from said standard pattern information stored in said memory (300); a matching detection unit (207) for detecting matching of the input data and said standard data by comparing the calculated difference with a predetermined value; and number of segments altering means (209) for increasing or decreasing the number of segments to be compared with the standard pattern information when the difference is larger than a predetermined value, to continue the process on the basis of the newly prepared data when non-matching is detected. An on-line handwritten pattern recognition apparatus according to claim 9, wherein said segmentation means (202) includes: calculation means for calculating an area encircled by segment pattern sequentially connecting points on the input stroke and a line connecting the start point and the end point of the segment pattern; first decision means for determining whether the segment pattern is to be regarded as a straight line or not based on the area calculated by said calculation means; and second decision means for determining whether the segments determined as the straight line by said first decision means are a portion of a curved line. An on-line handwritten pattern recognition apparatus according to claim 9, wherein said number of segments altering means (209) includes a start pointer and an end pointer for the segments to be compared, means for incrementing or decrementing said pointers, and segment updating means for replacing the segments by new segments pointed by said pointers.

Inventors: HIRASAWA, KOTARO, KUZUNUKI, SOSHIRO, SHOJIMA, HIROSHI
Applicants: HITACHI, LTD.
Application year: 1984
Main classification: G06K9
IPC codes: G06K11, G06K9, G06T7