A method for extracting key skeleton points of Chinese characters based on multi-scale

By using a multi-scale method to extract key skeleton points of Chinese characters, including records of endpoints, intersections, inflection points, and widening points, the problem of poor vectorization quality and large storage space in existing technologies is solved, achieving higher quality and smaller storage space.

CN116778496BActive Publication Date: 2026-03-03NANKAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310833921.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-10
Publication Date
2026-03-03
Estimated Expiration
2043-07-10

AI Technical Summary

Technical Problem

Existing techniques for vectorizing Chinese characters fail to fully consider all variations in the characters, resulting in poor vectorization quality and large storage space requirements.

Method used

A method based on multi-scale extraction of key skeleton points of Chinese characters is adopted. By generating a binary image, the endpoints, intersections, inflection points, bending points and widening points of the skeleton are extracted and recorded as key skeleton points.

Benefits of technology

It improves the quality of Chinese character vectorization and reduces the storage space required for vectorized Chinese characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116778496B_ABST
    Figure CN116778496B_ABST
Patent Text Reader

Abstract

The application discloses a method for extracting key skeleton points of Chinese characters based on multi-scale, and belongs to the field of computer and Chinese character vectorization. The method comprises the following steps: inputting a single Chinese character picture, and performing pretreatment to generate a binary image; extracting the skeleton of the Chinese character by using a skeleton extraction algorithm; extracting all end points and all intersection points of the skeleton based on the aggregation degree; extracting all inflection points of the skeleton by using a small-scale filtering method; extracting all bending points of the skeleton by using a large-scale filtering method; further extracting all width change points of the average stroke width; and recording all the end points, intersection points, inflection points, bending points and width change points as all key skeleton points of the Chinese character. The application can effectively extract the key skeleton points of all changes of the Chinese character, effectively reduce the number of non-key skeleton points, and thus effectively reduce the storage space size of the vectorized Chinese character under the premise of ensuring the high quality of the vectorized Chinese character.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer science and Chinese character vectorization, and mainly focuses on improving the quality of Chinese character vectorization and reducing the storage space of vectorized Chinese characters. Background Technology

[0002] To improve the quality of Chinese character vectorization and reduce storage size, the problem of extracting key skeleton points of Chinese characters is introduced. Key skeleton points of Chinese characters are skeleton points that encompass all the variations within the character. Existing methods for extracting key skeleton points generally only extract endpoints, intersections, and inflection points. Current research results are limited, as detailed below:

[0003] Document 1: Wang, C., Lian, Z., Tang, Y., & Xiao, J. (2013). Automatic CorrespondenceFinding for Chinese Characters Using Graph Matching. 2013Seventh International Conference on Image and Graphics, 545-550.

[0004] The method for extracting key skeletons of Chinese characters given in Reference 1 involves generating the character skeleton, trimming it by deleting some short branches, and then extracting the endpoints, connection points, and corner points of the skeleton as key points. However, this paper does not discuss the specific methods for extracting these points, connection points, and corner points.

[0005] Document 2: Pan, W., Lian, Z., Tang, Y., & Xiao, J. (2014). Skeleton-guidedvectorization of Chinese calligraphy images. 2014 IEEE 16th International Workshop on Multimedia Signal Processing (MMSP), 1-6.

[0006] Reference 2 presents a method for extracting key skeletons of Chinese characters: after generating the character skeleton, the skeleton is grown and pruned, and finally the starting point, ending point, and turning point in the skeleton are located as key skeleton points. However, this paper does not discuss how to specifically extract the starting point, ending point, and turning point. Summary of the Invention

[0007] The purpose of this invention is to overcome the above-mentioned shortcomings of the existing technology. In order to improve the quality of Chinese character vectorization and reduce the storage space, this invention provides a method for extracting key skeleton points of Chinese characters based on multiple scales.

[0008] The present invention preprocesses an input single Chinese character picture to generate a binary picture; extracts the skeleton of the Chinese character by using a skeleton extraction algorithm; extracts all end points and all intersection points of the skeleton based on the aggregation degree; extracts all folding points of the skeleton by using a small-scale filtering method; extracts all bending points of the skeleton by using a large-scale filtering method; further extracts all width-changing points of the average stroke width change; and records all the above-mentioned end points, intersection points, folding points, bending points, and width-changing points as all key skeleton points of the Chinese character.

[0009] The technical solution of the present invention

[0010] A method for extracting key skeleton points of Chinese characters based on multiple scales, the method includes the following specific steps:

[0011] Step 1: Input a single Chinese character picture;

[0012] Step 2: Preprocess the input Chinese character picture to generate a binary picture;

[0013] Step 3: For the binary picture in Step 2, extract the skeleton of the Chinese character by using a skeleton extraction algorithm, and the skeleton of the Chinese character is composed of all skeleton pixel points (i, j), where 0 ≤ i ≤ (width of the Chinese character picture - 1), 0 ≤ j ≤ (length of the Chinese character picture - 1);

[0014] Step 4: For the skeleton in Step 3, extract all end points and all intersection points of the skeleton based on the aggregation degree;

[0015] Step 5: For the skeleton in Step 3, extract all folding points of the skeleton by using a small-scale filtering method;

[0016] Step 6: For the skeleton in Step 3, extract all bending points of the skeleton by using a large-scale filtering method;

[0017] Step 7: For the skeleton in Step 3, further extract all width-changing points of the average stroke width change;

[0018] Step 8: Record all the above-mentioned end points, intersection points, folding points, bending points, and width-changing points as all key skeleton points of the Chinese character;

[0019] Step 9: Output all key skeleton points of the Chinese character, and the program runs to an end.

[0020] Further, for the "extracting the skeleton of the Chinese character by using a skeleton extraction algorithm" in Step 3, the skeleton of the Chinese character refers to the basic shape of the Chinese character, generally referring to the central axis of the Chinese character image; the process of extracting the Chinese character skeleton is to remove some pixels from the original Chinese character through layer-by-layer peeling while still maintaining the original shape until the skeleton of the image is obtained; the skeleton extraction algorithm can be as follows:

[0021] Step 3.1: For the binary image of Chinese characters, traverse all the skeleton pixel points (i, j) in sequence, where 0 ≤ i ≤ (width of the Chinese character image - 1) and 0 ≤ j ≤ (length of the Chinese character image - 1). For the skeleton pixel point (i, j), i.e., P1, execute Step 3.2;

[0022] Step 3.2: For P1, i.e., the skeleton pixel point (i, j), construct a 3*3 matrix as shown in the following table. The matrix includes the eight neighborhoods of pixel P1. When the value is 1, it is a foreground pixel point; when the value is 0, it is a background pixel point;

[0023] P9 P2 P3 P8 P1 P4 P7 P6 P5

[0024] Step 3.3: Perform raster scanning and mark all pixel points that meet the following 5 conditions. Pixel P1 that meets the following conditions is marked for deletion. The conditions are as follows: [[ID=--]]

[0025] (1) This is a foreground pixel point (value is 1);

[0026] (2) When viewing P2, P3,..., P9, P2 clockwise, the number of changes from 0 to 1 is only 1;

[0027] (3) The number of foreground pixels in P2, P3,..., P9 is more than 2 and less than 6;

[0028] (4) At least one of P2, P4, P6 has a value of 0 (i.e., a background pixel point);

[0029] (5) At least one of P4, P6, P8 has a value of 0 (i.e., a background pixel point);

[0030] Mark all pixels that meet the conditions as 0 (i.e., background pixel points).

[0031] Step 3.4: Perform raster scanning and mark all pixels that meet the following 5 conditions. Pixel P1 that meets the following conditions is marked for deletion. The conditions are as follows:

[0032] (1) This is a foreground pixel point (value is 1);

[0033] (2) When viewing P2, P3,..., P9, P2 clockwise, the number of changes from 0 to 1 is only 1;

[0034] (3) The number of foreground pixels in P2, P3,..., P9 is more than 2 and less than 6;

[0035] (4) At least one of P2, P4, P8 is 0 (background pixel point);

[0036] (5) At least one of P2, P6, P is 0 (background pixel point);

[0037] Step 3.5: If all pixel points have been traversed, execute Step 3.6; otherwise, execute Step 3.1.

[0038] Step 3.6: Delete all pixel points marked as "deleted" in the binary Chinese character image. The remaining output result is the skeleton of the binary image.

[0039] Furthermore, for the "extracting the endpoints and intersection points of the skeleton based on the aggregation degree" in Step 4, it is to calculate the aggregation degree of the skeleton pixel point area for a given skeleton pixel point and further compare the aggregation degree with the threshold values to obtain these two types of key skeleton points, namely endpoints and intersection points; the skeleton pixel point area refers to a square area centered on this pixel point and enclosed by a given side length. The side length of the area can take a value of 2*radius, where the value of radius is (max(width of the Chinese character image, length of the Chinese character image) * 0.1) / 2; the threshold values include a maximum threshold and a minimum threshold. The maximum threshold can take a value of 9, and the minimum threshold can take a value of 6. The specific methods for obtaining the endpoints and intersection points of the skeleton are as follows:

[0040] Step 4.1: Traverse all the skeleton pixel points (i, j) in sequence, where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (length of the Chinese character image - 1), and execute Step 4.2 for the current skeleton pixel point (i, j).

[0041] Step 4.2: Calculate the aggregation degree degree of the current skeleton pixel point (i, j) using formulas (1) and (2) i,j , where i is the width coordinate of the current skeleton pixel point, j is the length coordinate of the current skeleton pixel point, k is all possible values within the range (i - radius, i + radius), and l is all possible values within the range (j - radius, j + radius);

[0042]

[0043] where p k,l is the value at the pixel point (k, l). If the pixel point (k, l) is the foreground, then p k,l is 1; otherwise, it is 0, that is, p k,l takes values as in formula (2):

[0044]

[0045] Step 4.3: Compare the aggregation degree degree i,j of the pixel point (i, j) with the relationship between the maximum threshold and the minimum threshold:

[0046] If the aggregation degree degree of the pixel point (i, j) i,j > the maximum threshold, then this pixel point (i, j) is a crossing point, and record this pixel point (i, j) as a crossing point;

[0047] Otherwise, if the aggregation degree degree of the pixel point (i, j) i,j < the minimum threshold, then this pixel point (i, j) is an endpoint, and record this pixel point (i, j) as an endpoint;

[0048] Otherwise, this pixel point (i, j) is neither an endpoint nor a crossing point, and do not record it;

[0049] Step 4.4: If all the skeleton pixel points have been traversed, then execute Step 4.5; otherwise execute Step 4.1;

[0050] Step 4.5: All the endpoints and all the crossing points of the skeleton have been obtained, and all the endpoints and all the crossing points of the skeleton are key skeleton points.

[0051] [[ID=】]

[0052] Step 5.1: Traverse all the skeleton pixel points (i, j) in sequence, where 0 <= i <= (width of the Chinese character picture - 1), 0 <= j <= (length of the Chinese character picture - 1), and execute Step 5.2 for the current skeleton pixel point (i, j);

[0053] Step 5.2: Calculate the "small area" of the current skeleton pixel point (i, j), as Figure 2 shown, expand the corresponding "small area" centered on the current skeleton pixel point (i, j), and the width and length of the "small area" are 0.1 times the width and length of the Chinese character picture respectively;

[0054] Step 5.3: Calculate all the "connected components" of the key skeleton points in the "small region" of Step 5.2. Each "connected component" refers to an array of skeleton pixels composed of several continuous skeleton pixels in the Chinese character skeleton. Further, put each "connected component" into an array point[N], where N is the number of skeleton pixels in the "connected component". Further calculate the number of "connected components" point[N] close to the boundary of the "small region". If the number close to the boundary of the "small region" is equal to 2, record the two boundary skeleton pixels as the start and end points of this "connected component". Use these two start and end points as the two endpoints of the line and use formulas (4)(5)(6) to obtain the equation of the line w. Further use formula (7) to calculate the distance from all skeleton pixels in this "connected component" to the line w. Put the result into an array dist[N], where N is the number of skeleton pixels in the "connected component".

[0055] The equation of line w is Ax + By + C = 0, where:

[0056] A=point[n-1].y-point[0].y (4)

[0057] B=point[0].x-point[n-1].x (5)

[0058] C=point[n-1].x×point[0].y-point[0].x×point[n-1].y (6)

[0059] The distance from pixel point[i] to line w is , where 0 <= i < N:

[0060]

[0061] Step 5.4: Obtain the array index z of the maximum value in dist[N], i.e., dist[z] is the maximum value, where N is the number of skeleton pixels in this "connected component"; further compare the size relationship between dist[z] and the "distance threshold". If dist[z] > distance threshold, then the skeleton pixel point[z] corresponding to dist[z] is a vertex. Record the skeleton pixel point[z] as a vertex. The distance threshold can be max("small region" width, "small region" length) * 0.1. In this step, all vertices in the current "small region" have been extracted.

[0062] Step 5.5: Move the "small region" from step 5.2 by a given step size, which is one-quarter of the width and height of the "small region". If all skeleton pixels have been traversed, proceed to step 5.6; otherwise, proceed to step 5.2.

[0063] Step 5.6: All the folding points of the skeleton are obtained, and all the folding points of the skeleton are key skeleton points.

[0064] Furthermore, in Step 6, the "extracting all the bending points of the skeleton by using the large-scale filtering method" is to obtain all the skeleton pixels on the "large area" of the given skeleton pixel, further take the skeleton pixels close to the boundary of the "large area" as the endpoints of the straight line, and obtain the skeleton pixel with the maximum distance from this straight line in the "large area" as the key skeleton point of the bending point type. The width and length of the "large area" are 0.2 times the width and length of the Chinese character picture respectively. The specific method for obtaining the bending points of the skeleton is as follows:

[0065] Step 6.1: Traverse all the skeleton pixels (i, j) in sequence, where 0 ≤ i ≤ (width of the Chinese character picture - 1), 0 ≤ j ≤ (length of the Chinese character picture - 1), and execute Step 6.2 for the current skeleton pixel (i, j).

[0066] Step 6.2: Calculate the "large area" of the current skeleton pixel (i, j), as Figure 3 shown, expand the corresponding "large area" with the current skeleton pixel (i, j) as the center. The width and length of the "large area" are 0.2 times the width and length of the Chinese character picture respectively.

[0067] Step 6.3: Calculate all the "connected components" of the key skeleton points in the "large area" in Step 6.2, and put each "connected component" into an array point[N], where N is the number of skeleton pixels in the "connected component"; calculate the number of each "connected component" point[N] close to the boundary of the "large area". If the number close to the boundary of the "large area" is equal to 2, record these two boundary skeleton pixels as the starting point and the ending point of this connected component. Take these two starting points and ending points as the two endpoints of the straight line, and obtain the equation of the straight line w by using formulas (4), (5), and (6); further calculate the distance from all the skeleton pixels in this connected component to the straight line w by using formula (7), and put the result into the array dist[N], where N is the number of skeleton pixels in the "connected component".

[0068] Step 6.4: Obtain the array index t of the maximum value in dist[N], i.e., dist[t] is the maximum value, where N is the number of skeleton pixels in the "connected component"; further compare the size of dist[t] with the "distance threshold". If dist[t] > distance threshold, then the skeleton pixel point[t] corresponding to dist[t] is a bend point. Record that the skeleton pixel point[t] is a bend point. The distance threshold can be max("large region" width, "large region" length) * 0.1. This step has extracted all bend points in the current "large region".

[0069] Step 6.5: Move the "large region" from step 6.2 by a given step size, which is one-quarter of the width and height of the "large region". If all skeleton pixels have been traversed, proceed to step 6.6; otherwise, proceed to step 6.2.

[0070] Step 6.6: All the curves of the skeleton have been obtained. All the curves of the skeleton are key skeleton points.

[0071] Furthermore, step 7, "extracting all widening points of the average stroke width change," is based on formula (8) to extract key skeleton points, i.e., widening points, that have a larger change in stroke width compared to the surrounding area, where SW is the set of stroke widths in the given area. nxt Given a region, avg() represents the set of stroke widths of adjacent regions, where avg() is the average stroke width. The specific method for obtaining the widening point of the skeleton is as follows:

[0072] avg(SW)-avg(SW nxt )>t (8)

[0073] Step 7.1 Calculate the corresponding Chinese character stroke width image for the binary image of the Chinese character in Step 2. The Chinese character stroke width image is an image of the same size as the original image, but the value of each pixel is the size of the stroke width at this point, and the value of the pixels in the background part is -1.

[0074] Step 7.2: Based on the Chinese character stroke width map in Step 7.1, obtain the stroke width at all skeleton pixels;

[0075] Step 7.3: Iterate through all the skeleton pixels (i, j) of the Chinese character skeleton in Step 3, where 0=<i=<(width of Chinese character image-1), 0=<j=<(length of Chinese character image-1), and execute Step 7.4 for the current skeleton pixel (i, j);

[0076] Step 7.4: Calculate the region of the current skeleton pixel (i, j). The width and length of the region are 0.1 times the width and length of the Chinese character image, respectively.

[0077] Step 7.5: In the area of Step 7.4, calculate the stroke width corresponding to the original image at each skeleton pixel point in this area. Calculate the average stroke width avg(SW) of this area based on the stroke widths at each skeleton pixel point in this area, and further compare the difference between it and the average stroke width avg(SW nxt ) of the adjacent area; if it is greater than the width threshold, the critical skeleton pixel point in the middle of the two areas is considered a width-varying point, where the width threshold can be taken as 0.2 times the stroke width here;

[0078] Step 7.6: If all skeleton pixel points have been traversed, execute Step 7.7; otherwise, execute Step 7.3;

[0079] Step 7.7: All width-varying points of the skeleton have been obtained, and all width-varying points of the skeleton are key skeleton points.

[0080] The specific content involved in the present invention and the meanings of the terms are as follows:

[0081] (1) Chinese character skeleton: The skeleton of a Chinese character refers to the basic shape of the Chinese character, generally referring to the central axis of the Chinese character image. The process of extracting the Chinese character skeleton is to peel off layer by layer, removing some pixels from the original Chinese character while still maintaining the original shape until the skeleton of the image is obtained.

[0082] ((2) Pixel point is pixel, and the two have the same meaning. Skeleton pixel point is skeleton point, and the two have the same meaning.

[0083] (3) Chinese character key skeleton points: The key skeleton points of a Chinese character refer to the skeleton points that contain all the changing parts of the Chinese character. The key skeleton points extracted in existing articles are: endpoints, intersection points, and inflection points. The Chinese character key skeleton points extracted in the present invention based on the Chinese character stroke type and stroke width include: endpoints, intersection points, bending points, folding points, and average stroke width change points, i.e., width-varying points, of the skeleton.

[0084] (4) Endpoint is the point where each stroke starts and ends.

[0085] (5) Intersection point is the place where several strokes intersect.

[0086] (6) Folding point refers to the place where the angle at the turning is relatively sharp, such as the folding points of strokes like "zhe" and "gou".

[0087] (7) Bending point refers to the place where the turning is not so sharp, such as the bending parts of strokes like "pie" and "na".

[0088] (8) Width-varying point means that if the average stroke width of the current area changes greatly compared with the average stroke width of the adjacent area, the critical skeleton point in the middle of the two areas is considered a width-varying point.

[0089] (9) Degree of aggregation: Define a region for each foreground pixel. This region is a square region centered on this pixel with a side length of twice the radius. Calculate the number of foreground pixels within this region, and this number is the degree of aggregation of the pixel.

[0090] (10) Small-scale filtering method: The initial size of the region is generally set to 0.2 times the width and height of the overall image. By traversing the regions of all foreground pixels in the image, the method of filtering all turning points of Chinese characters is used.

[0091] (11) Large-scale filtering method: The initial size of the region is generally set to 0.1 times the width and height of the overall image. By traversing the regions of all foreground pixels in the image, the method of filtering all bending points of Chinese characters is used.

[0092] (12) The stroke width map is an image with the same size as the original Chinese character image, but the value of each pixel is the size of the stroke width here, and the pixels in the background part are -1.

[0093] (13) A connected component refers to an array of skeleton pixels composed of several consecutive and unbroken skeleton pixels in the Chinese character skeleton map.

[0094] [[ID=1第十六条]]Advantages and positive effects of the present invention:

[0095] The present invention can effectively improve the quality effect of Chinese character vectorization and reduce the storage space size of vectorized Chinese characters.

[0096] The present invention uses the method of extracting key skeleton points of Chinese characters based on multiple scales to respectively obtain key skeleton points of Chinese characters such as the endpoints, intersection points, bending points, turning points, and average stroke width change points (i.e., width change points) of the skeleton, so as to ensure the high quality of Chinese character vectorization on the one hand and effectively reduce the storage space size of vectorized Chinese characters on the other hand. Brief description of the drawings

[0097] Figure 1 is a flowchart of the method for extracting key skeleton points of Chinese characters based on multiple scales in the present invention.

[0098] Figure 2 is a schematic diagram of the "small region" of a given skeleton pixel in the present invention. [[ID=3第34条]]

[0099] Figure 3 is a schematic diagram of the "large region" of a given skeleton pixel in the present invention.

[0100] Figure 4 is a binary image of the Chinese character "冬" in the present invention.

[0101] Figure 5 is the skeleton map of the Chinese character "冬" in the present invention.

[0102] Figure 6Schematic diagram of all endpoints and all intersection points extracted from the skeleton of the Chinese character "dong" in the present invention.

[0103] Figure 7 Schematic diagram of all inflection points extracted from the skeleton of the Chinese character "dong" in the present invention.

[0104] Figure 8 Schematic diagram of all bending points extracted from the skeleton of the Chinese character "dong" in the present invention.

[0105] Figure 9 Schematic diagram of all width-increasing points of the average stroke width change extracted from the skeleton of the Chinese character "dong" in the present invention.

[0106] Figure 10 Schematic diagram of all key skeleton points extracted from the skeleton of the Chinese character "dong" in the present invention.

[0107] Figure 11 Schematic diagram of an endpoint extraction example in the present invention.

[0108] Figure 12 Schematic diagram of an intersection point extraction example in the present invention.

[0109] Figure 13 Schematic diagram of a width-increasing point extraction example in the present invention. Detailed implementation manner

[0110] The present invention provides a method for extracting key skeleton points of Chinese characters based on multi-scale, and the specific method steps are as follows:

[0111] Step 1: Input a single Chinese character picture;

[0112] Step 2: Preprocess the input Chinese character picture to generate a binary image;

[0113] Step 3: For the binary image in Step 2, use a skeleton extraction algorithm to extract the skeleton of the Chinese character. The skeleton of the Chinese character is composed of all skeleton pixel points (i, j), where 0 ≤ i ≤ (width of the Chinese character picture - 1) and 0 ≤ j ≤ (length of the Chinese character picture - 1);

[0114] Step 4: For the skeleton in Step 3, extract all endpoints and all intersection points of the skeleton based on the aggregation degree;

[0115] Step 5: For the skeleton in Step 3, use a small-scale filtering method to extract all inflection points of the skeleton;

[0116] Step 6: For the skeleton in Step 3, use a large-scale filtering method to extract all bending points of the skeleton;

[0117] Step 7: For the skeleton in Step 3, further extract all width-increasing points of the average stroke width change;

[0118] Step 8: Record all the above endpoints, intersection points, folding points, bending points, and width-changing points as all the key skeleton points of the Chinese character.

[0119] Step 9: Output all the key skeleton points of the Chinese character, and the program runs to an end.

[0120] To further understand the technical content, features, and effects of the present invention, the following application examples are listed and described in detail with reference to the accompanying drawings as follows:

[0121] A method for extracting key skeleton points of Chinese characters based on multi-scale, as Figure 1 shown, the method includes the following specific steps:

[0122] Step 1: Input a single Chinese character picture.

[0123] Step 2: Preprocess the input Chinese character picture to generate a binary image.

[0124] Input the original picture of the Chinese character "dong". Use the cvtColor library function in OpenCV to convert the original picture to a grayscale image, further perform non-local denoising on the grayscale image, and further use the threshold library function in OpenCV to binarize the denoised picture to generate a binary image of the picture, as Figure 4 shown.

[0125] Step 3: For the binary image in Step 2, use a skeleton extraction algorithm to extract the skeleton of the Chinese character. The skeleton of the Chinese character is composed of all skeleton pixel points (i, j), where 0 ≤ i ≤ (width of the Chinese character picture - 1), 0 ≤ j ≤ (length of the Chinese character picture - 1).

[0126] As Figure 5 shown, generate a skeleton image of the Chinese character "dong" according to the binary image of the Chinese character "dong", where Figure 5 the white line segments in are the skeletons of the Chinese character.

[0127] Step 4: For the skeleton in Step 3, extract all endpoints and all intersection points of the skeleton based on the aggregation degree.

[0128] As Figure 6 shown, all endpoints and all intersection points extracted from the skeleton of the Chinese character "dong".

[0129] Step 5: For the skeleton in Step 3, use a small-scale filtering method to extract all folding points of the skeleton.

[0130] As Figure 7 shown, all key skeleton points of the folding point type extracted from the skeleton of the Chinese character "dong".

[0131] Step 6: For the skeleton in Step 3, use the large-scale filtering method to extract all the bending points of the skeleton;

[0132] As Figure 8 shown, all the key skeleton points of the bending point types extracted from the skeleton of the Chinese character "winter".

[0133] Step 7: For the skeleton in Step 3, further extract all the width-changing points of the average stroke width change;

[0134] As Figure 9 shown, all the width-changing points extracted from the skeleton of the Chinese character "winter".

[0135] Step 8: Record all the above endpoints, intersection points, folding points, bending points, and width-changing points as all the key skeleton points of this Chinese character;

[0136] As Figure 10 shown, all the key skeleton points extracted from the skeleton of the Chinese character "winter", and the key skeleton points include types such as endpoints, intersection points, folding points, bending points, and width-changing points.

[0137] Step 9: Output all the key skeleton points of this Chinese character, and the program runs to completion.

[0138] According to the extraction method provided by the present invention, for "extracting the skeleton of a Chinese character using a skeleton extraction algorithm" in Step 3, the skeleton of a Chinese character refers to the basic shape of the Chinese character, generally referring to the central axis of the Chinese character image; the process of extracting the skeleton of a Chinese character is to remove some pixels from the original Chinese character layer by layer while still maintaining the original shape until the skeleton of the image is obtained; the skeleton extraction algorithm can be as follows:

[0139] Step 3.1: For the binary image of the Chinese character, sequentially traverse all pixel points (i, j), where 0 ≤ i ≤ (width of the Chinese character image - 1), 0 ≤ j ≤ (length of the Chinese character image - 1), and execute Step 3.2 for the pixel point (i, j), that is, P1;

[0140] Step 3.2: Construct the following 3*3 matrix for P1, that is, the pixel point (i, j), as shown in Table 1 below. The matrix includes the eight neighborhoods of pixel P1, with a value of 1 being a foreground pixel and a value of 0 being a background pixel;

[0141] Table 1

[0142] P9 P2 P3 P8 P1 P4 P7 P6 P5

[0143] For example, Table 2 and Table 3 are the 3*3 matrices of different pixel points respectively:

[0144] Table 2

[0145] 0 0 1 0 1 1 0 0 0

[0146] Table 3

[0147] 0 0 1 0 1 1 1 0 0

[0148] Step 3.3: Perform a raster scan and mark all pixels that meet the following 5 conditions. Pixel P1 that meets the following conditions is marked for deletion:

[0149] (1) This is a foreground pixel (value 1);

[0150] (2) When looking at P2, P3, ..., P9, P2 clockwise, the number of changes from 0 to 1 is only 1;

[0151] (3) The number of foreground pixels in P2, P3, ..., P9 is more than 2 and less than 6;

[0152] (4) At least one of P2, P4, and P6 has a value of 0 (background pixel);

[0153] (5) At least one of P4, P6, and P8 has a value of 0 (background pixel);

[0154] Mark all pixels that meet the conditions as 0 (i.e., background pixels).

[0155] Step 3.4: Perform a raster scan and mark all pixels that meet the following 5 conditions. Pixel P1 that meets the following conditions is marked for deletion:

[0156] (1) This is a foreground pixel (1);

[0157] (2) When looking at P2, P3, ..., P9, P2 clockwise, the number of changes from 0 to 1 is only 1;

[0158] (3) The number of foreground pixels in P2, P3, ..., P9 is more than 2 and less than 6;

[0159] (4) At least one of P2, P4, and P8 is 0 (background pixel);

[0160] (5) At least one of P2, P6, and P8 is 0 (background pixel);

[0161] Step 3.5: If all pixels have been traversed, proceed to step 3.6; otherwise, proceed to step 3.1.

[0162] Step 3.6: Delete all pixels marked "delete" in the binary image of Chinese characters. The remaining output is the skeleton of the binary image.

[0163] For the above Table 2 and Table 3, if the pixel at the P1 position in Table 2 meets Step 3.3 or Step 3.4, then its mark is deleted; if the pixel at the P1 position in Table 3 neither meets Step 3.3 nor meets Step 3.4, then it is not marked for deletion.

[0164] According to the extraction method provided by the present invention, in Step 4, the "extracting the endpoints and intersection points of the skeleton based on the aggregation degree" is to calculate the aggregation degree of the skeleton pixel point area of a given skeleton pixel point and further compare the size of the aggregation degree with the threshold value to obtain two types of key skeleton points, namely endpoints and intersection points; the skeleton pixel point area refers to a square area centered on this pixel point and enclosed by a given side length, and the side length of the area can take a value of 2*radius, where the value of radius is (max(width of the Chinese character picture, length of the Chinese character picture)*0.1) / 2; the threshold value includes a maximum threshold value and a minimum threshold value, the maximum threshold value can take a value of 9, and the minimum threshold value can take a value of 6; the specific method for obtaining the endpoints and intersection points of the skeleton is as follows:

[0165] Step 4.1, sequentially traverse all the skeleton pixels (i, j), where 0 <= i <= (width of the Chinese character picture - 1), 0 <= j <= (length of the Chinese character picture - 1), and perform Step 4.2 for the current skeleton pixel (i, j);

[0166] Step 4.2, calculate the aggregation degree degree of the current skeleton pixel (i, j) using formulas (1) and (2) i,j , where i is the width coordinate of the current skeleton pixel, j is the length coordinate of the current skeleton pixel, k is all possible values within the range of (i - radius, i + radius), and l is all possible values within the range of (j - radius, j + radius);

[0167]

[0168] Among them, p k,l is the value at the pixel point (k, l). If the pixel point (k, l) is a foreground, then p k,l is 1, otherwise it is 0, that is, the value of p k,l is as shown in formula (2):

[0169]

[0170] Step 4.3, compare the aggregation degree degree i,j of the pixel point (i, j) with the size relationship between the maximum threshold value and the minimum threshold value:

[0171] If the aggregation degree degree i,jIf the maximum threshold is reached, then pixel (i,j) is an intersection point, and this pixel (i,j) is recorded as an intersection point.

[0172] Otherwise, if the degree of clustering of pixel (i,j) is... i,j If the threshold is less than the minimum threshold, then this pixel (i,j) is the endpoint, and the pixel (i,j) is recorded as the endpoint;

[0173] Otherwise, this pixel (i,j) is neither an endpoint nor an intersection point, and does not need to be recorded;

[0174] Step 4.4: If all skeleton pixels have been traversed, proceed to step 4.5; otherwise, proceed to step 4.1.

[0175] Step 4.5: All endpoints and intersections of the skeleton have been obtained. All endpoints and intersections of the skeleton are key skeleton points.

[0176] like Figure 11 As shown, the degree of clustering in the current region. i,j If the value is 4, which is less than the minimum threshold, then the skeleton pixel (i,j) is recorded as the endpoint.

[0177] like Figure 12 As shown, the degree of clustering in the current region. i,j If the value is 13, which is greater than the maximum threshold, then the skeleton pixel (i,j) is recorded as the intersection point.

[0178] According to the extraction method provided by this invention, step 5, "extracting all inflection points of the skeleton using a small-scale filtering method," involves obtaining all skeleton pixels in a "small region" of a given skeleton pixel, further using the skeleton pixels closest to the boundary of the "small region" as endpoints of a straight line, and obtaining the skeleton pixel in the "small region" that is furthest from this straight line as a key skeleton point of the inflection point type. The width and length of the "small region" are 0.1 times the width and length of the Chinese character image, respectively.

[0179] like Figure 2 As shown in the figure, the figure represents a "small region" of a given skeleton pixel.

[0180] The specific method for obtaining the inflection points of the skeleton is as follows:

[0181] Step 5.1: Iterate through all the skeleton pixels (i, j) in sequence, where 0=<i=<(width of Chinese character image - 1), 0=<j=<(length of Chinese character image - 1), and execute step 5.2 for the current skeleton pixel (i, j);

[0182] Step 5.2: Calculate the "small region" of the current skeleton pixel (i, j), such as... Figure 2As shown, a corresponding "small region" is expanded with the current skeleton pixel (i, j) as the center. The width and length of the "small region" are 0.1 times the width and length of the Chinese character image, respectively.

[0183] Step 5.3: Calculate all the "connected components" of the key skeleton points in the "small region" of Step 5.2. Each "connected component" refers to an array of skeleton pixels composed of several continuous skeleton pixels in the Chinese character skeleton. Further, put each "connected component" into an array point[N], where N is the number of skeleton pixels in the "connected component". Further calculate the number of "connected components" point[N] close to the boundary of the "small region". If the number close to the boundary of the "small region" is equal to 2, record the two boundary skeleton pixels as the start and end points of this "connected component". Use these two start and end points as the two endpoints of the line and use formulas (4)(5)(6) to obtain the equation of the line w. Further use formula (7) to calculate the distance from all skeleton pixels in this "connected component" to the line w. Put the result into an array dist[N], where N is the number of skeleton pixels in the "connected component".

[0184] The equation of line w is Ax + By + C = 0, where:

[0185] A=point[n-1].y-point[0].y (4)

[0186] B=point[0].x-point[n-1].x (5)

[0187] C=point[n-1].x×point[0].y—point[0].x×point[n-1].y (6)

[0188] The distance from pixel point[i] to line w is , where 0 <= i <N:

[0189]

[0190] Step 5.4: Obtain the array index z of the maximum value in dist[N], i.e., dist[z] is the maximum value, where N is the number of skeleton pixels in this "connected component"; further compare the size relationship between dist[z] and the "distance threshold". If dist[z] > distance threshold, then the skeleton pixel point[z] corresponding to dist[z] is a vertex. Record the skeleton pixel point[z] as a vertex. The distance threshold can be max("small region" width, "small region" length) * 0.1. In this step, all vertices in the current "small region" have been extracted.

[0191] Step 5.5: Move the "small area" in Step 5.2 according to the given step size, and set the step size to one-fourth of the width and height of the "small area"; if all the skeleton pixels are traversed, execute Step 5.6; otherwise, execute Step 5.2;

[0192] Step 5.6: All the inflection points of the skeleton are obtained, and all the inflection points of the skeleton are key skeleton points.

[0193] Such as Figure 2 The middle area is a small area centered on the current skeleton pixel (i, j). In the figure, the connected component point[N] (N = 7) stores the skeleton pixels from point[0] to point[6]. If the distance of the point point[3] that is farthest from the straight line w is greater than the distance threshold, then record the skeleton point (i, j) as an inflection point.

[0194] According to the extraction method provided by the present invention, for the "extracting all the bending points of the skeleton by using the large-scale filtering method" described in Step 6, all the skeleton pixels are obtained on the "large area" of the given skeleton pixel, and further, the skeleton pixels close to the boundary of the "large area" are used as the endpoints of the straight line, and the skeleton pixel with the maximum distance from this straight line in the "large area" is obtained as the key skeleton point of the bending point type, where the width and length of the "large area" are 0.2 times the width and length of the Chinese character picture respectively;

[0195] Such as Figure 3 As shown, the figure is the "large area" of the given skeleton pixel.

[0196] The specific method for obtaining the bending points of the skeleton is as follows:

[0197] Step 6.1: Traverse all the skeleton pixels (i, j) in sequence, where 0 <= i <= (width of the Chinese character picture - 1), 0 <= j <= (length of the Chinese character picture - 1), and execute Step 6.2 for the current skeleton pixel (i, j);

[0198] Step 6.2: Calculate the "large area" of the current skeleton pixel (i, j). Such as Figure 3 As shown, expand the corresponding "large area" centered on the current skeleton pixel (i, j). The width and length of the "large area" are 0.2 times the width and length of the Chinese character picture respectively;

[0199] Step 6.3: Calculate all the "connected components" of the key skeleton points in the "large region" of Step 6.2, and put each "connected component" into an array point[N], where N is the number of skeleton pixels in the "connected component"; calculate the number of "connected components" point[N] close to the boundary of the "large region". If the number of "connected components" point[N] close to the boundary of the "large region" is equal to 2, then record the two boundary skeleton pixels as the start and end points of this connected component. Take these two start and end points as the two endpoints of the line, and use formulas (4)(5)(6) to obtain the equation of the line w; further use formula (7) to calculate the distance from all skeleton pixels in this connected component to the line w, and put the result into an array dist[N], where N is the number of skeleton pixels in the "connected component";

[0200] Step 6.4: Obtain the array index t of the maximum value in dist[N], i.e., dist[t] is the maximum value, where N is the number of skeleton pixels in the "connected component"; further compare the size of dist[t] with the "distance threshold". If dist[t] > distance threshold, then the skeleton pixel point[t] corresponding to dist[t] is a bend point. Record that the skeleton pixel point[t] is a bend point. The distance threshold can be max("large region" width, "large region" length) * 0.1. This step has extracted all bend points in the current "large region".

[0201] Step 6.5: Move the "large region" from step 6.2 by a given step size, which is one-quarter of the width and height of the "large region". If all skeleton pixels have been traversed, proceed to step 6.6; otherwise, proceed to step 6.2.

[0202] Step 6.6: All the curves of the skeleton have been obtained. All the curves of the skeleton are key skeleton points.

[0203] like Figure 3 The middle region is a large region centered on the current skeleton pixel (i, j). The connected component point[N] (N=15) in the figure stores the skeleton pixels from point[0] to point

[14] . The point point[7], which is farthest from the line w, is greater than the distance threshold. Therefore, the skeleton point (i, j) is recorded as a bend.

[0204] According to the extraction method provided by this invention, the step 7, "extracting all widening points of the average stroke width change", is based on formula (8) to extract key skeleton points, i.e., widening points, that have a larger change in the average stroke width compared to the surrounding area, where SW is the set of stroke widths in the given area. nxtGiven a region, avg() represents the set of stroke widths of adjacent regions, where avg() is the average stroke width. The specific method for obtaining the widening point of the skeleton is as follows:

[0205] avg(SW)-avg(SW nxt )>t (8)

[0206] Step 7.1 Calculate the corresponding Chinese character stroke width image for the binary image of the Chinese character in Step 2. The Chinese character stroke width image is an image of the same size as the original image, but the value of each pixel is the size of the stroke width at this point, and the value of the pixels in the background part is -1.

[0207] Step 7.2: Based on the Chinese character stroke width map in Step 7.1, obtain the stroke width at all skeleton pixels;

[0208] Step 7.3: Iterate through all the skeleton pixels (i, j) of the Chinese character skeleton in Step 3, where 0=<i=<(width of Chinese character image-1), 0=<j=<(length of Chinese character image-1), and execute Step 7.4 for the current skeleton pixel (i, j);

[0209] Step 7.4: Calculate the region of the current skeleton pixel (i, j). The width and length of the region are 0.1 times the width and length of the Chinese character image, respectively.

[0210] Step 7.5: In the region from step 7.4, calculate the stroke width of the original image at each skeleton pixel within that region. Based on the stroke width at each skeleton pixel within that region, calculate the average stroke width avg(SW) of that region. Further compare this average stroke width avg(SW) with the average stroke width of adjacent regions. nxt The difference between the two regions; if it is greater than the width threshold, the critical skeleton pixel in the middle of the two regions is considered to be the widening point, where the width threshold can be taken as 0.2 times the stroke width at this point;

[0211] Step 7.6: If all skeleton pixels have been traversed, proceed to step 7.7; otherwise, proceed to step 7.3.

[0212] Step 7.7: All widening points of the skeleton have been obtained. All widening points of the skeleton are key skeleton points.

[0213] like Figure 13 As shown, the average stroke width change of "Region 1" compared to the nearby "Region 2" is greater than that of the width region, so the intermediate critical skeleton pixels are extracted as the widening points.

[0214] In view of the description and exemplary embodiments of the invention disclosed herein, other embodiments of the invention will be apparent to those skilled in the art. These descriptions and embodiments are considered as examples only, and any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A method for extracting key skeleton points of Chinese characters based on multi-scale extraction, characterized in that, The method includes the following specific steps: Step 1: Input a single Chinese character image; Step 2: Preprocess the input Chinese character image to generate a binary image; Step 3: For the binary image in Step 2, use a skeleton extraction algorithm to extract the skeleton of the Chinese character. The skeleton of the Chinese character consists of all skeleton pixel points (i, j), where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (length of the Chinese character image - 1); Step 4: For the skeleton in Step 3, extract all endpoints and all intersection points of the skeleton based on the aggregation degree; Step 5: For the skeleton in Step 3, use a small-scale filtering method to extract all inflection points of the skeleton. That is, by obtaining all skeleton pixel points on the "small area" of a given skeleton pixel point, further taking the skeleton pixel points close to the boundary of the "small area" as the endpoints of the straight line, and obtaining the skeleton pixel point with the maximum distance from this straight line in the "small area" as the key skeleton point of the inflection point type. The width and length of the "small area" are 0.1 times the width and length of the Chinese character image respectively; Step 6: For the skeleton in Step 3, use a large-scale filtering method to extract all bending points of the skeleton. That is, by obtaining all skeleton pixel points on the "large area" of a given skeleton pixel point, further taking the skeleton pixel points close to the boundary of the "large area" as the endpoints of the straight line, and obtaining the skeleton pixel point with the maximum distance from this straight line in the "large area" as the key skeleton point of the bending point type. The width and length of the "large area" are 0.2 times the width and length of the Chinese character image respectively; Step 7: For the skeleton in Step 3, further extract all width-changing points of the average stroke width change; Step 8: Record all the above endpoints, intersection points, inflection points, bending points, and width-changing points as all the key skeleton points of this Chinese character; Step 9: Output all the key skeleton points of this Chinese character, and the program runs to completion.

2. The method according to claim 1, characterized in that, In Step 4, the "extracting endpoints and intersection points of the skeleton based on the aggregation degree" is to calculate the aggregation degree of the skeleton pixel point area for a given skeleton pixel point, and further compare the aggregation degree with the threshold values to obtain these two types of key skeleton points, namely endpoints and intersection points; the skeleton pixel point area refers to a square area centered on this pixel point and enclosed by a given side length. The side length of the area can take a value of 2 * radius, where the value of radius is (max(width of the Chinese character image, length of the Chinese character image) * 0.1) / 2; the threshold values include a maximum threshold and a minimum threshold. The maximum threshold can take a value of 9, and the minimum threshold can take a value of 6. The specific methods for obtaining the endpoints and intersection points of the skeleton are as follows: Step 4.1: Traverse all the skeleton pixel points (i, j) in sequence, where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (length of the Chinese character image - 1). For the current skeleton pixel point (i, j), execute Step 4.2; Step 4.2: Calculate the degree of clustering of the current skeleton pixel (i,j) using formulas (1) and (2). i,j , where i is the width coordinate of the current skeleton pixel, j is the length coordinate of the current skeleton pixel, k is all possible values ​​in the range of (i-radius, i+radius), and l is all possible values ​​in the range of (j-radius, j+radius). (1) Where, p k,l It is the value at pixel (k,l). If pixel (k,l) is the foreground, then p k,l If p is 1, then p is 0 otherwise. k,l The values ​​are as shown in formula (2): (2) Step 4.3: Compare the degree of clustering of pixel points (i,j). i,j The relationship between the maximum and minimum thresholds: If the degree of clustering of pixel (i,j) is... i,j If the maximum threshold is reached, then pixel (i,j) is an intersection point, and this pixel (i,j) is recorded as an intersection point. Otherwise, if the degree of clustering of pixel (i,j) is... i,j If the threshold is less than the minimum threshold, then this pixel (i,j) is an endpoint, and the pixel (i,j) is recorded as an endpoint; Otherwise, this pixel point (i, j) is neither an endpoint nor an intersection point and does not need to be recorded; Step 4.4: If all the skeleton pixel points have been traversed, then execute Step 4.5; otherwise, execute Step 4.1; Step 4.5: All endpoints and all intersection points of the skeleton are obtained, where all endpoints and all intersection points of the skeleton are key skeleton points.

3. The method according to claim 1, characterized in that, The specific acquisition method of "extracting all inflection points of the skeleton by using the small-scale filtering method" described in Step 5 is as follows: Step 5.1: Traverse all skeleton pixels (i, j) in sequence, where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (length of the Chinese character image - 1), and execute Step 5.2 for the current skeleton pixel (i, j). Step 5.2: Calculate the "small area" of the current skeleton pixel (i, j), and expand the corresponding "small area" centered on the current skeleton pixel (i, j). The width and length of the "small area" are 0.1 times the width and length of the Chinese character image respectively. Step 5.3: Calculate all "connected components" of the key skeleton points in the "small area" in Step 5.

2. Each "connected component" refers to an array of skeleton pixels composed of several consecutive and unbroken skeleton pixels in the Chinese character skeleton; and further put each "connected component" into an array point[N], where N is the number of skeleton pixels in this "connected component"; further calculate the number of each "connected component" point[N] close to the boundary of the "small area". If the number of points close to the boundary of the "small area" is equal to 2, record these two boundary skeleton pixels as the starting point and the ending point of this "connected component", and use these two starting points and ending points as the two endpoints of a straight line, and obtain the equation of the straight line w by using formulas (4), (5), and (6); further calculate the distance from all skeleton pixels in this "connected component" to the straight line w by using formula (7), and put the results into an array dist[N], where N is the number of skeleton pixels in this "connected component". The equation of line w is ,in: (4) (5) (6) The distance from pixel point point[i] to the straight line w is, where 0 <= i < N: (7) Step 5.4: Obtain the array index z of the maximum value in dist[N], that is, dist[z] is the maximum value, where N is the number of skeleton pixels in this "connected component"; further compare the size relationship between dist[z] and the "distance threshold". If dist[z] > the distance threshold, the skeleton pixel point point[z] corresponding to dist[z] is an inflection point, and record this skeleton pixel point point[z] as an inflection point. The distance threshold can be taken as max(width of the "small area", length of the "small area") * 0.

1. All inflection points in the current "small area" have been extracted in this step. Step 5.5: Move the "small area" in Step 5.2 according to a given step size. The step size is set to one-fourth of the width and height of the "small area"; if all skeleton pixels have been traversed, execute Step 5.6; otherwise, execute Step 5.

2. Step 5.6: All inflection points of the skeleton are obtained, where all inflection points of the skeleton are key skeleton points.

4. The method according to claim 1 or 3, characterized in that, The specific acquisition method of "extracting all bend points of the skeleton by using the large-scale filtering method" described in Step 6 is as follows: Step 6.1: Traverse all the skeleton pixel points (i, j) in sequence, where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (height of the Chinese character image - 1). Perform Step 6.2 for the current skeleton pixel point (i, j). Step 6.2: Calculate the "large area" of the current skeleton pixel point (i, j). Expand the corresponding "large area" centered on the current skeleton pixel point (i, j). The width and length of the "large area" are 0.2 times the width and length of the Chinese character image respectively. Step 6.3: Calculate all the "connected components" of the key skeleton points in the "large area" in Step 6.2, and put each "connected component" into an array point[N], where N is the number of skeleton pixel points in this "connected component". Calculate the number of the "connected component" point[N] that is close to the boundary of the "large area". If the number of points close to the boundary of the "large area" is equal to 2, record these two boundary skeleton pixel points as the start and end points of this connected component. Use these two start and end points as the two endpoints of a straight line, and obtain the equation of the straight line w using formulas (4), (5), and (6). Further, calculate the distance from all the skeleton pixel points in this connected component to the straight line w using formula (7), and put the results into an array dist[N], where N is the number of skeleton pixel points in this "connected component". Step 6.4: Obtain the array index t of the maximum value in dist[N], that is, dist[t] is the maximum value, where N is the number of skeleton pixel points in this "connected component". Further, compare the size of dist[t] with the "distance threshold". If dist[t] > the distance threshold, the skeleton pixel point point[t] corresponding to dist[t] is a bend point, and record this skeleton pixel point point[t] as a bend point. The distance threshold can be set to 0.1 * max("large area" width, "large area" length). All the bend points in the current "large area" have been extracted in this step. Step 6.5: Move the "large area" in Step 6.2 according to a given step size. The step size is set to one-fourth of the width and height of the "large area". If all the skeleton pixel points have been traversed, perform Step 6.6; otherwise, perform Step 6.

2. Step 6.6: All the bend points of the skeleton have been obtained. All the bend points of the skeleton are key skeleton points.

5. The method according to claim 1, characterized in that, Step 7, "extracting all widening points of the average stroke width change," is based on formula (8) to extract key skeleton points, i.e., widening points, where the average stroke width change in the surrounding area is greater than the width threshold. Here, SW is the set of stroke widths in the given area. nxt Given a region, avg() represents the set of stroke widths of adjacent regions, where avg() is the average stroke width. The specific method for obtaining the widening point of the skeleton is as follows: (8) Step 7.1: Calculate the corresponding Chinese character stroke width map for the binary Chinese character image in Step 2. The Chinese character stroke width map is an image with the same size as the original image, but the value of each pixel is the size of the stroke width here, and the value of the pixel in the background part is -1. Step 7.2: Obtain the stroke width at all the skeleton pixel points according to the Chinese character stroke width map in Step 7.

1. Step 7.3: Traverse all the skeleton pixel points (i, j) of the Chinese character skeleton in Step 3 in sequence, where 0 <= i <= (width of the Chinese character image - 1) and 0 <= j <= (height of the Chinese character image - 1). Perform Step 7.4 for the current skeleton pixel point (i, j). Step 7.4: Calculate the region of the current skeleton pixel (i,j). The width and length of the region are 0.1 times the width and length of the Chinese character image, respectively. Step 7.5: In the region from step 7.4, calculate the stroke width of the original image at each skeleton pixel within that region. Based on the stroke width at each skeleton pixel within that region, calculate the average stroke width avg(SW) of that region. Further compare this average stroke width avg(SW) with the average stroke width of adjacent regions. nxt The difference between the two regions; if it is greater than the width threshold, the critical skeleton pixel in the middle of the two regions is considered to be the widening point, where the width threshold can be taken as 0.2 times the stroke width at this point; Step 7.6: If all skeleton pixels have been traversed, proceed to step 7.7; otherwise, proceed to step 7.

3. Step 7.7: All widening points of the skeleton have been obtained. All widening points of the skeleton are key skeleton points.