WO2021072905A1 - 字库生成方法、装置、电子设备及存储介质 - Google Patents

字库生成方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021072905A1
WO2021072905A1 PCT/CN2019/119904 CN2019119904W WO2021072905A1 WO 2021072905 A1 WO2021072905 A1 WO 2021072905A1 CN 2019119904 W CN2019119904 W CN 2019119904W WO 2021072905 A1 WO2021072905 A1 WO 2021072905A1
Authority
WO
WIPO (PCT)
Prior art keywords
stroke
target
data
text image
preset
Prior art date
Application number
PCT/CN2019/119904
Other languages
English (en)
French (fr)
Inventor
蒋建斌
连宙辉
肖建国
张纯
宛慧军
唐英敏
Original Assignee
北京方正手迹数字技术有限公司
北京大学
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 北京方正手迹数字技术有限公司, 北京大学 filed Critical 北京方正手迹数字技术有限公司
Publication of WO2021072905A1 publication Critical patent/WO2021072905A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Definitions

  • This application relates to the field of computer graphics technology, and in particular to a font generation method, device, electronic equipment and storage medium.
  • the production of a font library usually requires a professional font library design team.
  • the production process is generally manual production of hundreds to thousands of reference characters, processing, modification and production based on the reference characters word by word, obtaining the required target glyphs, and generating a complete font library on the basis of the target glyphs.
  • the production process of a set of fonts requires huge manpower and material resources, especially for fonts with a large number of characters such as Chinese and Japanese, the production process is more complicated and time-consuming. Not only does it require a large number of reference characters, it also has a long production cycle and low production efficiency.
  • the production process of the character library relies on manual labor, especially for reference characters with a continuous stroke style, the prepared character library cannot accurately maintain the character style, and the quality of the character library is not good.
  • This application provides a font generation method, device, electronic equipment, and storage medium, which are used to solve the technical problems of the existing font database production process being complicated, low efficiency, high production cost, and poor quality of the font library.
  • this application provides a font generation method, including:
  • Target stroke trajectory data Determining target stroke trajectory data according to the text images in the text image set and the first reference character library, where the target stroke trajectory data is used to characterize the shape characteristics of the text image
  • the target text image is determined according to the target stroke trajectory data and a preset processing algorithm, so as to generate a target character library according to the target text image.
  • the determining the first reference font library according to the set of text images includes:
  • the preset reference font collection including the mapping relationship between each reference text image and the reference stroke skeleton data
  • the first reference character library is determined according to the set of text images and the set of reference stroke skeleton data.
  • the determining target stroke trajectory data according to the text images in the text image set and the first reference character library includes:
  • skeleton data Determining skeleton data according to the text image and a first preset image processing algorithm, where the skeleton data includes a feature point set;
  • the target stroke trajectory data is determined according to the stroke trajectory data and a preset filtering algorithm.
  • the determining the target text image according to the target stroke trajectory data and a preset processing algorithm includes:
  • target stroke style data Determining target stroke style data according to the target stroke trajectory data and a preset training model, where the target stroke style data includes target stroke coordinate data and target stroke center of gravity data;
  • Target stroke detail data includes target stroke width data and target stroke end contour feature data
  • the target text image is determined according to the target stroke image and a preset superposition method.
  • the generating a target character library according to the target character image includes:
  • a target font library is generated according to the modified text image and the collection of text images.
  • this application provides a font generation device, including:
  • An obtaining module configured to obtain a collection of text images, the collection of text images including at least one text image
  • a first processing module configured to determine a first reference font library according to the text image collection, where the first reference font library belongs to a preset reference font library set;
  • the second processing module is configured to determine target stroke trajectory data according to the text images in the text image set and the first reference character library, and the target stroke trajectory data is used to characterize the shape characteristics of the text image;
  • the third processing module is configured to determine a target text image according to the target stroke trajectory data and a preset processing algorithm, so as to generate a target character library according to the target text image.
  • the first processing module is specifically used for:
  • the preset reference font collection including the mapping relationship between each reference text image and the reference stroke skeleton data
  • the first reference character library is determined according to the set of text images and the set of reference stroke skeleton data.
  • the second processing module is specifically used for:
  • skeleton data Determining skeleton data according to the text image and a first preset image processing algorithm, where the skeleton data includes a feature point set;
  • the target stroke trajectory data is determined according to the stroke trajectory data and a preset filtering algorithm.
  • the third processing module is specifically used for:
  • target stroke style data Determining target stroke style data according to the target stroke trajectory data and a preset training model, where the target stroke style data includes target stroke coordinate data and target stroke center of gravity data;
  • Target stroke detail data includes target stroke width data and target stroke end contour feature data
  • the target text image is determined according to the target stroke image and a preset superposition method.
  • the third processing module is specifically used for:
  • a target font library is generated according to the modified text image and the collection of text images.
  • this application provides an electronic device, including:
  • At least one processor At least one processor
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the fonts involved in the first aspect and the optional solutions Generation method.
  • the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the font generation method involved in the first aspect and optional solutions.
  • a character image set is first obtained, and the obtained character image set includes at least one character image, and then a first reference character library is determined according to the obtained character image, wherein ,
  • the first reference font library belongs to the preset reference font library set, and then the target stroke trajectory data is determined according to the text image in the text image collection and the first reference font library.
  • the determined target stroke trajectory data can characterize the shape feature of the text image, and finally according to the target
  • the stroke trajectory data and the preset processing algorithm determine the target text image, and generate the target font library according to the determined target text image, so that the entire font library can be automatically generated through the text image.
  • the font library generation process is simple, which improves the efficiency of font library production and reduces The production cost.
  • the characters in the generated character library can maintain the writing style of the original characters, and the character library is of high quality.
  • FIG. 1 is a schematic diagram of an application scenario of a font generation method provided by an embodiment of the application
  • FIG. 2 is a schematic flowchart of a font generation method provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of a process for determining a first reference character library according to an embodiment of the application
  • FIG. 4 is a schematic diagram of a process for determining target stroke trajectory data provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of target stroke trajectory data provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of a process for determining a target text image provided by this embodiment
  • FIG. 7 is a schematic diagram of a process for generating a target font provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of the same text image of a standard font library and a target font library provided by an embodiment of the application;
  • FIG. 9 is a schematic structural diagram of a font generation device provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • this application provides a method, device, electronic device and storage medium for generating a character library.
  • the character image set is first obtained, and the obtained character image set includes at least one character image.
  • the acquired text image determines the first reference font library, where the first reference font library belongs to the preset reference font library set, and then the target stroke trajectory data is determined according to the text image in the text image collection and the first reference font library, and the determined target stroke trajectory data It can characterize the shape characteristics of the text image, and finally determine the target text image according to the target stroke trajectory data and the preset processing algorithm, and generate the target font library according to the determined target text image, so that the entire font library can be automated through at least one text image Generation, the font library generation process is simple, improves the efficiency of font library production, reduces production costs, and the generated font library can maintain the writing style of the original text, and the font library quality is high.
  • FIG. 1 is a schematic diagram of an application scenario of a method for generating a font library provided by an embodiment of the application.
  • the method for generating a font library provided by the present application is executed by an electronic device, where the electronic device may be a mobile phone, a computer, a tablet computer, or a notebook computer, etc.
  • the computer 1 is shown as an example in FIG.
  • the character library generation method provided in the present application can realize the automatic generation of a complete set of character libraries through at least one character image, and the generated character library can maintain the writing style of the original characters.
  • the font library generation method provided in this application can be applied to the creation of any font style.
  • the obtained text image collection includes at least one text image, as shown in Figure 1, for example, the text in the text image is the Chinese character " ⁇ ", and the obtained text image collection includes this text Image 2, and then determine the first reference font library according to the text image collection, and then determine the target stroke trajectory data according to the text image 2 in the text image collection and the first reference font.
  • the target stroke trajectory data can characterize the shape characteristics of the text image, and finally according to the target
  • the stroke trajectory data and the preset processing algorithm determine the target text image, and generate the target font library according to the target text image, thereby realizing the automatic generation of the entire font library through the text image, and the generated font library can maintain the text style of the original text image.
  • a character image 3 in the target font library is the Chinese character " ⁇ ", and the Chinese character “ ⁇ ” maintains the character style of the component " ⁇ " in the Chinese character “ ⁇ ”. It is worth noting that FIG. 1 only shows one character image in the character library generated by the character library generation method provided by the present application.
  • FIG. 2 is a schematic flowchart of a method for generating a font library provided by an embodiment of the application. As shown in FIG. 2, the character library generation method provided in this embodiment can be executed by an electronic device, and the method includes:
  • S21 Acquire a text image collection, where the text image collection includes at least one text image.
  • the acquired text image collection includes at least one text image, which can be understood as writing at least one text, and the written text can be photographed or scanned to obtain the corresponding text image.
  • At least one text image constitutes Text image collection. Referring to the text image 2 in FIG. 1, the text image 2 is obtained by photographing or scanning the written Chinese character "Secret".
  • S22 Determine a first reference font library according to the text image collection, where the first reference font library belongs to a preset reference font library set.
  • the first reference font library is determined according to the text image collection, where the first reference font library belongs to the preset reference font library collection, which can be understood as: after the text image collection is obtained, the optimal reference is determined according to the text image collection from the preset reference font library collection Font library, the optimal reference font library is defined as the first reference font library. It is worth understanding that the optimal reference font library is the reference font library that best matches all the text images in the text image collection among the plurality of preset reference font libraries in the preset reference font library set.
  • FIG. 3 is a schematic diagram of a process for determining the first reference font library provided by an embodiment of the application, and the implementation manner includes:
  • S221 Determine a corresponding reference text image collection according to the text image collection and the preset reference font collection.
  • the text image collection includes at least one text image, and each text image in the text image collection is recognized from each preset reference font library of the preset reference font collection, and the recognized one exists in the preset reference font collection
  • the text images constitute a collection of reference text images.
  • the preset reference font collection all text images in the text image collection are recognized according to the Unicode (Unicode), and the text images with the same Unicode recognized constitute the reference text image collection, where each preset reference
  • the font library contains all the text images in the text image collection.
  • the preset reference character library set includes the mapping relationship between each reference text image and the reference stroke skeleton data.
  • the preset reference font library can be constructed offline.
  • a plurality of preset reference font libraries constitute a preset reference font library set, where each preset reference font library contains the mapping relationship between the reference text image and the reference stroke skeleton data, in other words, the prediction Assuming that the reference character library set includes the mapping relationship between each reference character image and the reference stroke skeleton data, the mapping relationship refers to the corresponding relationship between each character image in the preset reference character library and the stroke skeleton data of the respective glyph.
  • the reference stroke skeleton data can be determined according to the determined reference text image and the preset reference font library, and each reference text image has corresponding reference stroke skeleton data, then ,
  • the reference text image collection has a corresponding reference stroke skeleton data collection.
  • the reference stroke skeleton data is the stroke skeleton data of the text in the reference text image.
  • S223 Determine a first reference character library according to the text image collection and the reference stroke skeleton data collection.
  • the first reference font library is determined according to each text image in the text image collection and the corresponding reference stroke skeleton data, where feature comparison operations can be used, for example, using an elastic grid algorithm, Calculate the difference between each text image and the reference text image based on the reference stroke skeleton data, comprehensively calculate the difference between all reference text images and the corresponding text images involved in each preset reference font library, and filter out The preset reference font library corresponding to the smallest difference value.
  • the selected preset reference font library is the reference font library that most closely matches all text images in the text image collection, that is, the optimal reference font library, which is defined as the first reference font library .
  • the number of the preset reference character library corresponding to the minimum difference value provided in the embodiment of the present application is only one, and the preset reference character library corresponding to the minimum difference value is the first reference character library.
  • the method of determining the optimal reference font library provided in this embodiment, that is, determining the first reference font library, first determines the reference text image collection corresponding to the text image collection through the text image collection and the preset reference font collection, because the preset reference font collection is Including the mapping relationship between each reference text image and reference stroke skeleton data. Therefore, the reference stroke skeleton data collection can be determined according to the reference text image collection and the preset reference font library collection, and then the text image collection and the reference stroke skeleton data collection are used
  • the calculation of the feature comparison algorithm such as the elastic grid algorithm, determines the first reference character library.
  • the method for determining the first reference character library provided by this embodiment can determine the character library that best matches the text image set from the preset reference character library set as the reference character library to achieve accurate matching of the reference character library, which is beneficial to improve the quality of the target character library.
  • S23 Determine target stroke trajectory data according to the text image in the text image set and the first reference font library.
  • the target stroke trajectory data is used to characterize the shape characteristics of the text image.
  • the target stroke trajectory data is determined according to each character image in the character image set and the first reference character library, where the target stroke trajectory data can represent the shape characteristics of each character image in the character image set.
  • the target stroke trajectory data can be understood as a series of data that accurately represents each stroke of each text image in the text image set, for example, each text image Data such as the starting point, ending point, inflection point of each stroke and the position of each point in the entire glyph can be used to characterize the shape characteristics of the text image.
  • the first reference character library includes the mapping relationship between the reference text image and the reference stroke skeleton data. Therefore, the target stroke trajectory data can be determined through the text image in the text image set and the first reference character library, and the determined target stroke trajectory data It can characterize the shape characteristics of text images.
  • target stroke trajectory data is for all the strokes constituting the text image.
  • FIG. 4 is a schematic diagram of a process for determining target stroke trajectory data provided by an embodiment of the application, and the implementation includes:
  • S231 Determine the skeleton data according to the text image and the first preset image processing algorithm.
  • the skeleton data includes a feature point set.
  • the text images in the text image collection are processed by using a preset image processing algorithm to determine the skeleton data of the text in the text image. For example, if the text image is processed by an image thinning processing algorithm, the skeleton data of the text in the text image can be obtained.
  • the skeleton data includes multiple data constituting the skeleton data. If each data is called a feature point, the feature point set constitutes the skeleton data. In other words, the skeleton data includes a feature point set.
  • the feature point set is matched with the reference stroke skeleton data set to determine the stroke trajectory data.
  • the preset extraction algorithm is used to match the feature point set with the reference stroke skeleton data set to obtain the stroke trajectory data. It is understandable that the obtained strokes
  • the trajectory data is the stroke trajectory data of the character image in the character image set.
  • the Coherent Point Drift (CPD) algorithm can be used to register the feature point set and the reference stroke skeleton data set for the non-rigid point set, and the obtained point set registration result is the stroke trajectory data.
  • CPD Coherent Point Drift
  • stroke trajectory data is for all the strokes constituting the text image.
  • S233 Determine target stroke trajectory data according to the stroke trajectory data and a preset filtering algorithm.
  • the stroke trajectory data of the text image is determined as described above, the stroke trajectory data is filtered by a preset filtering algorithm to filter the stroke trajectory data with a poor matching result determined in step S232.
  • a preset extraction algorithm is used to match the feature point set with the reference stroke skeleton data set, and the stroke trajectory data of the determined text image may include the start point, end point, inflection point, and various points of the stroke. Data such as the position in the glyph, therefore, it is necessary to filter out the poorly matched data.
  • the specific process of the preset filtering algorithm may be: firstly, according to the stroke trajectory data determined in step S232, the text image is reproduced through the image expansion process, and then the text image is reproduced and the text image corresponding to the text image set is reproduced. Perform image comparison, calculate the difference value after the two comparisons, and determine the target stroke trajectory data from the stroke trajectory data according to the difference value.
  • the calculated difference value can be sorted in ascending order, and then a threshold value can be specified for interception. For example, if the threshold value is set to 70%, the stroke trajectory data corresponding to a 30% difference value is regarded as the determined poor match. Therefore, it is filtered to determine the stroke trajectory data with better matching, and use it as the target stroke trajectory data.
  • the target stroke trajectory data is for all the strokes that constitute the text image, as shown in FIG. 5, which is a schematic diagram of a target stroke trajectory data provided by an embodiment of the application. It can be understood that the target The expression form of the stroke trajectory data can be a matrix, a graph, etc., wherein the graphic is a more visual expression form.
  • the target stroke trajectory data of the glyph is shown by taking the Chinese character "Ah" as an example.
  • the skeleton data is first determined through the text image and the first preset image processing algorithm.
  • the skeleton data includes a feature point set, and then the feature point set is combined with the feature point set according to the preset extraction algorithm.
  • the stroke skeleton data set for matching determine the stroke trajectory data, and finally determine the target stroke trajectory data from the stroke trajectory data through a preset filtering algorithm to improve the accuracy of the data used in subsequent data training through the preset training model , It is helpful for the target text image to maintain the writing style of the text image in the text image collection.
  • S24 Determine the target text image according to the target stroke trajectory data and the preset processing algorithm, so as to generate a target character library according to the target text image.
  • the target stroke trajectory data is calculated by using a preset processing algorithm to determine the target text image, and then the target character library is generated from the determined target text image. It is understandable that the target stroke trajectory data is the stroke trajectory data of the text image in the text image set. Therefore, the target text image corresponding to the text image can be determined by using a certain algorithm for the target stroke trajectory data. When the target text image is determined , Then the target font library can be generated according to the target text image.
  • the target font library includes each independent target text image.
  • FIG. 6 is a schematic diagram of the process of determining the target text image provided by this embodiment. Ways include:
  • S241 Determine the target stroke style data according to the target stroke trajectory data and the preset training model.
  • the target stroke style data includes target stroke coordinate data and target stroke center of gravity data.
  • the preset training model is used to train the target stroke trajectory data to determine the target stroke style data.
  • the target stroke style data includes target stroke coordinate data and target stroke center of gravity data.
  • the preset training model can use two models for data training for the stroke trajectory information and the stroke center of gravity information describing the target text image. It is understandable that the essence of the two models is the same, and the difference is the input and output data of the training model.
  • all preset training models can use artificial neural networks, the input and output data for describing stroke trajectory information are stroke point coordinate data, and the input and output data for describing stroke center of gravity information are stroke center coordinate data.
  • the stroke point coordinate data is coordinate data representing the characteristic point on the stroke
  • the stroke center of gravity coordinate data is the coordinate data representing the position of the stroke center of gravity.
  • the target stroke trajectory data and the corresponding reference stroke skeleton data in the reference stroke skeleton data set are formatted to obtain the target stroke point coordinate data and the corresponding reference stroke point coordinate Data, as well as the target stroke center of gravity coordinate data and the corresponding reference stroke center of gravity coordinate data.
  • the specific data training using the preset training model is as follows:
  • the same number of sampling points are uniformly extracted from the target stroke point coordinate data and reference stroke point coordinate data corresponding to the text image and the reference text image, and the values are normalized and calculated
  • the difference between the corresponding target stroke point coordinate data and the reference stroke point coordinate data is used as the output of the preset training model, and the input is the normalized data of the corresponding reference stroke point coordinate data.
  • the target stroke trajectory data determined in step S23 and the corresponding reference stroke skeleton data are used as the training data of the two preset training models, the target stroke coordinate data and the target stroke center of gravity data can be obtained respectively, wherein the target stroke coordinate data is the description
  • the stroke trajectory information is obtained from a preset training model, and the target stroke center of gravity data is obtained from a preset training model that describes the stroke center information.
  • the target stroke coordinate data and the target stroke center of gravity data jointly determine the target stroke style data to accurately describe the overall writing style of the text image.
  • S242 Determine target stroke detail data according to the target stroke trajectory data.
  • the target stroke detail data includes target stroke width data and target stroke end contour feature data.
  • the target stroke detail data can be understood as data representing the detail information of the stroke, such as the width information of the stroke and the contour information of the end of the stroke. Therefore, the target stroke detail data includes target stroke width data and target stroke end contour feature data.
  • the target stroke trajectory data can characterize the shape characteristics of the text image. As shown in FIG. 5, it can be seen that the extension of the stroke width and the modification of the stroke end contours of the stroke skeleton data can further accurately characterize the shape characteristics of the text image.
  • the target stroke width data that is, the stroke width value
  • the target stroke width data can be determined to be twice the maximum distance from the start or end of the stroke to the outline of the stroke, and the data for the start and end of the stroke comes from the target stroke trajectory data, so according to the target stroke
  • the trajectory data determines the target stroke width data.
  • a certain number of rays are emitted from the starting point or end point to the stroke contour on the closest side, and the distance from the starting point or end point to the stroke contour can be calculated, and the stroke contour shape in the starting point or ending point area can be determined.
  • all strokes involved in the text can be accurately classified.
  • the average value of each type of stroke in the data representing the outline shape of the stroke can be calculated.
  • the average value obtained is the contour feature data of the end of the target stroke.
  • the target stroke width data and the end contour feature data of the target stroke determine the target stroke detail data.
  • S243 Determine the consecutive stroke probability data of the target stroke according to the target stroke trajectory data and the first reference character library.
  • the components of the reference text image in the first reference character library can be accurately classified, for example, the Chinese category is 1777, and the Japanese category is 2075.
  • a category represents a component.
  • each category represents the probability of continuous strokes from the end point of the i-th stroke to the start point of the i+1th stroke in the category.
  • the continuous stroke probability between the end point of the adjacent previous stroke and the starting point of the adjacent next stroke, then the data representing the continuous stroke probability is the target stroke continuous stroke probability data.
  • S244 Determine target stroke position data according to the target stroke style data and the first reference character library.
  • the fitting result is the target stroke position data to represent the position information of each stroke of the text image in the entire glyph .
  • the target stroke style data includes target stroke coordinate data and target stroke center of gravity data
  • the target stroke coordinate data is fitted with the reference stroke point coordinate data.
  • the target stroke center of gravity data is matched with the reference stroke center of gravity data. Perform the fitting. The two fitting results are determined as the target stroke position data.
  • S245 Determine the closed contour path of the target stroke according to the target stroke detail data and the target stroke position data.
  • the target stroke detail data includes target stroke width data and target stroke end contour feature data. The two types of data are calculated separately to determine the closed contour path of the target stroke.
  • the stroke order of the text image can be determined through the correspondence between the text-component-stroke sequence within the component, and the stroke outline information can be restored according to the determined stroke sequence. Then, based on the end contour feature data of the target stroke, and the start and end positions represented by the target stroke position data as the center point, a certain number of rays are emitted on average within the range of 180°, where the length of the ray is the current stroke The end width of the type of stroke. The end point of the ray is the final contour point. The interruption of the stroke is divided into a certain number of segments, and one ray is taken in the left and right 90° directions. The length of the taken ray is the width of a certain number of segments in the current stroke. The end point of the ray is still the contour point, and all the contour points are connected in a predetermined order, and then a complete stroke closed contour path can be obtained.
  • S246 Determine the single-stroke image according to the closed contour path of the target stroke and the preset filling algorithm.
  • the preset filling algorithm is used to fill the closed contour path of the target stroke, and each single stroke image can be obtained.
  • the preset filling algorithm may be a winding filling algorithm (Winding Fill).
  • S247 Determine the target stroke image according to the single stroke image and the target stroke continuous stroke probability data.
  • each single-stroke image can be processed according to certain rules to obtain the target stroke image.
  • the target stroke continuous stroke data is determined based on the target stroke trajectory data, which takes into account the writing habits of the text in the text image and reduces the meaningless continuous strokes. Therefore, according to the single stroke image and the target stroke continuous The target stroke image determined by the pen probability data maintains the text style of the text in the original written text image.
  • S248 Determine the target text image according to the target stroke image and the preset superposition method.
  • a preset superposition method is used to superimpose the determined target stroke image once, and then the entire glyph of the target text can be obtained, that is, the target text image is determined.
  • the preset superimposition method may be any manner in which picture superimposition can be performed, which is not limited in the embodiment of the present application.
  • the method for determining the target text image provided in this embodiment first determines the target stroke style data according to the target stroke trajectory data and the preset training model, and determines the target stroke detail data according to the target stroke trajectory data, and then determines the target stroke continuous stroke data and Target stroke position data and target stroke closed contour path, using preset filling algorithm to fill the target stroke closed contour path to determine the single stroke image, then combine the target stroke continuous stroke probability data to determine the target stroke image, which is superimposed by the preset The method is superimposed to finally determine the target text image, so that the determined target text image can maintain the text style of the original text image.
  • the implementation of determining the target text image in the embodiment shown in FIG. 6 can determine all the target text images that constitute the complete set of target fonts. After all the target text images are determined, the target fonts are generated according to the target text images.
  • One possible implementation is to directly store all target text images in a set of fonts, which is the target font, and the obtained target fonts have the same text style as the same components in the set of text images.
  • FIG. 7 is a schematic diagram of a process of generating a target font library provided by an embodiment of the application, and the implementation manner includes:
  • S71 Determine the corrected text image according to the target text image and the second preset image processing algorithm.
  • the target text image is processed by the second preset image processing algorithm, so that the stroke width of the target text image is closer to the stroke width of the text image in the text image set.
  • the second preset image processing algorithm may be image erosion and/or image expansion processing.
  • the difference value can be used to evaluate the width of the same strokes of the text image in the text image and the text image set.
  • Those skilled in the art can determine the threshold value of the difference value according to the realization requirements to control the second preset image processing algorithm to control the target text. The degree of image processing to determine the correction of the text image.
  • a target font library is generated according to the corrected text image and the collection of text images.
  • a preset vector algorithm is used for the corrected text image and the text images in the text image set to obtain the final target text image that constitutes the target font library. After all final target text images are determined, all final target text images constitute a target font library.
  • FIG. 8 is a schematic diagram of the same text image in a standard font library and a target font library provided by an embodiment of the application.
  • the text images in the standard font library 4 are prepared according to the prior art.
  • the text image is prepared according to the character library generation method provided in this embodiment, and both are vector character libraries.
  • the target character library includes each independent final target character image.
  • the acquired text image collection includes at least one text image
  • a first reference font library is determined according to the acquired text image collection
  • the first reference font data is preset
  • the target stroke trajectory data is determined according to the text image in the text image collection and the first reference font library.
  • the target stroke trajectory data can characterize the shape characteristics of the text image, and finally Determine the target text image according to the target stroke trajectory data and the preset processing algorithm, and generate the target font library according to the target text image. It can realize the automatic generation of the whole font library through the text image.
  • the character library generation method provided by this embodiment can maintain the character image style in the character image collection more accurately, and improve the quality of the character library.
  • FIG. 9 is a schematic structural diagram of a font generation device provided by an embodiment of the application.
  • the font generation device provided in this embodiment is used to execute the font generation method provided in the above embodiments.
  • the font generation device 100 provided in this embodiment includes:
  • the acquiring module 101 is configured to acquire a text image collection, and the text image collection includes at least one text image.
  • the first processing module 102 is configured to determine a first reference font library according to the text image collection, and the first reference font library belongs to a preset reference font library set.
  • the second processing module 103 is configured to determine target stroke trajectory data according to the text image in the text image set and the first reference character library, and the target stroke trajectory data is used to characterize the shape characteristics of the text image.
  • the third processing module 104 is configured to determine the target text image according to the target stroke trajectory data and a preset processing algorithm, so as to generate a target character library according to the target text image.
  • the first processing module 102 is specifically used for:
  • the first reference font library is determined according to the text image collection and the reference stroke skeleton data collection.
  • the second processing module 103 is specifically used for:
  • the feature point set is matched with the reference stroke skeleton data set to determine the stroke trajectory data
  • the third processing module 104 is specifically used for:
  • the target stroke style data includes target stroke coordinate data and target stroke center of gravity data
  • the target stroke detail data includes target stroke width data and target stroke end contour feature data
  • the third processing module 104 is also specifically used for:
  • the target font library is generated according to the modified text image and the collection of text images.
  • FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the application. As shown in FIG. 10, the electronic device 800 provided in this embodiment includes:
  • At least one processor 801 and
  • the memory 802 stores instructions that can be executed by at least one processor 801, and the instructions are executed by at least one processor 801, so that at least one processor 801 can execute each step of the above-mentioned font generation method.
  • the memory 802 stores instructions that can be executed by at least one processor 801, and the instructions are executed by at least one processor 801, so that at least one processor 801 can execute each step of the above-mentioned font generation method.
  • the embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions.
  • the computer instructions are used to make a computer execute each step of the font generation method in the foregoing embodiments.
  • the readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本申请提供一种字库生成方法、装置、电子设备及存储介质。本申请提供的字库生成方法通过获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,然后根据所获取的文字图像确定第一参考字库,再根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据,所确定的目标笔画轨迹数据可以表征文字图像的形状特征,最后根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,以生成目标字库,从而,能够通过文字图像实现整套字库的自动生成。字库生成过程简洁,提高了字库制作效率,减少了制作成本。并且,所生成字库中的文字能够保持原始文字的书写风格,字库质量较高。

Description

字库生成方法、装置、电子设备及存储介质 技术领域
本申请涉及计算机图形技术领域,尤其涉及一种字库生成方法、装置、电子设备及存储介质。
背景技术
随着通信技术的飞速发展,尤其是目前智能终端的普遍使用,人们的工作和生活中都会接触到各种各样的字库,使得用户对于各种字库的需求量日益增长。
现有技术中,对于字库的制作,通常需要专业的字库设计团队进行。制作流程一般为人工制作几百到几千个基准字,基于基准字逐字进行加工、修改及其制作,获得所需的目标字形,在目标字形的基础上生成完整的字库。
可见,一套字库的制作流程需要耗费巨大的人力和物力,尤其是像中文、日文等字符数量众多的字库,其制作流程更是复杂以及耗费时间。不但需要较多数量的基准字,其制作周期长,制作效率低下。并且,字库的制作过程依赖于人工,尤其对于具有例如连笔风格的基准字,所制备的字库不能精确地保持文字风格,字库质量欠佳。
发明内容
本申请提供一种字库生成方法、装置、电子设备及存储介质,用以解决现有字库制作流程复杂、效率低下、制作成本过高以及字库质量欠佳的技术问题。
第一方面,本申请提供一种字库生成方法,包括:
获取文字图像集合,所述文字图像集合包括至少一张文字图像;
根据所述文字图像集合确定第一参考字库,所述第一参考字库属于预设参考字库集合;
根据所述文字图像集合中的文字图像以及所述第一参考字库确定目标笔画轨迹数据,所述目标笔画轨迹数据用于表征所述文字图像的形状特性;
根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据所述目标文字图像生成目标字库。
在一种可能的设计中,所述根据所述文字图像集合确定第一参考字库,包括:
根据所述文字图像集合以及所述预设参考字库集合确定对应的参考文字图像集合;
根据所述参考文字图像集合以及所述预设参考字库集合确定参考笔画骨架数据集 合,所述预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系;
根据所述文字图像集合以及所述参考笔画骨架数据集合确定所述第一参考字库。
在一种可能的设计中,所述根据所述文字图像集合中的文字图像以及所述第一参考字库确定目标笔画轨迹数据,包括:
根据所述文字图像以及第一预设图像处理算法确定骨架数据,所述骨架数据包括特征点集;
根据预设提取算法,将所述特征点集与所述参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据;
根据所述笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
在一种可能的设计中,所述根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,包括:
根据所述目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据,所述目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据;
根据所述目标笔画轨迹数据确定目标笔画细节数据,所述目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据;
根据所述目标笔画轨迹数据以及所述第一参考字库确定目标笔画连笔概率数据;
根据所述目标笔画风格数据以及所述第一参考字库确定目标笔画位置数据;
根据所述目标笔画细节数据以及所述目标笔画位置数据确定目标笔画闭合轮廓路径;
根据所述目标笔画闭合轮廓路径以及预设填充算法确定单一笔画图像;
根据所述单一笔画图像以及所述目标笔画连笔概率数据确定目标笔画图像;
根据所述目标笔画图像以及预设叠加方式确定所述目标文字图像。
在一种可能的设计中,所述根据所述目标文字图像生成目标字库,包括:
根据所述目标文字图像以及第二预设图像处理算法确定修正文字图像;
基于预设矢量算法,根据所述修正文字图像以及所述文字图像集合生成目标字库。
第二方面,本申请提供一种字库生成装置,包括:
获取模块,用于获取文字图像集合,所述文字图像集合包括至少一张文字图像;
第一处理模块,用于根据所述文字图像集合确定第一参考字库,所述第一参考字库属于预设参考字库集合;
第二处理模块,用于根据所述文字图像集合中的文字图像以及所述第一参考字库 确定目标笔画轨迹数据,所述目标笔画轨迹数据用于表征所述文字图像的形状特性;
第三处理模块,用于根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据所述目标文字图像生成目标字库。
在一种可能的设计中,所述第一处理模块,具体用于:
根据所述文字图像集合以及所述预设参考字库集合确定对应的参考文字图像集合;
根据所述参考文字图像集合以及所述预设参考字库集合确定参考笔画骨架数据集合,所述预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系;
根据所述文字图像集合以及所述参考笔画骨架数据集合确定所述第一参考字库。
在一种可能的设计中,所述第二处理模块,具体用于:
根据所述文字图像以及第一预设图像处理算法确定骨架数据,所述骨架数据包括特征点集;
根据预设提取算法,将所述特征点集与所述参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据;
根据所述笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
在一种可能的设计中,所述第三处理模块,具体用于:
根据所述目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据,所述目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据;
根据所述目标笔画轨迹数据确定目标笔画细节数据,所述目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据;
根据所述目标笔画轨迹数据以及所述第一参考字库确定目标笔画连笔概率数据;
根据所述目标笔画风格数据以及所述第一参考字库确定目标笔画位置数据;
根据所述目标笔画细节数据以及所述目标笔画位置数据确定目标笔画闭合轮廓路径;
根据所述目标笔画闭合轮廓路径以及预设填充算法确定单一笔画图像;
根据所述单一笔画图像以及所述目标笔画连笔概率数据确定目标笔画图像;
根据所述目标笔画图像以及预设叠加方式确定所述目标文字图像。
在一种可能的设计中,所述第三处理模块,具体用于:
根据所述目标文字图像以及第二预设图像处理算法确定修正文字图像;
基于预设矢量算法,根据所述修正文字图像以及所述文字图像集合生成目标字库。
第三方面,本申请提供一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行第一方面及可选的方案涉及的字库生成方法。
第四方面,本申请提供一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行第一方面及可选的方案涉及的字库生成方法。
本申请提供的字库生成方法、装置、电子设备及存储介质,首先获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,然后根据所获取的文字图像确定第一参考字库,其中,第一参考字库属于预设参考字库集合,再根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据,所确定的目标笔画轨迹数据可以表征文字图像的形状特征,最后根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,并根据所确定的目标文字图像生成目标字库,从而,能够通过文字图像实现整套字库的自动生成,字库生成过程简洁,提高了字库制作效率,减少了制作成本。并且,所生成字库中的文字能够保持原始文字的书写风格,字库质量较高。
附图说明
图1为本申请实施例提供的字库生成方法的一种应用场景示意图;
图2为本申请实施例提供的一种字库生成方法的流程示意图;
图3为本申请实施例提供的一种确定第一参考字库的流程示意图;
图4为本申请实施例提供的一种确定目标笔画轨迹数据的流程示意图;
图5为本申请实施例提供的一种目标笔画轨迹数据的示意图;
图6为本实施例提供的一种确定目标文字图像的流程示意图;
图7为本申请实施例提供的一种生成目标字库的流程示意图;
图8为本申请实施例提供的一种标准字库与目标字库相同文字图像的示意图;
图9为本申请实施例提供的一种字库生成装置的结构示意图;
图10为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅 是与如所附权利要求书中所详述的、本申请的一些方面相一致的方法和装置的例子。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
随着通信技术的飞速发展,智能终端的普遍使用,人们的工作和生活中都会接触到各种各样的字库,使得对于各种字库的需求日益增长。然而,现有技术中,一套字库的制作流程需要耗费巨大的人力和物力,尤其是像中文、日文等字符数量众多的字库,其制作流程更是复杂以及耗费时间。不但需要较多数量的基准字,其制作周期长,制作效率低下。此外,字库的制作过程依赖于人工,尤其对于具有例如连笔风格的基准字,所制备的字库不能精确地保持文字风格,字库质量欠佳。
针对现有技术中的上述问题,本申请提供一种字库生成方法、装置、电子设备及存储介质,通过首先获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,然后根据所获取的文字图像确定第一参考字库,其中,第一参考字库属于预设参考字库集合,再根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据,所确定的目标笔画轨迹数据可以表征文字图像的形状特征,最后根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,并根据所确定的目标文字图像生成目标字库,从而,能够通过至少一张文字图像实现整套字库的自动生成,字库生成过程简洁,提高了字库制作效率,减少了制作成本,并且,所生成的字库能够保持原始文字的书写风格,字库质量较高。
下面以具体地实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图1为本申请实施例提供的字库生成方法的一种应用场景示意图。如图1所示,本申请提供的字库生成方法由电子设备执行,其中,电子设备可以是手机、计算机、平板电脑或笔记本电脑等,图1中以计算机1为例示出。本申请提供的字库生成方法可以通过至少一张文字图像实现整套字库的自动生成,所生成的字库能够保持原文字的书写风格。本申请提供的字库生成方法可以应用于任意文字风格的字库制作。
首先获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,参照图1所示,例如文字图像中的文字为汉字“密”,所获取的文字图像集合中包括有这张文字图像2,然后根据文字图像集合确定第一参考字库,再根据文字图像集合中的文字图像2以及第一参考字库确定目标笔画轨迹数据,目标笔画轨迹数据可以表征文字图像的形状特性,最后根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,并根据目标文字图像生成目标字库,从而,通过文字图像实现整套字库的自动生成,所生成的字库能够保持原文字图像的文字风格。参照图1,例如目标字库中的一个文字图像3为汉字“岢”,汉字“岢”保持了汉字“密”中的部件“山”的文字风格。值得说明的是,图1中仅示出了通过本申请提供的字库生成方法所生成的字库中的一个文字图像。
图2为本申请实施例提供的一种字库生成方法的流程示意图。如图2所示,本实施例提供的字库生成方法可以由电子设备执行,该方法包括:
S21:获取文字图像集合,文字图像集合包括至少一张文字图像。
获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,可以理解为,书写至少一个文字,对所书写的文字可以进行拍照或扫描得到对应的文字图像,至少一张文字图像构成文字图像集合。参照图1中的文字图像2,该文字图像2通过对所书写的汉字“密”进行拍照或扫描得到。
S22:根据文字图像集合确定第一参考字库,第一参考字库属于预设参考字库集合。
根据文字图像集合确定第一参考字库,其中,第一参考字库属于预设参考字库集合,可以理解为,在获得文字图像集合之后,从预设参考字库集合中根据文字图像集合确定出最优参考字库,将最优参考字库定义为第一参考字库。值得被理解的是,最优参考字库则为在预设参考字库集合的多个预设参考字库中与文字图像集合中的所有文字图像最为匹配的参考字库。
一种可能的设计中,根据文字图像集合确定第一参考字库的实现方式如图3所示,图3为本申请实施例提供的一种确定第一参考字库的流程示意图,该实现方式包括:
S221:根据文字图像集合以及预设参考字库集合确定对应的参考文字图像集合。
文字图像集合中包括有至少一张文字图像,从预设参考字库集合的每个预设参考字库中识别出文字图像集合中的每张文字图像,所识别出的存在于预设参考字库集合中的文字图像构成参考文字图像集合。
例如,在预设参考字库集合根据统一码(Unicode)中对文字图像集合中的所有文字图像进行识别,将所识别出统一码一致的文字图像构成参考文字图像集合,其中, 每个预设参考字库中都包含有文字图像集合中的所有文字图像。
S222:根据参考文字图像集合以及预设参考字库集合确定参考笔画骨架数据集合。
其中,预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系。
预设参考字库可以离线进行构建,多个预设参考字库构成预设参考字库集合,其中,每个预设参考字库均包含有参考文字图像与参考笔画骨架数据之间的映射关系,换言之,预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系,映射关系是指预设参考字库中的每个文字图像与各自字形的笔画骨架数据之间对应的关系。故而,可以理解的是,当参考文字图像被确定之后,根据所确定的参考文字图像与预设参考字库则可以确定参考笔画骨架数据,每个参考文字图像都存在对应的参考笔画骨架数据,那么,参考文字图像集合则存在对应的参考笔画骨架数据集合。值得理解的是,参考笔画骨架数据为参考文字图像中的文字的笔画骨架数据。
S223:根据文字图像集合以及参考笔画骨架数据集合确定第一参考字库。
在确定了参考笔画骨架数据集合之后,根据文字图像集合中的每个文字图像以及对应的参考笔画骨架数据确定第一参考字库,其中,可以采用特征比对运算,例如,采用弹性网格算法,基于参考笔画骨架数据计算每个文字图像中与参考文字图像之间的差异值,综合计算每个预设参考字库中所涉及的所有参考文字图像与对应的文字图像之间的差异值,筛选出最小差异值对应的预设参考字库,所筛选出的预设参考字库则为与文字图像集合中的所有文字图像最为匹配的参考字库,即为最优参考字库,将其定义为第一参考字库。
值得说明的是,本申请实施例提供的最小差异值对应的预设参考字库的数量仅为一个,则最小差异值对应的预设参考字库即为第一参考字库。
本实施例提供的确定最优参考字库,即确定第一参考字库的方式,首先通过文字图像集合以及预设参考字库集合确定与文字图像集合对应的参考文字图像集合,因预设参考字库集合中包括每个参考文字图像与参考笔画骨架数据之间的映射关系,故,根据参考文字图像集合以及预设参考字库集合可以确定参考笔画骨架数据集合,再对文字图像集合以及参考笔画骨架数据集合采用特征比对算法的计算,例如弹性网格算法,从而确定出第一参考字库。本实施例提供的确定第一参考字库的方法,可以从预设参考字库集合中确定出与文字图像集合最为匹配的字库作为参考字库,实现参考字库的精准匹配,有利于提高目标字库的质量。
S23:根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据。
其中,目标笔画轨迹数据用于表征文字图像的形状特性。
在确定了第一参考字库之后,根据文字图像集合中的每个文字图像以及第一参考字库确定目标笔画轨迹数据,其中,目标笔画轨迹数据可以表征文字图像集合中每个文字图像的形状特性。
值得被理解的是,笔画是构成文字的基本元素,故,目标笔画轨迹数据可以理解为准确地表征文字图像集合中的每个文字图像的每个笔画的一系列数据,例如,文字图像的每个笔画的起点、终点、拐点以及各个点在整个字形中的位置等数据,从而可以表征文字图像的形状特性。
另外,第一参考字库包括参考文字图像与参考笔画骨架数据之间的映射关系,因而,通过文字图像集合中的文字图像以及第一参考字库可以确定目标笔画轨迹数据,所确定的目标笔画轨迹数据可以表征文字图像的形状特性。
值得说明的是,目标笔画轨迹数据是针对构成文字图像的所有笔画而言。
一种可能的设计中,确定目标笔画轨迹数据的实现方式如图4所示,图4为本申请实施例提供的一种确定目标笔画轨迹数据的流程示意图,该实现方式包括:
S231:根据文字图像以及第一预设图像处理算法确定骨架数据。
其中,骨架数据包括特征点集。
对文字图像集合中的文字图像采用预设图像处理算法进行处理,以确定文字图像中的文字的骨架数据。例如,对文字图像采用图像细化处理算法进行处理,则可以获得文字图像中文字的骨架数据。
可以理解的是,骨架数据包括构成骨架数据的多个数据,若将每个数据称之为特征点,则特征点集构成了骨架数据,换言之,骨架数据包括特征点集。
S232:根据预设提取算法,将特征点集与参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据。
在确定了文字图像的骨架数据,即特征点集之后,采用预设提取算法,将特征点集与参考笔画骨架数据集合进行点集匹配,获得笔画轨迹数据,可以理解的是,所获得的笔画轨迹数据是文字图像集合中的文字图像的笔画轨迹数据。
例如可以采用一致性点集漂移算法(Coherent Point Drift,简称CPD),对特征点集与参考笔画骨架数据集合进行非刚性点集注册,所获得的点集注册结果则为笔画轨迹数据。
值得说明的是,笔画轨迹数据是针对构成文字图像的所有笔画而言。
S233:根据笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
在上述确定出文字图像的笔画轨迹数据之后,通过预设过滤算法对笔画轨迹数据进行过滤,以滤除步骤S232中所确定的匹配结果较差笔画轨迹数据。可以理解的是,在步骤S232中,采用预设提取算法对特征点集与参考笔画骨架数据集合进行匹配,所确定的文字图像的笔画轨迹数据中可以包含笔画的起点、终点、拐点以及各个点在字形中的位置等数据,因此,需要滤除掉匹配较差的数据。
例如,采用的预设过滤算法的具体过程可以是,首先根据步骤S232中确定的笔画轨迹数据通过图像的膨胀处理,重现文字图像,然后将重现文字图像与文字图像集合中对应的文字图像进行图像比对,计算出两者对比之后的差异值,根据差异值,从笔画轨迹数据中确定出目标笔画轨迹数据。具体地,可以将所计算得到的差异值进行升序的排序,然后指定阈值进行截取,例如,阈值设置为70%,则30%的差异值对应的笔画轨迹数据被认为是所确定的匹配较差的数据,故将其过滤,从而确定出匹配较好的笔画轨迹数据,将其作为目标笔画轨迹数据。
值得说明的是,目标笔画轨迹数据是针对构成文字图像的所有笔画而言,如图5所示,图5为本申请实施例提供的一种目标笔画轨迹数据的示意图,可以理解的是,目标笔画轨迹数据的表现形式可以是矩阵、图形等,其中,图形是一种更加形象化的表现形式,图5中以汉字“啊”为例示出了该字形的目标笔画轨迹数据。
本实施例提供的确定目标笔画轨迹数据的方式,通过文字图像以及第一预设图像处理算法首先确定骨架数据,其中,骨架数据包括特征点集,然后根据预设提取算法,将特征点集与参考笔画骨架数据集合进行匹配,确定笔画轨迹数据,最后通过预设过滤算法从笔画轨迹数据中确定出目标笔画轨迹数据,以提高后续通过预设训练模型进行数据训练时所采用的数据的准确度,有利于目标文字图像保持文字图像集合中文字图像的书写风格。
S24:根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据目标文字图像生成目标字库。
在确定了目标笔画轨迹数据之后,对目标笔画轨迹数据采用预设处理算法进行运算可以确定目标文字图像,再由所确定的目标文字图像生成目标字库。可以理解的是,目标笔画轨迹数据是文字图像集合中文字图像的笔画轨迹数据,因此,对目标笔画轨迹数据采用一定的算法运算则能够确定文字图像对应的目标文字图像,当目标文字图像确定之后,则可以根据目标文字图像生成目标字库。
可以理解的是,目标字库中包括每个独立的目标文字图像。
一种可能的设计中,根据目标笔画轨迹数据以及预设处理算法确定目标文字图像 的实现方式如图6所示,图6为本实施例提供的一种确定目标文字图像的流程示意图,该实现方式包括:
S241:根据目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据。
其中,目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据。
采用预设训练模型对目标笔画轨迹数据进行训练以确定目标笔画风格数据,目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据。
为了在采用预设训练模型训练数据的过程中获得描述文字图像更为准确的数据,预设训练模型可以针对描述目标文字图像的笔画轨迹信息和笔画重心信息分别采用两个模型进行数据训练。可以理解的是,两个模型的实质相同,不同的是训练模型的输入和输出数据。例如,预设训练模型都可以采用人工神经网络,针对描述笔画轨迹信息的输入和输出数据为笔画点坐标数据,针对描述笔画重心信息的输入和输出数据为笔画重心坐标数据。值得被理解的是,笔画点坐标数据为表征笔画上特征点的坐标数据,笔画重心坐标数据为表征笔画重心位置的坐标数据。
值得说明的是,在进行数据训练之前,首先对目标笔画轨迹数据以及参考笔画骨架数据集合中对应的参考笔画骨架数据均进行格式化处理,以得到目标笔画点坐标数据与对应的参考笔画点坐标数据,以及目标笔画重心坐标数据与对应的参考笔画重心坐标数据。
采用预设训练模型进行数据训练具体为:
针对描述笔画轨迹信息的预设训练模型而言,对文字图像以及参考文字图像各自对应的目标笔画点坐标数据以及参考笔画点坐标数据均匀提取相同数量的采样点,并进行数值归一化,计算相对应的目标笔画点坐标数据与参考笔画点坐标数据之间的差值,将该差值作为预设训练模型的输出,其输入为对应的参考笔画点坐标数据经归一化后的数据。
针对描述笔画重心信息的预设训练模型而言,计算相对应的目标笔画重心坐标数据与对应的参考笔画重心坐标数据各自归一化后的差值,将其差值作为预设训练模型的输出,其输入为对应的参考笔画重心坐标数据。
并将步骤S23确定的目标笔画轨迹数据与对应的参考笔画骨架数据作为上述两个预设训练模型的训练数据,则能够分别得到目标笔画坐标数据与目标笔画重心数据,其中目标笔画坐标数据为描述笔画轨迹信息的预设训练模型所得,目标笔画重心数据为描述笔画重心信息的预设训练模型所得。目标笔画坐标数据以及目标笔画重心数据共同确定了目标笔画风格数据,以对文字图像的整体书写风格进行准确描述。
S242:根据目标笔画轨迹数据确定目标笔画细节数据。
其中,目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据。
目标笔画细节数据可以理解为是表征笔画的细节信息的数据,例如笔画的宽度信息、笔画端部的轮廓信息,因此,目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据。目标笔画轨迹数据可以表征文字图像的形状特性,如图5所示,可见,对笔画骨架数据进行笔画宽度的扩充以及笔画端部轮廓的修饰则能够更进一步准确地表征文字图像的形状特性。
例如,目标笔画宽度数据,即笔画宽度值,可以确定为笔画起点或终点至笔画轮廓上的最大距离的两倍,而笔画起点以及终点的数据均来自于目标笔画轨迹数据,故,根据目标笔画轨迹数据确定了目标笔画宽度数据。再者,从起点或终点至最接近一侧的笔画轮廓均以发射一定数量的射线,便可计算出起点或终点至笔画轮廓的距离,进而能够确定起点或终点区域内的笔画轮廓形状。并且,在离线阶段可以对文字所涉及的所有笔画进行精确分类,例如中文为339类,日文为358类,则可计算出每一类笔画在上述表征笔画轮廓形状的数据中的平均值,所获得的平均值则为目标笔画端部轮廓特征数据。目标笔画宽度数据以及目标笔画端部轮廓特征数据确定了目标笔画细节数据。
S243:根据目标笔画轨迹数据以及第一参考字库确定目标笔画连笔概率数据。
可以理解的是,在离线阶段,可以对第一参考字库中参考文字图像的部件进行精确分类,例如中文为1777类,日文为2075类。一个类别就是表示一个部件,为了描述部件内部相邻笔画的连笔特性,需要对每一个分类也即是每一个部件内部相邻笔画的连笔概率进行计算,例如对于中文1777个类别,每一个类别表示该类别内从第i个笔画终点到第i+1个笔画的起点之间的连笔概率,从而通过统计分析,得出目标笔画所处的部件内,该笔画的起点以及终点分别与相邻的前一个笔画的终点以及相邻的后一个笔画的起点之间的连笔概率,则表征连笔概率的数据为目标笔画连笔概率数据。
S244:根据目标笔画风格数据以及第一参考字库确定目标笔画位置数据。
将步骤S241中确定的目标笔画风格数据与第一参考字库中对应的参考笔画骨架数据进行拟合,拟合结果为目标笔画位置数据,以表征文字图像的每个笔画在整个字形中的位置信息。
可以理解的是,因目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据,故,目标笔画坐标数据与参考笔画点坐标数据进行拟合,类似地,目标笔画重心数据与参考笔画重心坐标数据进行拟合。将两者拟合结果确定为目标笔画位置数据。
S245:根据目标笔画细节数据以及目标笔画位置数据确定目标笔画闭合轮廓路径。
目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据,对两类数据分别进行运算,能够确定目标笔画闭合轮廓路径。
具体地,首先通过文字-部件-部件内笔画顺序的对应关系,能够确定文字图像的笔画顺序,按照所确定的笔画顺可以恢复笔画轮廓信息。然后,基于目标笔画端部轮廓特征数据,以及目标笔画位置数据所表征的起点和终点的位置作为中心点,在180°的范围内,平均发射一定数量的射线,其中,射线的长度为当前笔画种类的笔画端部宽度,射线的终点为最终轮廓点,将笔画中断均分为一定的段数,以左右90°方向各取一条射线,所取射线的长度为当前笔画中段某个段数的宽度,该射线的终点依然为轮廓点,将所有轮廓点按预设的一定顺序连接,则能够得到完整的笔画闭合轮廓路径。
S246:根据目标笔画闭合轮廓路径以及预设填充算法确定单一笔画图像。
在确定了目标笔画闭合轮廓路径之后,采用预设填充算法对目标笔画闭合轮廓路径进行填充,即可得到每个单一的笔画图像。其中,预设填充算法可以为缠绕填充算法(Winding Fill)。
S247:根据单一笔画图像以及目标笔画连笔概率数据确定目标笔画图像。
在确定每个单一笔画图像之后,则可以将每个单一笔画图像按照一定的规则进行处理,以得到目标笔画图像。
例如,可以按照文字-部件-部件内笔画顺序的对应关系,基于目标笔画连笔概率数据,对部件内部相邻的需要连接的两两笔画之间进行平滑连接,以得到目标笔画图像。
值得说明的是,目标笔画连笔概率数据是基于目标笔画轨迹数据所确定,其考虑了文字图像中文字的书写习惯,减少了无意义的连笔情况,故而,根据单一笔画图像以及目标笔画连笔概率数据所确定的目标笔画图像保持了原始所书写的文字图像中文字的文字风格。
S248:根据目标笔画图像以及预设叠加方式确定目标文字图像。
在确定了目标笔画图像之后,采用预设叠加方式对所确定的目标笔画图像进行一次叠加,则能够得到目标文字的整个字形,即确定目标文字图像。其中,预设叠加方式可以是任意可以进行图片叠加的方式,对此,本申请实施例不作限定。
可以理解的是,在进行目标笔画图像叠加时,针对同一个目标文字图像的所有目标笔画图像进行叠加。
本实施例提供的确定目标文字图像的方式,首先根据目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据,以及根据目标笔画轨迹数据确定目标笔画细节数据,进而确定目标笔画连笔概率数据以及目标笔画位置数据,以及目标笔画闭合轮廓路径,采用预设填充算法对目标笔画闭合轮廓路径进行填充以确定单一笔画图像,再结合目标笔画连笔概率数据确定目标笔画图像,对其通过预设叠加方式进行叠加,最终确定目标文字图像,使得所确定的目标文字图像能够保持原始文字图像的文字风格。
可以理解的是,通过图6所示实施例中确定目标文字图像的实现方式可以确定构成整套目标字库的所有目标文字图像,当确定了所有的目标文字图像之后,根据目标文字图像生成目标字库的一种可能的实现方式是将所有目标文字图像直接存储至一套字库中,该套字库即为目标字库,所得到的目标字库与文字图像集合中相同的部件具有相同的文字风格。
由目标文字图像生成目标字库的另一种可能的实现方式如图7所示,图7为本申请实施例提供的一种生成目标字库的流程示意图,该实现方式包括:
S71:根据目标文字图像以及第二预设图像处理算法确定修正文字图像。
对目标文字图像采用第二预设图像处理算法进行处理,使得目标文字图像的笔画宽度与文字图像集合中的文字图像的笔画宽度更为接近的修正文字图像。其中,第二预设图像处理算法可以是图像腐蚀和/或图像膨胀处理。
例如,可以采用差异值来评价修正文字图像与文字图像集合中文字图像的相同笔画的宽度,本领域技术人员可以根据实现需求确定差异值的阈值,以控制第二预设图像处理算法对目标文字图像的处理程度,从而确定修正文字图像。
S72:基于预设矢量算法,根据修正文字图像以及文字图像集合生成目标字库。
在确定修正文字图像之后,对修正文字图像以及文字图像集合中的文字图像采用预设矢量算法运算,得到构成目标字库的最终的目标文字图像。在确定了所有最终的目标文字图像之后,所有最终的目标文字图像构成目标字库。
例如,可以采用字形轮廓矢量化,对修正文字图像以及文字图像集合中的文字图像一起进行矢量化,并按照矢量字库的标准格式生成最终的目标文字图像,完成所有最终的目标文字图像的矢量化,从而构成目标字库。例如,如图8所示,图8为本申请实施例提供的一种标准字库与目标字库相同文字图像的示意图,标准字库4中的文字图像为根据现有技术所制备,目标字库5中的文字图像为根据本实施例提供的字库生成方法所制备,两者均为矢量字库。
可以理解的是,目标字库中包括每个独立的最终的目标文字图像。
本实施例提供的字库生成方法,通过获取文字图像集合,所获取的文字图像集合中包括至少一张文字图像,然后根据所获取的文字图像集合确定第一参考字库,第一参考字库数据预设参考字库集合中的一个字库,在确定了第一参考字库之后,再根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据,目标笔画轨迹数据能够表征文字图像的形状特性,最后根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,并根据目标文字图像生成目标字库。能够通过文字图像实现整体字库的自动生成。与现有技术相比,因生成过程简洁,从而提高了字库制作效率,减少了制作成本。并且,本实施例提供的字库生成方法能够较为精确地保持文字图像集合中的文字图像风格,提高了字库质量。
图9为本申请实施例提供的一种字库生成装置的结构示意图。本实施例提供的字库生成装置,用于执行上述各实施例提供的字库生成方法,如图9所示,本实施例提供的字库生成装置100,包括:
获取模块101,用于获取文字图像集合,文字图像集合包括至少一张文字图像。
第一处理模块102,用于根据文字图像集合确定第一参考字库,第一参考字库属于预设参考字库集合。
第二处理模块103,用于根据文字图像集合中的文字图像以及第一参考字库确定目标笔画轨迹数据,目标笔画轨迹数据用于表征文字图像的形状特性。
第三处理模块104,用于根据目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据目标文字图像生成目标字库。
本实施例提供的字库生成装置与上述图2的方法实施例的实现原理以及效果类似,在此不作赘述。
一种可能的设计中,第一处理模块102,具体用于:
根据文字图像集合以及预设参考字库集合确定对应的参考文字图像集合;
根据参考文字图像集合以及预设参考字库集合确定参考笔画骨架数据集合,预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系;
根据文字图像集合以及参考笔画骨架数据集合确定第一参考字库。
本实施例与上述图3的方法实施例的实现原理以及效果类似,在此不作赘述。
一种可能的设计中,第二处理模块103,具体用于:
根据文字图像以及第一预设图像处理算法确定骨架数据,骨架数据包括特征点集;
根据预设提取算法,将特征点集与参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据;
根据笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
本实施例与上述图4的方法实施例的实现原理以及效果类似,在此不作赘述。
一种可能的设计中,第三处理模块104,具体用于:
根据目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据,目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据;
根据目标笔画轨迹数据确定目标笔画细节数据,目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据;
根据目标笔画轨迹数据以及第一参考字库确定目标笔画连笔概率数据;
根据目标笔画风格数据以及第一参考字库确定目标笔画位置数据;
根据目标笔画细节数据以及目标笔画位置数据确定目标笔画闭合轮廓路径;
根据目标笔画闭合轮廓路径以及预设填充算法确定单一笔画图像;
根据单一笔画图像以及目标笔画连笔概率数据确定目标笔画图像;
根据目标笔画图像以及预设叠加方式确定目标文字图像。
本实施例与上述图6的方法实施例的实现原理以及效果类似,在此不作赘述。
一种可能的设计中,第三处理模块104,还具体用于:
根据目标文字图像以及第二预设图像处理算法确定修正文字图像;
基于预设矢量算法,根据修正文字图像以及文字图像集合生成目标字库。
本实施例与上述图7的方法实施例的实现原理以及效果类似,在此不作赘述。
图10为本申请实施例提供的一种电子设备的结构示意图。如图10所示,本实施例提供的电子设备800包括:
至少一个处理器801;以及
与至少一个处理器801通信连接的存储器802;其中,
存储器802存储有可被至少一个处理器801执行的指令,该指令被至少一个处理器801执行,以使至少一个处理器801能够执行上述的字库生成方法的各个步骤,具体可以参考前述方法实施例中的相关描述。
在示例性实施例中,本申请实施例提供了一种存储有计算机指令的非瞬时计算机可读存储介质,计算机指令用于使计算机执行上述各实施例中字库生成方法的各个步骤。例如,可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、 用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求书指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求书来限制。

Claims (10)

  1. 一种字库生成方法,其特征在于,包括:
    获取文字图像集合,所述文字图像集合包括至少一张文字图像;
    根据所述文字图像集合确定第一参考字库,所述第一参考字库属于预设参考字库集合;
    根据所述文字图像集合中的文字图像以及所述第一参考字库确定目标笔画轨迹数据,所述目标笔画轨迹数据用于表征所述文字图像的形状特性;
    根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据所述目标文字图像生成目标字库。
  2. 根据权利要求1所述的字库生成方法,其特征在于,所述根据所述文字图像集合确定第一参考字库,包括:
    根据所述文字图像集合以及所述预设参考字库集合确定对应的参考文字图像集合;
    根据所述参考文字图像集合以及所述预设参考字库集合确定参考笔画骨架数据集合,所述预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系;
    根据所述文字图像集合以及所述参考笔画骨架数据集合确定所述第一参考字库。
  3. 根据权利要求1或2所述的字库生成方法,其特征在于,所述根据所述文字图像集合中的文字图像以及所述第一参考字库确定目标笔画轨迹数据,包括:
    根据所述文字图像以及第一预设图像处理算法确定骨架数据,所述骨架数据包括特征点集;
    根据预设提取算法,将所述特征点集与所述参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据;
    根据所述笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
  4. 根据权利要求1-3任意一项所述的字库生成方法,其特征在于,所述根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,包括:
    根据所述目标笔画轨迹数据以及预设训练模型确定目标笔画风格数据,所述目标笔画风格数据包括目标笔画坐标数据以及目标笔画重心数据;
    根据所述目标笔画轨迹数据确定目标笔画细节数据,所述目标笔画细节数据包括目标笔画宽度数据以及目标笔画端部轮廓特征数据;
    根据所述目标笔画轨迹数据以及所述第一参考字库确定目标笔画连笔概率数据;
    根据所述目标笔画风格数据以及所述第一参考字库确定目标笔画位置数据;
    根据所述目标笔画细节数据以及所述目标笔画位置数据确定目标笔画闭合轮廓路径;
    根据所述目标笔画闭合轮廓路径以及预设填充算法确定单一笔画图像;
    根据所述单一笔画图像以及所述目标笔画连笔概率数据确定目标笔画图像;
    根据所述目标笔画图像以及预设叠加方式确定所述目标文字图像。
  5. 根据权利要求4所述的字库生成方法,其特征在于,所述根据所述目标文字图像生成目标字库,包括:
    根据所述目标文字图像以及第二预设图像处理算法确定修正文字图像;
    基于预设矢量算法,根据所述修正文字图像以及所述文字图像集合生成目标字库。
  6. 一种字库生成装置,其特征在于,包括:
    获取模块,用于获取文字图像集合,所述文字图像集合包括至少一张文字图像;
    第一处理模块,用于根据所述文字图像集合确定第一参考字库,所述第一参考字库属于预设参考字库集合;
    第二处理模块,用于根据所述文字图像集合中的文字图像以及所述第一参考字库确定目标笔画轨迹数据,所述目标笔画轨迹数据用于表征所述文字图像的形状特性;
    第三处理模块,用于根据所述目标笔画轨迹数据以及预设处理算法确定目标文字图像,以根据所述目标文字图像生成目标字库。
  7. 根据权利要求6所述的字库生成装置,其特征在于,所述第一处理模块,具体用于:
    根据所述文字图像集合以及所述预设参考字库集合确定对应的参考文字图像集合;
    根据所述参考文字图像集合以及所述预设参考字库集合确定参考笔画骨架数据集合,所述预设参考字库集合包括每个参考文字图像与参考笔画骨架数据之间的映射关系;
    根据所述文字图像集合以及所述参考笔画骨架数据集合确定所述第一参考字库。
  8. 根据权利要求6或7所述的字库生成装置,其特征在于,所述第二处理模块,具体用于:
    根据所述文字图像以及第一预设图像处理算法确定骨架数据,所述骨架数据包括特征点集;
    根据预设提取算法,将所述特征点集与所述参考笔画骨架数据集合进行匹配,以确定笔画轨迹数据;
    根据所述笔画轨迹数据以及预设过滤算法确定目标笔画轨迹数据。
  9. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5中任一项所述的字库生成方法。
  10. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-5中任一项所述的字库生成方法。
PCT/CN2019/119904 2019-10-16 2019-11-21 字库生成方法、装置、电子设备及存储介质 WO2021072905A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910984727.0A CN112669407A (zh) 2019-10-16 2019-10-16 字库生成方法、装置、电子设备及存储介质
CN201910984727.0 2019-10-16

Publications (1)

Publication Number Publication Date
WO2021072905A1 true WO2021072905A1 (zh) 2021-04-22

Family

ID=75400535

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119904 WO2021072905A1 (zh) 2019-10-16 2019-11-21 字库生成方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN112669407A (zh)
WO (1) WO2021072905A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020085A (zh) * 2011-09-26 2013-04-03 兰州海防信息科技有限公司 一种个人风格化书法动态字库的实现方法及其应用
US20130181995A1 (en) * 2010-09-21 2013-07-18 Hewlett-Packard Developement Company, L.P. Handwritten character font library
CN106384094A (zh) * 2016-09-18 2017-02-08 北京大学 一种基于书写风格建模的中文字库自动生成方法
CN109635883A (zh) * 2018-11-19 2019-04-16 北京大学 基于深度堆叠网络的结构信息指导的中文字库生成方法
CN109664300A (zh) * 2019-01-09 2019-04-23 湘潭大学 一种基于力觉学习的机器人多风格书法临摹方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107644006B (zh) * 2017-09-29 2020-04-03 北京大学 一种基于深度神经网络的手写体中文字库自动生成方法
CN109697275A (zh) * 2017-10-20 2019-04-30 北大方正集团有限公司 字库生成方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130181995A1 (en) * 2010-09-21 2013-07-18 Hewlett-Packard Developement Company, L.P. Handwritten character font library
CN103020085A (zh) * 2011-09-26 2013-04-03 兰州海防信息科技有限公司 一种个人风格化书法动态字库的实现方法及其应用
CN106384094A (zh) * 2016-09-18 2017-02-08 北京大学 一种基于书写风格建模的中文字库自动生成方法
CN109635883A (zh) * 2018-11-19 2019-04-16 北京大学 基于深度堆叠网络的结构信息指导的中文字库生成方法
CN109664300A (zh) * 2019-01-09 2019-04-23 湘潭大学 一种基于力觉学习的机器人多风格书法临摹方法

Also Published As

Publication number Publication date
CN112669407A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
CN106384094B (zh) 一种基于书写风格建模的中文字库自动生成方法
CN108921782B (zh) 一种图像处理方法、装置及存储介质
WO2019232853A1 (zh) 中文模型训练、中文图像识别方法、装置、设备及介质
WO2018108129A1 (zh) 用于识别物体类别的方法及装置、电子设备
JP7044898B2 (ja) ナンバープレート認識方法、および、そのシステム
Tursun et al. Mtrnet: A generic scene text eraser
WO2019232843A1 (zh) 手写模型训练、手写图像识别方法、装置、设备及介质
CN110647829A (zh) 一种票据的文本识别方法及系统
Wilkinson et al. Neural Ctrl-F: segmentation-free query-by-string word spotting in handwritten manuscript collections
CN110570481A (zh) 基于风格迁移的书法字库自动修复方法及系统
WO2023072067A1 (zh) 人脸属性编辑模型的训练以及人脸属性编辑方法
WO2019232850A1 (zh) 手写汉字图像识别方法、装置、计算机设备及存储介质
WO2023284608A1 (zh) 字符识别模型生成方法、装置、计算机设备和存储介质
CN103971112A (zh) 图像特征提取方法及装置
US20230008529A1 (en) Gesture stroke recognition in touch-based user interface input
CN112070768A (zh) 基于Anchor-Free的实时实例分割方法
US20220180043A1 (en) Training method for character generation model, character generation method, apparatus and storage medium
US20220130139A1 (en) Image processing method and apparatus, electronic device and storage medium
CN111144407A (zh) 一种目标检测方法、系统、装置及可读存储介质
CN108241861A (zh) 一种数据可视化方法及设备
CN113592881B (zh) 图片指代性分割方法、装置、计算机设备和存储介质
CN110659702A (zh) 基于生成式对抗网络模型书法字帖评价系统及方法
Zhang et al. Structured knowledge distillation for accurate and efficient object detection
CN117496521A (zh) 一种表格关键信息抽取方法、系统、装置及可读存储介质
CN113408418A (zh) 一种书法字体与文字内容同步识别方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19948994

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19948994

Country of ref document: EP

Kind code of ref document: A1