METHOD FOR DESIGNATING A RECOGNITION MODE IN A HAND-WRITTEN CHARACTER/GRAPHIC RECOGNIZER

Abstract: A hand-written character/graphic is recognized in a character recognition mode or a graphic recognition mode designated in accordance with stroke information supplied from a tablet input device (1) which samples the hand-writ­ ten character/graphic and converts it to the stroke in­ formation. The recognition mode is automatically designated by comparing a longer one of projection lengths on x-axis and y-axis of stroke coordinates with a predetermined threshold for a hand-written character input.

Description: BACKGROUND OF THE INVENTION The present invention relates to a hand-written character/graphic recognizer, and more particularly to a method for designating a recognition mode necessary to separate hand-written characters/graphics. In Japanese Patent Application Laid-Open No. 55-143681 entitled "Hand-writing Word Processor Using a Tablet" (laid open November 10, 1980), function keys are provided to designate a recognition mode of characters/graphics so that an operator depresses them by a stylus. In this designation method, the function key must be depressed whenever a hand-written character/graphic is to be entered and hence it has a low non-machine interface. Japanese Patent Publication No. 58-42513 entitled "Real-time Hand-written Character Recognizer" (published September 20, 1983) teaches the designation of recognition modes in the character recognition, such as alphanumeric mode, Katakana mode, Kanji mode and Hirakana mode. In this recognizer, the number of input strokes is examined and if it is larger than a predetermined number, the recognition mode is automatically switched to the Kanji/Hirakana mode. Japanese Patent Application Laid-Open No. 57-105084 entitled "Method for Separating Characters from Graphics" (laid open June 30, 1982) discloses a method for recognizing characters separately from graphics. A drawing containing both characters and graphics is read by a scanner and the read image is repeatedly enlarged or reduced to separate the characters from the graphics in an off-line method. It relates to an off-line recognition in which characters and graphics are written or drawn on a sheet which is then scanned for recognition. It cannot be applied to an on-line hand-written character/graphic recognition. Prior art document Japanese patent abstract 58-75278 discloses a character and symbol recognizing device for increasing kinds of recognizable characters while shortening the time of comparison between entered characters and registered character information, by discriminating the kinds of characters to be recognized on the basis of the size of an entry frame for an entered character. The device consists of a pen, a character entry part, a coordinate detection part and a recognition part and a character entered into the character entry part with a pen has its holograph detected by the detection part which applies position coordinate information on the holograph and holograph information to the recognition part. This character entry part is divided into three nested character entry areas, two displays showing their boundaries are entered into the character entry part respectively. In character information storage parts of the recognition part, pieces of recognition information on character sections f(i), f(k) and f(n) corresponding to the three nested areas are stored. Thus, the time of comparison between the recognition information and entered character information is shortened and recognizable characters are increased in kind. According to this conventional handwritten object determination scheme, inputting of a handwriting is restricted to predetermined handwriting input areas. It is therefore difficult to realize a system capable of inputting an object in a frameless input area, such as character inputting or graphic inputting which is difficult to make in fixed input areas. Thus, in the past, there has been no effective method for automatically designating the recognition mode for the characters/graphics in the hand-written character/graphic recognizer. When a drawing containing characters is to be prepared, the operator must designate the recognition mode and the man-machine interface is not excellent. SUMMARY OF THE INVENTION It is an object of the present invention to provide a method for automatically designating a recognition mode of a hand-written character/pattern recognizer as defined in claim 1. In accordance with the present invention, based on the finding that strokes of a hand-written character are written in small rectangular areas, characteristic values in the form of a length measure for recognizing the character/graphic are extracted from stroke coordinates and the character recognition mode or the graphic recognition mode is automatically designated in accordance with the characteristic values. Major characteristic values are a maximum one of projection length of the stroke coordinate on x-axis and y-axis, and a stroke length. In the present invention, the characteristic values are extracted each time the stroke information is inputted. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is an overall block diagram of one embodiment of an on-line hand-written character/graphic recognizer of the present invention. Fig. 2 shows an example of hand-written strokes. Fig. 3 shows an input order of the hand-written strokes shown in Fig. 2. Fig. 4 illustrates extraction of a characteristic value from stroke coordinates. Fig. 5 shows projection lengths of all of the hand-written strokes shown in Fig. 2. Fig. 6 shows a status transition of recognition modes. Fig. 7 shows a processing flow chart for mode recognition unit 3 shown in Fig. 1 which is a characteristic of the present invention. Fig. 8 shows a flow chart for minimum/maximum calculation in a step 3C of Fig. 7. Fig. 9 shows a sub-flow chart of handwritten character/graphic recognition 4 in Fig. 1. Fig. 10 is a stroke table for a buffer used in the present invention. Fig. 11 shows an example of hand-writte graphic strokes. Fig. 12 illustrates a method for recognizing the hand-written graphic strokes shown in Fig. 11 as graphic strokes. Fig. 13 shows a processing flow chart when the method of Fig. 12 is applied to Fig. 7. Fig. 14 is a sub-flow chart when the method of Fig. 12 is applied to Fig. 9. Fig. 15 is a processing flow chart in an embodiment in which a stroke length is used as a characteristic value. Fig. 16 illustrates how to determine the stroke length. Fig. 17 shows an embodiment of an input/display device. Fig. 18 is a processing flow chart corresponding to that shown in Fig. 7, when the input/display device of Fig. 17 is used. DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to Fig. 1, numeral 1 denotes an input/display device which includes input means 1a for detecting and inputting hand-written character/graphic coordinates and display means 1b for displaying characters/graphics. For example, the input means may be an electromagnetic induction tablet and the display means may be a liquid crystal display device. The input/display device may be constructed by applying a transparent tablet onto the liquid crystal display device. Numeral 2 denotes a stylus for hand-writing input. It also provides touch-up and touch-down information of the stylus. Numeral 6 denotes a character/graphic recognizer which includes a mode recognition unit 3 for selecting a character or graphic mode, a hand-written character/graphic recognition unit 4 and a character/graphic display unit 5 for displaying characters/graphics on the display means 1b. It may be a microprocessor. The operation is now briefly explained. The stroke information written on the input means 1a by the stylus 2 is inputted to the mode recognition unit 3 in which a characteristic value is extracted from the stroke coordinates included in the stroke information, the character or graphic recongnition mode is selected based on the extracted characteristic value, and the hand-written character or graphic is recognized in the selected recognition mode and the recognition result is displayed on the display 1b through the character/graphic display unit 5. The characteristic feature of the present invention resides in the mode recognition unit 3 which is now explained in detail. Fig. 2 shows an example of hand-written strokes. Characters are written in a rectangle. In order to facilitate entry of the hand-written characters/graphics, the input means are sectioned by a predetermined size section (Δx x Δy) . The small rectangular regions are designated by numbers No. 1 - No. 15. When such hand-written characters and graphics are entered by the strokes S₁ - S₁₃ shown in Fig. 3, it is not clear which strokes are character strokes and which strokes are graphic strokes. In the present invention, a characteristics value as shown in Fig. 4 is determined based on the stroke coordinates. For example, a projection length Δu₁ on x-axis and a projection length Δv₁ on y-axis are determined based on coordinates P₀ - P₄ of the stroke S₁ and a longer one of ΔU₁ and ΔV₁ is selected as the characteristic value. The projection length can be easily determined based on minimum and maximum x-coordinates of the stroke and minimum and maximum y-coordinates of the stroke. The projection lengths for all of the strokes shown in Fig. 2 are shown in Fig. 5. It is seen from Fig. 5 that the projection lengths of the strokes S₁ - S₁₀ which are character strokes are short and the projection lengths of the strokes S₁₁ - S₁₃ which are graphic strokes are long. Accordingly, the projection length is compared with a predetermined threshold and if the projection length is smaller than the threshold, it relates to the character stroke and hence the character recognition mode is selected, and if the comparison result is opposite, it relates to the graphic stroke and the graphic recognition mode is selected. In the character recognition, segmentation for segmenting the input stroke into appropriate number of sections is required. Accordingly, the input means is sectioned by appropriate section as shown in Fig. 2 to effect the segmentation by those sections. In the segmentation, the strokes in one section are regarded as the strokes of the same character. Fig. 6 shows a status transition of the recognition mode. Three recognition modes null, character recognition and graphic recognition are included. The null mode is other than the character mode and the graphic mode, and in the null mode, the stroke information is stored in a buffer or the stroke information is not available (recognition has not been completed). At RESTART (1), the mode is the null mode and the input of the stroke information is monitored. The mode is transitioned from the null mode under condition (2), (3) or (5). Transition under condition (2): FLM · (ℓm < ℓ TH ) Transition under condition (3): FLM · (ℓm < ℓ TH ) Transition under condition (5): ℓm ≧ ℓ TH where ℓm is the projection length, ℓ TH is the predetermined threshold, FLM is a condition under which a start point of the stroke is present in the same section, and FLM is the opposite condition. In the transition condition (3), the strokes are stored in the memory buffer until the character strokes are segmented. On the other hand, for the graphic, the graphic and the connecting line are frequently drawn in one stroke. Accordingly, the mode is transitioned to the graphic mode if the characteristic value is larger than the predetermined threshold as shown by the condition (5). When the recognition in the character or graphic recognition mode is completed, the mode returns to the null mode at RESULT (4) or (6). If the recognition result is rejected at REJECT (7) (character does not match to characters in a dictionary), the mode is transitioned to the graphic recognition mode and the graphic recognition is effected. This is effective when a special graphic pattern not contained in the dictionary is to be recognized. Fig. 7 shows a processing flow for implementing the units 3, 4 and 5 of Fig. 1. Since the hand-written character/graphic recognition unit 4 and the character/graphic display unit 5 are known units, the explanation thereof is omitted. In the following description, the mode recognition unit 3 which is the characteristic feature of the present invention is explained in detail. Steps 3a - 3i in Fig. 7 relate to the mode recognition unit 3. Initialization such as clearing of tables and initialization for calculation of the characteristic value of the stroke is first effected (step 3a), and the hand-written strokes are inputted and stored in the buffer (step 3b). The buffer is a ring buffer as shown on a table STROKE of Fig. 10. For example, strokes S₁ - S₄ are sequentially stored. As the stroke is inputted, an input pointer INP is updated. On the other hand, when the recognition is completed, an output pointer OUTP is updated. The input pointer INP cannot overrun the output pointer OUTP. If the buffer is full, the old strokes are thrown away. Since the buffer usually has a sufficiently large capacity (for example, 4K bytes), the stroke data are not thrown away. In steps 3c - 3e, the characteristic value necessary for the mode recognition is calculated based on the stroke coordinates stored in the stroke table STROKE. A minimum coordinate P min and a maximum coordinate P max are calculated based on the stroke coordinates (step 3c), and projection lengths Δu and Δv on the x-axis and the y-axis are determined (step 3d). and the larger one of the projection lengths is selected as the characteristic value ℓm (step 3e). ℓm = max {Δu, Δv} (2) The characteristic value ℓm is compared with the predetermined threshold ℓ TH (step 3f), and if ℓm > ℓ TH , the graphic recognition mode is selected (step 3i). If ℓm < ℓ TH , whether the start point of the stroke is present in the same section as the previous stroke (step 3g). This carries out the segmentation of the character. If it is present in the same section in the step 3g, the process jumps to the step 3b where the strokes are again inputted and stored. Fig. 10 shows a data store condition in the stroke table when four strokes of the character shown in Fig. 2 are in the same section No. 7. When the first stroke of the next character is inputted, the start point of the stroke is in the next section No. 8. Accordingly, the decision in the step 3g of Fig. 7 is NO and the process proceeds to the step 3h where the character recognition mode is selected. After the mode recognition, the hand-written character/graphic recognition is carried out (step 4). The recognized character or graphic is then displayed on the display (step 5). Fig. 8 shows a detailed flow chart for the minimum and maximum coordinate calculation in the step 3c. Fig. 9 shows a sub-flow for the hand-written character/graphic recognition in the step 4. If the recognition result for the hand-written character is rejected, the hand-written graphic recognition is initiated. (See the mode transition chart of Fig. 6). The present embodiment offers the following advantages. First, since the characteristic value for the character/graphic mode recognition is derived from the stroke information and it is compared with the threshold value to set the mode, the operator need not pay attention to the character/graphic mode when he/she input the hand-writing strokes. According, the function switches need not be operated and the characters and graphics can be inputted in more natural manner and the man-machine interface is significantly improved. Secondly, since the mode recognition is carried out for each stroke to recognize the character/graphic, a response is improved over the prior art method in which the recognition is made after all of the character and graphic have been inputted. Thirdly, since the projection length of the stroke is used as the characteristic value for the mode recognition, it is independent from the complexity of the stroke and the stroke length and the character/graphic recognition can be effectively carried out. Fourthly, since the character stroke is segmented by the section (input grid), the character is readily segmented. Fifthly, since the mode is transitioned to the hand-written graphic recognition mode if the recognition result for the hand-written character is rejected, even a special graphic having a short stroke can be recognized. Further, since the combined input/display device is used, the characters/graphics can be inputted in the same manner as if they are inputted by a pencil and a paper and the man-machine interface is significantly improved. Referring to Figs. 11 to 16, other embodiments of the present invention are explained. In the previous embodiment, if short bars such as strokes S₃ - S₆ shown in Fig. 11 are inputted, those strokes are recognized as the character strokes. In the present embodiment, when a graphic stroke S₂ having a stroke length ℓ s is inputted, the stroke S₂ is translated to a line by the hand-written graphic recognition processing and an area As having a width d around the translated line is defined. It is called a graphic band. It is checked if a start point (Po) or an end point of the stroke is present in the graphic band. If it is present, it is recognized as the graphic stroke. The above processing may be carried out by adding a step 3f' shown in Fig. 13 after the step 3f shown in Fig. 7. The graphic band may be generated by adding a step 4e shown in Fig. 14 after the step 4d shown in Fig. 9. In the present embodiment, when the short bars are inputted as described above, they are recognized as the graphic strokes. Fig. 15 shows other embodiment. In the present embodiment, a stroke length ℓm is determined as the characteristic value and it is compared with a predetermined threshold ℓ TH . As shown in Fig. 16, the stroke length for the stroke S₁, for example, may be readily determined by summing distances between coordinate points P₀ - P₁, P₁ - P₂, P₂ - P₃ and P₃ - P₄. In the present embodiment, similar advantage to that of the previous embodiment is offered because the character stroke is generally shorter than the graphic stroke. Fig. 17 shows other embodiment. Function areas 1d, 1e and 1f are provided in the coordinate input area of the coordinate input means 1 to allow forcive designation of the character recognition mode and the graphic recognition mode. The function area 1d is used to designate the manual character input mode, the function area 1e is used to designate the graphic input mode, and the function area 1f is used to switch the mode from the forced designation to the automatic mode. If, in the automatic mode, the character or graphic recognition mode is designated, it is forcibly set. This is the manual mode, and the mode can be switched to the automatic mode by depressing the function area 11f. The strokes are inputted by the area 1c. Fig. 18 shows a flow chart corresponding to Fig. 7, when the embodiment of Fig. 17 is used. Difference from Fig. 7 is addition of steps 3b' and 3b''. The present embodiment is effective when the mode designation cannot be achieved only by the stroke coordinates, such as when a large character or a small graphic is inputted.

Claims: A method for designating a recognition mode in a hand-written character/graphic recognizer for recognizing a character being written in Kanji or Kana or a graphic in a character recognition mode or a graphic recognition mode designated in accordance with stroke information including coordinate information supplied from input means (1) which samples a hand-written character/graphic and converts it to the stroke information and for converting the recognized character/graphic to a character/graphic code, characterized in that a length measure of the respective input stroke derived from the coordinate information of the stroke of the character/graphic is extracted from the information of each stroke supplied from said input means, and the character recognition mode or the graphic recognition mode is designated in accordance with the extracted length measure, the character recognition mode being assigned if the length measure is smaller than a predetermined threshold and the graphics recognition mode being assigned if the length measure is larger than said threshold. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein the length measure are projection lenghts on x-axis and y-axis of the coordinates included in the stroke information. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein the length measure are projection lengths on x-axis and y-axis of coordinates included in the stroke information and a longer one of the projection lengths on the x-axis and the y-axis is compared with said predetermined threshold for the hand-written character input. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein if a start point of the input stroke is within a section preset for character segmentation, coordinates of the sequentially inputted strokes are stored, and if the start point of the current input stroke is not in the same section as those of the strokes so far stored, the coordinates of the strokes so far stored are delivered for character processing as a group of stroke coordinates of one character. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 3 wherein if the projection length is larger than the threshold, the stroke is translated to a line and a graphic band having a predetermined width around the line is defined, and if the start point of a later stroke is present in the graphic band, the graphic recognition mode is designated independently of the length of the later stroke. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein the length measure is a stroke length extracted from coordinates included in the stroke information. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein if a character is not recognized in the designated character recognition mode, or if the recognition result in the character recognition mode is rejected, the recognition mode is changed to the graphic recognition mode. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1 wherein null mode, character recognition mode and graphic recognition mode are provided as designation modes, the null mode is assumed when the stroke information is being stored or the recognition has been completed, the character recognition mode or the graphic recognition mode is assumed when a predetermined condition is met, and if the recognition result in the character recognition mode is rejected, the recognition mode is changed to the graphic recognition mode to carry out the graphic recognition and under the designation of the automatic mode, the character recognition mode or the graphic recognition mode is designated and after the recognition of the character/graphics, the recognition mode is switched to a null mode other than the character recognition mode and the graphic recognition mode, and then the recognition mode is again designated in accordance with the stroke information. A method for designating a recognition mode in a hand-written character/graphic recognizer according to claim 1, wherein under the designation of the automatic mode the character recognition mode or the graphic recognition mode is designated in accordance with the extracted length measure, and under the designation of a manual mode, the character recognition mode or the graphic recognition mode is manually designated independently from the length measure.

Inventors: FUKUNAGA, YASUSHI, HIRASAWA, KOTARO, KUZUNUKI, SOSHIRO, SHOJIMA, HIROSHI, YOKOYAMA, TAKANORI
Applicants: HITACHI, LTD.
Application year: 1985
Main classification: G06K9
IPC codes: G06K9, G06F3, G06K11, G06T1