Movatterモバイル変換


[0]ホーム

URL:


CN113420767B - Feature extraction method, system and device for font classification - Google Patents

Feature extraction method, system and device for font classification
Download PDF

Info

Publication number
CN113420767B
CN113420767BCN202110829946.9ACN202110829946ACN113420767BCN 113420767 BCN113420767 BCN 113420767BCN 202110829946 ACN202110829946 ACN 202110829946ACN 113420767 BCN113420767 BCN 113420767B
Authority
CN
China
Prior art keywords
feature
image
features
preprocessed
advanced
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
CN202110829946.9A
Other languages
Chinese (zh)
Other versions
CN113420767A (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.)
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech Co Ltd
Original Assignee
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech 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 Shenzhen Lingyun Shixun Technology Co ltd, Luster LightTech Co LtdfiledCriticalShenzhen Lingyun Shixun Technology Co ltd
Priority to CN202110829946.9ApriorityCriticalpatent/CN113420767B/en
Publication of CN113420767ApublicationCriticalpatent/CN113420767A/en
Application grantedgrantedCritical
Publication of CN113420767BpublicationCriticalpatent/CN113420767B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses a feature extraction method, a system and a device for font classification, wherein the method comprises the following steps: the method comprises the steps of obtaining an image to be detected, preprocessing the image to be detected to obtain a preprocessed image, extracting basic features of the preprocessed image to obtain image basic features, wherein the image basic features comprise gray level features and aspect ratio features, extracting the advanced features of the preprocessed image to obtain image advanced features, the image advanced features comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features, and generating a feature space according to the image basic features and the image advanced features, wherein the feature space comprises at least one image basic feature and at least one image advanced feature. Through the image basic features and the image advanced features contained in the image set, the use requirements under different use conditions can be met, and the applicability of the feature space in a special scene is improved.

Description

Feature extraction method, system and device for font classification
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, a system, and an apparatus for extracting features for font classification.
Background
The text is transmitted through various carriers, and people observe the text to acquire information. The application of machine vision instead of human eyes has become an important component of automated production to efficiently recognize text in images.
The existing text recognition method based on machine learning is used for classifying single characters through a feature space, however, the existing text recognition method still has a certain disadvantage, and the classification accuracy depends on the abstract degree of the feature space, so that the abstract degree of the existing feature space is poor, the feature space has poor universality in actual scenes, and in most cases, the feature space needs to be customized according to the scenes.
Disclosure of Invention
The application provides a feature extraction method, a system and a device for font classification, which are used for solving the problem that the existing font classification and identification process has fewer feature types and cannot meet the use requirements of different use scenes.
The application provides a feature extraction method for font classification, which comprises the following steps:
Acquiring an image to be detected;
Preprocessing the image to be detected to obtain a preprocessed image;
extracting basic features of the preprocessed image to obtain basic features of the image, wherein the basic features of the image comprise gray level features and aspect ratio features;
extracting advanced features of the preprocessed image to obtain advanced features of the image, wherein the advanced features of the image comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features;
a feature space is generated from the image base features and the image high-level features, the feature space including at least one image base feature and at least one image high-level feature.
The image to be detected is preprocessed to obtain a preprocessed image, and the method specifically comprises the following steps:
Carrying out pixel normalization processing on the image to be detected to obtain the image to be detected after the pixel normalization processing;
and carrying out size normalization processing on the image to be detected after pixel normalization processing to obtain a preprocessed image.
Extracting basic features of the preprocessed image to obtain image basic features, wherein the image basic features comprise gray level features and aspect ratio features, and specifically comprise the following steps:
Extracting gray information of each pixel point in the preprocessed image as a feature vector to obtain gray features;
Extracting the ratio of the width to the height of the preprocessed image as a feature vector to obtain aspect ratio features;
And combining the gray scale features and the aspect ratio features to obtain image basic features.
The preprocessing image is subjected to advanced feature extraction to obtain image advanced features, wherein the image advanced features comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features, and specifically comprise the following steps:
Obtaining outer contour features according to the preprocessed images;
obtaining gradient characteristics and local binary characteristics according to the preprocessed image;
obtaining scale invariant features and geometric moment features according to the preprocessed images;
And combining the outer contour feature, the gradient feature, the local binary feature, the scale invariant feature and the geometric moment feature to obtain an image advanced feature.
Obtaining outer contour features according to the preprocessed images, wherein the outer contour features specifically comprise the following steps:
acquiring a character area in the preprocessed image;
extracting character outlines in the character areas;
and recording boundary azimuth information from the character outline to the preprocessing image as a feature vector to obtain an outline feature.
Obtaining gradient characteristics and local binary characteristics according to the preprocessed image, and specifically comprising the following steps:
dividing the preprocessed image into image blocks with the same size;
Counting a gradient histogram and a local binary histogram by taking the image block as a unit;
Cascading all gradient histograms as feature vectors to obtain gradient features;
and cascading all local binary histograms to obtain local binary features as feature vectors.
Obtaining gradient characteristics and local binary characteristics according to the preprocessed image, and specifically comprising the following steps:
dividing the preprocessed image into image blocks with the same size;
Counting a local binary histogram by taking the image block as a unit;
Cascading all local binary histograms to obtain local binary features as feature vectors;
and extracting the gradient of each pixel point in the preprocessed image as a feature vector to obtain gradient features.
Obtaining scale invariant features and geometric moment features according to the preprocessed images, wherein the method specifically comprises the following steps:
Performing scale-invariant feature transformation on the preprocessed image, extracting scale-invariant feature points as feature vectors, and obtaining scale-invariant features
And applying the moment of inertia to the preprocessed image as a feature vector to obtain a geometric moment feature.
In a second aspect, the present application provides a feature extraction system for font classification, the system comprising:
an image acquisition module: acquiring an image to be detected;
an image preprocessing module: preprocessing the image to be detected to obtain a preprocessed image;
the basic feature extraction module: extracting basic features of the preprocessed image to obtain basic features of the image, wherein the basic features of the image comprise gray level features and aspect ratio features;
advanced feature extraction module: extracting advanced features of the preprocessed image to obtain advanced features of the image, wherein the advanced features of the image comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features;
The feature space generation module: a feature space is generated from the image base features and the image high-level features, the feature space including at least one image base feature and at least one image high-level feature.
In a third aspect, the present application provides a feature extraction apparatus for font classification, the apparatus comprising: at least one processor, memory, and input output unit; the memory is used for storing a computer program, and the processor is used for calling the computer program stored in the memory to execute the method.
As can be seen from the above technical solutions, the present application discloses a feature extraction method, system and device for font classification, where the method includes: the method comprises the steps of obtaining an image to be detected, preprocessing the image to be detected to obtain a preprocessed image, extracting basic features of the preprocessed image to obtain image basic features, wherein the image basic features comprise gray level features and aspect ratio features, extracting the advanced features of the preprocessed image to obtain image advanced features, the image advanced features comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features, and generating a feature space according to the image basic features and the image advanced features, wherein the feature space comprises at least one image basic feature and at least one image advanced feature. Through the image basic features and the image advanced features contained in the image set, the use requirements under different use conditions can be met, and the applicability of the feature space in a special scene is improved. The method and the device have the advantages that the characteristics of the preprocessed image are acquired, the characteristic space is generated, and the problems that in the existing font classification and identification process, the types of the characteristics contained in the characteristic space are fewer and the use requirements of different use scenes cannot be met are solved.
Drawings
In order to more clearly illustrate the technical solution of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is an application scenario diagram of a feature extraction method for font classification according to the present application;
FIG. 2 is a flow chart of a feature extraction method for font classification provided by the present application;
FIG. 3 is a flow chart of a method according to one embodiment of the present application;
FIG. 4 is a flow chart of a method according to a second embodiment of the present application;
FIG. 5 is a flow chart of a method according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of a feature extraction system for font classification according to the present application.
Detailed Description
In order to overcome the problems in the prior art, the application provides a feature extraction method, a system and a device for font classification, which are used for solving the problems that in the existing font classification and identification process, the number of feature types contained in a feature space is less and the use requirements of different use scenes cannot be met.
Referring to fig. 1, for an application scenario diagram of a feature extraction method for font classification according to the present application, an image to be detected is normalized to obtain a preprocessed image, the preprocessed image is subjected to primary feature extraction and advanced feature extraction simultaneously to obtain an image base feature and an image advanced feature, the image base feature includes a gray scale feature and an aspect ratio feature, the image advanced feature includes an outer contour feature, a gradient feature, a local binary feature, a scale invariant feature and a geometric moment feature, and a feature space is generated according to the image base feature and the image advanced feature, the feature space includes at least one image base feature and at least one image advanced feature. The use requirements under different use scenes are realized through the feature space of the free combination of various features.
In a first aspect, referring to fig. 2, the present application provides a feature extraction method for font classification, the method comprising:
S100: acquiring an image to be detected;
S110: preprocessing the image to be detected to obtain a preprocessed image;
in some embodiments, pixel normalization processing is performed on the image to be detected to obtain a pixel normalized image to be detected, and size normalization processing is performed on the pixel normalized image to be detected to obtain a preprocessed image. It should be noted that, the image to be detected may be a gray level image or a color image, the gray level image is composed of a single pixel matrix, the color image is composed of three matrices, the value of each pixel matrix is an integer between 0 and 255, although the image to be detected can be directly subjected to feature extraction, the feature extraction efficiency is seriously affected when the value of the training data is a larger integer value due to the fact that the feature extraction process is generally performed by using a smaller weight value, and the feature extraction efficiency can be effectively improved by preprocessing the image to be detected.
S120: extracting basic features of the preprocessed image to obtain basic features of the image, wherein the basic features of the image comprise gray level features and aspect ratio features;
s130: extracting advanced features of the preprocessed image to obtain advanced features of the image, wherein the advanced features of the image comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features;
In some embodiments, the preprocessing image is subjected to advanced feature extraction to obtain image advanced features, where the image advanced features include outer contour features, gradient features, local binary features, scale invariant features and geometric moment features, and specifically include the following steps: obtaining an outer contour feature according to the preprocessed image, obtaining a gradient feature and a local binary feature according to the preprocessed image, obtaining a scale invariant feature and a geometric moment feature according to the preprocessed image, and combining the outer contour feature, the gradient feature, the local binary feature, the scale invariant feature and the geometric moment feature to obtain an image advanced feature.
S140: a feature space is generated from the image base features and the image high-level features, the feature space including at least one image base feature and at least one image high-level feature.
Through carrying out arbitrary combination to multiple image basic feature and image advanced feature, can satisfy the user demand under the different use scenes, promote the suitability of method, promote user experience.
In some embodiments, referring to fig. 3, the preprocessing the image to be detected to obtain a preprocessed image specifically includes the following steps:
s111, carrying out pixel normalization processing on the image to be detected to obtain the image to be detected after the pixel normalization processing;
s112: and carrying out size normalization processing on the image to be detected after pixel normalization processing to obtain a preprocessed image.
In some embodiments, referring to fig. 4, the extracting basic features of the preprocessed image to obtain basic features of the image, where the basic features of the image include gray scale features and aspect ratio features specifically includes the following steps:
S121: extracting gray information of each pixel point in the preprocessed image as a feature vector to obtain gray features;
s122: extracting the ratio of the width to the height of the preprocessed image as a feature vector to obtain aspect ratio features;
s123: and combining the gray scale features and the aspect ratio features to obtain image basic features.
In some embodiments, referring to fig. 5, the performing advanced feature extraction on the preprocessed image to obtain image advanced features, where the image advanced features include an outer contour feature, a gradient feature, a local binary feature, a scale invariant feature, and a geometric moment feature, and specifically includes the following steps:
S131: obtaining outer contour features according to the preprocessed images;
s132: obtaining gradient characteristics and local binary characteristics according to the preprocessed image;
s133: obtaining scale invariant features and geometric moment features according to the preprocessed images;
S134: and combining the outer contour feature, the gradient feature, the local binary feature, the scale invariant feature and the geometric moment feature to obtain an image advanced feature.
In some embodiments, the method for obtaining the outer contour feature according to the preprocessed image specifically includes the following steps:
acquiring a character area in the preprocessed image;
extracting character outlines in the character areas;
and recording boundary azimuth information from the character outline to the preprocessing image as a feature vector to obtain an outline feature.
In some embodiments, gradient features and local binary features are obtained according to the preprocessed image, and the method specifically comprises the following steps:
dividing the preprocessed image into image blocks with the same size;
Counting a gradient histogram and a local binary histogram by taking the image block as a unit;
Cascading all gradient histograms as feature vectors to obtain gradient features;
and cascading all local binary histograms to obtain local binary features as feature vectors.
In another embodiment, gradient features and local binary features are obtained according to the preprocessed image, and the method specifically comprises the following steps:
dividing the preprocessed image into image blocks with the same size;
Counting a local binary histogram by taking the image block as a unit;
Cascading all local binary histograms to obtain local binary features as feature vectors;
and extracting the gradient of each pixel point in the preprocessed image as a feature vector to obtain gradient features.
The gradient of each pixel point in the preprocessed image is used as a feature vector, so that the processing efficiency can be effectively improved, and the efficiency advantage is more obvious when the sample amount is more.
In some embodiments, the method for obtaining the scale invariant feature and the geometric moment feature according to the preprocessed image specifically comprises the following steps:
Performing scale-invariant feature transformation on the preprocessed image, extracting scale-invariant feature points as feature vectors, and obtaining scale-invariant features
And applying the moment of inertia to the preprocessed image as a feature vector to obtain a geometric moment feature.
In a second aspect, referring to fig. 6, the present application provides a feature extraction system for font classification, the system comprising:
an image acquisition module: acquiring an image to be detected;
an image preprocessing module: preprocessing the image to be detected to obtain a preprocessed image;
the basic feature extraction module: extracting basic features of the preprocessed image to obtain basic features of the image, wherein the basic features of the image comprise gray level features and aspect ratio features;
advanced feature extraction module: extracting advanced features of the preprocessed image to obtain advanced features of the image, wherein the advanced features of the image comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features;
The feature space generation module: a feature space is generated from the image base features and the image high-level features, the feature space including at least one image base feature and at least one image high-level feature.
In a third aspect, the present application provides a feature extraction apparatus for font classification, the apparatus comprising: at least one processor, a memory, and an input output unit. The memory is used for storing a computer program, and the processor is used for calling the computer program stored in the memory to execute the method.
As can be seen from the above technical solutions, the present application discloses a feature extraction method, system and device for font classification, where the method includes: the method comprises the steps of obtaining an image to be detected, preprocessing the image to be detected to obtain a preprocessed image, extracting basic features of the preprocessed image to obtain image basic features, wherein the image basic features comprise gray level features and aspect ratio features, extracting the advanced features of the preprocessed image to obtain image advanced features, the image advanced features comprise outer contour features, gradient features, local binary features, scale invariant features and geometric moment features, and generating a feature space according to the image basic features and the image advanced features, wherein the feature space comprises at least one image basic feature and at least one image advanced feature. Through the image basic features and the image advanced features contained in the image set, the use requirements under different use conditions can be met, and the applicability of the feature space in a special scene is improved.
The method and the device have the advantages that the characteristics of the preprocessed image are acquired, the characteristic space is generated, and the problems that in the existing font classification and identification process, the types of the characteristics contained in the characteristic space are fewer and the use requirements of different use scenes cannot be met are solved.
Further, noise robustness of feature space containing various advanced features is greatly improved, as well as geometrical, illumination and scale invariance. Meanwhile, several advanced features can be combined at will according to the actual scene and the user requirement, and the method has stronger adaptability. Finally, the feature extraction method is not only suitable for character samples, but also suitable for general target detection, image classification and semantic segmentation, and has a wider application range.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof.

Claims (9)

CN202110829946.9A2021-07-222021-07-22Feature extraction method, system and device for font classificationActiveCN113420767B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110829946.9ACN113420767B (en)2021-07-222021-07-22Feature extraction method, system and device for font classification

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110829946.9ACN113420767B (en)2021-07-222021-07-22Feature extraction method, system and device for font classification

Publications (2)

Publication NumberPublication Date
CN113420767A CN113420767A (en)2021-09-21
CN113420767Btrue CN113420767B (en)2024-04-26

Family

ID=77719501

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110829946.9AActiveCN113420767B (en)2021-07-222021-07-22Feature extraction method, system and device for font classification

Country Status (1)

CountryLink
CN (1)CN113420767B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116797533B (en)*2023-03-242024-01-23东莞市冠锦电子科技有限公司Appearance defect detection method and system for power adapter
CN118942102B (en)*2024-07-102025-03-28延边大学 Intelligent calligraphy evaluation method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101488182A (en)*2008-12-242009-07-22华南理工大学Image characteristics extraction method used for handwritten Chinese character recognition
CN101561866A (en)*2009-05-272009-10-21上海交通大学Character recognition method based on SIFT feature and gray scale difference value histogram feature
CN101763505A (en)*2009-12-292010-06-30重庆大学Vehicle license character feature extracting and classifying method based on projection symmetry
CN102043960A (en)*2010-12-032011-05-04杭州淘淘搜科技有限公司Image grey scale and gradient combining improved sift characteristic extracting method
CN104239872A (en)*2014-09-262014-12-24南开大学Abnormal Chinese character identification method
CN104299009A (en)*2014-09-232015-01-21同济大学Plate number character recognition method based on multi-feature fusion
CN106127198A (en)*2016-06-202016-11-16华南师范大学A kind of image character recognition method based on Multi-classifers integrated
CN108734170A (en)*2018-05-252018-11-02电子科技大学Registration number character dividing method based on machine learning and template
CN111639212A (en)*2020-05-272020-09-08中国矿业大学Image retrieval method in mining intelligent video analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109344801A (en)*2018-10-262019-02-15京东方科技集团股份有限公司 Object detection method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101488182A (en)*2008-12-242009-07-22华南理工大学Image characteristics extraction method used for handwritten Chinese character recognition
CN101561866A (en)*2009-05-272009-10-21上海交通大学Character recognition method based on SIFT feature and gray scale difference value histogram feature
CN101763505A (en)*2009-12-292010-06-30重庆大学Vehicle license character feature extracting and classifying method based on projection symmetry
CN102043960A (en)*2010-12-032011-05-04杭州淘淘搜科技有限公司Image grey scale and gradient combining improved sift characteristic extracting method
CN104299009A (en)*2014-09-232015-01-21同济大学Plate number character recognition method based on multi-feature fusion
CN104239872A (en)*2014-09-262014-12-24南开大学Abnormal Chinese character identification method
CN106127198A (en)*2016-06-202016-11-16华南师范大学A kind of image character recognition method based on Multi-classifers integrated
CN108734170A (en)*2018-05-252018-11-02电子科技大学Registration number character dividing method based on machine learning and template
CN111639212A (en)*2020-05-272020-09-08中国矿业大学Image retrieval method in mining intelligent video analysis

Also Published As

Publication numberPublication date
CN113420767A (en)2021-09-21

Similar Documents

PublicationPublication DateTitle
Kim et al.Salient region detection via high-dimensional color transform
US10635946B2 (en)Eyeglass positioning method, apparatus and storage medium
Leibe et al.Interleaved Object Categorization and Segmentation.
Flores et al.Application of convolutional neural networks for static hand gestures recognition under different invariant features
EP4109332A1 (en)Certificate authenticity identification method and apparatus, computer-readable medium, and electronic device
CN112633297B (en)Target object identification method and device, storage medium and electronic device
CN104217203B (en) Method and system for identifying complex background card surface information
CN103927387A (en)Image retrieval system, method and device
CN107133622A (en)The dividing method and device of a kind of word
CN112749696B (en)Text detection method and device
CN113420767B (en)Feature extraction method, system and device for font classification
CN111814690B (en)Target re-identification method, device and computer readable storage medium
CN109740417B (en)Invoice type identification method, invoice type identification device, storage medium and computer equipment
Xu et al.End-to-end subtitle detection and recognition for videos in East Asian languages via CNN ensemble
CN112541394A (en)Black eye and rhinitis identification method, system and computer medium
CN111914668A (en)Pedestrian re-identification method, device and system based on image enhancement technology
CN103544504A (en)Scene character recognition method based on multi-scale map matching core
CN104504368A (en)Image scene recognition method and image scene recognition system
CN113111880A (en)Certificate image correction method and device, electronic equipment and storage medium
CN110929788A (en)Food material identification method and device, storage medium and electronic equipment
CN108090728B (en)Express information input method and system based on intelligent terminal
CN116311290A (en)Handwriting and printing text detection method and device based on deep learning
CN114332915B (en) Human attribute detection method, device, computer equipment and storage medium
CN119206769B (en) Pedestrian attribute recognition method, recognition device, electronic device and storage medium
US6694059B1 (en)Robustness enhancement and evaluation of image information extraction

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp