A Chinese character geometric structure feature transfer method based on composite contour skeleton

By extracting and matching the geometric structure feature points of Chinese characters through a method based on the composite outline skeleton, the existing problems of large matching errors and high labor costs when modifying the local geometric structure of Chinese characters are solved, and a more accurate and efficient variant font library is achieved. generate.

CN112733495BActive Publication Date: 2024-10-22HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011637434.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-10-22
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

When modifying the local geometric structure of Chinese characters, the existing technology has problems such as large matching errors, consuming a lot of manpower and time. Especially when generating a new variant font, it is difficult to effectively utilize the existing variant font.

Method used

Using the Chinese character geometric structure feature migration method based on the composite outline skeleton, by determining the outline point set of the target character's standard glyphs and variant glyphs, calculating the feature values ​​of the composite outline, forming a mapping relationship, extracting single-pixel skeleton feature points, and performing geometric structure Change, convert it to TrueType Font format, and write it to the font file.

Benefits of technology

It makes it easier to obtain variant font libraries based on other glyphs, saving manpower and time costs. Compared with methods based directly on skeletons, matching is more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112733495B_ABST
    Figure CN112733495B_ABST
Patent Text Reader

Abstract

A Chinese character geometric structure feature migration method based on a composite contour skeleton obtains the geometric structure relationship of the corresponding composite contour skeleton feature point sets between glyphs, constructs a mapping relationship between composite contour sets of the same target character in different font files, constructs a mapping relationship between a single composite contour set and its skeleton feature points, and forms composite contours of variant glyphs of a variant glyph font to be generated, which can be written into the corresponding encoding position of the font file after format conversion, solving the problem that users can only use existing variant fonts when using a text information hiding system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of a Chinese character geometric structure feature migration method based on a composite contour skeleton. Background Art

[0002] At present, there are relatively complete methods for extracting the skeleton of Chinese characters, such as the skeleton line extraction algorithm based on the symmetry axis to obtain the center point, the skeleton line calculation method based on the definition of the inscribed circle, etc. At the same time, there are also many technologies such as skeleton-based and conditional generative adversarial networks, which have been applied to the generation and modification of Chinese characters.

[0003] At present, the technology used to generate Chinese characters is mostly used for character creation, that is, based on the basic character set and feature style data, a new character set is generated by extracting the skeleton or applying conditional generative adversarial networks. The error range caused by the modification generally exceeds the acceptable level of modifying the local geometric structure of Chinese characters. The modification methods involving the local geometric structure of the font mostly require the use of font editing software (software FontForge, FontCreater, etc.) to modify them one by one, which requires a lot of manpower and time. Directly using the font skeleton to modify the glyph will have many problems such as large matching errors. Summary of the invention

[0004] In view of the above shortcomings, the technical problem to be solved by the present invention is to provide a method for migrating the geometric structure features of Chinese characters based on a composite contour skeleton, so that users can use the existing variant font library to more conveniently obtain variant font libraries based on other glyphs, saving the manpower cost required for font modification.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A Chinese character geometric structure feature migration method based on a composite contour skeleton comprises the following steps:

[0007] (1) determining a target character, obtaining a set of contour points of a standard glyph of the target character in an existing variant glyph font, a variant glyph in an existing variant glyph font, and a standard glyph in a variant glyph font to be generated, and forming a composite contour set;

[0008] (2) According to the composite contour set, the characteristic value of the composite contour is calculated, and matching is performed according to the characteristic value to form a mapping relationship of the composite contour subset;

[0009] (3) drawing pixel maps of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated, extracting a single pixel skeleton according to the pixel map of the composite contour, and converting the feature coordinates of the single pixel skeleton into a skeleton feature point set of each composite contour;

[0010] (4) According to the mapping relationship between the composite contours of the standard glyph and the variant glyph in the existing variant glyph font, the composite contour skeleton feature point sets of the composite contour subsets with the mapping relationship are matched, and the mapping relationship between the skeleton feature points of both sides of the mapping relationship is constructed. The composite contours where the skeleton feature points with obvious geometric structure changes are located are marked and their geometric structure features are recorded;

[0011] (5) according to the mapping relationship between the composite contour sets of the target character in the existing variant glyph font and the standard glyph of the variant glyph font to be generated, the composite contour skeleton feature point sets in the composite contour subsets containing the marked composite contours and having the mapping relationship are matched, and the mapping relationship between the skeleton feature points of both sides of the mapping relationship is constructed;

[0012] (6) performing geometric structural changes on the skeleton feature points of the standard glyph of the target character in the variant glyph font to be generated according to step (4) and step (5), so as to form a composite outline of the variant glyph of the target character in the variant glyph font to be generated;

[0013] (7) The contour point set of the variant glyph of the target character in the variant glyph font to be generated can be described and converted into a Chinese character font in TrueType Font format, which can be written into the corresponding encoding position of the font file after the format conversion.

[0014] Furthermore, step (1) further includes the following steps:

[0015] (1.1) respectively obtaining a set of contour points that specifically express the glyph of the target character from a standard glyph font file of an existing variant glyph font, a variant font file of an existing variant glyph font, and a standard glyph font file of a variant glyph font to be generated;

[0016] (1.2) A composite contour set is formed based on contour division and contour nesting relationship.

[0017] Further, step (2) includes the following steps,

[0018] (2.1) calculating the feature value of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated;

[0019] (2.2) matching the feature values ​​of the composite contour set of the target character in the existing variant font and the variant character in the target character in the existing variant font to form a mapping relationship of the composite contour subset;

[0020] (2.3) The composite contour sets of the standard glyphs of the target characters in the existing variant glyph fonts and the standard glyphs of the target characters in the variant glyph fonts to be generated are matched according to their feature values ​​to form a mapping relationship of composite contour subsets.

[0021] Furthermore, the characteristic values ​​of the composite contour include center of gravity, area ratio, horizontal length, and vertical length.

[0022] Furthermore, in step (4), each composite contour skeleton feature point set in the composite contour subset having a mapping relationship is matched according to the Euclidean distance between vectors.

[0023] Furthermore, in step (5), in the subset of composite contours containing the marked composite contours and having a mapping relationship, each composite contour skeleton feature point set is matched according to the Euclidean distance between vectors.

[0024] The beneficial effects of the present invention are: (1) solving the problem that users can only use existing variant fonts when using the text information hiding system;

[0025] (2) It saves the time and manpower costs of the text information hiding system service provider in building a new variant font library.

[0026] (3) Compared with directly migrating the geometric structure features of the glyph based on the skeleton, migrating the geometric structure features of the glyph based on a single composite contour is more accurate in matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flow chart of the invention.

[0028] Figure 2 It is a standard font picture of the target word of the existing variant font in the embodiment.

[0029] Figure 3 It is a variant font picture of the target character of the existing variant font font in the embodiment.

[0030] Figure 4 It is a standard glyph vectorized skeleton image of a target character of an existing variant glyph font in the embodiment.

[0031] Figure 5 It is a variant glyph vectorized skeleton image of a target character in an existing variant glyph font of an embodiment.

[0032] Figure 6 It is a comparison diagram of the standard glyph vectorized skeleton of the target character of the existing variant glyph font in the embodiment and the variant glyph vectorized skeleton of the target character of the existing variant glyph font.

[0033] Figure 7It is a standard glyph picture of a target character of a variant glyph font to be generated in the embodiment.

[0034] Figure 8 It is a standard glyph vectorized skeleton picture of a target character of a variant glyph font to be generated in the embodiment.

[0035] Fig. 9 It is a variant glyph picture of a target character of a variant glyph font to be generated in an embodiment.

[0036] Fig.10 It is a comparison diagram of the standard glyph outline of the target character of the variant glyph font to be generated in the embodiment and the variant glyph outline of the target character of the variant glyph font to be generated. DETAILED DESCRIPTION

[0037] The present invention will be further described below in conjunction with the accompanying drawings.

[0038] The skeleton-based Chinese character geometric structure feature migration method provided by the present invention is applicable to a Chinese character library in TrueType Font format based on UTF-8 encoding. The main steps of the method include:

[0039] A standard glyph, an instance of a character containing unmodified attributes such as outline data;

[0040] A variant glyph is an instance of a character that contains modified attributes such as outline data;

[0041] Alternative fonts, fonts that have been modified in other ways;

[0042] The variant font to be generated, the font that needs to be modified by this method;

[0043] Standard glyph font file, including font files of standard glyphs;

[0044] Variant glyph font file, a font file containing variant glyphs;

[0045] Target word, a character corresponding to the glyph that needs to be modified.

[0046] (1) determining a target character, obtaining a set of contour points of a standard glyph of the target character in an existing variant glyph font, a variant glyph in an existing variant glyph font, and a standard glyph in a variant glyph font to be generated, and forming a composite contour set;

[0047] (2) According to the composite contour set, the characteristic value of the composite contour is calculated, and matching is performed according to the characteristic value to form a mapping relationship of the composite contour subset;

[0048] (3) drawing pixel maps of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated, extracting a single pixel skeleton according to the pixel map of the composite contour, and converting the feature coordinates of the single pixel skeleton into a skeleton feature point set of each composite contour;

[0049] (4) According to the mapping relationship between the composite contours of the standard glyph and the variant glyph in the existing variant glyph font, the composite contour skeleton feature point sets in the composite contour subset with the mapping relationship are matched according to the Euclidean distance between the vectors, and the mapping relationship between the skeleton feature points of both sides of the mapping relationship is constructed, and the composite contours where the skeleton feature points with obvious geometric structure changes are located are marked and their geometric structure features are recorded;

[0050] (5) According to the mapping relationship between the composite contour sets of the target character in the existing variant glyph font and the standard glyph of the variant glyph font to be generated, the composite contour skeleton feature point sets in the composite contour subset containing the marked composite contour and having the mapping relationship are matched according to the Euclidean distance between the vectors, and the mapping relationship between the skeleton feature points of the two sides of the mapping relationship is constructed;

[0051] (6) performing geometric structural changes on the skeleton feature points of the standard glyph of the target character in the variant glyph font to be generated according to step (4) and step (5), so as to form a composite outline of the variant glyph of the target character in the variant glyph font to be generated;

[0052] (7) The contour point set of the variant glyph of the target character in the variant glyph font to be generated can be described and converted into a Chinese character font in TrueType Font format, which can be written into the corresponding encoding position of the font file after the format conversion.

[0053] This method solves the problem that users can only use existing variant fonts when using a text information hiding system; it saves the time and manpower costs required by the text information hiding system service provider in building a new variant font; compared with directly migrating the geometric structure features of the glyphs based on the skeleton, migrating the geometric structure features of the glyphs based on a single composite contour is more accurate in matching.

[0054] Step (1) further includes the following steps,

[0055] (1.1) respectively obtaining a set of contour points that specifically express the glyph of the target character from a standard glyph font file of an existing variant glyph font, a variant font file of an existing variant glyph font, and a standard glyph font file of a variant glyph font to be generated;

[0056] (1.2) A composite contour set is formed based on contour division and contour nesting relationship, including the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated.

[0057] Further, step (2) includes the following steps,

[0058] (2.1) calculating the feature value of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated;

[0059] (2.2) matching the feature values ​​of the composite contour set of the target character in the existing variant font and the variant character in the target character in the existing variant font to form a mapping relationship of the composite contour subset;

[0060] (2.3) The composite contour sets of the standard glyphs of the target characters in the existing variant glyph fonts and the standard glyphs of the target characters in the variant glyph fonts to be generated are matched according to their feature values ​​to form a mapping relationship of composite contour subsets.

[0061] The characteristic values ​​of the composite contour include center of gravity, area ratio, horizontal length, and vertical length.

[0062] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention; therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0063] Although this article uses more terms corresponding to the figure marks in the figures, it does not exclude the possibility of using other terms; these terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional limitations is contrary to the spirit of the present invention.

Claims

1. A Chinese character geometric structure feature migration method based on composite contour skeleton, It is characterized in that The following steps are involved: (1) determining a target character, obtaining a set of contour points of a standard glyph of the target character in an existing variant glyph font, a variant glyph in an existing variant glyph font, and a standard glyph in a variant glyph font to be generated, and forming a composite contour set; (2) According to the composite contour set, the characteristic value of the composite contour is calculated, and matching is performed according to the characteristic value to form a mapping relationship of the composite contour subset; (3) drawing pixel maps of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated, extracting a single pixel skeleton according to the pixel map of the composite contour, and converting the feature coordinates of the single pixel skeleton into a skeleton feature point set of each composite contour; (4) According to the mapping relationship between the composite contours of the standard glyph and the variant glyph in the existing variant glyph font, the composite contour skeleton feature point sets of the composite contour subsets with the mapping relationship are matched, and the mapping relationship between the skeleton feature points of both sides of the mapping relationship is constructed. The composite contours where the skeleton feature points with obvious geometric structure changes are located are marked and their geometric structure features are recorded; (5) according to the mapping relationship between the composite contour sets of the target character in the existing variant glyph font and the standard glyph of the variant glyph font to be generated, the composite contour skeleton feature point sets in the composite contour subsets containing the marked composite contours and having the mapping relationship are matched, and the mapping relationship between the skeleton feature points of both sides of the mapping relationship is constructed; (6) performing geometric structural changes on the skeleton feature points of the standard glyph of the target character in the variant glyph font to be generated according to step (4) and step (5), so as to form a composite outline of the variant glyph of the target character in the variant glyph font to be generated; (7) converting the contour point set of the variant glyph of the target character in the variant glyph font to be generated into a Chinese character font in TrueType Font format, which can be written into the corresponding encoding position of the font file after the format conversion; Step (1) comprises the following steps: (1.1) respectively obtaining a set of contour points that specifically express the glyph of the target character from a standard glyph font file of an existing variant glyph font, a variant font file of an existing variant glyph font, and a standard glyph font file of a variant glyph font to be generated; (1.2) forming a composite contour set according to contour division and contour nesting relationship; Step (2) comprises the following steps: (2.1) calculating the feature value of each composite contour according to the composite contour set of the standard glyph of the target character in the existing variant glyph font, the variant glyph of the target character in the existing variant glyph font, and the standard glyph of the target character in the variant glyph font to be generated; (2.2) matching the feature values ​​of the composite contour set of the target character in the existing variant font and the variant character in the target character in the existing variant font to form a mapping relationship of the composite contour subset; (2.3) The composite contour sets of the standard glyphs of the target characters in the existing variant glyph fonts and the standard glyphs of the target characters in the variant glyph fonts to be generated are matched according to their feature values ​​to form a mapping relationship of composite contour subsets.

2. A Chinese character geometric structure feature migration method based on a composite contour skeleton according to claim 1, It is characterized in that The characteristic values ​​of the composite contour include center of gravity, area ratio, horizontal length, and vertical length.

3. The method for migrating Chinese character geometric structure features based on a composite contour skeleton according to claim 1, It is characterized in that In step (3), each composite contour skeleton feature point set in the composite contour subset with a mapping relationship is matched according to the Euclidean distance between vectors.

4. The method for migrating Chinese character geometric structure features based on a composite contour skeleton according to claim 1, It is characterized in that In step (4), the composite contour skeleton feature point sets in the composite contour subset containing the marked composite contour and having a mapping relationship are matched according to the Euclidean distance between the vectors.