CN111339803B - Font identification method, apparatus, device and computer readable storage medium - Google Patents

Font identification method, apparatus, device and computer readable storage medium Download PDF

Info

Publication number
CN111339803B
CN111339803B CN201811555857.4A CN201811555857A CN111339803B CN 111339803 B CN111339803 B CN 111339803B CN 201811555857 A CN201811555857 A CN 201811555857A CN 111339803 B CN111339803 B CN 111339803B
Authority
CN
China
Prior art keywords
font
image
data
model
module
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.)
Active
Application number
CN201811555857.4A
Other languages
Chinese (zh)
Other versions
CN111339803A (en
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.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
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 New Founder Holdings Development Co ltd, Beijing Founder Electronics Co Ltd filed Critical New Founder Holdings Development Co ltd
Priority to CN201811555857.4A priority Critical patent/CN111339803B/en
Publication of CN111339803A publication Critical patent/CN111339803A/en
Application granted granted Critical
Publication of CN111339803B publication Critical patent/CN111339803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/226Character recognition characterised by the type of writing of cursive writing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Character Discrimination (AREA)

Abstract

The invention provides a font identification method, a font identification device, font identification equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a font image shot by a shooting module; preprocessing the font file; and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image. Therefore, the names of the fonts liked by the user can be rapidly acquired, so that the user downloads and uses the fonts according to the font names, and the user experience is improved.

Description

Font identification method, apparatus, device and computer readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a font identification method, apparatus, device, and computer readable storage medium.
Background
With the explosion of font design, more and more fonts with different styles appear in every corner of society. When a user sees the fonts of the cardiology instrument, the user always knows the names of the fonts so as to acquire and use the fonts later, so that how to know the names of the fonts and the names of the fonts similar to the styles of the fonts in time, and the effect of what is seen is achieved, and the problem to be solved is solved urgently.
The conventional Font recognition algorithm mainly comprises a feature extraction method, wherein shallow features of a Font picture to be recognized are extracted through conventional algorithms such as SIFT, wavelet multi-layer decomposition and the like, then the features are combined according to a certain rule, similarity matching calculation is carried out on the features and a feature library generated by a Font file (TTF for short), and finally a result with the maximum similarity value is selected as the name of the Font to be recognized.
However, due to the fact that the conventional font recognition scheme is adopted, necessary image preprocessing (noise removal, deblurring, inclination correction and the like) is required for the font picture to be recognized, partial font features of the font picture to be recognized can be indirectly lost, recognition accuracy is low, names of fonts which are currently liked by a user cannot be recognized rapidly and accurately, and accordingly user experience is poor.
Disclosure of Invention
The invention provides a font identification method, a font identification device, font identification equipment and a computer readable storage medium, which are used for solving the technical problem that the names of fonts which are currently preferred by users cannot be identified rapidly and accurately due to the fact that necessary image preprocessing is required to be carried out on the font pictures to be identified in the prior art.
A first aspect of the present invention provides a font recognition method, including:
receiving a font image shot by a shooting module;
preprocessing the font file;
and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
Another aspect of the present invention provides a font recognition device, comprising:
the font image receiving module is used for receiving the font image shot by the shooting module;
the preprocessing module is used for preprocessing the font file;
the identification module is used for adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
Still another aspect of the present invention provides a font recognition apparatus, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform a font recognition method as described above by the processor.
Still another aspect of the present invention is to provide a computer-readable storage medium having stored therein computer-executable instructions for implementing a font recognition method as described above when executed by a processor.
The invention provides a font identification method, a device, equipment and a computer readable storage medium, which are used for receiving a font image shot by a shooting module; preprocessing the font file; and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image. Therefore, the names of the fonts liked by the user can be rapidly acquired, so that the user downloads and uses the fonts according to the font names, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a diagram of a network architecture on which the present invention is based;
fig. 2 is a flow chart of a font identification method according to a first embodiment of the present invention;
fig. 3 is a flow chart of a font identification method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a font recognition device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a font identifying device according to a fourth embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments obtained based on the embodiments in the present invention are within the scope of the protection of the present invention.
The conventional Font recognition algorithm mainly comprises a feature extraction method, wherein shallow features of a Font picture to be recognized are extracted through conventional algorithms such as SIFT, wavelet multi-layer decomposition and the like, then the features are combined according to a certain rule, similarity matching calculation is carried out on the features and a feature library generated by a Font file (TTF for short), and finally a result with the maximum similarity value is selected as the name of the Font to be recognized. However, due to the fact that the conventional font recognition scheme is adopted, necessary image preprocessing (noise removal, deblurring, inclination correction and the like) is required for the font picture to be recognized, partial font features of the font picture to be recognized can be indirectly lost, recognition accuracy is low, names of fonts which are currently liked by a user cannot be recognized rapidly and accurately, and accordingly user experience is poor. In order to solve the technical problems, the invention provides a font identification method, a font identification device, font identification equipment and a computer readable storage medium.
It should be noted that the font identification method, apparatus, device and computer readable storage medium provided by the present invention can be applied to any font identification scene.
Fig. 1 is a diagram of a network architecture according to the present invention, and as shown in fig. 1, the network architecture according to the present invention at least includes a font recognition device 1 and a photographing module 2. The font recognition device 1 may be implemented by software and/or hardware, and may be written in C language, java, or the like when implemented in software. The photographing module 2 may be a camera provided in the user terminal or a separate camera or video camera, etc. The font recognition device 1 may be provided in the user terminal or may be a separate device, and accordingly, the photographing module 2 may be provided in the user terminal or may be a separate camera or video camera, etc., and the present invention is not limited thereto. It should be noted that, the font recognition device 1 may communicate with the shooting module 2 in a wired or wireless manner to implement data interaction, specifically, when the font recognition device 1 and the shooting module 2 are both disposed in the user terminal, they may communicate in a wired manner, and when they are not disposed in the same terminal, they may communicate in a wireless manner.
Fig. 2 is a flow chart of a font identification method according to a first embodiment of the present invention, and based on the above embodiment, the method includes:
and step 101, receiving the font image shot by the shooting module.
The execution main body of the embodiment is a font recognition device, and the font recognition device can communicate with the shooting module in a wired or wireless mode to realize data interaction. Specifically, when the user finds a favorite font, the user can shoot the font through a shooting module to obtain a font image of the font, and the font image is sent to the font identification device in a wired or wireless mode. Accordingly, the font recognition device may accept the font image transmitted from the photographing module.
As an implementation manner, the font image may be a screenshot of the font of the centering instrument when the user browses a certain interface through the user terminal, or may be a font image obtained in any other form, and the present invention is not limited herein.
Step 102, preprocessing the font image.
In the present embodiment, in order to improve the accuracy of font recognition, the font recognition device may perform preprocessing on the font image after receiving the font image, and obtain the processed font image.
And step 103, adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
In this embodiment, in order to realize the recognition of the font, a font recognition model may be preset, the font image may be preprocessed, and after the processed font image is obtained, the processed font image may be added to the font recognition model, so as to realize the recognition of the font of the user cardiometer, and obtain the name of the font. Accordingly, after the name of the font is obtained, the name of the font can be displayed on a display screen of the user terminal, and then the user can download, use and other operations on the font according to the name of the font.
It can be understood that after the preprocessed font image is obtained, on the one hand, the recognition of the font can be implemented by using a preset font recognition model as in the above embodiment, and in addition, the recognition of the font can also be implemented by using any other recognition method, which is not limited herein.
According to the font identification method provided by the embodiment, the font image shot by the shooting module is received; preprocessing the font file; and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image. Therefore, the names of the fonts liked by the user can be rapidly acquired, so that the user downloads and uses the fonts according to the font names, and the user experience is improved.
Further, on the basis of any one of the foregoing embodiments, the method further includes:
receiving a font image shot by a shooting module;
preprocessing the font image;
training a preset model to be trained through preset font data to be trained to obtain a preset font identification model;
and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
In this embodiment, in order to realize the recognition of the font, a font recognition model may be preset, the font image may be preprocessed, after the processed font image is obtained, the processed font image may be added to the font recognition model, so as to realize the recognition of the font of the user cardiometer, and obtain the name of the font. Specifically, in order to acquire a font recognition model, a to-be-processed model needs to be established first, a convolutional neural network mainly comprises a data layer, a convolutional layer, an activation layer, a pooling layer, a full-connection layer, a classification layer and the like, different layers are combined and connected according to recognition purposes and required precision, and finally a to-be-processed model with proper width is designed. Specifically, a data layer is firstly established, the sizes of all input pictures are converted into m×m, then, the admission blocks are sequentially designed, each admission block comprises a convolution layer, an activation layer, a normalization layer, a pooling layer and the like, finally, a full-connection layer is designed, N results are output, and the results are arranged in sequence from large to small. And adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
According to the font identification method, the preset model to be trained is trained through the preset font data to be trained, and the preset font identification model is obtained, so that a foundation is provided for subsequent font identification, and user experience can be improved.
Fig. 3 is a flow chart of a font identification method according to a second embodiment of the present invention, where on the basis of any one of the above embodiments, the method includes:
step 201, receiving a font image shot by a shooting module;
step 202, preprocessing the font image;
step 203, obtaining preset data to be processed, wherein the data to be processed is a black-and-white font image;
step 204, the data to be processed are randomly rendered into color image data;
step 205, dividing the color image data into a test set and a training set randomly;
step 206, marking the color image data in the test set and the training set respectively to obtain the font data to be trained;
step 207, training a preset model to be trained through preset font data to be trained to obtain the preset font identification model;
step 208, adding the preprocessed font image to a preset font recognition model to obtain a font name corresponding to the font image.
In this embodiment, in order to achieve training of the model to be trained, font data to be trained should be acquired first. Specifically, preset data to be processed is obtained, the data to be processed is a black-and-white font image, for example, the data to be processed can be a square home font library n-style ttf file to generate a single-character single-image black-and-white image. Further, in order to improve the recognition accuracy of the model, data augmentation may be performed on the data to be processed. The black and white image may be randomly rendered as a colored RGB image. Further, the color image data are randomly divided into a training set and a testing set, and the training set and the testing set are marked to obtain data to be trained. Therefore, the model to be trained can be trained according to the data to be trained in the training set, and the font recognition model is finally obtained through testing the data in the data to be trained in the testing set. Therefore, the font image currently shot by the shooting module can be identified according to the font identification model, and the name of the font is obtained. Accordingly, after the name of the font is obtained, the name of the font can be displayed on a display screen of the user terminal, and then the user can download, use and other operations on the font according to the name of the font.
According to the font identification method provided by the embodiment, the preset data to be processed is acquired, and the data to be processed is a black-and-white font image; randomly rendering the data to be processed into color image data; randomly dividing the color image data into a test set and a training set; and marking the color image data in the test set and the training set respectively to obtain the font data to be trained, so that the recognition accuracy of the model can be improved, and the user experience is further improved.
Further, on the basis of any one of the above embodiments, the method includes:
receiving a font image shot by a shooting module;
preprocessing the font image;
acquiring preset data to be processed, wherein the data to be processed is a black-and-white font image;
randomly rendering the data to be processed into color image data;
randomly dividing the color image data into a test set and a training set;
adding random noise and random ambiguity in the test set and the training set;
labeling the font names of the color image data aiming at each color image data in the test set and the training set;
training a preset model to be trained through preset font data to be trained to obtain a preset font identification model;
and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
In this embodiment, after the color image data is randomly divided into the training set and the testing set, the training set and the testing set need to be labeled to obtain the data to be trained. Specifically, interference processing such as random blurring and random noise can be added to data to be trained in a training set and a testing set, and in addition, in order to enable a font recognition model to accurately realize font recognition, font names need to be marked on the data in the testing set and the training set. Specifically, for each color image data in the test set and the training set, a font name of the color image data is noted.
According to the font identification method provided by the embodiment, random noise and random blurring are added in the test set and the training set; and labeling the font names of the color image data aiming at each color image data in the test set and the training set, so that the font identification model can accurately identify the fonts, and the user experience is improved.
Further, on the basis of any one of the above embodiments, the method includes:
receiving a font image shot by a shooting module;
preprocessing the font image;
acquiring preset data to be processed, wherein the data to be processed is a black-and-white font image;
randomly rendering the data to be processed into color image data;
randomly dividing the color image data into a test set and a training set;
respectively labeling the color image data in the test set and the training set to obtain the font data to be trained;
training the model to be trained through the test set and the training set, and adjusting the hyper-parameters of the model to be trained until the model to be trained converges to obtain the font identification model;
and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
In this embodiment, after the training set and the data in the test set are respectively labeled, the model to be trained may be trained by the training set and the test set. Specifically, the model to be trained can be trained according to the data to be trained in the training set, the data in the data to be trained in the testing set is tested, and the super parameters of the model to be trained are continuously adjusted according to the training result, wherein the super parameters include, but are not limited to, the learning rate, the learning strategy, the forgetting rate and the maximum iteration number until the model to be trained converges, and finally the font recognition model is obtained.
According to the font identification method provided by the embodiment, the model to be trained is trained through the test set and the training set, and the super parameters of the model to be trained are adjusted until the model to be trained converges, so that the font identification model is obtained, and the identification precision of the font identification model can be improved, and the user experience is further improved.
Further, on the basis of any one of the above embodiments, the method includes:
receiving a font image shot by a shooting module;
calculating a mean image of the font identification model;
subtracting the mean value image from the font image to obtain the preprocessed font image;
and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image.
In this embodiment, a font image to be recognized sent by a shooting module is received, and in order to improve the efficiency and accuracy of font recognition, the font image needs to be preprocessed first. Specifically, a mean image of the font recognition model may be first determined, and a characteristic portion of the font image may be obtained by subtracting the mean image from the photographed font image, and the preprocessed font image may be recognized by a preset font recognition model to obtain a name of the font. Accordingly, after the name of the font is obtained, the name of the font can be displayed on a display screen of the user terminal, and then the user can download, use and other operations on the font according to the name of the font.
According to the font identification method provided by the embodiment, the mean image of the font identification model is calculated; subtracting the mean value image from the font image to obtain the preprocessed font image, so that the efficiency and the precision of font identification can be improved, and the user experience is further improved.
Fig. 4 is a schematic structural diagram of a font recognition device according to a third embodiment of the present invention, as shown in fig. 4, where the font recognition device includes:
a font image receiving module 31 for receiving the font image shot by the shooting module;
a preprocessing module 32, configured to preprocess the font file;
and the recognition module 33 is configured to add the preprocessed font image to a preset font recognition model, and obtain a font name corresponding to the font image.
In this embodiment, the font recognition device may communicate with the shooting module in a wired or wireless manner, so as to implement data interaction. Specifically, when the user finds a favorite font, the user can shoot the font through a shooting module to obtain a font image of the font, and the font image is sent to the font identification device in a wired or wireless mode. Accordingly, the font recognition device may accept the font image transmitted from the photographing module.
As an implementation manner, the font image may be a screenshot of the font of the centering instrument when the user browses a certain interface through the user terminal, or may be a font image obtained in any other form, and the present invention is not limited herein.
In order to improve the accuracy of the font recognition, the font recognition device may perform preprocessing on the font image after receiving the font image, to obtain a processed font image.
In order to realize the identification of the fonts, a font identification model can be preset, the font image is preprocessed, after the processed font image is obtained, the processed font image can be added into the font identification model, so that the identification of the fonts of the user cardiometer is realized, and the names of the fonts are obtained. Accordingly, after the name of the font is obtained, the name of the font can be displayed on a display screen of the user terminal, and then the user can download, use and other operations on the font according to the name of the font.
The font identification device provided by the embodiment receives the font image shot by the shooting module; preprocessing the font file; and adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image. Therefore, the names of the fonts liked by the user can be rapidly acquired, so that the user downloads and uses the fonts according to the font names, and the user experience is improved.
Further, on the basis of any one of the foregoing embodiments, the apparatus further includes:
the training module is used for training a preset model to be trained through preset font data to be trained to obtain the preset font identification model.
According to the font identification device provided by the embodiment, the preset model to be trained is trained through the preset font data to be trained, and the preset font identification model is obtained, so that a foundation is provided for subsequent font identification, and user experience can be improved.
Further, on the basis of any one of the foregoing embodiments, the apparatus further includes:
the device comprises a to-be-processed data acquisition module, a processing module and a processing module, wherein the to-be-processed data acquisition module is used for acquiring preset to-be-processed data, and the to-be-processed data is a black-and-white font image;
the rendering module is used for rendering the data to be processed into color image data randomly;
the classification module is used for randomly dividing the color image data into a test set and a training set;
and the labeling module is used for labeling the color image data in the test set and the training set respectively to obtain the font data to be trained.
According to the font identification device provided by the embodiment, the preset data to be processed is acquired, and the data to be processed is a black-and-white font image; randomly rendering the data to be processed into color image data; randomly dividing the color image data into a test set and a training set; and marking the color image data in the test set and the training set respectively to obtain the font data to be trained, so that the recognition accuracy of the model can be improved, and the user experience is further improved.
Further, on the basis of any one of the foregoing embodiments, the labeling module includes:
an adding unit, configured to add random noise and random ambiguity in the test set and the training set;
and the labeling unit is used for labeling the font names of the color image data aiming at each color image data in the test set and the training set.
According to the font identification device provided by the embodiment, random noise and random blurring are added in the test set and the training set; and labeling the font names of the color image data aiming at each color image data in the test set and the training set, so that the font identification model can accurately identify the fonts, and the user experience is improved.
Further, on the basis of any one of the foregoing embodiments, the training module includes:
and the training unit is used for training the model to be trained through the test set and the training set, and adjusting the hyper-parameters of the model to be trained until the model to be trained converges to obtain the font identification model.
According to the font identification device provided by the embodiment, the model to be trained is trained through the test set and the training set, and the super parameters of the model to be trained are adjusted until the model to be trained converges, so that the font identification model is obtained, and the identification precision of the font identification model can be improved, and the user experience is further improved.
Further, on the basis of any one of the foregoing embodiments, the preprocessing module includes:
a calculation unit for calculating a mean image of the font recognition model;
and the processing unit is used for subtracting the mean value image from the font image to obtain the preprocessed font image.
The font recognition device provided by the embodiment calculates the mean image of the font recognition model; subtracting the mean value image from the font image to obtain the preprocessed font image, so that the efficiency and the precision of font identification can be improved, and the user experience is further improved.
Fig. 5 is a schematic structural diagram of a font identifying device according to a fourth embodiment of the present invention, as shown in fig. 5, where the font identifying device includes:
a memory 41, a processor 42;
a memory 41; a memory 41 for storing instructions executable by the processor 42;
wherein the processor 42 is configured to perform a font recognition method as described above by the processor 42;
the font recognition device further comprises a communication interface 43.
Yet another embodiment of the present invention is to provide a computer-readable storage medium having stored therein computer-executable instructions for implementing a font recognition method as described above when executed by a processor.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (4)

1. A font recognition method, comprising:
receiving a font image shot by a shooting module;
preprocessing the font image;
adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image;
the preprocessing the font image comprises the following steps:
calculating a mean image of the font identification model;
subtracting the mean value image from the font image to obtain a preprocessed font image, wherein the preprocessed font image is a characteristic part of the font image;
the step of adding the preprocessed font image to a preset font identification model, and before obtaining the font name corresponding to the font image, further comprises:
acquiring preset data to be processed, wherein the data to be processed is a black-and-white font image;
randomly rendering the data to be processed into color image data;
randomly dividing the color image data into a test set and a training set;
adding random noise and random ambiguity in the test set and the training set;
labeling the font names of the color image data aiming at each color image data in the test set and the training set;
and training the model to be trained through the test set and the training set, and adjusting the hyper-parameters of the model to be trained until the model to be trained converges, so as to obtain the font identification model.
2. A font recognition device, comprising:
the font image receiving module is used for receiving the font image shot by the shooting module;
the preprocessing module is used for preprocessing the font image;
the identification module is used for adding the preprocessed font image into a preset font identification model to obtain a font name corresponding to the font image;
wherein, the preprocessing module includes:
a calculation unit for calculating a mean image of the font recognition model;
a processing unit, configured to subtract the mean value image from the font image to obtain a preprocessed font image, where the preprocessed font image is a feature part of the font image;
the apparatus further comprises:
the device comprises a to-be-processed data acquisition module, a processing module and a processing module, wherein the to-be-processed data acquisition module is used for acquiring preset to-be-processed data, and the to-be-processed data is a black-and-white font image;
the rendering module is used for rendering the data to be processed into color image data randomly;
the classification module is used for randomly dividing the color image data into a test set and a training set;
the labeling module is used for adding random noise and random blurring into the test set and the training set;
labeling the font names of the color image data aiming at each color image data in the test set and the training set;
and the training module is used for training the model to be trained through the test set and the training set, and adjusting the hyper-parameters of the model to be trained until the model to be trained converges, so as to obtain the font recognition model.
3. A font recognition device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the font identification method of claim 1 by the processor.
4. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the font recognition method of claim 1.
CN201811555857.4A 2018-12-19 2018-12-19 Font identification method, apparatus, device and computer readable storage medium Active CN111339803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811555857.4A CN111339803B (en) 2018-12-19 2018-12-19 Font identification method, apparatus, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811555857.4A CN111339803B (en) 2018-12-19 2018-12-19 Font identification method, apparatus, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111339803A CN111339803A (en) 2020-06-26
CN111339803B true CN111339803B (en) 2023-10-24

Family

ID=71185009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811555857.4A Active CN111339803B (en) 2018-12-19 2018-12-19 Font identification method, apparatus, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111339803B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1188944A (en) * 1996-12-24 1998-07-29 株式会社理光 Character recognition device, character recognition method and information recording medium
CN101097600A (en) * 2006-06-29 2008-01-02 北大方正集团有限公司 Character recognizing method and system
CN102262731A (en) * 2011-07-11 2011-11-30 哈尔滨工业大学 Character recognizing method based on sparse coding
EP2677461A1 (en) * 2012-06-20 2013-12-25 Audi Ag Information device
CN104200225A (en) * 2014-08-29 2014-12-10 电子科技大学 Local space constraint graph model based image classification method
CN105117740A (en) * 2015-08-21 2015-12-02 北京旷视科技有限公司 Font identification method and device
US9501724B1 (en) * 2015-06-09 2016-11-22 Adobe Systems Incorporated Font recognition and font similarity learning using a deep neural network
CN106610969A (en) * 2015-10-21 2017-05-03 上海文广互动电视有限公司 Multimodal information-based video content auditing system and method
CN108985297A (en) * 2018-06-04 2018-12-11 平安科技(深圳)有限公司 Handwriting model training, hand-written image recognition methods, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3997198B2 (en) * 2003-12-05 2007-10-24 キヤノン株式会社 Image processing system and image processing method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1188944A (en) * 1996-12-24 1998-07-29 株式会社理光 Character recognition device, character recognition method and information recording medium
CN101097600A (en) * 2006-06-29 2008-01-02 北大方正集团有限公司 Character recognizing method and system
CN102262731A (en) * 2011-07-11 2011-11-30 哈尔滨工业大学 Character recognizing method based on sparse coding
EP2677461A1 (en) * 2012-06-20 2013-12-25 Audi Ag Information device
CN104200225A (en) * 2014-08-29 2014-12-10 电子科技大学 Local space constraint graph model based image classification method
US9501724B1 (en) * 2015-06-09 2016-11-22 Adobe Systems Incorporated Font recognition and font similarity learning using a deep neural network
CN105117740A (en) * 2015-08-21 2015-12-02 北京旷视科技有限公司 Font identification method and device
CN106610969A (en) * 2015-10-21 2017-05-03 上海文广互动电视有限公司 Multimodal information-based video content auditing system and method
CN108985297A (en) * 2018-06-04 2018-12-11 平安科技(深圳)有限公司 Handwriting model training, hand-written image recognition methods, device, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于CNN网络的汉子图像字体识别;刘志伟;《现代计算机》(第05期);67-70 *
视频检索在汉字识别中的应用研究;桂丹萍;陈佳祥;何红生;;计算机技术与发展(10);全文 *

Also Published As

Publication number Publication date
CN111339803A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN108921782B (en) Image processing method, device and storage medium
CN110930296B (en) Image processing method, device, equipment and storage medium
CN107423306B (en) Image retrieval method and device
CN110705353A (en) Method and device for identifying face to be shielded based on attention mechanism
CN108241855B (en) Image generation method and device
CN111062362B (en) Face living body detection model, method, device, equipment and storage medium
CN112528318A (en) Image desensitization method and device and electronic equipment
CN111401193B (en) Method and device for acquiring expression recognition model, and expression recognition method and device
CN112802081A (en) Depth detection method and device, electronic equipment and storage medium
CN113658091A (en) Image evaluation method, storage medium and terminal equipment
CN112001285B (en) Method, device, terminal and medium for processing beauty images
CN111339803B (en) Font identification method, apparatus, device and computer readable storage medium
US11947631B2 (en) Reverse image search based on deep neural network (DNN) model and image-feature detection model
CN110751163A (en) Target positioning method and device, computer readable storage medium and electronic equipment
CN112287932B (en) Method, device, equipment and storage medium for determining image quality
CN114004974A (en) Method and device for optimizing images shot in low-light environment
CN114663299A (en) Training method and device suitable for image defogging model of underground coal mine
CN114329024A (en) Icon searching method and system
CN113538214A (en) Method and system for controlling makeup migration and storage medium
CN108446653B (en) Method and apparatus for processing face image
CN113674383A (en) Method and device for generating text image
CN113642415B (en) Face feature expression method and face recognition method
KR102358355B1 (en) Method and apparatus for progressive deblurring of face image
CN110189272B (en) Method, apparatus, device and storage medium for processing image
CN114677443B (en) Optical positioning 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230703

Address after: 3007, Hengqin International Financial Center Building, No. 58 Huajin Street, Hengqin New District, Zhuhai City, Guangdong Province, 519030

Applicant after: New founder holdings development Co.,Ltd.

Applicant after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Applicant before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Applicant before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant