CN113221696A - Image recognition method, system, equipment and storage medium - Google Patents

Image recognition method, system, equipment and storage medium Download PDF

Info

Publication number
CN113221696A
CN113221696A CN202110476020.6A CN202110476020A CN113221696A CN 113221696 A CN113221696 A CN 113221696A CN 202110476020 A CN202110476020 A CN 202110476020A CN 113221696 A CN113221696 A CN 113221696A
Authority
CN
China
Prior art keywords
image
target
gradient
recognized
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.)
Pending
Application number
CN202110476020.6A
Other languages
Chinese (zh)
Inventor
邓悟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
West China Hospital of Sichuan University
Original Assignee
West China Hospital of Sichuan University
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 West China Hospital of Sichuan University filed Critical West China Hospital of Sichuan University
Priority to CN202110476020.6A priority Critical patent/CN113221696A/en
Publication of CN113221696A publication Critical patent/CN113221696A/en
Pending legal-status Critical Current

Links

Images

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/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • 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/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • 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

Abstract

The invention provides an image identification method, system, equipment and storage medium, and relates to the technical field of image identification. The method comprises the following steps: acquiring an image to be recognized, and classifying pixel points in the image to be recognized to obtain pixel points belonging to characters in the image to be recognized; determining a character area according to the pixel points, and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information; acquiring gradient direction histogram features of the character region according to the target gradient value and the target gradient direction; and inputting the histogram feature into a classifier for image recognition to obtain target data. The invention has the advantage of realizing accurate identification of the color image.

Description

Image recognition method, system, equipment and storage medium
Technical Field
The present invention relates to the field of image recognition technologies, and in particular, to an image recognition method, system, device, and storage medium.
Background
With the development of computer vision and deep neural networks, the technology of text recognition has been greatly developed. The technology can be used for identifying certificates such as identity cards and the like, and has wide application prospect in bill identification. In optical character recognition of an image, features are generally extracted and recognized based on a binary image or a grayscale image. Before the color image is identified, the color image is first converted into a gray scale image. However, when converting a color image into a grayscale image, a loss of information occurs. Since different colors may have similar or identical gray values, such direct conversion may result in that characters of different colors in the image and the background cannot be distinguished due to the similar or identical gray values, so that the characters therein cannot be identified.
The above problems are particularly likely to be encountered when recognizing text in business cards. The background in the business card often has a certain color or shading, which has a more significant difference in color from the text in the business card. However, if the gray scale image is converted into a gray scale image, the gray scale value of the background may be similar to or the same as the gray scale value of the text, so that the text therein cannot be accurately recognized.
Disclosure of Invention
The invention aims to provide an image identification method, an image identification system, an image identification device and a storage medium, which are used for solving the problem that a color image cannot be accurately identified in the prior art.
In a first aspect, an embodiment of the present application provides an image recognition method, including the following steps:
acquiring an image to be recognized, and classifying pixel points in the image to be recognized to obtain pixel points belonging to characters in the image to be recognized;
determining a character area according to the pixel points, and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information;
acquiring gradient direction histogram features of the character region according to the target gradient value and the target gradient direction;
and inputting the histogram feature into a classifier for image recognition to obtain target data.
In the implementation process, the pixel points in the image to be recognized are classified firstly to obtain the pixel points belonging to the characters, then the target gradient value and the target gradient direction of each pixel point are calculated, the gradient value and the gradient direction can reflect the characteristics of the outline of the characters, the histogram characteristics are obtained through the target gradient value and the target gradient direction, image recognition is carried out according to the histogram characteristics to obtain target data, and therefore accurate recognition of the color image is achieved.
Based on the first aspect, in some embodiments of the present invention, the method for classifying the pixel points in the image to be recognized to obtain the pixel points belonging to the text in the image to be recognized includes the following steps:
processing an image to be recognized by utilizing a pre-established convolutional neural network which is used for distinguishing pixel points of the image into characters and non-characters to obtain a target probability matrix;
obtaining a value in a target probability matrix, wherein the value represents the probability that a pixel point in an image to be identified belongs to a character;
and acquiring pixel points belonging to characters in the image to be recognized according to the values.
In the implementation process, a convolutional neural network for distinguishing the pixel points in the image into characters and non-characters is established in advance, so that the neural network is utilized to process the image to be recognized, and a target probability matrix for representing the probability of whether each pixel in the image to be recognized belongs to the characters is obtained. Therefore, according to the target probability matrix, the pixel points in the image to be recognized are classified, namely, which pixel points in the image to be recognized belong to characters and which pixel points do not belong to characters are determined.
Based on the first aspect, in some embodiments of the present invention, the method for obtaining the target gradient value and the target gradient direction of each pixel point reflecting color information includes the following steps:
using R, G, B three color channels to respectively obtain gradient values and gradient directions corresponding to different color channels of each pixel point;
and determining the maximum gradient value in the gradient values corresponding to different color channels of each pixel point as a target gradient value, and determining the gradient direction corresponding to the target gradient value as a target gradient direction.
In the implementation process, because the target gradient value and the target gradient direction are important reference features for identifying characters, in order to embody information contained in different colors as much as possible so as to distinguish pixels of different colors, RGB information of colors of pixel points is considered in the calculation of the gradient value. Therefore, accurate target character and image recognition can be carried out on the color image.
In some embodiments of the present invention, the method of acquiring an image to be recognized comprises the steps of:
collecting image data, and carrying out color run-length coding processing on the image data to obtain a coding processing result;
performing clustering analysis according to the processing result to obtain a clustering result;
and acquiring the image to be identified according to the clustering result.
In a second aspect, an embodiment of the present application provides an image recognition system, including a pixel point obtaining module, a gradient processing module, a feature obtaining module, and a recognition module, where:
the device comprises a pixel point acquisition module, a recognition module and a recognition module, wherein the pixel point acquisition module is used for acquiring an image to be recognized and classifying pixel points in the image to be recognized so as to obtain pixel points belonging to characters in the image to be recognized;
the gradient processing module is used for determining a character area according to the pixel points and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information;
the characteristic obtaining module is used for obtaining the gradient direction histogram characteristic of the character area according to the target gradient value and the target gradient direction;
and the identification module is used for inputting the histogram features into the classifier to carry out image identification so as to obtain target data.
The method comprises the steps of firstly classifying pixel points in an image to be recognized through a pixel point acquisition module to obtain pixel points belonging to characters, then calculating a target gradient value and a target gradient direction of each pixel point through a gradient processing module, acquiring histogram features according to the target gradient value and the target gradient direction through a feature acquisition module, and then performing image recognition according to the histogram features through a recognition module to obtain target data, so that accurate recognition of color images is achieved.
Based on the second aspect, in some embodiments of the present invention, the pixel point obtaining module includes a matrix obtaining submodule, a value determining submodule, and a pixel point submodule, where:
the matrix acquisition submodule is used for processing the image to be identified by utilizing a pre-established convolutional neural network which is used for distinguishing pixel points of the image into characters and non-characters so as to obtain a target probability matrix;
the value determination submodule is used for obtaining a value in the target probability matrix, wherein the value represents the probability that a pixel point in the image to be recognized belongs to a character;
and the pixel point submodule is used for acquiring pixel points belonging to characters in the image to be identified according to the values.
Based on the second aspect, in some embodiments of the invention, the gradient processing module comprises a data acquisition sub-module and a targeting sub-module, wherein:
the data acquisition submodule is used for respectively acquiring gradient values and gradient directions corresponding to different color channels of each pixel point by utilizing R, G, B three color channels;
and the target determining submodule is used for determining the maximum gradient value in the gradient values corresponding to the different color channels of each pixel point as a target gradient value and determining the gradient direction corresponding to the target gradient value as a target gradient direction.
Based on the second aspect, in some embodiments of the present invention, the pixel point obtaining module includes a run-length coding submodule, a cluster analysis submodule, and an image obtaining submodule, wherein:
the run-length coding submodule is used for acquiring image data and carrying out color run-length coding processing on the image data to obtain a coding processing result;
the cluster analysis submodule is used for carrying out cluster analysis according to the processing result so as to obtain a cluster result;
and the image acquisition submodule is used for acquiring the image to be identified according to the clustering result.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory for storing one or more programs; a processor. The program or programs, when executed by a processor, implement the method of any of the first aspects as described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method according to any one of the first aspect described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of an image recognition method according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an image recognition system according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Icon: 100. a pixel point acquisition module; 110. a matrix acquisition submodule; 120. a value determination submodule; 130. a pixel point submodule; 140. a run length encoding submodule; 150. a cluster analysis submodule; 160. an image acquisition sub-module; 200. a gradient processing module; 210. a data acquisition submodule; 220. a target determination submodule; 300. a feature acquisition module; 400. an identification module; 101. a memory; 102. a processor; 103. a communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Examples
As shown in fig. 1, in a first aspect, an embodiment of the present application provides an image recognition method, including the following steps:
s100, obtaining an image to be recognized, and classifying pixel points in the image to be recognized to obtain pixel points belonging to characters in the image to be recognized.
When determining the pixel points belonging to the characters in the image to be recognized, the following steps can be adopted. Firstly, processing an image to be recognized by utilizing a pre-established convolutional neural network for distinguishing pixel points of an image into characters and non-characters to obtain a target probability matrix. Then, obtaining a value in the target probability matrix, wherein the value represents the probability that a pixel point in the image to be identified belongs to the character; and finally, acquiring pixel points belonging to characters in the image to be recognized according to the values.
The method comprises the steps of establishing a convolutional neural network for distinguishing pixel points in a picture into characters and non-characters in advance, processing an image to be recognized by utilizing the neural network, and obtaining a target probability matrix for representing the probability of whether each pixel in the image to be recognized belongs to the characters. Therefore, according to the target probability matrix, the pixel points in the image to be recognized are classified, namely, which pixel points in the image to be recognized belong to characters and which pixel points do not belong to characters are determined.
S200, determining a character area according to the pixel points, and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information.
In some embodiments of the present invention, the step of obtaining the target gradient value and the target gradient direction of each pixel point reflecting color information includes: using R, G, B three color channels to respectively obtain gradient values and gradient directions corresponding to different color channels of each pixel point; and determining the maximum gradient value in the gradient values corresponding to different color channels of each pixel point as a target gradient value, and determining the gradient direction corresponding to the target gradient value as a target gradient direction.
Each color corresponds to different RGB values, and the color difference between each pixel point and surrounding pixel points can be described by respectively solving the gradient value of the RGB three channels of each pixel point.
For example, if the gradient value of a certain pixel point in the R channel is 10, the gradient value in the G channel is 2, and the gradient value in the B channel is 0, the largest gradient value is selected, that is, the gradient value 10 of the R channel is used as the gradient value of the pixel point, and the gradient direction of the R channel is recorded as the gradient direction of the pixel point. Therefore, as long as the pixel point and the surrounding pixel point have a larger difference in one of the three color channels, the pixel point and the surrounding pixel point are considered to have a significant change, and the maximum gradient value representing the difference is recorded as characteristic information for image target identification.
The gradient value and gradient direction for solving each pixel point can be obtained by respectively solving the horizontal gradient and the vertical gradient. For the calculation of the horizontal gradient and the vertical gradient, various image edge detection operators can be used for calculation, including but not limited to Sobel operator, Prewitt operator, Roberts Cross operator, and the like.
In the implementation process, because the target gradient value and the target gradient direction are important reference features for identifying characters, in order to embody information contained in different colors as much as possible so as to distinguish pixels of different colors, RGB information of colors of pixel points is considered in the calculation of the gradient value. Thereby ensuring accurate image recognition of the color image.
S300, acquiring gradient direction histogram characteristics of the character area according to the target gradient value and the target gradient direction.
After the target gradient values and the target gradient directions of all the pixel points are obtained, the gradient direction histogram feature of the character area can be obtained according to the gradient values and the gradient directions of all the pixels. The gradient direction histogram may be divided into 4 directions or 8 directions and then equally divided into 360 degrees. And voting the gradient value of each pixel point in the image to the direction quadrant to which the pixel point belongs according to the corresponding gradient direction.
Wherein the voting may be performed using a hard voting or soft voting method. For hard voting, for example, if the gradient value of a certain pixel is 10, the gradient direction (the arctangent value of the direction angle) is 0.5, and the corresponding angle of the gradient direction should be 30 degrees, then in the 8-direction histogram, the gradient value of the pixel should vote in the quadrant of 0-45 degrees, and thus the gradient value 10 is accumulated in the quadrant of 0-45 degrees. After all pixel points in the image are voted according to the method, a total gradient value is obtained in each quadrant. The histogram of the gradient values including the quadrants obtained in this way is a gradient direction histogram feature representing the contour feature of the image. For soft voting, for example, the corresponding gradient direction has an angle of 30 degrees, which is between 0 degrees and 45 degrees, and linear interpolation may be used to project a value of 10 × 1-t onto 0 degrees, a value of 10 × t onto 45 degrees, t is a weight between 0 and 1, 30 degrees is farther from 0 degrees and closer to 45 degrees, so t is (30-0)/(45-0) 2/3. Therefore, the soft voting method ensures that the gradient value of 30 degrees has voting values in the quadrants of 0 degree and 45 degrees respectively according to different weights, so that the voting result can better reflect the distribution rule of the characteristic in each quadrant, and the identification of the characteristic is more facilitated.
And S400, inputting the histogram features into a classifier for image recognition to obtain target data.
The histogram features are input as criteria for an Optical Character Recognition (OCR) classifier, which can be image-recognized by various classifiers known. Therefore, the histogram feature is finally input to a classifier for image recognition. The classifier may be a known classifier such as MQDF (modified quadratic discriminant function classifier), SVM (vector machine), or the like.
In the implementation process, the pixel points in the image to be recognized are classified to obtain the pixel points belonging to the characters, then the target gradient value and the target gradient direction of each pixel point are calculated, and the gradient value and the gradient direction can reflect the characteristics of the outline of the characters, so that the histogram characteristics are obtained through the target gradient value and the target gradient direction, and then the image recognition is performed according to the histogram characteristics, so that the accurate recognition of the color image is realized.
In some embodiments of the present invention, the step of acquiring the image to be recognized may be preceded by the step of acquiring the image to be recognized. Firstly, collecting image data, and carrying out color run-length coding processing on the image data to obtain a coding processing result; since various information such as characters and background patterns are generally retained in the acquired image data, color run-length encoding may be performed first to separate the characters from the background.
Performing clustering analysis according to the processing result to obtain a clustering result;
and acquiring the image to be identified according to the clustering result.
The interference noise points can be effectively removed by a cluster analysis mode.
As an embodiment, after the image data is acquired and before the image data is subjected to the color run-length coding process, the image data may be subjected to a preprocessing, for example, including at least one of image sharpening and denoising. The preprocessing process is not limited to image sharpening and denoising, and can include other image processing, so that the processed image to be recognized is clearer, and subsequent image recognition is facilitated.
As shown in fig. 2, in a second aspect, an embodiment of the present invention further provides an image recognition system, which includes a pixel point obtaining module 100, a gradient processing module 200, a feature obtaining module 300, and a recognition module 400, where:
the image recognition system comprises a pixel point acquisition module 100, a recognition module and a recognition module, wherein the pixel point acquisition module 100 is used for acquiring an image to be recognized and classifying pixel points in the image to be recognized so as to obtain pixel points belonging to characters in the image to be recognized;
the gradient processing module 200 is configured to determine a text region according to the pixel points, and obtain a target gradient value and a target gradient direction of each pixel point reflecting color information;
a feature obtaining module 300, configured to obtain a gradient direction histogram feature of the text region according to the target gradient value and the target gradient direction;
and the identifying module 400 is configured to input the histogram feature into a classifier for image identification, so as to obtain target data.
Firstly, the pixel point obtaining module 100 classifies the pixel points in the image to be recognized to obtain the pixel points belonging to the characters, then the gradient processing module 200 calculates the target gradient value and the target gradient direction of each pixel point, and since the gradient value and the gradient direction can reflect the characteristics of the outline of the characters, the characteristic obtaining module 300 obtains the histogram characteristics according to the target gradient value and the target gradient direction, and then the recognition module 400 performs image recognition according to the histogram characteristics to obtain the target data, thereby realizing the accurate recognition of the color image.
Based on the second aspect, in some embodiments of the present invention, the pixel point obtaining module 100 includes a matrix obtaining sub-module 110, a value determining sub-module 120, and a pixel point sub-module 130, where:
the matrix obtaining sub-module 110 is configured to process the image to be recognized by using a pre-established convolutional neural network that uses pixel points for distinguishing pictures as characters and non-characters, so as to obtain a target probability matrix;
a value determination submodule 120, configured to obtain a value in the target probability matrix, where the value represents a probability that a pixel point in the image to be recognized belongs to a character;
and the pixel point submodule 130 is configured to obtain pixel points belonging to characters in the image to be identified according to the values.
A convolutional neural network for distinguishing the pixel points in the image into characters and non-characters is pre-established by the matrix acquisition sub-module 110, so that the neural network is utilized to process the image to be recognized, and a target probability matrix for representing the probability of whether each pixel in the image to be recognized belongs to a character is obtained. Therefore, the pixel points in the image to be recognized are classified according to the target probability matrix, and that which pixel points in the image to be recognized belong to characters and which pixel points do not belong to characters is determined.
Based on the second aspect, in some embodiments of the present invention, the gradient processing module 200 comprises a data acquisition sub-module 210 and a targeting sub-module 220, wherein:
the data obtaining submodule 210 is configured to obtain gradient values and gradient directions corresponding to different color channels of each pixel point by using R, G, B three color channels;
the target determining submodule 220 is configured to determine that a largest gradient value among gradient values corresponding to different color channels of each pixel is a target gradient value, and determine that a gradient direction corresponding to the target gradient value is a target gradient direction.
Each color corresponds to different RGB values, and the gradient values of the RGB three channels of each pixel point are respectively solved by the data acquisition submodule 210, so that the color difference between each pixel point and the surrounding pixel points can be described.
Based on the second aspect, in some embodiments of the present invention, the pixel point obtaining module 100 includes a run-length encoding sub-module 140, a cluster analysis sub-module 150, and an image obtaining sub-module 160, where:
the run-length coding submodule 140 is configured to acquire image data, and perform color run-length coding processing on the image data to obtain a coding processing result;
the cluster analysis submodule 150 is used for carrying out cluster analysis according to the processing result to obtain a cluster result;
and the image obtaining sub-module 160 is configured to obtain an image to be identified according to the clustering result.
Before the step of acquiring the image to be recognized, the image to be recognized may be acquired by the following steps. Firstly, acquiring image data through a run-length coding submodule 140, and carrying out color run-length coding processing on the image data to obtain a coding processing result; since various information such as characters and background patterns are generally retained in the acquired image data, color run-length encoding may be performed first to separate the characters from the background.
As shown in fig. 3, in a third aspect, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs; a processor 102. The one or more programs, when executed by the processor 102, implement the method of any of the first aspects as described above.
Also included is a communication interface 103, and the memory 101, processor 102 and communication interface 103 are electrically connected to each other, directly or indirectly, to enable transfer or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 101 may be used to store software programs and modules, and the processor 102 executes the software programs and modules stored in the memory 101 to thereby execute various functional applications and data processing. The communication interface 103 may be used for communicating signaling or data with other node devices.
The Memory 101 may be, but is not limited to, a Random Access Memory 101 (RAM), a Read Only Memory 101 (ROM), a Programmable Read Only Memory 101 (PROM), an Erasable Read Only Memory 101 (EPROM), an electrically Erasable Read Only Memory 101 (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may be a general-purpose Processor 102, including a Central Processing Unit (CPU) 102, a Network Processor 102 (NP), and the like; but may also be a Digital Signal processor 102 (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware components.
In the embodiments provided in the present application, it should be understood that the disclosed method and system and method can be implemented in other ways. The method and system embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by the processor 102, implements the method according to any one of the first aspect described above. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory 101 (ROM), a Random Access Memory 101 (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. An image recognition method, comprising the steps of:
acquiring an image to be recognized, and classifying pixel points in the image to be recognized to obtain pixel points belonging to characters in the image to be recognized;
determining a character area according to the pixel points, and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information;
acquiring gradient direction histogram features of the character region according to the target gradient value and the target gradient direction;
and inputting the histogram feature into a classifier for image recognition to obtain target data.
2. The image recognition method according to claim 1, wherein the method for classifying the pixel points in the image to be recognized to obtain the pixel points belonging to the text in the image to be recognized comprises the following steps:
processing the image to be identified by utilizing a pre-established convolutional neural network which is used for distinguishing pixel points of the image into characters and non-characters to obtain a target probability matrix;
obtaining a value in the target probability matrix, wherein the value represents the probability that a pixel point in the image to be recognized belongs to a character;
and acquiring pixel points belonging to characters in the image to be recognized according to the values.
3. An image recognition method according to claim 1, wherein the method for obtaining the target gradient value and the target gradient direction of each pixel point reflecting color information comprises the following steps:
using R, G, B three color channels to respectively obtain gradient values and gradient directions corresponding to different color channels of each pixel point;
and determining the maximum gradient value in the gradient values corresponding to different color channels of each pixel point as a target gradient value, and determining the gradient direction corresponding to the target gradient value as a target gradient direction.
4. An image recognition method according to claim 1, wherein the method of acquiring the image to be recognized comprises the steps of:
collecting image data, and carrying out color run-length coding processing on the image data to obtain a coding processing result;
performing clustering analysis according to the processing result to obtain a clustering result;
and acquiring the image to be identified according to the clustering result.
5. The utility model provides an image identification system, its characterized in that includes pixel acquisition module, gradient processing module, characteristic acquisition module and identification module, wherein:
the device comprises a pixel point acquisition module, a recognition module and a recognition module, wherein the pixel point acquisition module is used for acquiring an image to be recognized and classifying pixel points in the image to be recognized so as to obtain pixel points belonging to characters in the image to be recognized;
the gradient processing module is used for determining a character area according to the pixel points and acquiring a target gradient value and a target gradient direction of each pixel point reflecting color information;
the characteristic obtaining module is used for obtaining the gradient direction histogram characteristic of the character area according to the target gradient value and the target gradient direction;
and the identification module is used for inputting the histogram features into the classifier to carry out image identification so as to obtain target data.
6. The image recognition system of claim 5, wherein the pixel point acquisition module comprises a matrix acquisition submodule, a value determination submodule, and a pixel point submodule, wherein:
the matrix acquisition submodule is used for processing the image to be identified by utilizing a pre-established convolutional neural network which is used for distinguishing pixel points of the image into characters and non-characters so as to obtain a target probability matrix;
the value determination submodule is used for obtaining a value in the target probability matrix, wherein the value represents the probability that a pixel point in the image to be recognized belongs to a character;
and the pixel point submodule is used for acquiring pixel points belonging to characters in the image to be identified according to the values.
7. An image recognition system according to claim 5, wherein the gradient processing module comprises a data acquisition sub-module and a target determination sub-module, wherein:
the data acquisition submodule is used for respectively acquiring gradient values and gradient directions corresponding to different color channels of each pixel point by utilizing R, G, B three color channels;
and the target determining submodule is used for determining the maximum gradient value in the gradient values corresponding to the different color channels of each pixel point as a target gradient value and determining the gradient direction corresponding to the target gradient value as a target gradient direction.
8. The image recognition system of claim 5, wherein the pixel point acquisition module comprises a run-length coding sub-module, a cluster analysis sub-module, and an image acquisition sub-module, wherein:
the run-length coding submodule is used for acquiring image data and carrying out color run-length coding processing on the image data to obtain a coding processing result;
the cluster analysis submodule is used for carrying out cluster analysis according to the processing result so as to obtain a cluster result;
and the image acquisition submodule is used for acquiring the image to be identified according to the clustering result.
9. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the one or more programs, when executed by the processor, implement the method of any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202110476020.6A 2021-04-29 2021-04-29 Image recognition method, system, equipment and storage medium Pending CN113221696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110476020.6A CN113221696A (en) 2021-04-29 2021-04-29 Image recognition method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476020.6A CN113221696A (en) 2021-04-29 2021-04-29 Image recognition method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113221696A true CN113221696A (en) 2021-08-06

Family

ID=77090597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476020.6A Pending CN113221696A (en) 2021-04-29 2021-04-29 Image recognition method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113221696A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761255A (en) * 2021-08-19 2021-12-07 劢微机器人科技(深圳)有限公司 Robot indoor positioning method, device, equipment and storage medium
WO2023065792A1 (en) * 2021-10-22 2023-04-27 杭州睿胜软件有限公司 Image processing method and apparatus, electronic device, and computer-readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855480A (en) * 2012-08-07 2013-01-02 北京百度网讯科技有限公司 Method and device for recognizing characters in image
CN103854020A (en) * 2012-11-29 2014-06-11 北京千橡网景科技发展有限公司 Character recognition method and device
CN106503697A (en) * 2016-12-05 2017-03-15 北京小米移动软件有限公司 Target identification method and device, face identification method and device
CN108304839A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN111539269A (en) * 2020-04-07 2020-08-14 北京达佳互联信息技术有限公司 Text region identification method and device, electronic equipment and storage medium
CN111680690A (en) * 2020-04-26 2020-09-18 泰康保险集团股份有限公司 Character recognition method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855480A (en) * 2012-08-07 2013-01-02 北京百度网讯科技有限公司 Method and device for recognizing characters in image
CN103854020A (en) * 2012-11-29 2014-06-11 北京千橡网景科技发展有限公司 Character recognition method and device
CN106503697A (en) * 2016-12-05 2017-03-15 北京小米移动软件有限公司 Target identification method and device, face identification method and device
CN108304839A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN111539269A (en) * 2020-04-07 2020-08-14 北京达佳互联信息技术有限公司 Text region identification method and device, electronic equipment and storage medium
CN111680690A (en) * 2020-04-26 2020-09-18 泰康保险集团股份有限公司 Character recognition method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761255A (en) * 2021-08-19 2021-12-07 劢微机器人科技(深圳)有限公司 Robot indoor positioning method, device, equipment and storage medium
CN113761255B (en) * 2021-08-19 2024-02-09 劢微机器人科技(深圳)有限公司 Robot indoor positioning method, device, equipment and storage medium
WO2023065792A1 (en) * 2021-10-22 2023-04-27 杭州睿胜软件有限公司 Image processing method and apparatus, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN111709420B (en) Text detection method, electronic device and computer readable medium
CN108021837B (en) Bar code detection method, bar code detection device and electronic equipment
CN104463195A (en) Printing style digital recognition method based on template matching
CN108197644A (en) A kind of image-recognizing method and device
CN106203539B (en) Method and device for identifying container number
CN110119741A (en) A kind of card card image information recognition methods having powerful connections
Paunwala et al. A novel multiple license plate extraction technique for complex background in Indian traffic conditions
CN113963147B (en) Key information extraction method and system based on semantic segmentation
CN113221696A (en) Image recognition method, system, equipment and storage medium
CN109977899B (en) Training, reasoning and new variety adding method and system for article identification
CN113688838B (en) Red handwriting extraction method and system, readable storage medium and computer equipment
CN110570442A (en) Contour detection method under complex background, terminal device and storage medium
CN111444907B (en) Method, device, equipment and storage medium for character recognition
den Hartog et al. Knowledge-based segmentation for automatic map interpretation
CN111767909B (en) Character recognition method and device and computer readable storage medium
CN111199228B (en) License plate positioning method and device
CN111414917B (en) Identification method of low-pixel-density text
CN111753842B (en) Method and device for detecting text region of bill
CN112861843A (en) Method and device for analyzing selection frame based on feature image recognition
CN110232302B (en) Method for detecting change of integrated gray value, spatial information and category knowledge
Rani et al. Object Detection in Natural Scene Images Using Thresholding Techniques
CN112785550A (en) Image quality value determination method, image quality value determination device, storage medium, and electronic device
CN112070116A (en) Automatic art painting classification system and method based on support vector machine
CN111797922A (en) Text image classification method and device
CN112883974B (en) Electronic letter identification system based on image verification

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210806

RJ01 Rejection of invention patent application after publication