A method for recognizing Chinese character images based on a four-corner number dictionary and related components
By using a Chinese character image recognition method based on the four-corner code dictionary, and leveraging skeleton information and the four-corner code character lookup method, Chinese characters can be quickly recognized. This solves the problems of long recognition time and high computational power consumption in existing technologies, and achieves efficient Chinese character recognition.
Patent Information
- Application Number
- CN202310704855.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-06-14
AI Technical Summary
Existing machine learning-based Chinese character image recognition methods suffer from problems such as long recognition time and high computational cost.
A Chinese character image recognition method based on the four-corner code dictionary is adopted. The method preprocesses the Chinese character image, extracts the skeleton information and performs four-corner code character recognition. The four-corner code dictionary is called to obtain the set of homophone Chinese characters, and the Chinese characters are quickly identified by confidence prediction and feature information comparison.
It achieves fast and efficient Chinese character recognition, reduces computing resource consumption, and improves recognition efficiency.
Smart Images

Figure CN116682114B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Chinese character image recognition technology, and in particular to a Chinese character image recognition method and related components based on a four-corner code dictionary. Background Technology
[0002] Chinese character image recognition technology has been developing for decades. Early techniques included various methods, such as feature point extraction-based recognition, which involved extracting feature points from character images, comparing the similarity of feature points between two images, and then providing the recognition result. Another example is stroke-based recognition, which requires identifying stroke endpoints, turning points, forks, and intersections. Blurred, irregular, or incorrectly connected strokes significantly impact the recognition results. Correctly identifying the stroke order is also challenging. Both of these methods require constructing corresponding feature information for each character, resulting in a large feature database.
[0003] To address the problems of the two methods mentioned above, a radical-based Chinese character image recognition method is proposed. This method first pre-classifies the character structure and then extracts and recognizes features from the divided radicals. This method breaks down the entire character, which can significantly reduce the amount of feature information. The radical-based method requires constructing a set of ideographic character sequences for each Chinese character, which is time-consuming and lacks authority.
[0004] To date, with the development of machine learning, it is common practice to feed a large amount of experimental data into machine learning in order to improve the accuracy of Chinese character image recognition; however, this method has shortcomings such as large data volume, long recognition time, and huge consumption of computer computing power. Summary of the Invention
[0005] The purpose of this invention is to provide a Chinese character image recognition method and related components based on a four-corner code dictionary, aiming to solve the problems of long target Chinese character recognition time and high computing power consumption in existing machine learning-based Chinese character image recognition methods.
[0006] In a first aspect, embodiments of the present invention provide a Chinese character image recognition method based on a four-corner code dictionary, comprising:
[0007] The input Chinese character image is preprocessed to obtain the skeleton information of the Chinese character to be recognized in the image;
[0008] The strokes of the skeleton information are identified using the four-corner number character lookup method to obtain the four-corner number corresponding to the skeleton information;
[0009] Based on the four-corner code of the skeleton information, the four-corner code dictionary is called to read the Chinese characters with the same four-corner code, and a set of Chinese characters with the same code is obtained.
[0010] When the number of characters in the set of homophones is one, the unique character in the set of homophones is directly output as the recognition result.
[0011] When the number of characters in the set of homophones is within the first preset range, the set of homophones and the Chinese character image are input into the confidence prediction module for similarity comparison, and the Chinese character with the highest confidence is output as the recognition result.
[0012] When the number of characters in the set of homophones is within the second preset range, the set of homophones and the character images are input into the deduplication module for feature information comparison, and characters with inconsistent feature information in the set of homophones are removed until the number of characters in the set of homophones is one or within the first preset range.
[0013] Secondly, embodiments of the present invention provide a Chinese character image recognition device based on a four-corner code dictionary, comprising:
[0014] The preprocessing unit is used to preprocess the input Chinese character image to obtain the skeleton information of the Chinese character to be recognized in the Chinese character image;
[0015] The recognition unit is used to identify the stroke shape of the skeleton information using the four-corner number character detection method to obtain the four-corner number corresponding to the skeleton information;
[0016] The construction unit is used to call the four-corner code dictionary according to the four-corner code of the skeleton information to read the homophone Chinese characters with the same four-corner code, and obtain the homophone Chinese character set;
[0017] The output unit is used to directly output the unique Chinese character in the set of homophones as the recognition result when the number of characters in the set of homophones is one.
[0018] The first comparison unit is used to input the set of homophone Chinese characters and the Chinese character image into the confidence prediction module for similarity comparison when the number of characters in the set of homophone Chinese characters is within the first preset range, and output the Chinese character with the highest confidence as the recognition result.
[0019] The second comparison unit is used to input the set of homophones and the image of the Chinese characters into the deduplication module for feature information comparison when the number of characters in the set of homophones is within the second preset range, and to remove Chinese characters with inconsistent feature information in the set of homophones until the number of characters in the set of homophones is one or within the first preset range.
[0020] This invention discloses a Chinese character image recognition method and related components based on a four-corner code dictionary. The method includes: preprocessing the input Chinese character image to obtain the skeleton information of the character to be recognized; using the four-corner code method to identify the strokes of the skeleton information to obtain the corresponding four-corner code; calling the four-corner code dictionary to read duplicate characters with the same four-corner code to obtain a set of duplicate characters; when the number of characters in the set of duplicate characters is one, outputting the unique character as the recognition result; when the number of characters in the set of duplicate characters is within a first preset range, outputting the character with the highest confidence score from the set of duplicate characters as the recognition result; when the number of characters in the set of duplicate characters is within a second preset range, removing characters with inconsistent features from the set of duplicate characters until the number of characters in the set of duplicate characters is one or within the first preset range. In the implementation of this invention, if a unique character exists in the set of duplicate characters, the character result is automatically output, and subsequent confidence score comparison and duplicate character removal are not performed, thus achieving the advantage of quickly finding the correctly recognized target Chinese character from the set of duplicate characters in the four-corner code dictionary. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating the Chinese character image recognition method provided in an embodiment of the present invention;
[0023] Figure 2 This is a schematic diagram of a sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of another sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of another sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0026] Figure 5 This is a schematic diagram of another sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0027] Figure 6 A flowchart illustrating the first deduplication method provided in an embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram of another sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0029] Figure 8A flowchart illustrating the second deduplication method provided in this embodiment of the invention;
[0030] Figure 9 This is a schematic diagram of another sub-process of the Chinese character image recognition method provided in an embodiment of the present invention;
[0031] Figure 10 A flowchart illustrating the third deduplication method provided in this embodiment of the invention;
[0032] Figure 11 A schematic block diagram of a Chinese character image recognition device provided in an embodiment of the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0035] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0036] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0037] Please see Figure 1 , Figure 1 A flowchart illustrating the Chinese character image recognition method based on a four-corner code dictionary provided in an embodiment of the present invention;
[0038] like Figure 1 As shown, the method includes steps S101 to S106.
[0039] S101. Preprocess the input Chinese character image to obtain the skeleton information of the Chinese character to be recognized in the Chinese character image;
[0040] S102. Recognize the strokes of the skeleton information using the four-corner code method to obtain the four-corner code corresponding to the skeleton information;
[0041] S103. Based on the four-corner code of the skeleton information, call the four-corner code dictionary to read the homophones with the same four-corner code, and obtain the set of homophones.
[0042] In steps S102 to S103, the four-corner code method is used to look up the Chinese characters in the preprocessed image. The four-corner codes corresponding to the four corners of the Chinese character image are identified. The four-corner code dictionary is called to look up all Chinese characters with the same code. All Chinese characters corresponding to the four-corner code are integrated into a set of Chinese characters.
[0043] S104. When the number of characters in the set of homophones is one, directly output the unique character in the set of homophones and use it as the recognition result.
[0044] S105. When the number of characters in the set of homophones is within the first preset range, input the set of homophones and the Chinese character image into the confidence prediction module for similarity comparison, and output the Chinese character with the highest confidence as the recognition result.
[0045] S106. When the number of characters in the set of homophones is within the second preset range, the set of homophones and the image of the characters are input into the deduplication module for feature information comparison, and characters with inconsistent feature information in the set of homophones are removed until the number of characters in the set of homophones is one or within the first preset range.
[0046] In steps S104 to S106, an n value can be dynamically set. The first preset range is greater than 1 and less than or equal to n, and the second preset range is greater than n. Then, the number of characters in the set of homophone Chinese characters is compared with the n value, and the confidence prediction module and the deduplication module are used to filter and remove homophones. Finally, the unique target Chinese character is output as the recognition result.
[0047] In this embodiment, the value of n can be generated based on the Four-Corner Code dictionary and national standard documents related to characters. Specifically, all homophone sets of Chinese characters in the Four-Corner Code can be classified based on the national standard documents related to Chinese characters, and a threshold n is set for each Four-Corner Code. The value of the threshold n is the maximum number of Chinese characters contained in the smallest classification unit of the array generated by the current classification method. Using this dynamic n value as the threshold to execute processes S104 to S106 is more in line with practical applications.
[0048] In this embodiment, when a unique Chinese character exists in the set of homophones, the unique Chinese character result is automatically output as the recognition result, and the subsequent confidence comparison and homophone removal work is no longer performed. This achieves the advantage of quickly finding the correct target Chinese character from the set of homophones in the four-corner code dictionary.
[0049] In one embodiment, such as Figure 2 As shown, step S101 includes:
[0050] S201. Perform grayscale processing on the Chinese character image and obtain the Chinese character pixels;
[0051] S202. Perform dilation and erosion operations on the Chinese character pixels to obtain the repaired Chinese character pixels;
[0052] S203. Based on the repaired Chinese character pixels, stroke extraction is performed to obtain the skeleton information of the Chinese character to be identified in the Chinese character image.
[0053] In this embodiment, the segmentation threshold between Chinese character pixels and background pixels is first determined based on the grayscale value of the Chinese character image, and the Chinese character pixels are then segmented from the background pixels. Then, dilation and erosion operations are performed on the Chinese character pixels to repair broken strokes. Next, the skeleton of the strokes of the Chinese character pixels is extracted. Then, the corresponding endpoints, inflection points, divergences, and intersections are found based on the stroke skeleton, which can effectively find the angular deflection of the Chinese character pixels, thereby rotating and transforming the Chinese character pixels. Finally, after this preprocessing, the input Chinese character image becomes a more ideal Chinese character image.
[0054] In one embodiment, such as Figure 3 As shown, step S102 includes:
[0055] S301. Based on the skeleton information, the Chinese character to be recognized is segmented into four rectangular regions;
[0056] S302. Extract the stroke information and relative spatial position of the four rectangular regions to obtain the stroke features of the four rectangular regions;
[0057] S303. Match the stroke diagram of the four-corner code dictionary with the stroke features of the four rectangular regions, and output the four-corner code of the skeleton information.
[0058] In this embodiment, firstly, the four regions of the Chinese character image—upper left, upper right, lower left, and lower right—are segmented into four rectangular regions based on the skeleton information. These four rectangular regions represent the four corners of the Chinese character image as valid detection areas. Then, the strokes within each rectangular region are combined to obtain effective feature information. For example, the processing method for the upper left rectangular region is as follows: first, search for the leftmost and highest stroke in the detection area. Then, search for strokes along this stroke position towards the lower right corner, prioritizing the expansion of strokes connected to this stroke, followed by the expansion of the nearest stroke. After searching all the strokes in the detection area, a stroke vector is generated. Using the first stroke of the stroke vector as the main element, connected or adjacent strokes are combined to obtain the stroke shape features of the rectangular region. Similarly, for the upper right, lower left, and lower right regions, first search for the rightmost and highest, leftmost and lowest, and rightmost and lowest strokes respectively, and then expand the stroke search in the opposite direction. Finally, the stroke shape diagrams from the four-corner code dictionary are matched with the stroke shape features of the four rectangular regions of the Chinese character image to output the four-corner code of the Chinese character image.
[0059] By using the four-corner code of Chinese character images, and searching the dictionary for all Chinese characters corresponding to the four-corner code, a set of homophone Chinese characters can be output.
[0060] In one embodiment, such as Figure 4 As shown, step S105 includes:
[0061] S401. Convert the Chinese characters in the set of homophones into images to be predicted;
[0062] S402. Enlarge and stretch the image to be predicted;
[0063] S403. Perform gray-level histogram statistics on the processed image to be predicted and the Chinese character image to obtain the corresponding gray-level histogram.
[0064] S404. Compare the similarity between the grayscale histogram of the image to be predicted and the grayscale histogram of the Chinese character image to obtain the corresponding similarity value.
[0065] S405. Save the images to be predicted with similarity values greater than the preset similarity to the prediction set;
[0066] S406. Select the Chinese character corresponding to the image to be predicted with the highest similarity value from the prediction set as the recognition result.
[0067] In this embodiment, when the number of characters in the set of homophones is within the first preset range, because there are multiple characters, a unique recognition result cannot be directly output. Therefore, this application introduces a confidence prediction module. After image grayscale processing in steps S401 to S404, the grayscale histogram of each image to be predicted in the set of homophones is compared with the grayscale histogram of the Chinese character image. The preset similarity can be 90%, that is, the Chinese character corresponding to the image to be predicted with a similarity value > 90% is selected as the candidate recognition result and saved in the prediction set. After the similarity comparison is completed, when the number of characters in the prediction set is greater than one, the Chinese character corresponding to the image to be predicted with the largest similarity value is directly output as the recognition result; when the number of characters in the prediction set is zero, the Chinese character corresponding to the image to be predicted with the largest similarity value is selected from all similarity values as the recognition result.
[0068] The deduplication process is explained in detail below:
[0069] In the first deduplication method, such as Figure 5 As shown, step S106 includes:
[0070] S501. Read Chinese characters from the set of homophone characters;
[0071] S502. Call the preset Chinese character stroke order standard file to read the relevant stroke count information of Chinese characters in the homophone Chinese character set, and generate a one-dimensional vector;
[0072] S503. Identify the number of strokes of the character to be identified based on the skeleton information of the character to be identified;
[0073] S504. Query the Chinese characters in the one-dimensional vector that have the same number of strokes as the character to be identified, and take the Chinese characters with the same number of strokes as the new set of homophones.
[0074] In this embodiment, for ease of understanding, combined with Figure 6 The flowchart is shown below. First, the Chinese characters in the homophone set S0 are read. The pre-defined GF 0023-2020 general standard Chinese character stroke order file is used to read the stroke count information of the characters in the homophone set, generating a one-dimensional vector. Then, a response mechanism is triggered to identify the strokes of the characters to be recognized in the Chinese character image. Specifically, the stroke count of the Chinese character image can be obtained through the skeleton information of the Chinese character image. Finally, the classification of Chinese characters with the same stroke count in the one-dimensional vector is queried, and the Chinese character classification result is used as the new homophone set S1 for subsequent operations.
[0075] For example, the Chinese character to be recognized in the Chinese character image is the character "fen" (吩), whose four-corner code is 6802. The information of the General Specification for the Stroke Order of Chinese Characters in GF 0023-2020 is called to classify the relevant Chinese characters (喻, 畛, 吖, 睇, 嗲, 吩, 盼, 噙, 嗡, 吟) with the four-corner code 6802 by the number of strokes (as shown in Table 1), obtaining a one-dimensional vector. After removing the relevant Chinese characters with other stroke numbers by comparing the strokes of the character "fen", the Chinese characters "fen" and "yin" with 7 strokes are used as the new set of homophonic characters S1.
[0076] Table 1
[0077] 6 strokes 7 strokes 9 strokes 10 entries 12 strokes 13 strokes 15 strokes Ah Fen, Yin Hope boundary Metaphor, observation cute, buzz hold in mouth
[0078] In the second de-duplication method, as Figure 7 shown, step S106 includes:
[0079] S701. Read the Chinese characters in the homophonic character set.
[0080] S702. Call the preset Chinese character radical classification specification file of the character set to read the relevant radical information of the Chinese characters in the homophonic character set and generate a one-dimensional vector.
[0081] S703. Identify the radical of the text to be recognized according to the skeleton information of the text to be recognized.
[0082] S704. Query the Chinese character classification in the one-dimensional vector that is the same as the radical of the text to be recognized, and use the Chinese characters with the same radical as the new homophonic character set.
[0083] In this embodiment, for the convenience of understanding, in combination with Figure 8 the flowchart shown. First, read the Chinese characters in the homophonic character set S0, call the preset Chinese character radical classification specification file of the GB 13000.1 character set to read the relevant radical information of the Chinese characters in the homophonic character set, and generate a one-dimensional vector. Then, trigger the response mechanism to identify the radical of the Chinese character image at the same time. Specifically, the strokes of the Chinese character image can be obtained through the skeleton information of the Chinese character image, and then the mutually connected and adjacent strokes are combined to obtain the radical of the Chinese character image. Finally, query the Chinese character classification in the one-dimensional vector that is the same as the radical, and use the Chinese character classification result as the new homophonic character set S1 for the subsequent operation process.
[0084] For example, taking the Chinese character image to be recognized as the character "fen" as an example, its four-corner code is 6802. The information of the Chinese character radical classification specification document of the GB 13000.1 character set is called to perform radical classification processing on the related Chinese characters (yu, zhen, a, di, dia, fen, pan, qin, weng, yin) with the four-corner code 6802 (as shown in Table 2), obtaining a one-dimensional vector. By comparing the radical "kou" of the character "fen", after removing the related Chinese characters with other radicals, the Chinese characters "yu a dia fen qin weng yin" with the radical "kou" are used as the new set of homophonic characters S1.
[0085] Table 2
[0086] mouth Head field Yu, Ya, Dia, Fen, Qin, Weng, Yin See, hope boundary
[0087] In the third de-duplication method, as Figure 9 shown, step S106 includes:
[0088] S901. Read the Chinese characters in the homophonic character set;
[0089] S902. Call the preset Chinese character stroke order specification file to read the relevant stroke number information of the Chinese characters in the homophonic character set;
[0090] S903. Call the preset character set Chinese character radical classification specification file to read the relevant radical information of the Chinese characters in the homophonic character set;
[0091] S904. Combine the relevant stroke number information and the relevant radical information in parallel to generate a two-dimensional array;
[0092] S905. Identify the stroke number and radical of the text to be recognized according to the skeleton information of the text to be recognized;
[0093] S906. Query the Chinese character classification in the two-dimensional vector that is consistent with the stroke number and radical of the text to be recognized, and use the Chinese characters with consistent stroke number and radical as the new homophonic character set.
[0094] In this embodiment, for the convenience of understanding, in combination with Figure 8 the flowchart shown. First, read the Chinese characters in the homophonic character set S0, call the preset GF 0023-2020 General Specification Chinese Character Stroke Order Specification File to read the relevant stroke number information of the Chinese characters in the homophonic character set, and the preset call to the GB 13000.1 Character Set Chinese Character Radical Classification Specification File to read the relevant radical information of the Chinese characters in the homophonic character set, and combine the relevant stroke number information and the relevant radical information in parallel to generate a two-dimensional array. Then, trigger the response mechanism at the same time to recognize the stroke number and radical of the Chinese character image. Finally, query the Chinese character classification in the two-dimensional array that is consistent with both the stroke number and the radical, and use the Chinese character classification result as the new homophonic character set S1 for the subsequent operation process.
[0095] For example, taking the Chinese character image to be recognized as the character "fen" as an example, its four-corner code is 6802. Call the information of the General Standard Chinese Character Stroke Specification Document GF 0023-2020 and the Chinese Character Radical Classification Specification Document of the GB 13000.1 Character Set to classify the relevant Chinese characters (yu, zhen, a, di, die, fen, pan, qin, weng, yin) with the four-corner code 6802 by the number of strokes and radicals (as shown in Table 3), and obtain a two-dimensional array. By comparing that the number of strokes of the character "fen" is 7 and the radical is "kou", after removing the relevant Chinese characters with other numbers of strokes and radicals, finally, the Chinese characters "fen" and "yin" are used as the new set of homophonic Chinese characters S1.
[0096] Table 3
[0097] 6 7 9 10 12 13 15 mouth Ah Fen, Yin Metaphor cute, buzz hold in mouth Head Hope See field boundary
[0098] Based on the above-described duplicate removal process of the homophonic Chinese character set, according to the user's own needs, the operation mode of connecting multiple duplicate removal sub-modules of homophonic Chinese characters in series or in parallel can be selected. Among them, the series operation mode is to associate the characteristic information provided by the national standard document related to Chinese characters with the set of homophonic Chinese characters to generate a one-dimensional vector. Among them, the parallel operation mode is to associate the characteristic information provided by multiple national standard documents related to Chinese characters with the set of homophonic Chinese characters to generate a multi-dimensional array. The duplicate removal module introduced in this application performs duplicate removal of homophonic Chinese characters based on the national standard documents related to the stroke order, number of strokes, radicals or font structure of Chinese characters. The methods adopted by the duplicate removal module include the above methods, but are not limited to the above methods.
[0099] The embodiment of the present invention also provides a Chinese character image recognition device based on a four-corner code dictionary. The Chinese character image recognition device based on a four-corner code dictionary is used to execute any embodiment of the foregoing Chinese character image recognition method based on a four-corner code dictionary. Specifically, please refer to Figure 11 , Figure 11 which is a schematic block diagram of the Chinese character image recognition device based on a four-corner code dictionary provided by the embodiment of the present invention.
[0100] As Figure 11 shown, the Chinese character image recognition device 1100 based on a four-corner code dictionary includes: a preprocessing unit 1101, a recognition unit 1102, a construction unit 1103, an output unit 1104, a first comparison unit 1105, and a second comparison unit 1106.
[0101] The preprocessing unit 1101 is used to preprocess the input Chinese character image to obtain the skeleton information of the Chinese character to be recognized in the Chinese character image;
[0102] The recognition unit 1102 is used to recognize the strokes of the skeleton information using the four-corner number character lookup method to obtain the four-corner number corresponding to the skeleton information;
[0103] Construction unit 1103 is used to call the four-corner code dictionary based on the four-corner code of the skeleton information to read the homophone Chinese characters with the same four-corner code, and obtain the set of homophone Chinese characters;
[0104] The output unit 1104 is used to directly output the unique Chinese character in the set of homophones when there is only one character in the set of homophones and use it as the recognition result.
[0105] The first comparison unit 1105 is used to input the set of homophone Chinese characters and the Chinese character image into the confidence prediction module for similarity comparison when the number of characters in the set of homophone Chinese characters is within the first preset range, and output the Chinese character with the highest confidence as the recognition result.
[0106] The second comparison unit 1106 is used to input the set of homophones and the image of the Chinese characters into the deduplication module for feature information comparison when the number of characters in the set of homophones is within the second preset range, and to remove Chinese characters with inconsistent feature information in the set of homophones until the number of characters in the set of homophones is one or within the first preset range.
[0107] During implementation, if a unique Chinese character exists in the set of duplicate codes, the device automatically outputs the Chinese character result as the recognition result and does not continue to perform subsequent confidence comparison and duplicate code removal work, so as to achieve the advantage of quickly finding the target Chinese character for recognition from the set of duplicate codes in the four-corner code dictionary.
[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0109] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for Chinese character image recognition based on a four-corner code dictionary, characterized in that, include: The input Chinese character image is preprocessed to obtain the skeleton information of the Chinese character to be recognized in the image; The strokes of the skeleton information are identified using the four-corner number character lookup method to obtain the four-corner number corresponding to the skeleton information; Based on the four-corner code of the skeleton information, the four-corner code dictionary is called to read the Chinese characters with the same four-corner code, and a set of Chinese characters with the same code is obtained. When the number of characters in the set of homophones is one, the unique character in the set of homophones is directly output as the recognition result. When the number of characters in the set of homophones is within the first preset range, the set of homophones and the Chinese character image are input into the confidence prediction module for similarity comparison, and the Chinese character with the highest confidence is output as the recognition result. When the number of characters in the set of homophones is within the second preset range, the set of homophones and the character images are input into the deduplication module. Based on the number of strokes, radicals, or combinations of strokes and radicals of the characters in the set of homophones, feature information is compared to eliminate characters with inconsistent feature information in the set of homophones until the number of characters in the set of homophones is one or within the first preset range.
2. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, The preprocessing of the input Chinese character image to obtain the skeleton information of the Chinese character to be recognized in the image includes: Perform grayscale processing on the Chinese character image and obtain the Chinese character pixels; The Chinese character pixels are subjected to dilation and erosion operations to obtain the repaired Chinese character pixels; Stroke extraction is performed based on the repaired Chinese character pixels to obtain the skeleton information of the Chinese character to be identified in the Chinese character image.
3. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, The step of performing four-corner number character recognition on the stroke shape of the skeleton information to obtain the four-corner number corresponding to the skeleton information includes: Based on the skeleton information, the Chinese character to be recognized is segmented into four rectangular regions using a cross-shaped method. Extract the stroke information and relative spatial position of the four rectangular regions to obtain the stroke features of the four rectangular regions; The stroke diagrams of the four-corner code dictionary are matched with the stroke features of the four rectangular regions to output the four-corner codes of the skeleton information.
4. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, When the number of characters in the set of homophones is within a first preset range, the set of homophones and the character images are input into the confidence prediction module for similarity comparison, and the character with the highest confidence is output as the recognition result, including: The Chinese characters in the set of homophones are converted into images to be predicted; The image to be predicted is magnified and stretched; Perform grayscale histogram statistics on the processed image to be predicted and the Chinese character image to obtain the corresponding grayscale histogram; The grayscale histogram of the image to be predicted and the grayscale histogram of the Chinese character image are compared to obtain the corresponding similarity value. The images to be predicted whose similarity value is greater than a preset similarity are saved to the prediction set; The Chinese character corresponding to the image to be predicted with the highest similarity value is selected from the prediction set as the recognition result.
5. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, When the number of characters in the set of homophones is within a second preset range, the set of homophones and the character images are input into a deduplication module for feature information comparison. Characters with inconsistent feature information in the set of homophones are removed until the number of characters in the set of homophones is one or within the first preset range, including: Read the Chinese characters from the set of homophones; The system calls a preset Chinese character stroke order standard file to read the relevant stroke count information of Chinese characters in the homophone Chinese character set and generates a one-dimensional vector. The number of strokes of the character to be identified is determined based on the skeleton information of the character to be identified; The Chinese character categories in the one-dimensional vector that have the same number of strokes as the character to be identified are queried, and the Chinese characters with the same number of strokes are taken as a new set of homophones.
6. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, When the number of characters in the set of homophones is within a second preset range, the set of homophones and the character images are input into a deduplication module for feature information comparison. Characters with inconsistent feature information in the set of homophones are removed until the number of characters in the set of homophones is one or within the first preset range, including: Read the Chinese characters from the set of homophones; The system calls a preset character set Chinese character radical classification standard file to read the relevant radical information of Chinese characters in the homophone Chinese character set and generates a one-dimensional vector. Identify the radicals and components of the character to be identified based on its skeleton information; The Chinese characters in the one-dimensional vector that have the same radical as the character to be identified are classified, and the Chinese characters with the same radical are taken as a new set of homophones.
7. The Chinese character image recognition method based on a four-corner code dictionary according to claim 1, characterized in that, When the number of characters in the set of homophones is within a second preset range, the set of homophones and the character images are input into a deduplication module for feature information comparison. Characters with inconsistent feature information in the set of homophones are removed until the number of characters in the set of homophones is one or within the first preset range, including: Read the Chinese characters from the set of homophones; The system calls a preset Chinese character stroke order standard file to read the relevant stroke count information of Chinese characters in the homophone Chinese character set; The system calls a preset character set Chinese character radical classification standard file to read the relevant radical information of Chinese characters in the homophone Chinese character set; The relevant stroke count information and the relevant radical information are concatenated in parallel to generate a two-dimensional array; The number of strokes and radicals of the character to be identified are determined based on the skeleton information of the character to be identified. The Chinese character categories in the two-dimensional array that match the number of strokes and radicals of the character to be identified are queried, and the Chinese characters that match the number of strokes and radicals are taken as a new set of homophones.
8. A Chinese character image recognition device based on a four-corner code dictionary, characterized in that, include: The preprocessing unit is used to preprocess the input Chinese character image to obtain the skeleton information of the Chinese character to be recognized in the Chinese character image; The recognition unit is used to identify the stroke shape of the skeleton information using the four-corner number character detection method to obtain the four-corner number corresponding to the skeleton information; The construction unit is used to call the four-corner code dictionary according to the four-corner code of the skeleton information to read the homophone Chinese characters with the same four-corner code, and obtain the homophone Chinese character set; The output unit is used to directly output the unique Chinese character in the set of homophones as the recognition result when the number of characters in the set of homophones is one. The first comparison unit is used to input the set of homophone Chinese characters and the Chinese character image into the confidence prediction module for similarity comparison when the number of characters in the set of homophone Chinese characters is within the first preset range, and output the Chinese character with the highest confidence as the recognition result. The second comparison unit is used to input the set of homophones and the image of the Chinese characters into the deduplication module when the number of characters in the set of homophones is within the second preset range. It compares the feature information of the Chinese characters in the set of homophones based on the number of strokes, radicals, or combinations of strokes and radicals, and removes Chinese characters with inconsistent feature information in the set of homophones until the number of characters in the set of homophones is one or within the first preset range.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the Chinese character image recognition method based on the four-corner code dictionary as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the Chinese character image recognition method based on a four-corner code dictionary as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Foursquare stroke code Chinese character input method as well as letter and numeric keyboard thereof
CN101201701A
Font pattern recognition method, electronic device and storage medium
CN109857912A