Abstract:
There is disclosed a character recognition method, and an apparatus therefor, capable of improving the accuracy of character recognition employing character normalization and direction index counting. The original image information is read with a resolving power matching the character size, so that the result of direction index counting is not distorted by the character size change in the normalization.

Description:
This application is a continuation of application Ser. No. 07/738,556, filed Jul. 31, 1991, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to an image processing method and an apparatus therefor, and more particularly to an image processing method featured in size normalization in response to the input image information, and an apparatus therefor. 
     2. Related Background Art 
     At first, reference is made to FIG. 14 which is a schematic block diagram of a character recognition apparatus, wherein provided are an image input unit 11 for receiving an image from an image reader such as a CCD; a character area determination unit 12 for separating a character area from the entered image; a character extraction unit 13 for extracting a character in the character area in a recognizable size; a feature extraction unit 14 for extracting the feature of the extracted character pattern, utilizing a character pattern normalized to a predetermined size; a dictionary unit 15 for storing characters and features in mutually related manner, in correspondence with the feature extraction by said feature extraction unit 14; a matching unit 16 for comparing the feature obtained from the feature extraction unit 14 with that obtained from the dictionary unit 15 and selecting a candidate character for example from the distance of said feature; and a character code output unit 17 for releasing a character code of the recognized character. 
     The feature extraction unit 14 of such conventional character recognition apparatus is constructed as shown in FIG. 15. An input terminal A receives a character pattern and information on the size thereof from the character extraction unit 13. A normalization unit 31 normalizes each character image into a size N×N as shown in FIGS. 4A and 4B. A smoothing unit 32 applies a 3×3 filter to each pixel as shown in FIG. 5, thereby reducing the distortion by normalization. A feature vector counter unit 33 divides the N×N normalized image into N×N blocks as shown in FIG. 6, and calculates a histogram of direction indexes 1-4 by applying a 2×2 mask to each block. An output terminal B sends the direction index, obtained in said counter unit 33, as a feature vector to the matching unit 16. A control unit 34 effects input/output control of various units. 
     In such conventional structure, however, since any character pattern is normalized regardless of the size thereof, by the normalization unit 31, into a constant size N×N, the feature vector is significantly distorted if the rate of size change is large. As a specific example, let us consider 3×3 pixels shown in FIG. 3A. This original image has 0 direction index &#34;1&#34;, 2 direction index &#34;2&#34;, 0 direction index &#34;3&#34; and 2 direction index &#34;4&#34;. However, an image normalized to 12×12 as shown in FIG. 3B has 18 direction index &#34;1&#34;, 2 direction index &#34;2&#34;, 18 direction index &#34;3&#34; and 2 direction index &#34;4&#34; and no longer has the feature of the original image. A smoothing process provides a certain improvement, as shown in FIG. 3C, with 6 direction index &#34;1&#34;, 8 direction index &#34;2&#34;, 6 direction index &#34;3&#34; and 8 direction index &#34;4&#34;, but the distortion becomes excessively large and can no longer be corrected by the smoothing as the ratio of size change becomes larger. 
     On the other hand, if the original image is as shown in FIG. 3B and the ratio of size change is unity, the smoothing operation does not improve the result but increases the distortion of the feature vector. More specifically, the same feature vectors are obtained from entirely different original images, one being a small rhomb in FIG. 3A and the other being a cross in FIG. 3B. Distortion appears also in case of image size reduction. 
     Thus an image enlargement reduces the diagonal components and increases the vertical and horizontal components as the ratio of image enlargement becomes larger. On the other hand, an image reduction reduces the vertical and horizontal components and increases the diagonal components, as the ratio of image reduction becomes larger. These tendencies cannot be fully corrected by any smoothing operation. 
     SUMMARY OF THE INVENTION 
     In consideration of the foregoing, the object of the present invention is to provide a character recognition method capable of preventing deterioration in the feature vectors resulting from normalization or smoothing, thereby providing a high recognition rate, and an apparatus therefor. 
     The above-mentioned object can be attained, according to the present invention, by an image processing method for recognizing characters in entered image information, featured by deriving a resolving power corresponding to the size of character to be recognized at the image input, extracting a character from the entered image information with said resolving power, and recognizing thus extracted character. 
     Also the above-mentioned object can be attained, according to the present invention, by an image processing apparatus provided with image input means capable of entering image information with an arbitrary resolving power, and recognition means for recognizing the character information in the image information entered by said image input means, said apparatus comprising derivation means for deriving the resolving power at the image input by said image input means, character extraction means for extracting character information from the input image information with the resolving power derived by said derivation means, and character recognition means for recognizing the character information extracted by said character extraction means. 
     The present invention can provide a character recognition apparatus capable of preventing deterioration in the feature vectors resulting from normalization or smoothing, thereby providing a high rate of recognition. 
     The recognition rate can be improved since there can be obtained feature vectors close to those of the original character image, regardless of the size of the character image. Though a similar effect can be obtained by counting the direction indexes in the original character image size and then varying the image size, but the selection of the normalization size as a multiple of block division facilitates the hardware construction and the high-speed processing as the normalization size can be substantially fixed. 
     As explained in the foregoing, there can be attained a reduced aberration between the normalized image formed in the feature extraction unit and the original character image, and an improved recognition rate in the character recognition apparatus, by the use of image input means capable of entering character information with an arbitrary resolving power, character feature extraction means for normalizing the character image and extracting the feature data, in the form of feature vectors, from thus normalized character image, means for calculating an optimum enlargement/reduction ratio from the normalization size of said character feature extraction means and the resolving power of the image input means and designating the resolving power at the image input by said image input means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an image processing apparatus embodying the present invention; 
     FIG. 2 is a block diagram showing structure of said embodiment; 
     FIGS. 3A, 3B and 3C are views showing drawbacks in the conventional processing based normalization and processing; 
     FIGS. 4A and 4B are views showing a normalization process; 
     FIG. 5 is a view showing a smoothing process; 
     FIG. 6 is a view showing direction indexes; 
     FIG. 7 is a block diagram of another embodiment; 
     FIG. 8 is a flow chart of a first control sequence of said embodiment; 
     FIG. 9 is a flow chart of a second control sequence of said embodiment; 
     FIG. 10 is a block diagram of a second embodiment; 
     FIG. 11 is a block diagram of a variation thereof; 
     FIG. 12 is a block diagram of a third embodiment; 
     FIGS. 13A to 13D are views showing filtering coefficients; 
     FIG. 14 is a block diagram of a conventional image processing apparatus; 
     FIG. 15 is a block diagram of a conventional feature extraction unit; and 
     FIGS. 16A to 16C are views showing examples of system structure of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
      Embodiment 1! 
     FIG. 1 is a block diagram showing basic structure of an embodiment of the present invention, wherein provided are a central processing unit (CPU) 100 for effecting processes and controls according to a flow chart as shown in FIG. 8 or 9; a keyboard 101 for entering characters and symbols, moving a cursor for indicating the position, and instructing a correction in case of a misrecognition; a pointing device 102; a read-only memory (ROM) 103 storing a dictionary to be employed in the 10 character recognition and control programs corresponding to the flow chart to be shown later; a memory 104 for storing the data read by a scanner 108; a recognizer unit 105 for finding candidate words from the data read by the scanner 108 and calculating the differences of said candidate words; a display unit 106 such as a cathode ray tube (CRT) for displaying the interim and final result of processing; an interface 107 for the scanner 108; and a scanner 108 for reading image information. 
     FIG. 2 is a block diagram of the feature extraction unit of the present embodiment; wherein provided are an input terminal A for receiving, as in the conventional apparatus, a character image and character section information; a normalization size sorting unit 1 for sorting the character section information from the input terminal A thereby generating size information; a character image normalization unit 2 for normalizing the character image from input terminal A with a normalization size varied according to a control signal from a control unit 5; a direction index counter unit 3 for dividing the normalized image, obtained in the normalization unit 2, into blocks and counting the direction indexes in each block; a vector normalization unit 4 for varying the direction indexes obtained in the direction index counter unit 3 according to the image normalization size, thereby obtaining feature vectors; a feature vector output terminal B for sending the obtained vectors to a next matching unit; and a control unit 5 composed of unrepresented CPU, ROM, RAM etc. and serving to control the entire apparatus. 
     Let us assume that images shown in FIGS. 3A and 3B are entered from the input terminal A. If a normalization size I of &#34;3&#34; and a size II of &#34;12&#34; are available, the images of FIGS. 3A and 3B are respectively classified as the size I and II, and the corresponding size information are sent to the control unit 5. The character image normalization unit 2 receives the control signal from the control unit 5, and the character image and the character section information from the input terminal, effects normalization of the character image with a varied size, and the sends the normalized character pattern to the direction index counter unit 3. In the above-mentioned example, since the normalization sizes equal to the input image sizes are available, the images shown in FIGS. 3A and 3B are released without change. 
     The direction index counter unit 3 counts the direction indexes of the received normalized character pattern. If the block division is omitted for the purpose of simplicity, the image shown in FIG. 3A has the direction indexes &#34;1&#34;, &#34;2&#34;, &#34;3&#34; and &#34;4&#34; respectively of 0, 2, 0 and 2, while the image in FIG. 3B has those of 18, 2, 18 and 2. Then the vector normalization unit 4 normalizes the direction indexes, obtained in the counter unit 3, with ratios to reference values. The number of direction indexes (2×2 masks) for a normalization size is represented by (size+1) 2 , or, if block division is employed, by: 
     
         {(size+1)/number of block division}.sup.2, 
    
     wherein the number of block division is for example &#34;4&#34; in case of a block division of 4×4. In general, the block division is facilitated by selecting (normalization size+1) as n times of the block division number, wherein n is a natural number. This is represented by: 
     
         normalization size=n×(block division number)-1 
    
     (n=1, 2, 3, . . . ). 
     Selection of plural normalization sizes based on this relationship facilitates block division, thereby rendering the hardware construction easier. 
     If the block division number is selected as 1×1 for the purpose of simplification, the number of direction indexes is 16 for the size I, or 169 for the size II. If the reference value is selected as 169 (size II), the coefficient for the size I is 169/16, while that for the size II is 169/169. 
     By multiplying the direction indexes with said coefficient, there are obtained a feature vector 0, 10.6, 0, 10.6 for the image shown in FIG. 3A, and that 18, 2, 18, 2 for the image shown in FIG. 3B. In this manner the present embodiment can provide a feature vector close to that of the original image. The obtained feature vector is supplied from the output terminal B to the matching unit 16. The control unit 5 effects the size control and the control of various units. 
     In the following there will be explained the control sequence of the present embodiment, with reference to a block diagram shown in FIG. 7 and a flow chart shown in FIG. 8. The sequence shown in said flow chart is executed by the CPU 100, according to a program stored in the ROM 103. 
     Referring to FIG. 7, there are provided an interface unit A for entering instructions from the user; a scanner 71 for entering a character image to be processed, with variable resolving power at image reading; a character extraction unit 72 for giving commands for image input and resolving power for image reading to the scanner 71 in response to the instruction from the interface A, and effecting character extraction on the image received from the scanner 71; a feature extraction unit 73 for normalizing the character image extracted by the character extraction unit 72 and extracting the feature data as a feature vector; a recognition unit 74 for comparing the feature vector, obtained in the extraction unit 73 with the already stored feature data of characters and converting a candidate character of shortest distance to the corresponding character code; and an output unit B for releasing thus obtained character code. 
     Now referring to FIG. 8, at first a process start instruction from the user and the character size in the text to be processed are transmitted from the interface A to the character extraction unit 72 (S1). Said unit calculates an optimum resolving power for image reading, based on said character size and the normalization size of the feature extraction unit 73 (S2), and sends said resolving power and an image reading command to the reader 71 (S3). The reader 71 effects text reading with the designated resolving power and sends the read image to the character extraction unit 72 (S4). In response said unit 72 effects character extraction (S5) and sends the extracted character image to the feature extraction unit 73. Subsequently the feature extraction unit 73 executes feature extraction (S6), and the recognition unit 74 executes character recognition (S7), and the obtained result is released as a character code from the output unit B. 
     In the following there will be explained, with reference to a flow chart shown in FIG. 9, a variation in which the character recognition can be conducted without instruction of character size by the operator. At first a character size P1 is assumed, and the image is entered with a resolving power matching said assumed character size P1. Then the actual character size P2 is derived from thus entered image information, and the subsequent processing is conducted according to said actual character size. 
     Referring to the flow chart shown in FIG. 9, at first a process start command is transmitted from the interface A to the character extraction unit 72, which in response transmits, to the image input unit 71, an image reading command with a resolving power matching a most frequently used character size P1 (for example 12 points). The image input unit 71 sends the image with thus designated resolving power (S10) to the character extraction unit 72, which executes the character extraction (S11). Then the size P2 of the extracted character is derived (S12), and there is discriminated whether P1=P2 (S13). If P1=P2, the entered image information is directly subjected to feature extraction (S18) and character recognition (S19). On the other hand, if the step S13 identifies P1≠P2, there is calculated an image size varying ratio for obtaining an optimum resolving power, based on P1 and P2 (S14), and the image is entered again by the image input unit 71 based on said ratio (S16). Then a character is extracted from the reentered image with the optimum resolving power (S17), then is subjected to feature extraction (S18) and character recognition (S19), and the obtained result is released from the output unit B. 
      Embodiment 2! 
     FIGS. 10 and 11 show an embodiment including a gradation processor unit 6 to the foregoing embodiment. 
     The gradation process is to determine the feature vector for example of 4×4 blocks, by counting the direction indexes on 7×7 blocks in the direction index counter unit 3, and then applying a Gaussian filter, of which example is shown in FIG. 13A. 
      Embodiment 3! 
     In this embodiment, the vector normalization unit 4 in the foregoing embodiments is replaced by a vector normalization and gradation processing unit 7 for simultaneously effecting the vector normalization and gradation process, as shown in FIG. 12. 
     The gradation process is a filtering process with coefficients as shown in FIG. 13A. In the present embodiment, the vector normalization and the gradation process as in the 2nd embodiment can be achieved in one process by preparing tables, representing the products of said filtering coefficients and vector normalizing coefficients respective for different normalization sizes, as shown in FIGS. 13B-13D. 
     In the foregoing embodiments, the host computer, scanner and keyboard may be constructed independently or integrally combined as shown in FIGS. 16A to 16C. 
     The present invention is applicable to a system consisting of plural devices, an apparatus consisting of a single device, or a program that is supplied to a system or an apparatus.