Image processing method and apparatus therefor

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: BACKGROUND OF THE INVENTION 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 featuring size normalization in response to the input image information, and an apparatus therefor. 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 x N as shown in Figs. 4A and 4B. A smoothing unit 32 applies a 3 x 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 x N normalized image into N x N blocks as shown in Fig. 6, and calculating a histogram of direction indexes 1 - 4 by applying a 2 x 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 x N, the feature vector is significantly distorted if the rate of size change is large. As a specific example, let us consider 3 x 3 pixels shown in Fig. 3A. This original image has 0 direction index "1", 2 direction index "2", 0 direction index "3" and 2 direction index "4". However, an image normalized to 12 x 12 as shown in Fig. 3B has 18 direction index "1", 2 direction index "2", 18 direction index "3" and 2 direction index "4" 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 "1", 8 direction index "2", 6 direction index "3" and 8 direction index "4", 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, same feature vectors are obtained from entirely different original images, one being a small rhomb in Fig. 3A and the other being 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. Wissenschaftliche Berichte AEG Telefunken, Vol 47, No. 3/4, published 1974, Berlin, pages 90 to 99 in an article by J. Schurmann entitled "Bildvorbereitung fur die Automatische Zeichenerkennug" discloses an image recognition apparatus in which an input image is quantized, filtered and size normalized in order to edit the input image. 7th European Conference on Electronics: Advanced Technologies and Processes in Communication and Power Systems, Eurocon 86, IEEE, April 1986, published in Paris, pages 505 - 513, in an article by S H Abbas et al "Optimizing the Digital Learning Network for the Recognition of the Hand-Written Numerals used by the Arabs" discloses an image recognition system in which histograms of the normalized data are used to enhance the recognition. The extracted characters are size normalized in order to standardize dimensions. US-A-3273124 discloses a shape recognition apparatus in which each input shape is normalized to a fixed number of input points in order to correct for variations of size and angular orientation of the shape within the input image. EP-A-0368671 discloses a feature extracting apparatus with a direction index which indicates the direction in which a boundary between adjacent black and white pixel extends. 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 and apparatus according to claims 1 and 2. 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 highspeed 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 the 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 (K.B.) 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 (P.D.) 102; a read-only memory (ROM) 103 storing a dictionary to be employed in the 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 the 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 "3" and a size II of "12" 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 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 "1", "2", "3" and "4" 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 x 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} 2 , wherein the number of block division is for example "4" in case of a block division of 4 x 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 x (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 x 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, the embodiment 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 subsequence 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 x 4 blocks, by counting the direction indexes on 7 x 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.

Claims: An image processing apparatus including image input means (71) for entering an image with an arbitrary resolution, characterized by means for determining (1;72) the size of a character pattern in the entered image, selection means (5) for selecting, in response to the determined size, a normalized size of the character pattern in the entered image from a plurality of stored normalized sizes; derivation means (72) for deriving a resolution based on said character size and the selected normalized size of the character pattern in the entered image; control means (72) for controlling said image input means to re-enter the image with the resolution derived by said derivation means; character extraction means (72) for extracting a character image in accordance with the resolution derived by said derivation means from the re-entered image; and character recognition means (73,74) for recognizing the character image extracted by said character extraction means (72). An image processing method including the step of inputting images with an arbitrary resolution, the method being characterised in including the further steps of: determining the size of the character pattern in the entered image; selecting in response to the determined size a normalized size of the character pattern in the entered image from a plurality of stored normalized sizes; deriving a resolution for the image based on said character size and the selected normalized size of the character pattern in the entered image; re-entering the image with the derived resolution; extracting a character image in accordance with the derived resolution of the re-entered image; and recognizing the extracted character image.

Inventors: TANAKA TETSUOMI, TANAKA, TETSUOMI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: G06K9
IPC codes: G06K9