CN115510809A - Writing font analysis method and device, computer equipment and storage medium - Google Patents

Writing font analysis method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115510809A
CN115510809A CN202211211143.8A CN202211211143A CN115510809A CN 115510809 A CN115510809 A CN 115510809A CN 202211211143 A CN202211211143 A CN 202211211143A CN 115510809 A CN115510809 A CN 115510809A
Authority
CN
China
Prior art keywords
target
font
fonts
handwritten
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211211143.8A
Other languages
Chinese (zh)
Inventor
朱芮叶
朱芷叶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202211211143.8A priority Critical patent/CN115510809A/en
Priority to PCT/CN2022/125537 priority patent/WO2024065891A1/en
Publication of CN115510809A publication Critical patent/CN115510809A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a method and a device for analyzing a written font, computer equipment and a storage medium, wherein N target handwritten fonts related to user identification are obtained, and N is not less than 2; extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts; calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters; acquiring a target comparison graph corresponding to the user identification based on target style parameters corresponding to the N target handwritten fonts; and performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2. According to the technical scheme, whether the writing font of the user is in a standard writing mode can be analyzed on the basis of the writing habit of the user, the quality of the font to be recognized is analyzed, and the writing ability of the user is improved adaptively on the basis of the writing habit of the user.

Description

Writing font analysis method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of font analysis technologies, and in particular, to a method and an apparatus for analyzing a writing font, a computer device, and a storage medium.
Background
At present, most users have no special exercise lessons for fonts and strokes, such as English fonts and English strokes, and the writing of the fonts and the strokes is only required by some writing neatness, so that the judgment on whether the fonts and the strokes of the users are standard or not cannot be made, the fonts of many users are very ugly, the font style is difficult to change once formed, and the users are occasionally careless about to accompany writers, therefore, how to analyze whether the writing fonts of the users are standard or not is realized, so that the technical problem to be solved urgently at present is solved by improving the writing capability of the users.
Disclosure of Invention
The embodiment of the invention provides a writing font analysis method and device, computer equipment and a storage medium, which are used for solving the problem of analyzing whether the writing font of a user is standard or not.
A written font analysis method, comprising:
acquiring N target handwritten fonts related to user identification, wherein N is not less than 2;
extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts;
calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters;
acquiring a target comparison graph corresponding to the user identification based on the target style parameters corresponding to the N target handwritten fonts;
and performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2.
A written font analyzing apparatus comprising:
the font acquisition module is used for acquiring N target handwritten fonts related to the user identification, wherein N is larger than or equal to 2;
the parameter extraction module is used for extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts;
the parameter calculation module is used for calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters;
the graph acquisition module is used for acquiring a target comparison graph corresponding to the user identification based on the target style parameters corresponding to the N target handwritten fonts;
and the result obtaining module is used for performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and obtaining the quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2.
A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the above-mentioned written font analyzing method when executing said computer program.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the above-mentioned written font analyzing method.
The method, the device, the computer equipment and the storage medium for analyzing the writing fonts firstly acquire N target handwritten fonts related to user identifications, perform quality analysis on the target handwritten fonts of different users to improve the reliability of the quality analysis on the target handwritten fonts, then perform stroke parameter extraction on the N target handwritten fonts to acquire target stroke parameters corresponding to the N target handwritten fonts, analyze whether the writing fonts of the users are in writing specifications or not on the basis of writing habits of the users according to the target stroke parameters, then calculate the target style parameters corresponding to the N target handwritten fonts on the basis of the target stroke parameters, so as to select the writing specifications suitable for the writing habits of the users according to the target style parameters, finally acquire target comparison graphs corresponding to the user identifications on the basis of the target stroke parameters corresponding to the N target handwritten fonts, adopt the target comparison graphs corresponding to the user identifications, perform quality analysis on the M handwritten fonts to be recognized corresponding to the user identifications, acquire the quality analysis results corresponding to the M handwritten fonts to be recognized, and further perform the writing quality analysis on the basis of the writing habits of the users because the target comparison graphs are generated according to the target comparison graphs, thereby improving the writing quality of the writing fonts to the writing habits of the users.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a diagram of an application environment of a method for analyzing a written font according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for analyzing written fonts in accordance with an embodiment of the present invention;
FIG. 3 is another flow chart of a method for analyzing a written font according to an embodiment of the present invention;
FIG. 4 is another flow chart of a method for written font analysis in accordance with an embodiment of the present invention;
FIG. 5 is another flow chart of a method for analyzing a written font according to an embodiment of the present invention;
FIG. 6 is another flow chart of a method for written font analysis in accordance with an embodiment of the present invention;
FIG. 7 is another flow chart of a method for written font analysis in accordance with an embodiment of the present invention;
FIG. 8 is a diagram of a target comparison graph according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a writing font analyzing apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for analyzing the written font provided by the embodiment of the invention can be applied to an application environment as shown in fig. 1. Specifically, the written font analyzing method is applied to a written font analyzing system, the written font analyzing system comprises a client and a server shown in fig. 1, and the client and the server are communicated through a network and used for analyzing whether the written font of a user is standard or not so as to improve the writing capability of the user. The client is also called a user side, and refers to a program corresponding to the server and providing local services for the client. The client may be installed on, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for analyzing a written font is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s201: and acquiring N target handwritten fonts related to the user identification, wherein N is not less than 2.
S202: and extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts.
S203: and calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters corresponding to the target handwritten fonts.
S204: and acquiring a target comparison graph corresponding to the user identification based on the target style parameters corresponding to the N target handwritten fonts.
S205: and performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2.
The user identifier refers to an identifier capable of indicating the identity of the user. For example, the user identifier may be a user ID or other identifier capable of indicating the identity of the user, and is not limited herein. The target handwriting font is a user handwriting font corresponding to the user identifier. The target handwritten font includes, but is not limited to, english font, french font, german font, and spanish font. In this example, the target handwritten font is mainly illustrated as an english font.
As an example, in step S201, N target handwriting fonts related to the user identifier are acquired, where N ≧ 2. In this example, since the styles of the handwritten fonts of different users are different, the handwriting habits of different users are analyzed for the target handwritten fonts of different users in the subsequent step by obtaining N target handwritten fonts related to the user identification. Illustratively, the N target handwritten fonts may include target handwritten fonts corresponding to upper and lower cases of 26 english letters.
The target stroke parameters refer to parameters obtained after stroke parameters of N target handwritten fonts are extracted.
As an example, in step S202, the server performs stroke parameter extraction on N target handwritten fonts, and obtains target stroke parameters corresponding to the N target handwritten fonts. Specifically, the stroke parameter extraction may be to extract a characteristic parameter of each stroke of each target handwritten font, and determine the characteristic parameter of each stroke of each target handwritten font as a target stroke parameter. The characteristic parameters include a stroke start point of each stroke, a stroke end point of each stroke, or other parameters that characterize each stroke. Illustratively, the N target handwritten fonts include an upper case english letter "a" and a lower case english letter "a". The strokes of the capital English letters 'A' are 3, the server extracts the stroke parameters of the capital English letters 'A' to obtain target stroke parameters corresponding to the capital English letters 'A', for example, the starting point and the end point of each stroke of the capital English letters 'A' are extracted as the target stroke parameters. The strokes of the lower case English letters 'a' are 2, the server extracts stroke parameters of the lower case English letters 'a' to obtain target stroke parameters corresponding to the lower case English letters 'a', for example, the target stroke parameters of the starting point and the end point of each stroke of the lower case English letters 'a' are extracted. It should be noted that this example is only for illustration, and does not limit the N target handwritten fonts, where the N target handwritten fonts may include target handwritten fonts corresponding to major and minor letters of 26 english letters, as long as it is ensured that the stroke parameter extraction is performed on the N target handwritten fonts, and the target stroke parameters corresponding to the N target handwritten fonts are obtained. In the example, the target stroke parameters corresponding to the N target handwritten fonts are obtained by extracting the stroke parameters of the N target handwritten fonts, so that the writing habits of the user are judged in the subsequent steps according to the target stroke parameters, and whether the writing fonts of the user are in writing norms is analyzed on the basis of the writing habits of the user, so that the writing ability of the user is improved adaptively on the basis of the writing habits of the user.
The target style parameter is a parameter for reflecting the handwriting style of the user. Illustratively, the target style parameters include, but are not limited to, font weight, font shape, font size, font spacing, and font slope to reflect the user's writing habits.
As an example, in step S203, target style parameters corresponding to the N target handwritten fonts are calculated based on the target stroke parameters. For example, a preset style parameter calculation strategy may be adopted to calculate target style parameters corresponding to the N target handwritten fonts. The preset style parameter calculation strategy is a preset strategy and is used for calculating a target style parameter corresponding to a target handwritten font according to the target stroke parameter. In the example, target style parameters corresponding to the N target handwritten fonts are calculated based on the target stroke parameters, so that the writing habits of the user are analyzed according to the target style parameters in the subsequent steps, writing specifications suitable for the writing habits of the user can be selected according to the target style parameters, whether the writing fonts of the user are in the writing specifications or not is analyzed on the basis of the writing habits of the user, and then the writing ability of the user is improved adaptively on the basis of the writing habits of the user. Further, after target style parameters corresponding to the N target handwritten fonts are calculated based on the target stroke parameters, the calculated target style parameters may be further adjusted according to actual requirements. Illustratively, the calculated target style parameters may be further adjusted according to the user-defined target stroke parameters input by the user.
The target comparison graph is generated according to target style parameters corresponding to the N target handwritten fonts and is used for quality analysis of the corresponding handwritten fonts to be recognized related to the user identification. Optionally, the handwriting font to be recognized may be a target handwriting font, and may also be a historical handwriting font. The historical handwriting fonts refer to fonts which are handwritten by the user in advance and stored in a database. Optionally, the target alignment graph includes a standard writing line and a standard writing grid. The standard writing line is a writing line generated according to the target style parameters and is used for judging whether the handwriting font to be recognized is in a standard writing mode on the basis of adapting to the habit of the user. The standard writing lattice is a writing lattice generated according to the target style parameters and is used for judging whether the handwriting font to be recognized is in a standard writing condition on the basis of adapting to the habit of the user. Alternatively, the standard writing line may be a writing line generated based on the target style parameter and the golden section ratio. The standard writing lattice may be a writing lattice generated based on the target style parameter and the golden section ratio. In this example, the golden section ratio is strictly proportional, artistic, and harmonious, and thus has a rich aesthetic value. Therefore, the standard writing line and the standard writing lattice are generated through the target style parameters and the golden section ratio, whether the writing font of the user is in the standard writing can be analyzed on the basis of the writing habit of the user, and the writing capability of the user is improved adaptively on the basis of the writing habit of the user.
As an example, in step S204, a target comparison graph corresponding to the user identifier is obtained based on target style parameters corresponding to N target handwritten fonts. Illustratively, a preset comparison graph obtaining strategy can be adopted, and a target comparison graph corresponding to the user identifier is obtained based on target style parameters corresponding to the N target handwritten fonts. The preset comparison graph obtaining strategy is a preset strategy and is used for obtaining a target comparison graph corresponding to the user identification according to target style parameters corresponding to the target handwritten font. In this example, since the target comparison graph is generated according to the target style parameters, it is possible to analyze whether the writing font of the user is in a standard writing form based on the writing habit of the user, so as to perform quality analysis on the font to be recognized, and further adaptively improve the writing ability of the user based on the writing habit of the user.
The quality analysis result refers to a result obtained after performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification. The handwriting font to be recognized can be a target handwriting font and can also be a handwriting font input again by a user.
As an example, in step S205, quality analysis is performed on M to-be-recognized handwritten fonts corresponding to the user identifiers by using the target comparison graph corresponding to the user identifiers, and quality analysis results corresponding to the M to-be-recognized handwritten fonts are obtained, where M is ≧ 2. In this example, a preset font quality analysis strategy may be adopted to perform quality analysis on the M handwritten fonts to be recognized corresponding to the user identifier, so as to obtain quality analysis results corresponding to the M handwritten fonts to be recognized. The preset font quality analysis strategy is a preset strategy and is used for performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification and obtaining quality analysis results corresponding to the M handwriting fonts to be recognized. In this embodiment, the target comparison graph corresponding to the user identifier is adopted to perform quality analysis on M handwritten fonts to be recognized corresponding to the user identifier, and quality analysis results corresponding to the M handwritten fonts to be recognized are obtained.
In this embodiment, N target handwritten fonts related to the user identifier are obtained first, so as to perform quality analysis on the target handwritten fonts of different users, thereby improving reliability of quality analysis on the target handwritten fonts. And finally, based on the target style parameters corresponding to the N target handwritten fonts, acquiring a target comparison graph corresponding to the user identification, adopting the target comparison graph corresponding to the user identification to perform quality analysis on M handwritten fonts to be recognized corresponding to the user identification, and acquiring quality analysis results corresponding to the M handwritten fonts to be recognized.
In an embodiment, as shown in fig. 3, in step S201, acquiring N target handwritten fonts related to user identifications includes:
s301: and acquiring an input handwriting image corresponding to the user identifier.
S302: and performing font extraction processing on the input handwritten image to acquire N target handwritten fonts.
The input handwritten image refers to a handwritten image input by a client. The input handwritten image includes N target handwritten fonts. Illustratively, the input handwritten image may be an image converted from N target handwritten fonts by photographing or scanning.
As an example, in step S301, the server may receive a writing quality analysis request sent by the client, where the writing quality analysis request includes an input handwriting image and a user identifier. And the server acquires the input handwriting image corresponding to the user identification through the writing quality analysis request.
As an example, in step S302, the server performs font extraction processing on the input handwritten image, and acquires N target handwritten fonts. In this example, existing image font extraction techniques may be employed to ensure that N target handwritten fonts can be extracted from the input handwritten image, without limitation.
In this embodiment, the input handwritten image may be converted by photographing or scanning N target handwritten fonts, and the server obtains the input handwritten image corresponding to the user identifier, and performs font extraction processing on the input handwritten image to obtain N target handwritten fonts.
In an embodiment, as shown in fig. 4, in step S202, that is, performing stroke parameter extraction on N target handwritten fonts, and acquiring target stroke parameters corresponding to the N target handwritten fonts, includes:
s401: and acquiring a stroke starting point and a stroke end point of each target handwritten font.
S402: and extracting target key points from the stroke starting point and the stroke end point corresponding to each target handwritten font based on the font key point extraction strategy.
S403: and determining the starting point, the end point and the target key point of each stroke as target stroke parameters.
As an example, in step S401, the server obtains a stroke start point and a stroke end point of each target handwritten font. Specifically, a stroke starting point and a stroke ending point corresponding to each stroke in each target handwriting font are obtained.
As an example, in step S402, the font key point extraction policy refers to a preset policy for extracting target key points from the stroke start point and the stroke end point corresponding to each target handwritten font. The target key points are points in each stroke of each target handwritten font that reflect the characteristics of the target handwritten font. Illustratively, the target keypoint may be an inflection point in each stroke, or a point on the arc in each stroke that includes an arc. Optionally, the font key point extraction strategy may be to extract an inflection point between the start point and the end point of the stroke corresponding to each target handwritten font, and/or extract at least one point on an arc between the start point and the end point of the stroke corresponding to each target handwritten font. In this example, the target keypoints are extracted from the stroke start point and the stroke end point corresponding to each target handwritten font based on the font keypoint extraction strategy so as to obtain target stroke parameters.
As an example, in step S403, each stroke start point, stroke end point and target keypoint is determined as a target stroke parameter. In the example, the starting point, the end point and the target key point of each stroke are determined as the target stroke parameters, so that the server can judge the writing habit of the user based on the target stroke parameters, analyze whether the writing font of the user is in a standard writing form on the basis of the writing habit of the user, and improve the writing capability of the user adaptively on the basis of the writing habit of the user.
In an embodiment, as shown in fig. 5, in step 204, that is, obtaining a target comparison graph corresponding to the user identifier based on the target style parameters corresponding to the N target handwriting fonts includes: and calculating the target stroke parameters by adopting a regression algorithm to obtain target style parameters corresponding to the target handwritten font.
As an example, a regression algorithm is used to calculate coordinates corresponding to a stroke start point, a stroke end point and a target key point in the target stroke parameter, and sizes of the stroke start point, the stroke end point and the target key point, and obtain target style parameters corresponding to the target handwritten font, that is, a font thickness, a font shape, a font size, a font interval and a font slope corresponding to the target handwritten font.
In this implementation, since the N target handwritten fonts may include a plurality of repeated english letters, and indexes such as thickness, size, distance, inclination and the like of each english letter are also inconsistent, the target stroke parameters are calculated by using a regression algorithm to obtain the target style parameters corresponding to the target handwritten font, so that the obtained target style parameters corresponding to the target handwritten font can reflect the writing habits of the user more truly.
In one embodiment, as shown in FIG. 5, in step 203, the target style parameters include font weight, font shape, font size, font spacing, and font slope; based on the target stroke parameters, calculating target style parameters corresponding to the N target handwritten fonts, wherein the target style parameters comprise:
s501: and determining a standard writing line and a standard writing lattice based on the font thickness, the font shape, the font size, the font spacing and the font inclination.
S502: and forming a target comparison graph based on the standard writing lines and the standard writing grids.
As an example, in step S501, since the font thickness, font shape, font size, font spacing, and font gradient in the target style parameters can reflect the actual writing habit of the user, the standard writing line and the standard writing lattice, which are relatively aesthetic or standard, are determined based on the font thickness, font shape, font size, font spacing, and font gradient, that is, based on adapting to the actual writing habit of the user. Further, the server determines a standard writing line and a standard writing lattice which are relatively aesthetic or standard according to the font thickness, the font shape, the font size, the font spacing and the font inclination, and the golden section ratio. Illustratively, comparing the font thickness, the font shape, the font size, the font interval and the font gradient and the golden section ratio with the preset writing line template, determining the similarity of dimensions such as the number of writing lines, the spacing distance of the writing lines and the position of each writing line on the standard writing lattice in the preset writing line template, weighting the similarity of dimensions such as the number of writing lines, the spacing distance of the writing lines and the position of each writing line on the standard writing lattice, and determining the standard writing line which is relatively aesthetic or standard. The preset writing line template refers to a preset writing line.
Illustratively, the method comprises the steps of comparing a preset writing lattice template with a font thickness, a font shape, a font size, a font interval, a font inclination and a golden section ratio, determining the similarity of the dimensions such as the number of writing lattices, the writing lattice interval, the writing lattice size, the size ratio between different writing lattices and the writing lattice inclination in the preset writing lattice template, weighting the similarity of the similarities of the dimensions such as the number of writing lattices, the writing lattice interval, the writing lattice size, the size ratio between different writing lattices and the writing lattice inclination, and determining a standard writing lattice which is relatively beautiful or standard. The preset writing lattice template refers to a preset writing lattice.
As an example, in step S502, the server forms a target alignment graph based on the standard writing lines and the standard writing grids. As shown in fig. 9, the formed target alignment graph may include a plurality of standard writing lattices 10, and the interval between each standard writing lattice is adapted to the font interval in the target style parameter, and preferably, the interval between each standard writing lattice is 1 mm. The plurality of standard writing lattices comprise that each standard writing lattice comprises a first writing lattice 11, a second writing lattice 12 and a third writing lattice 13; the slope presented between the first writing lattice 11, the second writing lattice 12 and the third writing lattice 13 is adapted to the slope of the font in the target style parameter, and the size of the first writing lattice 11, the second writing lattice 12 and the third writing lattice 13 is adapted to the size of the font in the target style parameter. The standard writing line includes a plurality of standard writing lines including a first standard writing line 21, a second standard writing line 22, and a third standard writing line 23 which are parallel to each other, the first standard writing line 21 is located at a golden section point of the first writing lattice 11, the third standard writing line 23 is located at a golden section point of the third writing lattice 13, the second standard writing line 22 is located between the first standard writing line 21 and the third standard writing line 23, and a distance separating the second standard writing line 22 from the first standard writing line 21 has a predetermined ratio to a distance separating the second standard writing line 22 from the third standard writing line 23, the predetermined ratio being a custom set ratio such as a golden section ratio or a ratio of 1 (i.e., a distance separating the second standard writing line 22 from the first standard writing line 21 is equal to a distance separating the second standard writing line 22 from the third standard writing line 23), or a ratio set according to actual experience.
In this embodiment, based on typeface thickness, typeface shape, typeface size, typeface interval and typeface inclination, confirm standard writing line and standard writing check, based on standard writing line and standard writing check, form the target and compare the figure, because this target is compared the figure and is generated according to target style parameter, thereby can write the basis of custom at the user, whether the standard is write to analysis user's the typeface of writing to treat discernment typeface and carry out quality analysis, and then write the basis of custom at the user, the improvement user's of adaptability ability of writing.
In an embodiment, as shown in fig. 6, in step S205, performing quality analysis on M handwritten fonts to be recognized corresponding to the user identifier by using the target comparison graph corresponding to the user identifier, and obtaining quality analysis results corresponding to the M handwritten fonts to be recognized, includes:
s601: and identifying each handwriting font to be identified corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring a font analysis result corresponding to each handwriting font to be identified.
S602: and determining the number of the standard handwritten fonts and the number of the abnormal handwritten fonts based on font analysis results corresponding to the M handwritten fonts to be recognized.
S603: and acquiring quality analysis results corresponding to the M handwritten fonts to be recognized based on the number of the standard handwritten fonts and the number of the abnormal handwritten fonts.
The font analysis result is a result obtained after each handwriting font to be recognized corresponding to the user identification is recognized by adopting the target comparison graph corresponding to the user identification.
As an example, in step S601, a target comparison graph corresponding to the user identifier is used to identify each handwriting font to be identified corresponding to the user identifier, and a font analysis result corresponding to each handwriting font to be identified is obtained. Illustratively, each handwritten font to be recognized corresponding to the user identifier is compared with the target comparison graph, and whether each handwritten font to be recognized is located at a position corresponding to a standard writing line and a standard writing lattice in the target comparison graph is judged, so as to obtain a font analysis result corresponding to each handwritten font to be recognized, where the font analysis result includes whether each handwritten font to be recognized is located at a position corresponding to the standard writing line and the standard writing lattice in the target comparison graph.
Further, whether each handwriting font to be recognized is in the position corresponding to the standard writing line and the standard writing lattice in the target comparison graph or not is judged, whether the stroke of the handwriting font to be recognized meets a preset stroke standard or not is further judged, the preset stroke standard is a self-defined stroke standard and includes but is not limited to the fact that the font thickness of each stroke in the handwriting font to be recognized is uniform and consistent, the stroke of the straight line part in the handwriting font to be recognized is a straight line, the stroke of the radian part in the handwriting font to be recognized is round and smooth, the size of each handwriting font to be recognized is uniform, and the inclination of each handwriting font to be recognized is equal to the inclination of the standard writing lattice. It should be noted that, the existing font stroke recognition technology may be adopted to determine whether the stroke of the handwritten font to be recognized is standard, which is not limited herein. Wherein, the inclination of the standard writing lattice is preferably 75 degrees or 85 degrees. The stroke is mellow, namely the stroke radian of the radian part accords with the preset radian, and the preset radian can be set in a user-defined manner according to actual experience.
As an example, in step S602, based on the font analysis results corresponding to the M handwritten fonts to be recognized, the number of standard handwritten fonts and the number of abnormal handwritten fonts are determined to determine the writing quality of the user. The standard handwriting font refers to a handwriting font to be recognized, which is located at a position corresponding to a standard writing line and a standard writing grid in the target comparison graph. The abnormal handwritten font refers to the handwritten font to be recognized, which is at least partially not located at the position corresponding to the standard writing line and the standard writing lattice in the target comparison graph, or the handwritten font to be recognized, which is located at the position corresponding to the standard writing line and the standard writing lattice in the target comparison graph, wherein the inclination difference between the font inclination and the standard writing lattice exceeds the preset inclination. The preset inclination is the inclination set by self-definition and can be set according to actual experience.
Further, the standard handwriting font may also be a handwriting font meeting the preset stroke standard, and the abnormal handwriting font may also be a handwriting font not meeting the preset stroke standard.
As an example, in step S603, quality analysis results corresponding to the M handwritten fonts to be recognized are obtained based on the number of standard handwritten fonts and the number of abnormal handwritten fonts. Illustratively, judging whether the ratio between the number of the standard handwritten fonts and the number of the abnormal handwritten fonts is larger than a target threshold value; if the ratio of the number of the standard handwritten fonts to the number of the abnormal handwritten fonts is larger than a target threshold value, the quality analysis results corresponding to the M handwritten fonts to be recognized are high quality; and if the ratio of the number of the standard handwritten fonts to the number of the abnormal handwritten fonts is smaller than or equal to the target threshold, the quality analysis results corresponding to the M handwritten fonts to be recognized are low quality. The target threshold may be set according to practical experience, and is not limited herein.
In this embodiment, a target comparison graph corresponding to a user identifier is adopted to identify each handwriting font to be identified corresponding to the user identifier, a font analysis result corresponding to each handwriting font to be identified is obtained, the number of standard handwriting fonts and the number of abnormal handwriting fonts are determined based on the font analysis results corresponding to M handwriting fonts to be identified, and the quality analysis results corresponding to M handwriting fonts to be identified are obtained based on the number of standard handwriting fonts and the number of abnormal handwriting fonts.
In an embodiment, as shown in fig. 7, after step 601, that is, after the target comparison graph corresponding to the user identifier is used to identify each handwritten font to be identified corresponding to the user identifier, and obtain a font analysis result corresponding to each handwritten font to be identified, the method includes:
s701: and if the font analysis result corresponding to the handwritten font to be recognized is the abnormal handwritten font, acquiring a target writing suggestion corresponding to the abnormal handwritten font.
S702: and determining the target comparison graph or the standard writing template as a target writing template.
S703: and sending the target writing suggestion and the target writing template to a target printing device for printing.
Wherein, the target writing suggestion refers to a preset writing suggestion. Illustratively, the target written suggestion includes written suggestions corresponding to the upper and lower case of 26 English letters.
As an example, when the font analysis result corresponding to the handwritten font to be recognized is an abnormal handwritten font, a target writing suggestion corresponding to the abnormal handwritten font is obtained. In this embodiment, when the handwriting font to be recognized corresponding to the user identifier is an abnormal handwriting font, a target writing suggestion corresponding to the abnormal handwriting font is obtained from the database, so that the writing capability of the user is improved.
The standard writing template is a self-defined template and accords with writing habits of most users.
As an example, the target comparison graph or the standard writing template is determined as the target writing template. In this embodiment, the target comparison graph corresponding to the user identifier may be determined as the target writing template, or the standard writing template may be determined as the target writing template, so that the user performs writing exercises according to the target writing template, thereby improving the writing ability of the user.
As an example, the target writing suggestions and the target writing templates are sent to the target printing device to be printed, so that the user can perform writing exercises according to the target writing suggestions and the target writing templates, and the writing ability of the user is improved.
In this embodiment, if the font analysis result corresponding to the handwritten font to be recognized is the abnormal handwritten font, a target writing suggestion corresponding to the abnormal handwritten font is obtained, the target comparison graph or the standard writing template is determined as the target writing template, and the target writing suggestion and the target writing template are sent to the target printing device for printing, so that the writing capability of the user is adaptively improved on the basis of the writing habit of the user.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, a written font analyzing apparatus is provided, which corresponds to the written font analyzing method in the above embodiment one to one. As shown in fig. 9, the writing font analyzing apparatus includes a font acquiring module 801, a parameter extracting module 802, a parameter calculating module 803, a graphic acquiring module 804, and a result acquiring module 805. The functional modules are explained in detail as follows:
a font obtaining module 801, configured to obtain N target handwritten fonts relevant to a user identifier, where N is equal to or greater than 2;
the parameter extraction module 802 is configured to perform stroke parameter extraction on the N target handwritten fonts, and obtain target stroke parameters corresponding to the N target handwritten fonts;
a parameter calculating module 803, configured to calculate, based on the target stroke parameters, target style parameters corresponding to the N target handwritten fonts;
the graph obtaining module 804 is configured to obtain a target comparison graph corresponding to the user identifier based on the target style parameters corresponding to the N target handwritten fonts;
the result obtaining module 805 is configured to perform quality analysis on the M to-be-recognized handwritten fonts corresponding to the user identifier by using the target comparison graph corresponding to the user identifier, and obtain quality analysis results corresponding to the M to-be-recognized handwritten fonts, where M is greater than or equal to 2.
Further, the font obtaining module 801 includes:
the image acquisition submodule is used for acquiring an input handwriting image corresponding to the user identifier;
and the font extraction submodule is used for carrying out font extraction processing on the input handwriting image and acquiring N target handwriting fonts.
Further, the parameter extraction module 802 includes:
the stroke acquisition submodule is used for acquiring a stroke starting point and a stroke end point of each target handwritten font;
the key point extraction submodule is used for extracting target key points from the stroke starting point and the stroke end point corresponding to each target handwritten font based on the font key point extraction strategy;
and the stroke parameter submodule is used for determining the starting point, the end point and the target key point of each stroke as target stroke parameters.
Further, the graph obtaining module 804 includes:
and the regression algorithm submodule is used for calculating the target stroke parameters by adopting a regression algorithm to obtain target style parameters corresponding to the target handwritten fonts.
Further, the parameter calculation module 803 includes:
the standard determining submodule is used for determining a standard writing line and a standard writing lattice based on the font thickness, the font shape, the font size, the font interval and the font inclination;
and the comparison graph sub-module is used for forming a target comparison graph based on the standard writing line and the standard writing lattice.
Further, the result obtaining module 805 includes:
the analysis result sub-module is used for identifying each handwriting font to be identified corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring a font analysis result corresponding to each handwriting font to be identified;
the quantity determining submodule is used for determining the quantity of the standard handwritten fonts and the quantity of the abnormal handwritten fonts based on font analysis results corresponding to the M handwritten fonts to be recognized;
and the quality analysis submodule is used for acquiring quality analysis results corresponding to the M handwritten fonts to be recognized based on the number of the standard handwritten fonts and the number of the abnormal handwritten fonts.
Further, the written font analyzing apparatus further includes:
the writing suggestion module is used for acquiring a target writing suggestion corresponding to the abnormal handwritten font when the font analysis result corresponding to the handwritten font to be recognized is the abnormal handwritten font;
the writing template module is used for determining the target comparison graph or the standard writing template as a target writing template;
and the target sending module is used for sending the target writing suggestion and the target writing template to the target printing equipment for printing.
For the specific definition of the writing font analyzing device, reference may be made to the definition of the writing font analyzing method above, and details are not described herein. The modules in the written font analyzing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for writing data in a font analysis process. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a written font analysis method.
In an embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the method for analyzing a written font in the foregoing embodiments is implemented, and details are not described here to avoid repetition. Alternatively, the processor implements the functions of each module/unit in the embodiment of the writing font analyzing apparatus when executing the computer program, and is not described herein again to avoid repetition.
In an embodiment, a computer-readable storage medium is provided, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for analyzing a written font in the foregoing embodiments is implemented, and details are not repeated herein to avoid repetition. Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units in the embodiment of the written font analyzing apparatus, and is not described herein again to avoid redundancy.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions.
The above-mentioned embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A method for analyzing a written font, comprising:
acquiring N target handwritten fonts related to user identification, wherein N is not less than 2;
extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts;
calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters corresponding to the N target handwritten fonts;
acquiring a target comparison graph corresponding to the user identification based on the target style parameters corresponding to the N target handwritten fonts;
and performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2.
2. The method for analyzing written fonts, according to claim 1, wherein the obtaining of the N target handwritten fonts associated with user identifications comprises:
acquiring an input handwriting image corresponding to the user identification;
and performing font extraction processing on the input handwritten image to acquire N target handwritten fonts.
3. The method for analyzing a written font according to claim 1, wherein the extracting stroke parameters of the N target handwritten fonts to obtain the target stroke parameters corresponding to the N target handwritten fonts includes:
acquiring a stroke starting point and a stroke end point of each target handwritten font;
extracting target key points from the stroke starting point and the stroke end point corresponding to each target handwritten font based on a font key point extraction strategy;
and determining each stroke starting point, each stroke end point and each target key point as the target stroke parameter.
4. The method for analyzing a written font according to claim 1, wherein the obtaining a target comparison graph corresponding to the user identifier based on target style parameters corresponding to N target handwritten fonts includes:
and calculating the target stroke parameters by adopting a regression algorithm to obtain target style parameters corresponding to the target handwritten font.
5. The written font analysis method according to claim 1, wherein the target style parameters include font thickness, font shape, font size, font spacing, and font slope;
the target style parameters corresponding to the N target handwritten fonts are calculated based on the target stroke parameters, and the target style parameters comprise:
determining a standard writing line and a standard writing lattice based on the font thickness, the font shape, the font size, the font spacing and the font inclination;
and forming the target comparison graph based on the standard writing lines and the standard writing grids.
6. The method for analyzing written fonts according to claim 1, wherein the step of performing quality analysis on the M handwritten fonts to be recognized corresponding to the user identifier by using the target comparison graph corresponding to the user identifier to obtain quality analysis results corresponding to the M handwritten fonts to be recognized comprises:
identifying each handwriting font to be identified corresponding to the user identification by adopting a target comparison graph corresponding to the user identification, and acquiring a font analysis result corresponding to each handwriting font to be identified;
determining the number of standard handwritten fonts and the number of abnormal handwritten fonts based on font analysis results corresponding to the M handwritten fonts to be recognized;
and acquiring quality analysis results corresponding to the M handwriting fonts to be recognized based on the number of the standard handwriting fonts and the number of the abnormal handwriting fonts.
7. The method for analyzing a written font according to claim 6, wherein after the identifying each handwritten font to be identified corresponding to the user identifier by using the target comparison graph corresponding to the user identifier and obtaining a font analysis result corresponding to each handwritten font to be identified, the method comprises:
if the font analysis result corresponding to the handwritten font to be recognized is an abnormal handwritten font, acquiring a target writing suggestion corresponding to the abnormal handwritten font;
determining the target comparison graph or the standard writing template as a target writing template;
and sending the target writing suggestion and the target writing template to target printing equipment for printing.
8. A written font analyzing apparatus, comprising:
the font obtaining module is used for obtaining N target handwritten fonts related to the user identification, wherein N is larger than or equal to 2;
the parameter extraction module is used for extracting stroke parameters of the N target handwritten fonts to obtain target stroke parameters corresponding to the N target handwritten fonts;
the parameter calculation module is used for calculating target style parameters corresponding to the N target handwritten fonts based on the target stroke parameters;
the graph obtaining module is used for obtaining a target comparison graph corresponding to the user identification based on the target style parameters corresponding to the N target handwritten fonts;
and the result acquisition module is used for performing quality analysis on the M handwriting fonts to be recognized corresponding to the user identification by adopting the target comparison graph corresponding to the user identification, and acquiring the quality analysis results corresponding to the M handwriting fonts to be recognized, wherein M is not less than 2.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the written font analysis method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method for analyzing a written font according to any one of claims 1 to 7.
CN202211211143.8A 2022-09-30 2022-09-30 Writing font analysis method and device, computer equipment and storage medium Pending CN115510809A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211211143.8A CN115510809A (en) 2022-09-30 2022-09-30 Writing font analysis method and device, computer equipment and storage medium
PCT/CN2022/125537 WO2024065891A1 (en) 2022-09-30 2022-10-15 Written font analysis method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211211143.8A CN115510809A (en) 2022-09-30 2022-09-30 Writing font analysis method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115510809A true CN115510809A (en) 2022-12-23

Family

ID=84507564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211211143.8A Pending CN115510809A (en) 2022-09-30 2022-09-30 Writing font analysis method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115510809A (en)
WO (1) WO2024065891A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096524A (en) * 2016-06-01 2016-11-09 广东小天才科技有限公司 The acquisition methods of a kind of Chinese character aesthetics and device
CN111523455A (en) * 2020-04-22 2020-08-11 北京易文汉学科技有限公司 Evaluation method for Chinese character writing
CN111695539A (en) * 2020-06-17 2020-09-22 北京一起教育信息咨询有限责任公司 Evaluation method and device for handwritten Chinese characters and electronic equipment
CN113592044B (en) * 2021-07-09 2024-05-10 广州逅艺文化科技有限公司 Handwriting feature analysis method and device
CN114419627A (en) * 2021-12-03 2022-04-29 陈颖 Handwritten Chinese character evaluation method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
WO2024065891A1 (en) 2024-04-04

Similar Documents

Publication Publication Date Title
US20210295162A1 (en) Neural network model training method and apparatus, computer device, and storage medium
CN110569830A (en) Multi-language text recognition method and device, computer equipment and storage medium
CN109766072B (en) Information verification input method and device, computer equipment and storage medium
CN110705233B (en) Note generation method and device based on character recognition technology and computer equipment
CN112651238A (en) Training corpus expansion method and device and intention recognition model training method and device
CN110569341A (en) method and device for configuring chat robot, computer equipment and storage medium
CN113743415A (en) Method, system, electronic device and medium for identifying and correcting image text
CN112699923A (en) Document classification prediction method and device, computer equipment and storage medium
JP2013033416A (en) Character recognition device, character recognition method, and program
CN111368638A (en) Spreadsheet creation method and device, computer equipment and storage medium
CN112766319A (en) Dialogue intention recognition model training method and device, computer equipment and medium
CN110245570B (en) Scanned text segmentation method and device, computer equipment and storage medium
CN109710924B (en) Text model training method, text recognition method, device, equipment and medium
CN109190615B (en) Shape-near word recognition determination method, device, computer device and storage medium
CN113806613B (en) Training image set generation method, training image set generation device, computer equipment and storage medium
CN111931672A (en) Handwriting recognition method and device, computer equipment and storage medium
CN112749639B (en) Model training method and device, computer equipment and storage medium
CN111783062B (en) Verification code identification method, device, computer equipment and storage medium
CN115510809A (en) Writing font analysis method and device, computer equipment and storage medium
CN112163110A (en) Image classification method and device, electronic equipment and computer-readable storage medium
CN108664945B (en) Image text and shape-pronunciation feature recognition method and device
CN112363929B (en) System online method and device, computer equipment and storage medium
CN110751140A (en) Character batch recognition method and device and computer equipment
CN113780131B (en) Text image orientation recognition method, text content recognition method, device and equipment
CN117058679A (en) Text error correction processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination