CN112836712A - Picture feature extraction method and device, electronic equipment and storage medium - Google Patents
Picture feature extraction method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112836712A CN112836712A CN202110247120.1A CN202110247120A CN112836712A CN 112836712 A CN112836712 A CN 112836712A CN 202110247120 A CN202110247120 A CN 202110247120A CN 112836712 A CN112836712 A CN 112836712A
- Authority
- CN
- China
- Prior art keywords
- picture
- target
- character
- target area
- compression ratio
- 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.)
- Granted
Links
- 238000003860 storage Methods 0.000 title claims abstract description 19
- 238000000605 extraction Methods 0.000 title abstract description 14
- 230000006835 compression Effects 0.000 claims abstract description 77
- 238000007906 compression Methods 0.000 claims abstract description 77
- 238000005260 corrosion Methods 0.000 claims description 35
- 230000007797 corrosion Effects 0.000 claims description 35
- 238000000034 method Methods 0.000 claims description 32
- 230000000877 morphologic effect Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 description 14
- 238000012545 processing Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 239000000123 paper Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001311 chemical methods and process Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000011088 parchment paper Substances 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V10/443—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Processing Or Creating Images (AREA)
Abstract
The application discloses a picture feature extraction method and device, electronic equipment and a storage medium. Acquiring a picture of a blueprint, and determining a target area of the picture; responding to a character string input operation, and generating a standard picture of the character string; based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set; zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture; acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zooming picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters. By the technical scheme, the automatic acquisition of the word compression ratio of the blueprint is realized.
Description
Technical Field
The embodiment of the application relates to an image processing technology, and in particular relates to a method and a device for extracting picture features, an electronic device and a storage medium.
Background
Even in the current electronic interaction technology, paper documents still serve as important media for traditional information maintenance and communication and play an important role in daily production and life of people. For example, in the field of railway signals, the most important paper document is a railway signal construction blueprint, wherein an interlocking list is used as an important component of a 'two-picture one-list' and is still a delivery document for determining computer interlocking compilation information.
Since the interlocking table is set by an upstream unit, only an approximate model of the font can be obtained, and other configuration information about the font, such as the word compression ratio information, cannot be obtained, thereby causing a problem that a subsequent interlocking table cannot be automatically recognized or the recognition rate is not high.
Disclosure of Invention
The application provides a picture feature extraction method and device, electronic equipment and a storage medium, so as to achieve automatic acquisition of a font compression ratio in a blueprint.
In a first aspect, an embodiment of the present application provides a method for extracting picture features, including:
acquiring a picture of a blueprint, and determining a target area of the picture;
responding to a character string input operation, and generating a standard picture of the character string;
based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set;
zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture;
acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zooming picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
In a second aspect, an embodiment of the present application further provides an apparatus for extracting picture features, including:
the target area determining module is used for acquiring a picture of a blueprint and determining a target area of the picture;
the standard picture generating module is used for responding to character string input operation and generating a standard picture of the character string;
the original picture generation module is used for generating an original picture corresponding to each single character compression ratio in a preset interval based on the character string to serve as an original picture set;
a zoom picture obtaining module, configured to perform zooming with an approximate zoom ratio for each original picture in the original picture set to obtain a zoom picture;
the parameter determining module is used for acquiring a target character picture from the target area and determining an optimal picture according to the matching result of the target character picture and each zooming picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for extracting picture features as provided in any embodiment of the present application.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for extracting picture features as provided in any embodiment of the present application.
The method comprises the steps of determining a target area of a picture by obtaining the picture of a blueprint; responding to the character string input operation, and generating a standard picture of the character string; based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set; zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture; acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters. Through the technical scheme, the problem that the blueprint cannot acquire the font configuration information in the prior art is solved, the automatic acquisition of the character compression ratio of the blueprint is realized, a new idea is provided for the feature extraction of the blueprint, and then the guarantee is provided for the automatic identification of the subsequent blueprint.
Drawings
Fig. 1 is a flowchart of a method for extracting picture features according to a first embodiment of the present disclosure;
fig. 2 is a flowchart of a method for extracting picture features provided in the second embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for extracting picture features according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for extracting picture features according to an embodiment of the present disclosure; the method can be executed by a picture feature extraction device, which can be realized in a hardware and/or software manner and can be integrated in electronic equipment bearing the picture feature extraction function, such as a computer and the like.
As shown in fig. 1, the method may specifically include:
and S110, acquiring a picture of the blueprint and determining a target area of the picture.
The blueprint refers to a blueprint obtained by performing a chemical process on an engineering drawing (such as parchment paper) by a sun-printing process, for example, an interlocking chart blueprint in a railway.
In this embodiment, the blueprint is scanned to obtain a picture of the blueprint, and then a target area with a set size is determined at will in any text part area in the picture.
And S120, responding to the character string input operation, and generating a standard picture of the character string.
In this embodiment, a standard picture corresponding to a character string is generated by responding to the character string input by the user and using the font picture engine of Qt.
Wherein Qt is a development framework of a cross-platform C + + gui application developed by Qt Company in 1991, and can perform image transformation processing on a character string, for example.
And S130, generating an original picture corresponding to each single character compression ratio as an original picture set by using each single character compression ratio in a preset interval based on the character string.
Wherein the compression ratio is a fat-thin for controlling the lateral direction of the font. The preset interval is determined by the person skilled in the art according to practical experience and/or practical requirements and a preset step, for example, the preset interval is set in the interval [0.20,1.20] by a step of 0.01.
In this embodiment, based on a character string input by a user, a font image engine of Qt is used to generate an original image for compression comparison with each single character as an original image set by using a compression ratio of each single character in a preset interval.
And S140, zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture.
Wherein the approximate scaling ratio is used to scale the images from the finger library engine to the blueprint. Can be determined by: firstly, scanning a target area and a standard picture line by line, determining the height of a font of the target area and the height of a font of the standard picture, and further determining the height difference between the font of the target area and the font of the standard picture; from the height difference, an approximate scaling ratio is determined.
In this embodiment, for each original picture in the original picture set, a font picture engine of Qt is used to perform scaling processing with an approximate scaling ratio to obtain each scaled picture.
S150, acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
The target character picture may be the first character picture divided from the target area, or may be a character picture divided from any position in the target area. The single character fitting parameters refer to configuration information of a single font, and include, but are not limited to, target single character compression ratio, target single character Gaussian parameters, target single character deepening magnification parameters and/or target single character morphological erosion parameters. The single compression ratio is used for controlling the transverse thickness of the font; the single character Gaussian parameter is used for the edge fuzzy degree of the font in the sun-curing process; the single character deepening multiplying power parameter is used for adjusting the brightness of the font; the single character form corrosion parameter is used for controlling the thickness of the font.
In the embodiment, a target character picture is obtained from a target area, a matching analysis method is adopted to match the target character picture with each zoom picture, and the optimal picture in each zoom picture with the highest matching degree is determined; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
The method comprises the steps of determining a target area of a picture by obtaining the picture of a blueprint; responding to the character string input operation, and generating a standard picture of the character string; based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set; zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture; acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters. Through the technical scheme, the problem that the blueprint cannot acquire the font configuration information in the prior art is solved, the automatic acquisition of the character compression ratio of the blueprint is realized, a new idea is provided for the feature extraction of the blueprint, and then the guarantee is provided for the automatic identification of the subsequent blueprint.
Example two
Fig. 2 is a flowchart of a method for extracting picture features provided in the second embodiment of the present application; on the basis of the above embodiment, further optimization is performed.
As shown in fig. 2, the method may specifically include:
s210, obtaining a picture of the blueprint and determining a target area of the picture.
And S220, responding to the character string input operation, and generating a standard picture of the character string.
And S230, generating an original picture corresponding to each single character compression ratio based on the character string and using each single character compression ratio in a preset interval as an original picture set.
And S240, zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture.
S250, acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
And S260, carrying out combined violent matching on the optimal picture and the target character picture within a preset interval range to obtain a target single character Gaussian parameter, a target single character deepening multiplying power parameter and/or a target single character morphological corrosion parameter in the single character fitting parameters with the highest matching degree.
The preset interval range is set by those skilled in the art according to actual requirements, and includes, but is not limited to, a preset single character gaussian parameter range, a preset single character deepening magnification parameter range, and a preset single character morphological corrosion parameter range. The single character Gaussian parameter is used for fitting the edge fuzzy degree of the font in the sun-curing process; the single character deepening multiplying power parameter is used for adjusting the brightness of the font; the single character form corrosion parameter is used for controlling the thickness of the font.
Optionally, in a range of the gaussian parameters of the preset single characters, a gaussian function is used to perform violent matching search on the optimal picture and the target character picture, so as to obtain the gaussian parameters of the target single characters with the highest matching degree. For example, the preset single word gaussian parameter range may be [0,4] to set a step length (e.g., 0.02), and a gaussian function is utilized to perform a brute force matching search on the optimal picture and the target character picture, so as to obtain a target single word gaussian parameter with the highest matching degree.
Optionally, in the range of the preset single character deepening magnification parameter, a deepening magnification function is used for carrying out violent matching search on the optimal picture and the target character picture, and the target single character deepening magnification parameter with the highest matching degree is obtained. For example, the preset single character deepening magnification parameter range may be [ -3,5], so as to set a step length (for example, 0.05), and by using a deepening magnification function, a violent matching search is performed on the optimal picture and the target character picture, so as to obtain a target single character deepening magnification parameter with the highest matching degree.
Optionally, in the range of the single character form corrosion parameters, performing violent matching search on the optimal picture and the target character picture by using a form corrosion function to obtain the target single character form corrosion parameters with the highest matching degree. For example, the preset single-character morphological corrosion parameter range can be [1,3] to set a step length (for example, 0.05), and a morphological corrosion function is utilized to perform violent matching search on the optimal picture and the target character picture to obtain a target single-character morphological corrosion parameter with the highest matching degree.
According to the technical scheme, the optimal picture and the first character image are combined and violently matched in the range of the preset interval, and single character Gaussian parameters, single character deepening multiplying power parameters and single character morphological corrosion parameters in single character fitting parameters with the highest matching degree are obtained. Through the technical scheme, automatic acquisition of the single character fitting parameters can be ensured, and an important premise is further provided for subsequent acquisition of the target area characteristics.
On the basis of the technical scheme, after the single character fitting parameters are determined, the parameter characteristics of the target area can be determined in the following modes, wherein the parameter characteristics of the target area comprise but are not limited to a Gaussian parameter range, a deepened multiplying power parameter range, a morphological corrosion parameter range and a font compression ratio parameter range.
Optionally, determining a gaussian parameter range of a target region by taking a target single character gaussian parameter in the single character fitting parameters as a center; and carrying out violent search on the target area and the standard picture in the range of the Gaussian parameters to determine the optimal Gaussian parameters of the target area.
Specifically, a gaussian parameter range of a target region is determined by taking a target single character gaussian parameter in the single character fitting parameters as a center and taking a fixed numerical value, for example, if the target single character gaussian parameter is marked as G, the gaussian parameter range of the target region can be [ G-1, G +1 ]; in order to set a step length (for example, 0.01), in the range of the Gaussian parameters, a violent search is carried out on the target area and the standard picture by utilizing a Gaussian function, and the optimal Gaussian parameters of the target area are determined.
Optionally, determining a deepening magnification parameter range of the target area by taking a target single character deepening magnification parameter in the single character fitting parameters as a center; and carrying out violent search on the target area and the standard picture within the range of the deepening multiplying power parameter, and determining the optimal deepening multiplying power parameter of the target area.
Specifically, a deepening magnification parameter range of a target region is determined by taking a target single character deepening magnification parameter in the single character fitting parameters as a center and fixing numerical values, for example, if the target single character deepening magnification parameter is marked as P, the deepening magnification parameter range of the target region can be [ P-2, P +2 ]; in the range of the deepening magnification parameter, violently searching the target area and the standard picture by using a deepening magnification function, and determining the optimal deepening magnification parameter of the target area by setting a step length (for example, 0.01).
Optionally, determining the morphological corrosion parameter range of the target area by taking the target individual character morphological corrosion parameter in the individual character fitting parameters as a center; and carrying out violent search on the target area and the standard picture within the morphological corrosion parameter range, and determining the optimal morphological corrosion parameter of the target area.
Specifically, the morphological corrosion parameter range of the target region is determined by taking the target individual character morphological corrosion parameter in the individual character fitting parameters as a center and fixing numerical values, for example, if the target individual character morphological corrosion parameter is marked as E, the morphological corrosion parameter range of the target region may be [ E-1, E +1 ]; and carrying out violent search on the target area and the standard picture by using a morphological corrosion function within the range of the morphological corrosion parameters by setting a step length (for example, 0.01) to determine the optimal morphological corrosion parameters of the target area.
Optionally, determining a font compression ratio parameter range of the target area by taking a target single character compression ratio in the single character fitting parameters as a center; and carrying out violent search on the target area and the standard picture within the range of the font compression ratio parameter, and determining the optimal font compression ratio parameter of the target area.
Specifically, a target single character compression ratio in the single character fitting parameters is taken as a center, and a fixed numerical value is used to determine a font compression ratio parameter range of a target area, for example, the target single character compression ratio is denoted as FS1, and the font compression ratio parameter range of the target area can be [ FS1-0.1, FS1+0.1 ]; and violently searching the target area and the standard picture within the range of the font compression ratio parameter by setting a step length (for example, 0.01) to determine the optimal font compression ratio parameter of the target area.
Optionally, in the preset font interval, violence search is performed on the target area and the standard picture by setting the step length, and the optimal font interval parameter of the target area is determined. The font interval is used for controlling the interval between the fonts and the font time.
It should be noted that, the above alternatives may be combined according to actual situations to determine the characteristic parameters of the target area.
It can be understood that the optimal parameters of the target region can be automatically extracted by obtaining the single character fitting parameters and then determining the parameter searching range of the target region based on the single character fitting parameters to determine the optimal parameters of the target region, thereby providing a guarantee for subsequent blueprint recognition.
After the parameter characteristics of the target area are determined, the parameter characteristics of the target area are further used as characteristic data parameters of the interlocking table blueprint, and a basis is provided for identification of the interlocking table blueprint. Specifically, the identification process of the interlocking list blueprint can be divided into the following steps:
firstly, dividing the interlocking list pictures according to columns to obtain at least one picture to be identified.
Secondly, determining characteristic data parameters of the picture to be recognized, recognizing the column name of the picture to be recognized in the interlocking list picture, and determining a word stock corresponding to the picture to be recognized according to the column name; and determining a word sample graph corresponding to each word in the word library according to the characteristic data parameters and the word library corresponding to the picture to be recognized.
Thirdly, matching the picture to be recognized and the word sample picture by adopting a template matching method, determining words in the picture to be recognized and positions of the words in the picture to be recognized, and traversing all the pictures to be recognized
And fourthly, generating an interlocking list file according to the words and the positions of the words in the pictures to be recognized, wherein the words are determined aiming at the pictures to be recognized.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an apparatus for extracting picture features according to a third embodiment of the present application; the embodiment can be suitable for the condition of picture feature extraction, in particular to the condition of picture feature extraction of blueprints, and the device can be realized in a hardware and/or software mode and can be integrated in electronic equipment with the function of extracting picture features, such as a computer and the like.
As shown in fig. 3, the apparatus includes a target area determining module 310, a standard picture generating module 320, an original picture generating module 330, a scaled picture obtaining module 340, and a parameter determining module 350, wherein,
the target area determining module 310 is configured to obtain a picture of a blueprint and determine a target area of the picture;
a standard picture generation module 320, configured to generate a standard picture of a character string in response to a character string input operation;
an original picture generating module 330, configured to generate, based on the character string, an original picture corresponding to each single character compression ratio in a preset interval, as an original picture set;
a zoomed image obtaining module 340, configured to, for each original image in the original image set, perform zooming with an approximate zoom ratio to obtain a zoomed image;
the parameter determining module 350 is configured to obtain a target character picture from the target region, and determine an optimal picture according to a matching result between the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
The method comprises the steps of determining a target area of a picture by obtaining the picture of a blueprint; responding to the character string input operation, and generating a standard picture of the character string; based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set; zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture; acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zoom picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters. Through the technical scheme, the problem that the blueprint cannot acquire the font configuration information in the prior art is solved, the automatic acquisition of the character compression ratio of the blueprint is realized, a new idea is provided for the feature extraction of the blueprint, and then the guarantee is provided for the automatic identification of the subsequent blueprint.
Further, the rough scaling ratio is determined by:
determining the height difference between the font of the target area and the font of the standard picture;
from the height difference, an approximate scaling ratio is determined.
Further, the parameter determination module 350 is also used for
And in a preset interval range, performing combined violent matching on the optimal picture and the target character picture to obtain a target single character Gaussian parameter, a target single character deepening multiplying factor parameter and/or a target single character morphological corrosion parameter in the single character fitting parameters with the highest matching degree.
Further, the parameter determination module 350 includes a gaussian parameter range determination unit and a gaussian parameter determination unit, wherein,
the Gaussian parameter range determining unit is used for determining the Gaussian parameter range of the target area by taking the Gaussian parameter of the target single character in the single character fitting parameters as the center;
and the Gaussian parameter determining unit is used for carrying out violent search on the target area and the standard picture in the Gaussian parameter range and determining the optimal Gaussian parameter of the target area.
Further, the parameter determining module 350 further includes a plus magnification parameter range determining unit and a plus magnification parameter determining unit, wherein,
a deepening multiplying power parameter range determining unit, configured to determine a deepening multiplying power parameter range of the target region with a target single character deepening multiplying power parameter in the single character fitting parameters as a center;
and the deepening multiplying power parameter determining unit is used for carrying out violent search on the target area and the standard picture within the deepening multiplying power parameter range and determining the optimal deepening multiplying power parameter of the target area.
Further, the parameter determining module 350 further comprises a morphological corrosion parameter range determining unit and a morphological corrosion parameter determining unit, wherein,
determining the morphological corrosion parameter range of the target area by taking the target individual character morphological corrosion parameter in the individual character fitting parameters as a center;
and carrying out violent search on the target area and the standard picture within the morphological corrosion parameter range, and determining the optimal morphological corrosion parameter of the target area.
Further, the parameter determination module 350 further comprises a compression ratio parameter range determination unit and a compression ratio parameter determination unit, wherein,
determining the font compression ratio parameter range of the target area by taking the target single character compression ratio in the single character fitting parameters as the center;
and carrying out violent search on the target area and the standard picture within the range of the font compression ratio parameter, and determining the optimal font compression ratio parameter of the target area.
The image feature extraction device can execute the image feature extraction method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application, and fig. 4 shows a block diagram of an exemplary device suitable for implementing the embodiments of the present application. The device shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in FIG. 4, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, for example, implementing the picture feature extraction method provided in the embodiment of the present application.
EXAMPLE five
The fifth embodiment of the present application further provides a computer-readable storage medium, on which a computer program (or referred to as computer-executable instructions) is stored, where the computer program is used for executing the method for extracting picture features provided in the fifth embodiment of the present application when the computer program is executed by a processor.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the embodiments of the present application have been described in more detail through the above embodiments, the embodiments of the present application are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims (10)
1. A method for extracting picture features is characterized by comprising the following steps:
acquiring a picture of a blueprint, and determining a target area of the picture;
responding to a character string input operation, and generating a standard picture of the character string;
based on the character string, generating an original picture corresponding to each single character compression ratio by using each single character compression ratio in a preset interval to serve as an original picture set;
zooming each original picture in the original picture set by adopting an approximate zoom ratio to obtain each zoomed picture;
acquiring a target character picture from the target area, and determining an optimal picture according to the matching result of the target character picture and each zooming picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
2. The method of claim 1, wherein the approximate scaling ratio is determined by:
determining the height difference between the font of the target area and the font of the standard picture;
from the height difference, an approximate scaling ratio is determined.
3. The method according to claim 1, wherein after the compression ratio corresponding to the optimal picture is taken as the target single-word compression ratio in the single-word fitting parameters, the method further comprises:
and in a preset interval range, carrying out combined violent matching on the optimal picture and the target character picture to obtain a target single character Gaussian parameter, a target single character deepening multiplying power parameter and/or a target single character morphological corrosion parameter in the single character fitting parameters with the highest matching degree.
4. The method of claim 3, comprising:
determining the Gaussian parameter range of the target area by taking the Gaussian parameter of the target single character in the single character fitting parameters as a center;
and carrying out violent search on the target area and the standard picture in the Gaussian parameter range, and determining the optimal Gaussian parameter of the target area.
5. The method of claim 3, comprising:
determining the deepening magnification parameter range of the target area by taking the target single character deepening magnification parameter in the single character fitting parameters as a center;
and carrying out violent search on the target area and the standard picture within the deepening multiplying power parameter range, and determining the optimal deepening multiplying power parameter of the target area.
6. The method of claim 3, comprising:
determining the morphological corrosion parameter range of the target area by taking the target individual character morphological corrosion parameter in the individual character fitting parameters as a center;
and carrying out violent search on the target area and the standard picture within the morphological corrosion parameter range, and determining the optimal morphological corrosion parameter of the target area.
7. The method of claim 1, comprising:
determining the font compression ratio parameter range of the target area by taking the target single character compression ratio in the single character fitting parameters as the center;
and carrying out violent search on the target area and the standard picture within the range of the font compression ratio parameter, and determining the optimal font compression ratio parameter of the target area.
8. An apparatus for extracting picture features, comprising:
the target area determining module is used for acquiring a picture of a blueprint and determining a target area of the picture;
the standard picture generating module is used for responding to character string input operation and generating a standard picture of the character string;
the original picture generation module is used for generating an original picture corresponding to each single character compression ratio in a preset interval based on the character string to serve as an original picture set;
a zoom picture obtaining module, configured to perform zooming with an approximate zoom ratio for each original picture in the original picture set to obtain each zoom picture;
the parameter determining module is used for acquiring a target character picture from the target area and determining an optimal picture according to the matching result of the target character picture and each zooming picture; and the compression ratio corresponding to the optimal picture is used as a target single word compression ratio in the single word fitting parameters.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of extracting picture features of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method of extracting picture features according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110247120.1A CN112836712B (en) | 2021-03-05 | 2021-03-05 | Picture feature extraction method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110247120.1A CN112836712B (en) | 2021-03-05 | 2021-03-05 | Picture feature extraction method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112836712A true CN112836712A (en) | 2021-05-25 |
CN112836712B CN112836712B (en) | 2023-09-12 |
Family
ID=75934680
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110247120.1A Active CN112836712B (en) | 2021-03-05 | 2021-03-05 | Picture feature extraction method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112836712B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040057621A1 (en) * | 2002-09-24 | 2004-03-25 | Lee Shih-Jong J. | Fast regular shaped pattern searching |
CN104954605A (en) * | 2014-03-31 | 2015-09-30 | 京瓷办公信息系统株式会社 | Image forming apparatus, image forming system, and image forming method |
CN106251341A (en) * | 2016-07-22 | 2016-12-21 | 凌云光技术集团有限责任公司 | A kind of press quality quantity measuring method |
CN108763440A (en) * | 2018-05-25 | 2018-11-06 | 深圳乐信软件技术有限公司 | A kind of image searching method, device, terminal and storage medium |
-
2021
- 2021-03-05 CN CN202110247120.1A patent/CN112836712B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040057621A1 (en) * | 2002-09-24 | 2004-03-25 | Lee Shih-Jong J. | Fast regular shaped pattern searching |
CN104954605A (en) * | 2014-03-31 | 2015-09-30 | 京瓷办公信息系统株式会社 | Image forming apparatus, image forming system, and image forming method |
CN106251341A (en) * | 2016-07-22 | 2016-12-21 | 凌云光技术集团有限责任公司 | A kind of press quality quantity measuring method |
CN108763440A (en) * | 2018-05-25 | 2018-11-06 | 深圳乐信软件技术有限公司 | A kind of image searching method, device, terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112836712B (en) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107656922B (en) | Translation method, translation device, translation terminal and storage medium | |
EP3709212A1 (en) | Image processing method and device for processing image, server and storage medium | |
KR20210037637A (en) | Translation method, apparatus and electronic equipment | |
CN115359383A (en) | Cross-modal feature extraction, retrieval and model training method, device and medium | |
CN115982376B (en) | Method and device for training model based on text, multimode data and knowledge | |
CN113673432A (en) | Handwriting recognition method, touch display device, computer device and storage medium | |
CN113627439A (en) | Text structuring method, processing device, electronic device and storage medium | |
CN114373460A (en) | Instruction determination method, device, equipment and medium for vehicle-mounted voice assistant | |
CN113361523A (en) | Text determination method and device, electronic equipment and computer readable storage medium | |
CN114118072A (en) | Document structuring method and device, electronic equipment and computer readable storage medium | |
CN112749639B (en) | Model training method and device, computer equipment and storage medium | |
CN112822506A (en) | Method and apparatus for analyzing video stream | |
CN116246287B (en) | Target object recognition method, training device and storage medium | |
US20230048495A1 (en) | Method and platform of generating document, electronic device and storage medium | |
CN112542163A (en) | Intelligent voice interaction method, equipment and storage medium | |
CN112836712B (en) | Picture feature extraction method and device, electronic equipment and storage medium | |
CN116484224A (en) | Training method, device, medium and equipment for multi-mode pre-training model | |
US20240303880A1 (en) | Method of generating image sample, method of recognizing text, device and medium | |
CN115396690A (en) | Audio and text combination method and device, electronic equipment and storage medium | |
CN113361522B (en) | Method and device for determining character sequence and electronic equipment | |
CN115049546A (en) | Sample data processing method and device, electronic equipment and storage medium | |
CN115393870A (en) | Text information processing method, device, equipment and storage medium | |
CN115273057A (en) | Text recognition method and device, dictation correction method and device and electronic equipment | |
CN115294581A (en) | Method and device for identifying error characters, electronic equipment and storage medium | |
CN115376137A (en) | Optical character recognition processing and text recognition model training method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |